]> SALOME platform Git repositories - modules/eficas.git/commitdiff
Salome HOME
*** empty log message ***
authorPascale Noyret <pascale.noyret@edf.fr>
Mon, 7 Apr 2008 12:28:32 +0000 (12:28 +0000)
committerPascale Noyret <pascale.noyret@edf.fr>
Mon, 7 Apr 2008 12:28:32 +0000 (12:28 +0000)
InterfaceQT/browser.py
InterfaceQT/editor.py
InterfaceQT/qtCommun.py
InterfaceQT/qtEficas.py
InterfaceQT/qtSaisie.py
InterfaceQT/viewManager.py
Ui/OptionsPdf.py
Ui/OptionsPdf.ui

index 5dec0e42e654f5c189053c41ee4c1e2942edcba8..75618c7299a452153d394e0ece51013befe099ba 100644 (file)
@@ -26,7 +26,8 @@ class JDCTree( QListView ):
         self.connect(self,SIGNAL('contextMenuRequested(QListViewItem *, const QPoint &, int)'),
                      self.handleContextMenu)
 
-        self.connect(self, SIGNAL("onItem ( QListViewItem * ) "), self.handleOnItem)
+        #self.connect(self, SIGNAL("onItem ( QListViewItem * ) "), self.handleOnItem)
+        self.connect(self, SIGNAL("clicked ( QListViewItem * ) "), self.handleOnItem)
         self.connect(self, SIGNAL('mouseButtonPressed(int, QListViewItem*, const QPoint&, int)'),
                      self.handleNommeItem)
         
index 16df6961678fc7789df127f3e7c2d84543eadda4..1ef3c1265bf8b7e06f425fdc01d2cd132d416526 100644 (file)
@@ -40,6 +40,7 @@ class JDCEditor(QSplitter):
        self.parent         = parent
         if parent != None :
            self.salome         = self.parent.salome
+        self.appliEficas = self.parent.appliEficas
         self.top  = None
         self.code = prefs.code
         self.version_code = VERSION_CODE
@@ -52,8 +53,8 @@ class JDCEditor(QSplitter):
         self.ihm="QT"
         
         from Editeur import configuration
-        self.CONFIGURATION = configuration.make_config(self,prefs.REPINI)
-        self.CONFIGStyle = configuration.make_config_style(self,prefs.REPINI)
+        self.CONFIGURATION = self.appliEficas.CONFIGURATION
+        self.CONFIGStyle = self.appliEficas.CONFIGStyle
         self.test=0
         self.sb = None
         if hasattr(qApp.mainWidget(),"statusBar"):
@@ -457,7 +458,6 @@ class JDCEditor(QSplitter):
         self.panel.show()
         
     
-    
     #-------------------#
     def init_modif(self):
     #-------------------#
index d9b3b4fad7d7ab2bfa42e3785f5bc435c4e28b66..a2c6207957b5f91e9deba714638bf88e3f1e5419 100644 (file)
@@ -54,7 +54,7 @@ class QTPanel:
          return
       cle_doc = string.replace(cle_doc,'.','')
       cle_doc = string.replace(cle_doc,'-','')
-      commande = self.editor.CONFIGURATION.exec_acrobat
+      commande = self.editor.appliEficas.CONFIGURATION.exec_acrobat
       try :
          f=open(commande,"rb")
       except :
@@ -203,8 +203,6 @@ class QTPanelTBW2(QTPanel):
         QObject.connect( self.LBNouvCommande, SIGNAL("returnPressed(QListBoxItem*)"),self.DefCmd )
 
   def DefCmd(self):
-        print self.editor.focusWidget()
-        print self.LBNouvCommande
         if (self.editor.focusWidget())!=self.LBNouvCommande :
             return 
         if self.LBNouvCommande.selectedItem()== 0 : return
index c53c428e601ff91ea3bedd09b5c7398cbb260e81..a2ee3fa16df4e230eaa65c6d200079850027518b 100644 (file)
@@ -142,6 +142,11 @@ class Appli(Eficas):
         monOption=Options(parent=self.viewmanager,fl=Qt.WType_Dialog)
         monOption.show()
         
