QGIS API Documentation
2.0.1-Dufour
|
A groupbox that collapses/expands when toggled. More...
#include <qgscollapsiblegroupbox.h>
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 |
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 |
QgsGroupBoxCollapseButton * | mCollapseButton |
QWidget * | mSyncParent |
QString | mSyncGroup |
bool | mAltDown |
bool | mShiftDown |
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().
QgsCollapsibleGroupBoxBasic::~QgsCollapsibleGroupBoxBasic | ( | ) |
Definition at line 46 of file qgscollapsiblegroupbox.cpp.
|
protected |
Definition at line 176 of file qgscollapsiblegroupbox.cpp.
References mCollapseButton.
|
slot |
Definition at line 221 of file qgscollapsiblegroupbox.cpp.
References isCollapsed(), and setCollapsed().
Referenced by init().
|
slot |
Definition at line 215 of file qgscollapsiblegroupbox.cpp.
References mCollapseButton.
Referenced by init().
|
protected |
Definition at line 207 of file qgscollapsiblegroupbox.cpp.
References mAltDown, mCollapseButton, mShiftDown, QgsGroupBoxCollapseButton::setAltDown(), and QgsGroupBoxCollapseButton::setShiftDown().
Referenced by toggleCollapsed().
|
signal |
Signal emitted when groupbox collapsed/expanded state is changed, and when first shown.
Referenced by setCollapsed(), and showEvent().
|
protected |
Visual fixes for when group box is collapsed/expanded.
Definition at line 445 of file qgscollapsiblegroupbox.cpp.
References mCollapsed.
Referenced by setCollapsed().
|
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().
|
inline |
Definition at line 83 of file qgscollapsiblegroupbox.h.
Referenced by checkClicked(), QgsCollapsibleGroupBox::saveState(), setCollapsed(), and showEvent().
|
protected |
Definition at line 141 of file qgscollapsiblegroupbox.cpp.
References titleRect().
|
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().
|
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.
|
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().
|
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().
|
protected |
Definition at line 199 of file qgscollapsiblegroupbox.cpp.
Referenced by mousePressEvent(), mouseReleaseEvent(), setCollapsed(), and updateStyle().
|
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().
|
protected |
Definition at line 310 of file qgscollapsiblegroupbox.cpp.
References mCollapseButton, QgsDebugMsg, and titleRect().
Referenced by showEvent().
|
protected |
Definition at line 126 of file qgscollapsiblegroupbox.h.
Referenced by clearModifiers(), init(), mouseReleaseEvent(), and toggleCollapsed().
|
protected |
Definition at line 123 of file qgscollapsiblegroupbox.h.
Referenced by changeEvent(), checkToggled(), clearModifiers(), init(), setCollapsed(), setSyncGroup(), showEvent(), toggleCollapsed(), and updateStyle().
|
protected |
Definition at line 117 of file qgscollapsiblegroupbox.h.
Referenced by collapseExpandFixes(), init(), setCollapsed(), showEvent(), and toggleCollapsed().
|
staticprotected |
Definition at line 130 of file qgscollapsiblegroupbox.h.
Referenced by init(), and setCollapsed().
|
staticprotected |
Definition at line 131 of file qgscollapsiblegroupbox.h.
Referenced by init(), and setCollapsed().
|
protected |
Definition at line 118 of file qgscollapsiblegroupbox.h.
Referenced by init(), setCollapsed(), showEvent(), and QgsCollapsibleGroupBox::showEvent().
|
protected |
Definition at line 119 of file qgscollapsiblegroupbox.h.
Referenced by init(), showEvent(), and QgsCollapsibleGroupBox::showEvent().
|
protected |
Definition at line 122 of file qgscollapsiblegroupbox.h.
Referenced by init(), setCollapsed(), and showEvent().
|
protected |
Definition at line 120 of file qgscollapsiblegroupbox.h.
Referenced by init(), and setCollapsed().
|
protected |
Definition at line 127 of file qgscollapsiblegroupbox.h.
Referenced by clearModifiers(), init(), mouseReleaseEvent(), and toggleCollapsed().
|
protected |
Definition at line 121 of file qgscollapsiblegroupbox.h.
Referenced by init(), setCollapsed(), showEvent(), and QgsCollapsibleGroupBox::showEvent().
|
protected |
Definition at line 125 of file qgscollapsiblegroupbox.h.
Referenced by init(), setSyncGroup(), and toggleCollapsed().
|
protected |
Definition at line 124 of file qgscollapsiblegroupbox.h.
Referenced by init(), and toggleCollapsed().
|
protected |
Definition at line 128 of file qgscollapsiblegroupbox.h.
Referenced by init(), mouseReleaseEvent(), and toggleCollapsed().
|
readwrite |
Definition at line 75 of file qgscollapsiblegroupbox.h.
|
readwrite |
Definition at line 76 of file qgscollapsiblegroupbox.h.
Referenced by toggleCollapsed().