![]() |
CTK
0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
|
#include <Libs/Widgets/ctkFlowLayout.h>
Public Types | |
typedef QLayout | Superclass |
Public Member Functions | |
virtual void | addItem (QLayoutItem *item) |
Reimplemented for internal reasons. More... | |
bool | alignItems () const |
virtual int | count () const |
ctkFlowLayout () | |
ctkFlowLayout (Qt::Orientation orientation, QWidget *parent=0) | |
ctkFlowLayout (QWidget *parent) | |
virtual Qt::Orientations | expandingDirections () const |
virtual bool | hasHeightForWidth () const |
virtual bool | hasWidthForHeight () const |
virtual int | heightForWidth (int) const |
int | horizontalSpacing () const |
virtual QLayoutItem * | itemAt (int index) const |
virtual QSize | minimumSize () const |
Qt::Orientation | orientation () const |
Qt::Orientations | preferredExpandingDirections () const |
void | setAlignItems (bool) |
virtual void | setGeometry (const QRect &rect) |
void | setHorizontalSpacing (int) |
void | setOrientation (Qt::Orientation orientation) |
void | setPreferredExpandingDirections (Qt::Orientations directions) |
void | setVerticalSpacing (int) |
virtual QSize | sizeHint () const |
virtual QLayoutItem * | takeAt (int index) |
int | verticalSpacing () const |
virtual int | widthForHeight (int) const |
virtual | ~ctkFlowLayout () |
Static Public Member Functions | |
static ctkFlowLayout * | replaceLayout (QWidget *widget) |
Protected Attributes | |
QScopedPointer< ctkFlowLayoutPrivate > | d_ptr |
Properties | |
bool | alignItems |
int | horizontalSpacing |
Qt::Orientation | orientation |
Qt::Orientations | preferredExpandingDirections |
int | verticalSpacing |
Acts like a QBoxLayout but if the space is horizontally/vertically limited, it displays items ona a new row/column based on the orientation. Please note that using a Qt::Vertical orientation without the property alignItems set to true might result to weird layout behavior.
Definition at line 36 of file ctkFlowLayout.h.
typedef QLayout ctkFlowLayout::Superclass |
Definition at line 76 of file ctkFlowLayout.h.
|
explicit |
|
explicit |
|
explicit |
|
virtual |
|
virtual |
Reimplemented for internal reasons.
bool ctkFlowLayout::alignItems | ( | ) | const |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
When the orientation is Qt::Vertical, heightForWidth doesn't work correctly with ctkFlowLayout. Ideally widthForHeight should be used instead.
|
virtual |
int ctkFlowLayout::horizontalSpacing | ( | ) | const |
|
virtual |
|
virtual |
Qt::Orientation ctkFlowLayout::orientation | ( | ) | const |
Qt::Orientations ctkFlowLayout::preferredExpandingDirections | ( | ) | const |
|
static |
Replace the existing BoxLayout of the widget with a flow layout. When using the Designer, it is not possible to use a flow layout. Instead, you can use a H/VBoxLayout and replace it programatically in the setupUi() function with a flow layout. replaceLayout() makes the operation easier.
void ctkFlowLayout::setAlignItems | ( | bool | ) |
|
virtual |
void ctkFlowLayout::setHorizontalSpacing | ( | int | ) |
void ctkFlowLayout::setOrientation | ( | Qt::Orientation | orientation | ) |
void ctkFlowLayout::setPreferredExpandingDirections | ( | Qt::Orientations | directions | ) |
void ctkFlowLayout::setVerticalSpacing | ( | int | ) |
|
virtual |
|
virtual |
int ctkFlowLayout::verticalSpacing | ( | ) | const |
|
virtual |
|
protected |
Definition at line 127 of file ctkFlowLayout.h.
|
readwrite |
Force the items to be horizontally aligned based on the largest item to display. True by default.
Definition at line 1 of file ctkFlowLayout.h.
|
readwrite |
Horizontal space between items, if the spacing is <0, a default spacing set on the parent/style is used. -1 by default.
Definition at line 1 of file ctkFlowLayout.h.
|
readwrite |
If orientation is Qt::Horizontal, items are layed out from left to right then top to bottom if there is no more horizontal space. If orientation is Qt::Vertical, items are layed out from top to bottom then left to right if there is no more vertical space. Qt::Horizontal by default
Definition at line 1 of file ctkFlowLayout.h.
|
readwrite |
Indicates how the size hint of the layout should behave. The preferred expanding direction can be different than the orientation of the layout. It can be a combination of Qt::Horizontal and Qt::Vertical, in that case the layout will try to expand in a square shape (evenly distribute the number of rows and columns). Qt::Horizontal | Qt::Vertical by default.
Definition at line 1 of file ctkFlowLayout.h.
|
readwrite |
Vertical space between items, if the spacing is <0, a default spacing set on the parent/style is used. -1 by default.
Definition at line 1 of file ctkFlowLayout.h.