mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
247 lines
6.7 KiB
Plaintext
247 lines
6.7 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/gui/qgscollapsiblegroupbox.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.py again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class QgsGroupBoxCollapseButton : QToolButton
|
|
{
|
|
%Docstring(signature="appended")
|
|
A collapse button widget for collapsible group boxes.
|
|
%End
|
|
|
|
%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(signature="appended")
|
|
A groupbox that collapses/expands when toggled.
|
|
|
|
The basic class :py:class:`QgsCollapsibleGroupBoxBasic` does not
|
|
auto-save collapsed or checked states.
|
|
|
|
Holding Alt modifier key when toggling collapsed state will synchronize
|
|
the toggling across other collapsible group boxes with the same
|
|
syncGroup string value.
|
|
|
|
Holding Shift modifier key when attempting to toggle collapsed state
|
|
will expand current group box, then collapse any others with the same
|
|
syncGroup string 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, string 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();
|
|
|
|
void setStyleSheet( const QString &style );
|
|
%Docstring
|
|
Overridden to prepare base call and avoid crash due to specific QT
|
|
versions
|
|
|
|
.. versionadded:: 3.16
|
|
%End
|
|
|
|
protected:
|
|
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(signature="appended")
|
|
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 its parent names.
|
|
|
|
Holding Alt modifier key when toggling collapsed state will synchronize
|
|
the toggling across other collapsible group boxes with the same
|
|
syncGroup string value
|
|
|
|
Holding Shift modifier key when attempting to toggle collapsed state
|
|
will expand current group box, then collapse any others with the same
|
|
syncGroup string value
|
|
|
|
.. seealso:: :py:class:`QgsCollapsibleGroupBoxBasic` which does not auto-save states
|
|
|
|
.. note::
|
|
|
|
To add Collapsible properties in promoted QtDesigner widgets, you can add the following "Dynamic properties" by clicking on the green + in the properties palette:
|
|
bool collapsed, bool saveCollapsedState, bool saveCheckedState, string 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:
|
|
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.py again *
|
|
************************************************************************/
|