![]() |
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/ctkCollapsibleButton.h>
Signals | |
void | contentsCollapsed (bool) |
Public Member Functions | |
Qt::Alignment | buttonTextAlignment () const |
bool | collapsed () const |
int | collapsedHeight () const |
QFrame::Shadow | contentsFrameShadow () const |
QFrame::Shape | contentsFrameShape () const |
int | contentsLineWidth () const |
int | contentsMidLineWidth () const |
ctkCollapsibleButton (const QString &text, QWidget *parent=0) | |
ctkCollapsibleButton (QWidget *parent=0) | |
virtual bool | event (QEvent *event) |
virtual bool | eventFilter (QObject *child, QEvent *e) |
Qt::Alignment | indicatorAlignment () const |
bool | isFlat () const |
virtual QSize | minimumSizeHint () const |
void | setButtonTextAlignment (Qt::Alignment textAlignment) |
void | setCollapsed (bool) |
void | setCollapsedHeight (int heightInPixels) |
void | setContentsFrameShadow (QFrame::Shadow) |
void | setContentsFrameShape (QFrame::Shape) |
void | setContentsLineWidth (int) |
void | setContentsMidLineWidth (int) |
void | setFlat (bool flat) |
void | setIndicatorAlignment (Qt::Alignment indicatorAlignment) |
virtual void | setVisible (bool) |
virtual QSize | sizeHint () const |
virtual | ~ctkCollapsibleButton () |
Protected Slots | |
virtual void | collapse (bool c) |
virtual void | onToggled (bool clicked=false) |
Protected Member Functions | |
virtual QSize | buttonSizeHint () const |
Compute the size hint of the head button only. The sizehint depends on the text. More... | |
virtual void | childEvent (QChildEvent *c) |
virtual bool | hitButton (const QPoint &pos) const |
virtual void | initStyleOption (QStyleOptionButton *option) const |
virtual void | paintEvent (QPaintEvent *) |
Protected Attributes | |
QScopedPointer< ctkCollapsibleButtonPrivate > | d_ptr |
Properties | |
Qt::Alignment | buttonTextAlignment |
bool | collapsed |
int | collapsedHeight |
QFrame::Shadow | contentsFrameShadow |
QFrame::Shape | contentsFrameShape |
int | contentsLineWidth |
int | contentsMidLineWidth |
bool | flat |
Qt::Alignment | indicatorAlignment |
A collapsible button that shows/hides its children depending on its checked/collapsed property. Warning: <old behavior> As ctkCollapsibleButton forces the Visiblity of its children to true when it get expanded, any child Visibility property is lost. All the widgets will then be visible. To avoid this behavior, use an intermediate widget that contains all the children (they would become grandchildren and their Visibility property will remain relative to their parent, ctkCollapsibleButton's unique child widget.</old behavior> Note: The user QAbstractButton::icon is not visible (it's placeholder is used to display the collapsible state
Definition at line 45 of file ctkCollapsibleButton.h.
ctkCollapsibleButton::ctkCollapsibleButton | ( | QWidget * | parent = 0 | ) |
ctkCollapsibleButton::ctkCollapsibleButton | ( | const QString & | text, |
QWidget * | parent = 0 |
||
) |
|
virtual |
|
protectedvirtual |
Compute the size hint of the head button only. The sizehint depends on the text.
Qt::Alignment ctkCollapsibleButton::buttonTextAlignment | ( | ) | const |
|
protectedvirtual |
|
protectedvirtualslot |
Perform the collapse.
bool ctkCollapsibleButton::collapsed | ( | ) | const |
int ctkCollapsibleButton::collapsedHeight | ( | ) | const |
|
signal |
Signal emitted when the widget is collapsed or expanded. See signal toggled(bool) for the opposite.
QFrame::Shadow ctkCollapsibleButton::contentsFrameShadow | ( | ) | const |
Set the frame shadow of the contents Hint: Raised is probably the shadow you are looking for
QFrame::Shape ctkCollapsibleButton::contentsFrameShape | ( | ) | const |
Set the frame shape of the contents Hint: StyledPanel is probably the shape you are looking for
int ctkCollapsibleButton::contentsLineWidth | ( | ) | const |
Set the line width of the frame around the contents
int ctkCollapsibleButton::contentsMidLineWidth | ( | ) | const |
Set the mid line width of the frame around the contents
|
virtual |
Reimplemented to update the size of the button in case of font/style change
|
virtual |
Reimplemented for internal reasons Catch when a child widget's visibility is externally changed
|
protectedvirtual |
Qt::Alignment ctkCollapsibleButton::indicatorAlignment | ( | ) | const |
|
protectedvirtual |
Initialize option with the values from this ctkCollapsibleButton. This method is useful for subclasses when they need a QStyleOptionButton, but don't want to fill in all the information themselves.
|
virtual |
Reimplemented for internal reasons
|
protectedvirtualslot |
|
protectedvirtual |
void ctkCollapsibleButton::setButtonTextAlignment | ( | Qt::Alignment | textAlignment | ) |
Set the alignment of the text on the button, Qt::AlignLeft|Qt::AlignVCenter by default.
void ctkCollapsibleButton::setCollapsed | ( | bool | ) |
Property that describes if the widget is collapsed or not. When collapsed, the children are invisible and the widget has a sized defined by CollapsedHeight
void ctkCollapsibleButton::setCollapsedHeight | ( | int | heightInPixels | ) |
void ctkCollapsibleButton::setContentsFrameShadow | ( | QFrame::Shadow | ) |
void ctkCollapsibleButton::setContentsFrameShape | ( | QFrame::Shape | ) |
void ctkCollapsibleButton::setContentsLineWidth | ( | int | ) |
void ctkCollapsibleButton::setContentsMidLineWidth | ( | int | ) |
void ctkCollapsibleButton::setIndicatorAlignment | ( | Qt::Alignment | indicatorAlignment | ) |
Set the alignment of the indicator (arrow) on the button, Qt::AlignLeft|Qt::AlignVCenter by default.
|
virtual |
Reimplemented for internal reasons Don't process Show/Hide events of children when it is ctkCollapsibleButton that generate them.
|
virtual |
Reimplemented for internal reasons
|
protected |
Definition at line 175 of file ctkCollapsibleButton.h.
|
readwrite |
Definition at line 1 of file ctkCollapsibleButton.h.
|
readwrite |
Definition at line 1 of file ctkCollapsibleButton.h.
|
readwrite |
This property holds the height in pixels of the contents (excludes the button) when the button is collapsed. 14 pixels by default (same as ctkCollapsibleGroupBox)
Definition at line 1 of file ctkCollapsibleButton.h.
|
readwrite |
Definition at line 1 of file ctkCollapsibleButton.h.
|
readwrite |
Definition at line 1 of file ctkCollapsibleButton.h.
|
readwrite |
Definition at line 1 of file ctkCollapsibleButton.h.
|
readwrite |
Definition at line 1 of file ctkCollapsibleButton.h.
|
readwrite |
This property holds whether the button border is raised. This property's default is false. If this property is set, most styles will not pain the button background unless the button is being pressed.
Definition at line 1 of file ctkCollapsibleButton.h.
|
readwrite |
Definition at line 1 of file ctkCollapsibleButton.h.