QGIS/python/gui/editorwidgets/qgsrelationreferencewidget.sip

181 lines
4.7 KiB
Plaintext
Raw Normal View History

2017-05-08 08:36:06 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/editorwidgets/qgsrelationreferencewidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2014-09-15 09:48:16 +02:00
%ModuleHeaderCode
// fix to allow compilation with sip that for some reason
// doesn't add this include to the file where the code from
// ConvertToSubClassCode goes.
#include <qgsrelationreferencewidget.h>
%End
2014-09-15 09:48:16 +02:00
class QgsRelationReferenceWidget : QWidget
{
2017-05-08 08:36:06 +02:00
2014-09-15 09:48:16 +02:00
%TypeHeaderCode
2017-05-08 08:36:06 +02:00
#include "qgsrelationreferencewidget.h"
%End
%ConvertToSubClassCode
if ( qobject_cast<QgsRelationReferenceWidget *>( sipCpp ) )
sipType = sipType_QgsRelationReferenceWidget;
else
sipType = NULL;
2014-09-15 09:48:16 +02:00
%End
public:
2017-05-08 08:36:06 +02:00
2014-09-15 09:48:16 +02:00
enum CanvasExtent
{
Fixed,
Pan,
Scale
};
explicit QgsRelationReferenceWidget( QWidget *parent /TransferThis/ );
2014-09-15 09:48:16 +02:00
~QgsRelationReferenceWidget();
void setRelation( const QgsRelation &relation, bool allowNullValue );
2014-09-15 09:48:16 +02:00
void setRelationEditable( bool editable );
void setForeignKey( const QVariant &value );
2017-05-08 08:36:06 +02:00
%Docstring
this sets the related feature using from the foreign key
%End
2014-09-15 09:48:16 +02:00
2017-05-08 08:36:06 +02:00
QVariant foreignKey() const;
%Docstring
returns the related feature foreign key
:rtype: QVariant
%End
2014-09-15 09:48:16 +02:00
void setEditorContext( const QgsAttributeEditorContext &context, QgsMapCanvas *canvas, QgsMessageBar *messageBar );
2014-09-15 09:48:16 +02:00
bool embedForm();
2017-05-08 08:36:06 +02:00
%Docstring
determines if the form of the related feature will be shown
:rtype: bool
%End
2014-09-15 09:48:16 +02:00
void setEmbedForm( bool display );
bool readOnlySelector();
2017-05-08 08:36:06 +02:00
%Docstring
determines if the foreign key is shown in a combox box or a read-only line edit
:rtype: bool
%End
2014-09-15 09:48:16 +02:00
void setReadOnlySelector( bool readOnly );
bool allowMapIdentification();
2017-05-08 08:36:06 +02:00
%Docstring
determines if the widge offers the possibility to select the related feature on the map (using a dedicated map tool)
:rtype: bool
%End
2014-09-15 09:48:16 +02:00
void setAllowMapIdentification( bool allowMapIdentification );
bool orderByValue();
2017-05-08 08:36:06 +02:00
%Docstring
If the widget will order the combobox entries by value
:rtype: bool
%End
void setOrderByValue( bool orderByValue );
2017-05-08 08:36:06 +02:00
%Docstring
Set if the widget will order the combobox entries by value
%End
void setFilterFields( const QStringList &filterFields );
2017-05-08 08:36:06 +02:00
%Docstring
Set the fields for which filter comboboxes will be created
%End
bool openFormButtonVisible();
2017-05-08 08:36:06 +02:00
%Docstring
determines the open form button is visible in the widget
:rtype: bool
%End
void setOpenFormButtonVisible( bool openFormButtonVisible );
bool chainFilters() const;
2017-05-08 08:36:06 +02:00
%Docstring
Determines if the filters are chained
:return: True if filters are chained
:rtype: bool
%End
void setChainFilters( bool chainFilters );
2017-05-08 08:36:06 +02:00
%Docstring
Set if filters are chained.
Chained filters restrict the option of subsequent filters based on the selection of a previous filter.
\param chainFilters If chaining should be enabled
%End
QgsFeature referencedFeature() const;
2017-05-08 08:36:06 +02:00
%Docstring
return the related feature (from the referenced layer)
if no feature is related, it returns an invalid feature
2017-05-08 08:36:06 +02:00
:rtype: QgsFeature
%End
2016-04-05 18:23:11 +10:00
void showIndeterminateState();
2017-05-08 08:36:06 +02:00
%Docstring
Sets the widget to display in an indeterminate "mixed value" state.
.. versionadded:: 2.16
%End
bool allowAddFeatures() const;
2017-05-08 08:36:06 +02:00
%Docstring
Determines if a button for adding new features should be shown.
.. versionadded:: 2.16
:rtype: bool
%End
void setAllowAddFeatures( bool allowAddFeatures );
2017-05-08 08:36:06 +02:00
%Docstring
Determines if a button for adding new features should be shown.
.. versionadded:: 2.16
%End
2016-04-05 18:23:11 +10:00
public slots:
void openForm();
2017-05-08 08:36:06 +02:00
%Docstring
open the form of the related feature in a new dialog
%End
void mapIdentification();
2017-05-08 08:36:06 +02:00
%Docstring
activate the map tool to select a new related feature on the map
%End
void deleteForeignKey();
2017-05-08 08:36:06 +02:00
%Docstring
unset the currently related feature
%End
2014-09-15 09:48:16 +02:00
protected:
virtual void showEvent( QShowEvent *e );
2014-09-15 09:48:16 +02:00
void init();
2015-02-03 02:21:52 +01:00
signals:
2017-05-08 08:36:06 +02:00
void foreignKeyChanged( const QVariant & );
2014-09-15 09:48:16 +02:00
};
2017-05-08 08:36:06 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/editorwidgets/qgsrelationreferencewidget.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/