1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-02-19 09:54:15 +01:00

Add help to the help menu, does the same action as about plugins currently as a place holder.

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1098 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
dankers 2010-07-14 20:09:09 +00:00 committed by dankers
parent ebeffa4392
commit e48aae7870
4 changed files with 36 additions and 18 deletions

View File

@ -48,5 +48,6 @@
<file>images/exiticon.png</file>
<file>images/optionsicon.png</file>
<file>images/helpicon.png</file>
<file>images/openpiloticon.png</file>
</qresource>
</RCC>

View File

@ -216,6 +216,8 @@ const char * const ICON_INFO = ":/core/images/infoicon.png";
const char * const ICON_EXIT = ":/core/images/exiticon.png";
const char * const ICON_OPTIONS = ":/core/images/optionsicon.png";
const char * const ICON_HELP = ":/core/images/helpicon.png";
const char * const ICON_OPENPILOT = ":/core/images/openpiloticon.png";
// wizard kind
const char * const WIZARD_TYPE_FILE = "GCS::WizardType::File";

Binary file not shown.

After

Width:  |  Height:  |  Size: 510 B

View File

@ -472,6 +472,9 @@ void MainWindow::registerDefaultActions()
cmd = createSeparator(am, this, QLatin1String("QtCreator.Tools.Sep.Options"), m_globalContext);
mtools->addAction(cmd, Constants::G_DEFAULT_THREE);
// Help menu separators
// Return to editor shortcut: Note this requires Qt to fix up
// handling of shortcut overrides in menus, item views, combos....
m_focusToEditor = new QShortcut(this);
@ -623,24 +626,10 @@ void MainWindow::registerDefaultActions()
connect(m_toggleFullScreenAction, SIGNAL(triggered(bool)), this, SLOT(setFullScreen(bool)));
#endif
// About GCS Action
#ifdef Q_WS_MAC
tmpaction = new QAction(QIcon(Constants::ICON_INFO), tr("About &OpenPilot GCS"), this); // it's convention not to add dots to the about menu
#else
tmpaction = new QAction(QIcon(Constants::ICON_INFO), tr("About &OpenPilot GCS..."), this);
#endif
cmd = am->registerAction(tmpaction, Constants::ABOUT_OPENPILOTGCS, m_globalContext);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
tmpaction->setEnabled(true);
#ifdef Q_WS_MAC
cmd->action()->setMenuRole(QAction::ApplicationSpecificRole);
#endif
connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutOpenPilogGCS()));
//About Plugins Action
tmpaction = new QAction(QIcon(Constants::ICON_INFO), tr("About &Plugins..."), this);
cmd = am->registerAction(tmpaction, Constants::ABOUT_PLUGINS, m_globalContext);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
//Help Action
tmpaction = new QAction(QIcon(Constants::ICON_HELP), tr("&Help..."), this);
cmd = am->registerAction(tmpaction, Constants::G_HELP_HELP, m_globalContext);
mhelp->addAction(cmd, Constants::G_HELP_HELP);
tmpaction->setEnabled(true);
#ifdef Q_WS_MAC
cmd->action()->setMenuRole(QAction::ApplicationSpecificRole);
@ -654,6 +643,32 @@ void MainWindow::registerDefaultActions()
cmd = am->registerAction(tmpaction, QLatin1String("QtCreator.Help.Sep.About"), m_globalContext);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
#endif
//About Plugins Action
tmpaction = new QAction(QIcon(Constants::ICON_INFO), tr("About &Plugins..."), this);
cmd = am->registerAction(tmpaction, Constants::ABOUT_PLUGINS, m_globalContext);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
tmpaction->setEnabled(true);
#ifdef Q_WS_MAC
cmd->action()->setMenuRole(QAction::ApplicationSpecificRole);
#endif
connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutPlugins()));
// About GCS Action
#ifdef Q_WS_MAC
tmpaction = new QAction(QIcon(Constants::ICON_OPENPILOT), tr("About &OpenPilot GCS"), this); // it's convention not to add dots to the about menu
#else
tmpaction = new QAction(QIcon(Constants::ICON_OPENPILOT), tr("About &OpenPilot GCS..."), this);
#endif
cmd = am->registerAction(tmpaction, Constants::ABOUT_OPENPILOTGCS, m_globalContext);
mhelp->addAction(cmd, Constants::G_HELP_ABOUT);
tmpaction->setEnabled(true);
#ifdef Q_WS_MAC
cmd->action()->setMenuRole(QAction::ApplicationSpecificRole);
#endif
connect(tmpaction, SIGNAL(triggered()), this, SLOT(aboutOpenPilogGCS()));
}
void MainWindow::newFile()