PanelBar Class Reference

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. More...

#include <panel_bar.hh>

Inherits ost::gui::Widget.

Inherited by BottomBar, and SideBar.

Public Slots

void InsertWidget (Widget *widget, int index, bool is_hidden=false)
void ToggleViewMode ()
void ToggleHide ()
void RemoveWidget (Widget *widget)

Public Member Functions

 PanelBar (QWidget *parent)
virtual ~PanelBar ()
virtual bool Save (const QString &prefix)
virtual bool Restore (const QString &prefix)
virtual void AddWidget (Widget *widget, bool hidden)
void AddViewMode (PanelWidgetContainer *pwc)
QMenu * GetViewModeMenu ()
int GetIndex (Widget *widget)
void DragEnter ()
void EndDrag ()
QAction * GetShowAction ()

Detailed Description

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.


Constructor & Destructor Documentation

PanelBar ( QWidget *  parent  ) 
virtual ~PanelBar (  )  [virtual]

Member Function Documentation

void AddViewMode ( PanelWidgetContainer pwc  ) 
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
void DragEnter (  ) 

Begin with dragging widgets This method is called by the PanelManager class. Read more about this method at PanelManager::StartDrag() .

void EndDrag (  ) 

Stop dragging widgets This method is called by the PanelManager class. Read more about this method at PanelManager::EndDrag() .

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.
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
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.
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.
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
virtual bool Restore ( const QString &  prefix  )  [virtual]

Implements Widget.

virtual bool Save ( const QString &  prefix  )  [virtual]

Implements Widget.

void ToggleHide (  )  [slot]

Toggle the visibility of all Panels.

void ToggleViewMode (  )  [slot]

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:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 1 Mar 2018 for OpenStructure by  doxygen 1.6.1