self.monOptionnel=monOptionnel
def mouseDoubleClickEvent(self, event):
- print "dans mouseDoubleClickEvent"
- if self not in self.monOptionnel.dicoCb.keys() : return
+ #print "dans mouseDoubleClickEvent"
+ if self not in self.monOptionnel.dicoCb.keys() :
+ event.accept()
+ return
listeCheckedMC="+"+self.monOptionnel.dicoCb[self]
self.monOptionnel.parentMC.ajoutMC(listeCheckedMC)
self.setChecked(False)
+ event.accept()
+
def mousePressEvent(self, event):
- print "dans mousePressEvent"
+ #print "dans mousePressEvent"
self.mousePressed=True
- if not( event.button() != Qt.RightButton) : return
+ if not( event.button() != Qt.RightButton) :
+ event.accept()
+ return
QCheckBox.mousePressEvent(self, event)
+ event.accept()
class MonWidgetOptionnel (QWidget,Ui_WidgetOptionnel):
"""
"""
def __init__(self,parentQt):
- print "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk"
- print "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk"
- print "kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk"
- print "dans init de monWidgetOptionnel ", parentQt, parentQt.node.item.nom
+ #print "dans init de monWidgetOptionnel ", parentQt, parentQt.node.item.nom
QWidget.__init__(self,None)
self.setupUi(self)
self.dicoCb={}
self.cbPressed=None
self.cb=None
self.parentQt=parentQt
- self.connect(self.bAjoutMC,SIGNAL("clicked()"), self.ajoutMC)
+ #self.connect(self.bAjoutMC,SIGNAL("clicked()"), self.ajoutMC)
+ #print "fin init de monWidgetOptionnel ", parentQt, parentQt.node.item.nom
+
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
for cb in self.dicoCb.keys():
#print 'je detruit', self.dicoCb[cb], cb
+ #print cb.close()
cb.close()
- #print self.commandesOptionnellesLayout.children()
self.dicoCb={}
liste.reverse()
for mot in liste :
#print "j ajoute ", mot, cb
self.dicoCb[cb]=mot
self.commandesOptionnellesLayout.insertWidget(0,cb)
+ #print "Fin Optionnel ____ affiche", liste
def CBChecked(self):
# ordre ?
for cb in self.dicoCb.keys():
if cb.isChecked() : maListe+="+"+str(cb.text())
if maListe=="":return
- print "dans Optionnel __ ajout de ", maListe
+ #print "dans Optionnel __ ajout de ", maListe
self.parentMC.ajoutMC(maListe)