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)
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
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"):
self.panel.show()
-
#-------------------#
def init_modif(self):
#-------------------#
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 :
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
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.
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 :
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()
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):
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):
return 0
res = self.closeEditor(aw)
+ print "________________", res
if res and aw == self.currentEditor:
self.currentEditor = None
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):
"""
# 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!
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()))
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)
</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>