OpenWalnut
1.5.0dev
|
Widget which is a container for others. More...
#include <WUITabbedWidget.h>
Public Types | |
enum | TabPosition { North = 0 , South , West , East } |
Tab positions. More... | |
typedef std::shared_ptr< WUITabbedWidget > | SPtr |
Convenience typedef for a std::shared_ptr< WUITabbedWidget >. More... | |
typedef std::shared_ptr< const WUITabbedWidget > | ConstSPtr |
Convenience typedef for a std::shared_ptr< const WUITabbedWidget >. More... | |
Public Types inherited from WUIWidgetBase | |
typedef std::shared_ptr< WUIWidgetBase > | SPtr |
Convenience typedef for a std::shared_ptr< WUIWidgetBase >. More... | |
typedef std::shared_ptr< const WUIWidgetBase > | ConstSPtr |
Convenience typedef for a std::shared_ptr< const WUIWidgetBase >. More... | |
Public Member Functions | |
virtual | ~WUITabbedWidget () |
Destructor. More... | |
virtual bool | allowNesting () const |
Tell the user whether this kind of widget can be used as parent. More... | |
virtual void | setTabText (int index, const std::string &label)=0 |
Set label of the tab with given index. More... | |
virtual void | setActiveTab (int index)=0 |
Set the given tab active. More... | |
virtual int | getActiveTab () const =0 |
Get the index of the currently active tab. More... | |
virtual int | getNumTabs () const =0 |
Query the number of tabs. More... | |
virtual void | setTabToolTip (int index, const std::string &tip)=0 |
Write some tool tip for a given tab. More... | |
virtual void | setTabEnabled (int index, bool enable)=0 |
Allows en/disabling a tab. More... | |
virtual void | setTabPosition (TabPosition position)=0 |
Specify where to place the tabs. More... | |
virtual int | addTab (WUIWidgetBase::SPtr widget, const std::string &label) |
Place the given widget in this tab widget in a new tab with a given label. More... | |
Public Member Functions inherited from WUIWidgetBase | |
virtual | ~WUIWidgetBase () |
Destructor. More... | |
virtual std::string | getTitle () const |
Get the title of the widget. More... | |
virtual void | show ()=0 |
Show this widget if not yet visible. More... | |
virtual void | setVisible (bool visible=true)=0 |
Hide/show this widget. More... | |
virtual bool | isVisible () const =0 |
Check if the widget is hidden or not. More... | |
void | close () |
Close the widget. More... | |
bool | isClosed () const |
Checks whether the widget was closed already. More... | |
WCondition::SPtr | getCloseCondition () const |
Return the condition that fires when the widgets closes. More... | |
virtual WUIWidgetBase::SPtr | getParent () const |
Get the parent widget of this widget if any. More... | |
virtual void | addAction (WPropGroup group, WGEImage::SPtr icon=WGEImage::SPtr())=0 |
Define a property as action. More... | |
virtual void | addAction (WPropTrigger trigger, WGEImage::SPtr icon=WGEImage::SPtr())=0 |
Define a property as action. More... | |
virtual void | addAction (WPropBool toggle, WGEImage::SPtr icon=WGEImage::SPtr())=0 |
Define a property as action. More... | |
Protected Member Functions | |
WUITabbedWidget (std::string title) | |
Default constructor. More... | |
virtual int | addTabImpl (WUIWidgetBase::SPtr widget, std::string label)=0 |
Place the given widget in this tab widget in a new tab with a given label. More... | |
Protected Member Functions inherited from WUIWidgetBase | |
WUIWidgetBase (std::string title) | |
Default constructor. More... | |
virtual void | closeImpl ()=0 |
Close the widget. More... | |
virtual void | setParent (WUIWidgetBase::SPtr parent) |
Set the parent of this WUI widget. More... | |
virtual void | registerChild (WUIWidgetBase::SPtr child) |
Register widget as child. More... | |
ChildContainer & | getChildren () |
Return the list of children. More... | |
const ChildContainer & | getChildren () const |
Return the list of children. More... | |
void | closeChildren () |
Comfortable function to recurse a close call. More... | |
Additional Inherited Members | |
Protected Types inherited from WUIWidgetBase | |
typedef WSharedSequenceContainer< std::vector< WUIWidgetBase::SPtr > > | ChildContainer |
Keep track of our child widgets. More... | |
Widget which is a container for others.
The child widgets can be arranged in tabs. The WUITabbedWidget itself is a widget, which means you can embed tabs in other container widgets (like grids).
Definition at line 40 of file WUITabbedWidget.h.
typedef std::shared_ptr< const WUITabbedWidget > WUITabbedWidget::ConstSPtr |
Convenience typedef for a std::shared_ptr< const WUITabbedWidget >.
Definition at line 51 of file WUITabbedWidget.h.
typedef std::shared_ptr< WUITabbedWidget > WUITabbedWidget::SPtr |
Convenience typedef for a std::shared_ptr< WUITabbedWidget >.
Definition at line 46 of file WUITabbedWidget.h.
Tab positions.
Enumerator | |
---|---|
North | The tabs are drawn above the pages. |
South | The tabs are drawn below the pages. |
West | The tabs are drawn to the left of the pages. |
East | The tabs are drawn to the right of the pages. |
Definition at line 113 of file WUITabbedWidget.h.
|
virtual |
Destructor.
Definition at line 37 of file WUITabbedWidget.cpp.
|
explicitprotected |
Default constructor.
Create an empty grid widget.
title | the widget title |
Definition at line 31 of file WUITabbedWidget.cpp.
|
virtual |
Place the given widget in this tab widget in a new tab with a given label.
The widget to be placed must be created with this tab widget as parent or an exception will be thrown.
widget | the widget |
label | the label of the tab |
Definition at line 42 of file WUITabbedWidget.cpp.
References addTabImpl().
|
protectedpure virtual |
Place the given widget in this tab widget in a new tab with a given label.
The widget to be placed must be created with this tab widget as parent or an exception will be thrown.
widget | the widget |
label | the label of the tab |
Implemented in WUIQtTabbedWidget.
Referenced by addTab().
|
virtual |
Tell the user whether this kind of widget can be used as parent.
In other word, whether it is allowed to nest other widgets into this one.
Reimplemented from WUIWidgetBase.
Definition at line 51 of file WUITabbedWidget.cpp.
|
pure virtual |
Get the index of the currently active tab.
Implemented in WUIQtTabbedWidget.
|
pure virtual |
Query the number of tabs.
Implemented in WUIQtTabbedWidget.
|
pure virtual |
Set the given tab active.
If it not exists, the current tab stays active.
index | the index of the tab |
Implemented in WUIQtTabbedWidget.
|
pure virtual |
Allows en/disabling a tab.
If the index is invalid, nothing happens.
index | the index. |
enable | true to enable |
Implemented in WUIQtTabbedWidget.
|
pure virtual |
|
pure virtual |
Set label of the tab with given index.
If the tab does not exist, nothing happens.
index | the index of the tab |
label | the label of the tab |
Implemented in WUIQtTabbedWidget.
|
pure virtual |
Write some tool tip for a given tab.
If the index is invalid, nothing happens.
index | the tab index |
tip | the tooltip text |
Implemented in WUIQtTabbedWidget.