void KompareShell::setupActions() { QAction *a; a = actionCollection()->addAction(KStandardAction::Open, this, SLOT(slotFileOpen())); a->setText( i18n( "&Open Diff..." ) ); a = actionCollection()->addAction("file_compare_files", this, SLOT(slotFileCompareFiles())); a->setIcon(QIcon::fromTheme("document-open")); a->setText(i18n("&Compare Files...")); actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::CTRL + Qt::Key_C)); a = actionCollection()->addAction("file_blend_url", this, SLOT(slotFileBlendURLAndDiff())); a->setText(i18n("&Blend URL with Diff...")); actionCollection()->setDefaultShortcut(a, QKeySequence(Qt::CTRL + Qt::Key_B)); actionCollection()->addAction(KStandardAction::Quit, this, SLOT( slotFileClose() )); createStandardStatusBarAction(); setStandardToolBarMenuEnabled(true); m_showTextView = new KToggleAction(i18n("Show T&ext View"), this); // needs a KGuiItem, also the doc says explicitly not to do this // m_showTextView->setCheckedState(i18n("Hide T&ext View")); actionCollection()->addAction("options_show_text_view", m_showTextView); connect(m_showTextView, SIGNAL(triggered(bool)), SLOT(slotShowTextView())); KStandardAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection()); KStandardAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); }
void kerp::setupActions() { KStdAction::openNew(this, SLOT(fileNew()), actionCollection()); KStdAction::open(this, SLOT(fileOpen()), actionCollection()); KStdAction::save(this, SLOT(fileSave()), actionCollection()); KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection()); KStdAction::print(this, SLOT(filePrint()), actionCollection()); KStdAction::quit(kapp, SLOT(quit()), actionCollection()); m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection()); m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection()); KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection()); KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection()); // this doesn't do anything useful. it's just here to illustrate // how to insert a custom menu and menu item KAction *city_action = new KAction(i18n("&City/province"), 0, this, SLOT(city_action()), actionCollection(), "city_action"); KAction *invoice_action=new KAction(i18n("&Invoice"),0, this,SLOT(invoice_action()), actionCollection(),"invoice_action"); KAction * partner_action = new KAction(i18n("&Partner"),0, this,SLOT( partner_action()), actionCollection(),"partner_action"); createGUI(); }
void Kandy::setupActions() { KStdAction::open(this, SLOT(fileOpen()), actionCollection()); KStdAction::save(this, SLOT(fileSave()), actionCollection()); KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection()); // KStdAction::print(this, SLOT(filePrint()), actionCollection()); KStdAction::quit(this, SLOT(close()), actionCollection()); createStandardStatusBarAction(); setStandardToolBarMenuEnabled(true); KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection()); KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection()); new KAction(i18n("Mobile GUI"), 0, this, SLOT(showMobileGui()), actionCollection(), "show_mobilegui"); mConnectAction = new KAction(i18n("Connect"), 0, this, SLOT(modemConnect()), actionCollection(), "modem_connect"); mDisconnectAction = new KAction(i18n("Disconnect"), 0, this, SLOT(modemDisconnect()), actionCollection(), "modem_disconnect"); createGUI(); }
void KXsldbg::setupActions() { KAction *act = KStdAction::quit(kapp, SLOT(quit()), actionCollection()); connect(act, SIGNAL(activated()), this, SLOT(quit())); m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection()); m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection()); KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection()); KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); }
/** * setup menu, shortcuts, create GUI */ void KLinPopup::setupActions() { KStdAction::quit(this, SLOT(slotQuit()), actionCollection()); setStandardToolBarMenuEnabled(true); createStandardStatusBarAction(); m_menubarAction = KStdAction::showMenubar(this, SLOT(optionsShowMenubar()), actionCollection()); KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection()); KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection()); newPopupAction = new KAction(i18n("&New"), "mail_new", CTRL+Key_N, this, SLOT(newPopup()), actionCollection(), "new_popup"); replyPopupAction = new KAction(i18n("&Reply"), "mail_reply", CTRL+Key_R, this, SLOT(replyPopup()), actionCollection(), "reply_popup"); firstPopupAction = new KAction(i18n("&First"), "start", CTRL+Key_B, this, SLOT(firstPopup()), actionCollection(), "first_popup"); prevPopupAction = new KAction(i18n("&Previous"), "back", CTRL+Key_P, this, SLOT(prevPopup()), actionCollection(), "previous_popup"); nextPopupAction = new KAction(i18n("&Next"), "forward", CTRL+Key_F, this, SLOT(nextPopup()), actionCollection(), "next_popup"); lastPopupAction = new KAction(i18n("&Last"), "finish", CTRL+Key_L, this, SLOT(lastPopup()), actionCollection(), "last_popup"); unreadPopupAction = new KAction(i18n("&Unread"), "new_popup", CTRL+Key_U, this, SLOT(unreadPopup()), actionCollection(), "unread_popup"); deletePopupAction = new KAction(i18n("&Delete"), "mail_delete", CTRL+Key_D, this, SLOT(deletePopup()), actionCollection(), "delete_popup"); createGUI(); }
void KISDNnet::setupActions() { KStdAction::quit(kapp, SLOT(quit()), actionCollection()); m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection()); m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection()); KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection()); KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection()); // this doesn't do anything useful. it's just here to illustrate // how to insert a custom menu and menu item m_hardware = new KAction(i18n("&ISDN Hardware"), "hwinfo", 0, this, SLOT(editHardware()), actionCollection(), "hardware"); m_newISP = new KAction(i18n("&New Provider"), "kppp", 0, this, SLOT(newISP()), actionCollection(), "newISP"); createGUI(); }
void k2send::setupActions() { KAction *action; KShortcut cut; setXMLFile( "k2sendui.rc" ); KStdAction::openNew(this, SLOT(fileNew()), actionCollection(),"file_new"); KStdAction::open(this, SLOT(fileOpen()), actionCollection(),"file_open"); action = new KAction(i18n("Import Playlist"), cut, this, SLOT(importPlaylist()), actionCollection(), "file_import"); KStdAction::print(this, SLOT(filePrint()), actionCollection(),"file_print"); KStdAction::quit(kapp, SLOT(quit()), actionCollection(),"file_quit"); m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection()); m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection()); KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection()); KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection(),"preferences"); action = new KAction(i18n("Remove"), "editdelete", cut, m_view, SLOT(slotRemoveBranch()), actionCollection(), "file_remove"); action = new KAction(i18n("Play"), "player_play", cut, m_view, SLOT(slotPlay()), actionCollection(), "player_play"); action = new KAction(i18n("Stop"), "player_stop", cut,m_view, SLOT(slotStop()), actionCollection(), "player_stop"); action = new KAction(i18n("Next"), "player_fwd", cut,m_view, SLOT(slotSkip()), actionCollection(), "player_next"); action = new KAction(i18n("Loudness"), 0, cut,m_view, SLOT(slotLoudness()), actionCollection(), "player_loudness"); action = new KAction(i18n("Clear"), "reload", cut,m_view, SLOT(slotPlaylistClear()), actionCollection(), "playlist_clear"); action = new KAction(i18n("Play"), "player_play", cut,m_view, SLOT(slotConsolePlay()), actionCollection(), "console_play"); action = new KAction(i18n("Stop"), "player_stop", cut,m_view, SLOT(slotConsoleStop()), actionCollection(), "console_stop"); action = new KAction(i18n("Clear"), "reload", cut,m_view, SLOT(slotConsoleClear()), actionCollection(), "console_clear"); createGUI(); }
//ºmergeIngredientsAction->setShortcut( Qt::CTRL + Qt::Key_M ); actionCollection()->addAction( "merge_ingredients_action", mergeIngredientsAction ); connect( mergeIngredientsAction, SIGNAL(triggered(bool)), this, SLOT( mergeSimilarIngredients() ) ); } KAction *action = KStandardAction::openNew( this, SLOT( fileNew() ), actionCollection() ); action->setText( i18n( "&New Recipe" ) ); saveAction = KStandardAction::save( this, SLOT( fileSave() ), actionCollection() ); KStandardAction::quit( kapp, SLOT( quit() ), actionCollection() ); m_statusbarAction = KStandardAction::showStatusbar( this, SLOT( optionsShowStatusbar() ), actionCollection() ); KStandardAction::keyBindings( this, SLOT( optionsConfigureKeys() ), actionCollection() ); KStandardAction::configureToolbars( this, SLOT( optionsConfigureToolbars() ), actionCollection() ); KStandardAction::preferences( this, SLOT( optionsPreferences() ), actionCollection() ); importAction = new KAction( this ); importAction->setText( i18n( "Import from File..." ) ); importAction->setIcon( KIcon( "document-import" ) ); importAction->setShortcut( Qt::CTRL + Qt::Key_I ); actionCollection()->addAction( "import_action" , importAction ); connect( importAction, SIGNAL(triggered(bool)), this, SLOT( import() ) ); importDBAction= new KAction( this ); importDBAction->setText( i18n( "Import from Database..." ) ); importDBAction->setIcon( KIcon( "document-import" ) ); actionCollection()->addAction( "import_db_action" , importDBAction ); connect( importDBAction, SIGNAL(triggered(bool)), this, SLOT( kreDBImport() ) );