Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QtxPagePrefSpinItem Class Reference

GUI implementation of the resources spin box item (for integer or double value).

#include <QtxPagePrefMgr.h>

Inheritance diagram for QtxPagePrefSpinItem:
Inheritance graph

Public Types

enum  InputType { Integer, Double }
 

Public Member Functions

 QtxPagePrefSpinItem (const QString &, QtxPreferenceItem *=0, const QString &=QString(), const QString &=QString())
 Constructor. More...
 
 QtxPagePrefSpinItem (const int, const QString &, QtxPreferenceItem *=0, const QString &=QString(), const QString &=QString())
 Constructor. More...
 
virtual ~QtxPagePrefSpinItem ()
 Destructor. More...
 
QVariant step () const
 Get spin box preference item step value. More...
 
QVariant precision () const
 Get double spin box preference item precision value. More...
 
QVariant minimum () const
 Get spin box preference item minimum value. More...
 
QVariant maximum () const
 Get spin box preference item maximum value. More...
 
QString prefix () const
 Get spin box preference item prefix string. More...
 
QString suffix () const
 Get spin box preference item suffix string. More...
 
QString specialValueText () const
 Get spin box preference item special value text (which is shown when the spin box reaches minimum value). More...
 
void setStep (const QVariant &)
 Set spin box preference item step value. More...
 
void setPrecision (const QVariant &)
 Set double spin box preference item precision value. More...
 
void setMinimum (const QVariant &)
 Set spin box preference item minimum value. More...
 
void setMaximum (const QVariant &)
 Set spin box preference item maximum value. More...
 
void setPrefix (const QString &)
 Set spin box preference item prefix string. More...
 
void setSuffix (const QString &)
 Set spin box preference item suffix string. More...
 
void setSpecialValueText (const QString &)
 Set spin box preference item special value text (which is shown when the spin box reaches minimum value). More...
 
int inputType () const
 Get spin box preference item input type. More...
 
void setInputType (const int)
 Set spin box preference item input type. More...
 
virtual void store ()
 Store preference item to the resource manager. More...
 
virtual void retrieve ()
 Retrieve preference item from the resource manager. More...
 
- Public Member Functions inherited from QtxPageNamedPrefItem
 QtxPageNamedPrefItem (const QString &, QtxPreferenceItem *=0, const QString &=QString(), const QString &=QString())
 Constructor. More...
 
virtual ~QtxPageNamedPrefItem ()
 Destructor. More...
 
virtual void setTitle (const QString &)
 Set preference title. 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 setResource (const QString &, const QString &)
 Assign resource file settings to the preference item. More...
 
virtual void updateContents ()
 Update 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...
 
- Protected Member Functions inherited from QtxPageNamedPrefItem
QLabellabel () const
 Get label widget corresponding to the preference item. More...
 
QWidgetcontrol () const
 Get control widget corresponding to the preference item. More...
 
void setControl (QWidget *)
 Set control widget corresponding to the preference item. 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 widgetShown ()
 Invoked when preference item widget is shown. More...
 
virtual void widgetHided ()
 Invoked when preference item widget is hided. More...
 
virtual void ensureVisible (QtxPreferenceItem *)
 
- 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 Member Functions

void updateSpinBox ()
 Update spin box widget. More...
 

Private Attributes

int myType
 

Additional Inherited Members

- Static Public Member Functions inherited from QtxPageNamedPrefItem
static void adjustLabels (QtxPagePrefItem *)
 
- Protected Types inherited from QtxPreferenceItem
typedef QList
< QtxPreferenceItem * > 
ItemList
 

Member Enumeration Documentation

Enumerator
Integer 
Double 

Constructor & Destructor Documentation

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

Creates spin box preference item for the entering integer values.

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

References updateSpinBox().

QtxPagePrefSpinItem::QtxPagePrefSpinItem ( const int  type,
const QString &  title,
QtxPreferenceItem parent = 0,
const QString &  sect = QString(),
const QString &  param = QString() 
)

Creates spin box preference item for the entering values which type is specified by the parameter type.

Parameters
typeinput type (QtxPagePrefSpinItem::InputType).
titlepreference item title
parentparent preference item
sectresource file section associated with the preference item
paramresource file parameter associated with the preference item

