Logo Search packages:      
Sourcecode: valknut version File versions  Download package

void DCGuiApp::initActions (  )  [private]

initializes all QActions of the application

Default download mode

server list

tranfer list

hub search

spy

users

actiongroup for away mode

away mode normal

away mode away

Definition at line 270 of file dcgui.cpp.

References actionAwayModeAway, actionAwayModeNormal, actionGroupAwayMode, actionHubSearch, actionServerList, actionSpy, actionTransferList, actionUsers, fileDefaultDldAsk, fileDefaultDldGroup, fileDefaultDldMulti, fileDefaultDldSingle, fileFileListBrowser, fileFileListBrowserLocal, fileOptions, fileQuickOptions, fileQuit, fileReloadPlugins, helpAboutApp, helpManualApp, helpNewVersionApp, helpSupportApp, pWorkspace, slotActionHubSearch(), slotActionServerList(), slotActionSpy(), slotActionTransferList(), slotActionUsers(), slotChangeAwayMode(), slotChangeDefaultDldMode(), slotFileFileListBrowser(), slotFileFileListBrowserLocal(), slotFileOptions(), slotFileQuickOptions(), slotFileQuit(), slotFileReloadPlugins(), slotHelpAbout(), slotHelpManual(), slotHelpNewVersion(), slotHelpSupport(), slotViewDock(), slotViewStatusBar(), slotViewTabBar(), slotViewToolBar(), slotWindowCloseChats(), slotWindowCloseHubs(), slotWindowMinimize(), tileVertically(), viewDock, viewStatusBar, viewTabBar, viewToolBar, windowAction, windowCascade, windowCloseChats, windowCloseHubs, windowMinimize, windowTile, and windowTileHor.

Referenced by DCGuiApp().

