本文整理汇总了C++中StelGui::getGuiActions方法的典型用法代码示例。如果您正苦于以下问题:C++ StelGui::getGuiActions方法的具体用法?C++ StelGui::getGuiActions怎么用?C++ StelGui::getGuiActions使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StelGui
的用法示例。
在下文中一共展示了StelGui::getGuiActions方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initializeActions
void LogBook::initializeActions()
{
QString group = "LogBook";
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui());
Q_ASSERT(gui);
gui->addGuiActions("actionShow_LogBook", N_("Open LogBook"), "Ctrl+L", "Plugin Key Bindings", true);
gui->getGuiActions("actionShow_LogBook")->setChecked(flagShowLogBook);
gui->addGuiActions("actionShow_LogBookConfigDialog", N_("Show data config dialog"), "ALT+L", group, true);
gui->addGuiActions("actionShow_TargetsDialog", N_("Show Targets config dialog"), "ALT+T", group, true);
connect(gui->getGuiActions("actionShow_LogBook"), SIGNAL(toggled(bool)), this, SLOT(enableLogBook(bool)));
connect(gui->getGuiActions("actionShow_LogBookConfigDialog"), SIGNAL(toggled(bool)), this, SLOT(setConfigDialogVisible(bool)));
connect(gui->getGuiActions("actionShow_TargetsDialog"), SIGNAL(toggled(bool)), this, SLOT(setTargetsDialogVisible(bool)));
// Make a toolbar button
try {
pxmapGlow = new QPixmap(":/graphicGui/glow32x32.png");
pxmapOnIcon = new QPixmap(":/logbook/bt_Logbook_on.png");
pxmapOffIcon = new QPixmap(":/logbook/bt_Logbook_off.png");
toolbarButton = new StelButton(NULL,
*pxmapOffIcon,
*pxmapOnIcon,
*pxmapGlow,
gui->getGuiActions("actionShow_LogBook"));
gui->getButtonBar()->addButton(toolbarButton, "065-pluginsGroup");
} catch (std::runtime_error& e) {
qWarning() << "WARNING: unable create toolbar button for LogBook plugin: "<< e.what();
}
}
示例2: close
void SatTrajDialog::close(void)
{
// qDebug() << "Closing SatTrajMgr Configure Dialog";
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui());
gui->getGuiActions("actionShow_SatTrajMgr_ConfigDialog")->setChecked(false);
}