OpenWalnut
1.5.0dev
|
Widget which is a container for others. More...
#include <WUIGridWidget.h>
Public Types | |
typedef std::shared_ptr< WUIGridWidget > | SPtr |
Convenience typedef for a std::shared_ptr< WUIGridWidget >. More... | |
typedef std::shared_ptr< const WUIGridWidget > | ConstSPtr |
Convenience typedef for a std::shared_ptr< const WUIGridWidget >. 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 | ~WUIGridWidget () |
Destructor. More... | |
virtual bool | allowNesting () const |
Tell the user whether this kind of widget can be used as parent. More... | |
virtual void | placeWidget (WUIWidgetBase::SPtr widget, int x, int y) |
Place the given widget in this grid at the given coordinates. More... | |
virtual void | setRowStretch (int row, int stretch)=0 |
Sets the stretch factor of a row to stretch. More... | |
virtual void | setColumnStretch (int column, int stretch)=0 |
Sets the stretch factor of a column to stretch. 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 | |
WUIGridWidget (std::string title) | |
Default constructor. More... | |
virtual void | placeWidgetImpl (WUIWidgetBase::SPtr widget, int x, int y)=0 |
Place the given widget in this grid at the given coordinates. 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 a grid. The WUIGridWidget itself is a widget, which means you can embed grids in grid cells.
Definition at line 40 of file WUIGridWidget.h.
typedef std::shared_ptr< const WUIGridWidget > WUIGridWidget::ConstSPtr |
Convenience typedef for a std::shared_ptr< const WUIGridWidget >.
Definition at line 51 of file WUIGridWidget.h.
typedef std::shared_ptr< WUIGridWidget > WUIGridWidget::SPtr |
Convenience typedef for a std::shared_ptr< WUIGridWidget >.
Definition at line 46 of file WUIGridWidget.h.
|
virtual |
Destructor.
Definition at line 37 of file WUIGridWidget.cpp.
|
explicitprotected |
Default constructor.
Create an empty grid widget.
title | the widget title |
Definition at line 31 of file WUIGridWidget.cpp.
|
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 WUIGridWidget.cpp.
|
virtual |
Place the given widget in this grid at the given coordinates.
The widget to be placed must be created with this grid as parent or an exception will be thrown.
widget | the widget |
x | x coord ( 0 is left ) |
y | y coord ( 0 is top ) |
Definition at line 42 of file WUIGridWidget.cpp.
References placeWidgetImpl().
|
protectedpure virtual |
Place the given widget in this grid at the given coordinates.
The widget to be placed must be created with this grid as parent.
widget | the widget |
x | x coord ( 0 is left ) |
y | y coord ( 0 is top ) |
Implemented in WUIQtGridWidget.
Referenced by placeWidget().
|
pure virtual |
Sets the stretch factor of a column to stretch.
The first column is number 0. The stretch factor is relative to the other columns in this grid. Columns with a higher stretch factor take more of the available space. The default stretch factor is 0. If the stretch factor is 0 and no other column in this table can grow at all, the column may still grow.
column | the column to set this value for |
stretch | the stretch |
Implemented in WUIQtGridWidget.
|
pure virtual |
Sets the stretch factor of a row to stretch.
The first row is number 0. The stretch factor is relative to the other rows in this grid. Rows with a higher stretch factor take more of the available space. The default stretch factor is 0. If the stretch factor is 0 and no other row in this table can grow at all, the row may still grow.
row | the row to set this value for |
stretch | the stretch |
Implemented in WUIQtGridWidget.