Skip to content
Permalink
Browse files
ComboBox now also works!
  • Loading branch information
carolinux committed May 22, 2015
1 parent f1085b8 commit 46b2606075761868d700447e93df39962199d48b
@@ -29,7 +29,11 @@ QgsEditorWidgetFactory::~QgsEditorWidgetFactory()
{
}

QgsEditorWidgetWrapper* QgsEditorWidgetFactory::createSearchWidget( QgsVectorLayer* vl, int fieldIdx, QWidget* parent ) {
/** Override in own factory to get something different than the default (a simple QgsFilterLineEdit)
*
*/
QgsEditorWidgetWrapper* QgsEditorWidgetFactory::createSearchWidget( QgsVectorLayer* vl, int fieldIdx, QWidget* parent )
{

return new QgsDefaultSearchWidgetWrapper(vl, fieldIdx, 0, parent);
}
@@ -61,7 +61,7 @@ class GUI_EXPORT QgsEditorWidgetFactory
*/
virtual QgsEditorWidgetWrapper* create( QgsVectorLayer* vl, int fieldIdx, QWidget* editor, QWidget* parent ) const = 0;

QgsEditorWidgetWrapper* createSearchWidget( QgsVectorLayer* vl, int fieldIdx, QWidget* parent );
virtual QgsEditorWidgetWrapper* createSearchWidget( QgsVectorLayer* vl, int fieldIdx, QWidget* parent );

/**
* Return The human readable identifier name of this widget type
@@ -29,6 +29,12 @@ QgsEditorWidgetWrapper* QgsValueMapWidgetFactory::create( QgsVectorLayer* vl, in
return new QgsValueMapWidgetWrapper( vl, fieldIdx, editor, parent );
}


QgsEditorWidgetWrapper* QgsValueMapWidgetFactory::createSearchWidget( QgsVectorLayer* vl, int fieldIdx, QWidget* parent )
{
return new QgsValueMapWidgetWrapper( vl, fieldIdx, 0, parent );
}

QgsEditorConfigWidget* QgsValueMapWidgetFactory::configWidget( QgsVectorLayer* vl, int fieldIdx, QWidget* parent ) const
{
return new QgsValueMapConfigDlg( vl, fieldIdx, parent );
@@ -26,6 +26,7 @@ class GUI_EXPORT QgsValueMapWidgetFactory : public QgsEditorWidgetFactory
// QgsEditorWidgetFactory interface
public:
QgsEditorWidgetWrapper* create( QgsVectorLayer* vl, int fieldIdx, QWidget* editor, QWidget* parent ) const override;
QgsEditorWidgetWrapper* createSearchWidget( QgsVectorLayer* vl, int fieldIdx, QWidget* parent ) override;
QgsEditorConfigWidget* configWidget( QgsVectorLayer* vl, int fieldIdx, QWidget* parent ) const override;
QgsEditorWidgetConfig readConfig( const QDomElement& configElement, QgsVectorLayer* layer, int fieldIdx ) override;
void writeConfig( const QgsEditorWidgetConfig& config, QDomElement& configElement, QDomDocument& doc, const QgsVectorLayer* layer, int fieldIdx ) override;

0 comments on commit 46b2606

Please sign in to comment.