Version: 9.12.0
QtxPagePrefListItem Class Reference

GUI implementation of the list container preference item. More...

#include <QtxPagePrefMgr.h>

Inheritance diagram for QtxPagePrefListItem:
Inheritance graph

Public Member Functions

 QtxPagePrefListItem (const QString &, QtxPreferenceItem *=0, const QString &=QString(), const QString &=QString())
 Constructor. More...
 
virtual ~QtxPagePrefListItem ()
 Destructor. More...
 
virtual void updateContents ()
 Update widget contents. More...
 
QString emptyInfo () const
 Get message text which is shown if the container is empty. More...
 
void setEmptyInfo (const QString &)
 Set message text which is shown if the container is empty. More...
 
bool isFixedSize () const
 Check if the preference item widget is of fixed size. More...
 
void setFixedSize (const bool)
 Set the preference item widget to be of fixed size. More...
 
- Public Member Functions inherited from QtxPagePrefItem
 QtxPagePrefItem (const QString &, QtxPreferenceItem *=0, const QString &=QString(), const QString &=QString())
 Constructor. More...
 
virtual ~QtxPagePrefItem ()
 Destructor. More...
 
QWidgetwidget () const
 Get preference item editor widget. More...
 
virtual void activate ()
 
- Public Member Functions inherited from QtxPreferenceItem
 QtxPreferenceItem (QtxPreferenceItem *=0)
 Constructor. More...
 
 QtxPreferenceItem (const QString &, QtxPreferenceItem *)
 Constructor. More...
 
 QtxPreferenceItem (const QString &, const QString &, const QString &, QtxPreferenceItem *)
 Constructor. More...
 
virtual ~QtxPreferenceItem ()
 Destructor. More...
 
int id () const
 Get unique item identifier. More...
 
virtual int rtti () const
 Get unique item type identifier. More...
 
QtxPreferenceItemrootItem () const
 Get root preference item. More...
 
QtxPreferenceItemparentItem () const
 Get parent preference item. More...
 
QList< QtxPreferenceItem * > childItems (const bool=false) const
 Get all child preference items. More...
 
int depth () const
 Get preference item depth. More...
 
int count () const
 Get child preference items number. More...
 
virtual bool isEmpty () const
 Check if the item has children. More...
 
void appendItem (QtxPreferenceItem *)
 Append child preference item. More...
 
void removeItem (QtxPreferenceItem *)
 Remove child preference item. More...
 
void insertItem (QtxPreferenceItem *, QtxPreferenceItem *=0)
 Insert child preference item before specified item. If the before item is 0 then new item is appended. More...
 
QIcon icon () const
 Get preference item icon. More...
 
QString title () const
 Get preference item title. More...
 
void resource (QString &, QString &) const
 Get resource file settings associated to the preference item. More...
 
virtual void setIcon (const QIcon &)
 Set prefence item icon. More...
 
virtual void setTitle (const QString &)
 Set preference item title . More...
 
virtual void setResource (const QString &, const QString &)
 Assign resource file settings to the preference item. More...
 
QVariant option (const QString &) const
 Get preference item option value. More...
 
void setOption (const QString &, const QVariant &)
 Set preference item option value. More...
 
bool isEvaluateValues () const
 Get variables auto-conversion option value. More...
 
void setEvaluateValues (const bool)
 Switch variables auto-conversion option on/off. More...
 
bool isRestartRequired () const
 Get restart needed option value. More...
 
void setRestartRequired (const bool)
 Switch restart needed option on/off. More...
 
QString resourceValue () const
 Get the value of the associated resource file setting. More...
 
void setResourceValue (const QString &)
 Get the value of the associated resource file setting. More...
 
QtxPreferenceItemfindItem (const int, const bool=false) const
 Find the item by the specified identifier. More...
 
QtxPreferenceItemfindItem (const QString &, const bool=false) const
 Find the item by the specified title. More...
 
QtxPreferenceItemfindItem (const QString &, const int, const bool=false) const
 Find the item by the specified title and identifier. More...
 
virtual QtxResourceMgrresourceMgr () const
 Get the resources manager. More...
 
virtual QtxPreferenceMgrpreferenceMgr () const
 Get the parent preferences manager. More...
 
