QtPieItem Class Reference
The QtPieItem class is the base class for QtPieMenu. More...
#include <QtPieItem>
Inherits QWidget.
Inherited by QtPieMenu.
Public Functions
- QtPieItem ( const QString & title = QString::null, unsigned int weight = 1, QWidget * parent = 0 )
- QtPieItem ( const QIcon & icon, const QString & text = QString(), unsigned int weight = 1, QWidget * parent = 0 )
- virtual ~QtPieItem ()
- QIcon icon () const
- bool isEnabled () const
- void setEnabled ( bool enabled = true )
- void setIcon ( const QIcon & icon )
- void setText ( const QString & text )
- void setWeight ( int weight )
- QString text () const
- virtual int type () const
- int weight () const
- 207 public functions inherited from QWidget
- 12 public functions inherited from QPaintDevice
- 29 public functions inherited from QObject
Additional Inherited Members
- 57 properties inherited from QWidget
- 1 property inherited from QObject
- 19 public slots inherited from QWidget
- 1 public slot inherited from QObject
- 1 signal inherited from QWidget
- 1 signal inherited from QObject
- 1 public type inherited from QObject
- 4 static public members inherited from QWidget
- 4 static public members inherited from QObject
- 37 protected functions inherited from QWidget
- 1 protected function inherited from QPaintDevice
- 7 protected functions inherited from QObject
- 1 protected slot inherited from QWidget
- 1 protected type inherited from QPaintDevice
- 2 protected variables inherited from QObject
Detailed Description
The QtPieItem class is the base class for QtPieMenu.
It has a very simple interface, providing the base implementation of functions common for QtPieMenu and QtPieAction.
The text of an item is set with setText() and retrieved with text(). Similarly, setIcon() and icon() set and get the icon set associated with the item.
QtPieMenu uses weight() to determine how much space an item should claim on a pie. The weights of the items are compared so that an item with a weight of 2 claims twice as much space as one of weight 1. Use setWeight() to set the weight of an item.
type() returns the type of the item. This is used by QtPieMenu to determine wheter an item triggers a simple action or whether it pops up a submenu.
Member Function Documentation
QtPieItem::QtPieItem ( const QString & title = QString::null, unsigned int weight = 1, QWidget * parent = 0 )
Constructs a QtPieItem. The title and weight arguments are stored as member data. The parent argument is passed to QWidget's constructor.
QtPieItem::QtPieItem ( const QIcon & icon, const QString & text = QString(), unsigned int weight = 1, QWidget * parent = 0 )
Constructs a QtPieItem. The icon, text and weight arguments are stored as member data. The parent argument is passed to QWidget's constructor.
QtPieItem::~QtPieItem () [virtual]
Destructs a QtPieItem.
QIcon QtPieItem::icon () const
Returns a reference to the icon for this item.
See also setIcon().
bool QtPieItem::isEnabled () const
Returns true if this menu is enabled, otherwise returns false.
void QtPieItem::setEnabled ( bool enabled = true )
Enables this item if enabled is true, otherwise disables this item.
See also isEnabled().
void QtPieItem::setIcon ( const QIcon & icon )
Sets the item's icon to icon.
See also icon().
void QtPieItem::setText ( const QString & text )
Sets the item's text to text.
See also text().
void QtPieItem::setWeight ( int weight )
Sets the item's weight to weight.
See also weight().
QString QtPieItem::text () const
Returns the title of this QtPieItem.
See also setText().
int QtPieItem::type () const [virtual]
Returns the type of node as a QtPieItem::Type. Valid values are Invalid, Action and SubMenu.
int QtPieItem::weight () const
Returns the weight of the item.
See also setWeight().
Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies) |
Trademarks |
Qt Solutions |