class monButtonCustom(QCheckBox):
def __init__(self,texte,monOptionnel,parent=None):
- QCheckBox.__init__(self,texte,parent)
+ QCheckBox.__init__(self,QString(tr(texte)),parent)
+ self.texte=texte
self.monOptionnel=monOptionnel
def mouseDoubleClickEvent(self, event):
- #print "dans mouseDoubleClickEvent"
+ #print "dans mouseDoubleClickEvent", self
if self not in self.monOptionnel.dicoCb.keys() :
event.accept()
return
def affiche(self,liste):
- #print "dans Optionnel ____ affiche", liste
+ print "dans Optionnel ____ affiche", liste
self.show()
labeltext,fonte,couleur = self.parentMC.node.item.GetLabelText()
l=labeltext
self.GeneaLabel.setText(tr("Options pour \n") +texte)
for cb in self.dicoCb.keys():
- #print 'je detruit', self.dicoCb[cb], cb
+ #print 'je detruis', self.dicoCb[cb], cb
#print cb.close()
cb.close()
+
self.dicoCb={}
liste.reverse()
for mot in liste :
- cb = monButtonCustom(QString(mot),self)
+ cb = monButtonCustom(mot,self)
#print "j ajoute ", mot, cb
self.dicoCb[cb]=mot
self.commandesOptionnellesLayout.insertWidget(0,cb)
- #print "Fin Optionnel ____ affiche", liste
+ self.scrollAreaCommandesOptionnelles.horizontalScrollBar().setSliderPosition(0)
+ print "Fin Optionnel ____ affiche", liste
def CBChecked(self):
# ordre ?
- #print "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk"
return
for cb in self.dicoCb.keys() :
if cb.isChecked() and self.dicoCb[cb] not in self.listeChecked : self.listeChecked.append(self.dicoCb[cb])
#print "dans Optionnel __ ajout de ", maListe
self.parentMC.ajoutMC(maListe)
+ def hide(self):
+ self.parentQt.editor.saveSplitterSizes()
+ QWidget.hide(self)