QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Properties | List of all members
QgsCollapsibleGroupBoxBasic Class Reference

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

#include <qgscollapsiblegroupbox.h>

Inheritance diagram for QgsCollapsibleGroupBoxBasic:
Inheritance graph
[legend]

Public Slots

void checkToggled (bool ckd)
void checkClicked (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)
QString syncGroup () const
 Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key.
void setSyncGroup (QString grp)
void setScrollOnExpand (bool scroll)
 set this to false to not automatically scroll parent QScrollArea to this widget's contents when expanded
bool scrollOnExpand ()

Protected Member Functions

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

Protected Attributes

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

Static Protected Attributes

static QIcon mCollapseIcon
static QIcon mExpandIcon

Properties

bool collapsed
QString syncGroup
bool scrollOnExpand

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

Constructor & Destructor Documentation

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

Member Function Documentation

void QgsCollapsibleGroupBoxBasic::changeEvent ( QEvent *  event)
protected
void QgsCollapsibleGroupBoxBasic::checkClicked ( bool  ckd)
slot
void QgsCollapsibleGroupBoxBasic::checkToggled ( bool  ckd)
slot
void QgsCollapsibleGroupBoxBasic::clearModifiers ( )
protected
void QgsCollapsibleGroupBoxBasic::collapsedStateChanged ( bool  collapsed)
signal

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

void QgsCollapsibleGroupBoxBasic::collapseExpandFixes ( )
protected

Visual fixes for when group box is collapsed/expanded.

void QgsCollapsibleGroupBoxBasic::init ( )
protected

Reimplemented in QgsCollapsibleGroupBox.

bool QgsCollapsibleGroupBoxBasic::isCollapsed ( ) const
inline
void QgsCollapsibleGroupBoxBasic::mousePressEvent ( QMouseEvent *  event)
protected
void QgsCollapsibleGroupBoxBasic::mouseReleaseEvent ( QMouseEvent *  event)
protected
bool QgsCollapsibleGroupBoxBasic::scrollOnExpand ( )
inline
void QgsCollapsibleGroupBoxBasic::setCollapsed ( bool  collapse)
void QgsCollapsibleGroupBoxBasic::setScrollOnExpand ( bool  scroll)
inline

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

void QgsCollapsibleGroupBoxBasic::setSyncGroup ( QString  grp)
void QgsCollapsibleGroupBoxBasic::showEvent ( QShowEvent *  event)
protected

Reimplemented in QgsCollapsibleGroupBox.

QString QgsCollapsibleGroupBoxBasic::syncGroup ( ) const
inline

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

QRect QgsCollapsibleGroupBoxBasic::titleRect ( ) const
protected
void QgsCollapsibleGroupBoxBasic::toggleCollapsed ( )
slot
void QgsCollapsibleGroupBoxBasic::updateStyle ( )
protected

Member Data Documentation

bool QgsCollapsibleGroupBoxBasic::mAltDown
protected
QgsGroupBoxCollapseButton* QgsCollapsibleGroupBoxBasic::mCollapseButton
protected
bool QgsCollapsibleGroupBoxBasic::mCollapsed
protected
QIcon QgsCollapsibleGroupBoxBasic::mCollapseIcon
staticprotected
QIcon QgsCollapsibleGroupBoxBasic::mExpandIcon
staticprotected
bool QgsCollapsibleGroupBoxBasic::mInitFlat
protected
bool QgsCollapsibleGroupBoxBasic::mInitFlatChecked
protected
QScrollArea* QgsCollapsibleGroupBoxBasic::mParentScrollArea
protected
bool QgsCollapsibleGroupBoxBasic::mScrollOnExpand
protected
bool QgsCollapsibleGroupBoxBasic::mShiftDown
protected
bool QgsCollapsibleGroupBoxBasic::mShown
protected
QString QgsCollapsibleGroupBoxBasic::mSyncGroup
protected
QWidget* QgsCollapsibleGroupBoxBasic::mSyncParent
protected
bool QgsCollapsibleGroupBoxBasic::mTitleClicked
protected

Property Documentation

bool QgsCollapsibleGroupBoxBasic::collapsed
readwrite
bool QgsCollapsibleGroupBoxBasic::scrollOnExpand
readwrite
QString QgsCollapsibleGroupBoxBasic::syncGroup
readwrite

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