/*!
\brief Get the list of the values from the selection widget.
\return list of values
- \sa numbers(), setStrings()
+ \sa numbers(), icons(), setStrings()
*/
QStringList QtxPagePrefSelectItem::strings() const
{
/*!
\brief Get the list of the values identifiers from the selection widget.
\return list of values IDs
- \sa strings(), setNumbers()
+ \sa strings(), icons(), setNumbers()
*/
QList<int> QtxPagePrefSelectItem::numbers() const
{
return res;
}
+/*!
+ \brief Get the list of the icons from the selection widget.
+ \return list of icons
+ \sa strings(), numbers(), setIcons()
+*/
+QList<QIcon> QtxPagePrefSelectItem::icons() const
+{
+ QList<QIcon> res;
+ for ( uint i = 0; i < mySelector->count(); i++ )
+ res.append( mySelector->itemIcon( i ) );
+ return res;
+}
+
/*!
\brief Set the list of the values to the selection widget.
\param lst new list of values
mySelector->setId( i, *it );
}
+/*!
+ \brief Set the list of the icons to the selection widget.
+ \param lst new list of icons
+ \sa numbers(), strings(), setIcons()
+*/
+void QtxPagePrefSelectItem::setIcons( const QList<QIcon>& icons )
+{
+ uint i = 0;
+ for ( QList<QIcon>::const_iterator it = icons.begin(); it != icons.end() && i < mySelector->count(); ++it, i++ )
+ mySelector->setItemIcon( i, *it );
+}
+
/*!
\brief Store preference item to the resource manager.
\sa retrieve()
QStringList strings() const;
QList<int> numbers() const;
+ QList<QIcon> icons() const;
void setStrings( const QStringList& );
void setNumbers( const QList<int>& );
+ void setIcons( const QList<QIcon>& );
virtual void store();
virtual void retrieve();