2014-09-15 17:50:29 +02:00
|
|
|
|
|
|
|
class QgsRelationReferenceWidgetWrapper : QgsEditorWidgetWrapper
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <qgsrelationreferencewidgetwrapper.h>
|
|
|
|
%End
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit QgsRelationReferenceWidgetWrapper( QgsVectorLayer* vl,
|
|
|
|
int fieldIdx,
|
|
|
|
QWidget* editor,
|
|
|
|
QgsMapCanvas* canvas,
|
|
|
|
QgsMessageBar* messageBar,
|
|
|
|
QWidget* parent /TransferThis/ = 0 );
|
|
|
|
|
|
|
|
virtual QWidget* createWidget( QWidget* parent );
|
|
|
|
virtual void initWidget( QWidget* editor );
|
|
|
|
virtual QVariant value();
|
2016-02-14 03:50:23 +01:00
|
|
|
bool valid() const;
|
2014-09-15 17:50:29 +02:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
virtual void setValue( const QVariant& value );
|
|
|
|
virtual void setEnabled( bool enabled );
|
2016-05-09 14:46:51 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
/**
|
|
|
|
* This should update the widget with a visual cue if a constraint status
|
|
|
|
* changed.
|
|
|
|
*
|
|
|
|
* By default a stylesheet will be applied on the widget that changes the
|
|
|
|
* background color to red.
|
|
|
|
*
|
|
|
|
* This can be overwritten in subclasses to allow individual widgets to
|
|
|
|
* change the visual cue.
|
|
|
|
* @note added in QGIS 2.16
|
|
|
|
*/
|
2016-06-02 11:37:35 +02:00
|
|
|
void updateConstraintWidgetStatus( bool constraintValid );
|
2014-09-15 17:50:29 +02:00
|
|
|
};
|