/*! \brief Default constructor This is the default constructor for the main class of the application. It adds the standard actions and create the ATMOSphere's KCM. */ ATMOSphere::ATMOSphere() : KMainWindow( 0, "ATMOSphere" ) { // set the shell's ui resource file setXMLFile("atmosphereui.rc"); KStdAction::keyBindings(this, SLOT( slotConfigureKeys() ), actionCollection() ); KStdAction::configureNotifications(this, SLOT(slotConfigureNotifications()), actionCollection()); KStdAction::configureToolbars(this, SLOT(slotConfigureToolBars()), actionCollection()); KStdAction::quit(this, SLOT(close()), actionCollection()); KStdAction::preferences(this, SLOT(setup()), actionCollection()); createGUI(); kcmDialog = new KCMultiDialog( KCMultiDialog::Plain, "ATMOSphere settings", this, "kcmDialog", true); kcmDialog->addModule("kcmatmosphere"); iv = new KIconView(this); setCentralWidget(iv); loadDevices(); connect(iv, SIGNAL( executed(QIconViewItem*) ), this, SLOT(deviceOpened(QIconViewItem*))); #ifdef HAVE_TFTP tftpServer = new TFTP::Server( QHostAddress() ); connect(tftpServer, SIGNAL( receivedFile(QIODevice*,const QString) ), this, SLOT(tftpFileReceived(QIODevice *, const QString))); connect(tftpServer, SIGNAL( sentFile(QIODevice*, QString) ), this, SLOT(tftpFileSent(QIODevice *, QString))); #endif }
// private void kpMainWindow::setupSettingsMenuActions () { KActionCollection *ac = actionCollection (); // Settings/Toolbars |> %s setStandardToolBarMenuEnabled (true); // Settings/Show Statusbar createStandardStatusBarAction (); m_actionFullScreen = KStdAction::fullScreen (this, SLOT (slotFullScreen ()), ac, this/*window*/); m_actionShowPath = new KToggleAction (i18n ("Show &Path"), 0, this, SLOT (slotShowPathToggled ()), ac, "settings_show_path"); m_actionShowPath->setCheckedState (i18n ("Hide &Path")); slotEnableSettingsShowPath (); m_actionKeyBindings = KStdAction::keyBindings (this, SLOT (slotKeyBindings ()), ac); m_actionConfigureToolbars = KStdAction::configureToolbars (this, SLOT (slotConfigureToolBars ()), ac); // m_actionConfigure = KStdAction::preferences (this, SLOT (slotConfigure ()), ac); enableSettingsMenuDocumentActions (false); }
void CervisiaShell::setupActions() { setStandardToolBarMenuEnabled( true ); QAction *action = KStandardAction::configureToolbars( this, SLOT(slotConfigureToolBars()), actionCollection() ); QString hint = i18n("Allows you to configure the toolbar"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = KStandardAction::keyBindings( this, SLOT(slotConfigureKeys()), actionCollection() ); hint = i18n("Allows you to customize the keybindings"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = KStandardAction::quit( this, SLOT(close()), actionCollection() ); hint = i18n("Exits Cervisia"); action->setToolTip( hint ); action->setWhatsThis( hint ); setHelpMenuEnabled(false); (void) new KHelpMenu(this, componentData().aboutData(), false, actionCollection()); action = actionCollection()->action("help_contents"); hint = i18n("Invokes the KDE help system with the Cervisia documentation"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = actionCollection()->action("help_report_bug"); hint = i18n("Opens the bug report dialog"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = actionCollection()->action("help_about_app"); hint = i18n("Displays the version number and copyright information"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = actionCollection()->action("help_about_kde"); hint = i18n("Displays the information about KDE and its version number"); action->setToolTip( hint ); action->setWhatsThis( hint ); }
void CervisiaShell::setupActions() { setStandardToolBarMenuEnabled( true ); QAction *action = KStandardAction::configureToolbars( this, SLOT(slotConfigureToolBars()), actionCollection() ); QString hint = i18n("Allows you to configure the toolbar"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = KStandardAction::keyBindings( this, SLOT(slotConfigureKeys()), actionCollection() ); hint = i18n("Allows you to customize the keybindings"); action->setToolTip( hint ); action->setWhatsThis( hint ); action = KStandardAction::quit( this, SLOT(close()), actionCollection() ); hint = i18n("Exits Cervisia"); action->setToolTip( hint ); action->setWhatsThis( hint ); setHelpMenuEnabled(true); }