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

dcgui.h

/***************************************************************************
                          dcgui.h  -  description
                             -------------------
    begin                : Mon Okt  1 19:59:45 CEST 2001
    copyright            : (C) 2001-2005 by Mathias Küster
    email                : mathen@users.berlios.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef DCGUI_H
#define DCGUI_H

// include files for QT
#include <qapplication.h>
#include <qmainwindow.h>
#include <qaction.h>
#include <qworkspace.h>
#include <qmenubar.h>
#include <qtoolbar.h>
#include <qstatusbar.h>
#include <qwhatsthis.h>
#include <qpopupmenu.h>
#include <qlabel.h>
#include <qtoolbutton.h>
#include <qmessagebox.h>
#include <qstring.h>
#include <qpixmap.h>

#include <dcapplicationevents.h>

// forward declaration of the DCGui classes
class DCGuiView;
class QDockWindow;
class QTimer;
class TrayIcon;

/**
  * This Class is the base class for your application. It sets up the main
  * window and providing a menubar, toolbar
  * and statusbar. For the main view, an instance of class DCGuiView is
  * created which creates your view.
  *
  * @author Source Framework Automatically Generated by KDevelop, (c) The KDevelop Team.
  * @version KDevelop version 1.3 code generation
  */
00054 class DCGuiApp : public QMainWindow
{
Q_OBJECT

public:
      /** construtor */
      DCGuiApp();
      /** destructor */
      virtual ~DCGuiApp();

      /** */
00065       void ShowOptionsDialog() { slotFileOptions(); };
      /** setup all windows */
      void initWindows();
      /** */
00069       void Dock() { slotViewDock(); };

protected:
      /** overloaded for Message box on last window exit */
      bool queryExit();
      /** event filter to catch close events for MDI child windows and is installed in createClient() on every child window.
       * Closing a window calls the eventFilter first which removes the view from the connected documents' view list. If the
       * last view is going to be closed, the eventFilter() tests if the document is modified; if yes, it asks the user to
       * save the document. If the document title contains "Untitled", slotFileSaveAs() gets called to get a save name and path.
       */
      virtual bool eventFilter(QObject* object, QEvent* event);

private slots:

      /** */
      void slotFileOptions();
      /** */
      void slotFileQuickOptions();
      /** */
      void slotFileFileListBrowser();
      /** */
      void slotFileFileListBrowserLocal();
      /** */
      void slotFileCreateShare();
      /** */
      void slotFileReloadPlugins();
      /** change default download mode */
      void slotChangeDefaultDldMode(QAction* DldType);
      /** exits the application */
      bool slotFileQuit();

      /** toggle the tabbar*/
      void slotViewTabBar(bool toggle);
      /** toggle the toolbar*/
      void slotViewToolBar(bool toggle);
      /** toggle the statusbar*/
      void slotViewStatusBar(bool toggle);
      /** dock the application */
      void slotViewDock();
      /** shows an about dlg*/
      void slotHelpAbout();
      /** opens the online manual in web browser */
      void slotHelpManual();
      /** connect to the valknut hub */
      void slotHelpSupport();
      /** check for new versions */
      void slotHelpNewVersion();
      /** change the status message of the whole statusbar temporary */
      void slotStatusHelpMsg(const QString &text);
      /** gets called when the window menu is activated; recreates the window menu with all opened window titles. */
      void windowMenuAboutToShow();
      /** activates the MDI child widget when it gets selected from the window menu. */
      void windowMenuActivated( int id );

      /** show/hide transfer list window */
      void slotActionTransferList();
      /** show/hide server list window */
      void slotActionServerList();
      /** show/hide hub search window */
      void slotActionHubSearch();
      /** show/hide spy window */
      void slotActionSpy();
      /** show/hide users window */
      void slotActionUsers();
      /** change user away mode */
      void slotChangeAwayMode();
      /** show/hide users window */
      void slotActionUpdateManager();

      /** */
      void tileVertically();
      /** minimize all windows */
      void slotWindowMinimize();
      /** */
      void slotWindowCloseChats();
      /** close all disconnected hub windows */
      void slotWindowCloseHubs();

      /** */
      void slotTimeout();
      /** show the tray menu icon */
      void slotTrayMenu( const QPoint&, int );

      /** widget from workspace activated */
      void slotWorkspaceWindowActivated( QWidget * w );

private:
      /** */
      void SetTheme();

      /** initializes all QActions of the application */
      void initActions();
      /** deinitializes all QActions of the application */
      void deinitActions();
      /** initMenuBar creates the menu_bar and inserts the menuitems */
      void initMenuBar();
      /** this creates the toolbars. Change the toobar look and add new toolbars in this
        * function */
      void initToolBar();
      /** setup the statusbar */
      void initStatusBar();
      /** initialize the mainview*/
      void initView();
      /** deinitialize the mainview*/
      void deinitView();
      /** initialize the tray icon */
      void initTray();
      /** deinitialize the tray icon */
      void deinitTray();
      /** show/hide mdi widget */
      void showMDIWidget( QWidget * widget );
      /** */
      void showFreeDiscSpace();
      
      /** file_menu contains all items of the menubar entry "File" */
00184       QPopupMenu *pFileMenu;
      /** */
00186       QPopupMenu *pQuickOptionsMenu;
      /** */
00188       QPopupMenu *pReloadPluginsMenu;
      /** view_menu contains all items of the menubar entry "View" */
00190       QPopupMenu *pViewMenu;
      /** view_menu contains all items of the menubar entry "Help" */
00192       QPopupMenu *pHelpMenu;
      /** the window menu */
00194       QPopupMenu *pWindowMenu;

      /** action */
00197       QPopupMenu *pActionMenu;
      /** away mode */
00199       QPopupMenu *pAwayMenu;
      /** */
00201       QToolBar *windowsTabBar;
      /** */
00203       QToolBar *fileToolbar;
      /** */
00205       QLabel * statusDMLabel;
      /** */
00207       QLabel * statusFMLabel;
      /** */
00209       QLabel * statusTRLabel;
      /** */
00211       QLabel * statusDSLabel;
      /** */
00213       QWorkspace *pWorkspace;
      /** */
00215       QAction *fileOptions;
      /** */
00217       QAction *fileQuickOptions;
      /** */
00219       QAction *fileFileListBrowser;
      /** */
00221       QAction *fileFileListBrowserLocal;
      /** */
00223       QAction *fileReloadPlugins;
      /** */
00225       QAction *fileQuit;
      /** */
00227       QActionGroup *fileDefaultDldGroup;
      /** */
00229       QAction *fileDefaultDldAsk;
      /** */
00231       QAction *fileDefaultDldSingle;
      /** */
00233       QAction *fileDefaultDldMulti;
      /** */
00235       QAction *viewTabBar;
      /** */
00237       QAction *viewToolBar;
      /** */
00239       QAction *viewStatusBar;
      /** */
00241       QAction *viewDock;
      /** */
00243       QAction *windowTile;
      /** */
00245       QAction *windowTileHor;
      /** */
00247       QAction *windowCascade;
      /** */
00249       QAction *windowMinimize;
      /** */
00251       QAction *windowCloseChats;
      /** */
00253       QAction *windowCloseHubs;
      /** */
00255       QActionGroup *windowAction;
      /** */
00257       QAction *actionServerList;
      /** */
00259       QAction *actionTransferList;
      /** */
00261       QAction *actionHubSearch;
      /** */
00263       QAction *actionSpy;
      /** */
00265       QAction *actionUsers;
      /** */
00267       QActionGroup * actionGroupAwayMode;
      /** */
00269       QAction *actionAwayModeNormal;
      /** */
00271       QAction *actionAwayModeAway;
      /** */
00273       QAction *helpAboutApp;
      /** */
00275       QAction *helpManualApp;
      /** */
00277       QAction *helpSupportApp;
      /** */
00279       QAction *helpNewVersionApp;
      /** */
00281       QDockWindow * pTransferViewDock;
      /** */
00283       QTimer * m_pTimer;
      /** */
00285       DCApplicationEvents m_ApplicationEvents;
      /** tray icon */
00287       TrayIcon * m_pTrayIcon;
      /** */
00289       bool m_bTray;
      /** */
00291       bool m_bEnableTray;
      /** */
00293       bool m_bTransferViewDockVisible;
      /** hold old desktop position on dock/undock */
00295       QPoint m_DesktopPosition;
      /** hold old maximized status on dock/undock */
00297       bool m_bWasMaximized;
};
#endif

Generated by  Doxygen 1.6.0   Back to index