CVS commit by juanjux: Added "Expand All" and "Collapse All" buttons.
Now the items on the tree are collapsed at program start. CCMAIL: [EMAIL PROTECTED] M +10 -0 Changelog 1.2 M +16 -2 kalternatives 1.3 M +1 -1 debian/changelog 1.2 --- kdenonbeta/kdedebian/kalternatives/Changelog #1.1.1.1:1.2 @@ -1,2 +1,12 @@ +0.7 +[Juanjo] +* Added "Expand All" and "Collapse All" buttons + +* Now all tree items are collapsed at program init + +0.6 + +* Fixes + 0.5 --- kdenonbeta/kdedebian/kalternatives/kalternatives #1.2:1.3 @@ -19,5 +19,5 @@ # Inc. ,59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -__version__ = "0.6" +__version__ = "0.7" import sys @@ -394,5 +394,5 @@ self.itemWidgetsList.append(TreeItemElement(self,item)) self.itemWidgetsList[-1].setData() - self.itemWidgetsList[-1].setOpen(1) + self.itemWidgetsList[-1].setOpen(0) self.setMinimumSize(QSize(200,280)) @@ -440,4 +440,6 @@ self.apply = QPushButton("&Apply", self.centralWidget()) self.apply.setEnabled(0) + self.expand = QPushButton("&Expand All", self.centralWidget()) + self.collapse = QPushButton("C&ollapse All", self.centralWidget()) about = QPushButton("A&bout", self.centralWidget()) @@ -448,4 +450,6 @@ QObject.connect(self.apply, SIGNAL("clicked()"), self.slotApplyClicked) QObject.connect(close,SIGNAL("clicked()"),self.slotCloseClicked) + QObject.connect(self.expand, SIGNAL("clicked()"), self.slotExpandClicked) + QObject.connect(self.collapse, SIGNAL("clicked()"), self.slotCollapseClicked) l = QHBoxLayout(self.centralWidget(),10) @@ -455,4 +459,6 @@ buttonBox.addWidget(self.apply) + buttonBox.addWidget(self.expand) + buttonBox.addWidget(self.collapse) buttonBox.addStretch(1) buttonBox.addWidget(about) @@ -522,4 +528,12 @@ self.apply.setEnabled(0) + def slotExpandClicked(self): + for i in self.iw.itemWidgetsList: + self.iw.setOpen(i, 1) + + def slotCollapseClicked(self): + for i in self.iw.itemWidgetsList: + self.iw.setOpen(i, 0) + def slotCloseClicked(self): if self.isRoot: --- kdenonbeta/kdedebian/kalternatives/debian/changelog #1.1.1.1:1.2 @@ -1,3 +1,3 @@ -kalternatives (0.6-1) unstable; urgency=low +kalternatives (0.7-1) unstable; urgency=low * Initial release.