QGIS API Documentation
3.18.1-Zürich (202f1bf7e5)
src
gui
editorwidgets
core
qgseditorwidgetfactory.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgseditorwidgetfactory.cpp
3
--------------------------------------
4
Date : 21.4.2013
5
Copyright : (C) 2013 Matthias Kuhn
6
Email : matthias at opengis dot ch
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#include "
qgseditorwidgetfactory.h
"
17
#include "
qgsdefaultsearchwidgetwrapper.h
"
18
#include "
qgssearchwidgetwrapper.h
"
19
#include "
qgsfields.h
"
20
#include "
qgsvectordataprovider.h
"
21
22
#include <QSettings>
23
24
class
QgsDefaultSearchWidgetWrapper
;
25
26
QgsEditorWidgetFactory::QgsEditorWidgetFactory
(
const
QString &name )
27
: mName( name )
28
{
29
}
30
35
QgsSearchWidgetWrapper
*
QgsEditorWidgetFactory::createSearchWidget
(
QgsVectorLayer
*vl,
int
fieldIdx, QWidget *parent )
const
36
{
37
return
new
QgsDefaultSearchWidgetWrapper
( vl, fieldIdx, parent );
38
}
39
40
QString
QgsEditorWidgetFactory::name
()
41
{
42
return
mName;
43
}
44
45
unsigned
int
QgsEditorWidgetFactory::fieldScore
(
const
QgsVectorLayer
*vl,
int
fieldIdx )
const
46
{
47
Q_UNUSED( vl )
48
Q_UNUSED( fieldIdx )
49
return
5;
50
}
QgsDefaultSearchWidgetWrapper
Wraps a search widget.
Definition:
qgsdefaultsearchwidgetwrapper.h:32
QgsDefaultSearchWidgetWrapper::QgsDefaultSearchWidgetWrapper
QgsDefaultSearchWidgetWrapper(QgsVectorLayer *vl, int fieldIdx, QWidget *parent=nullptr)
Constructor for QgsDefaultSearchWidgetWrapper.
Definition:
qgsdefaultsearchwidgetwrapper.cpp:27
QgsEditorWidgetFactory::fieldScore
virtual unsigned int fieldScore(const QgsVectorLayer *vl, int fieldIdx) const
This method allows disabling this editor widget type for a certain field.
Definition:
qgseditorwidgetfactory.cpp:45
QgsEditorWidgetFactory::name
QString name()
Returns The human readable identifier name of this widget type.
Definition:
qgseditorwidgetfactory.cpp:40
QgsEditorWidgetFactory::createSearchWidget
virtual QgsSearchWidgetWrapper * createSearchWidget(QgsVectorLayer *vl, int fieldIdx, QWidget *parent) const
By default a simple QgsFilterLineEdit is returned as search widget.
Definition:
qgseditorwidgetfactory.cpp:35
QgsEditorWidgetFactory::QgsEditorWidgetFactory
QgsEditorWidgetFactory(const QString &name)
Constructor.
Definition:
qgseditorwidgetfactory.cpp:26
QgsSearchWidgetWrapper
Shows a search widget on a filter form.
Definition:
qgssearchwidgetwrapper.h:86
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition:
qgsvectorlayer.h:388
qgsdefaultsearchwidgetwrapper.h
qgseditorwidgetfactory.h
qgsfields.h
qgssearchwidgetwrapper.h
qgsvectordataprovider.h
Generated on Sun Mar 21 2021 09:16:51 for QGIS API Documentation by
1.9.1