00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef GESTURELABAPPLICATION_H
00037 #define GESTURELABAPPLICATION_H
00038
00039
00040 #include <QApplication>
00041
00042 #include <QHash>
00043 #include <QPointer>
00044 #include <QSqlDatabase>
00045
00046 #include <jni.h>
00047
00048 #include "digest.h"
00049 #include "gesturelabprefsdialog.h"
00050
00051 class QActionGroup;
00052 class QAction;
00053 class QDialog;
00054 class QMenuBar;
00055
00056 class ActionManager;
00057 class DigestDbModel;
00058 class DigestDbController;
00059 class SettingsModel;
00060 class SettingsController;
00061
00062 class AbstractGuiDbComponent;
00063 class ExperimentBrowserComponent;
00064 class GestureBrowserComponent;
00065 class RecogniserBrowserComponent;
00066 class RecogniserTestPadComponent;
00067 class SqlBrowseComponent;
00068
00069
00076 class GestureLabApplication : public QApplication {
00077
00078 Q_OBJECT
00079
00080 public:
00081 GestureLabApplication( int& argc, char** argv );
00082 virtual ~GestureLabApplication();
00083
00084 bool event( QEvent* );
00085
00086
00087 public slots:
00088 bool reconnectDatabase();
00089
00090 void closeActiveWindow();
00091
00092 void showAppPrefs();
00093 void showAppHelp();
00094 void showAppAbout();
00095 void appQuit();
00096
00097
00098 private slots:
00099 void onRequest( const QString& message );
00100
00101
00102 private:
00103 void init();
00104 void initJvm();
00105 void setupUi();
00106 void createMenuBar();
00107
00108 JavaVM* m_jvm;
00109
00110 QSqlDatabase m_db;
00111 QString m_dbConnectionName;
00112
00113 DigestDbModel* m_dbModel;
00114 DigestDbController* m_dbController;
00115
00116 SettingsModel* m_settingsModel;
00117 SettingsController* m_settingsController;
00118
00119 ActionManager* m_actionManager;
00120
00121
00122
00123 QPointer<ExperimentBrowserComponent> m_experimentBrowserCom;
00124 QPointer<GestureBrowserComponent> m_gestureBrowserCom;
00125 QPointer<RecogniserBrowserComponent> m_recogniserBrowserCom;
00126 QPointer<RecogniserTestPadComponent> m_recogniserTestPadCom;
00127 QPointer<SqlBrowseComponent> m_sqlBrowserCom;
00128 QPointer<GestureLabPrefsDialog> m_prefsDlg;
00129 QPointer<QDialog> m_aboutBoxDlg;
00130
00131 QList<AbstractGuiDbComponent*> m_components;
00132
00133 QMenuBar* m_globalMenuBar;
00134
00135 QMenu* m_fileMenu;
00136 QMenu* m_editMenu;
00137 QMenu* m_windowMenu;
00138 QMenu* m_helpMenu;
00139
00140 QString m_prevPath;
00141 };
00142
00143
00144 #endif // ! GESTURELABAPPLICATION_H