OpenStructure
perspective.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-2020 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_PERSPECTIVE_HH
20 #define OST_GUI_PERSPECTIVE_HH
21 
22 /*
23  Author: Marco Biasini, Stefan Scheuber
24  */
25 
26 
27 #include <ost/gui/module_config.hh>
28 
29 #include <QObject>
30 
31 class QMenu;
32 class QMenuBar;
33 class QStatusBar;
34 class QMainWindow;
35 class QTextEdit;
36 class QSlider;
37 
38 namespace ost { namespace gui {
39 
40 
41 class SideBar;
42 class ThinSplitter;
43 class MainArea;
44 class PanelManager;
45 class MainArea;
46 class ButtonBar;
47 
50 class DLLEXPORT_OST_GUI Perspective : public QObject {
51  Q_OBJECT
52 public:
53  Perspective(QMainWindow* parent);
55 
58  QMenuBar* GetMenuBar();
59 
62  QMenu* GetMenu(const QString& name);
63 
67 
71 
74  void HideAllBars();
75 
78  bool Restore();
79 
82  bool Save();
83 
84  void ChangeVerbositySlider(int value);
85 
86 private slots:
87  void AddSideBarWidget();
88  void VerbosityChanged(int value);
89 
90 public slots:
93  void StatusMessage(const String& m);
94 
95 
96 private:
97  void SetupQuickAccessBar();
98  QWidget* central_;
99  QMenuBar* menu_bar_;
100  MainArea* main_area_;
101  PanelManager* panels_;
102  QWidget* quick_access_bar_;
103  QStatusBar* status_bar_;
104  QSlider* verbosity_slider_;
105 };
106 
107 }}
108 
109 
110 #endif
main window area It is implemented as a MDI (multi document interface). This allows you to add custom...
Definition: main_area.hh:34
Class which organizes all widgets which are in the side panels This class handles all side bar widget...
QMenuBar * GetMenuBar()
Returns Menubar.
void HideAllBars()
hide all bars Hides all side bars. Can be used if the MainArea should be expanded to full size.
MainArea * GetMainArea()
Returns the MainArea.
bool Restore()
read last perspective from QSettings
void StatusMessage(const String &m)
set status message
void ChangeVerbositySlider(int value)
QMenu * GetMenu(const QString &name)
get QMenu that corresponds to the given name
PanelManager * GetPanels()
The PanelManager class organizes all the widgets in the side panels.
Perspective(QMainWindow *parent)
bool Save()
save settings (internal use)
#define DLLEXPORT_OST_GUI
std::string String
Definition: base.hh:54
Definition: base.dox:1