[yast-commit] r57608 - in /branches/tmp/tgoettlicher/yast2cc_rewrite/src: kcategorizedsortfilterproxymodel.h yqmodulesmodel.cpp
Author: kmachalkova Date: Wed Jun 17 14:30:03 2009 New Revision: 57608 URL: http://svn.opensuse.org/viewcvs/yast?rev=57608&view=rev Log: Introduce new role here (as we don't want to do tooltips and item delegate accepts strings only in DisplayRole) Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorizedsortfilterproxymodel.h branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqmodulesmodel.cpp Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorizedsortfilterproxymodel.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorizedsortfilterproxymodel.h?rev=57608&r1=57607&r2=57608&view=diff ============================================================================== --- branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorizedsortfilterproxymodel.h (original) +++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/kcategorizedsortfilterproxymodel.h Wed Jun 17 14:30:03 2009 @@ -54,12 +54,13 @@ // to define additional roles. CategoryDisplayRole = 0x17CE990A, ///< This role is used for asking the category to a given index - CategorySortRole = 0x27857E60 ///< This role is used for sorting categories. You can return a + CategorySortRole = 0x27857E60, ///< This role is used for sorting categories. You can return a ///< string or a long long value. Strings will be sorted alphabetically ///< while long long will be sorted by their value. Please note that this ///< value won't be shown on the view, is only for sorting purposes. What will ///< be shown as "Category" on the view will be asked with the role ///< CategoryDisplayRole. + GenericNameRole = 0x1BA81D0E }; KCategorizedSortFilterProxyModel(QObject *parent = 0); Modified: branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqmodulesmodel.cpp URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqmodulesmodel.cpp?rev=57608&r1=57607&r2=57608&view=diff ============================================================================== --- branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqmodulesmodel.cpp (original) +++ branches/tmp/tgoettlicher/yast2cc_rewrite/src/yqmodulesmodel.cpp Wed Jun 17 14:30:03 2009 @@ -154,7 +154,7 @@ return groupsModel()->data( idx, Qt::UserRole); } - else if ( role == Qt::ToolTipRole ) + else if ( role == KCategorizedSortFilterProxyModel::GenericNameRole ) { //QString tooltip = d->infoProvider.provideInfo( this, index ); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
kmachalkova@svn.opensuse.org