QGIS API Documentation  2.7.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | 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 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. More...
 

Public Member Functions

 QgsCollapsibleGroupBoxBasic (QWidget *parent=0)
 
 QgsCollapsibleGroupBoxBasic (const QString &title, QWidget *parent=0)
 
 ~QgsCollapsibleGroupBoxBasic ()
 
bool isCollapsed () const
 
bool scrollOnExpand ()
 
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 More...
 
void setSyncGroup (QString grp)
 
QString syncGroup () const
 Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key. More...
 

Protected Member Functions

void changeEvent (QEvent *event)
 
void clearModifiers ()
 
void collapseExpandFixes ()
 Visual fixes for when group box is collapsed/expanded. More...
 
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
 

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

QgsCollapsibleGroupBoxBasic::QgsCollapsibleGroupBoxBasic ( QWidget *  parent = 0)

Definition at line 33 of file qgscollapsiblegroupbox.cpp.

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

Definition at line 39 of file qgscollapsiblegroupbox.cpp.

QgsCollapsibleGroupBoxBasic::~QgsCollapsibleGroupBoxBasic ( )

Definition at line 46 of file qgscollapsiblegroupbox.cpp.

Member Function Documentation

void QgsCollapsibleGroupBoxBasic::changeEvent ( QEvent *  event)
protected

Definition at line 178 of file qgscollapsiblegroupbox.cpp.

void QgsCollapsibleGroupBoxBasic::checkClicked ( bool  ckd)
slot

Definition at line 223 of file qgscollapsiblegroupbox.cpp.

void QgsCollapsibleGroupBoxBasic::checkToggled ( bool  ckd)
slot

Definition at line 217 of file qgscollapsiblegroupbox.cpp.

void QgsCollapsibleGroupBoxBasic::clearModifiers ( )
protected

Definition at line 209 of file qgscollapsiblegroupbox.cpp.

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.

Definition at line 450 of file qgscollapsiblegroupbox.cpp.

void QgsCollapsibleGroupBoxBasic::init ( )
protected

Definition at line 51 of file qgscollapsiblegroupbox.cpp.

bool QgsCollapsibleGroupBoxBasic::isCollapsed ( ) const
inline

Definition at line 84 of file qgscollapsiblegroupbox.h.

void QgsCollapsibleGroupBoxBasic::mousePressEvent ( QMouseEvent *  event)
protected

Definition at line 143 of file qgscollapsiblegroupbox.cpp.

void QgsCollapsibleGroupBoxBasic::mouseReleaseEvent ( QMouseEvent *  event)
protected

Definition at line 158 of file qgscollapsiblegroupbox.cpp.

bool QgsCollapsibleGroupBoxBasic::scrollOnExpand ( )
inline

Definition at line 94 of file qgscollapsiblegroupbox.h.

void QgsCollapsibleGroupBoxBasic::setCollapsed ( bool  collapse)

Definition at line 409 of file qgscollapsiblegroupbox.cpp.

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 92 of file qgscollapsiblegroupbox.h.

void QgsCollapsibleGroupBoxBasic::setSyncGroup ( QString  grp)

Definition at line 190 of file qgscollapsiblegroupbox.cpp.

void QgsCollapsibleGroupBoxBasic::showEvent ( QShowEvent *  event)
protected

Definition at line 90 of file qgscollapsiblegroupbox.cpp.

QString QgsCollapsibleGroupBoxBasic::syncGroup ( ) const
inline

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

Definition at line 88 of file qgscollapsiblegroupbox.h.

QRect QgsCollapsibleGroupBoxBasic::titleRect ( ) const
protected

Definition at line 201 of file qgscollapsiblegroupbox.cpp.

void QgsCollapsibleGroupBoxBasic::toggleCollapsed ( )
slot

Definition at line 235 of file qgscollapsiblegroupbox.cpp.

void QgsCollapsibleGroupBoxBasic::updateStyle ( )
protected

Definition at line 311 of file qgscollapsiblegroupbox.cpp.

Member Data Documentation

bool QgsCollapsibleGroupBoxBasic::mAltDown
protected

Definition at line 129 of file qgscollapsiblegroupbox.h.

QgsGroupBoxCollapseButton* QgsCollapsibleGroupBoxBasic::mCollapseButton
protected

Definition at line 126 of file qgscollapsiblegroupbox.h.

bool QgsCollapsibleGroupBoxBasic::mCollapsed
protected

Definition at line 120 of file qgscollapsiblegroupbox.h.

QIcon QgsCollapsibleGroupBoxBasic::mCollapseIcon
staticprotected

Definition at line 133 of file qgscollapsiblegroupbox.h.

QIcon QgsCollapsibleGroupBoxBasic::mExpandIcon
staticprotected

Definition at line 134 of file qgscollapsiblegroupbox.h.

bool QgsCollapsibleGroupBoxBasic::mInitFlat
protected

Definition at line 121 of file qgscollapsiblegroupbox.h.

bool QgsCollapsibleGroupBoxBasic::mInitFlatChecked
protected

Definition at line 122 of file qgscollapsiblegroupbox.h.

QScrollArea* QgsCollapsibleGroupBoxBasic::mParentScrollArea
protected

Definition at line 125 of file qgscollapsiblegroupbox.h.

bool QgsCollapsibleGroupBoxBasic::mScrollOnExpand
protected

Definition at line 123 of file qgscollapsiblegroupbox.h.

bool QgsCollapsibleGroupBoxBasic::mShiftDown
protected

Definition at line 130 of file qgscollapsiblegroupbox.h.

bool QgsCollapsibleGroupBoxBasic::mShown
protected

Definition at line 124 of file qgscollapsiblegroupbox.h.

QString QgsCollapsibleGroupBoxBasic::mSyncGroup
protected

Definition at line 128 of file qgscollapsiblegroupbox.h.

QWidget* QgsCollapsibleGroupBoxBasic::mSyncParent
protected

Definition at line 127 of file qgscollapsiblegroupbox.h.

bool QgsCollapsibleGroupBoxBasic::mTitleClicked
protected

Definition at line 131 of file qgscollapsiblegroupbox.h.


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