Skip to content

Commit

Permalink
sipify groupwmsdatadialog and qgsgroupbox
Browse files Browse the repository at this point in the history
  • Loading branch information
Gustry authored and 3nids committed May 1, 2017
1 parent c929d2a commit 5c021dc
Show file tree
Hide file tree
Showing 5 changed files with 207 additions and 97 deletions.
2 changes: 0 additions & 2 deletions python/auto_sip.blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,6 @@ gui/qgsattributeforminterface.sip
gui/qgsattributetypeloaddialog.sip
gui/qgsbrowsertreeview.sip
gui/qgsbusyindicatordialog.sip
gui/qgscollapsiblegroupbox.sip
gui/qgscodeeditor.sip
gui/qgscodeeditorpython.sip
gui/qgscodeeditorsql.sip
Expand Down Expand Up @@ -316,7 +315,6 @@ gui/qgsformannotation.sip
gui/qgsgeometryrubberband.sip
gui/qgsgradientcolorrampdialog.sip
gui/qgsgradientstopeditor.sip
gui/qgsgroupwmsdatadialog.sip
gui/qgshelp.sip
gui/qgshighlight.sip
gui/qgshistogramwidget.sip
Expand Down
224 changes: 150 additions & 74 deletions python/gui/qgscollapsiblegroupbox.sip
Original file line number Diff line number Diff line change
@@ -1,70 +1,103 @@
/************************************************************************
* 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 );

~QgsGroupBoxCollapseButton();

bool altDown() const;
%Docstring
:rtype: bool
%End
void setAltDown( bool updown );

bool shiftDown() const;
%Docstring
:rtype: bool
%End
void setShiftDown( bool shiftdown );

protected:
void mouseReleaseEvent( QMouseEvent *event );
virtual void mouseReleaseEvent( QMouseEvent *event );

};

/** \ingroup gui
* \class QgsCollapsibleGroupBoxBasic
* 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
*/

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>
#include "qgscollapsiblegroupbox.h"
%End
public:
QgsCollapsibleGroupBoxBasic( QWidget *parent /TransferThis/ = 0 );
QgsCollapsibleGroupBoxBasic( const QString &title, QWidget *parent /TransferThis/ = 0 );
~QgsCollapsibleGroupBoxBasic();

/**
* Returns the current collapsed state of this group box
*/
bool isCollapsed() const;
/**
* Collapse or uncollapse this groupbox
*
* @param collapse Will collapse on true and uncollapse on false
*/
%Docstring
Returns the current collapsed state of this group box
:rtype: bool
%End

void setCollapsed( bool collapse );
%Docstring
Collapse or uncollapse this groupbox

\param collapse Will collapse on true and uncollapse on false
%End

/**
* Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key
*/
QString syncGroup() const;
%Docstring
Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key
:rtype: str
%End

/**
* Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key
*/
void setSyncGroup( const QString& grp );
void setSyncGroup( const QString &grp );
%Docstring
Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key
%End

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

//! If this is set to false the parent QScrollArea will not be automatically scrolled to this widget's contents when expanded
bool scrollOnExpand();
%Docstring
If this is set to false the parent QScrollArea will not be automatically scrolled to this widget's contents when expanded
:rtype: bool
%End

signals:
/** Signal emitted when groupbox collapsed/expanded state is changed, and when first shown */
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 );
Expand All @@ -74,77 +107,120 @@ class QgsCollapsibleGroupBoxBasic : QGroupBox
protected:
void init();

/** Visual fixes for when group box is collapsed/expanded */
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 showEvent( QShowEvent *event );
void mousePressEvent( QMouseEvent *event );
void mouseReleaseEvent( QMouseEvent *event );
void changeEvent( QEvent *event );

void updateStyle();
QRect titleRect() const;
%Docstring
:rtype: QRect
%End
void clearModifiers();


};

/** \ingroup gui
* \class QgsCollapsibleGroupBox
* 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
* @see basic 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 propreties palette:
* bool collapsed, bool saveCollapsedState, bool saveCheckedState, QString syncGroup
*/

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:: basic 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 propreties palette:
bool collapsed, bool saveCollapsedState, bool saveCheckedState, QString syncGroup
%End

%TypeHeaderCode
#include <qgscollapsiblegroupbox.h>
#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( QWidget *parent /TransferThis/ = 0, QgsSettings *settings = 0 );
QgsCollapsibleGroupBox( const QString &title, QWidget *parent /TransferThis/ = 0, QgsSettings *settings = 0 );
~QgsCollapsibleGroupBox();

// set custom QgsSettings pointer if group box was already created from QtDesigner promotion
void setSettings( QgsSettings* settings );
void setSettings( QgsSettings *settings );

//! set this to false to not save/restore collapsed state
void setSaveCollapsedState( bool save );
/** 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 */
%Docstring
set 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();
%Docstring
:rtype: bool
%End
bool saveCheckedState();
%Docstring
:rtype: bool
%End

//! Set this to a defined string to share save/restore states across different parent dialogs
void setSettingGroup( const QString &group );
//! Returns the name of the setting group in which the collapsed state will be saved
%Docstring
Set 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
:rtype: str
%End

protected slots:
/**
* Will load the collapsed and checked state
*
* The configuration path from which it is loaded is defined by
* * The object name
* * The settingGroup
*/

void loadState();
/**
* Will save the collapsed and checked state
*
* The configuration path to which it is saved is defined by
* * The object name
* * The settingGroup
*/
void saveState();
%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();
void showEvent( QShowEvent *event );
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 *
************************************************************************/
65 changes: 50 additions & 15 deletions python/gui/qgsgroupwmsdatadialog.sip
Original file line number Diff line number Diff line change
@@ -1,32 +1,67 @@
class QgsGroupWmsDataDialog : QDialog
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsgroupwmsdatadialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/



class QgsGroupWmsDataDialog: QDialog
{

%TypeHeaderCode
#include <qgsgroupwmsdatadialog.h>
#include "qgsgroupwmsdatadialog.h"
%End

public:
//! Constructor
QgsGroupWmsDataDialog( QWidget *parent /TransferThis/ = nullptr, const Qt::WindowFlags& fl = QgisGui::ModalDialogFlags );
//~QgsGroupWmsDataDialog();
QgsGroupWmsDataDialog( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags fl = QgisGui::ModalDialogFlags );
%Docstring
Constructor
%End

//! return group WMS title
QString groupTitle();
%Docstring
return group WMS title
:rtype: str
%End

//! return group WMS short name
QString groupShortName();
%Docstring
return group WMS short name
:rtype: str
%End

//! return group WMS abstract
QString groupAbstract();
%Docstring
return group WMS abstract
:rtype: str
%End


public slots:
//! set group WMS title
void setGroupTitle( const QString& title );
void setGroupTitle( const QString &title );
%Docstring
set group WMS title
%End

//! set group WMS short name
void setGroupShortName( const QString& shortName );
void setGroupShortName( const QString &shortName );
%Docstring
set group WMS short name
%End

void setGroupAbstract( const QString &abstract );
%Docstring
set group WMS abstract
%End

//! set group WMS abstract
void setGroupAbstract( const QString& abstract );

};

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsgroupwmsdatadialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

0 comments on commit 5c021dc

Please sign in to comment.