-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
674 additions
and
276 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,44 @@ | ||
/** | ||
* The QgsCustomLayerOrderWidget class provides a list box where the user can define | ||
* custom order for drawing of layers. It also features a checkbox for enabling | ||
* or disabling the custom order. Any changes made by the user are automatically | ||
* propagated to the assigned QgsLayerTreeMapCanvasBridge. Also, any updates | ||
* to the layer tree cause refresh of the list. | ||
* | ||
* @see QgsLayerTreeMapCanvasBridge | ||
* @note added in 2.4 | ||
*/ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/layertree/qgscustomlayerorderwidget.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
class QgsCustomLayerOrderWidget : QWidget | ||
{ | ||
%TypeHeaderCode | ||
#include <qgscustomlayerorderwidget.h> | ||
%Docstring | ||
The QgsCustomLayerOrderWidget class provides a list box where the user can define | ||
custom order for drawing of layers. It also features a checkbox for enabling | ||
or disabling the custom order. Any changes made by the user are automatically | ||
propagated to the assigned QgsLayerTreeMapCanvasBridge. Also, any updates | ||
to the layer tree cause refresh of the list. | ||
|
||
.. seealso:: QgsLayerTreeMapCanvasBridge | ||
.. versionadded:: 2.4 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgscustomlayerorderwidget.h" | ||
%End | ||
public: | ||
explicit QgsCustomLayerOrderWidget( QgsLayerTreeMapCanvasBridge *bridge, QWidget *parent /TransferThis/ = 0 ); | ||
|
||
signals: | ||
|
||
}; | ||
|
||
|
||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/layertree/qgscustomlayerorderwidget.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
46 changes: 34 additions & 12 deletions
46
python/gui/layertree/qgslayertreeembeddedconfigwidget.sip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,44 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/layertree/qgslayertreeembeddedconfigwidget.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
/** \ingroup gui | ||
* \class QgsLayerTreeEmbeddedConfigWidget | ||
* A widget to configure layer tree embedded widgets for a particular map layer. | ||
* @note introduced in QGIS 2.16 | ||
*/ | ||
class QgsLayerTreeEmbeddedConfigWidget : public QWidget | ||
{ | ||
%TypeHeaderCode | ||
#include <qgslayertreeembeddedconfigwidget.h> | ||
%End | ||
|
||
|
||
class QgsLayerTreeEmbeddedConfigWidget : public QWidget, protected Ui::QgsLayerTreeEmbeddedConfigWidget | ||
%Docstring | ||
A widget to configure layer tree embedded widgets for a particular map layer. | ||
.. versionadded:: 2.16 | ||
%End | ||
{ | ||
public: | ||
|
||
QgsLayerTreeEmbeddedConfigWidget( QWidget *parent /TransferThis/ = 0 ); | ||
%Docstring | ||
A widget to configure layer tree embedded widgets for a particular map layer. | ||
\param parent The parent of the widget. | ||
%End | ||
|
||
//! Initialize widget with a map layer | ||
void setLayer( QgsMapLayer *layer ); | ||
%Docstring | ||
Initialize widget with a map layer | ||
%End | ||
|
||
//! Store changes made in the widget to the layer | ||
void applyToLayer(); | ||
%Docstring | ||
Store changes made in the widget to the layer | ||
%End | ||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/layertree/qgslayertreeembeddedconfigwidget.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
118 changes: 85 additions & 33 deletions
118
python/gui/layertree/qgslayertreeembeddedwidgetregistry.sip
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,123 @@ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/layertree/qgslayertreeembeddedwidgetregistry.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
/** \ingroup gui | ||
* \class QgsLayerTreeEmbeddedWidgetProvider | ||
* Provider interface to be implemented in order to introduce new kinds of embedded widgets for use in layer tree. | ||
* Embedded widgets are assigned per individual map layers and they are shown before any legend entries. | ||
* @see QgsLayerTreeEmbeddedWidgetRegistry | ||
* @note introduced in QGIS 2.16 | ||
*/ | ||
class QgsLayerTreeEmbeddedWidgetProvider | ||
{ | ||
%TypeHeaderCode | ||
#include <qgslayertreeembeddedwidgetregistry.h> | ||
%Docstring | ||
Provider interface to be implemented in order to introduce new kinds of embedded widgets for use in layer tree. | ||
Embedded widgets are assigned per individual map layers and they are shown before any legend entries. | ||
.. seealso:: QgsLayerTreeEmbeddedWidgetRegistry | ||
.. versionadded:: 2.16 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgslayertreeembeddedwidgetregistry.h" | ||
%End | ||
public: | ||
virtual ~QgsLayerTreeEmbeddedWidgetProvider(); | ||
|
||
//! Unique name of the provider (among other providers) | ||
virtual QString id() const = 0; | ||
%Docstring | ||
Unique name of the provider (among other providers) | ||
:rtype: str | ||
%End | ||
|
||
//! Human readable name - may be translatable with tr() | ||
virtual QString name() const = 0; | ||
%Docstring | ||
Human readable name - may be translatable with tr() | ||
:rtype: str | ||
%End | ||
|
||
//! Factory to create widgets. The returned widget is owned by the caller. | ||
//! The widgetIndex argument may be used to identify which widget is being | ||
//! created (useful when using multiple widgets from the same provider for one layer). | ||
virtual QWidget *createWidget( QgsMapLayer *layer, int widgetIndex ) = 0 /Factory/; | ||
%Docstring | ||
created (useful when using multiple widgets from the same provider for one layer). | ||
:rtype: QWidget | ||
%End | ||
|
||
//! Whether it makes sense to use this widget for a particular layer | ||
virtual bool supportsLayer( QgsMapLayer *layer ) = 0; | ||
%Docstring | ||
Whether it makes sense to use this widget for a particular layer | ||
:rtype: bool | ||
%End | ||
}; | ||
|
||
/** \ingroup gui | ||
* \class QgsLayerTreeEmbeddedWidgetRegistry | ||
* Registry of widgets that may be embedded into layer tree view. | ||
* Embedded widgets are assigned per individual map layers and they are shown before any legend entries. | ||
* Layer tree must have UseEmbeddedWidgets flag enabled in order to show assigned widgets. | ||
* | ||
* @see QgsLayerTreeEmbeddedWidgetRegistry | ||
* @note introduced in QGIS 2.16 | ||
*/ | ||
class QgsLayerTreeEmbeddedWidgetRegistry | ||
{ | ||
%TypeHeaderCode | ||
#include <qgslayertreeembeddedwidgetregistry.h> | ||
%Docstring | ||
Registry of widgets that may be embedded into layer tree view. | ||
Embedded widgets are assigned per individual map layers and they are shown before any legend entries. | ||
Layer tree must have UseEmbeddedWidgets flag enabled in order to show assigned widgets. | ||
|
||
QgsLayerTreeEmbeddedWidgetRegistry is not usually directly created, but rather accessed through | ||
QgsGui.layerTreeEmbeddedWidgetRegistry(). | ||
|
||
.. seealso:: QgsLayerTreeEmbeddedWidgetRegistry | ||
.. versionadded:: 2.16 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgslayertreeembeddedwidgetregistry.h" | ||
%End | ||
public: | ||
|
||
QgsLayerTreeEmbeddedWidgetRegistry(); | ||
%Docstring | ||
Constructor for QgsLayerTreeEmbeddedWidgetRegistry | ||
|
||
QgsLayerTreeEmbeddedWidgetRegistry is not usually directly created, but rather accessed through | ||
QgsGui.layerTreeEmbeddedWidgetRegistry(). | ||
%End | ||
|
||
~QgsLayerTreeEmbeddedWidgetRegistry(); | ||
|
||
/** Return list of all registered providers */ | ||
|
||
QStringList providers() const; | ||
%Docstring | ||
Return list of all registered providers | ||
:rtype: list of str | ||
%End | ||
|
||
/** Get provider object from the provider's ID */ | ||
QgsLayerTreeEmbeddedWidgetProvider *provider( const QString &providerId ) const; | ||
%Docstring | ||
Get provider object from the provider's ID | ||
:rtype: QgsLayerTreeEmbeddedWidgetProvider | ||
%End | ||
|
||
/** Register a provider, takes ownership of the object. | ||
* Returns true on success, false if the provider is already registered. */ | ||
bool addProvider( QgsLayerTreeEmbeddedWidgetProvider *provider /Transfer/ ); | ||
%Docstring | ||
Register a provider, takes ownership of the object. | ||
Returns true on success, false if the provider is already registered. * | ||
:rtype: bool | ||
%End | ||
|
||
/** Unregister a provider, the provider object is deleted. | ||
* Returns true on success, false if the provider was not registered. */ | ||
bool removeProvider( const QString &providerId ); | ||
%Docstring | ||
Unregister a provider, the provider object is deleted. | ||
Returns true on success, false if the provider was not registered. * | ||
:rtype: bool | ||
%End | ||
|
||
protected: | ||
|
||
private: | ||
|
||
private: | ||
QgsLayerTreeEmbeddedWidgetRegistry( const QgsLayerTreeEmbeddedWidgetRegistry &other ); | ||
}; | ||
|
||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/layertree/qgslayertreeembeddedwidgetregistry.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
Oops, something went wrong.