OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
gl_win.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2011 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_GUI_GL_WIN_HH
20 #define OST_GUI_GL_WIN_HH
21 
22 
24 
25 #include <ost/gui/module_config.hh>
26 #include <ost/gui/widget.hh>
27 
28 #include <QGLFormat>
29 #include <QActionGroup>
30 
31 class QStatusBar;
32 class QAction;
33 
34 /*
35  Authors: Ansgar Philippsen, Marco Biasini
36  */
37 namespace ost { namespace gui {
38 
39 
40 class GLCanvas;
41 class ToolBar;
42 class Tool;
43 
45 {
46  Q_OBJECT;
47 public:
48  GLWin(QWidget* p, bool try_stereo=false);
49  ~GLWin();
50  void SetTestMode(bool f);
51 
52 signals:
53  void ReleaseFocus();
54 
55 public:
56  virtual bool Restore(const QString& prefix);
57  virtual bool Save(const QString& prefix);
58 
59 public slots:
60  void StatusMessage(const String& m);
61  void ActiveToolChanged(Tool* t);
62 private:
63  static QGLFormat CreateFormat(int fid);
64  GLCanvas* gl_canvas_;
65 
66  QAction* edit_rigid_action_;
67  QAction* edit_torsion_action_;
68  QAction* edit_angle_action_;
69  QAction* edit_rotamer_action_;
70  QAction* smode_atom_action_;
71  QAction* smode_residue_action_;
72  QAction* smode_chain_action_;
73 
74  ToolBar* toolbar_;
75  QStatusBar* status_bar_;
76  ToolBar* build_toolbar();
77 };
78 
79 }} // ns
80 
81 #endif
82 
std::string String
Definition: base.hh:54
base class for tools
Definition: tool.hh:62
Interface for observing graphical objects.
#define DLLEXPORT_OST_GUI
Base class for widgets.
Definition: widget.hh:40