00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef OST_GUI_GOSTY_APP_HH
00020 #define OST_GUI_GOSTY_APP_HH
00021
00022
00023
00024
00025
00026 #include <QObject>
00027 #include <QString>
00028 #include <QMap>
00029
00030 #include <ost/config.hh>
00031 #include <ost/gui/module_config.hh>
00032 #include <ost/gui/scene_win/scene_win.hh>
00033 #include <ost/gui/sequence_viewer/sequence_viewer.hh>
00034 #include <ost/gui/main.hh>
00035 #include <ost/gui/widget_geom_handler.hh>
00036 #if OST_IMG_ENABLED
00037 #include <ost/gui/data_viewer/data_viewer.hh>
00038 #endif
00039
00040
00041
00042
00043 class QMainWindow;
00044 class QMdiArea;
00045 class QWidget;
00046
00047
00048 namespace ost { namespace gui {
00049
00050 class PythonShell;
00051 class GLWin;
00052 class TextLogger;
00053 class ToolOptionsWin;
00054 class Perspective;
00055
00068 class DLLEXPORT_OST_GUI GostyApp : public QObject {
00069 Q_OBJECT
00070 public:
00076 PythonShell* GetPyShell();
00077
00082 GLWin* GetGLWin();
00083
00088 SceneWin* GetSceneWin();
00089
00094 SequenceViewer* GetSequenceViewer();
00095
00100 ToolOptionsWin* GetToolOptionsWin();
00101
00102 #if OST_IMG_ENABLED
00105 ost::img::gui::DataViewer* CreateDataViewer(const ost::img::Data& d, const QString& name="");
00106 #endif
00107
00109 void ProcessEvents();
00110
00115 Perspective* GetPerspective();
00116
00124 void AddWidgetToApp(const QString& ident, QWidget* widget);
00125
00130 void RemoveWidgetFromApp(const QString& ident);
00131
00135 static GostyApp* Instance();
00136
00139 void SetAppTitle(const QString& app_title);
00140
00141 public slots:
00143 void OnQuit();
00144 private:
00145 GostyApp();
00146 PythonShell* py_shell_;
00147 QWidget* w_py_shell_;
00148
00149 GLWin* gl_win_;
00150 QWidget* w_gl_win_;
00151
00152 SceneWin* scene_win_;
00153 QWidget* w_scene_win_;
00154
00155 SequenceViewer* seq_viewer_;
00156
00157 ToolOptionsWin* tool_options_win_;
00158 QWidget* w_tool_options_;
00159 GostyMainWindow* main_;
00160
00161 Perspective* perspective_;
00162
00163 QMap<QString,WidgetGeomHandler *> external_widgets_;
00164
00165 static GostyApp* app_;
00166 };
00167
00168 }}
00169
00170 #endif