Signals | Public Member Functions | Protected Slots | Protected Member Functions | Properties

ctkCollapsibleButton Class Reference

#include <Libs/Widgets/ctkCollapsibleButton.h>

List of all members.

Signals

void contentsCollapsed (bool)

Public Member Functions

bool collapsed () const
int collapsedHeight () const
QFrame::Shadow contentsFrameShadow () const
QFrame::Shape contentsFrameShape () const
int contentsLineWidth () const
int contentsMidLineWidth () const
 ctkCollapsibleButton (QWidget *parent=0)
 ctkCollapsibleButton (const QString &text, QWidget *parent=0)
virtual QSize minimumSizeHint () const
void setCollapsed (bool)
void setCollapsedHeight (int)
void setContentsFrameShadow (QFrame::Shadow)
void setContentsFrameShape (QFrame::Shape)
void setContentsLineWidth (int)
void setContentsMidLineWidth (int)
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.
virtual void childEvent (QChildEvent *c)
virtual bool hitButton (const QPoint &pos) const
virtual void initStyleOption (QStyleOptionButton *option) const
virtual void paintEvent (QPaintEvent *)

Properties

bool collapsed
int collapsedHeight
QFrame::Shadow contentsFrameShadow
QFrame::Shape contentsFrameShape
int contentsLineWidth
int contentsMidLineWidth

Detailed Description

Description A Collapsible widget that show/hide its children depending on its checked/collapsed properties

Definition at line 37 of file ctkCollapsibleButton.h.


Constructor & Destructor Documentation

ctkCollapsibleButton::ctkCollapsibleButton ( QWidget *  parent = 0  ) 

Definition at line 120 of file ctkCollapsibleButton.cpp.

ctkCollapsibleButton::ctkCollapsibleButton ( const QString &  text,
QWidget *  parent = 0 
)

Definition at line 128 of file ctkCollapsibleButton.cpp.

ctkCollapsibleButton::~ctkCollapsibleButton (  )  [virtual]

Definition at line 137 of file ctkCollapsibleButton.cpp.


Member Function Documentation

QSize ctkCollapsibleButton::buttonSizeHint (  )  const [protected, virtual]

Compute the size hint of the head button only. The sizehint depends on the text.

Definition at line 281 of file ctkCollapsibleButton.cpp.

void ctkCollapsibleButton::childEvent ( QChildEvent *  c  )  [protected, virtual]

Definition at line 477 of file ctkCollapsibleButton.cpp.

void ctkCollapsibleButton::collapse ( bool  c  )  [protected, virtual, slot]

Perform the collapse.

Definition at line 182 of file ctkCollapsibleButton.cpp.

bool ctkCollapsibleButton::collapsed (  )  const
int ctkCollapsibleButton::collapsedHeight (  )  const
void ctkCollapsibleButton::contentsCollapsed ( bool   )  [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

bool ctkCollapsibleButton::hitButton ( const QPoint &  pos  )  const [protected, virtual]

Definition at line 469 of file ctkCollapsibleButton.cpp.

void ctkCollapsibleButton::initStyleOption ( QStyleOptionButton *  option  )  const [protected, virtual]

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.

Definition at line 89 of file ctkCollapsibleButton.cpp.

QSize ctkCollapsibleButton::minimumSizeHint (  )  const [virtual]

Reimplement for internal reasons

Definition at line 318 of file ctkCollapsibleButton.cpp.

void ctkCollapsibleButton::onToggled ( bool  clicked = false  )  [protected, virtual, slot]

Definition at line 173 of file ctkCollapsibleButton.cpp.

void ctkCollapsibleButton::paintEvent ( QPaintEvent *  _event  )  [protected, virtual]

Definition at line 351 of file ctkCollapsibleButton.cpp.

void ctkCollapsibleButton::setCollapsed ( bool  c  ) 

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

Definition at line 142 of file ctkCollapsibleButton.cpp.

void ctkCollapsibleButton::setCollapsedHeight ( int  h  ) 

Height used when the widget is collapsed

Definition at line 160 of file ctkCollapsibleButton.cpp.

void ctkCollapsibleButton::setContentsFrameShadow ( QFrame::Shadow  s  ) 

Definition at line 251 of file ctkCollapsibleButton.cpp.

void ctkCollapsibleButton::setContentsFrameShape ( QFrame::Shape  s  ) 

Definition at line 239 of file ctkCollapsibleButton.cpp.

void ctkCollapsibleButton::setContentsLineWidth ( int  w  ) 

Definition at line 263 of file ctkCollapsibleButton.cpp.

void ctkCollapsibleButton::setContentsMidLineWidth ( int  w  ) 

Definition at line 275 of file ctkCollapsibleButton.cpp.

QSize ctkCollapsibleButton::sizeHint (  )  const [virtual]

Reimplement for internal reasons

Definition at line 336 of file ctkCollapsibleButton.cpp.


Property Documentation

bool ctkCollapsibleButton::collapsed [read, write]

Definition at line 40 of file ctkCollapsibleButton.h.

int ctkCollapsibleButton::collapsedHeight [read, write]

Definition at line 41 of file ctkCollapsibleButton.h.

QFrame::Shadow ctkCollapsibleButton::contentsFrameShadow [read, write]

Definition at line 44 of file ctkCollapsibleButton.h.

QFrame::Shape ctkCollapsibleButton::contentsFrameShape [read, write]

Definition at line 43 of file ctkCollapsibleButton.h.

int ctkCollapsibleButton::contentsLineWidth [read, write]

Definition at line 45 of file ctkCollapsibleButton.h.

int ctkCollapsibleButton::contentsMidLineWidth [read, write]

Definition at line 46 of file ctkCollapsibleButton.h.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines