Mailinglist Archive: yast-commit (1056 mails)

< Previous Next >
[yast-commit] r44488 - /trunk/qt/src/YQMultiSelectionBox.cc
  • From: visnov@xxxxxxxxxxxxxxxx
  • Date: Fri, 15 Feb 2008 10:36:14 -0000
  • Message-id: <20080215103614.D8B42107A85@xxxxxxxxxxxxxxxx>
Author: visnov
Date: Fri Feb 15 11:36:14 2008
New Revision: 44488

URL: http://svn.opensuse.org/viewcvs/yast?rev=44488&view=rev
Log:
support icons in multiselect widget

Modified:
trunk/qt/src/YQMultiSelectionBox.cc

Modified: trunk/qt/src/YQMultiSelectionBox.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt/src/YQMultiSelectionBox.cc?rev=44488&r1=44487&r2=44488&view=diff
==============================================================================
--- trunk/qt/src/YQMultiSelectionBox.cc (original)
+++ trunk/qt/src/YQMultiSelectionBox.cc Fri Feb 15 11:36:14 2008
@@ -336,6 +336,28 @@
setText(0, fromUTF8( yItem->label() ));
setCheckState( 0, Qt::Unchecked );
_serial = _item_count++;
+
+ if ( yItem->hasIconName() )
+ {
+ // _table is checked against 0 in the constructor
+
+ string iconName = parent->iconFullPath( cell->iconName() );
+ QPixmap icon = QPixmap( iconName.c_str() );
+
+ if ( icon.isNull() )
+ yuiWarning() << "Can't load icon " << iconName << endl;
+ else
+ setIcon( 0 /* column */, icon );
+ }
+ /*
+ else // No pixmap name
+ {
+ if ( ! data( column, Qt::DecorationRole ).isNull() ) // Was there a
pixmap before?
+ {
+ setData( column, Qt::DecorationRole, QPixmap() ); // Set empty
pixmap
+ }
+ }
+ */
}

#include "YQMultiSelectionBox.moc"

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages