本文整理汇总了C++中ActionManager::getGlobalAction方法的典型用法代码示例。如果您正苦于以下问题:C++ ActionManager::getGlobalAction方法的具体用法?C++ ActionManager::getGlobalAction怎么用?C++ ActionManager::getGlobalAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ActionManager
的用法示例。
在下文中一共展示了ActionManager::getGlobalAction方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setupToolbar
void TreeView::setupToolbar()
{
ActionManager *ac = Controller::create()->getActionManager();
toolbar = new QToolBar();
addRowAction = ac->getGlobalAction(Actions::ADD_NODE);
toolbar->addAction(addRowAction);
connect(addRowAction, SIGNAL(triggered()), this, SLOT(addRow()));
addChildAction = ac->getGlobalAction(Actions::ADD_SUBNODE);
toolbar->addAction(addChildAction);
connect(addChildAction, SIGNAL(triggered()), this, SLOT(addChild()));
removeAction = ac->getGlobalAction(Actions::REMOVE_NODE);
toolbar->addAction(removeAction);
connect(removeAction, SIGNAL(triggered()), questionFrame, SLOT(show()));
toolbar->addSeparator();
propertyAction = ac->getGlobalAction(Actions::SHOW_NODE_PROPERTIES);
toolbar->addAction(propertyAction);
connect(propertyAction, SIGNAL(triggered()), Controller::create()->getNodePropertyWidget(), SLOT(show()));
welcomeAction = ac->getGlobalAction(Actions::SHOW_WELCOMEVIEW);
toolbar->addAction(welcomeAction);
connect(welcomeAction, SIGNAL(triggered(bool)), this, SLOT(showWelcomeView()));
}