References updateSpinBox().

QtxPagePrefSpinItem::~QtxPagePrefSpinItem ( )
virtual

Member Function Documentation

int QtxPagePrefSpinItem::inputType ( ) const
Returns
preference item input type (QtxPagePrefSpinItem::InputType)
See Also
setInputType()

References myType.

QVariant QtxPagePrefSpinItem::maximum ( ) const
Returns
spin box maximum value
See Also
setMaximum()

References QtxPageNamedPrefItem::control().

QVariant QtxPagePrefSpinItem::minimum ( ) const
Returns
spin box minimum value
See Also
setMinimum()

References QtxPageNamedPrefItem::control().

QVariant QtxPagePrefSpinItem::optionValue ( const QString &  name) const
protectedvirtual
Parameters
nameoption name
Returns
property value or null QVariant if option is not set
See Also
setOptionValue()

Reimplemented from QtxPreferenceItem.

References inputType(), maximum(), minimum(), QtxPreferenceItem::optionValue(), precision(), prefix(), specialValueText(), step(), and suffix().

QVariant QtxPagePrefSpinItem::precision ( ) const
Returns
double spin box precision
See Also
setPrecision()

References QtxPageNamedPrefItem::control().

QString QtxPagePrefSpinItem::prefix ( ) const
Returns
spin box prefix string
See Also
setPrefix()

References QtxPageNamedPrefItem::control().

void QtxPagePrefSpinItem::retrieve ( )
virtual
void QtxPagePrefSpinItem::setInputType ( const int  type)
Parameters
typenew preference item input type (QtxPagePrefSpinItem::InputType)
See Also
inputType()

References myType, and updateSpinBox().

void QtxPagePrefSpinItem::setMaximum ( const QVariant &  max)
Parameters
minnew spin box maximum value
See Also
maximum()

References QtxPageNamedPrefItem::control().

void QtxPagePrefSpinItem::setMinimum ( const QVariant &  min)
Parameters
minnew spin box minimum value
See Also
minimum()

References QtxPageNamedPrefItem::control().

void QtxPagePrefSpinItem::setOptionValue ( const QString &  name,
const QVariant &  val 
)
protectedvirtual
Parameters
nameoption name
valnew property value
See Also
optionValue()

Reimplemented from QtxPreferenceItem.

References setInputType(), setMaximum(), setMinimum(), QtxPreferenceItem::setOptionValue(), setPrecision(), setPrefix(), setSpecialValueText(), setStep(), and setSuffix().

void QtxPagePrefSpinItem::setPrecision ( const QVariant &  prec)
Parameters
stepnew double spin box precision value
See Also
precision()

References QtxPageNamedPrefItem::control().

void QtxPagePrefSpinItem::setPrefix ( const QString &  txt)
Parameters
txtnew spin box prefix string
See Also
prefix()

References QtxPageNamedPrefItem::control().

void QtxPagePrefSpinItem::setSpecialValueText ( const QString &  txt)
Parameters
txtnew spin box special value text
See Also
specialValueText()

References QtxPageNamedPrefItem::control().

void QtxPagePrefSpinItem::setStep ( const QVariant &  step)
Parameters
stepnew spin box single step value
See Also
step()

References QtxPageNamedPrefItem::control().

void QtxPagePrefSpinItem::setSuffix ( const QString &  txt)
Parameters
txtnew spin box suffix string
See Also
suffix()

References QtxPageNamedPrefItem::control().

QString QtxPagePrefSpinItem::specialValueText ( ) const
Returns
spin box special value text
See Also
setSpecialValueText()

References QtxPageNamedPrefItem::control().

QVariant QtxPagePrefSpinItem::step ( ) const
Returns
spin box single step value
See Also
setStep()

References QtxPageNamedPrefItem::control().

void QtxPagePrefSpinItem::store ( )
virtual
QString QtxPagePrefSpinItem::suffix ( ) const
Returns
spin box suffix string
See Also
setSuffix()

References QtxPageNamedPrefItem::control().

Member Data Documentation

int QtxPagePrefSpinItem::myType
private

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