Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Examples  

application.h

Go to the documentation of this file.
00001 
00002 //
00003 // YASA application startup code declarations
00004 //
00005 // Project: Yasa 2
00006 // Author : Jan Blumenthal
00007 // Start  : 2002/02/28
00008 // $Header: /sources/yasa/yasagui/application.h,v 1.5 2003/01/24 15:47:40 bj Exp $
00009 //
00011 //
00012 // This program is free software; you can redistribute it and/or modify
00013 // it under the terms of the GNU General Public License as published by
00014 // the Free Software Foundation; either version 2 of the License, or
00015 // (at your option) any later version.
00016 //
00017 // This program is distributed in the hope that it will be useful,
00018 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020 // GNU General Public License for more details.
00021 //
00022 // You should have received a copy of the GNU General Public License
00023 // along with this program (See the included file COPYING);
00024 // if not, write to the Free Software Foundation, Inc.,
00025 // 675 Mass Ave, Cambridge, MA 02139, USA.
00026 //
00028 #ifndef YASAGUI_APPLICATION_INCLUDE
00029 #define YASAGUI_APPLICATION_INCLUDE
00030 
00031 
00033 #include <qapplication.h>
00034 #include <qdir.h>
00035 #include <qtimer.h>
00036 
00038 class YWorkSpaceManager;
00039 class YPlugInManager;
00040 class YActionHandler;
00041 class YOutput;
00042 class YMainWindow;
00043 class YTranslator;
00044 class YSettings;
00045 
00047 class YApplication : public QApplication
00048 {   Q_OBJECT
00049     YWorkSpaceManager       *workspacemanager;                          // workspace/project manager
00050     YPlugInManager          *pluginmanager;                             // plugin manager
00051     YActionHandler          *actionhandler;                             // action handler
00052     YOutput                 *output;                                    // output control
00053     YMainWindow             *mainwindow;                                // main window control
00054     YTranslator             *translator;                                // translator
00055     YSettings               *settings;
00056     QString                 StartPath;
00057 public:                     YApplication(int argc, char** argv) :
00058                             QApplication(argc, argv),
00059                             workspacemanager(0),
00060                             pluginmanager(0),
00061                             actionhandler(0),
00062                             output(0),
00063                             mainwindow(0),
00064                             translator(0),
00065                             settings(0),
00066                             StartPath( QDir::currentDirPath() )
00067                             {
00068                             }
00069                             ~YApplication();
00070 
00071     int                     InitInstance();
00072     static YWorkSpaceManager* GetWorkSpaceManager();
00073     static YPlugInManager*  GetPlugInManager();
00074     static YActionHandler*  GetActionHandler();
00075     static YOutput*         GetOutput();
00076     static YMainWindow*     GetMainWindow();
00077     static YTranslator*     GetTranslator();
00078     static YSettings*       GetSettings();
00079     const QString &         GetStartPath() const                    {   return StartPath;       }
00080     const QString &         GetYasaPath() const                     {   return StartPath;       }
00081 //public slots:
00082 //  void                    ExecuteCurrentEnvironment();
00083 public slots:
00085     void                    ProcessEvents()
00086     {
00087         processEvents();
00088         QTimer::singleShot( 100, this, SLOT( ProcessEvents() ) );
00089     }
00090 };
00091 
00092 
00094 #endif                                                                  // ifndef YASAGUI_APPLICATION_INCLUDE

Generated on Thu Feb 13 23:43:52 2003 for Yasa by doxygen1.3-rc3