/************************************************************************ * This file has been generated automatically from * * * * src/gui/qgscollapsiblegroupbox.h * * * * Do not edit manually ! Edit header and run scripts/sipify.pl again * ************************************************************************/ class QgsGroupBoxCollapseButton : QToolButton { %TypeHeaderCode #include "qgscollapsiblegroupbox.h" %End public: QgsGroupBoxCollapseButton( QWidget *parent /TransferThis/ = 0 ); bool altDown() const; void setAltDown( bool updown ); bool shiftDown() const; void setShiftDown( bool shiftdown ); protected: virtual void mouseReleaseEvent( QMouseEvent *event ); }; class QgsCollapsibleGroupBoxBasic : QGroupBox { %Docstring 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 .. note:: To add Collapsible properties in promoted QtDesigner widgets, you can add the following "Dynamic properties" by clicking on the green + in the propreties palette: bool collapsed, QString syncGroup, bool scrollOnExpand %End %TypeHeaderCode #include "qgscollapsiblegroupbox.h" %End public: QgsCollapsibleGroupBoxBasic( QWidget *parent /TransferThis/ = 0 ); QgsCollapsibleGroupBoxBasic( const QString &title, QWidget *parent /TransferThis/ = 0 ); bool isCollapsed() const; %Docstring Returns the current collapsed state of this group box %End void setCollapsed( bool collapse ); %Docstring Collapse or uncollapse this groupbox :param collapse: Will collapse on true and uncollapse on false %End QString syncGroup() const; %Docstring Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key %End void setSyncGroup( const QString &grp ); %Docstring Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key %End void setScrollOnExpand( bool scroll ); %Docstring Sets this to false to not automatically scroll parent QScrollArea to this widget's contents when expanded %End bool scrollOnExpand(); %Docstring If this is set to false the parent QScrollArea will not be automatically scrolled to this widget's contents when expanded %End signals: void collapsedStateChanged( bool collapsed ); %Docstring Signal emitted when groupbox collapsed/expanded state is changed, and when first shown %End public slots: void checkToggled( bool ckd ); void checkClicked( bool ckd ); void toggleCollapsed(); protected: void init(); void collapseExpandFixes(); %Docstring Visual fixes for when group box is collapsed/expanded %End virtual void showEvent( QShowEvent *event ); virtual void mousePressEvent( QMouseEvent *event ); virtual void mouseReleaseEvent( QMouseEvent *event ); virtual void changeEvent( QEvent *event ); void updateStyle(); QRect titleRect() const; void clearModifiers(); }; class QgsCollapsibleGroupBox : QgsCollapsibleGroupBoxBasic { %Docstring A groupbox that collapses/expands when toggled and can save its collapsed and checked states. By default, it auto-saves only its collapsed state to the global settings based on the widget and it's parent names. 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 .. seealso:: :py:func:`basic` .. note:: To add Collapsible properties in promoted QtDesigner widgets, you can add the following "Dynamic properties" by clicking on the green + in the propreties palette: bool collapsed, bool saveCollapsedState, bool saveCheckedState, QString syncGroup %End %TypeHeaderCode #include "qgscollapsiblegroupbox.h" %End public: QgsCollapsibleGroupBox( QWidget *parent /TransferThis/ = 0, QgsSettings *settings = 0 ); QgsCollapsibleGroupBox( const QString &title, QWidget *parent /TransferThis/ = 0, QgsSettings *settings = 0 ); ~QgsCollapsibleGroupBox(); void setSettings( QgsSettings *settings ); void setSaveCollapsedState( bool save ); %Docstring Sets this to false to not save/restore collapsed state %End void setSaveCheckedState( bool save ); %Docstring Set this to true to save/restore checked state .. note:: only turn on mSaveCheckedState for groupboxes NOT used in multiple places or used as options for different parent objects * %End bool saveCollapsedState(); bool saveCheckedState(); void setSettingGroup( const QString &group ); %Docstring Sets this to a defined string to share save/restore states across different parent dialogs %End QString settingGroup() const; %Docstring Returns the name of the setting group in which the collapsed state will be saved %End protected slots: void loadState(); %Docstring Will load the collapsed and checked state The configuration path from which it is loaded is defined by * The object name * The settingGroup %End void saveState() const; %Docstring Will save the collapsed and checked state The configuration path to which it is saved is defined by * The object name * The settingGroup %End protected: void init(); virtual void showEvent( QShowEvent *event ); QString saveKey() const; }; /************************************************************************ * This file has been generated automatically from * * * * src/gui/qgscollapsiblegroupbox.h * * * * Do not edit manually ! Edit header and run scripts/sipify.pl again * ************************************************************************/