{
      fileOptions = new QAction(tr("Options"), QIconSet( g_pIconLoader->GetPixmap(eiCONFIGURE) ), tr("&Options"), QAccel::stringToKey(tr("Ctrl+O")), this);
      fileOptions->setStatusTip(tr("Open option dialog"));
      fileOptions->setWhatsThis(tr(""));
      connect(fileOptions, SIGNAL(activated()), this, SLOT(slotFileOptions()));

      fileFileListBrowser = new QAction(tr("Filelist browser"), tr("Filelist browser"), QAccel::stringToKey(tr("")), this);
      fileFileListBrowser->setStatusTip(tr("Open filelist browser"));
      fileFileListBrowser->setWhatsThis(tr(""));
      connect(fileFileListBrowser, SIGNAL(activated()), this, SLOT(slotFileFileListBrowser()));

      fileFileListBrowserLocal = new QAction(tr("Filelist browser local"), tr("Filelist browser local"), QAccel::stringToKey(tr("")), this);
      fileFileListBrowserLocal->setStatusTip(tr("Open local filelist browser"));
      fileFileListBrowserLocal->setWhatsThis(tr(""));
      connect(fileFileListBrowserLocal, SIGNAL(activated()), this, SLOT(slotFileFileListBrowserLocal()));

      fileQuickOptions = new QAction(tr("Quick Options"), tr("Quick options"), QAccel::stringToKey(tr("F12")), this);
//    fileQuickOptions->setStatusTip(tr("Context menu for a few options"));
//    fileQuickOptions->setWhatsThis(tr(""));
      connect(fileQuickOptions, SIGNAL(activated()), this, SLOT(slotFileQuickOptions()));

      /** Default download mode */
      fileDefaultDldAsk = new QAction(tr("Download mode: Ask"), tr("Download mode: Ask"), QAccel::stringToKey(tr("")), this, 0, true);
//    fileDefaultDldAsk->setStatusTip(tr(""));
//    fileDefaultDldAsk->setWhatsThis(tr(""));
      fileDefaultDldSingle = new QAction(tr("Download mode: Single"), tr("Download mode: Single"), QAccel::stringToKey(tr("")), this, 0, true);
      fileDefaultDldMulti = new QAction(tr("Download mode: Multi"), tr("Download mode: Multi"), QAccel::stringToKey(tr("")), this, 0, true);
      fileDefaultDldGroup = new QActionGroup( this, "Download type", TRUE );
        connect( fileDefaultDldGroup, SIGNAL( selected(QAction*) ), this, SLOT(slotChangeDefaultDldMode(QAction*)) );
      fileDefaultDldGroup->add(fileDefaultDldAsk);
      fileDefaultDldGroup->add(fileDefaultDldSingle);
      fileDefaultDldGroup->add(fileDefaultDldMulti);

      switch (g_pConfig->GetDefaultDownloadMode())
      {
            case 0: fileDefaultDldAsk->setOn(TRUE); break;
            case 1: fileDefaultDldSingle->setOn(TRUE); break;
            case 2: fileDefaultDldMulti->setOn(TRUE); break;
      }

      fileReloadPlugins = new QAction(tr("Reload Plugins"), QIconSet( QPixmap("") ), tr("&Reload Plugins"), 0,  this);
      fileReloadPlugins->setStatusTip(tr("Reload Plugins"));
      fileReloadPlugins->setWhatsThis(tr(""));
      connect(fileReloadPlugins, SIGNAL(activated()), this, SLOT(slotFileReloadPlugins()));

      fileQuit = new QAction(tr("Exit"), QIconSet( g_pIconLoader->GetPixmap(eiEXIT) ), tr("Exit"), QAccel::stringToKey(tr("Ctrl+Q")), this);
      fileQuit->setStatusTip(tr("Quits the application"));
      fileQuit->setWhatsThis(tr("Exit\n\nQuits the application."));
      connect(fileQuit, SIGNAL(activated()), this, SLOT(slotFileQuit()));

      viewTabBar = new QAction(tr("Tabbar"), tr("Tabbar"), 0, this, 0, true);
      viewTabBar->setStatusTip(tr("Enables/disables the tabbar"));
      viewTabBar->setWhatsThis(tr("Tabbar\n\nEnables/disables the tabbar."));
      connect(viewTabBar, SIGNAL(toggled(bool)), this, SLOT(slotViewTabBar(bool)));
      
      viewToolBar = new QAction(tr("Toolbar"), tr("Tool&bar"), 0, this, 0, true);
      viewToolBar->setStatusTip(tr("Enables/disables the toolbar"));
      viewToolBar->setWhatsThis(tr("Toolbar\n\nEnables/disables the toolbar."));
      connect(viewToolBar, SIGNAL(toggled(bool)), this, SLOT(slotViewToolBar(bool)));

      viewStatusBar = new QAction(tr("Statusbar"), tr("&Statusbar"), 0, this, 0, true);
      viewStatusBar->setStatusTip(tr("Enables/disables the statusbar"));
      viewStatusBar->setWhatsThis(tr("Statusbar\n\nEnables/disables the statusbar."));
      connect(viewStatusBar, SIGNAL(toggled(bool)), this, SLOT(slotViewStatusBar(bool)));

      viewDock = new QAction(tr("Dock"), tr("&Dock"), 0, this );
      viewDock->setStatusTip(tr("Dock the application"));
      viewDock->setWhatsThis(tr("Dock\n\nDock the application."));
      connect(viewDock, SIGNAL(activated()), this, SLOT(slotViewDock()));

      windowCascade = new QAction(tr("Cascade"), tr("&Cascade"), 0, this);
      windowCascade->setStatusTip(tr("Cascades all windows"));
      windowCascade->setWhatsThis(tr("Cascade\n\nCascades all windows."));
      connect(windowCascade, SIGNAL(activated()), pWorkspace, SLOT(cascade()));

      windowTile = new QAction(tr("Tile Vertically"), tr("&Tile Vertically"), 0, this);
      windowTile->setStatusTip(tr("Tiles all windows vertically"));
      windowTile->setWhatsThis(tr("Tile Vertically\n\nTiles all windows vertically."));
      connect(windowTile, SIGNAL(activated()), this, SLOT(tileVertically()));

      windowTileHor = new QAction(tr("Tile &Horizontally"), tr("Tile &Horizontally"), 0, this);
      windowTileHor->setStatusTip(tr("Tiles all windows horizontally."));
      windowTileHor->setWhatsThis(tr("Tile Horizontally\n\nTiles all windows horizontally."));
      connect(windowTileHor, SIGNAL(activated()), pWorkspace, SLOT(tile()));

      windowMinimize = new QAction(tr("Minimize"), tr("&Minimize"), 0, this);
      windowMinimize->setStatusTip(tr("Minimize all windows."));
      windowMinimize->setWhatsThis(tr("Minimize\n\nMinimize all windows."));
      connect(windowMinimize, SIGNAL(activated()), this, SLOT(slotWindowMinimize()));

      windowCloseChats = new QAction(tr("Close chat windows."), tr("Close chat windows."), 0, this);
      windowCloseChats->setStatusTip(tr("Close all chat windows."));
      windowCloseChats->setWhatsThis(tr("Close chat windows\n\nClose all chat windows."));
      connect(windowCloseChats, SIGNAL(activated()), this, SLOT(slotWindowCloseChats()));

      windowCloseHubs = new QAction(tr("Close disconnected hubs."), tr("Close disconnected hubs."), 0, this);
      windowCloseHubs->setStatusTip(tr("Close all disconnected hub windows."));
      windowCloseHubs->setWhatsThis(tr("Close disconnected hubs\n\nClose all disconnected hub windows."));
      connect(windowCloseHubs, SIGNAL(activated()), this, SLOT(slotWindowCloseHubs()));

      windowAction = new QActionGroup(this, 0, false);
      windowAction->insert(windowCascade);
      windowAction->insert(windowTile);
      windowAction->insert(windowTileHor);
      windowAction->insert(windowMinimize);
      windowAction->insert(windowCloseChats);
      windowAction->insert(windowCloseHubs);

      /** server list */
      actionServerList = new QAction(tr("Hub List"), QIconSet( g_pIconLoader->GetPixmap(eiSERVER) ), tr("H&ub List"), QAccel::stringToKey(tr("Ctrl+U")), this, 0, false);
      actionServerList->setStatusTip(tr("Show Hub List."));
      actionServerList->setWhatsThis(tr(""));
      connect(actionServerList, SIGNAL(activated()), this, SLOT(slotActionServerList()));

      /** tranfer list */
      actionTransferList = new QAction(tr("Transfer List"), QIconSet( g_pIconLoader->GetPixmap(eiTRANSFER) ), tr("&Transfer List"), QAccel::stringToKey(tr("Ctrl+T")), this, 0, false);
      actionTransferList->setStatusTip(tr("Show Transfer List."));
      actionTransferList->setWhatsThis(tr(""));
      connect(actionTransferList, SIGNAL(activated()), this, SLOT(slotActionTransferList()));

      /** hub search */
      actionHubSearch = new QAction(tr("Hub Search"), QIconSet( g_pIconLoader->GetPixmap(eiFIND) ), tr("Hub &Search"), QAccel::stringToKey(tr("Ctrl+S")), this, 0, false);
      actionHubSearch->setStatusTip(tr("Show Hub Search."));
      actionHubSearch->setWhatsThis(tr(""));
      connect(actionHubSearch, SIGNAL(activated()), this, SLOT(slotActionHubSearch()));

      /** spy */
      actionSpy = new QAction(tr("Spy"), QIconSet( g_pIconLoader->GetPixmap(eiSPY) ), tr("S&py"), QAccel::stringToKey(tr("Ctrl+P")), this, 0, false);
      actionSpy->setStatusTip(tr("Show Search Spy."));
      actionSpy->setWhatsThis(tr(""));
      connect(actionSpy, SIGNAL(activated()), this, SLOT(slotActionSpy()));

      /** users */
      actionUsers = new QAction(tr("Users"), tr("Users"), QAccel::stringToKey(tr("Ctrl+F")), this, 0, false);
      actionUsers->setStatusTip(tr("Show users: search tab and friends tab."));
      actionUsers->setWhatsThis(tr(""));
      connect(actionUsers, SIGNAL(activated()), this, SLOT(slotActionUsers()));

      /** actiongroup for away mode */
      actionGroupAwayMode = new QActionGroup( this );
        actionGroupAwayMode->setExclusive( TRUE );

      /** away mode normal */
      actionAwayModeNormal = new QAction(tr("Normal"), tr("&Normal"), QAccel::stringToKey(tr("Ctrl+N")), actionGroupAwayMode, 0, true);
      actionAwayModeNormal->setStatusTip(tr("Set away mode."));
      actionAwayModeNormal->setWhatsThis(tr(""));
      actionAwayModeNormal->setToggleAction(TRUE);
      actionAwayModeNormal->setOn(TRUE);

      /** away mode away */
      actionAwayModeAway = new QAction(tr("Away"), tr("&Away"), QAccel::stringToKey(tr("Ctrl+A")), actionGroupAwayMode, 0, true);
      actionAwayModeAway->setStatusTip(tr("Set away mode."));
      actionAwayModeAway->setWhatsThis(tr(""));
      actionAwayModeAway->setToggleAction(TRUE);

        connect( actionGroupAwayMode, SIGNAL( selected( QAction* ) ), this, SLOT( slotChangeAwayMode() ) );

      helpAboutApp = new QAction(tr("About"), tr("&About..."), 0, this);
      helpAboutApp->setStatusTip(tr("About the application."));
      helpAboutApp->setWhatsThis(tr("About\n\nAbout the application."));
      connect(helpAboutApp, SIGNAL(activated()), this, SLOT(slotHelpAbout()));

      helpManualApp = new QAction(tr("Manual"), tr("&Manual..."), 0, this);
      helpManualApp->setStatusTip(tr("Online User Manual."));
      helpManualApp->setWhatsThis(tr("Manual\n\nOnline User Manual."));
      connect(helpManualApp, SIGNAL(activated()), this, SLOT(slotHelpManual()));

      helpSupportApp = new QAction(tr("Support"), tr("&Support..."), 0, this);
      helpSupportApp->setStatusTip(tr("Connect to Valknut hub"));
      helpSupportApp->setWhatsThis(tr("Support\n\nConnect to the Valknut hub."));
      connect(helpSupportApp, SIGNAL(activated()), this, SLOT(slotHelpSupport()));

      helpNewVersionApp = new QAction(tr("Latest release"), tr("&Latest release..."), 0, this);
      helpNewVersionApp->setStatusTip(tr("Latest release"));
      helpNewVersionApp->setWhatsThis(tr("Latest release\n\nShow latest release."));
      connect(helpNewVersionApp, SIGNAL(activated()), this, SLOT(slotHelpNewVersion()));
}


Generated by  Doxygen 1.6.0   Back to index