Skip to content

Commit

Permalink
collapsible gpbox: scroll on expand property accessible
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed May 20, 2014
1 parent 19e727e commit 986ffd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/gui/qgscollapsiblegroupbox.sip
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class QgsCollapsibleGroupBoxBasic : QGroupBox

//! set this to false to not automatically scroll parent QScrollArea to this widget's contents when expanded
void setScrollOnExpand( bool scroll );

bool scrollOnExpand();

signals:
/** Signal emitted when groupbox collapsed/expanded state is changed, and when first shown */
Expand Down
4 changes: 4 additions & 0 deletions src/gui/qgscollapsiblegroupbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class GUI_EXPORT QgsCollapsibleGroupBoxBasic : public QGroupBox

Q_PROPERTY( bool collapsed READ isCollapsed WRITE setCollapsed USER true )
Q_PROPERTY( QString syncGroup READ syncGroup WRITE setSyncGroup )
Q_PROPERTY( bool scrollOnExpand READ scrollOnExpand WRITE setScrollOnExpand )

public:
QgsCollapsibleGroupBoxBasic( QWidget *parent = 0 );
Expand All @@ -90,6 +91,8 @@ class GUI_EXPORT QgsCollapsibleGroupBoxBasic : public QGroupBox
//! set this to false to not automatically scroll parent QScrollArea to this widget's contents when expanded
void setScrollOnExpand( bool scroll ) { mScrollOnExpand = scroll; }

bool scrollOnExpand() {return mScrollOnExpand;}

signals:
/** Signal emitted when groupbox collapsed/expanded state is changed, and when first shown */
void collapsedStateChanged( bool collapsed );
Expand Down Expand Up @@ -150,6 +153,7 @@ class GUI_EXPORT QgsCollapsibleGroupBox : public QgsCollapsibleGroupBoxBasic
Q_PROPERTY( bool saveCollapsedState READ saveCollapsedState WRITE setSaveCollapsedState )
Q_PROPERTY( bool saveCheckedState READ saveCheckedState WRITE setSaveCheckedState )
Q_PROPERTY( QString syncGroup READ syncGroup WRITE setSyncGroup )
Q_PROPERTY( bool scrollOnExpand READ scrollOnExpand WRITE setScrollOnExpand )

public:
QgsCollapsibleGroupBox( QWidget *parent = 0, QSettings* settings = 0 );
Expand Down

0 comments on commit 986ffd6

Please sign in to comment.