From: Pascale Noyret Date: Mon, 7 Apr 2008 12:28:32 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: V1_14a3~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=30a62c77ea690adb5110802e3acca852faf9e588;p=modules%2Feficas.git *** empty log message *** --- diff --git a/InterfaceQT/browser.py b/InterfaceQT/browser.py index 5dec0e42..75618c72 100644 --- a/InterfaceQT/browser.py +++ b/InterfaceQT/browser.py @@ -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) diff --git a/InterfaceQT/editor.py b/InterfaceQT/editor.py index 16df6961..1ef3c126 100644 --- a/InterfaceQT/editor.py +++ b/InterfaceQT/editor.py @@ -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): #-------------------# diff --git a/InterfaceQT/qtCommun.py b/InterfaceQT/qtCommun.py index d9b3b4fa..a2c62079 100644 --- a/InterfaceQT/qtCommun.py +++ b/InterfaceQT/qtCommun.py @@ -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 diff --git a/InterfaceQT/qtEficas.py b/InterfaceQT/qtEficas.py index c53c428e..a2ee3fa1 100644 --- a/InterfaceQT/qtEficas.py +++ b/InterfaceQT/qtEficas.py @@ -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 : diff --git a/InterfaceQT/qtSaisie.py b/InterfaceQT/qtSaisie.py index bc69b4a1..7c3c86e6 100644 --- a/InterfaceQT/qtSaisie.py +++ b/InterfaceQT/qtSaisie.py @@ -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): diff --git a/InterfaceQT/viewManager.py b/InterfaceQT/viewManager.py index 9ae8bda0..a6a4f5de 100644 --- a/InterfaceQT/viewManager.py +++ b/InterfaceQT/viewManager.py @@ -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 %1 has unsaved changes.") + self.trUtf8("Fichier Modifie"), + self.trUtf8("Le fichier %1 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): """ diff --git a/Ui/OptionsPdf.py b/Ui/OptionsPdf.py index 835cac87..c5c3c891 100644 --- a/Ui/OptionsPdf.py +++ b/Ui/OptionsPdf.py @@ -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) diff --git a/Ui/OptionsPdf.ui b/Ui/OptionsPdf.ui index c24997c0..5d7a8a5a 100644 --- a/Ui/OptionsPdf.ui +++ b/Ui/OptionsPdf.ui @@ -13,7 +13,7 @@ - + desPdf @@ -33,50 +33,50 @@ - Bok + BCancel - 350 + 450 90 70 31 - Ok + Cancel - + - BCancel + LERepPdf - 450 - 90 - 70 + 20 + 40 + 501 31 - Cancel + acroread - + - LERepPdf + Bok - 20 - 40 - 501 + 350 + 90 + 70 31 - acroread + Ok @@ -93,14 +93,24 @@ desPdf LeRepPdfPressed() + + Bok + clicked() + desPdf + BokClicked() + LERepPdf Bok BCancel + + OptionsPdf.ui.h + LeRepPdfPressed() + BokClicked()