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