18 #ifndef QGSCOLLAPSIBLEGROUPBOX_H
19 #define QGSCOLLAPSIBLEGROUPBOX_H
23 #include <QToolButton>
43 : QToolButton( parent )
53 void mouseReleaseEvent( QMouseEvent *event )
override;
56 bool mAltDown =
false;
57 bool mShiftDown =
false;
79 Q_PROPERTY(
bool collapsed READ isCollapsed WRITE setCollapsed USER
true )
85 Q_PROPERTY( QString syncGroup READ syncGroup WRITE setSyncGroup )
91 Q_PROPERTY(
bool scrollOnExpand READ scrollOnExpand WRITE setScrollOnExpand )
100 bool isCollapsed()
const {
return mCollapsed; }
107 void setCollapsed(
bool collapse );
117 void setSyncGroup(
const QString &grp );
127 void collapsedStateChanged(
bool collapsed );
130 void checkToggled(
bool ckd );
131 void checkClicked(
bool ckd );
132 void toggleCollapsed();
139 void setStyleSheet(
const QString &style );
145 void collapseExpandFixes();
147 void showEvent( QShowEvent *event )
override;
148 void mousePressEvent( QMouseEvent *event )
override;
149 void mouseReleaseEvent( QMouseEvent *event )
override;
150 void changeEvent( QEvent *event )
override;
153 QRect titleRect()
const;
154 void clearModifiers();
161 QScrollArea *mParentScrollArea =
nullptr;
163 QWidget *mSyncParent =
nullptr;
192 Q_PROPERTY(
bool saveCollapsedState READ saveCollapsedState WRITE setSaveCollapsedState )
197 Q_PROPERTY(
bool saveCheckedState READ saveCheckedState WRITE setSaveCheckedState )
208 void setSaveCollapsedState(
bool save ) { mSaveCollapsedState = save; }
244 void saveState()
const;
248 void showEvent( QShowEvent *event )
override;
249 QString saveKey()
const;