+    def optionPdf(self) :
+        from monOptionsPdf import OptionPdf
+        monOption=OptionPdf(parent=self.viewmanager,fl=Qt.WType_Dialog,configuration=self.CONFIGURATION)
+        monOption.show()
+        
     def handleShowRecentMenu(self):
         """
         Private method to set up recent files menu.
@@ -216,7 +221,9 @@ class Appli(Eficas):
         self.viewmanager.handleCloseAll()
         
     def fileExit(self):
-        self.viewmanager.handleCloseAll()
+        # On peut sortir sur Abort
+        if self.viewmanager.handleCloseAll() ==0 : 
+           return
         if self.salome :
            self.close()
         else :
index bc69b4a1e79bdb707c75dcdd70c526d912783870..7c3c86e6b5bca775f2758e9b3c048cf291e34114 100644 (file)
@@ -38,10 +38,12 @@ class SaisieValeur:
             self.listBoxASSD.insertItem( aSD)
             QObject.connect(self.listBoxASSD, SIGNAL("doubleClicked(QListBoxItem*)" ), self.ClicASSD )
        min,max =  self.node.item.GetMinMax()
-       if (min == 1 and min == max and len(listeNomsSD)==1 ):
+       l= self.node.item.GetListeValeurs()
+       
+       if (min == 1 and min == max and len(listeNomsSD)==1 and (l==[] or l==None)):
             if ('R' not in self.node.item.get_type()) :
                self.listBoxASSD.setCurrentItem(0)
-               self.ClicASSD()
+
 
   def BuildLBValeurs(self):
         self.LBValeurs.clear()
@@ -68,7 +70,7 @@ class SaisieValeur:
          self.Commentaire.setText(commentaire)
          valeur=valeurQstring.latin1()
          validite,commentaire=self.politique.RecordValeur(valeur)
-         #self.Commentaire.setText(QString(commentaire))
+         self.Commentaire.setText(QString(commentaire))
          self.editor.affiche_infos(commentaire)
 
   def ClicValeur(self):
index 9ae8bda097044fedb2bec47222d3cd4bf0c0c9ea..a6a4f5de059ab04e6fffd0879f443e83f9a4b8b8 100644 (file)
@@ -635,18 +635,18 @@ class ViewManager:
             if fn is None:
                 fn = self.trUtf8('Noname')
             res = QMessageBox.warning(self.parent(), 
-                self.trUtf8("File Modified"),
-                self.trUtf8("The file <b>%1</b> has unsaved changes.")
+                self.trUtf8("Fichier Modifie"),
+                self.trUtf8("Le fichier <b>%1</b> n a pas ete sauvegarde.")
                     .arg(fn),
-                self.trUtf8("&Save"), self.trUtf8("&Discard changes"),
-                self.trUtf8("&Abort"), 0, 2)
+                self.trUtf8("&Sauvegarder"), self.trUtf8("&Annuler Modifications"),
+                self.trUtf8("&Abandonner"), 0, 2)
             if res == 0:
                 (ok, newName) = editor.saveFile()
                 if ok:
                     self.setEditorName(editor, newName)
                 return ok
             elif res == 2:
-                return 0
+                return  0
         return 1
         
     def checkAllDirty(self):
@@ -691,6 +691,7 @@ class ViewManager:
             return 0
             
         res = self.closeEditor(aw)
+        print "________________", res
         if res and aw == self.currentEditor:
             self.currentEditor = None
             
@@ -714,8 +715,10 @@ class ViewManager:
         Private method to close all editor windows via file menu.
         """
         savedEditors = self.editors[:]
+        retour=1
         for editor in savedEditors:
