#include <panel_bar.hh>
Inherits Widget.
Inherited by BottomBar, and SideBar.
Panel Bar which may contain other Widgets A PanelBar might have different ViewModes which are PanelWidgetContainer classes. Per default a PanelWidgetContainer has no ViewMode therefore first of all a view mode must be added. Otherwise nothing will be displayed. The ViewMode is responsible for how the widget is displayed. This class keeps only track about the order of the added widgets and the ViewModes.
Definition at line 53 of file panel_bar.hh.
◆ PanelBar()
◆ ~PanelBar()
◆ AddViewMode()
◆ AddWidget()
virtual void AddWidget |
( |
Widget * |
widget, |
|
|
bool |
hidden |
|
) |
| |
|
virtual |
Add a widget to this widget Puts a widget at the end of the current PanelWidgetContainer.
- Parameters
-
widget | Which should be added |
hidden | if this is true widget will not be shown |
◆ DragEnter()
◆ EndDrag()
◆ GetIndex()
int GetIndex |
( |
Widget * |
widget | ) |
|
Get the index of a given widget The index of a widget is the position number. This method can be used to get the position of a widget within the PanelBar.
- Parameters
-
widget | get index of this widget |
- Returns
- index of the given widget -1 if Widget is not found.
◆ GetShowAction()
QAction* GetShowAction |
( |
| ) |
|
Get action which changes the visibility of this widget The returned action can be used for example in a MenuBar to allow hiding / showing this class.
- Returns
- QAction that can change the visibility of this widget
◆ GetViewModeMenu()
QMenu* GetViewModeMenu |
( |
| ) |
|
Get QMenu with view modes The returned menu can be used for exmaple in the menubar to allow the user choose the view mode.
- Returns
- QMenu with all added view modes as actions.
◆ InsertWidget
void InsertWidget |
( |
Widget * |
widget, |
|
|
int |
index, |
|
|
bool |
is_hidden = false |
|
) |
| |
|
slot |
This slot adds a given widget at the given position The Widget will be added at the given index. If the widget is already in this panel, it will be moved to the given index.
- Parameters
-
widget | Which should be inserted |
index | the position where the widget will be inserted |
is_hidden | marks if the widget will be inserted hidden or visible. true = widget is visible. |
◆ RemoveWidget
void RemoveWidget |
( |
Widget * |
widget | ) |
|
|
slot |
Remove a Widget The widget will be removed if it is in this PanelBar.
- Parameters
-
widget | which should be removed |
◆ Restore()
virtual bool Restore |
( |
const QString & |
prefix | ) |
|
|
virtual |
◆ Save()
virtual bool Save |
( |
const QString & |
prefix | ) |
|
|
virtual |
◆ ToggleHide
Toggle the visibility of all Panels.
◆ ToggleViewMode
Change to the next view mode This method changes the view mode to the next view mode. If the view mode reaches the end of the list, the first one will be displayed.
The documentation for this class was generated from the following file: