#include <QtxActionMenuMgr.h>
#include <QtxActionToolMgr.h>
+/*!Icon.*/
static const char* ModuleIcon[] = {
"20 20 2 1",
" c None",
return toolMgr()->createToolBar( name );
}
-
+/*! Create tool. Register action \a a with id \a id.
+ * Insert QAction to tool manager.
+ *\param a - QAction
+ *\param tBar - integer
+ *\param id - integer
+ *\param idx - integer
+ *\retval integer id of new action in tool manager.
+ *\retval Return -1 if something wrong.
+ */
int CAM_Module::createTool( QAction* a, const int tBar, const int id, const int idx )
{
if ( !toolMgr() )
return intId != -1 ? regId : -1;
}
+/*! Create tool. Register action \a a with id \a id.
+ * Insert QAction to tool manager.
+ *\param a - QAction
+ *\param tBar - QString&
+ *\param id - integer
+ *\param idx - integer
+ *\retval integer id of new action in tool manager.
+ *\retval Return -1 if something wrong.
+ */
int CAM_Module::createTool( QAction* a, const QString& tBar, const int id, const int idx )
{
if ( !toolMgr() )
return intId != -1 ? regId : -1;
}
+/*! Create tool.
+ * Insert QAction with id \a id from action map(myActionMap) to tool manager.
+ *\param a - QAction
+ *\param tBar - integer
+ *\param id - integer
+ *\param idx - integer
+ *\retval integer id of new action in tool manager.
+ *\retval Return -1 if something wrong.
+ */
int CAM_Module::createTool( const int id, const int tBar, const int idx )
{
if ( !toolMgr() )
return intId != -1 ? id : -1;
}
+/*! Create tool.
+ * Insert QAction with id \a id from action map(myActionMap) to tool manager.
+ *\param a - QAction
+ *\param tBar - QString&
+ *\param id - integer
+ *\param idx - integer
+ *\retval integer id of new action in tool manager.
+ *\retval Return -1 if something wrong.
+ */
int CAM_Module::createTool( const int id, const QString& tBar, const int idx )
{
if ( !toolMgr() )
return intId != -1 ? id : -1;
}
+/*! Create menu.
+ * Insert submenu \a subMenu to menu manager.
+ *\param subMenu - QString&
+ *\param menu - integer
+ *\param id - integer
+ *\param group - integer
+ *\param index - integer
+ *\retval integer id of new menu in tool manager.
+ *\retval Return -1 if something wrong.
+ */
int CAM_Module::createMenu( const QString& subMenu, const int menu,
const int id, const int group, const int index )
{
return menuMgr()->insert( subMenu, menu, group, index );
}
+/*! Create menu.
+ * Insert submenu \a subMenu to menu manager.
+ *\param subMenu - QString&
+ *\param menu - QString&
+ *\param id - integer
+ *\param group - integer
+ *\param index - integer
+ *\retval integer id of new menu in tool manager.
+ *\retval Return -1 if something wrong.
+ */
int CAM_Module::createMenu( const QString& subMenu, const QString& menu,
const int id, const int group, const int index )
{
return menuMgr()->insert( subMenu, menu, group, index );
}
+
+/*! Create menu. Register action \a a with id \a id.
+ * Insert QAction to menu manager.
+ *\param a - Qaction
+ *\param menu - integer
+ *\param id - integer
+ *\param group - integer
+ *\param index - integer
+ *\retval integer id of new menu in tool manager.
+ *\retval Return -1 if something wrong.
+ */
int CAM_Module::createMenu( QAction* a, const int menu, const int id, const int group, const int index )
{
if ( !a || !menuMgr() )
return intId != -1 ? regId : -1;
}
+/*! Create menu. Register action \a a with id \a id.
+ * Insert QAction to menu manager.
+ *\param a - Qaction
+ *\param menu - QString&
+ *\param id - integer
+ *\param group - integer
+ *\param index - integer
+ *\retval integer id of new menu in tool manager.
+ *\retval Return -1 if something wrong.
+ */
int CAM_Module::createMenu( QAction* a, const QString& menu, const int id, const int group, const int index )
{
if ( !a || !menuMgr() )
return intId != -1 ? regId : -1;
}
+/*! Create menu.
+ * Insert QAction with id \a id from action map(myActionMap) to menu manager.
+ *\param menu - integer
+ *\param id - integer
+ *\param group - integer
+ *\param index - integer
+ *\retval integer id of new menu in tool manager.
+ *\retval Return -1 if something wrong.
+ */
int CAM_Module::createMenu( const int id, const int menu, const int group, const int index )
{
if ( !menuMgr() )
return intId != -1 ? id : -1;
}
+/*! Create menu.
+ * Insert QAction with id \a id from action map(myActionMap) to menu manager.
+ *\param menu - QString&
+ *\param id - integer
+ *\param group - integer
+ *\param index - integer
+ *\retval integer id of new menu in tool manager.
+ *\retval Return -1 if something wrong.
+ */
int CAM_Module::createMenu( const int id, const QString& menu, const int group, const int index )
{
if ( !menuMgr() )
static int generatedId = -1;
ident = id < 0 ? --generatedId : id;
- myActionMap.insert( id, a );
+ myActionMap.insert( ident, a );
if ( menuMgr() )
menuMgr()->registerAction( a );