本文整理汇总了C++中core::ActionManager::actionContainer方法的典型用法代码示例。如果您正苦于以下问题:C++ ActionManager::actionContainer方法的具体用法?C++ ActionManager::actionContainer怎么用?C++ ActionManager::actionContainer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core::ActionManager
的用法示例。
在下文中一共展示了ActionManager::actionContainer方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QObject
UAVSettingsImportExportFactory::UAVSettingsImportExportFactory(QObject *parent) : QObject(parent)
{
// Add Menu entry
Core::ActionManager *am = Core::ICore::instance()->actionManager();
Core::ActionContainer *ac = am->actionContainer(Core::Constants::M_FILE);
Core::Command *cmd = am->registerAction(new QAction(this),
"UAVSettingsImportExportPlugin.UAVSettingsExport",
QList<int>() <<
Core::Constants::C_GLOBAL_ID);
cmd->setDefaultKeySequence(QKeySequence("Ctrl+E"));
cmd->action()->setText(tr("Export UAV Settings..."));
ac->addAction(cmd, Core::Constants::G_FILE_SAVE);
connect(cmd->action(), SIGNAL(triggered(bool)), this, SLOT(exportUAVSettings()));
cmd = am->registerAction(new QAction(this),
"UAVSettingsImportExportPlugin.UAVSettingsImport",
QList<int>() <<
Core::Constants::C_GLOBAL_ID);
cmd->setDefaultKeySequence(QKeySequence("Ctrl+I"));
cmd->action()->setText(tr("Import UAV Settings..."));
ac->addAction(cmd, Core::Constants::G_FILE_SAVE);
connect(cmd->action(), SIGNAL(triggered(bool)), this, SLOT(importUAVSettings()));
ac = am->actionContainer(Core::Constants::M_HELP);
cmd = am->registerAction(new QAction(this),
"UAVSettingsImportExportPlugin.UAVDataExport",
QList<int>() <<
Core::Constants::C_GLOBAL_ID);
cmd->action()->setText(tr("Export UAV Data..."));
ac->addAction(cmd, Core::Constants::G_HELP_HELP);
connect(cmd->action(), SIGNAL(triggered(bool)), this, SLOT(exportUAVData()));
}
示例2: connect
CMakeManager::CMakeManager(CMakeSettingsPage *cmakeSettingsPage)
: m_settingsPage(cmakeSettingsPage)
{
ProjectExplorer::ProjectExplorerPlugin *projectExplorer = ProjectExplorer::ProjectExplorerPlugin::instance();
connect(projectExplorer, SIGNAL(aboutToShowContextMenu(ProjectExplorer::Project*, ProjectExplorer::Node*)),
this, SLOT(updateContextMenu(ProjectExplorer::Project*, ProjectExplorer::Node*)));
Core::ActionManager *am = Core::ICore::instance()->actionManager();
Core::ActionContainer *mbuild =
am->actionContainer(ProjectExplorer::Constants::M_BUILDPROJECT);
Core::ActionContainer *mproject =
am->actionContainer(ProjectExplorer::Constants::M_PROJECTCONTEXT);
Core::ActionContainer *msubproject =
am->actionContainer(ProjectExplorer::Constants::M_SUBPROJECTCONTEXT);
const Core::Context projectContext(CMakeProjectManager::Constants::PROJECTCONTEXT);
m_runCMakeAction = new QAction(QIcon(), tr("Run CMake"), this);
Core::Command *command = am->registerAction(m_runCMakeAction, Constants::RUNCMAKE, projectContext);
command->setAttribute(Core::Command::CA_Hide);
mbuild->addAction(command, ProjectExplorer::Constants::G_BUILD_PROJECT);
connect(m_runCMakeAction, SIGNAL(triggered()), this, SLOT(runCMake()));
m_runCMakeActionContextMenu = new QAction(QIcon(), tr("Run CMake"), this);
command = am->registerAction(m_runCMakeActionContextMenu, Constants::RUNCMAKECONTEXTMENU, projectContext);
command->setAttribute(Core::Command::CA_Hide);
mproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD);
msubproject->addAction(command, ProjectExplorer::Constants::G_PROJECT_BUILD);
connect(m_runCMakeActionContextMenu, SIGNAL(triggered()), this, SLOT(runCMakeContextMenu()));
}
示例3: createMenuItems
void DoNothingPlugin::createMenuItems()
{
// Fetch the action manager
Core::ActionManager* am = Core::ICore::instance()->actionManager();
// Create a command for "About DoNothing"
Core::Command* cmd = am->registerAction(new QAction(this), "DoNothingPlugin.AboutDoNothingItem", QList<int>() << Core::Constants::C_GLOBAL_ID);
cmd->action()->setText("About DoNothing");
// Add the command "Do Nothing" in the beginning of Help menu
am->actionContainer(Core::Constants::M_HELP)->addAction(cmd);
// Since menu-items are QActions, we can connect to their triggered(bool) or
// toggled(bool) signal and respond to trigger/toggled events
connect(cmd->action(), SIGNAL(triggered(bool)), this, SLOT(about()));
// Create a command for "About DoNothing 2"
Core::Command* cmd2 = am->registerAction(new QAction(this), "DoNothingPlugin.AboutDoNothing2Item", QList<int>() << Core::Constants::C_GLOBAL_ID);
cmd2->action()->setText("About DoNothing 2");
// Insert the "DoNothing 2" item before "About Plugins..."
QMenu* helpMenu = am->actionContainer(Core::Constants::M_HELP)->menu();
QAction* aboutPluginsAction = am->command(Core::Constants::ABOUT_PLUGINS)->action();
helpMenu->insertAction(aboutPluginsAction, cmd2->action());
// Connect the action
connect(cmd2->action(), SIGNAL(triggered(bool)), this, SLOT(about()));
}
示例4: extensionsInitialized
void QtTestPlugin::extensionsInitialized()
{
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
Core::ICore *core = Core::ICore::instance();
Core::ActionManager *am = core->actionManager();
m_messageOutputWindow = new TestOutputWindow();
pm->addObject(m_messageOutputWindow);
m_testResultsWindow = TestResultsWindow::instance();
connect(m_testResultsWindow, SIGNAL(stopTest()), this, SLOT(stopTesting()));
connect(m_testResultsWindow, SIGNAL(retryFailedTests(QStringList)),
this, SLOT(retryTests(QStringList)));
connect(TestExecuter::instance(), SIGNAL(testStarted()),
m_testResultsWindow, SLOT(onTestStarted()));
connect(TestExecuter::instance(), SIGNAL(testStop()),
m_testResultsWindow, SLOT(onTestStopped()));
connect(TestExecuter::instance(), SIGNAL(testFinished()),
m_testResultsWindow, SLOT(onTestFinished()));
pm->addObject(m_testResultsWindow);
connect(testResultsPane(), SIGNAL(defectSelected(TestCaseRec)),
this, SLOT(onDefectSelected(TestCaseRec)));
// Add context menu to CPP editor
Core::ActionContainer *mcontext = am->actionContainer(CppEditor::Constants::M_CONTEXT);
m_contextMenu->init(mcontext->menu(), 2, this);
// Add context menu to JS editor
mcontext = am->actionContainer(QmlJSEditor::Constants::M_CONTEXT);
m_contextMenu->init(mcontext->menu(), 2, this);
// Add a Test menu to the menu bar
Core::ActionContainer* ac = am->createMenu("QtTestPlugin.TestMenu");
ac->menu()->setTitle(tr("&Test"));
m_contextMenu->init(ac->menu(), 0, 0);
// Insert the "Test" menu between "Window" and "Help".
QMenu *windowMenu = am->actionContainer(Core::Constants::M_TOOLS)->menu();
QMenuBar *menuBar = am->actionContainer(Core::Constants::MENU_BAR)->menuBar();
menuBar->insertMenu(windowMenu->menuAction(), ac->menu());
ProjectExplorer::ProjectExplorerPlugin *explorer =
ProjectExplorer::ProjectExplorerPlugin::instance();
connect(explorer->session(), SIGNAL(startupProjectChanged(ProjectExplorer::Project*)),
this, SLOT(onStartupProjectChanged(ProjectExplorer::Project *)));
connect(core->progressManager(), SIGNAL(allTasksFinished(QString)),
this, SLOT(onAllTasksFinished(QString)));
connect(explorer->session(), SIGNAL(aboutToRemoveProject(ProjectExplorer::Project *)),
this, SLOT(onProjectRemoved(ProjectExplorer::Project *)));
m_contextMenu->init(0, 3, this);
}
示例5: initialize
bool DoNothingPlugin::initialize(const QStringList& args, QString *errMsg)
{
Q_UNUSED(args);
Q_UNUSED(errMsg);
// Fetch the action manager
Core::ActionManager* am = Core::ICore::instance()->actionManager();
// Create a DoNothing menu
Core::ActionContainer* ac = am->createMenu("DoNothingPlugin.DoNothingMenu");
ac->menu()->setTitle("DoNothing");
// Create a command for "DoNothing".
QAction *action = new QAction(tr("DoNothing"),this);
Core::Command* cmd = am->registerAction(action,
QLatin1String("DoNothingPlugin.DoNothing"),
Core::Context(Core::Constants::C_GLOBAL));
// Add DoNothing menu to the menubar
am->actionContainer(Core::Constants::M_TOOLS)->addMenu(ac, Core::Constants::G_DEFAULT_THREE);
// Add the "DoNothing" action to the DoNothing menu
ac->addAction(cmd);
// Connect the action
connect(action, SIGNAL(triggered(bool)), this, SLOT(performAction()));
return true;
}
示例6: initialize
bool ImportExportPlugin::initialize(const QStringList& args, QString *errMsg)
{
Q_UNUSED(args);
Q_UNUSED(errMsg);
// Add Menu entry
Core::ActionManager* am = Core::ICore::instance()->actionManager();
Core::ActionContainer* ac = am->actionContainer(Core::Constants::M_FILE);
Core::Command* cmd = am->registerAction(new QAction(this),
"ImportExportPlugin.ImportExport",
QList<int>() <<
Core::Constants::C_GLOBAL_ID);
cmd->setDefaultKeySequence(QKeySequence("Ctrl+S"));
cmd->action()->setText(tr("GCS Settings Import/Export..."));
// ac->menu()->addSeparator();
// ac->appendGroup("ImportExport");
// ac->addAction(cmd, "ImportExport");
ac->addAction(cmd, Core::Constants::G_FILE_SAVE);
connect(cmd->action(), SIGNAL(triggered(bool)), this, SLOT(importExport()));
return true;
}
示例7: initialize
/**
* Add Logging plugin to File menu
*/
bool LoggingPlugin::initialize(const QStringList& args, QString *errMsg)
{
Q_UNUSED(args);
Q_UNUSED(errMsg);
loggingThread = NULL;
// Add Menu entry
Core::ActionManager* am = Core::ICore::instance()->actionManager();
Core::ActionContainer* ac = am->actionContainer(Core::Constants::M_TOOLS);
// Command to start logging
Core::Command* cmd = am->registerAction(new QAction(this),
"LoggingPlugin.Logging",
QList<int>() <<
Core::Constants::C_GLOBAL_ID);
cmd->setDefaultKeySequence(QKeySequence("Ctrl+L"));
cmd->action()->setText("Start logging...");
ac->menu()->addSeparator();
ac->appendGroup("Logging");
ac->addAction(cmd, "Logging");
connect(cmd->action(), SIGNAL(triggered(bool)), this, SLOT(toggleLogging()));
mf = new LoggingGadgetFactory(this);
addAutoReleasedObject(mf);
// Map signal from end of replay to replay stopped
connect(getLogfile(),SIGNAL(replayFinished()), this, SLOT(replayStopped()));
return true;
}
示例8: QObject
ActionManager::ActionManager(QObject *parent) :
QObject(parent),
runAction(new QAction(QIcon(":/icons/images/run.png"), tr("Run tests"), this)),
waitAction(new QAction(QIcon(":/icons/images/stop.png"), tr("Stop coverage execution"), this)),
renderAction(new QAction(QIcon(":/icons/images/render.png"), tr("Show code coverage"), this))
{
renderAction->setCheckable(true);
// Add action to menu
Core::ActionManager *pluginActionManager = Core::ICore::actionManager();
Core::Command *runCommand = pluginActionManager->registerAction(runAction, RUN_ACTION_ID, Core::Context(Core::Constants::C_GLOBAL));
Core::Command *renderCommand = pluginActionManager->registerAction(renderAction, RENDER_ACTION_ID, Core::Context(Core::Constants::C_GLOBAL));
runCommand->setKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_E);
renderCommand->setKeySequence(Qt::CTRL + Qt::Key_H);
Core::ActionContainer *menu = pluginActionManager->createMenu(MENU_ID);
menu->menu()->setTitle(tr("CodeCoverage"));
menu->addAction(runCommand);
menu->addAction(renderCommand);
pluginActionManager->actionContainer(Core::Constants::M_TOOLS)->addMenu(menu);
// Add action as icon to left bar
Core::ModeManager *modeManager = Core::ModeManager::instance();
modeManager->addAction(runAction, RUN_ACTION_PRIORITY);
modeManager->addAction(waitAction, WAIT_ACTION_PRIORITY);
}
示例9: createMenus
void DoNothingPlugin::createMenus()
{
// Fetch the action manager
Core::ActionManager* am = Core::ICore::instance()->actionManager();
// Create a DoNothing menu
Core::ActionContainer* ac = am->createMenu("DoNothingPlugin.DoNothingMenu");
ac->menu()->setTitle(tr("DoNothing"));
// Create a command for "About DoNothing".
Core::Command* cmd = am->registerAction(new QAction(this), "DoNothingPlugin.AboutDoNothing", QList<int>() << 0);
cmd->action()->setText("About DoNothing");
// Add DoNothing menu to the beginning of the menu bar
am->actionContainer(Core::Constants::MENU_BAR)->addMenu(ac);
// Add the "About DoNothing" action to the DoNothing menu
ac->addAction(cmd);
// Connect the action
connect(cmd->action(), SIGNAL(triggered(bool)), this, SLOT(about()));
// Create a DoNothing2 menu
Core::ActionContainer* ac2 = am->createMenu("DoNothingPlugin.DoNothing2Menu");
ac2->menu()->setTitle(tr("DoNothing2"));
// Create a command for "About DoNothing 2".
Core::Command* cmd2 = am->registerAction(new QAction(this), "DoNothingPlugin.AboutDoNothing2", QList<int>() << 0);
cmd2->action()->setText("About DoNothing 2");
// Insert the "DoNothing" menu between "Window" and "Help".
QMenu* helpMenu = am->actionContainer(Core::Constants::M_HELP)->menu();
QMenuBar* menuBar = am->actionContainer(Core::Constants::MENU_BAR)->menuBar();
menuBar->insertMenu(helpMenu->menuAction(), ac2->menu());
// Add the "About DoNothing 2" action to the DoNothing2 menu
ac2->addAction(cmd2);
// Connect the action
connect(cmd2->action(), SIGNAL(triggered(bool)), this, SLOT(about()));
}
示例10: initialize
bool DoNothingPlugin::initialize(const QStringList &args, QString *errorMessage)
{
Q_UNUSED(args);
Q_UNUSED(errorMessage);
// Fetch the action manager
Core::ActionManager *am = Core::ICore::instance()->actionManager();
// Create a command for "DoNothing".
QAction *action = new QAction(tr("DoNothing"),this);
Core::Command *cmd = am->registerAction(action,
"DoNothingPlugin.DoNothing", Core::Context(Core::Constants::C_GLOBAL));
// Add the "DoNothing" action to the tools menu
am->actionContainer(Core::Constants::M_TOOLS)->addAction(cmd, Core::Constants::G_DEFAULT_THREE);
return true;
}
示例11: initialize
/**
* Add KmlExport option to the tools menu
*/
bool KmlExportPlugin::initialize(const QStringList& args, QString *errMsg)
{
Q_UNUSED(args);
Q_UNUSED(errMsg);
// Add Menu entry
Core::ActionManager* am = Core::ICore::instance()->actionManager();
Core::ActionContainer* ac = am->actionContainer(Core::Constants::M_TOOLS);
// Command to convert log file to KML
exportToKmlCmd = am->registerAction(new QAction(this), "KmlExport.ExportToKML",
QList<int>() << Core::Constants::C_GLOBAL_ID);
exportToKmlCmd->action()->setText("Export logfile to KML");
ac->menu()->addSeparator();
ac->appendGroup("KML Export");
ac->addAction(exportToKmlCmd, "KML Export");
connect(exportToKmlCmd->action(), SIGNAL(triggered(bool)), this, SLOT(exportToKML()));
return true;
}
示例12: createGadget
Core::IUAVGadget* ConfigGadgetFactory::createGadget(QWidget *parent)
{
gadgetWidget = new ConfigGadgetWidget(parent);
// Add Menu entry
Core::ActionManager* am = Core::ICore::instance()->actionManager();
Core::ActionContainer* ac = am->actionContainer(Core::Constants::M_TOOLS);
Core::Command* cmd = am->registerAction(new QAction(this),
"ConfigPlugin.ShowInputWizard",
QList<int>() <<
Core::Constants::C_GLOBAL_ID);
cmd->action()->setText(tr("Radio Setup Wizard"));
Core::ModeManager::instance()->addAction(cmd, 1);
ac->appendGroup("Wizard");
ac->addAction(cmd, "Wizard");
connect(cmd->action(), SIGNAL(triggered(bool)), this, SLOT(startInputWizard()));
return new ConfigGadget(QString("ConfigGadget"), gadgetWidget, parent);
}
示例13: initialize
bool ConfigPlugin::initialize(const QStringList& args, QString *errMsg)
{
Q_UNUSED(args);
Q_UNUSED(errMsg);
cf = new ConfigGadgetFactory(this);
addAutoReleasedObject(cf);
// Add Menu entry to erase all settings
Core::ActionManager* am = Core::ICore::instance()->actionManager();
Core::ActionContainer* ac = am->actionContainer(Core::Constants::M_TOOLS);
// Command to erase all settings from the board
cmd = am->registerAction(new QAction(this),
"ConfigPlugin.EraseAll",
QList<int>() <<
Core::Constants::C_GLOBAL_ID);
cmd->action()->setText(tr("Erase all settings from board..."));
ac->menu()->addSeparator();
ac->appendGroup("Utilities");
ac->addAction(cmd, "Utilities");
connect(cmd->action(), SIGNAL(triggered(bool)), this, SLOT(eraseAllSettings()));
// *********************
// Listen to autopilot connection events
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
TelemetryManager* telMngr = pm->getObject<TelemetryManager>();
connect(telMngr, SIGNAL(connected()), this, SLOT(onAutopilotConnect()));
connect(telMngr, SIGNAL(disconnected()), this, SLOT(onAutopilotDisconnect()));
// And check whether by any chance we are not already connected
if (telMngr->isConnected())
onAutopilotConnect();
return true;
}
示例14: initialize
bool RfmBindWizardPlugin::initialize(const QStringList & args, QString *errMsg)
{
Q_UNUSED(args);
Q_UNUSED(errMsg);
// Add Menu entry
Core::ActionManager *am = Core::ICore::instance()->actionManager();
Core::ActionContainer *ac = am->actionContainer(Core::Constants::M_TOOLS);
Core::Command *cmd = am->registerAction(new QAction(this),
"RfmBindWizardPlugin.ShowBindWizard",
QList<int>() <<
Core::Constants::C_GLOBAL_ID);
cmd->action()->setText(tr("Rfm Bind Wizard"));
Core::ModeManager::instance()->addAction(cmd, 1);
ac->menu()->addSeparator();
ac->appendGroup("Bind Wizard");
ac->addAction(cmd, "Bind Wizard");
connect(cmd->action(), SIGNAL(triggered(bool)), this, SLOT(showBindWizard()));
return true;
}
示例15: setupActions
void FormEditorW::setupActions()
{
Core::ActionManager *am = Core::ICore::actionManager();
Core::Command *command;
//menus
Core::ActionContainer *medit =
am->actionContainer(Core::Constants::M_EDIT);
Core::ActionContainer *mtools =
am->actionContainer(Core::Constants::M_TOOLS);
Core::ActionContainer *mformtools =
am->createMenu(M_FORMEDITOR);
mformtools->menu()->setTitle(tr("For&m Editor"));
mtools->addMenu(mformtools);
//overridden actions
bindShortcut(am->registerAction(m_fwm->actionUndo(), Core::Constants::UNDO, m_contexts), m_fwm->actionUndo());
bindShortcut(am->registerAction(m_fwm->actionRedo(), Core::Constants::REDO, m_contexts), m_fwm->actionRedo());
bindShortcut(am->registerAction(m_fwm->actionCut(), Core::Constants::CUT, m_contexts), m_fwm->actionCut());
bindShortcut(am->registerAction(m_fwm->actionCopy(), Core::Constants::COPY, m_contexts), m_fwm->actionCopy());
bindShortcut(am->registerAction(m_fwm->actionPaste(), Core::Constants::PASTE, m_contexts), m_fwm->actionPaste());
bindShortcut(am->registerAction(m_fwm->actionSelectAll(), Core::Constants::SELECTALL, m_contexts), m_fwm->actionSelectAll());
m_actionPrint = new QAction(this);
bindShortcut(am->registerAction(m_actionPrint, Core::Constants::PRINT, m_contexts), m_actionPrint);
connect(m_actionPrint, SIGNAL(triggered()), this, SLOT(print()));
//'delete' action. Do not set a shortcut as Designer handles
// the 'Delete' key by event filter. Setting a shortcut triggers
// buggy behaviour on Mac (Pressing Delete in QLineEdit removing the widget).
command = am->registerAction(m_fwm->actionDelete(), Core::Id("FormEditor.Edit.Delete"), m_contexts);
bindShortcut(command, m_fwm->actionDelete());
command->setAttribute(Core::Command::CA_Hide);
medit->addAction(command, Core::Constants::G_EDIT_COPYPASTE);
m_actionGroupEditMode = new QActionGroup(this);
m_actionGroupEditMode->setExclusive(true);
connect(m_actionGroupEditMode, SIGNAL(triggered(QAction*)), this, SLOT(activateEditMode(QAction*)));
m_modeActionSeparator = new QAction(this);
m_modeActionSeparator->setSeparator(true);
command = am->registerAction(m_modeActionSeparator, Core::Id("FormEditor.Sep.ModeActions"), m_contexts);
medit->addAction(command, Core::Constants::G_EDIT_OTHER);
m_toolActionIds.push_back(Core::Id("FormEditor.WidgetEditor"));
createEditModeAction(m_actionGroupEditMode, m_contexts, am, medit,
tr("Edit Widgets"), m_toolActionIds.back(),
EditModeWidgetEditor, QLatin1String("widgettool.png"), tr("F3"));
m_toolActionIds.push_back(Core::Id("FormEditor.SignalsSlotsEditor"));
createEditModeAction(m_actionGroupEditMode, m_contexts, am, medit,
tr("Edit Signals/Slots"), m_toolActionIds.back(),
EditModeSignalsSlotEditor, QLatin1String("signalslottool.png"), tr("F4"));
m_toolActionIds.push_back(Core::Id("FormEditor.BuddyEditor"));
createEditModeAction(m_actionGroupEditMode, m_contexts, am, medit,
tr("Edit Buddies"), m_toolActionIds.back(),
EditModeBuddyEditor, QLatin1String("buddytool.png"));
m_toolActionIds.push_back(Core::Id("FormEditor.TabOrderEditor"));
createEditModeAction(m_actionGroupEditMode, m_contexts, am, medit,
tr("Edit Tab Order"), m_toolActionIds.back(),
EditModeTabOrderEditor, QLatin1String("tabordertool.png"));
//tool actions
m_toolActionIds.push_back(Core::Id("FormEditor.LayoutHorizontally"));
const QString horizLayoutShortcut = osMac ? tr("Meta+H") : tr("Ctrl+H");
addToolAction(m_fwm->actionHorizontalLayout(), am, m_contexts,
m_toolActionIds.back(), mformtools, horizLayoutShortcut);
m_toolActionIds.push_back(Core::Id("FormEditor.LayoutVertically"));
const QString vertLayoutShortcut = osMac ? tr("Meta+L") : tr("Ctrl+L");
addToolAction(m_fwm->actionVerticalLayout(), am, m_contexts,
m_toolActionIds.back(), mformtools, vertLayoutShortcut);
m_toolActionIds.push_back(Core::Id("FormEditor.SplitHorizontal"));
addToolAction(m_fwm->actionSplitHorizontal(), am, m_contexts,
m_toolActionIds.back(), mformtools);
m_toolActionIds.push_back(Core::Id("FormEditor.SplitVertical"));
addToolAction(m_fwm->actionSplitVertical(), am, m_contexts,
m_toolActionIds.back(), mformtools);
m_toolActionIds.push_back(Core::Id("FormEditor.LayoutForm"));
addToolAction(m_fwm->actionFormLayout(), am, m_contexts,
m_toolActionIds.back(), mformtools);
m_toolActionIds.push_back(Core::Id("FormEditor.LayoutGrid"));
const QString gridShortcut = osMac ? tr("Meta+G") : tr("Ctrl+G");
addToolAction(m_fwm->actionGridLayout(), am, m_contexts,
m_toolActionIds.back(), mformtools, gridShortcut);
m_toolActionIds.push_back(Core::Id("FormEditor.LayoutBreak"));
addToolAction(m_fwm->actionBreakLayout(), am, m_contexts,
m_toolActionIds.back(), mformtools);
m_toolActionIds.push_back(Core::Id("FormEditor.LayoutAdjustSize"));
const QString adjustShortcut = osMac ? tr("Meta+J") : tr("Ctrl+J");
addToolAction(m_fwm->actionAdjustSize(), am, m_contexts,
//.........这里部分代码省略.........