OpenStructure
Loading...
Searching...
No Matches
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-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_SPLITTER_PANEL_BAR
20#define OST_GUI_SPLITTER_PANEL_BAR
21
22
25#include <ost/gui/widget.hh>
27
30
31#include <QHBoxLayout>
32#include <QWidget>
33#include <QString>
34#include <QAction>
35namespace ost { namespace gui {
36
39 Q_OBJECT
40public:
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
52private slots:
53 void SplitterMoved(int pos, int index);
54
55private:
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
A PanelWidgetContainer can display various widgets A PanelWidgetContainer is a abstract class which i...
virtual bool Save(const QString &prefix)
QString GetName()
Get readable name This method must return a QString which identifies this WidgetContainer....
void WidgetMoved(Widget *widget, int position)
move widget to given position Move the given widget to the index position.
SplitterPanelBar(PanelBar *parent, Qt::Orientation orientation)
virtual bool Restore(const QString &prefix)
splitter with 1 pixel wide handles.
Base class for widgets.
Definition widget.hh:40
#define DLLEXPORT_OST_GUI
Definition base.dox:1