Esempio n. 1
0
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();
}
Esempio n. 2
0
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());
}
Esempio n. 3
0
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();
}
Esempio n. 4
0
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->setIcon( KIcon( "ingredients" ) );
        mergeIngredientsAction->setText( i18n( "&Merge Similar Ingredients..." ) );
        //º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" ) );