Hello community, here is the log from the commit of package yast2-qt for openSUSE:Factory checked in at Wed Apr 20 13:54:21 CEST 2011.
-------- --- yast2-qt/yast2-qt.changes 2011-04-12 16:36:51.000000000 +0200 +++ /mounts/work_src_done/STABLE/yast2-qt/yast2-qt.changes 2011-04-18 16:28:55.000000000 +0200 @@ -1,0 +2,13 @@ +Mon Apr 18 16:16:59 CEST 2011 - [email protected] + +- Enable busy cursor for tree widget during time consuming + operations +- V 2.21.1 + +------------------------------------------------------------------- +Fri Apr 15 16:20:11 CEST 2011 - [email protected] + +- Added support for recursive selection in tree widgets +- V 2.20.8 + +------------------------------------------------------------------- calling whatdependson for head-i586 Old: ---- yast2-qt-2.20.7.tar.bz2 New: ---- yast2-qt-2.21.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ yast2-qt.spec ++++++ --- /var/tmp/diff_new_pack.E66zxe/_old 2011-04-20 13:54:07.000000000 +0200 +++ /var/tmp/diff_new_pack.E66zxe/_new 2011-04-20 13:54:07.000000000 +0200 @@ -18,11 +18,11 @@ Name: yast2-qt -Version: 2.20.7 +Version: 2.21.1 Release: 1 BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: yast2-qt-2.20.7.tar.bz2 +Source0: yast2-qt-2.21.1.tar.bz2 Group: System/YaST License: GPLv2+ BuildRequires: docbook-xsl-stylesheets @@ -41,8 +41,8 @@ Summary: YaST2 - Graphical User Interface BuildRequires: yast2-devtools >= 2.16.3 #YIconLoader -BuildRequires: yast2-libyui-devel >= 2.20.2 -Requires: yast2-libyui >= 2.20.2 +BuildRequires: yast2-libyui-devel >= 2.21.1 +Requires: yast2-libyui >= 2.21.1 Requires: yast2_theme >= 2.16.1 Requires: yast2-branding Provides: yast2_ui ++++++ yast2-qt-2.20.7.tar.bz2 -> yast2-qt-2.21.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-qt-2.20.7/VERSION.cmake new/yast2-qt-2.21.1/VERSION.cmake --- old/yast2-qt-2.20.7/VERSION.cmake 2011-04-12 16:36:29.000000000 +0200 +++ new/yast2-qt-2.21.1/VERSION.cmake 2011-04-19 12:21:08.000000000 +0200 @@ -1,3 +1,3 @@ SET(VERSION_MAJOR "2") -SET(VERSION_MINOR "20") -SET(VERSION_PATCH "7") +SET(VERSION_MINOR "21") +SET(VERSION_PATCH "1") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-qt-2.20.7/package/yast2-qt.changes new/yast2-qt-2.21.1/package/yast2-qt.changes --- old/yast2-qt-2.20.7/package/yast2-qt.changes 2011-04-12 16:36:30.000000000 +0200 +++ new/yast2-qt-2.21.1/package/yast2-qt.changes 2011-04-19 12:21:09.000000000 +0200 @@ -1,4 +1,17 @@ ------------------------------------------------------------------- +Mon Apr 18 16:16:59 CEST 2011 - [email protected] + +- Enable busy cursor for tree widget during time consuming + operations +- V 2.21.1 + +------------------------------------------------------------------- +Fri Apr 15 16:20:11 CEST 2011 - [email protected] + +- Added support for recursive selection in tree widgets +- V 2.20.8 + +------------------------------------------------------------------- Tue Apr 12 16:33:56 CEST 2011 - [email protected] - Fixed line breaks in LogView (bnc #684759) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-qt-2.20.7/src/YQTree.cc new/yast2-qt-2.21.1/src/YQTree.cc --- old/yast2-qt-2.20.7/src/YQTree.cc 2011-04-12 16:36:29.000000000 +0200 +++ new/yast2-qt-2.21.1/src/YQTree.cc 2011-04-19 12:21:08.000000000 +0200 @@ -63,9 +63,9 @@ #define VERBOSE_TREE_ITEMS 0 -YQTree::YQTree( YWidget * parent, const string & label, bool multiSelectionMode ) +YQTree::YQTree( YWidget * parent, const string & label, bool multiSelectionMode, bool recursiveSelectionMode ) : QFrame( (QWidget *) parent->widgetRep() ) - , YTree( parent, label, multiSelectionMode ) + , YTree( parent, label, multiSelectionMode, recursiveSelectionMode ) { QVBoxLayout* layout = new QVBoxLayout( this ); setLayout( layout ); @@ -101,8 +101,11 @@ connect( _qt_treeWidget, SIGNAL( itemClicked ( QTreeWidgetItem *, int ) ), this, SLOT ( slotItemClicked ( QTreeWidgetItem *, int ) ) ); +// connect( _qt_treeWidget, SIGNAL( itemChanged ( QTreeWidgetItem *, int ) ), +// this, SLOT ( slotItemChanged () ) ); + connect( _qt_treeWidget, SIGNAL( itemChanged ( QTreeWidgetItem *, int ) ), - this, SLOT ( slotItemChanged () ) ); + this, SLOT ( slotItemChanged (QTreeWidgetItem *) ) ); connect( _qt_treeWidget, SIGNAL( itemDoubleClicked( QTreeWidgetItem *, int ) ), this, SLOT ( slotActivated ( QTreeWidgetItem * ) ) ); @@ -276,24 +279,48 @@ } -void YQTree::slotItemChanged( ) +void YQTree::selectItem(QTreeWidgetItem * item, bool selected, bool recursive) { + + YQTreeItem * treeItem = dynamic_cast<YQTreeItem *> (item); + + if ( ! treeItem ) + return; + + YSelectionWidget::selectItem( treeItem->origItem(), selected ); + + if ( recursive ) + { + for (int i=0; i < item->childCount(); ++i) + { + QTreeWidgetItem* child = item->child(i); + child->setCheckState(0, ( selected )? Qt::Checked : Qt::Unchecked ); + YQTree::selectItem( child, selected, recursive ); + } + } + +} + + +void YQTree::slotItemChanged( QTreeWidgetItem * item ) +{ + + YQSignalBlocker sigBlocker( _qt_treeWidget ); + if ( hasMultiSelection() ) { - QTreeWidgetItemIterator it( _qt_treeWidget); - while (*it) - { - YQTreeItem * treeItem = dynamic_cast<YQTreeItem *> (*it); + if ( recursiveSelection() ) + YQUI::ui()->busyCursor(); + + if ( item->checkState(0) == Qt::Checked ) + YQTree::selectItem( item, true, recursiveSelection() ); + else + YQTree::selectItem( item, false, recursiveSelection() ); + + + if ( recursiveSelection() ) + YQUI::ui()->normalCursor(); - if ( treeItem ) - { - if ( treeItem->checkState(0) == Qt::Checked ) - treeItem->origItem()->setSelected( true ); - else - treeItem->origItem()->setSelected( false ); - } - ++it; - } } else { @@ -311,6 +338,7 @@ if ( notify() && ! YQUI::ui()->eventPendingFor( this ) ) YQUI::ui()->sendEvent( new YWidgetEvent( this, YEvent::ValueChanged ) ); + } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-qt-2.20.7/src/YQTree.h new/yast2-qt-2.21.1/src/YQTree.h --- old/yast2-qt-2.20.7/src/YQTree.h 2011-04-12 16:36:29.000000000 +0200 +++ new/yast2-qt-2.21.1/src/YQTree.h 2011-04-19 12:21:08.000000000 +0200 @@ -60,7 +60,7 @@ /** * Constructor. **/ - YQTree( YWidget * parent, const string & label, bool multiSelection ); + YQTree( YWidget * parent, const string & label, bool multiSelection, bool recursiveSelection ); /** * Destructor. @@ -166,7 +166,7 @@ * * This will trigger a 'ValueChanged' event if 'notify' is set. **/ - void slotItemChanged(); + void slotItemChanged( QTreeWidgetItem * item); void slotItemClicked( QTreeWidgetItem * item, int column ); @@ -205,6 +205,11 @@ void selectItem( YQTreeItem * item ); /** + * Select or deselect an item, recursively + **/ + void selectItem(QTreeWidgetItem * item, bool selected, bool recursive); + + /** * Open the branch of 'item' recursively to its toplevel item. **/ void openBranch( YQTreeItem * item ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-qt-2.20.7/src/YQWidgetFactory.cc new/yast2-qt-2.21.1/src/YQWidgetFactory.cc --- old/yast2-qt-2.20.7/src/YQWidgetFactory.cc 2011-04-12 16:36:29.000000000 +0200 +++ new/yast2-qt-2.21.1/src/YQWidgetFactory.cc 2011-04-19 12:21:08.000000000 +0200 @@ -199,9 +199,9 @@ YQTree * -YQWidgetFactory::createTree( YWidget * parent, const string & label, bool multiselection ) +YQWidgetFactory::createTree( YWidget * parent, const string & label, bool multiselection, bool recursiveselection ) { - YQTree * tree = new YQTree( parent, label, multiselection ); + YQTree * tree = new YQTree( parent, label, multiselection, recursiveselection ); YUI_CHECK_NEW( tree ); return tree; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-qt-2.20.7/src/YQWidgetFactory.h new/yast2-qt-2.21.1/src/YQWidgetFactory.h --- old/yast2-qt-2.20.7/src/YQWidgetFactory.h 2011-04-12 16:36:29.000000000 +0200 +++ new/yast2-qt-2.21.1/src/YQWidgetFactory.h 2011-04-19 12:21:08.000000000 +0200 @@ -112,7 +112,7 @@ virtual YQRadioButton * createRadioButton ( YWidget * parent, const string & label, bool isChecked = false ); virtual YQComboBox * createComboBox ( YWidget * parent, const string & label, bool editable = false ); virtual YQSelectionBox * createSelectionBox ( YWidget * parent, const string & label ); - virtual YQTree * createTree ( YWidget * parent, const string & label, bool multiselection = false ); + virtual YQTree * createTree ( YWidget * parent, const string & label, bool multiselection = false, bool recursiveselection = false ); virtual YQTable * createTable ( YWidget * parent, YTableHeader * header, bool multiSelection = false ); virtual YQProgressBar * createProgressBar ( YWidget * parent, const string & label, int maxValue = 100 ); virtual YQRichText * createRichText ( YWidget * parent, const string & text = string(), bool plainTextMode = false ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/yast2-qt-2.20.7/yast2-qt.spec.in new/yast2-qt-2.21.1/yast2-qt.spec.in --- old/yast2-qt-2.20.7/yast2-qt.spec.in 2011-04-12 16:36:29.000000000 +0200 +++ new/yast2-qt-2.21.1/yast2-qt.spec.in 2011-04-19 12:21:08.000000000 +0200 @@ -20,8 +20,8 @@ Summary: YaST2 - Graphical User Interface BuildRequires: yast2-devtools >= 2.16.3 #YIconLoader -BuildRequires: yast2-libyui-devel >= 2.20.2 -Requires: yast2-libyui >= 2.20.2 +BuildRequires: yast2-libyui-devel >= 2.21.1 +Requires: yast2-libyui >= 2.21.1 Requires: yast2_theme >= 2.16.1 Requires: yast2-branding Provides: yast2_ui ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
