00001
00002
00003
00004
00005
00006
00007
00008
00009
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00028
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;
00050 YPlugInManager *pluginmanager;
00051 YActionHandler *actionhandler;
00052 YOutput *output;
00053 YMainWindow *mainwindow;
00054 YTranslator *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
00082
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