mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-08 00:06:51 -05:00
sipify gui part 1
This commit is contained in:
parent
5c6ab71342
commit
694c8113e5
@ -134,18 +134,6 @@ core/symbology-ng/qgssymbollayerutils.sip
|
|||||||
core/symbology-ng/qgsvectorfieldsymbollayer.sip
|
core/symbology-ng/qgsvectorfieldsymbollayer.sip
|
||||||
core/symbology-ng/qgsarrowsymbollayer.sip
|
core/symbology-ng/qgsarrowsymbollayer.sip
|
||||||
core/dxf/qgsdxfexport.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/qgscodeeditor.sip
|
||||||
gui/qgscodeeditorpython.sip
|
gui/qgscodeeditorpython.sip
|
||||||
gui/qgscodeeditorsql.sip
|
gui/qgscodeeditorsql.sip
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -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
|
class QgsActionMenu : QMenu
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%Docstring
|
||||||
#include <qgsactionmenu.h>
|
This class is a menu that is populated automatically with the actions defined for a given layer.
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgsactionmenu.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
enum ActionType
|
enum ActionType
|
||||||
{
|
{
|
||||||
Invalid, //!< Invalid
|
Invalid,
|
||||||
MapLayerAction, //!< Standard actions (defined by core or plugins)
|
MapLayerAction,
|
||||||
AttributeAction //!< Custom actions (manually defined in layer properties)
|
AttributeAction
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ActionData
|
struct ActionData
|
||||||
@ -22,47 +34,52 @@ class QgsActionMenu : QMenu
|
|||||||
ActionData( const QgsAction &action, QgsFeatureId featureId, QgsMapLayer *mapLayer );
|
ActionData( const QgsAction &action, QgsFeatureId featureId, QgsMapLayer *mapLayer );
|
||||||
ActionData( QgsMapLayerAction *action, QgsFeatureId featureId, QgsMapLayer *mapLayer );
|
ActionData( QgsMapLayerAction *action, QgsFeatureId featureId, QgsMapLayer *mapLayer );
|
||||||
|
|
||||||
QgsActionMenu::ActionType actionType;
|
ActionType actionType;
|
||||||
QVariant actionData;
|
QVariant actionData;
|
||||||
QgsFeatureId featureId;
|
QgsFeatureId featureId;
|
||||||
QgsMapLayer *mapLayer;
|
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 );
|
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 );
|
explicit QgsActionMenu( QgsVectorLayer *layer, const QgsFeatureId fid, const QString &actionScope, QWidget *parent /TransferThis/ = 0 );
|
||||||
|
%Docstring
|
||||||
|
Constructs a new QgsActionMenu
|
||||||
|
|
||||||
/**
|
\param layer The layer that this action will be run upon.
|
||||||
* Destructor
|
\param fid The feature id of the feature for which this action will be run.
|
||||||
*/
|
\param parent The usual QWidget parent.
|
||||||
~QgsActionMenu();
|
\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 );
|
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:
|
signals:
|
||||||
void reinit();
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
|||||||
@ -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
|
class QgsAdvancedDigitizingCanvasItem : QgsMapCanvasItem
|
||||||
{
|
{
|
||||||
|
%Docstring
|
||||||
|
.. seealso:: QgsAdvancedDigitizingDockWidget) on the map canvas.
|
||||||
|
%End
|
||||||
|
|
||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
#include <qgsadvanceddigitizingcanvasitem.h>
|
#include "qgsadvanceddigitizingcanvasitem.h"
|
||||||
%End
|
%End
|
||||||
public:
|
public:
|
||||||
|
|
||||||
explicit QgsAdvancedDigitizingCanvasItem( QgsMapCanvas *canvas, QgsAdvancedDigitizingDockWidget *cadDockWidget );
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
|||||||
@ -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
|
class QgsAttributeDialog : QDialog
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
|
||||||
#include <qgsattributedialog.h>
|
|
||||||
%End
|
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgsattributedialog.h"
|
||||||
|
%End
|
||||||
public:
|
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() );
|
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();
|
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();
|
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 );
|
void setHighlight( QgsHighlight *h );
|
||||||
|
%Docstring
|
||||||
|
setHighlight
|
||||||
|
\param h The highlight. Ownership is taken.
|
||||||
|
%End
|
||||||
|
|
||||||
QgsAttributeForm *attributeForm();
|
QgsAttributeForm *attributeForm();
|
||||||
|
%Docstring
|
||||||
|
:rtype: QgsAttributeForm
|
||||||
|
%End
|
||||||
|
|
||||||
const QgsFeature *feature();
|
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();
|
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 );
|
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 );
|
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 );
|
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:
|
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();
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
|||||||
@ -1,23 +1,34 @@
|
|||||||
/**
|
/************************************************************************
|
||||||
* This class contains context information for attribute editor widgets.
|
* This file has been generated automatically from *
|
||||||
* It will be passed to embedded widgets whenever this occurs (e.g. when
|
* *
|
||||||
* showing an embedded form due to relations)
|
* src/gui/qgsattributeeditorcontext.h *
|
||||||
*/
|
* *
|
||||||
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class QgsAttributeEditorContext
|
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
|
%TypeHeaderCode
|
||||||
#include "qgsattributeeditorcontext.h"
|
#include "qgsattributeeditorcontext.h"
|
||||||
%End
|
%End
|
||||||
public:
|
public:
|
||||||
/**
|
|
||||||
* Determines in which direction a relation was resolved.
|
|
||||||
*/
|
|
||||||
enum RelationMode
|
enum RelationMode
|
||||||
{
|
{
|
||||||
Undefined, //!< This context is not defined by a relation
|
Undefined,
|
||||||
Multiple, //!< When showing a list of features (e.g. houses as an embedded form in a district form)
|
Multiple,
|
||||||
Single //!< When showing a single feature (e.g. district information when looking at the form of a house)
|
Single
|
||||||
};
|
};
|
||||||
|
|
||||||
enum FormMode
|
enum FormMode
|
||||||
@ -28,45 +39,77 @@ class QgsAttributeEditorContext
|
|||||||
};
|
};
|
||||||
|
|
||||||
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 );
|
void setDistanceArea( const QgsDistanceArea &distanceArea );
|
||||||
|
|
||||||
const QgsDistanceArea &distanceArea() const;
|
const QgsDistanceArea &distanceArea() const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: QgsDistanceArea
|
||||||
|
%End
|
||||||
|
|
||||||
void setVectorLayerTools( QgsVectorLayerTools *vlTools );
|
void setVectorLayerTools( QgsVectorLayerTools *vlTools );
|
||||||
const QgsVectorLayerTools *vectorLayerTools() const;
|
const QgsVectorLayerTools *vectorLayerTools() const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: QgsVectorLayerTools
|
||||||
|
%End
|
||||||
|
|
||||||
void setRelation( const QgsRelation &relation, RelationMode mode );
|
void setRelation( const QgsRelation &relation, RelationMode mode );
|
||||||
const QgsRelation &relation() const;
|
const QgsRelation &relation() const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: QgsRelation
|
||||||
|
%End
|
||||||
RelationMode relationMode() const;
|
RelationMode relationMode() const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: RelationMode
|
||||||
|
%End
|
||||||
|
|
||||||
/** Returns the form mode.
|
|
||||||
* @see setFormMode()
|
|
||||||
*/
|
|
||||||
FormMode formMode() const;
|
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 );
|
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;
|
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 );
|
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;
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
|||||||
@ -1,210 +1,227 @@
|
|||||||
/***************************************************************************
|
/************************************************************************
|
||||||
qgsattributeform.h
|
* This file has been generated automatically from *
|
||||||
--------------------------------------
|
|
||||||
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 *
|
* src/gui/qgsattributeform.h *
|
||||||
* 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. *
|
|
||||||
* *
|
* *
|
||||||
***************************************************************************/
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class QgsAttributeForm : QWidget
|
class QgsAttributeForm : QWidget
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
|
||||||
#include <qgsattributeform.h>
|
|
||||||
%End
|
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgsattributeform.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Form modes
|
|
||||||
enum Mode
|
enum Mode
|
||||||
{
|
{
|
||||||
SingleEditMode, /*!< Single edit mode, for editing a single feature */
|
SingleEditMode,
|
||||||
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
|
AddFeatureMode,
|
||||||
will add a new feature when the form is accepted. */
|
MultiEditMode,
|
||||||
MultiEditMode, /*!< Multi edit mode, for editing fields of multiple features at once */
|
SearchMode,
|
||||||
SearchMode, /*!< Form values are used for searching/filtering the layer */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//! Filter types
|
|
||||||
enum FilterType
|
enum FilterType
|
||||||
{
|
{
|
||||||
ReplaceFilter, /*!< Filter should replace any existing filter */
|
ReplaceFilter,
|
||||||
FilterAnd, /*!< Filter should be combined using "AND" */
|
FilterAnd,
|
||||||
FilterOr, /*!< Filter should be combined using "OR" */
|
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();
|
~QgsAttributeForm();
|
||||||
|
|
||||||
const QgsFeature &feature();
|
const QgsFeature &feature();
|
||||||
|
%Docstring
|
||||||
|
:rtype: QgsFeature
|
||||||
|
%End
|
||||||
|
|
||||||
/**
|
|
||||||
* Hides the button box (Ok/Cancel) and enables auto-commit
|
|
||||||
*/
|
|
||||||
void hideButtonBox();
|
void hideButtonBox();
|
||||||
|
|
||||||
/**
|
|
||||||
* Shows the button box (Ok/Cancel) and disables auto-commit
|
|
||||||
*/
|
|
||||||
void showButtonBox();
|
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();
|
void disconnectButtonBox();
|
||||||
|
|
||||||
/**
|
|
||||||
* Takes ownership
|
|
||||||
* @param iface
|
|
||||||
*/
|
|
||||||
void addInterface( QgsAttributeFormInterface *iface /Transfer/ );
|
void addInterface( QgsAttributeFormInterface *iface /Transfer/ );
|
||||||
|
%Docstring
|
||||||
|
Takes ownership
|
||||||
|
\param iface
|
||||||
|
%End
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the layer for which this form is shown
|
|
||||||
*
|
|
||||||
* @return Layer
|
|
||||||
*/
|
|
||||||
QgsVectorLayer *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();
|
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;
|
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 );
|
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 );
|
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
|
||||||
* Intercepts keypress on custom form (escape should not close it)
|
%End
|
||||||
*
|
|
||||||
* @param object The object for which the event has been sent
|
virtual bool eventFilter( QObject *object, QEvent *event );
|
||||||
* @param event The event which is being filtered
|
|
||||||
*
|
%Docstring
|
||||||
* @return true if the event has been handled (key was ESC)
|
Intercepts keypress on custom form (escape should not close it)
|
||||||
*/
|
|
||||||
bool eventFilter( QObject *object, QEvent *event );
|
\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 );
|
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 );
|
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:
|
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 );
|
void attributeChanged( const QString &attribute, const QVariant &value );
|
||||||
|
%Docstring
|
||||||
|
Notifies about changes of attributes
|
||||||
|
|
||||||
/**
|
\param attribute The name of the attribute that changed.
|
||||||
* Will be emitted before the feature is saved. Use this signal to perform sanity checks.
|
\param value The new value of the attribute.
|
||||||
* You can set the parameter ok to false to notify the form that you don't want it to be saved.
|
%End
|
||||||
* If you want the form to be saved, leave the parameter untouched.
|
|
||||||
*
|
void beforeSave( bool &ok );
|
||||||
* @param ok Set this parameter to false if you don't want the form to be saved
|
%Docstring
|
||||||
* @note not available in python bindings
|
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.
|
||||||
// void beforeSave( bool &ok );
|
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 );
|
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 );
|
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 );
|
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();
|
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 );
|
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:
|
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 );
|
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 );
|
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();
|
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();
|
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();
|
void resetSearch();
|
||||||
|
%Docstring
|
||||||
|
Resets the search/filter form values.
|
||||||
|
.. versionadded:: 2.16
|
||||||
|
%End
|
||||||
|
|
||||||
/**
|
|
||||||
* reload current feature
|
|
||||||
*/
|
|
||||||
void refreshFeature();
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
|||||||
@ -1,130 +1,170 @@
|
|||||||
/** \ingroup gui
|
/************************************************************************
|
||||||
* \class QgsAttributeFormEditorWidget
|
* This file has been generated automatically from *
|
||||||
* 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
|
* src/gui/qgsattributeformeditorwidget.h *
|
||||||
* 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.
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
* \note Added in version 2.16
|
************************************************************************/
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class QgsAttributeFormEditorWidget : QWidget
|
class QgsAttributeFormEditorWidget : QWidget
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%Docstring
|
||||||
#include <qgsattributeformeditorwidget.h>
|
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
|
%End
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgsattributeformeditorwidget.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//! Widget modes
|
|
||||||
enum Mode
|
enum Mode
|
||||||
{
|
{
|
||||||
DefaultMode, /*!< Default mode, only the editor widget is shown */
|
DefaultMode,
|
||||||
MultiEditMode, /*!< Multi edit mode, both the editor widget and a QgsMultiEditToolButton is shown */
|
MultiEditMode,
|
||||||
SearchMode, /*!< Layer search/filter mode */
|
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/ );
|
QgsAttributeForm *form /TransferThis/ );
|
||||||
|
%Docstring
|
||||||
|
Constructor for QgsAttributeFormEditorWidget.
|
||||||
|
\param editorWidget associated editor widget wrapper (for default/edit modes)
|
||||||
|
\param form parent attribute form
|
||||||
|
%End
|
||||||
|
|
||||||
~QgsAttributeFormEditorWidget();
|
~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 );
|
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;
|
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 );
|
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;
|
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;
|
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;
|
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:
|
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 );
|
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();
|
void changesCommitted();
|
||||||
|
%Docstring
|
||||||
|
Called when field values have been committed;
|
||||||
|
%End
|
||||||
|
|
||||||
/** Resets the search/filter value of the widget.
|
|
||||||
*/
|
|
||||||
void resetSearch();
|
void resetSearch();
|
||||||
|
%Docstring
|
||||||
|
Resets the search/filter value of the widget.
|
||||||
|
%End
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
//! Emitted when the widget's value changes
|
|
||||||
//! @param value new widget value
|
|
||||||
void valueChanged( const QVariant &value );
|
void valueChanged( const QVariant &value );
|
||||||
|
%Docstring
|
||||||
|
\param value new widget value
|
||||||
|
%End
|
||||||
|
|
||||||
protected:
|
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();
|
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 );
|
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();
|
QWidget *searchWidgetFrame();
|
||||||
|
%Docstring
|
||||||
|
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
|
||||||
|
:rtype: QWidget
|
||||||
|
%End
|
||||||
|
|
||||||
/** 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();
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
|||||||
@ -1,33 +1,50 @@
|
|||||||
/***************************************************************************
|
/************************************************************************
|
||||||
qgsattributeforminterface.sip
|
* This file has been generated automatically from *
|
||||||
--------------------------------------
|
|
||||||
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 *
|
* src/gui/qgsattributeforminterface.h *
|
||||||
* 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. *
|
|
||||||
* *
|
* *
|
||||||
***************************************************************************/
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class QgsAttributeFormInterface
|
class QgsAttributeFormInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
#include <qgsattributeforminterface.h>
|
#include "qgsattributeforminterface.h"
|
||||||
%End
|
%End
|
||||||
public:
|
public:
|
||||||
explicit QgsAttributeFormInterface( QgsAttributeForm *form );
|
explicit QgsAttributeFormInterface( QgsAttributeForm *form );
|
||||||
|
|
||||||
|
virtual ~QgsAttributeFormInterface();
|
||||||
|
|
||||||
virtual bool acceptChanges( const QgsFeature &feature );
|
virtual bool acceptChanges( const QgsFeature &feature );
|
||||||
|
%Docstring
|
||||||
|
:rtype: bool
|
||||||
|
%End
|
||||||
|
|
||||||
virtual void initForm();
|
virtual void initForm();
|
||||||
|
|
||||||
virtual void featureChanged();
|
virtual void featureChanged();
|
||||||
|
|
||||||
QgsAttributeForm *form();
|
QgsAttributeForm *form();
|
||||||
|
%Docstring
|
||||||
|
:rtype: QgsAttributeForm
|
||||||
|
%End
|
||||||
|
|
||||||
const QgsFeature &feature();
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
|||||||
@ -1,35 +1,58 @@
|
|||||||
|
/************************************************************************
|
||||||
|
* 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
|
class QgsAttributeTypeLoadDialog: QDialog
|
||||||
{
|
{
|
||||||
|
|
||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
#include <qgsattributetypeloaddialog.h>
|
#include "qgsattributetypeloaddialog.h"
|
||||||
%End
|
%End
|
||||||
public:
|
public:
|
||||||
QgsAttributeTypeLoadDialog( QgsVectorLayer *vl );
|
QgsAttributeTypeLoadDialog( QgsVectorLayer *vl );
|
||||||
~QgsAttributeTypeLoadDialog();
|
|
||||||
|
|
||||||
/**
|
virtual void accept();
|
||||||
* Overloaded accept method which will write the feature field
|
|
||||||
* values, then delegate to QDialog::accept()
|
%Docstring
|
||||||
*/
|
Overloaded accept method which will write the feature field
|
||||||
void accept();
|
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 );
|
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();
|
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();
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
|||||||
@ -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
|
class QgsBlendModeComboBox : QComboBox
|
||||||
{
|
{
|
||||||
|
%Docstring
|
||||||
|
A combobox which lets the user select blend modes from a predefined list
|
||||||
|
*
|
||||||
|
%End
|
||||||
|
|
||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
#include <qgsblendmodecombobox.h>
|
#include "qgsblendmodecombobox.h"
|
||||||
%End
|
%End
|
||||||
public:
|
public:
|
||||||
QgsBlendModeComboBox( QWidget *parent /TransferThis/ = 0 );
|
QgsBlendModeComboBox( QWidget *parent /TransferThis/ = 0 );
|
||||||
virtual ~QgsBlendModeComboBox();
|
|
||||||
|
|
||||||
//! Function to read the selected blend mode as QPainter::CompositionMode
|
|
||||||
QPainter::CompositionMode blendMode();
|
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 );
|
void setBlendMode( QPainter::CompositionMode blendMode );
|
||||||
|
%Docstring
|
||||||
|
Function to set the selected blend mode from QPainter.CompositionMode
|
||||||
|
%End
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
void updateModes();
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
|||||||
@ -1,29 +1,49 @@
|
|||||||
/**
|
/************************************************************************
|
||||||
* The QgsBrowserTreeView class extends QTreeView with save/restore tree state functionality.
|
* This file has been generated automatically from *
|
||||||
*
|
* *
|
||||||
* @see QgsBrowserModel
|
* src/gui/qgsbrowsertreeview.h *
|
||||||
* @note added in 2.8
|
* *
|
||||||
*/
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
||||||
|
************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class QgsBrowserTreeView : QTreeView
|
class QgsBrowserTreeView : QTreeView
|
||||||
{
|
{
|
||||||
%TypeHeaderCode
|
%Docstring
|
||||||
#include <qgsbrowsertreeview.h>
|
The QgsBrowserTreeView class extends QTreeView with save/restore tree state functionality.
|
||||||
|
|
||||||
|
.. seealso:: QgsBrowserModel
|
||||||
|
.. versionadded:: 2.8
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
%TypeHeaderCode
|
||||||
|
#include "qgsbrowsertreeview.h"
|
||||||
|
%End
|
||||||
public:
|
public:
|
||||||
QgsBrowserTreeView( QWidget *parent /TransferThis/ = 0 );
|
QgsBrowserTreeView( QWidget *parent /TransferThis/ = 0 );
|
||||||
~QgsBrowserTreeView();
|
|
||||||
|
|
||||||
virtual void setModel( QAbstractItemModel *model );
|
virtual void setModel( QAbstractItemModel *model );
|
||||||
virtual void showEvent( QShowEvent *e );
|
virtual void showEvent( QShowEvent *e );
|
||||||
virtual void hideEvent( QHideEvent *e );
|
virtual void hideEvent( QHideEvent *e );
|
||||||
|
|
||||||
// returns true if at least one descendat is expanded, used in refresh
|
|
||||||
bool hasExpandedDescendant( const QModelIndex &index ) const;
|
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 §ion );
|
void setSettingsSection( const QString §ion );
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
virtual void rowsInserted( const QModelIndex &parentIndex, int start, int end );
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
|||||||
@ -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
|
class QgsBusyIndicatorDialog : QDialog
|
||||||
{
|
{
|
||||||
|
%Docstring
|
||||||
|
A simple dialog to show an indeterminate busy progress indicator.
|
||||||
|
%End
|
||||||
|
|
||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
#include <qgsbusyindicatordialog.h>
|
#include "qgsbusyindicatordialog.h"
|
||||||
%End
|
%End
|
||||||
public:
|
public:
|
||||||
/** Constructor
|
|
||||||
* Modal busy indicator dialog with no buttons.
|
QgsBusyIndicatorDialog( const QString &message = "", QWidget *parent = 0, Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
|
||||||
* @param message Text to show above busy progress indicator.
|
%Docstring
|
||||||
* @param parent parent object (owner)
|
Constructor
|
||||||
* @param fl widget flags
|
Modal busy indicator dialog with no buttons.
|
||||||
*/
|
\param message Text to show above busy progress indicator.
|
||||||
QgsBusyIndicatorDialog( const QString &message = "", QWidget *parent /TransferThis/ = 0, const Qt::WindowFlags &fl = QgsGuiUtils::ModalDialogFlags );
|
\param parent parent object (owner)
|
||||||
~QgsBusyIndicatorDialog();
|
\param fl widget flags
|
||||||
|
%End
|
||||||
|
|
||||||
QString message() const;
|
QString message() const;
|
||||||
|
%Docstring
|
||||||
|
:rtype: str
|
||||||
|
%End
|
||||||
void setMessage( const QString &message );
|
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 *
|
||||||
|
************************************************************************/
|
||||||
|
|||||||
@ -360,7 +360,7 @@ while ($line_idx < $line_count){
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
# Skip Q_OBJECT, Q_PROPERTY, Q_ENUM, Q_GADGET
|
# 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;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user