Generic actions creator class.
More...
#include <QtxActionMgr.h>
Public Member Functions |
| | Creator (QtxActionMgr::Reader *) |
| | Constructor.
|
| virtual | ~Creator () |
| | Destructor.
|
| Reader * | reader () const |
| | Get actions reader.
|
| virtual int | append (const QString &, const bool, const ItemAttributes &, const int)=0 |
| | Create (and probably append to the action manager) new action.
|
| virtual void | connect (QAction *) const |
| | Connect action to some specific slot(s).
|
| virtual bool | loadPixmap (const QString &, QPixmap &) const |
| | Load pixmap from the file.
|
Static Protected Member Functions |
| static int | intValue (const ItemAttributes &, const QString &, const int) |
| | Get integer attribute value from the attribute map.
|
| static QString | strValue (const ItemAttributes &, const QString &, const QString &=QString()) |
| | Get string attribute value from the attribute map.
|
Private Attributes |
| QtxActionMgr::Reader * | myReader |
| | actions reader
|
Detailed Description
Used by Reader to create actions and fill in the action manager with the actions.
Constructor & Destructor Documentation
| QtxActionMgr.Creator::~Creator |
( |
| ) |
[virtual] |
Member Function Documentation
| int QtxActionMgr.Creator::append |
( |
const QString & |
tag, |
|
|
const bool |
subMenu, |
|
|
const ItemAttributes & |
attr, |
|
|
const int |
pId |
|
) |
| [pure virtual] |
| void QtxActionMgr.Creator::connect |
( |
QAction * |
| ) |
const [virtual] |
This method can be redefined in subclasses. Base implementation does nothing.
- Parameters:
-
| bool QtxActionMgr.Creator::loadPixmap |
( |
const QString & |
fname, |
|
|
QPixmap & |
pix |
|
) |
| const [virtual] |
- Parameters:
-
| fname | file name |
| pix | used to return pixmap |
- Returns:
true if pixmap is loaded successfully and false in case of error
References Qtx.addSlash().
| int QtxActionMgr.Creator::intValue |
( |
const ItemAttributes & |
attrs, |
|
|
const QString & |
name, |
|
|
const int |
def |
|
) |
| [static, protected] |
Returns default value (def) if the attribute is not found.
- Parameters:
-
| attrs | attributes map |
| name | attribute name |
| def | default attribute value |
- Returns:
- attribute value
| QString QtxActionMgr.Creator::strValue |
( |
const ItemAttributes & |
attrs, |
|
|
const QString & |
name, |
|
|
const QString & |
def = QString() |
|
) |
| [static, protected] |
Returns default value (def) if the attribute is not found.
- Parameters:
-
| attrs | attributes map |
| name | attribute name |
| def | default attribute value |
- Returns:
- attribute value
Field Documentation