-
-
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
34 changed files
with
1,953 additions
and
1,185 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
107 changes: 88 additions & 19 deletions
107
python/gui/editorwidgets/core/qgseditorconfigwidget.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,38 +1,107 @@ | ||
/*************************************************************************** | ||
qgseditorconfigwidget.sip | ||
-------------------------------------- | ||
Date : 24.4.2013 | ||
Copyright : (C) 2013 Matthias Kuhn | ||
Email : matthias at opengis dot ch | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
class QgsEditorConfigWidget : QWidget | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/editorwidgets/core/qgseditorconfigwidget.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
|
||
|
||
class QgsEditorConfigWidget : QWidget, QgsExpressionContextGenerator | ||
{ | ||
%TypeHeaderCode | ||
#include <qgseditorconfigwidget.h> | ||
%Docstring | ||
This class should be subclassed for every configurable editor widget type. | ||
|
||
It implements the GUI configuration widget and transforms this to/from a configuration. | ||
|
||
.. seealso:: QgsEditorWidgetFactory} | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgseditorconfigwidget.h" | ||
%End | ||
public: | ||
|
||
explicit QgsEditorConfigWidget( QgsVectorLayer *vl, int fieldIdx, QWidget *parent /TransferThis/ ); | ||
%Docstring | ||
Create a new configuration widget | ||
|
||
\param vl The layer for which the configuration dialog will be created | ||
\param fieldIdx The index of the field on the layer for which this dialog will be created | ||
\param parent A parent widget | ||
%End | ||
|
||
virtual QVariantMap config() = 0; | ||
%Docstring | ||
Create a configuration from the current GUI state | ||
|
||
:return: A widget configuration | ||
:rtype: QVariantMap | ||
%End | ||
|
||
virtual void setConfig( const QVariantMap &config ) = 0; | ||
%Docstring | ||
Update the configuration widget to represent the given configuration. | ||
|
||
\param config The configuration which should be represented by this widget | ||
%End | ||
|
||
int field(); | ||
%Docstring | ||
Returns the field for which this configuration widget applies | ||
|
||
:return: The field index | ||
:rtype: int | ||
%End | ||
|
||
QgsVectorLayer *layer(); | ||
QgsExpressionContext createExpressionContext() const; | ||
%Docstring | ||
Returns the layer for which this configuration widget applies | ||
|
||
:return: The layer | ||
:rtype: QgsVectorLayer | ||
%End | ||
|
||
virtual QgsExpressionContext createExpressionContext() const; | ||
|
||
|
||
signals: | ||
|
||
void changed(); | ||
%Docstring | ||
Emitted when the configuration of the widget is changed. | ||
.. versionadded:: 3.0 | ||
%End | ||
|
||
protected: | ||
|
||
void initializeDataDefinedButton( QgsPropertyOverrideButton *button, QgsWidgetWrapper::Property key ); | ||
%Docstring | ||
Registers a property override button, setting up its initial value, connections and description. | ||
\param button button to register | ||
\param key corresponding data defined property key | ||
%End | ||
|
||
void updateDataDefinedButtons(); | ||
%Docstring | ||
Updates all property override buttons to reflect the widgets's current properties. | ||
%End | ||
|
||
void updateDataDefinedButton( QgsPropertyOverrideButton *button ); | ||
%Docstring | ||
Updates a specific property override ``button`` to reflect the widgets's current properties. | ||
%End | ||
|
||
|
||
}; | ||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/editorwidgets/core/qgseditorconfigwidget.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
79 changes: 44 additions & 35 deletions
79
python/gui/editorwidgets/core/qgseditorwidgetautoconf.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,41 +1,50 @@ | ||
/*************************************************************************** | ||
qgseditorwidgetautoconf.sip | ||
--------------------- | ||
begin : July 2016 | ||
copyright : (C) 2016 by Patrick Valsecchi | ||
email : patrick.valsecchi at camptocamp.com | ||
*************************************************************************** | ||
* * | ||
* This program is free software; you can redistribute it and/or modify * | ||
* it under the terms of the GNU General Public License as published by * | ||
* the Free Software Foundation; either version 2 of the License, or * | ||
* (at your option) any later version. * | ||
* * | ||
***************************************************************************/ | ||
|
||
/** | ||
* Base class for plugins allowing to pick automatically a widget type for editing fields. | ||
* | ||
* @note added in QGIS 3.0 | ||
*/ | ||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/editorwidgets/core/qgseditorwidgetautoconf.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ | ||
|
||
|
||
|
||
class QgsEditorWidgetAutoConfPlugin | ||
{ | ||
%TypeHeaderCode | ||
#include <qgseditorwidgetautoconf.h> | ||
%End | ||
%Docstring | ||
Base class for plugins allowing to pick automatically a widget type for editing fields. | ||
|
||
.. versionadded:: 3.0 | ||
%End | ||
|
||
%TypeHeaderCode | ||
#include "qgseditorwidgetautoconf.h" | ||
%End | ||
public: | ||
/** | ||
* Typical scores are: | ||
* * 0: no matching type found. | ||
* * 10: a widget has been guessed from the type of field. | ||
* * 20: a widget has been determined from an external configuration (for example a database table) | ||
* | ||
* @param vl The vector layer for which this widget will be created | ||
* @param fieldName The field name on the specified layer for which this widget will be created | ||
* @param score Where the score is returned (default to 0) | ||
* | ||
* @return and integer value rating how good is the setup provided by this plugin. | ||
*/ | ||
|
||
virtual QgsEditorWidgetSetup editorWidgetSetup( const QgsVectorLayer *vl, const QString &fieldName, int &score /Out/ ) const = 0; | ||
%Docstring | ||
Typical scores are: | ||
* 0: no matching type found. | ||
* 10: a widget has been guessed from the type of field. | ||
* 20: a widget has been determined from an external configuration (for example a database table) | ||
|
||
\param vl The vector layer for which this widget will be created | ||
\param fieldName The field name on the specified layer for which this widget will be created | ||
\param score Where the score is returned (default to 0) | ||
|
||
:return: and integer value rating how good is the setup provided by this plugin. | ||
:rtype: QgsEditorWidgetSetup | ||
%End | ||
|
||
}; | ||
|
||
|
||
|
||
|
||
/************************************************************************ | ||
* This file has been generated automatically from * | ||
* * | ||
* src/gui/editorwidgets/core/qgseditorwidgetautoconf.h * | ||
* * | ||
* Do not edit manually ! Edit header and run scripts/sipify.pl again * | ||
************************************************************************/ |
Oops, something went wrong.