18 #ifndef QGSCOLLAPSIBLEGROUPBOX_H
19 #define QGSCOLLAPSIBLEGROUPBOX_H
26 #include <QToolButton>
27 #include <QMouseEvent>
38 : QToolButton( parent ), mAltDown( false ), mShiftDown( false ) {}
49 void mouseReleaseEvent( QMouseEvent *event )
override
51 mAltDown = (
event->modifiers() & ( Qt::AltModifier | Qt::ControlModifier ) );
52 mShiftDown = (
event->modifiers() & Qt::ShiftModifier );
53 QToolButton::mouseReleaseEvent( event );
75 Q_PROPERTY(
bool collapsed READ isCollapsed WRITE setCollapsed USER
true )
76 Q_PROPERTY( QString syncGroup READ syncGroup WRITE setSyncGroup )
77 Q_PROPERTY(
bool scrollOnExpand READ scrollOnExpand WRITE setScrollOnExpand )
84 bool isCollapsed()
const {
return mCollapsed; }
85 void setCollapsed(
bool collapse );
89 void setSyncGroup( QString grp );
98 void collapsedStateChanged(
bool collapsed );
101 void checkToggled(
bool ckd );
102 void checkClicked(
bool ckd );
103 void toggleCollapsed();
109 void collapseExpandFixes();
111 void showEvent( QShowEvent *event )
override;
112 void mousePressEvent( QMouseEvent *event )
override;
113 void mouseReleaseEvent( QMouseEvent *event )
override;
114 void changeEvent( QEvent *event )
override;
117 QRect titleRect()
const;
118 void clearModifiers();
152 Q_PROPERTY(
bool collapsed READ isCollapsed WRITE setCollapsed USER
true )
153 Q_PROPERTY(
bool saveCollapsedState READ saveCollapsedState WRITE setSaveCollapsedState )
154 Q_PROPERTY(
bool saveCheckedState READ saveCheckedState WRITE setSaveCheckedState )
155 Q_PROPERTY( QString syncGroup READ syncGroup WRITE setSyncGroup )
156 Q_PROPERTY(
bool scrollOnExpand READ scrollOnExpand WRITE setScrollOnExpand )
164 void setSettings( QSettings* settings );
167 void setSaveCollapsedState(
bool save ) { mSaveCollapsedState = save; }
185 void showEvent( QShowEvent *event )
override;
186 QString saveKey()
const;