OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
splitter_panel_bar.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_SPLITTER_PANEL_BAR
20 #define OST_GUI_SPLITTER_PANEL_BAR
21 
22 
23 #include <ost/gui/module_config.hh>
24 #include <ost/gui/widget_pool.hh>
25 #include <ost/gui/widget.hh>
26 #include <ost/gui/thin_splitter.hh>
27 
30 
31 #include <QHBoxLayout>
32 #include <QWidget>
33 #include <QString>
34 #include <QAction>
35 namespace ost { namespace gui {
36 
39  Q_OBJECT
40 public:
41 
42  SplitterPanelBar(PanelBar* parent, Qt::Orientation orientation);
44 
45  virtual bool Save(const QString& prefix);
46  virtual bool Restore(const QString& prefix);
47 
48  void WidgetMoved(Widget* widget, int position);
49  QString GetName();
50 
51 
52 private slots:
53  void SplitterMoved(int pos, int index);
54 
55 private:
56  virtual int IndexOf(Widget* widget);
57  virtual void ShowWidget(Widget* widget, int pos, bool show);
58 
59  QHBoxLayout* layout_;
60  ThinSplitter* splitter_;
61  QList<int> sizes_;
62  QList<PanelBarWidgetHolder*> widget_holders_;
63 };
64 
65 }}
66 
67 #endif
Panel Bar which may contain other Widgets A PanelBar might have different ViewModes which are PanelWi...
Definition: panel_bar.hh:53
splitter with 1 pixel wide handles.
#define DLLEXPORT_OST_GUI
A PanelWidgetContainer can display various widgets A PanelWidgetContainer is a abstract class which i...
Base class for widgets.
Definition: widget.hh:40