-            self.closeEditor(editor)
+            retour=retour*self.closeEditor(editor)
+        return retour
             
     def handleCloseWindow(self, fn):
         """
index 835cac87ac571298df21cb6db5d3996b87a8a075..c5c3c89113e732102790c939a86d4ce1f5a25f83 100644 (file)
@@ -2,7 +2,7 @@
 
 # Form implementation generated from reading ui file 'OptionsPdf.ui'
 #
-# Created: lun avr 7 08:50:14 2008
+# Created: lun avr 7 09:36:07 2008
 #      by: The PyQt User Interface Compiler (pyuic) 3.13
 #
 # WARNING! All changes made in this file will be lost!
@@ -23,15 +23,15 @@ class desPdf(QDialog):
         self.textLabel1_2 = QLabel(self,"textLabel1_2")
         self.textLabel1_2.setGeometry(QRect(20,10,280,20))
 
-        self.Bok = QPushButton(self,"Bok")
-        self.Bok.setGeometry(QRect(350,90,70,31))
-
         self.BCancel = QPushButton(self,"BCancel")
         self.BCancel.setGeometry(QRect(450,90,70,31))
 
         self.LERepPdf = QLineEdit(self,"LERepPdf")
         self.LERepPdf.setGeometry(QRect(20,40,501,31))
 
+        self.Bok = QPushButton(self,"Bok")
+        self.Bok.setGeometry(QRect(350,90,70,31))
+
         self.languageChange()
 
         self.resize(QSize(538,142).expandedTo(self.minimumSizeHint()))
@@ -39,21 +39,25 @@ class desPdf(QDialog):
 
         self.connect(self.BCancel,SIGNAL("clicked()"),self.reject)
         self.connect(self.LERepPdf,SIGNAL("returnPressed()"),self.LeRepPdfPressed)
+        self.connect(self.Bok,SIGNAL("clicked()"),self.BokClicked)
 
         self.setTabOrder(self.LERepPdf,self.Bok)
         self.setTabOrder(self.Bok,self.BCancel)
 
 
     def languageChange(self):
-        self.setCaption(QString.null)
+        self.setCaption(self.__tr("desPdf"))
         self.textLabel1_2.setText(self.__tr("Lecteur Pdf"))
-        self.Bok.setText(self.__tr("Ok"))
         self.BCancel.setText(self.__tr("Cancel"))
         self.LERepPdf.setText(self.__tr("acroread"))
+        self.Bok.setText(self.__tr("Ok"))
 
 
     def LeRepPdfPressed(self):
         print "desPdf.LeRepPdfPressed(): Not implemented yet"
 
+    def BokClicked(self):
+        print "desPdf.BokClicked(): Not implemented yet"
+
     def __tr(self,s,c = None):
         return qApp.translate("desPdf",s,c)
index c24997c03e728a696a360382a10557eb714f23ca..5d7a8a5ad0c8f91a76d9ba65127dcb8f8f8ba517 100644 (file)
@@ -13,7 +13,7 @@
         </rect>
     </property>
     <property name="caption">
-        <string></string>
+        <string>desPdf</string>
     </property>
     <widget class="QLabel">
         <property name="name">
     </widget>
     <widget class="QPushButton">
         <property name="name">
-            <cstring>Bok</cstring>
+            <cstring>BCancel</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>350</x>
+                <x>450</x>
                 <y>90</y>
                 <width>70</width>
                 <height>31</height>
             </rect>
         </property>
         <property name="text">
-            <string>Ok</string>
+            <string>Cancel</string>
         </property>
     </widget>
-    <widget class="QPushButton">
+    <widget class="QLineEdit">
         <property name="name">
-            <cstring>BCancel</cstring>
+            <cstring>LERepPdf</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>450</x>
-                <y>90</y>
-                <width>70</width>
+                <x>20</x>
+                <y>40</y>
+                <width>501</width>
                 <height>31</height>
             </rect>
         </property>
         <property name="text">
-            <string>Cancel</string>
+            <string>acroread</string>
         </property>
     </widget>
-    <widget class="QLineEdit">
+    <widget class="QPushButton">
         <property name="name">
-            <cstring>LERepPdf</cstring>
+            <cstring>Bok</cstring>
         </property>
         <property name="geometry">
             <rect>
-                <x>20</x>
-                <y>40</y>
-                <width>501</width>
+                <x>350</x>
+                <y>90</y>
+                <width>70</width>
                 <height>31</height>
             </rect>
         </property>
         <property name="text">
-            <string>acroread</string>
+            <string>Ok</string>
         </property>
     </widget>
 </widget>
         <receiver>desPdf</receiver>
         <slot>LeRepPdfPressed()</slot>
     </connection>
+    <connection>
+        <sender>Bok</sender>
+        <signal>clicked()</signal>
+        <receiver>desPdf</receiver>
+        <slot>BokClicked()</slot>
+    </connection>
 </connections>
 <tabstops>
     <tabstop>LERepPdf</tabstop>
     <tabstop>Bok</tabstop>
     <tabstop>BCancel</tabstop>
 </tabstops>
+<includes>
+    <include location="local" impldecl="in implementation">OptionsPdf.ui.h</include>
+</includes>
 <slots>
     <slot>LeRepPdfPressed()</slot>
+    <slot>BokClicked()</slot>
 </slots>
 <layoutdefaults spacing="6" margin="11"/>
 </UI>