本文整理汇总了C++中KAction::plugAccel方法的典型用法代码示例。如果您正苦于以下问题:C++ KAction::plugAccel方法的具体用法?C++ KAction::plugAccel怎么用?C++ KAction::plugAccel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KAction
的用法示例。
在下文中一共展示了KAction::plugAccel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: initActions
/** Initializes the action objects of the GUI */
void BibleTime::initActions() {
KStartupLogo::setStatusMessage(i18n("Initializing menu- and toolbars") + QString("..."));
KAction* action = 0;
action = KStdAction::quit(kapp, SLOT( quit() ), actionCollection());
action->setToolTip( CResMgr::mainMenu::file::quit::tooltip );
#if KDE_VERSION_MINOR < 1
action->plugAccel( accel() );
#endif
action = new KAction(i18n("Search in &open work(s)"),
CResMgr::mainMenu::mainIndex::search::icon,
CResMgr::mainMenu::mainIndex::search::accel,
this, SLOT(slotSearchModules()), actionCollection(),
CResMgr::mainMenu::mainIndex::search::actionName
);
action->setToolTip( CResMgr::mainMenu::mainIndex::search::tooltip );
#if KDE_VERSION_MINOR < 1
action->plugAccel( accel() );
#endif
action = new KAction(i18n("Search in standard &Bible"),
CResMgr::mainMenu::mainIndex::searchdefaultbible::icon,
CResMgr::mainMenu::mainIndex::searchdefaultbible::accel,
this, SLOT(slotSearchDefaultBible()), actionCollection(),
CResMgr::mainMenu::mainIndex::searchdefaultbible::actionName
);
action->setToolTip( CResMgr::mainMenu::mainIndex::searchdefaultbible::tooltip );
#if KDE_VERSION_MINOR < 1
action->plugAccel( accel() );
#endif
m_viewToolbar_action = KStdAction::showToolbar(this, SLOT( slotToggleToolbar() ), actionCollection());
m_viewToolbar_action->setToolTip( CResMgr::mainMenu::view::showToolBar::tooltip );
#if KDE_VERSION_MINOR < 1
m_viewToolbar_action->plugAccel( accel() );
#endif
m_viewMainIndex_action = new KToggleAction(i18n("&Show bookshelf"),
CResMgr::mainMenu::view::showMainIndex::icon,
CResMgr::mainMenu::view::showMainIndex::accel,
this, SLOT(slotToggleMainIndex()), actionCollection(),
CResMgr::mainMenu::view::showMainIndex::actionName);
m_viewMainIndex_action->setToolTip( CResMgr::mainMenu::view::showMainIndex::tooltip );
#if KDE_VERSION_MINOR < 1
m_viewMainIndex_action->plugAccel( accel() );
#endif
m_viewInfoDisplay_action = new KToggleAction(i18n("Show &mag"),
CResMgr::mainMenu::view::showInfoDisplay::icon,
CResMgr::mainMenu::view::showInfoDisplay::accel,
this, SLOT(slotToggleInfoDisplay()), actionCollection(),
CResMgr::mainMenu::view::showInfoDisplay::actionName);
m_viewMainIndex_action->setToolTip( CResMgr::mainMenu::view::showInfoDisplay::tooltip );
#if KDE_VERSION_MINOR < 1
m_viewInfoDisplay_action->plugAccel( accel() );
#endif
action = KStdAction::preferences(this, SLOT( slotSettingsOptions() ), actionCollection());
action->setToolTip( CResMgr::mainMenu::settings::optionsDialog::tooltip );
#if KDE_VERSION_MINOR < 1
action->plugAccel( accel() );
#endif
action = new KAction(i18n("Bookshelf &Manager"),
CResMgr::mainMenu::settings::swordSetupDialog::icon,
CResMgr::mainMenu::settings::swordSetupDialog::accel,
this, SLOT( slotSwordSetupDialog() ), actionCollection(),
CResMgr::mainMenu::settings::swordSetupDialog::actionName
);
action->setToolTip( CResMgr::mainMenu::settings::swordSetupDialog::tooltip );
#if KDE_VERSION_MINOR < 1
action->plugAccel( accel() );
#endif
//delete help action if KDE created it
if ( actionCollection()->action( KStdAction::stdName(KStdAction::ConfigureToolbars) )) {
actionCollection()->remove
(actionCollection()->action(
KStdAction::stdName(KStdAction::ConfigureToolbars))
);
}
action = KStdAction::configureToolbars(this, SLOT( slotSettingsToolbar() ), actionCollection());
//.........这里部分代码省略.........