Quantum GIS API Documentation  master-ce49b66
QgsCollapsibleGroupBoxBasic Class Reference

A groupbox that collapses/expands when toggled. More...

#include <qgscollapsiblegroupbox.h>

+ Inheritance diagram for QgsCollapsibleGroupBoxBasic:
+ Collaboration diagram for QgsCollapsibleGroupBoxBasic:

List of all members.

Public Slots

void checkClicked (bool ckd)
void checkToggled (bool ckd)
void toggleCollapsed ()

Signals

void collapsedStateChanged (bool collapsed)
 Signal emitted when groupbox collapsed/expanded state is changed, and when first shown.

Public Member Functions

 QgsCollapsibleGroupBoxBasic (QWidget *parent=0)
 QgsCollapsibleGroupBoxBasic (const QString &title, QWidget *parent=0)
 ~QgsCollapsibleGroupBoxBasic ()
bool isCollapsed () const
void setCollapsed (bool collapse)
void setScrollOnExpand (bool scroll)
 set this to false to not automatically scroll parent QScrollArea to this widget's contents when expanded
void setSyncGroup (QString grp)
QString syncGroup () const
 Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key.

Protected Member Functions

void changeEvent (QEvent *event)
void clearModifiers ()
void collapseExpandFixes ()
 Visual fixes for when group box is collapsed/expanded.
void init ()
void mousePressEvent (QMouseEvent *event)
void mouseReleaseEvent (QMouseEvent *event)
void showEvent (QShowEvent *event)
QRect titleRect () const
void updateStyle ()

Protected Attributes

bool mAltDown
QgsGroupBoxCollapseButtonmCollapseButton
bool mCollapsed
bool mInitFlat
bool mInitFlatChecked
QScrollArea * mParentScrollArea
bool mScrollOnExpand
bool mShiftDown
bool mShown
QString mSyncGroup
QWidget * mSyncParent
bool mTitleClicked

Static Protected Attributes

static QIcon mCollapseIcon
static QIcon mExpandIcon

Properties

bool collapsed
QString syncGroup

Detailed Description

A groupbox that collapses/expands when toggled.

Basic class QgsCollapsibleGroupBoxBasic does not auto-save collapsed or checked state Holding Alt modifier key when toggling collapsed state will synchronize the toggling across other collapsible group boxes with the same syncGroup QString value Holding Shift modifier key when attempting to toggle collapsed state will expand current group box, then collapse any others with the same syncGroup QString value

Note:
To add Collapsible properties in promoted QtDesigner widgets, you can add the following "Dynamic properties" by clicking on the green + in the propreties palette: bool collapsed, QString syncGroup

Definition at line 71 of file qgscollapsiblegroupbox.h.


Constructor & Destructor Documentation

Definition at line 33 of file qgscollapsiblegroupbox.cpp.

References init().

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

Definition at line 39 of file qgscollapsiblegroupbox.cpp.

References init().


Member Function Documentation

void QgsCollapsibleGroupBoxBasic::changeEvent ( QEvent *  event) [protected]

Definition at line 176 of file qgscollapsiblegroupbox.cpp.

References mCollapseButton.

void QgsCollapsibleGroupBoxBasic::checkClicked ( bool  ckd) [slot]

Definition at line 221 of file qgscollapsiblegroupbox.cpp.

References isCollapsed(), and setCollapsed().

Referenced by init().

void QgsCollapsibleGroupBoxBasic::checkToggled ( bool  ckd) [slot]

Definition at line 215 of file qgscollapsiblegroupbox.cpp.

References mCollapseButton.

Referenced by init().

void QgsCollapsibleGroupBoxBasic::collapsedStateChanged ( bool  collapsed) [signal]

Signal emitted when groupbox collapsed/expanded state is changed, and when first shown.

Referenced by setCollapsed(), and showEvent().

Visual fixes for when group box is collapsed/expanded.

Definition at line 445 of file qgscollapsiblegroupbox.cpp.

References mCollapsed.

Referenced by setCollapsed().

void QgsCollapsibleGroupBoxBasic::mousePressEvent ( QMouseEvent *  event) [protected]

Definition at line 141 of file qgscollapsiblegroupbox.cpp.

References titleRect().

void QgsCollapsibleGroupBoxBasic::mouseReleaseEvent ( QMouseEvent *  event) [protected]
void QgsCollapsibleGroupBoxBasic::setScrollOnExpand ( bool  scroll) [inline]

set this to false to not automatically scroll parent QScrollArea to this widget's contents when expanded

Definition at line 91 of file qgscollapsiblegroupbox.h.

Definition at line 188 of file qgscollapsiblegroupbox.cpp.

References mCollapseButton, mSyncGroup, and tr.

QString QgsCollapsibleGroupBoxBasic::syncGroup ( ) const [inline]

Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key.

Definition at line 87 of file qgscollapsiblegroupbox.h.

Referenced by toggleCollapsed().

Definition at line 310 of file qgscollapsiblegroupbox.cpp.

References mCollapseButton, QgsDebugMsg, and titleRect().

Referenced by showEvent().


Member Data Documentation

QIcon QgsCollapsibleGroupBoxBasic::mCollapseIcon [static, protected]

Definition at line 130 of file qgscollapsiblegroupbox.h.

Referenced by init(), and setCollapsed().

QIcon QgsCollapsibleGroupBoxBasic::mExpandIcon [static, protected]

Definition at line 131 of file qgscollapsiblegroupbox.h.

Referenced by init(), and setCollapsed().

Definition at line 122 of file qgscollapsiblegroupbox.h.

Referenced by init(), setCollapsed(), and showEvent().

Definition at line 120 of file qgscollapsiblegroupbox.h.

Referenced by init(), and setCollapsed().

Definition at line 125 of file qgscollapsiblegroupbox.h.

Referenced by init(), setSyncGroup(), and toggleCollapsed().

Definition at line 124 of file qgscollapsiblegroupbox.h.

Referenced by init(), and toggleCollapsed().


Property Documentation

Reimplemented in QgsCollapsibleGroupBox.

Definition at line 75 of file qgscollapsiblegroupbox.h.

Reimplemented in QgsCollapsibleGroupBox.

Definition at line 76 of file qgscollapsiblegroupbox.h.

Referenced by toggleCollapsed().


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