QGIS/python/gui/qgsattributeform.sip

226 lines
5.6 KiB
Plaintext
Raw Normal View History

2017-05-23 14:36:52 +02:00
/************************************************************************
* 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
{
2017-05-23 14:36:52 +02:00
%TypeHeaderCode
2017-05-23 14:36:52 +02:00
#include "qgsattributeform.h"
%End
public:
enum Mode
{
2017-05-23 14:36:52 +02:00
SingleEditMode,
AddFeatureMode,
MultiEditMode,
SearchMode,
};
enum FilterType
{
2017-05-23 14:36:52 +02:00
ReplaceFilter,
FilterAnd,
FilterOr,
};
explicit QgsAttributeForm( QgsVectorLayer *vl,
const QgsFeature &feature = QgsFeature(),
const QgsAttributeEditorContext &context = QgsAttributeEditorContext(),
QWidget *parent /TransferThis/ = 0 );
~QgsAttributeForm();
const QgsFeature &feature();
2017-05-23 14:36:52 +02:00
%Docstring
:rtype: QgsFeature
%End
void hideButtonBox();
void showButtonBox();
void disconnectButtonBox();
void addInterface( QgsAttributeFormInterface *iface /Transfer/ );
2017-05-23 14:36:52 +02:00
%Docstring
Takes ownership
\param iface
%End
2014-05-27 23:22:50 +02:00
QgsVectorLayer *layer();
2017-05-23 14:36:52 +02:00
%Docstring
Returns the layer for which this form is shown
:return: Layer
:rtype: QgsVectorLayer
%End
2014-05-27 23:22:50 +02:00
bool editable();
2017-05-23 14:36:52 +02:00
%Docstring
Returns if the form is currently in editable mode.
:return: Editable mode of this form
:rtype: bool
%End
2014-05-27 23:22:50 +02:00
Mode mode() const;
2017-05-23 14:36:52 +02:00
%Docstring
Returns the current mode of the form.
.. versionadded:: 2.16
.. seealso:: setMode()
:rtype: Mode
%End
void setMode( Mode mode );
2017-05-23 14:36:52 +02:00
%Docstring
Sets the current mode of the form.
\param mode form mode
.. versionadded:: 2.16
.. seealso:: mode()
%End
void setEditCommandMessage( const QString &message );
2017-05-23 14:36:52 +02:00
%Docstring
Sets the edit command message (Undo) that will be used when the dialog is accepted
\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
2014-05-27 23:22:50 +02:00
void setMultiEditFeatureIds( const QgsFeatureIds &fids );
2017-05-23 14:36:52 +02:00
%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
void setMessageBar( QgsMessageBar *messageBar );
2017-05-23 14:36:52 +02:00
%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:
2017-05-23 14:36:52 +02:00
void attributeChanged( const QString &attribute, const QVariant &value );
2017-05-23 14:36:52 +02:00
%Docstring
Notifies about changes of attributes
\param attribute The name of the attribute that changed.
\param value The new value of the attribute.
%End
void featureSaved( const QgsFeature &feature );
2017-05-23 14:36:52 +02:00
%Docstring
Is emitted, when a feature is changed or added
%End
2014-05-27 23:22:50 +02:00
void filterExpressionSet( const QString &expression, QgsAttributeForm::FilterType type );
2017-05-23 14:36:52 +02:00
%Docstring
Is emitted when a filter expression is set using the form.
\param expression filter expression
\param type filter type
.. versionadded:: 2.16
%End
void modeChanged( QgsAttributeForm::Mode mode );
2017-05-23 14:36:52 +02:00
%Docstring
Emitted when the form changes mode.
\param mode new mode
%End
void closed();
2017-05-23 14:36:52 +02:00
%Docstring
Emitted when the user selects the close option from the form's button bar.
.. versionadded:: 2.16
%End
void zoomToFeatures( const QString &filter );
2017-05-23 14:36:52 +02:00
%Docstring
Emitted when the user chooses to zoom to a filtered set of features.
.. versionadded:: 3.0
%End
void flashFeatures( const QString &filter );
%Docstring
Emitted when the user chooses to flash a filtered set of features.
.. versionadded:: 3.0
2017-05-23 14:36:52 +02:00
%End
public slots:
2017-05-23 14:36:52 +02:00
void changeAttribute( const QString &field, const QVariant &value, const QString &hintText = QString() );
2017-05-23 14:36:52 +02:00
%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
2017-07-24 13:38:15 +02:00
\param hintText A hint text for non existent joined features
2017-05-23 14:36:52 +02:00
%End
void setFeature( const QgsFeature &feature );
2017-05-23 14:36:52 +02:00
%Docstring
Update all editors to correspond to a different feature.
\param feature The feature which will be represented by the form
%End
bool save();
2017-05-23 14:36:52 +02:00
%Docstring
Save all the values from the editors to the layer.
:return: True if successful
:rtype: bool
%End
void resetValues();
2017-05-23 14:36:52 +02:00
%Docstring
Sets all values to the values of the current feature
%End
void resetSearch();
2017-05-23 14:36:52 +02:00
%Docstring
Resets the search/filter form values.
.. versionadded:: 2.16
%End
void refreshFeature();
2017-05-23 14:36:52 +02:00
%Docstring
reload current feature
%End
};
2017-05-23 14:36:52 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsattributeform.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/