itom
Loading...
Searching...
No Matches
CollapsibleGroupBox Class Reference

#include <collapsibleGroupBox.h>

Inheritance diagram for CollapsibleGroupBox:

Public Member Functions

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

Protected Slots

virtual void expand (bool expand)
 

Protected Member Functions

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

Protected Attributes

QScopedPointer< CollapsibleGroupBoxPrivated_ptr
 

Properties

bool collapsed
 
int collapsedHeight
 

Private Member Functions

 Q_DECLARE_PRIVATE (CollapsibleGroupBox)
 
 Q_DISABLE_COPY (CollapsibleGroupBox)
 

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 CollapsibleGroupBox::setCollapsed(bool) When checked is true, the groupbox is expanded When checked is false, the groupbox is collapsed

Member Function Documentation

◆ collapsed()

bool CollapsibleGroupBox::collapsed ( ) const
inline

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

◆ eventFilter()

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

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

◆ expand

void CollapsibleGroupBox::expand ( bool expand)
protectedvirtualslot

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

◆ setCollapsed()

void CollapsibleGroupBox::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)

Property Documentation

◆ collapsedHeight

int CollapsibleGroupBox::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.


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