void ensureVisible ()
 

Protected Member Functions

virtual QVariant optionValue (const QString &) const
 Get preference item option value. More...
 
virtual void setOptionValue (const QString &, const QVariant &)
 Set preference item option value. More...
 
virtual void ensureVisible (QtxPreferenceItem *)
 
virtual void widgetShown ()
 Invoked when preference item widget is shown. More...
 
- Protected Member Functions inherited from QtxPagePrefItem
void setWidget (QWidget *)
 Set preference item editor widget. More...
 
virtual void itemAdded (QtxPreferenceItem *)
 Callback function which is called when the child preference item is added. More...
 
virtual void itemRemoved (QtxPreferenceItem *)
 Callback function which is called when the child preference item is removed. More...
 
virtual void itemChanged (QtxPreferenceItem *)
 Callback function which is called when the child preference item is modified. More...
 
void pageChildItems (QList< QtxPagePrefItem * > &, const bool=false) const
 Find all child items of the QtxPagePrefItem type. More...
 
virtual void store ()
 Store preference item to the resource manager. More...
 
virtual void retrieve ()
 Retrieve preference item from the resource manager. More...
 
virtual void widgetHided ()
 Invoked when preference item widget is hided. More...
 
- Protected Member Functions inherited from QtxPreferenceItem
int getInteger (const int=0) const
 Get integer resources value corresponding to the item. More...
 
double getDouble (const double=0.0) const
 Get double resources value corresponding to the item. More...
 
bool getBoolean (const bool=false) const
 Get boolean resources value corresponding to the item. More...
 
QColor getColor (const QColor &=QColor()) const
 Get color resources value corresponding to the item. More...
 
QFont getFont (const QFont &=QFont()) const
 Get font resources value corresponding to the item. More...
 
QString getString (const QString &=QString()) const
 Get string resources value corresponding to the item. More...
 
void setInteger (const int)
 Set integer resources value corresponding to the item. More...
 
void setDouble (const double)
 Set double resources value corresponding to the item. More...
 
void setBoolean (const bool)
 Set boolean resources value corresponding to the item. More...
 
void setColor (const QColor &)
 Set color resources value corresponding to the item. More...
 
void setFont (const QFont &)
 Set font resources value corresponding to the item. More...
 
void setString (const QString &)
 Set string resources value corresponding to the item. More...
 
void sendItemChanges ()
 Initiate item changing call back operation. More...
 
virtual void triggerUpdate ()
 Initiate item updating. More...
 

Private Slots

void onItemSelectionChanged ()
 Called when the selection in the list box is changed. More...
 

Private Member Functions

void updateInfo ()
 Update information label widget. More...
 
void updateGeom ()
 Update widget geometry. More...
 
void updateState ()
 Update widget state. More...
 
void updateVisible ()
 Update visibile child widgets. More...
 
int selected () const
 Get identifier of the currently selected preference item. More...
 
QtxPagePrefItemselectedItem () const
 Get currently selected preference item. More...
 
void setSelected (const int)
 Set currently selected preference item. More...
 

Private Attributes

bool myFix
 
QListWidgetmyList
 
QStackedWidget * myStack
 
QString myInfText
 
QLabelmyInfLabel
 

Additional Inherited Members

- Static Public Member Functions inherited from QtxPreferenceItem
static int RTTI ()
 Specify unique item class identifier. More...
 
- Protected Types inherited from QtxPreferenceItem
typedef QList< QtxPreferenceItem * > ItemList
 

Detailed Description

GUI implementation of the list container preference item.

Constructor & Destructor Documentation

◆ QtxPagePrefListItem()

QtxPagePrefListItem::QtxPagePrefListItem ( const QString &  title,
QtxPreferenceItem parent = 0,
const QString &  sect = QString(),
const QString &  param = QString() 
)

Constructor.

Parameters
titlepreference item title
parentparent preference item
sectresource file section associated with the preference item
paramresource file parameter associated with the preference item

References Horizontal, main(), myInfLabel, myList, myStack, onItemSelectionChanged(), and QtxPagePrefItem::setWidget().

◆ ~QtxPagePrefListItem()

QtxPagePrefListItem::~QtxPagePrefListItem ( )
virtual

Destructor.

Member Function Documentation

◆ emptyInfo()

QString QtxPagePrefListItem::emptyInfo ( ) const

Get message text which is shown if the container is empty.

Returns
message text
See also
setEmptyInfo()

References myInfText.

◆ ensureVisible()

void QtxPagePrefListItem::ensureVisible ( QtxPreferenceItem i)
protectedvirtual

◆ isFixedSize()

bool QtxPagePrefListItem::isFixedSize ( ) const

Check if the preference item widget is of fixed size.

Returns
true if the widget has the fixed size
See also
setFixedSize()

References myFix.

◆ onItemSelectionChanged

void QtxPagePrefListItem::onItemSelectionChanged ( )
privateslot

Called when the selection in the list box is changed.

References updateState().

◆ optionValue()

QVariant QtxPagePrefListItem::optionValue ( const QString &  name) const
protectedvirtual

Get preference item option value.

Parameters
nameoption name
Returns
property value or null QVariant if option is not set
See also
setOptionValue()

Reimplemented from QtxPreferenceItem.

References emptyInfo(), isFixedSize(), and QtxPreferenceItem::optionValue().

◆ selected()

int QtxPagePrefListItem::selected ( ) const
private

Get identifier of the currently selected preference item.

Returns
identifier of the currently selected item or -1 if no item is selected
See also
setSelected()

References myList.

◆ selectedItem()

QtxPagePrefItem * QtxPagePrefListItem::selectedItem ( ) const
private

Get currently selected preference item.

Returns
currently selected item or 0 if no item is selected
See also
setSelected()

References QtxPagePrefItem::pageChildItems(), and selected().

◆ setEmptyInfo()

void QtxPagePrefListItem::setEmptyInfo ( const QString &  inf)

Set message text which is shown if the container is empty.

Parameters
newmessage text
See also
emptyInfo()

References myInfText, and updateVisible().

◆ setFixedSize()

void QtxPagePrefListItem::setFixedSize ( const bool  on)

Set the preference item widget to be of fixed size.

Parameters
onif true, the widget will have the fixed size
See also
isFixedSize()

References myFix, and updateGeom().

◆ setOptionValue()

void QtxPagePrefListItem::setOptionValue ( const QString &  name,
const QVariant &  val 
)
protectedvirtual

Set preference item option value.

Parameters
nameoption name
valnew property value
See also
optionValue()

Reimplemented from QtxPreferenceItem.

References setEmptyInfo(), setFixedSize(), and QtxPreferenceItem::setOptionValue().

◆ setSelected()

void QtxPagePrefListItem::setSelected ( const int  id)
private

Set currently selected preference item.

Parameters
ididentifier of the preference item to make selected

References QtxPreferenceItem::id(), and myList.

◆ updateContents()

void QtxPagePrefListItem::updateContents ( )
virtual

Update widget contents.

Reimplemented from QtxPreferenceItem.

References QtxPreferenceItem::updateContents(), and updateVisible().

◆ updateGeom()

void QtxPagePrefListItem::updateGeom ( )
private

Update widget geometry.

References myFix, myList, and QtxPagePrefItem::widget().

◆ updateInfo()

void QtxPagePrefListItem::updateInfo ( )
private

Update information label widget.

References emptyInfo(), myInfLabel, rx, selectedItem(), and QtxPreferenceItem::title().

◆ updateState()

void QtxPagePrefListItem::updateState ( )
private

◆ updateVisible()

void QtxPagePrefListItem::updateVisible ( )
private

◆ widgetShown()

void QtxPagePrefListItem::widgetShown ( )
protectedvirtual

Invoked when preference item widget is shown.

Reimplemented from QtxPagePrefItem.

References updateState().

Member Data Documentation

◆ myFix

bool QtxPagePrefListItem::myFix
private

◆ myInfLabel

QLabel* QtxPagePrefListItem::myInfLabel
private

◆ myInfText

QString QtxPagePrefListItem::myInfText
private

◆ myList

QListWidget* QtxPagePrefListItem::myList
private

◆ myStack

QStackedWidget* QtxPagePrefListItem::myStack
private

The documentation for this class was generated from the following files: