from qtcommun import QTPanel
from qtcommun import QTPanelTBW1
from qtcommun import QTPanelTBW2
+from qt import *
+
# Import des panels
def BSupPressed(self):
QTPanel.BSupPressed(self)
+ def BOkPressed(self):
+ QTPanelTBW1.BOkPressed(self)
+
+ def BNextPressed(self):
+ QTPanelTBW2.BNextPressed(self)
+
def buildTabCommand(self):
- QTPanelTBW2.buildTabCommand(self)
+ QTPanelTBW2.buildLBNouvCommande(self)
+
+ def LEFiltreTextChanged(self):
+ QTPanelTBW2.LEFiltreTextChanged(self)
+
+ def LEfiltreReturnPressed(self):
+ QTPanelTBW2.LEfiltreReturnPressed(self)
+
+ def LBNouvCommandeClicked(self):
+ QTPanelTBW2.LBNouvCommandeClicked(self)
+
def BSupPressed(self):
QTPanel.BSupPressed(self)
-
-# def get_bulle_aide(self):
-# """
-# Retourne la bulle d'aide affectée au panneau courant (affichée par clic droit)
-# """
-# return """Double-cliquez sur la valeur désirée
-# pour valoriser le mot-clé simple courant"""
-
# interface a implementer par les noeuds derives (debut)
#----------------------------------------------------------
def getPanel(self):
- print "hhhhhhhhhhhhhhhhhhhhhhhhh"
+ print "jjjjkkkk"
return None
def createPopUpMenu(self):
def buildTabCommand(self):
"""
"""
+ print "hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh"
tabCommand = QWidget(self)
layout = QVBoxLayout(tabCommand)
listBox = QListBox(tabCommand)
# Form implementation generated from reading ui file 'desCommande.ui'
#
-# Created: mar mar 6 16:26:11 2007
+# Created: ven mar 9 10:05:44 2007
# by: The PyQt User Interface Compiler (pyuic) 3.13
#
# WARNING! All changes made in this file will be lost!
from qt import *
+image0_data = \
+ "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \
+ "\x49\x48\x44\x52\x00\x00\x00\x21\x00\x00\x00\x0e" \
+ "\x08\x06\x00\x00\x00\xa1\x1e\x75\x8c\x00\x00\x00" \
+ "\xcf\x49\x44\x41\x54\x38\x8d\xd5\x94\xdb\x0e\xc3" \
+ "\x20\x0c\x43\xed\xfd\xf8\xd8\x97\xbb\x0f\x34\x5b" \
+ "\x48\x08\x45\xd5\x1e\xb6\x48\x88\xf4\x12\xe7\x60" \
+ "\x01\xc0\x0f\x04\x6f\xd6\xe9\x9b\xba\x77\x20\x04" \
+ "\x80\x92\x4a\x10\x32\xc9\x2e\xfb\xd8\xc7\xd5\xca" \
+ "\xbc\xc0\x25\x40\x00\x99\xe9\x57\x84\x95\x68\xfe" \
+ "\x7f\x06\xc0\xde\xd1\xde\xb3\x2b\x4a\x1e\xc4\xea" \
+ "\x82\x4b\x9e\x74\x09\x71\x65\xbd\x01\xf8\x55\x27" \
+ "\xf7\x8a\x72\x01\xe0\xa3\x12\x9f\x34\x5a\x01\x7c" \
+ "\x54\x3b\xaf\xdc\x98\x3d\x0f\x71\x09\xd1\x5a\x33" \
+ "\x1b\x47\x1f\x47\x07\x2c\x17\x49\x4a\x82\x33\x8f" \
+ "\x61\x78\x20\x3a\x88\x17\xe6\x73\x06\xb1\xf0\x8b" \
+ "\x07\xba\x03\xe6\x02\xc9\xb8\x31\x07\x7e\x37\xe0" \
+ "\x20\x9e\x67\xe3\x38\x67\x10\x97\x7b\x17\xde\x80" \
+ "\xc1\x85\xad\x38\x69\x5a\x51\xd5\x22\xc8\x2c\xe7" \
+ "\x79\x12\xe2\xfe\xd8\xbe\x83\x76\x20\x92\xf5\x2b" \
+ "\x18\x20\xdd\x11\xbb\x10\xe5\x65\xb5\x3a\x5a\x3b" \
+ "\xba\xff\x13\x07\x13\xd6\x6f\xa6\x98\x18\x57\x06" \
+ "\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82"
class DComm(QWidget):
def __init__(self,parent = None,name = None,fl = 0):
QWidget.__init__(self,parent,name,fl)
+ self.image0 = QPixmap()
+ self.image0.loadFromData(image0_data,"PNG")
if not name:
self.setName("DComm")
self.TWChoix = QTabWidget(self,"TWChoix")
self.TWChoix.setGeometry(QRect(0,0,500,400))
- self.tab = QWidget(self.TWChoix,"tab")
+ self.MotClef = QWidget(self.TWChoix,"MotClef")
- self.textLabel1 = QLabel(self.tab,"textLabel1")
+ self.textLabel1 = QLabel(self.MotClef,"textLabel1")
self.textLabel1.setGeometry(QRect(50,10,120,20))
self.textLabel1.setMinimumSize(QSize(0,0))
- self.textLabel1_2 = QLabel(self.tab,"textLabel1_2")
+ self.textLabel1_2 = QLabel(self.MotClef,"textLabel1_2")
self.textLabel1_2.setGeometry(QRect(360,0,50,37))
- self.LBMCPermis = QListBox(self.tab,"LBMCPermis")
+ self.LBMCPermis = QListBox(self.MotClef,"LBMCPermis")
self.LBMCPermis.setGeometry(QRect(10,40,220,290))
self.LBMCPermis.setMinimumSize(QSize(0,0))
- self.LBRegles = QListBox(self.tab,"LBRegles")
+ self.LBRegles = QListBox(self.MotClef,"LBRegles")
self.LBRegles.setGeometry(QRect(260,40,230,290))
- self.TWChoix.insertTab(self.tab,QString(""))
+ self.TWChoix.insertTab(self.MotClef,QString(""))
- self.tab_2 = QWidget(self.TWChoix,"tab_2")
+ self.Concept = QWidget(self.TWChoix,"Concept")
- self.groupBox1 = QGroupBox(self.tab_2,"groupBox1")
+ self.groupBox1 = QGroupBox(self.Concept,"groupBox1")
self.groupBox1.setGeometry(QRect(0,10,520,380))
self.textLabel1_3 = QLabel(self.groupBox1,"textLabel1_3")
self.LENomConcept = QLineEdit(self.groupBox1,"LENomConcept")
self.LENomConcept.setGeometry(QRect(80,110,310,30))
- self.TWChoix.insertTab(self.tab_2,QString(""))
+ self.TWChoix.insertTab(self.Concept,QString(""))
- self.TabPage = QWidget(self.TWChoix,"TabPage")
+ self.Commande = QWidget(self.TWChoix,"Commande")
- self.textLabel6 = QLabel(self.TabPage,"textLabel6")
+ self.textLabel6 = QLabel(self.Commande,"textLabel6")
self.textLabel6.setGeometry(QRect(10,60,60,30))
- self.LEFiltre = QLineEdit(self.TabPage,"LEFiltre")
- self.LEFiltre.setGeometry(QRect(50,60,200,30))
-
- self.textLabel4 = QLabel(self.TabPage,"textLabel4")
+ self.textLabel4 = QLabel(self.Commande,"textLabel4")
self.textLabel4.setGeometry(QRect(90,340,300,30))
- self.LBNouvCommande = QListBox(self.TabPage,"LBNouvCommande")
+ self.LBNouvCommande = QListBox(self.Commande,"LBNouvCommande")
self.LBNouvCommande.setGeometry(QRect(50,100,410,240))
- self.buttonGroup1 = QButtonGroup(self.TabPage,"buttonGroup1")
+ self.buttonGroup1 = QButtonGroup(self.Commande,"buttonGroup1")
self.buttonGroup1.setGeometry(QRect(298,17,151,70))
self.RBGroupe = QRadioButton(self.buttonGroup1,"RBGroupe")
self.RBalpha.setGeometry(QRect(20,20,101,20))
self.RBalpha.setChecked(1)
- self.textLabel1_4 = QLabel(self.TabPage,"textLabel1_4")
+ self.LEFiltre = QLineEdit(self.Commande,"LEFiltre")
+ self.LEFiltre.setGeometry(QRect(50,60,160,30))
+
+ self.BNext = QToolButton(self.Commande,"BNext")
+ self.BNext.setGeometry(QRect(220,60,30,31))
+ self.BNext.setIconSet(QIconSet(self.image0))
+
+ self.textLabel1_4 = QLabel(self.Commande,"textLabel1_4")
self.textLabel1_4.setGeometry(QRect(50,20,171,21))
- self.TWChoix.insertTab(self.TabPage,QString(""))
+ self.TWChoix.insertTab(self.Commande,QString(""))
self.languageChange()
self.connect(self.RBGroupe,SIGNAL("clicked()"),self.RBGroupeChecked)
self.connect(self.RBalpha,SIGNAL("clicked()"),self.RBAlphaChecked)
self.connect(self.bHelp,SIGNAL("clicked()"),self.BHelpPressed)
+ self.connect(self.BNext,SIGNAL("pressed()"),self.BNextPressed)
def languageChange(self):
QToolTip.add(self.bHelp,self.__tr("affichage documentation aster"))
self.textLabel1.setText(self.__tr("<h3><p align=\"center\"><u><b>Mots Clefs Permis</b></u></p></h3>"))
self.textLabel1_2.setText(self.__trUtf8("\x3c\x68\x33\x3e\x3c\x70\x20\x61\x6c\x69\x67\x6e\x3d\x22\x63\x65\x6e\x74\x65\x72\x22\x3e\x3c\x75\x3e\x3c\x62\x3e\x52\xc3\xa9\x67\x6c\x65\x73\x3c\x2f\x62\x3e\x3c\x2f\x75\x3e\x3c\x2f\x70\x3e\x3c\x2f\x68\x33\x3e"))
- self.TWChoix.changeTab(self.tab,self.__tr("Ajouter Mot-Clef"))
+ self.TWChoix.changeTab(self.MotClef,self.__tr("Ajouter Mot-Clef"))
self.groupBox1.setTitle(self.__tr("Concept"))
self.textLabel1_3.setText(self.__tr("<u>Nom du concept :</u>"))
self.textLabel1_3_2.setText(self.__tr("<u>Type du concept :</u>"))
self.textLabel3.setText(self.__trUtf8("\x4c\x27\x6f\x70\xc3\xa9\x72\x61\x74\x65\x75\x72\x20\x63\x6f\x75\x72\x61\x6e\x74\x20\x72\x65\x74\x6f\x75\x72\x6e\x65\x20\x75\x6e\x20\x63\x6f\x6e\x63\x65\x70\x74\x20\x64\x65\x20\x74\x79\x70\x65\x20\x3a"))
self.textLabel2.setText(self.__tr("TypeDuConcept"))
- self.TWChoix.changeTab(self.tab_2,self.__tr("Nommer Concept"))
+ self.TWChoix.changeTab(self.Concept,self.__tr("Nommer Concept"))
self.textLabel6.setText(self.__tr("Filtre"))
self.textLabel4.setText(self.__trUtf8("\x4c\x61\x20\x63\x6f\x6d\x6d\x61\x6e\x64\x65\x20\x63\x68\x6f\x69\x73\x69\x65\x20\x73\x65\x72\x61\x20\x61\x6a\x6f\x75\x74\xc3\xa9\x65\x20\x41\x50\x52\x45\x53\x20\x6c\x61\x20\x63\x6f\x6d\x6d\x61\x6e\x64\x65\x20\x63\x6f\x75\x72\x61\x6e\x74\x65"))
self.buttonGroup1.setTitle(self.__tr("Affichage"))
self.RBGroupe.setText(self.__tr("par groupe"))
self.RBalpha.setText(self.__trUtf8("\x61\x6c\x70\x68\x61\x62\xc3\xa9\x74\x69\x71\x75\x65"))
+ self.BNext.setText(QString.null)
+ QToolTip.add(self.BNext,self.__tr("affiche la prochaine occurence"))
self.textLabel1_4.setText(self.__tr("<b><u>Commandes :</u></b>"))
- self.TWChoix.changeTab(self.TabPage,self.__tr("Nouvelle Commande"))
+ self.TWChoix.changeTab(self.Commande,self.__tr("Nouvelle Commande"))
def LBNouvCommandeClicked(self):
def RBGroupeChecked(self):
print "DComm.RBGroupeChecked(): Not implemented yet"
+ def BNextPressed(self):
+ print "DComm.BNextPressed(): Not implemented yet"
+
def __tr(self,s,c = None):
return qApp.translate("DComm",s,c)
# Form implementation generated from reading ui file 'desMacro.ui'
#
-# Created: mar mar 6 16:43:20 2007
+# Created: ven mar 9 10:05:33 2007
# by: The PyQt User Interface Compiler (pyuic) 3.13
#
# WARNING! All changes made in this file will be lost!
from qt import *
+image0_data = \
+ "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d" \
+ "\x49\x48\x44\x52\x00\x00\x00\x21\x00\x00\x00\x0e" \
+ "\x08\x06\x00\x00\x00\xa1\x1e\x75\x8c\x00\x00\x00" \
+ "\xcf\x49\x44\x41\x54\x38\x8d\xd5\x94\xdb\x0e\xc3" \
+ "\x20\x0c\x43\xed\xfd\xf8\xd8\x97\xbb\x0f\x34\x5b" \
+ "\x48\x08\x45\xd5\x1e\xb6\x48\x88\xf4\x12\xe7\x60" \
+ "\x01\xc0\x0f\x04\x6f\xd6\xe9\x9b\xba\x77\x20\x04" \
+ "\x80\x92\x4a\x10\x32\xc9\x2e\xfb\xd8\xc7\xd5\xca" \
+ "\xbc\xc0\x25\x40\x00\x99\xe9\x57\x84\x95\x68\xfe" \
+ "\x7f\x06\xc0\xde\xd1\xde\xb3\x2b\x4a\x1e\xc4\xea" \
+ "\x82\x4b\x9e\x74\x09\x71\x65\xbd\x01\xf8\x55\x27" \
+ "\xf7\x8a\x72\x01\xe0\xa3\x12\x9f\x34\x5a\x01\x7c" \
+ "\x54\x3b\xaf\xdc\x98\x3d\x0f\x71\x09\xd1\x5a\x33" \
+ "\x1b\x47\x1f\x47\x07\x2c\x17\x49\x4a\x82\x33\x8f" \
+ "\x61\x78\x20\x3a\x88\x17\xe6\x73\x06\xb1\xf0\x8b" \
+ "\x07\xba\x03\xe6\x02\xc9\xb8\x31\x07\x7e\x37\xe0" \
+ "\x20\x9e\x67\xe3\x38\x67\x10\x97\x7b\x17\xde\x80" \
+ "\xc1\x85\xad\x38\x69\x5a\x51\xd5\x22\xc8\x2c\xe7" \
+ "\x79\x12\xe2\xfe\xd8\xbe\x83\x76\x20\x92\xf5\x2b" \
+ "\x18\x20\xdd\x11\xbb\x10\xe5\x65\xb5\x3a\x5a\x3b" \
+ "\xba\xff\x13\x07\x13\xd6\x6f\xa6\x98\x18\x57\x06" \
+ "\x00\x00\x00\x00\x49\x45\x4e\x44\xae\x42\x60\x82"
class DMacro(QWidget):
def __init__(self,parent = None,name = None,fl = 0):
QWidget.__init__(self,parent,name,fl)
+ self.image0 = QPixmap()
+ self.image0.loadFromData(image0_data,"PNG")
if not name:
self.setName("DMacro")
self.TWChoix = QTabWidget(self,"TWChoix")
self.TWChoix.setGeometry(QRect(0,0,500,400))
- self.tab = QWidget(self.TWChoix,"tab")
+ self.MotClef = QWidget(self.TWChoix,"MotClef")
- self.textLabel1 = QLabel(self.tab,"textLabel1")
+ self.textLabel1 = QLabel(self.MotClef,"textLabel1")
self.textLabel1.setGeometry(QRect(50,10,120,20))
self.textLabel1.setMinimumSize(QSize(0,0))
- self.textLabel1_2 = QLabel(self.tab,"textLabel1_2")
+ self.textLabel1_2 = QLabel(self.MotClef,"textLabel1_2")
self.textLabel1_2.setGeometry(QRect(360,0,50,37))
- self.LBMCPermis = QListBox(self.tab,"LBMCPermis")
+ self.LBMCPermis = QListBox(self.MotClef,"LBMCPermis")
self.LBMCPermis.setGeometry(QRect(10,40,220,290))
self.LBMCPermis.setMinimumSize(QSize(0,0))
- self.LBRegles = QListBox(self.tab,"LBRegles")
+ self.LBRegles = QListBox(self.MotClef,"LBRegles")
self.LBRegles.setGeometry(QRect(260,40,230,290))
- self.TWChoix.insertTab(self.tab,QString(""))
+ self.TWChoix.insertTab(self.MotClef,QString(""))
- self.TabPage = QWidget(self.TWChoix,"TabPage")
+ self.Commande = QWidget(self.TWChoix,"Commande")
- self.textLabel6 = QLabel(self.TabPage,"textLabel6")
+ self.textLabel6 = QLabel(self.Commande,"textLabel6")
self.textLabel6.setGeometry(QRect(10,60,60,30))
- self.LEFiltre = QLineEdit(self.TabPage,"LEFiltre")
- self.LEFiltre.setGeometry(QRect(50,60,200,30))
-
- self.textLabel4 = QLabel(self.TabPage,"textLabel4")
+ self.textLabel4 = QLabel(self.Commande,"textLabel4")
self.textLabel4.setGeometry(QRect(90,340,300,30))
- self.textLabel1_4 = QLabel(self.TabPage,"textLabel1_4")
- self.textLabel1_4.setGeometry(QRect(50,20,171,21))
-
- self.LBNouvCommande = QListBox(self.TabPage,"LBNouvCommande")
+ self.LBNouvCommande = QListBox(self.Commande,"LBNouvCommande")
self.LBNouvCommande.setGeometry(QRect(50,100,410,240))
- self.buttonGroup1 = QButtonGroup(self.TabPage,"buttonGroup1")
+ self.buttonGroup1 = QButtonGroup(self.Commande,"buttonGroup1")
self.buttonGroup1.setGeometry(QRect(300,20,151,70))
self.RBGroupe = QRadioButton(self.buttonGroup1,"RBGroupe")
self.RBalpha = QRadioButton(self.buttonGroup1,"RBalpha")
self.RBalpha.setGeometry(QRect(20,20,101,20))
self.RBalpha.setChecked(1)
- self.TWChoix.insertTab(self.TabPage,QString(""))
+
+ self.LEFiltre = QLineEdit(self.Commande,"LEFiltre")
+ self.LEFiltre.setGeometry(QRect(50,60,160,30))
+
+ self.textLabel1_4 = QLabel(self.Commande,"textLabel1_4")
+ self.textLabel1_4.setGeometry(QRect(50,20,171,21))
+
+ self.BNext = QToolButton(self.Commande,"BNext")
+ self.BNext.setGeometry(QRect(220,60,30,31))
+ self.BNext.setIconSet(QIconSet(self.image0))
+ self.TWChoix.insertTab(self.Commande,QString(""))
self.languageChange()
self.connect(self.bOk,SIGNAL("clicked()"),self.BOkPressed)
self.connect(self.RBalpha,SIGNAL("clicked()"),self.buildTabCommand)
self.connect(self.RBGroupe,SIGNAL("clicked()"),self.buildTabCommand)
+ self.connect(self.BNext,SIGNAL("clicked()"),self.BNextPressed)
def languageChange(self):
QToolTip.add(self.bHelp,self.__tr("affichage documentation aster"))
self.textLabel1.setText(self.__tr("<h3><p align=\"center\"><u><b>Mots Clefs Permis</b></u></p></h3>"))
self.textLabel1_2.setText(self.__trUtf8("\x3c\x68\x33\x3e\x3c\x70\x20\x61\x6c\x69\x67\x6e\x3d\x22\x63\x65\x6e\x74\x65\x72\x22\x3e\x3c\x75\x3e\x3c\x62\x3e\x52\xc3\xa9\x67\x6c\x65\x73\x3c\x2f\x62\x3e\x3c\x2f\x75\x3e\x3c\x2f\x70\x3e\x3c\x2f\x68\x33\x3e"))
- self.TWChoix.changeTab(self.tab,self.__tr("AjouterMot-Clef"))
+ self.TWChoix.changeTab(self.MotClef,self.__tr("Ajouter Mot-Clef"))
self.textLabel6.setText(self.__tr("Filtre"))
self.textLabel4.setText(self.__trUtf8("\x4c\x61\x20\x63\x6f\x6d\x6d\x61\x6e\x64\x65\x20\x63\x68\x6f\x69\x73\x69\x65\x20\x73\x65\x72\x61\x20\x61\x6a\x6f\x75\x74\xc3\xa9\x65\x20\x41\x50\x52\x45\x53\x20\x6c\x61\x20\x63\x6f\x6d\x6d\x61\x6e\x64\x65\x20\x63\x6f\x75\x72\x61\x6e\x74\x65"))
- self.textLabel1_4.setText(self.__tr("<b><u>Commandes :</u></b>"))
self.buttonGroup1.setTitle(self.__tr("Affichage"))
self.RBGroupe.setText(self.__tr("par groupe"))
self.RBalpha.setText(self.__trUtf8("\x61\x6c\x70\x68\x61\x62\xc3\xa9\x74\x69\x71\x75\x65"))
- self.TWChoix.changeTab(self.TabPage,self.__tr("Nouvelle Commande"))
+ self.textLabel1_4.setText(self.__tr("<b><u>Commandes :</u></b>"))
+ self.BNext.setText(QString.null)
+ QToolTip.add(self.BNext,self.__tr("affiche la prochaine occurence"))
+ self.TWChoix.changeTab(self.Commande,self.__tr("Nouvelle Commande"))
def LBNouvCommandeClicked(self):
def buildTabCommand(self):
print "DMacro.buildTabCommand(): Not implemented yet"
+ def BNextPressed(self):
+ print "DMacro.BNextPressed(): Not implemented yet"
+
def __tr(self,s,c = None):
return qApp.translate("DMacro",s,c)
def __init__(self,fn = None, jdc = None ,parent=None, editor = None):
QSplitter.__init__(self, parent,'')
- print 5*'EDITOR fn->', fn
- print 5*'EDITOR jdc->', jdc
# CS_pbruno compatiblity begin
VERSION_CODE = session.d_env.cata
self.top = None
self.titre=VERSION_EFICAS + ' pour '+ self.code
self.dict_reels={}
self.liste_simp_reel=[]
- #self.format_fichier = Tkinter.StringVar()
self.format_fichier = StringVar()
self.format_fichier.set('python') #CS_pbruno gestion python uniquement
self.CONFIGURATION = configuration.CONFIGURATION
self.CONFIGStyle = configuration.CONFIGStyle
- #self.appli = self
self.sb = None
if hasattr(qApp.mainWidget(),"statusBar"):
self.sb = qApp.mainWidget().statusBar()
self.node_selected = None
self.modified = False
self.isReadOnly = False
- ## self.nom_jdc=fn
if not hasattr( readercata, 'reader' ):
readercata.reader = readercata.READERCATA( self, self )
self.fileInfo.setCaching(0)
if editor is None:
self.jdc = self.readFile(self.fileName)
- print 20*'A'
else:
- # clone the given editor
-## self.setDocument(editor.document())
-## self.breaks = editor.breaks
-## self.bookmarks = editor.bookmarks
-## self.syntaxerrors = editor.syntaxerrors
self.top = editor.top
self.code = editor.code
self.version_code = editor.version_code
self.lastModified = self.fileInfo.lastModified()
elif editor is not None:
-## self.setDocument(editor.document())
self.jdc = editor.jdc
else:
if not self.jdc: #nouveau jdc
else:
comploader.charger_composants()
jdc_item=Objecttreeitem.make_objecttreeitem( self, "nom", self.jdc )
- # dans le cas où le JDC est invalide, on affiche son CR
+ # dans le cas ou le JDC est invalide, on affiche son CR
if not self.jdc.isvalid():
self.visuCR(mode='JDC')
#------- config widget --------------
-## comploader.charger_composants()
if jdc_item:
self.tree = browser.JDCTree( jdc_item, self )
cap = self.fileName
if readOnly:
cap = "%s (ro)" % unicode(cap)
-## self.setReadOnly(readOnly)
self.isReadOnly = readOnly
self.setCaption(cap)
self.emit(PYSIGNAL('captionChanged'), (cap, self))
jdc.analyse()
return jdc
-## def visuCR(self,mode):
-## """
-## Méthode permettant l'affichage du rapport de validation
-## """
-## if mode == 'JDC':
-## if not hasattr(self,'JDC') : return
-## if self.JDC == None : return
-## titre="rapport de validation du jeu de commandes courant"
-## cr = self.JDC.report()
-## #self.update_jdc_courant()
-## elif mode == 'CATA':
-## from Noyau.N_CR import CR
-## cr = CR()
-## cr.debut = "Début rapport de validation du catalogue"
-## cr.fin = "Fin rapport de validation du catalogue"
-## titre="rapport de validation du catalogue"
-## if hasattr(self,'cata_ordonne_cr') :
-## cr.add(self.cata_ordonne_cr)
-## if hasattr(self,'cata_dev_ordonne_cr') :
-## cr.add(self.cata_dev_ordonne_cr)
-## for cata in self.cata:
-## if hasattr(cata,'JdC'):
-## cr.add(cata.JdC.report())
-## texte_cr = str(cr)
-## self.visu_texte_cr = Fenetre(self.appli,titre=titre,texte=texte_cr)
-##
-## def visuJDC(self):
-## """
-## Méthode permettant d'afficher dans une fenêtre à part l'écho au
-## format .comm ou .py du jdc courant
-## """
-## if not hasattr(self,'JDC') : return
-## titre = 'fichier '+ self.JDCName + ' à la syntaxe '+ self.code
-## format=self.appli.format_fichier.get()
-## self.jdc_fini = self.get_text_JDC(format)
-## if self.jdc_fini == None : return
-## self.visu_fichier_cmd = Fenetre(self.appli,titre=titre,texte = self.jdc_fini)
-
def get_source(self,file):
import convert
p.readfile(file)
text=p.convert('execnoparseur')
if not p.cr.estvide():
- self.affiche_infos("Erreur à la conversion")
- #CS_pbruno todo
-## Fenetre(self,
-## titre="compte-rendu d'erreurs, EFICAS ne sait pas convertir ce fichier",
-## texte = str(p.cr)).wait()
- return text
+ self.affiche_infos("Erreur a la conversion")
return text
else:
# Il n'existe pas c'est une erreur
if unite :
titre = "Choix unite %d " %unite
texte = "Le fichier %s contient une commande INCLUDE \n" % fic_origine
- texte = texte+'Donnez le nom du fichier correspondant\n à l unité logique %d' % unite
+ texte = texte+'Donnez le nom du fichier correspondant\n à l unité logique %d' % unite
labeltexte = 'Fichier pour unite %d :' % unite
else:
titre = "Choix d'un fichier de poursuite"
texte = "Le fichier %s contient une commande %s\n" %(fic_origine,'POURSUITE')
texte = texte+'Donnez le nom du fichier dont vous \n voulez faire une poursuite'
- labeltexte = 'Fichier à poursuivre :'
+ labeltexte = 'Fichier à poursuivre :'
fn = QFileDialog.getOpenFileName( None,
"",
return
ulfile = os.path.abspath(unicode(fn))
- # On utilise le convertisseur défini par format_fichier
+ # On utilise le convertisseur défini par format_fichier
print 'GETFILE', ulfile
source=self.get_source(ulfile)
if source:
- # On a réussi à convertir le fichier self.ulfile
+ # On a réussi à convertir le fichier self.ulfile
jdcText = source
else:
- # Une erreur a été rencontrée
+ # Une erreur a été rencontrée
jdcText = ''
## print 'GETFILE', ulfile
p.readfile(fn)
text=p.convert('exec',appli)
if not p.cr.estvide():
- self.affiche_infos("Erreur à la conversion")
- #CS_pbruno todo
-## Fenetre(self,
-## titre="compte-rendu d'erreurs, EFICAS ne sait pas convertir ce fichier",
-## texte = str(p.cr)).wait()
- return None
+ self.affiche_infos("Erreur à la conversion")
CONTEXT.unset_current_step()
- ## # On se met dans le repertoire ou se trouve le fichier de commandes
- ## # pour trouver les eventuels fichiers include ou autres
- ## # localises a cote du fichier de commandes
- ## self.initialdir = os.path.dirname(os.path.abspath(file))
## os.chdir(self.initialdir)
jdc=self.readercata.cata[0].JdC(procedure=text,
appli=self,
## txt_exception = jdc.cr.get_mess_exception()
##
## if txt_exception :
-## # des exceptions ont été levées à la création du JDC
+## # des exceptions ont été levées à la création du JDC
## # --> on affiche les erreurs mais pas le JDC
## self.jdc = None
## print 'txt_exception ->',txt_exception
## self.affiche_infos("Erreur fatale au chargement de %s" %fn)
## else:
-## # dans le cas où le JDC est invalide, on affiche son CR
+## # dans le cas o๠le JDC est invalide, on affiche son CR
## if not jdc.isvalid():
## self.visuCR(mode='JDC')
## self.jdc=jdc
def visuCR(self,mode):
"""
- Méthode permettant l'affichage du rapport de validation
+ Methode permettant l'affichage du rapport de validation
"""
print 10 * 'visuCR'
print self.jdc.report()
## elif mode == 'CATA':
## from Noyau.N_CR import CR
## cr = CR()
-## cr.debut = "Début rapport de validation du catalogue"
+## cr.debut = "Début rapport de validation du catalogue"
## cr.fin = "Fin rapport de validation du catalogue"
## titre="rapport de validation du catalogue"
## if hasattr(self,'cata_ordonne_cr') :
if jdcNode.item.isactif():
self.panel = jdcNode.getPanel()
+ print self.panel.__class__
else:
self.panel = panels.PanelInactif(self.node_selected,self)
def stop_modif(self):
"""
- Met l'attribut modified à 'n' : utilisé par Eficas pour savoir
- si un JDC doit être sauvegardé avant destruction ou non
+ Met l'attribut modified à 'n' : utilisé par Eficas pour savoir
+ si un JDC doit àªtre sauvegardé avant destruction ou non
"""
self.modified = False
self.emit(PYSIGNAL('modificationStatusChanged'), (False, self))
def cut(self):
"""
- Stocke dans Eficas.noeud_a_editer le noeud à couper
+ Stocke dans Eficas.noeud_a_editer le noeud à couper
"""
if not self.node_selected.item.iscopiable():
QMessageBox.information( self, "Copie impossible",
- "Cette version d'EFICAS ne permet que la copie d'objets de type 'Commande' ou mot-clé facteur")
+ "Cette version d'EFICAS ne permet que la copie d'objets de type 'Commande' ou mot-clé facteur")
return
self.parent.edit="couper"
self.parent.noeud_a_editer = self.node_selected
if self.message != '':
QMessageBox.critical( self, "Copie refusee", self.message)
self.message = ''
- self.affiche_infos("Copie refusée")
+ self.affiche_infos("Copie refusée")
return
# il faut declarer le JDCDisplay_courant modifie
g=generator.plugins[format]()
jdc_formate=g.gener(self.jdc,format='beautifie')
if not g.cr.estvide():
- self.affiche_infos("Erreur à la generation")
- QMessageBox.critical( self, "Erreur à la generation","EFICAS ne sait pas convertir ce JDC")
+ self.affiche_infos("Erreur à la generation")
+ QMessageBox.critical( self, "Erreur a la generation","EFICAS ne sait pas convertir ce JDC")
return
else:
return jdc_formate
import traceback
from qt import *
+from prefs import lang
# Import des panels
"""
def __init__(self,node, parent = None):
QTPanel.__init__(self,node,parent)
+ self.buildLBMCPermis()
+ def buildLBMCPermis(self):
+ self.LBMCPermis.clear()
+ try :
+ QObject.disconnect(self.LBMCPermis,SIGNAL("doubleClicked(QListBoxItem*)"),self.defMC)
+ except :
+ # normal pour la première fois qu on passe
+ # peut-etre inutile selon le connect ??
+ pass
+ QObject.connect(self.LBMCPermis,SIGNAL("doubleClicked(QListBoxItem*)"),self.defMC)
+
+ jdc = self.node.item.get_jdc()
+ genea =self.node.item.get_genealogie()
+ liste_mc=self.node.item.get_liste_mc_ordonnee(genea,jdc.cata_ordonne_dico)
+ for aMc in liste_mc:
+ self.LBMCPermis.insertItem( aMc)
+
+
+ def defMC(self):
+ """ On ajoute un mot-clé Ã| la commande : subnode """
+ name=str(self.LBMCPermis.selectedItem().text())
+ self.editor.init_modif()
+ self.node.append_child(name)
+
+ def BOkPressed(self):
+ """ Impossible d utiliser les vrais labels avec designer ?? """
+ label=self.TWChoix.tabLabel(self.TWChoix.currentPage())
+ if label==QString("Nouvelle Commande"):
+ self.defCmd()
+ if label==QString("Nommer Concept"):
+ self.defConcept()
+ if label==QString("Ajouter Mot-Clef"):
+ self.defMC()
# ---------------------------- #
class QTPanelTBW2(QTPanelTBW1):
hérite de QTPanelTBW1 (donc de QTPanel)
Gére plus précisement :
"""
+
def __init__(self,node, parent = None):
- QTPanel.__init__(self,node,parent)
- self.buildTabCommand()
+ QTPanelTBW1.__init__(self,node,parent)
+ self.buildLBNouvCommande()
+ self.buildLBRegles()
- def buildTabCommand(self):
+ def buildLBNouvCommande(self):
self.LBNouvCommande.clear()
+ try :
+ QObject.disconnect(self.LBNouvCommande,SIGNAL("doubleClicked(QListBoxItem*)"),self.defCmd)
+ except :
+ # normal pour la première fois qu on passe
+ # peut-etre inutile selon le connect ??
+ pass
+
jdc=self.node.item.object.get_jdc_root()
if self.RBalpha.isOn():
listeCmd = jdc.get_liste_cmd()
for aCmd in listeCmd:
self.LBNouvCommande.insertItem( aCmd )
- QObject.connect( self.LBNouvCommande, SIGNAL( "doubleClicked(QListBoxItem*)" ), self.defCmd )
else :
listeGroupes,dictGroupes=jdc.get_groups()
for grp in listeGroupes:
listeCmd=dictGroupes[grp]
texte="GROUPE : "+grp
self.LBNouvCommande.insertItem( texte )
- self.LBNouvCommande.insertItem( " " )
+ self.LBNouvCommande.insertItem( " " )
for aCmd in listeCmd:
self.LBNouvCommande.insertItem( aCmd)
- QObject.connect( self.LBNouvCommande, SIGNAL( "doubleClicked(QListBoxItem*)" ), self.defCmd )
+ self.LBNouvCommande.insertItem( " " )
+ QObject.connect( self.LBNouvCommande, SIGNAL("doubleClicked(QListBoxItem*)"),self.defCmd )
+
+ def buildLBRegles(self):
+ regles = self.node.item.get_regles()
+ dictionnaire = self.node.item.get_mc_presents()
+ if len(regles) > 0:
+ for regle in regles :
+ texteRegle=regle.gettext()
+ texte,test = regle.verif(dictionnaire)
+ if test == 0 :
+ self.LBNouvCommande.insertItem(texteRegle)
+ else :
+ self.LBNouvCommande.insertItem(texteRegle)
+
+
def defCmd(self):
- print "hhhhhhhhhhhhhhhhh"
- print self.LBNouvCommande.selectedItem.Text()
- pass
+ name=str(self.LBNouvCommande.selectedItem().text())
+ if name==QString(" "):
+ return
+ if name.find("GROUPE :")==0 :
+ return
+ self.editor.init_modif()
+ new_node = self.node.append_brother(name,'after')
+
+
+ def LEFiltreTextChanged(self):
+ MonItem=self.LBNouvCommande.findItem(self.LEFiltre.text().upper(),Qt.Contains)
+ if MonItem != None :
+ self.LBNouvCommande.setCurrentItem(MonItem)
+ self.LBNouvCommande.setSelected(MonItem,1)
+
+ def LEfiltreReturnPressed(self):
+ self.defCmd()
+
+ def BNextPressed(self):
+ self.LBNouvCommande.setCurrentItem(self.LBNouvCommande.currentItem()+1)
+ self.LEFiltreTextChanged()
+
+ def LBNouvCommandeClicked(self):
+ name=str(self.LBNouvCommande.currentText())
+ texte_infos=getattr(self.editor.jdc.get_cmd(name),lang)
+ if self.editor:
+ self.editor.affiche_infos(texte_infos)
+
# ---------------------------- #
class QTPanelTBW3(QTPanelTBW2):
def __init__(self,node, parent = None):
QTPanel.__init__(self,node,parent)
+
+ def defConcept(self):
+ """
+ Nomme le concept SD retourne par l'etape
+ """
+ nom = str(self.lENomConcept.text())
+ nom = string.strip(nom)
+
+ if nom == '' : return # si pas de nom, on ressort sans rien faire
+
+ self.editor.init_modif()
+ test,mess = self.node.item.nomme_sd(nom)
+ self.editor.affiche_infos(mess)
+
# ----------------------- #
class ViewText(QDialog):
# ----------------------- #
</property>
<widget class="QWidget">
<property name="name">
- <cstring>tab</cstring>
+ <cstring>MotClef</cstring>
</property>
<attribute name="title">
<string>Ajouter Mot-Clef</string>
</widget>
<widget class="QWidget">
<property name="name">
- <cstring>tab</cstring>
+ <cstring>Concept</cstring>
</property>
<attribute name="title">
<string>Nommer Concept</string>
</widget>
<widget class="QWidget">
<property name="name">
- <cstring>TabPage</cstring>
+ <cstring>Commande</cstring>
</property>
<attribute name="title">
<string>Nouvelle Commande</string>
<string>Filtre</string>
</property>
</widget>
- <widget class="QLineEdit">
- <property name="name">
- <cstring>LEFiltre</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>50</x>
- <y>60</y>
- <width>200</width>
- <height>30</height>
- </rect>
- </property>
- </widget>
<widget class="QLabel">
<property name="name">
<cstring>textLabel4</cstring>
</property>
</widget>
</widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>LEFiltre</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>50</x>
+ <y>60</y>
+ <width>160</width>
+ <height>30</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QToolButton">
+ <property name="name">
+ <cstring>BNext</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>220</x>
+ <y>60</y>
+ <width>30</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="iconSet">
+ <iconset>image0</iconset>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>affiche la prochaine occurence</string>
+ </property>
+ </widget>
<widget class="QLabel">
<property name="name">
<cstring>textLabel1_4</cstring>
</widget>
</widget>
</widget>
+<images>
+ <image name="image0">
+ <data format="PNG" length="264">89504e470d0a1a0a0000000d49484452000000210000000e0806000000a11e758c000000cf49444154388dd594db0ec3200c43edfdf8d897bb0f345b480845d51eb64888f412e76001c00f046fd6e99bba77200480924a1032c92efbd8c7d5cabcc025400099e957849568fe7f06c0ded1deb32b4a1ec4ea824b9e74097165bd01f85527f78a7201e0a3129f345a017c543bafdc983d0f7109d15a331b471f47072c17494a82338f6178203a8817e67306b1f08b07ba03e602c9b831077e37e0209e67e3386710977b17de80c185ad38695a51d522c82ce77912e2fed8be83762092f52b1820dd11bb10e565b53a5a3bbaff130713d66fa6981857060000000049454e44ae426082</data>
+ </image>
+</images>
<connections>
<connection>
<sender>LBNouvCommande</sender>
<receiver>DComm</receiver>
<slot>BHelpPressed()</slot>
</connection>
+ <connection>
+ <sender>BNext</sender>
+ <signal>pressed()</signal>
+ <receiver>DComm</receiver>
+ <slot>BNextPressed()</slot>
+ </connection>
</connections>
<slots>
<slot>LBNouvCommandeClicked()</slot>
<slot>RBAlphaChecked()</slot>
<slot>BHelpPressed()</slot>
<slot>RBGroupeChecked()</slot>
+ <slot>BNextPressed()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>
</property>
<widget class="QWidget">
<property name="name">
- <cstring>tab</cstring>
+ <cstring>MotClef</cstring>
</property>
<attribute name="title">
- <string>AjouterMot-Clef</string>
+ <string>Ajouter Mot-Clef</string>
</attribute>
- <widget class="QLabel">
- <property name="name">
- <cstring>textLabel1</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>50</x>
- <y>10</y>
- <width>120</width>
- <height>20</height>
- </rect>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string><h3><p align="center"><u><b>Mots Clefs Permis</b></u></p></h3></string>
- </property>
- </widget>
<widget class="QLabel">
<property name="name">
<cstring>textLabel1_2</cstring>
</rect>
</property>
</widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>50</x>
+ <y>10</y>
+ <width>120</width>
+ <height>20</height>
+ </rect>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string><h3><p align="center"><u><b>Mots Clefs Permis</b></u></p></h3></string>
+ </property>
+ </widget>
</widget>
<widget class="QWidget">
<property name="name">
- <cstring>TabPage</cstring>
+ <cstring>Commande</cstring>
</property>
<attribute name="title">
<string>Nouvelle Commande</string>
<string>Filtre</string>
</property>
</widget>
- <widget class="QLineEdit">
- <property name="name">
- <cstring>LEFiltre</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>50</x>
- <y>60</y>
- <width>200</width>
- <height>30</height>
- </rect>
- </property>
- </widget>
<widget class="QLabel">
<property name="name">
<cstring>textLabel4</cstring>
<string>La commande choisie sera ajoutée APRES la commande courante</string>
</property>
</widget>
- <widget class="QLabel">
- <property name="name">
- <cstring>textLabel1_4</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>50</x>
- <y>20</y>
- <width>171</width>
- <height>21</height>
- </rect>
- </property>
- <property name="text">
- <string><b><u>Commandes :</u></b></string>
- </property>
- </widget>
<widget class="QListBox">
<property name="name">
<cstring>LBNouvCommande</cstring>
</property>
</widget>
</widget>
+ <widget class="QLineEdit">
+ <property name="name">
+ <cstring>LEFiltre</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>50</x>
+ <y>60</y>
+ <width>160</width>
+ <height>30</height>
+ </rect>
+ </property>
+ </widget>
+ <widget class="QLabel">
+ <property name="name">
+ <cstring>textLabel1_4</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>50</x>
+ <y>20</y>
+ <width>171</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string><b><u>Commandes :</u></b></string>
+ </property>
+ </widget>
+ <widget class="QToolButton">
+ <property name="name">
+ <cstring>BNext</cstring>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>220</x>
+ <y>60</y>
+ <width>30</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ <property name="iconSet">
+ <iconset>image0</iconset>
+ </property>
+ <property name="toolTip" stdset="0">
+ <string>affiche la prochaine occurence</string>
+ </property>
+ </widget>
</widget>
</widget>
</widget>
+<images>
+ <image name="image0">
+ <data format="PNG" length="264">89504e470d0a1a0a0000000d49484452000000210000000e0806000000a11e758c000000cf49444154388dd594db0ec3200c43edfdf8d897bb0f345b480845d51eb64888f412e76001c00f046fd6e99bba77200480924a1032c92efbd8c7d5cabcc025400099e957849568fe7f06c0ded1deb32b4a1ec4ea824b9e74097165bd01f85527f78a7201e0a3129f345a017c543bafdc983d0f7109d15a331b471f47072c17494a82338f6178203a8817e67306b1f08b07ba03e602c9b831077e37e0209e67e3386710977b17de80c185ad38695a51d522c82ce77912e2fed8be83762092f52b1820dd11bb10e565b53a5a3bbaff130713d66fa6981857060000000049454e44ae426082</data>
+ </image>
+</images>
<connections>
<connection>
<sender>LBNouvCommande</sender>
<receiver>DMacro</receiver>
<slot>buildTabCommand()</slot>
</connection>
+ <connection>
+ <sender>BNext</sender>
+ <signal>clicked()</signal>
+ <receiver>DMacro</receiver>
+ <slot>BNextPressed()</slot>
+ </connection>
</connections>
<slots>
<slot>LBNouvCommandeClicked()</slot>
<slot>RBalphaPressed()</slot>
<slot>RBGroupePressed()</slot>
<slot>buildTabCommand()</slot>
+ <slot>BNextPressed()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>