#include <panel_manager.hh>
Inherits ost::gui::Widget.
Public Slots | |
| QMenu * | GetAvailableWidgetsMenu () |
| void | ToggleViewMode (PanelPosition pos) |
| void | MoveWidget (Widget *widget, PanelPosition pos, int index) |
| void | MoveNextTo (Widget *target, Widget *widget) |
| void | RemoveWidget (Widget *widget) |
| void | ToggleHide () |
| void | ToggleHide (PanelPosition pos) |
Public Member Functions | |
| PanelManager (QWidget *widget) | |
| ~PanelManager () | |
| virtual bool | Save (const QString &prefix) |
| virtual bool | Restore (const QString &prefix) |
| virtual void | AddWidgetToPool (const QString &class_name, int limit=-1) |
| virtual void | AddWidgetToPool (const QString &name, Widget *widget) |
| void | AddWidget (PanelPosition pos, Widget *widget, bool is_hidden=false) |
| void | AddWidgetByName (PanelPosition pos, const QString &class_name, bool is_hidden=false) |
| void | ReplaceWidget (Widget *w1, Widget *w2) |
| void | ReplaceWidget (Widget *w1, QString &class_name) |
| QMenu * | GetMenu () |
| QList< QString > | GetAvailableWidgets () |
| void | StartDrag () |
| void | EndDrag () |
Definition at line 48 of file panel_manager.hh.
| PanelManager | ( | QWidget * | widget | ) |
| ~PanelManager | ( | ) | [inline] |
Definition at line 52 of file panel_manager.hh.
| void AddWidget | ( | PanelPosition | pos, | |
| Widget * | widget, | |||
| bool | is_hidden = false | |||
| ) |
Display a Widget in a PanelBar With Method you can add a widget to the given PanelBar. The widget which finally will be added to the gui will be created from the WidgetRegistry. If the WidgetPool does not know the class name of the given widget or if there are no instances left, nothing will happen.
| pos | Indicates which PanelBar is affected | |
| widget | the widget will not directly added to the PanelBar. The class_name will be used to identify the widget in the WidgetRegistry which will return a fresh instance of this class. | |
| is_hidden | marks if the class should be displayed in the gui. Default the widget will be shown. |
| void AddWidgetByName | ( | PanelPosition | pos, | |
| const QString & | class_name, | |||
| bool | is_hidden = false | |||
| ) |
Display a Widget in a PanelBar Same as PanelManager::AddWidget(PanelPosition pos, Widget* widget, bool is_hidden).
| virtual void AddWidgetToPool | ( | const QString & | name, | |
| Widget * | widget | |||
| ) | [virtual] |
Add a widget to the widget pool.
Same as AddWidgetToPool(const QString& class_name, int limit)
| name | Name which is displayed in the gui. | |
| widget | Widget which will be added to the WidgetPool of this class and the WidgetRegistry. |
| virtual void AddWidgetToPool | ( | const QString & | class_name, | |
| int | limit = -1 | |||
| ) | [virtual] |
Add a widget to the widget pool.
The widget must already be in the WidgetRegistry. If you are not sure if the Widget is in the WidgetRegistry, use the PanelManager::AddWidgetToPool(const QString& name, Widget* widget) Method instead.
| class_name | class name of class which should be added to WidgetRegistry. | |
| limit | amount of parallel instances allowed (-1 if infinite) |
| void EndDrag | ( | ) |
End with dragging widgets This method should be called always when a drag event is over. Normally StartDrag() is called before calling this method.
| QList<QString> GetAvailableWidgets | ( | ) |
Get a List with available Widgets Get all the Widgets which have available resources in the WidgetPool.
| QMenu* GetAvailableWidgetsMenu | ( | ) | [slot] |
| QMenu* GetMenu | ( | ) |
Get Menu The GetMenu method returns a QMenu reference, which contains various actions. The action states will be updated automatically.
| void MoveWidget | ( | Widget * | widget, | |
| PanelPosition | pos, | |||
| int | index | |||
| ) | [slot] |
Move a Widget to the given Position The widget is being moved to the given position. If the widget is not in the WidgetPool or if there are no instances left nothing happens. The widget will always be visible at the new position.
| void RemoveWidget | ( | Widget * | widget | ) | [slot] |
| void ReplaceWidget | ( | Widget * | w1, | |
| QString & | class_name | |||
| ) |
Same as PanelManager::ReplaceWidget(Widget* w1, Widget* w2)
| w1 | The widget which will be replaced | |
| class_name | The class_name which from which a instance will be created and then replaces the old one. |
Replace a Widget with another Widget With this Method you can replace a Widget which is in a PanelBar with another Widget. If the Widget is not found in any of the PanelBar or there is no instance left in the pool of the second Widget nothing happens.
| w1 | The widget which will be replaced | |
| w2 | The new Widget which should replace the old one. |
| virtual bool Restore | ( | const QString & | prefix | ) | [virtual] |
Implements Widget.
| virtual bool Save | ( | const QString & | prefix | ) | [virtual] |
Implements Widget.
| void StartDrag | ( | ) |
| void ToggleHide | ( | PanelPosition | pos | ) | [slot] |
Toggle the visibility of the given Panel.
| pos | Panel which should be toggled |
| void ToggleHide | ( | ) | [slot] |
Toggle the visibility of all Panels.
| void ToggleViewMode | ( | PanelPosition | pos | ) | [slot] |
Toggle between the ViewMode 's of the Given Panel.
| pos | Panel which ViewMode should be toggled |
1.5.8