|
QGIS API Documentation
master-59fd5e0
|
A groupbox that collapses/expands when toggled. More...
#include <qgscollapsiblegroupbox.h>
Inheritance diagram for QgsCollapsibleGroupBoxBasic:
Collaboration diagram for QgsCollapsibleGroupBoxBasic: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 |
| QgsGroupBoxCollapseButton * | mCollapseButton |
| 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 |
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
Definition at line 71 of file qgscollapsiblegroupbox.h.
| QgsCollapsibleGroupBoxBasic::QgsCollapsibleGroupBoxBasic | ( | QWidget * | parent = 0 | ) |
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().
Definition at line 46 of file qgscollapsiblegroupbox.cpp.
| 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::clearModifiers | ( | ) | [protected] |
Definition at line 207 of file qgscollapsiblegroupbox.cpp.
References mAltDown, mCollapseButton, mShiftDown, QgsGroupBoxCollapseButton::setAltDown(), and QgsGroupBoxCollapseButton::setShiftDown().
Referenced by toggleCollapsed().
| void QgsCollapsibleGroupBoxBasic::collapsedStateChanged | ( | bool | collapsed | ) | [signal] |
Signal emitted when groupbox collapsed/expanded state is changed, and when first shown.
Referenced by setCollapsed(), and showEvent().
| void QgsCollapsibleGroupBoxBasic::collapseExpandFixes | ( | ) | [protected] |
Visual fixes for when group box is collapsed/expanded.
Definition at line 445 of file qgscollapsiblegroupbox.cpp.
References mCollapsed.
Referenced by setCollapsed().
| void QgsCollapsibleGroupBoxBasic::init | ( | ) | [protected] |
Reimplemented in QgsCollapsibleGroupBox.
Definition at line 51 of file qgscollapsiblegroupbox.cpp.
References checkClicked(), checkToggled(), QgsApplication::getThemeIcon(), mAltDown, mCollapseButton, mCollapsed, mCollapseIcon, mExpandIcon, mInitFlat, mInitFlatChecked, mParentScrollArea, mScrollOnExpand, mShiftDown, mShown, mSyncGroup, mSyncParent, mTitleClicked, and toggleCollapsed().
Referenced by QgsCollapsibleGroupBoxBasic().
| bool QgsCollapsibleGroupBoxBasic::isCollapsed | ( | ) | const [inline] |
Definition at line 83 of file qgscollapsiblegroupbox.h.
Referenced by checkClicked(), QgsCollapsibleGroupBox::saveState(), setCollapsed(), and showEvent().
| void QgsCollapsibleGroupBoxBasic::mousePressEvent | ( | QMouseEvent * | event | ) | [protected] |
Definition at line 141 of file qgscollapsiblegroupbox.cpp.
References titleRect().
| void QgsCollapsibleGroupBoxBasic::mouseReleaseEvent | ( | QMouseEvent * | event | ) | [protected] |
Definition at line 156 of file qgscollapsiblegroupbox.cpp.
References mAltDown, mShiftDown, mTitleClicked, titleRect(), and toggleCollapsed().
| void QgsCollapsibleGroupBoxBasic::setCollapsed | ( | bool | collapse | ) |
Definition at line 409 of file qgscollapsiblegroupbox.cpp.
References collapsedStateChanged(), collapseExpandFixes(), isCollapsed(), mCollapseButton, mCollapsed, mCollapseIcon, mExpandIcon, mInitFlat, mParentScrollArea, mScrollOnExpand, mShown, and titleRect().
Referenced by checkClicked(), QgsCollapsibleGroupBox::loadState(), showEvent(), and toggleCollapsed().
| 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.
| void QgsCollapsibleGroupBoxBasic::setSyncGroup | ( | QString | grp | ) |
Definition at line 188 of file qgscollapsiblegroupbox.cpp.
References mCollapseButton, mSyncGroup, and tr.
| void QgsCollapsibleGroupBoxBasic::showEvent | ( | QShowEvent * | event | ) | [protected] |
Reimplemented in QgsCollapsibleGroupBox.
Definition at line 88 of file qgscollapsiblegroupbox.cpp.
References collapsedStateChanged(), isCollapsed(), mCollapseButton, mCollapsed, mInitFlat, mInitFlatChecked, mParentScrollArea, mShown, QgsDebugMsg, setCollapsed(), and updateStyle().
| 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().
| QRect QgsCollapsibleGroupBoxBasic::titleRect | ( | ) | const [protected] |
Definition at line 199 of file qgscollapsiblegroupbox.cpp.
Referenced by mousePressEvent(), mouseReleaseEvent(), setCollapsed(), and updateStyle().
| void QgsCollapsibleGroupBoxBasic::toggleCollapsed | ( | ) | [slot] |
Definition at line 233 of file qgscollapsiblegroupbox.cpp.
References QgsGroupBoxCollapseButton::altDown(), clearModifiers(), mAltDown, mCollapseButton, mCollapsed, mShiftDown, mSyncGroup, mSyncParent, mTitleClicked, QgsDebugMsg, setCollapsed(), QgsGroupBoxCollapseButton::shiftDown(), and syncGroup.
Referenced by init(), and mouseReleaseEvent().
| void QgsCollapsibleGroupBoxBasic::updateStyle | ( | ) | [protected] |
Definition at line 310 of file qgscollapsiblegroupbox.cpp.
References mCollapseButton, QgsDebugMsg, and titleRect().
Referenced by showEvent().
bool QgsCollapsibleGroupBoxBasic::mAltDown [protected] |
Definition at line 126 of file qgscollapsiblegroupbox.h.
Referenced by clearModifiers(), init(), mouseReleaseEvent(), and toggleCollapsed().
Definition at line 123 of file qgscollapsiblegroupbox.h.
Referenced by changeEvent(), checkToggled(), clearModifiers(), init(), setCollapsed(), setSyncGroup(), showEvent(), toggleCollapsed(), and updateStyle().
bool QgsCollapsibleGroupBoxBasic::mCollapsed [protected] |
Definition at line 117 of file qgscollapsiblegroupbox.h.
Referenced by collapseExpandFixes(), init(), setCollapsed(), showEvent(), and toggleCollapsed().
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().
bool QgsCollapsibleGroupBoxBasic::mInitFlat [protected] |
Definition at line 118 of file qgscollapsiblegroupbox.h.
Referenced by init(), setCollapsed(), showEvent(), and QgsCollapsibleGroupBox::showEvent().
bool QgsCollapsibleGroupBoxBasic::mInitFlatChecked [protected] |
Definition at line 119 of file qgscollapsiblegroupbox.h.
Referenced by init(), showEvent(), and QgsCollapsibleGroupBox::showEvent().
QScrollArea* QgsCollapsibleGroupBoxBasic::mParentScrollArea [protected] |
Definition at line 122 of file qgscollapsiblegroupbox.h.
Referenced by init(), setCollapsed(), and showEvent().
bool QgsCollapsibleGroupBoxBasic::mScrollOnExpand [protected] |
Definition at line 120 of file qgscollapsiblegroupbox.h.
Referenced by init(), and setCollapsed().
bool QgsCollapsibleGroupBoxBasic::mShiftDown [protected] |
Definition at line 127 of file qgscollapsiblegroupbox.h.
Referenced by clearModifiers(), init(), mouseReleaseEvent(), and toggleCollapsed().
bool QgsCollapsibleGroupBoxBasic::mShown [protected] |
Definition at line 121 of file qgscollapsiblegroupbox.h.
Referenced by init(), setCollapsed(), showEvent(), and QgsCollapsibleGroupBox::showEvent().
QString QgsCollapsibleGroupBoxBasic::mSyncGroup [protected] |
Definition at line 125 of file qgscollapsiblegroupbox.h.
Referenced by init(), setSyncGroup(), and toggleCollapsed().
QWidget* QgsCollapsibleGroupBoxBasic::mSyncParent [protected] |
Definition at line 124 of file qgscollapsiblegroupbox.h.
Referenced by init(), and toggleCollapsed().
bool QgsCollapsibleGroupBoxBasic::mTitleClicked [protected] |
Definition at line 128 of file qgscollapsiblegroupbox.h.
Referenced by init(), mouseReleaseEvent(), and toggleCollapsed().
bool QgsCollapsibleGroupBoxBasic::collapsed [read, write] |
Reimplemented in QgsCollapsibleGroupBox.
Definition at line 75 of file qgscollapsiblegroupbox.h.
QString QgsCollapsibleGroupBoxBasic::syncGroup [read, write] |
Reimplemented in QgsCollapsibleGroupBox.
Definition at line 76 of file qgscollapsiblegroupbox.h.
Referenced by toggleCollapsed().