Version: 9.15.0
QtxActionMgr::Creator Class Referenceabstract

Generic actions creator class. More...

#include <QtxActionMgr.h>

Inheritance diagram for QtxActionMgr::Creator:
Inheritance graph

Public Member Functions

 Creator (QtxActionMgr::Reader *)
 Constructor. More...
 
virtual ~Creator ()
 Destructor. More...
 
Readerreader () 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::ReadermyReader
 actions reader More...
 

Detailed Description

Generic actions creator class.

Used by Reader to create actions and fill in the action manager with the actions.

Constructor & Destructor Documentation

◆ Creator()

QtxActionMgr::Creator::Creator ( QtxActionMgr::Reader r)

Constructor.

Parameters
raction reader

◆ ~Creator()

QtxActionMgr::Creator::~Creator ( )
virtual

Destructor.

Member Function Documentation

◆ append()

int QtxActionMgr::Creator::append ( const QString &  tag,
const bool  subMenu,
const ItemAttributes attr,
const int  pId 
)
pure virtual

Create (and probably append to the action manager) new action.

This method should be redefined in the subclasses.

Parameters
tagitem tag name
subMenutrue if this item is submenu
attrattributes map
pIdparent action ID
Returns
item (for example action) ID

Implemented in QtxPopupMgr::PopupCreator, QtxActionToolMgr::ToolCreator, and QtxActionMenuMgr::MenuCreator.

◆ connect()

void QtxActionMgr::Creator::connect ( QAction ) const
virtual

Connect action to some specific slot(s).

This method can be redefined in subclasses. Base implementation does nothing.

Parameters
aaction

◆ intValue()

int QtxActionMgr::Creator::intValue ( const ItemAttributes attrs,
const QString &  name,
const int  def 
)
staticprotected

Get integer attribute value from the attribute map.

Returns default value (def) if the attribute is not found.

Parameters
attrsattributes map
nameattribute name
defdefault attribute value
Returns
attribute value

◆ loadPixmap()

bool QtxActionMgr::Creator::loadPixmap ( const QString &  fname,
QPixmap &  pix 
) const
virtual

Load pixmap from the file.

Parameters
fnamefile name
pixused to return pixmap
Returns
true if pixmap is loaded successfully and false in case of error

References Qtx::addSlash().

◆ reader()

QtxActionMgr::Reader * QtxActionMgr::Creator::reader ( ) const

Get actions reader.

Returns
actions reader

◆ strValue()

QString QtxActionMgr::Creator::strValue ( const ItemAttributes attrs,
const QString &  name,
const QString &  def = QString() 
)
staticprotected

Get string attribute value from the attribute map.

Returns default value (def) if the attribute is not found.

Parameters
attrsattributes map
nameattribute name
defdefault attribute value
Returns
attribute value

Member Data Documentation

◆ myReader

QtxActionMgr::Reader* QtxActionMgr::Creator::myReader
private

actions reader


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