19 #ifndef OST_GUI_PANEL_BAR_PANEL_BAR
20 #define OST_GUI_PANEL_BAR_PANEL_BAR
31 #include <QStackedLayout>
35 #include <QActionGroup>
36 namespace ost {
namespace gui {
38 class PanelWidgetContainer;
59 virtual bool Save(
const QString& prefix);
60 virtual bool Restore(
const QString& prefix);
66 virtual void AddWidget(
Widget* widget,
bool hidden);
75 QMenu* GetViewModeMenu();
81 int GetIndex(
Widget* widget);
93 QAction* GetShowAction();
101 void InsertWidget(
Widget * widget,
int index,
bool is_hidden=
false);
104 void ToggleViewMode();
112 void RemoveWidget(
Widget* widget);
115 void ChangeViewMode(QAction*
action);
116 void ToggleVisibility(
Widget*);
117 void ShowActionTrigger();
118 void SetViewMode(
int index);
122 QStackedLayout* layout_;
123 QActionGroup* view_modes_;
124 QMenu* view_mode_menu_;
126 QList<WidgetState> widget_states_;
128 QAction* show_action_;