Generic actions description files reader class.
More...
#include <QtxActionMgr.h>
Public Member Functions |
| | Reader () |
| | Constructor.
|
| virtual | ~Reader () |
| | Destructor.
|
| QStringList | options () const |
| | Get the list of options.
|
| QString | option (const QString &, const QString &=QString()) const |
| | Get option value.
|
| void | setOption (const QString &, const QString &) |
| | Set option value.
|
| virtual bool | read (const QString &, Creator &) const =0 |
| | Read the file and fill and action manager with actions by using help actions creator.
|
Private Attributes |
| QMap< QString, QString > | myOptions |
| | options map
|
Detailed Description
This class is used to read files of some format to create actions and fill an action manager with the actions automatically.
Constructor & Destructor Documentation
| QtxActionMgr.Reader::Reader |
( |
| ) |
|
| QtxActionMgr.Reader::~Reader |
( |
| ) |
[virtual] |
Member Function Documentation
| QStringList QtxActionMgr.Reader::options |
( |
| ) |
const |
| QString QtxActionMgr.Reader::option |
( |
const QString & |
name, |
|
|
const QString & |
def = QString() |
|
) |
| const |
If there is no such option the default value (def) is returned.
- Parameters:
-
| name | option name |
| def | default option value |
- Returns:
- option value
| void QtxActionMgr.Reader::setOption |
( |
const QString & |
name, |
|
|
const QString & |
value |
|
) |
| |
- Parameters:
-
| name | option name |
| value | new option value |
| bool QtxActionMgr.Reader::read |
( |
const QString & |
fname, |
|
|
Creator & |
cr |
|
) |
| const [pure virtual] |
This method should be redefined in the subclasses.
- Parameters:
-
| fname | XML file name |
| cr | actions creator |
- Returns:
true on success and false in case of error
Implemented in QtxActionMgr.XMLReader.
Field Documentation