00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef OST_GUI_GL_WIN_HH
00020 #define OST_GUI_GL_WIN_HH
00021
00022 #include <QMainWindow>
00023 #include <QAction>
00024
00025 #include <QActionGroup>
00026 #include <QStatusBar>
00027
00028 #include <ost/gfx/scene_observer.hh>
00029
00030 #include <ost/gui/module_config.hh>
00031 #include <ost/gui/widget.hh>
00032 #include <ost/gui/gl_canvas.hh>
00033
00034 #include <ost/gui/tools/tool.hh>
00035 #include <ost/gui/tools/tool_bar.hh>
00036
00037
00038
00039
00040 namespace ost { namespace gui {
00041
00042 class DLLEXPORT_OST_GUI GLWin: public Widget, public gfx::SceneObserver
00043 {
00044 Q_OBJECT;
00045 public:
00046 GLWin(QWidget* p);
00047 ~GLWin();
00048 void SetTestMode(bool f);
00049
00050 signals:
00051 void ReleaseFocus();
00052
00053 public:
00054 virtual bool Restore(const QString& prefix);
00055 virtual bool Save(const QString& prefix);
00056
00057 public slots:
00058 void StatusMessage(const String& m);
00059 void ActiveToolChanged(Tool* t);
00060 private:
00061 static QGLFormat CreateFormat(int fid);
00062 GLCanvas* gl_canvas_;
00063
00064 QAction* edit_rigid_action_;
00065 QAction* edit_torsion_action_;
00066 QAction* edit_angle_action_;
00067 QAction* edit_rotamer_action_;
00068 QAction* smode_atom_action_;
00069 QAction* smode_residue_action_;
00070 QAction* smode_chain_action_;
00071
00072 ToolBar* toolbar_;
00073 QStatusBar* status_bar_;
00074 ToolBar* build_toolbar();
00075 };
00076
00077 }}
00078
00079 #endif
00080