CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | Properties | List of all members
ctkCollapsibleGroupBox Class Reference

#include <Libs/Widgets/ctkCollapsibleGroupBox.h>

Inheritance diagram for ctkCollapsibleGroupBox:
Inheritance graph
[legend]
Collaboration diagram for ctkCollapsibleGroupBox:
Collaboration graph
[legend]

Public Member Functions

bool collapsed () const
 
int collapsedHeight () const
 
 ctkCollapsibleGroupBox (const QString &title, QWidget *parent=0)
 
 ctkCollapsibleGroupBox (QWidget *parent=0)
 
virtual bool eventFilter (QObject *child, QEvent *e)
 
void setCollapsed (bool collapse)
 
virtual void setCollapsedHeight (int heightInPixels)
 Set the height of the collapsed box. Does not include the title height. More...
 
virtual void setVisible (bool show)
 Reimplemented for internal reasons. More...
 
virtual ~ctkCollapsibleGroupBox ()
 

Protected Slots

virtual void expand (bool expand)
 

Protected Member Functions

virtual void childEvent (QChildEvent *)
 reimplemented for internal reasons More...
 
virtual void mousePressEvent (QMouseEvent *)
 
virtual void mouseReleaseEvent (QMouseEvent *)
 
virtual void paintEvent (QPaintEvent *)
 

Protected Attributes

QScopedPointer< ctkCollapsibleGroupBoxPrivate > d_ptr
 

Properties

bool collapsed
 
int collapsedHeight
 

Detailed Description

A QGroupBox with an arrow indicator that shows/hides the groupbox contents when clicked. It responds to the slot QGroupBox::setChecked(bool) or ctkCollapsibleGroupBox::setCollapsed(bool) When checked is true, the groupbox is expanded When checked is false, the groupbox is collapsed

Definition at line 37 of file ctkCollapsibleGroupBox.h.

Constructor & Destructor Documentation

◆ ctkCollapsibleGroupBox() [1/2]

ctkCollapsibleGroupBox::ctkCollapsibleGroupBox ( QWidget *  parent = 0)

◆ ctkCollapsibleGroupBox() [2/2]

ctkCollapsibleGroupBox::ctkCollapsibleGroupBox ( const QString &  title,
QWidget *  parent = 0 
)

◆ ~ctkCollapsibleGroupBox()

virtual ctkCollapsibleGroupBox::~ctkCollapsibleGroupBox ( )
virtual

Member Function Documentation

◆ childEvent()

virtual void ctkCollapsibleGroupBox::childEvent ( QChildEvent *  )
protectedvirtual

reimplemented for internal reasons

◆ collapsed()

bool ctkCollapsibleGroupBox::collapsed ( ) const
inline

Return the collapse state of the groupbox true if the groupbox is collapsed (closed), false if it is expanded(open)

Definition at line 94 of file ctkCollapsibleGroupBox.h.

◆ collapsedHeight()

int ctkCollapsibleGroupBox::collapsedHeight ( ) const

◆ eventFilter()

virtual bool ctkCollapsibleGroupBox::eventFilter ( QObject *  child,
QEvent *  e 
)
virtual

Reimplemented for internal reasons Catch when a child widget's visibility is externally changed

◆ expand

virtual void ctkCollapsibleGroupBox::expand ( bool  expand)
protectedvirtualslot

called when the arrow indicator is clicked users can call it programatically by calling setChecked(bool)

◆ mousePressEvent()

virtual void ctkCollapsibleGroupBox::mousePressEvent ( QMouseEvent *  )
protectedvirtual

◆ mouseReleaseEvent()

virtual void ctkCollapsibleGroupBox::mouseReleaseEvent ( QMouseEvent *  )
protectedvirtual

◆ paintEvent()

virtual void ctkCollapsibleGroupBox::paintEvent ( QPaintEvent *  )
protectedvirtual

◆ setCollapsed()

void ctkCollapsibleGroupBox::setCollapsed ( bool  collapse)
inline

Utility function to collapse the groupbox Collapse(close) the group box if collapse is true, expand(open) it otherwise.

See also
QGroupBox::setChecked(bool)

Definition at line 100 of file ctkCollapsibleGroupBox.h.

◆ setCollapsedHeight()

virtual void ctkCollapsibleGroupBox::setCollapsedHeight ( int  heightInPixels)
virtual

Set the height of the collapsed box. Does not include the title height.

◆ setVisible()

virtual void ctkCollapsibleGroupBox::setVisible ( bool  show)
virtual

Reimplemented for internal reasons.

Member Data Documentation

◆ d_ptr

QScopedPointer<ctkCollapsibleGroupBoxPrivate> ctkCollapsibleGroupBox::d_ptr
protected

Definition at line 78 of file ctkCollapsibleGroupBox.h.

Property Documentation

◆ collapsed

bool ctkCollapsibleGroupBox::collapsed
readwrite

Definition at line 100 of file ctkCollapsibleGroupBox.h.

◆ collapsedHeight

int ctkCollapsibleGroupBox::collapsedHeight
readwrite

This property holds the height in pixels of the contents (excludes the title) when the box is collapsed. 14px by default, it is the smallest height that fit Mac Style.

Definition at line 100 of file ctkCollapsibleGroupBox.h.


The documentation for this class was generated from the following file: