本文整理汇总了C++中KToggleAction::objectName方法的典型用法代码示例。如果您正苦于以下问题:C++ KToggleAction::objectName方法的具体用法?C++ KToggleAction::objectName怎么用?C++ KToggleAction::objectName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KToggleAction
的用法示例。
在下文中一共展示了KToggleAction::objectName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setupActions
void KateMainWindow::setupActions()
{
KAction *a;
actionCollection()->addAction( KStandardAction::New, "file_new", m_viewManager, SLOT(slotDocumentNew()) )
->setWhatsThis(i18n("Create a new document"));
actionCollection()->addAction( KStandardAction::Open, "file_open", m_viewManager, SLOT(slotDocumentOpen()) )
->setWhatsThis(i18n("Open an existing document for editing"));
fileOpenRecent = KStandardAction::openRecent (m_viewManager, SLOT(openUrl(KUrl)), this);
actionCollection()->addAction(fileOpenRecent->objectName(), fileOpenRecent);
fileOpenRecent->setWhatsThis(i18n("This lists files which you have opened recently, and allows you to easily open them again."));
a = actionCollection()->addAction( "file_save_all" );
a->setIcon( KIcon("document-save-all") );
a->setText( i18n("Save A&ll") );
a->setShortcut( QKeySequence(Qt::CTRL + Qt::Key_L) );
connect( a, SIGNAL(triggered()), KateDocManager::self(), SLOT(saveAll()) );
a->setWhatsThis(i18n("Save all open, modified documents to disk."));
a = actionCollection()->addAction( "file_reload_all" );
a->setText( i18n("&Reload All") );
connect( a, SIGNAL(triggered()), KateDocManager::self(), SLOT(reloadAll()) );
a->setWhatsThis(i18n("Reload all open documents."));
a = actionCollection()->addAction( "file_close_orphaned" );
a->setText( i18n("Close Orphaned") );
connect( a, SIGNAL(triggered()), KateDocManager::self(), SLOT(closeOrphaned()) );
a->setWhatsThis(i18n("Close all documents in the file list that could not be reopened, because they are not accessible anymore."));
actionCollection()->addAction( KStandardAction::Close, "file_close", m_viewManager, SLOT(slotDocumentClose()) )
->setWhatsThis(i18n("Close the current document."));
a = actionCollection()->addAction( "file_close_other" );
a->setText( i18n( "Close Other" ) );
connect( a, SIGNAL(triggered()), this, SLOT(slotDocumentCloseOther()) );
a->setWhatsThis(i18n("Close other open documents."));
a = actionCollection()->addAction( "file_close_all" );
a->setText( i18n( "Clos&e All" ) );
connect( a, SIGNAL(triggered()), this, SLOT(slotDocumentCloseAll()) );
a->setWhatsThis(i18n("Close all open documents."));
a = actionCollection()->addAction( KStandardAction::Quit, "file_quit" );
// Qt::QueuedConnection: delay real shutdown, as we are inside menu action handling (bug #185708)
connect( a, SIGNAL(triggered()), this, SLOT(slotFileQuit()), Qt::QueuedConnection );
a->setWhatsThis(i18n("Close this window"));
a = actionCollection()->addAction( "view_new_view" );
a->setIcon( KIcon("window-new") );
a->setText( i18n("&New Window") );
connect( a, SIGNAL(triggered()), this, SLOT(newWindow()) );
a->setWhatsThis(i18n("Create a new Kate view (a new window with the same document list)."));
KToggleAction* showFullScreenAction = KStandardAction::fullScreen( 0, 0, this, this);
actionCollection()->addAction( showFullScreenAction->objectName(), showFullScreenAction );
connect( showFullScreenAction, SIGNAL(toggled(bool)), this, SLOT(slotFullScreen(bool)));
documentOpenWith = new KActionMenu(i18n("Open W&ith"), this);
actionCollection()->addAction("file_open_with", documentOpenWith);
documentOpenWith->setWhatsThis(i18n("Open the current document using another application registered for its file type, or an application of your choice."));
connect(documentOpenWith->menu(), SIGNAL(aboutToShow()), this, SLOT(mSlotFixOpenWithMenu()));
connect(documentOpenWith->menu(), SIGNAL(triggered(QAction*)), this, SLOT(slotOpenWithMenuAction(QAction*)));
a = KStandardAction::keyBindings(this, SLOT(editKeys()), actionCollection());
a->setWhatsThis(i18n("Configure the application's keyboard shortcut assignments."));
a = KStandardAction::configureToolbars(this, SLOT(slotEditToolbars()), actionCollection());
a->setWhatsThis(i18n("Configure which items should appear in the toolbar(s)."));
QAction* settingsConfigure = KStandardAction::preferences(this, SLOT(slotConfigure()), actionCollection());
settingsConfigure->setWhatsThis(i18n("Configure various aspects of this application and the editing component."));
// tip of the day :-)
actionCollection()->addAction( KStandardAction::TipofDay, this, SLOT(tipOfTheDay()) )
->setWhatsThis(i18n("This shows useful tips on the use of this application."));
if (KatePluginManager::self()->pluginList().count() > 0)
{
a = actionCollection()->addAction( "help_plugins_contents" );
a->setText( i18n("&Plugins Handbook") );
connect( a, SIGNAL(triggered()), this, SLOT(pluginHelp()) );
a->setWhatsThis(i18n("This shows help files for various available plugins."));
}
a = actionCollection()->addAction( "help_about_editor" );
a->setText( i18n("&About Editor Component") );
connect( a, SIGNAL(triggered()), this, SLOT(aboutEditor()) );
connect(m_viewManager, SIGNAL(viewChanged()), m_mainWindow, SIGNAL(viewChanged()));
connect(m_viewManager, SIGNAL(viewCreated(KTextEditor::View*)), m_mainWindow, SIGNAL(viewCreated(KTextEditor::View*)));
connect(m_viewManager, SIGNAL(viewChanged()), this, SLOT(slotWindowActivated()));
connect(m_viewManager, SIGNAL(viewChanged()), this, SLOT(slotUpdateOpenWith()));
connect(m_viewManager, SIGNAL(viewChanged()), this, SLOT(slotUpdateBottomViewBar()));
connect(m_viewManager, SIGNAL(viewChanged()), this, SLOT(slotUpdateTopViewBar()));
slotWindowActivated ();
// session actions
a = actionCollection()->addAction( "sessions_new" );
a->setIcon( KIcon("document-new") );
//.........这里部分代码省略.........