+ def ajoutePushButtons(self):
+ if hasattr(self,'buttonGroup') :
+ for b in self.buttonGroup.buttons():
+ self.buttonGroup.removeButton(b)
+ b.setParent(None)
+ b.close()
+ else :
+ self.buttonGroup = QButtonGroup()
+ self.buttonGroup.buttonClicked.connect(self.rbCliqueEtInsere)
+ for w in self.listeWidget :
+ w.setParent(None)
+ w.close()
+ self.listeWidget=[]
+
+ if not hasattr(self,'maGrilleBouton') :
+ #self.commandesLayout.close()
+ self.maGrilleBouton=QGridLayout()
+ self.maGrilleBouton.setSpacing(20)
+ self.verticalLayout.addLayout(self.maGrilleBouton)
+ col=-1
+ ligne = 0
+ if self.affiche_alpha==1 :
+ liste=self.creeListeCommande(None)
+ for cmd in liste :
+ col=col+1
+ if col == self.editor.nombreDeBoutonParLigne :
+ col=0
+ ligne=ligne+1
+ self.dicoCmd[tr(cmd)]=cmd
+ rbcmd=QPushButton(tr(cmd))
+ rbcmd.setGeometry(QRect(40, 20, 211, 71))
+ rbcmd.setMaximumSize(QSize(250, 81))
+ rbcmd.setStyleSheet("background-color : rgb(66, 165, 238);\n"
+"/*border-style : outset;*/\n"
+"border-radius : 20px;\n"
+"border-width : 30 px;\n"
+"border-color : beige;\n"
+"text-align : center")
+ if cmd in self.editor.dicoImages :
+ fichier=self.editor.dicoImages[cmd]
+ icon = QIcon()
+ icon.addPixmap(QPixmap(fichier), QIcon.Normal, QIcon.Off)
+ rbcmd.setIcon(icon)
+ rbcmd.setIconSize(QSize(48, 48))
+
+ self.buttonGroup.addButton(rbcmd)
+ self.maGrilleBouton.addWidget(rbcmd,ligne,col)
+
+ def clearFiltre(self):
+ self.LEFiltre.setText("")
+ self.ajouteRadioButtons()