18#ifndef QGSCOLLAPSIBLEGROUPBOX_H
19#define QGSCOLLAPSIBLEGROUPBOX_H
44 : QToolButton( parent )
54 void mouseReleaseEvent( QMouseEvent *event )
override;
57 bool mAltDown =
false;
58 bool mShiftDown =
false;
112 void setCollapsed(
bool collapse );
122 void setSyncGroup(
const QString &grp );
150 void showEvent( QShowEvent *event )
override;
262 void saveState()
const;
265 void showEvent( QShowEvent *event )
override;
266 QString saveKey()
const;
273 QPointer<QgsSettings> mSettings;
276 bool mSaveCollapsedState;
277 bool mSaveCheckedState;
278 QString mSettingGroup;
QString syncGroup
An optional group to be collapsed and uncollapsed in sync with this group box if the Alt-modifier is ...
void changeEvent(QEvent *event) override
void collapseExpandFixes()
Visual fixes for when group box is collapsed/expanded.
void setScrollOnExpand(bool scroll)
Sets this to false to not automatically scroll parent QScrollArea to this widget's contents when expa...
bool collapsed
The collapsed state of this group box.
QgsCollapsibleGroupBoxBasic(QWidget *parent=nullptr)
QString syncGroup() const
Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier ...
void setSyncGroup(const QString &grp)
Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier ...
void checkToggled(bool ckd)
bool isCollapsed() const
Returns the current collapsed state of this group box.
void showEvent(QShowEvent *event) override
bool scrollOnExpand
If this property is set to true, a parent scroll area will try to make sure that the whole group box ...
void collapsedStateChanged(bool collapsed)
Signal emitted when groupbox collapsed/expanded state is changed, and when first shown.
void checkClicked(bool ckd)
QgsGroupBoxCollapseButton * mCollapseButton
void setStyleSheet(const QString &style)
Overridden to prepare base call and avoid crash due to specific QT versions.
void setCollapsed(bool collapse)
Collapse or uncollapse this groupbox.
QScrollArea * mParentScrollArea
void mousePressEvent(QMouseEvent *event) override
void mouseReleaseEvent(QMouseEvent *event) override
bool scrollOnExpand() const
If this is set to false the parent QScrollArea will not be automatically scrolled to this widget's co...
bool saveCollapsedState() const
Returns whether the collapsed state of this group box is saved and loaded persistently in QgsSettings...
void setSaveCheckedState(bool save)
Set this to true to save/restore checked state.
void setSaveCollapsedState(bool save)
Sets this to false to not save/restore collapsed state.
QgsCollapsibleGroupBox(QWidget *parent=nullptr, QgsSettings *settings=nullptr)
void setSettingGroup(const QString &group)
Sets this to a defined string to share save/restore states across different parent dialogs.
QString settingGroup() const
Returns the name of the setting group in which the collapsed state will be saved.
bool saveCollapsedState
Shall the collapsed state of this group box be saved and loaded persistently in QgsSettings.
bool saveCheckedState() const
Returns whether the checked state of this group box is saved and loaded persistently in QgsSettings.
bool saveCheckedState
Shall the checked state of this group box be saved and loaded persistently in QgsSettings.
void setSettings(QgsSettings *settings)
Stores settings for use within QGIS.