sipify gui part 1

This commit is contained in:
Denis Rouzaud 2017-05-23 14:36:52 +02:00
parent 5c6ab71342
commit 694c8113e5
14 changed files with 1634 additions and 706 deletions

View File

@ -134,18 +134,6 @@ core/symbology-ng/qgssymbollayerutils.sip
core/symbology-ng/qgsvectorfieldsymbollayer.sip
core/symbology-ng/qgsarrowsymbollayer.sip
core/dxf/qgsdxfexport.sip
gui/qgsblendmodecombobox.sip
gui/qgisinterface.sip
gui/qgsactionmenu.sip
gui/qgsadvanceddigitizingcanvasitem.sip
gui/qgsattributedialog.sip
gui/qgsattributeeditorcontext.sip
gui/qgsattributeform.sip
gui/qgsattributeformeditorwidget.sip
gui/qgsattributeforminterface.sip
gui/qgsattributetypeloaddialog.sip
gui/qgsbrowsertreeview.sip
gui/qgsbusyindicatordialog.sip
gui/qgscodeeditor.sip
gui/qgscodeeditorpython.sip
gui/qgscodeeditorsql.sip

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,31 @@
/**
* This class is a menu that is populated automatically with the actions defined for a given layer.
*/
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsactionmenu.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsActionMenu : QMenu
{
%TypeHeaderCode
#include <qgsactionmenu.h>
%Docstring
This class is a menu that is populated automatically with the actions defined for a given layer.
%End
%TypeHeaderCode
#include "qgsactionmenu.h"
%End
public:
enum ActionType
{
Invalid, //!< Invalid
MapLayerAction, //!< Standard actions (defined by core or plugins)
AttributeAction //!< Custom actions (manually defined in layer properties)
Invalid,
MapLayerAction,
AttributeAction
};
struct ActionData
@ -22,47 +34,52 @@ class QgsActionMenu : QMenu
ActionData( const QgsAction &action, QgsFeatureId featureId, QgsMapLayer *mapLayer );
ActionData( QgsMapLayerAction *action, QgsFeatureId featureId, QgsMapLayer *mapLayer );
QgsActionMenu::ActionType actionType;
ActionType actionType;
QVariant actionData;
QgsFeatureId featureId;
QgsMapLayer *mapLayer;
};
/**
* Constructs a new QgsActionMenu
*
* @param layer The layer that this action will be run upon.
* @param feature The feature that this action will be run upon. Make sure that this feature is available
* for the lifetime of this object.
* @param parent The usual QWidget parent.
* @param actionScope The action scope this menu will run in
*/
explicit QgsActionMenu( QgsVectorLayer *layer, const QgsFeature &feature, const QString &actionScope, QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructs a new QgsActionMenu
\param layer The layer that this action will be run upon.
\param feature The feature that this action will be run upon. Make sure that this feature is available
for the lifetime of this object.
\param parent The usual QWidget parent.
\param actionScope The action scope this menu will run in
%End
/**
* Constructs a new QgsActionMenu
*
* @param layer The layer that this action will be run upon.
* @param fid The feature id of the feature for which this action will be run.
* @param parent The usual QWidget parent.
* @param actionScope The action scope this menu will run in
*/
explicit QgsActionMenu( QgsVectorLayer *layer, const QgsFeatureId fid, const QString &actionScope, QWidget *parent /TransferThis/ = 0 );
%Docstring
Constructs a new QgsActionMenu
/**
* Destructor
*/
~QgsActionMenu();
\param layer The layer that this action will be run upon.
\param fid The feature id of the feature for which this action will be run.
\param parent The usual QWidget parent.
\param actionScope The action scope this menu will run in
%End
/**
* Change the feature on which actions are performed
*
* @param feature A feature. Will not take ownership. It's the callers responsibility to keep the feature
* as long as the menu is displayed and the action is running.
*/
void setFeature( const QgsFeature &feature );
%Docstring
Change the feature on which actions are performed
\param feature A feature. Will not take ownership. It's the callers responsibility to keep the feature
as long as the menu is displayed and the action is running.
%End
signals:
void reinit();
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsactionmenu.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,16 +1,38 @@
/**
* @brief The QgsAdvancedDigitizingCanvasItem class draws the graphical elements of the CAD tools (@see QgsAdvancedDigitizingDockWidget) on the map canvas.
*/
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsadvanceddigitizingcanvasitem.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsAdvancedDigitizingCanvasItem : QgsMapCanvasItem
{
%Docstring
.. seealso:: QgsAdvancedDigitizingDockWidget) on the map canvas.
%End
%TypeHeaderCode
#include <qgsadvanceddigitizingcanvasitem.h>
#include "qgsadvanceddigitizingcanvasitem.h"
%End
public:
explicit QgsAdvancedDigitizingCanvasItem( QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget );
~QgsAdvancedDigitizingCanvasItem();
void paint( QPainter *painter );
virtual void paint( QPainter *painter );
protected:
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsadvanceddigitizingcanvasitem.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,83 +1,114 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsattributedialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsAttributeDialog : QDialog
{
%TypeHeaderCode
#include <qgsattributedialog.h>
%End
%TypeHeaderCode
#include "qgsattributedialog.h"
%End
public:
/**
* Create an attribute dialog for a given layer and feature
*
* @param vl The layer for which the dialog will be generated
* @param thepFeature A feature for which the dialog will be generated
* @param featureOwner Set to true, if the dialog should take ownership of the feature
* @param parent A parent widget for the dialog
* @param showDialogButtons True: Show the dialog buttons accept/cancel
* @param context The context in which this dialog is created
*
*/
QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, QWidget *parent /TransferThis/ = 0, bool showDialogButtons = true, const QgsAttributeEditorContext &context = QgsAttributeEditorContext() );
%Docstring
Create an attribute dialog for a given layer and feature
\param vl The layer for which the dialog will be generated
\param thepFeature A feature for which the dialog will be generated
\param featureOwner Set to true, if the dialog should take ownership of the feature
\param parent A parent widget for the dialog
\param showDialogButtons True: Show the dialog buttons accept/cancel
\param context The context in which this dialog is created
%End
~QgsAttributeDialog();
/** Saves the size and position for the next time
* this dialog box will be used.
*/
void saveGeometry();
%Docstring
Saves the size and position for the next time
this dialog box will be used.
%End
/** Restores the size and position from the last time
* this dialog box was used.
*/
void restoreGeometry();
%Docstring
Restores the size and position from the last time
this dialog box was used.
%End
/**
* @brief setHighlight
* @param h The highlight. Ownership is taken.
*/
void setHighlight( QgsHighlight *h );
%Docstring
setHighlight
\param h The highlight. Ownership is taken.
%End
QgsAttributeForm *attributeForm();
%Docstring
:rtype: QgsAttributeForm
%End
const QgsFeature *feature();
%Docstring
:rtype: QgsFeature
%End
/**
* Is this dialog editable?
*
* @return returns true, if this dialog was created in an editable manner.
*/
bool editable();
%Docstring
Is this dialog editable?
:return: returns true, if this dialog was created in an editable manner.
:rtype: bool
%End
/**
* Toggles the form mode.
* @param mode form mode. For example, if set to QgsAttributeForm::AddFeatureMode, the dialog will be editable even with an invalid feature and
* will add a new feature when the form is accepted.
*/
void setMode( QgsAttributeForm::Mode mode );
%Docstring
Toggles the form mode.
\param mode form mode. For example, if set to QgsAttributeForm.AddFeatureMode, the dialog will be editable even with an invalid feature and
will add a new feature when the form is accepted.
%End
/**
* Sets the edit command message (Undo) that will be used when the dialog is accepted
*
* @param message The message
*/
void setEditCommandMessage( const QString &message );
%Docstring
Sets the edit command message (Undo) that will be used when the dialog is accepted
\param message The message
%End
/**
* Intercept window activate/deactive events to show/hide the highlighted feature.
*
* @param e The event
*
* @return The same as the parent QDialog
*/
virtual bool event( QEvent *e );
%Docstring
Intercept window activate/deactive events to show/hide the highlighted feature.
\param e The event
:return: The same as the parent QDialog
:rtype: bool
%End
public slots:
void accept();
virtual void accept();
virtual void reject();
//! Show the dialog non-blocking. Reparents this dialog to be a child of the dialog form and is deleted when
//! closed.
void show();
%Docstring
Show the dialog non-blocking. Reparents this dialog to be a child of the dialog form
%End
int exec();
protected:
bool eventFilter( QObject *obj, QEvent *e );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsattributedialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,23 +1,34 @@
/**
* This class contains context information for attribute editor widgets.
* It will be passed to embedded widgets whenever this occurs (e.g. when
* showing an embedded form due to relations)
*/
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsattributeeditorcontext.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsAttributeEditorContext
{
%Docstring
This class contains context information for attribute editor widgets.
It will be passed to embedded widgets whenever this occurs (e.g. when
showing an embedded form due to relations)
%End
%TypeHeaderCode
#include "qgsattributeeditorcontext.h"
%End
public:
/**
* Determines in which direction a relation was resolved.
*/
enum RelationMode
{
Undefined, //!< This context is not defined by a relation
Multiple, //!< When showing a list of features (e.g. houses as an embedded form in a district form)
Single //!< When showing a single feature (e.g. district information when looking at the form of a house)
Undefined,
Multiple,
Single
};
enum FormMode
@ -28,45 +39,77 @@ class QgsAttributeEditorContext
};
QgsAttributeEditorContext();
QgsAttributeEditorContext( const QgsAttributeEditorContext &parentContext, FormMode formMode );
QgsAttributeEditorContext( const QgsAttributeEditorContext &parentContext, const QgsRelation &relation, RelationMode relationMode, FormMode formMode );
QgsAttributeEditorContext( const QgsAttributeEditorContext &parentContext, FormMode formMode );
QgsAttributeEditorContext( const QgsAttributeEditorContext &parentContext, const QgsRelation &relation, RelationMode relationMode, FormMode widgetMode );
void setDistanceArea( const QgsDistanceArea &distanceArea );
const QgsDistanceArea &distanceArea() const;
%Docstring
:rtype: QgsDistanceArea
%End
void setVectorLayerTools( QgsVectorLayerTools *vlTools );
const QgsVectorLayerTools *vectorLayerTools() const;
%Docstring
:rtype: QgsVectorLayerTools
%End
void setRelation( const QgsRelation &relation, RelationMode mode );
const QgsRelation &relation() const;
%Docstring
:rtype: QgsRelation
%End
RelationMode relationMode() const;
%Docstring
:rtype: RelationMode
%End
/** Returns the form mode.
* @see setFormMode()
*/
FormMode formMode() const;
%Docstring
Returns the form mode.
.. seealso:: setFormMode()
:rtype: FormMode
%End
/** Sets the form mode.
* @param mode form mode
* @see formMode()
* @note added in QGIS 2.16
*/
void setFormMode( FormMode mode );
%Docstring
Sets the form mode.
\param mode form mode
.. seealso:: formMode()
.. versionadded:: 2.16
%End
/** Returns true if the attribute editor should permit use of custom UI forms.
* @see setAllowCustomUi()
* @note added in QGIS 2.16
*/
bool allowCustomUi() const;
%Docstring
Returns true if the attribute editor should permit use of custom UI forms.
.. seealso:: setAllowCustomUi()
.. versionadded:: 2.16
:rtype: bool
%End
/** Sets whether the attribute editor should permit use of custom UI forms.
* @param allow set to true to allow custom UI forms, or false to disable them and use default generated
* QGIS forms
* @see allowCustomUi()
* @note added in QGIS 2.16
*/
void setAllowCustomUi( bool allow );
%Docstring
Sets whether the attribute editor should permit use of custom UI forms.
\param allow set to true to allow custom UI forms, or false to disable them and use default generated
QGIS forms
.. seealso:: allowCustomUi()
.. versionadded:: 2.16
%End
const QgsAttributeEditorContext *parentContext() const;
%Docstring
:rtype: QgsAttributeEditorContext
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsattributeeditorcontext.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,210 +1,227 @@
/***************************************************************************
qgsattributeform.h
--------------------------------------
Date : 3.5.2014
Copyright : (C) 2014 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. *
* *
***************************************************************************/
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsattributeform.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsAttributeForm : QWidget
{
%TypeHeaderCode
#include <qgsattributeform.h>
%End
%TypeHeaderCode
#include "qgsattributeform.h"
%End
public:
//! Form modes
enum Mode
{
SingleEditMode, /*!< Single edit mode, for editing a single feature */
AddFeatureMode, /*!< Add feature mode, for setting attributes for a new feature. In this mode the dialog will be editable even with an invalid feature and
will add a new feature when the form is accepted. */
MultiEditMode, /*!< Multi edit mode, for editing fields of multiple features at once */
SearchMode, /*!< Form values are used for searching/filtering the layer */
SingleEditMode,
AddFeatureMode,
MultiEditMode,
SearchMode,
};
//! Filter types
enum FilterType
{
ReplaceFilter, /*!< Filter should replace any existing filter */
FilterAnd, /*!< Filter should be combined using "AND" */
FilterOr, /*!< Filter should be combined using "OR" */
ReplaceFilter,
FilterAnd,
FilterOr,
};
explicit QgsAttributeForm( QgsVectorLayer *vl, const QgsFeature &feature = QgsFeature(), const QgsAttributeEditorContext &context = QgsAttributeEditorContext(), QWidget *parent /TransferThis/ = 0 );
explicit QgsAttributeForm( QgsVectorLayer *vl, const QgsFeature &feature = QgsFeature(),
const QgsAttributeEditorContext &context = QgsAttributeEditorContext(), QWidget *parent = 0 );
~QgsAttributeForm();
const QgsFeature &feature();
%Docstring
:rtype: QgsFeature
%End
/**
* Hides the button box (Ok/Cancel) and enables auto-commit
*/
void hideButtonBox();
/**
* Shows the button box (Ok/Cancel) and disables auto-commit
*/
void showButtonBox();
/**
* Disconnects the button box (Ok/Cancel) from the accept/resetValues slots
* If this method is called, you have to create these connections from outside
*/
void disconnectButtonBox();
/**
* Takes ownership
* @param iface
*/
void addInterface( QgsAttributeFormInterface *iface /Transfer/ );
%Docstring
Takes ownership
\param iface
%End
/**
* Returns the layer for which this form is shown
*
* @return Layer
*/
QgsVectorLayer *layer();
%Docstring
Returns the layer for which this form is shown
:return: Layer
:rtype: QgsVectorLayer
%End
/**
* Returns if the form is currently in editable mode.
*
* @return Editable mode of this form
*/
bool editable();
%Docstring
Returns if the form is currently in editable mode.
:return: Editable mode of this form
:rtype: bool
%End
/** Returns the current mode of the form.
* @note added in QGIS 2.16
* @see setMode()
*/
Mode mode() const;
%Docstring
Returns the current mode of the form.
.. versionadded:: 2.16
.. seealso:: setMode()
:rtype: Mode
%End
/** Sets the current mode of the form.
* @param mode form mode
* @note added in QGIS 2.16
* @see mode()
*/
void setMode( Mode mode );
%Docstring
Sets the current mode of the form.
\param mode form mode
.. versionadded:: 2.16
.. seealso:: mode()
%End
/**
* Sets the edit command message (Undo) that will be used when the dialog is accepted
*
* @param message The message
*/
void setEditCommandMessage( const QString &message );
%Docstring
Sets the edit command message (Undo) that will be used when the dialog is accepted
/**
* Intercepts keypress on custom form (escape should not close it)
*
* @param object The object for which the event has been sent
* @param event The event which is being filtered
*
* @return true if the event has been handled (key was ESC)
*/
bool eventFilter( QObject *object, QEvent *event );
\param message The message
%End
virtual bool eventFilter( QObject *object, QEvent *event );
%Docstring
Intercepts keypress on custom form (escape should not close it)
\param object The object for which the event has been sent
\param event The event which is being filtered
:return: true if the event has been handled (key was ESC)
:rtype: bool
%End
/** Sets all feature IDs which are to be edited if the form is in multiedit mode
* @param fids feature ID list
* @note added in QGIS 2.16
*/
void setMultiEditFeatureIds( const QgsFeatureIds &fids );
%Docstring
Sets all feature IDs which are to be edited if the form is in multiedit mode
\param fids feature ID list
.. versionadded:: 2.16
%End
/** Sets the message bar to display feedback from the form in. This is used in the search/filter
* mode to display the count of selected features.
* @param messageBar target message bar
* @note added in QGIS 2.16
*/
void setMessageBar( QgsMessageBar *messageBar );
%Docstring
Sets the message bar to display feedback from the form in. This is used in the search/filter
mode to display the count of selected features.
\param messageBar target message bar
.. versionadded:: 2.16
%End
signals:
/**
* Notifies about changes of attributes
*
* @param attribute The name of the attribute that changed.
* @param value The new value of the attribute.
*/
void attributeChanged( const QString &attribute, const QVariant &value );
%Docstring
Notifies about changes of attributes
/**
* Will be emitted before the feature is saved. Use this signal to perform sanity checks.
* You can set the parameter ok to false to notify the form that you don't want it to be saved.
* If you want the form to be saved, leave the parameter untouched.
*
* @param ok Set this parameter to false if you don't want the form to be saved
* @note not available in python bindings
*/
// void beforeSave( bool &ok );
\param attribute The name of the attribute that changed.
\param value The new value of the attribute.
%End
void beforeSave( bool &ok );
%Docstring
Will be emitted before the feature is saved. Use this signal to perform sanity checks.
You can set the parameter ok to false to notify the form that you don't want it to be saved.
If you want the form to be saved, leave the parameter untouched.
\param ok Set this parameter to false if you don't want the form to be saved
.. note::
not available in Python bindings
%End
/**
* Is emitted, when a feature is changed or added
*/
void featureSaved( const QgsFeature &feature );
%Docstring
Is emitted, when a feature is changed or added
%End
/** Is emitted when a filter expression is set using the form.
* @param expression filter expression
* @param type filter type
* @note added in QGIS 2.16
*/
void filterExpressionSet( const QString &expression, QgsAttributeForm::FilterType type );
%Docstring
Is emitted when a filter expression is set using the form.
\param expression filter expression
\param type filter type
.. versionadded:: 2.16
%End
/** Emitted when the form changes mode.
* @param mode new mode
*/
void modeChanged( QgsAttributeForm::Mode mode );
%Docstring
Emitted when the form changes mode.
\param mode new mode
%End
/** Emitted when the user selects the close option from the form's button bar.
* @note added in QGIS 2.16
*/
void closed();
%Docstring
Emitted when the user selects the close option from the form's button bar.
.. versionadded:: 2.16
%End
/**
* Emitted when the user chooses to zoom to a filtered set of features.
* @note added in QGIS 3.0
*/
void zoomToFeatures( const QString &filter );
%Docstring
Emitted when the user chooses to zoom to a filtered set of features.
.. versionadded:: 3.0
%End
public slots:
/**
* Call this to change the content of a given attribute. Will update the editor(s) related to this field.
*
* @param field The field to change
* @param value The new value
*/
void changeAttribute( const QString &field, const QVariant &value );
%Docstring
Call this to change the content of a given attribute. Will update the editor(s) related to this field.
\param field The field to change
\param value The new value
%End
/**
* Update all editors to correspond to a different feature.
*
* @param feature The feature which will be represented by the form
*/
void setFeature( const QgsFeature &feature );
%Docstring
Update all editors to correspond to a different feature.
\param feature The feature which will be represented by the form
%End
/**
* Save all the values from the editors to the layer.
*
* @return True if successful
*/
bool save();
%Docstring
Save all the values from the editors to the layer.
:return: True if successful
:rtype: bool
%End
/**
* Sets all values to the values of the current feature
*/
void resetValues();
%Docstring
Sets all values to the values of the current feature
%End
/** Resets the search/filter form values.
* @note added in QGIS 2.16
*/
void resetSearch();
%Docstring
Resets the search/filter form values.
.. versionadded:: 2.16
%End
/**
* reload current feature
*/
void refreshFeature();
%Docstring
reload current feature
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsattributeform.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,130 +1,170 @@
/** \ingroup gui
* \class QgsAttributeFormEditorWidget
* A widget consisting of both an editor widget and additional widgets for controlling the behavior
* of the editor widget depending on a number of possible modes. For instance, if the parent attribute
* form is in the multi edit mode, this widget will show both the editor widget and a tool button for
* controlling the multi edit results.
* \note Added in version 2.16
*/
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsattributeformeditorwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsAttributeFormEditorWidget : QWidget
{
%TypeHeaderCode
#include <qgsattributeformeditorwidget.h>
%Docstring
A widget consisting of both an editor widget and additional widgets for controlling the behavior
of the editor widget depending on a number of possible modes. For instance, if the parent attribute
form is in the multi edit mode, this widget will show both the editor widget and a tool button for
controlling the multi edit results.
.. versionadded:: 2.16
%End
%TypeHeaderCode
#include "qgsattributeformeditorwidget.h"
%End
public:
//! Widget modes
enum Mode
{
DefaultMode, /*!< Default mode, only the editor widget is shown */
MultiEditMode, /*!< Multi edit mode, both the editor widget and a QgsMultiEditToolButton is shown */
SearchMode, /*!< Layer search/filter mode */
DefaultMode,
MultiEditMode,
SearchMode,
};
/** Constructor for QgsAttributeFormEditorWidget.
* @param editorWidget associated editor widget wrapper (for default/edit modes)
* @param form parent attribute form
*/
explicit QgsAttributeFormEditorWidget( QgsEditorWidgetWrapper* editorWidget,
explicit QgsAttributeFormEditorWidget( QgsEditorWidgetWrapper *editorWidget,
QgsAttributeForm *form /TransferThis/ );
%Docstring
Constructor for QgsAttributeFormEditorWidget.
\param editorWidget associated editor widget wrapper (for default/edit modes)
\param form parent attribute form
%End
~QgsAttributeFormEditorWidget();
/** Creates the search widget wrappers for the widget used when the form is in
* search mode.
* @param widgetId id of the widget type to create a search wrapper for
* @param fieldIdx index of field associated with widget
* @param config configuration which should be used for the widget creation
* @param context editor context (not available in python bindings)
*/
void createSearchWidgetWrappers( const QString& widgetId, int fieldIdx,
const QVariantMap& config,
const QgsAttributeEditorContext &context = QgsAttributeEditorContext() );
/** Sets the current mode for the widget. The widget will adapt its state and visible widgets to
* reflect the updated mode. For example, showing multi edit tool buttons if the mode is set to MultiEditMode.
* @param mode widget mode
* @see mode()
*/
void setMode( Mode mode );
%Docstring
Sets the current mode for the widget. The widget will adapt its state and visible widgets to
reflect the updated mode. For example, showing multi edit tool buttons if the mode is set to MultiEditMode.
\param mode widget mode
.. seealso:: mode()
%End
/** Returns the current mode for the widget.
* @see setMode()
*/
Mode mode() const;
%Docstring
Returns the current mode for the widget.
.. seealso:: setMode()
:rtype: Mode
%End
/** Resets the widget to an initial value.
* @param initialValue initial value to show in widget
* @param mixedValues set to true to initially show the mixed values state
*/
void initialize( const QVariant &initialValue, bool mixedValues = false );
%Docstring
Resets the widget to an initial value.
\param initialValue initial value to show in widget
\param mixedValues set to true to initially show the mixed values state
%End
/** Returns true if the widget's value has been changed since it was initialized.
* @see initialize()
*/
bool hasChanged() const;
%Docstring
Returns true if the widget's value has been changed since it was initialized.
.. seealso:: initialize()
:rtype: bool
%End
/** Returns the current value of the attached editor widget.
*/
QVariant currentValue() const;
%Docstring
Returns the current value of the attached editor widget.
:rtype: QVariant
%End
/** Creates an expression matching the current search filter value and
* search properties represented in the widget.
* @note added in QGIS 2.16
*/
QString currentFilterExpression() const;
%Docstring
Creates an expression matching the current search filter value and
search properties represented in the widget.
.. versionadded:: 2.16
:rtype: str
%End
public slots:
/** Sets whether the widget should be displayed in a "mixed values" mode.
* @param mixed set to true to show in a mixed values state
*/
void setIsMixed( bool mixed );
%Docstring
Sets whether the widget should be displayed in a "mixed values" mode.
\param mixed set to true to show in a mixed values state
%End
/* *Called when field values have been committed;
*/
void changesCommitted();
%Docstring
Called when field values have been committed;
%End
/** Resets the search/filter value of the widget.
*/
void resetSearch();
%Docstring
Resets the search/filter value of the widget.
%End
signals:
//! Emitted when the widget's value changes
//! @param value new widget value
void valueChanged( const QVariant &value );
%Docstring
\param value new widget value
%End
protected:
/** Returns a pointer to the search widget tool button in the widget.
* @note this method is in place for unit testing only, and is not considered
* stable API
*/
QgsSearchWidgetToolButton *searchWidgetToolButton();
%Docstring
Returns a pointer to the search widget tool button in the widget.
.. note::
this method is in place for unit testing only, and is not considered
stable API
:rtype: QgsSearchWidgetToolButton
%End
/** Sets the search widget wrapper for the widget used when the form is in
* search mode.
* @param wrapper search widget wrapper.
* @note the search widget wrapper should be created using searchWidgetFrame()
* as its parent
* @note this method is in place for unit testing only, and is not considered
* stable AP
*/
void setSearchWidgetWrapper( QgsSearchWidgetWrapper *wrapper );
%Docstring
Sets the search widget wrapper for the widget used when the form is in
search mode.
\param wrapper search widget wrapper.
.. note::
the search widget wrapper should be created using searchWidgetFrame()
as its parent
.. note::
this method is in place for unit testing only, and is not considered
stable AP
%End
/** Returns the widget which should be used as a parent during construction
* of the search widget wrapper.
* @note this method is in place for unit testing only, and is not considered
* stable AP
*/
QWidget *searchWidgetFrame();
%Docstring
Returns the widget which should be used as a parent during construction
of the search widget wrapper.
.. note::
/** Returns the search widget wrapper used in this widget. The wrapper must
* first be created using createSearchWidgetWrapper()
* @note this method is in place for unit testing only, and is not considered
* stable AP
*/
QList< QgsSearchWidgetWrapper* > searchWidgetWrappers();
this method is in place for unit testing only, and is not considered
stable AP
:rtype: QWidget
%End
QList< QgsSearchWidgetWrapper * > searchWidgetWrappers();
%Docstring
Returns the search widget wrapper used in this widget. The wrapper must
first be created using createSearchWidgetWrapper()
.. note::
this method is in place for unit testing only, and is not considered
stable AP
:rtype: list of QgsSearchWidgetWrapper
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsattributeformeditorwidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,33 +1,50 @@
/***************************************************************************
qgsattributeforminterface.sip
--------------------------------------
Date : 12.5.2014
Copyright : (C) 2014 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. *
* *
***************************************************************************/
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsattributeforminterface.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsAttributeFormInterface
{
%TypeHeaderCode
#include <qgsattributeforminterface.h>
#include "qgsattributeforminterface.h"
%End
public:
explicit QgsAttributeFormInterface( QgsAttributeForm *form );
virtual ~QgsAttributeFormInterface();
virtual bool acceptChanges( const QgsFeature &feature );
%Docstring
:rtype: bool
%End
virtual void initForm();
virtual void featureChanged();
QgsAttributeForm *form();
%Docstring
:rtype: QgsAttributeForm
%End
const QgsFeature &feature();
%Docstring
:rtype: QgsFeature
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsattributeforminterface.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,35 +1,58 @@
class QgsAttributeTypeLoadDialog : QDialog
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsattributetypeloaddialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsAttributeTypeLoadDialog: QDialog
{
%TypeHeaderCode
#include <qgsattributetypeloaddialog.h>
#include "qgsattributetypeloaddialog.h"
%End
public:
QgsAttributeTypeLoadDialog( QgsVectorLayer *vl );
~QgsAttributeTypeLoadDialog();
/**
* Overloaded accept method which will write the feature field
* values, then delegate to QDialog::accept()
*/
void accept();
virtual void accept();
%Docstring
Overloaded accept method which will write the feature field
values, then delegate to QDialog.accept()
%End
/**
* Sets predefined vector layer for selection of data
* @param layer Vector layer which is to be set as predefined one
*/
void setVectorLayer( QgsVectorLayer *layer );
%Docstring
Sets predefined vector layer for selection of data
\param layer Vector layer which is to be set as predefined one
%End
/**
* Getter to value map which is currently active
* @return value map of vlues selected from layer
*/
QMap<QString, QVariant> &valueMap();
%Docstring
Getter to value map which is currently active
:return: value map of vlues selected from layer
:rtype: QMap<str, QVariant>
%End
/**
* Returns true if the "Add NULL value" checkbox has been checked.
*
* @return true if the "Add NULL value" checkbox has been checked.
*/
bool insertNull();
%Docstring
Returns true if the "Add NULL value" checkbox has been checked.
:return: true if the "Add NULL value" checkbox has been checked.
:rtype: bool
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsattributetypeloaddialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,21 +1,50 @@
/** \ingroup gui
* A combobox which lets the user select blend modes from a predefined list
**/
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsblendmodecombobox.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsBlendModeComboBox : QComboBox
{
%Docstring
A combobox which lets the user select blend modes from a predefined list
*
%End
%TypeHeaderCode
#include <qgsblendmodecombobox.h>
#include "qgsblendmodecombobox.h"
%End
public:
QgsBlendModeComboBox( QWidget *parent /TransferThis/ = 0 );
virtual ~QgsBlendModeComboBox();
//! Function to read the selected blend mode as QPainter::CompositionMode
QPainter::CompositionMode blendMode();
//! Function to set the selected blend mode from QPainter::CompositionMode
%Docstring
Function to read the selected blend mode as QPainter.CompositionMode
:rtype: QPainter.CompositionMode
%End
void setBlendMode( QPainter::CompositionMode blendMode );
%Docstring
Function to set the selected blend mode from QPainter.CompositionMode
%End
public slots:
void updateModes();
%Docstring
Populates the blend mode combo box, and sets up mapping for
blend modes to combo box indexes
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsblendmodecombobox.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,29 +1,49 @@
/**
* The QgsBrowserTreeView class extends QTreeView with save/restore tree state functionality.
*
* @see QgsBrowserModel
* @note added in 2.8
*/
class QgsBrowserTreeView: QTreeView
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsbrowsertreeview.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsBrowserTreeView : QTreeView
{
%TypeHeaderCode
#include <qgsbrowsertreeview.h>
%Docstring
The QgsBrowserTreeView class extends QTreeView with save/restore tree state functionality.
.. seealso:: QgsBrowserModel
.. versionadded:: 2.8
%End
%TypeHeaderCode
#include "qgsbrowsertreeview.h"
%End
public:
QgsBrowserTreeView( QWidget *parent /TransferThis/ = 0 );
~QgsBrowserTreeView();
virtual void setModel( QAbstractItemModel *model );
virtual void showEvent( QShowEvent *e );
virtual void hideEvent( QHideEvent *e );
// returns true if at least one descendat is expanded, used in refresh
bool hasExpandedDescendant( const QModelIndex &index ) const;
%Docstring
:rtype: bool
%End
// Set section where to store settings (because we have 2 browser dock widgets)
void setSettingsSection( const QString &section );
protected slots:
virtual void rowsInserted( const QModelIndex &parentIndex, int start, int end );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsbrowsertreeview.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -1,23 +1,48 @@
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsbusyindicatordialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
/** \ingroup gui
* \class QgsBusyIndicatorDialog
* A simple dialog to show an indeterminate busy progress indicator.
*/
class QgsBusyIndicatorDialog : QDialog
{
%Docstring
A simple dialog to show an indeterminate busy progress indicator.
%End
%TypeHeaderCode
#include <qgsbusyindicatordialog.h>
#include "qgsbusyindicatordialog.h"
%End
public:
/** Constructor
* Modal busy indicator dialog with no buttons.
* @param message Text to show above busy progress indicator.
* @param parent parent object (owner)
* @param fl widget flags
*/
QgsBusyIndicatorDialog( const QString &message = "", QWidget *parent /TransferThis/ = 0, const Qt::WindowFlags &fl = QgsGuiUtils::ModalDialogFlags );
~QgsBusyIndicatorDialog();
QgsBusyIndicatorDialog( const QString &message = "", QWidget *parent = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
%Docstring
Constructor
Modal busy indicator dialog with no buttons.
\param message Text to show above busy progress indicator.
\param parent parent object (owner)
\param fl widget flags
%End
QString message() const;
%Docstring
:rtype: str
%End
void setMessage( const QString &message );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsbusyindicatordialog.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/

View File

@ -360,7 +360,7 @@ while ($line_idx < $line_count){
next;
}
# Skip Q_OBJECT, Q_PROPERTY, Q_ENUM, Q_GADGET
if ($line =~ m/^\s*Q_(OBJECT|ENUMS|PROPERTY|GADGET|DECLARE_METATYPE|DECLARE_TYPEINFO).*?$/){
if ($line =~ m/^\s*Q_(OBJECT|ENUMS|PROPERTY|GADGET|DECLARE_METATYPE|DECLARE_TYPEINFO|DECL_DEPRECATED).*?$/){
next;
}