Version: 6.3.1
Public Member Functions | Static Protected Member Functions | Private Attributes

QtxActionToolMgr.ToolCreator Class Reference

Toolbars creator. More...

#include <QtxActionToolMgr.h>

Inheritance diagram for QtxActionToolMgr.ToolCreator:
Inheritance graph

Public Member Functions

 ToolCreator (QtxActionMgr::Reader *, QtxActionToolMgr *)
 Constructor.
virtual ~ToolCreator ()
 Destructor.
virtual int append (const QString &, const bool, const ItemAttributes &, const int)
 Create and append to the action manager a new toolbar or toolbar action.
Reader * reader () const
 Get actions reader.
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

QtxActionToolMgr * myMgr
 toolbar manager

Detailed Description

Used by Reader to create actions by reading descriptions from the file, create toolbars and fill in the toolbara with the actions.


Constructor & Destructor Documentation

QtxActionToolMgr.ToolCreator::ToolCreator ( QtxActionMgr::Reader *  r,
QtxActionToolMgr *  mgr 
)
Parameters:
ractions reader
mgrtoolbar manager
QtxActionToolMgr.ToolCreator::~ToolCreator ( ) [virtual]

Member Function Documentation

int QtxActionToolMgr.ToolCreator::append ( const QString &  tag,
const bool  ,
const ItemAttributes &  attr,
const int  tid 
) [virtual]
Parameters:
tagitem tag name
subMenutrue if this item is submenu (not used)
attrattributes map
tidtoolbar ID
Returns:
toolbar or toolbar action ID

Implements QtxActionMgr.Creator.

References QtxActionMgr.separator().

QtxActionMgr::Reader * QtxActionMgr.Creator::reader ( ) const [inherited]
Returns:
actions reader
void QtxActionMgr.Creator::connect ( QAction *  ) const [virtual, inherited]

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

Parameters:
aaction
bool QtxActionMgr.Creator::loadPixmap ( const QString &  fname,
QPixmap &  pix 
) const [virtual, inherited]
Parameters:
fnamefile name
pixused 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, inherited]

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

Parameters:
attrsattributes map
nameattribute name
defdefault attribute value
Returns:
attribute value
QString QtxActionMgr.Creator::strValue ( const ItemAttributes &  attrs,
const QString &  name,
const QString &  def = QString() 
) [static, protected, inherited]

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

Parameters:
attrsattributes map
nameattribute name
defdefault attribute value
Returns:
attribute value

Field Documentation

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS