13
13
* *
14
14
***************************************************************************/
15
15
16
- class QgsEditorWidgetWrapper : QObject
16
+ class QgsEditorWidgetWrapper : QgsWidgetWrapper
17
17
{
18
18
%TypeHeaderCode
19
19
#include <qgseditorwidgetwrapper.h>
@@ -30,35 +30,6 @@ class QgsEditorWidgetWrapper : QObject
30
30
*/
31
31
explicit QgsEditorWidgetWrapper( QgsVectorLayer* vl, int fieldIdx, QWidget* editor = 0, QWidget* parent /TransferThis/ = 0 );
32
32
33
- QWidget* widget();
34
- virtual void setConfig( QMap<QString, QVariant> config );
35
-
36
- /**
37
- * Use this to access the configuration.
38
- *
39
- * @param key The configuration option you want to load
40
- * @param defaultVal Default value
41
- *
42
- * @return the value assigned to this configuration option
43
- */
44
- const QVariant config( const QString& key, const QVariant& defaultVal = QVariant() );
45
-
46
- /**
47
- * Returns the whole config
48
- *
49
- * @return The configuration
50
- */
51
- const QgsEditorWidgetConfig config();
52
-
53
- /**
54
- * Access the QgsVectorLayer, you are working on
55
- *
56
- * @return The layer
57
- *
58
- * @see field()
59
- */
60
- QgsVectorLayer* layer();
61
-
Collapse comment Comment on line R61
Why did you remove config getters?
They are properly inherited from QgsWidgetWrapper now
Code has comments. Press enter to view. 62
33
/**
63
34
* Will be used to access the widget's value. Read the value from the widget and
64
35
* return it properly formatted to be saved in the attribute.
@@ -68,7 +39,7 @@ class QgsEditorWidgetWrapper : QObject
68
39
*
69
40
* @return The current value the widget represents
70
41
*/
71
- virtual QVariant value() = 0;
42
+ virtual QVariant value() const = 0;
72
43
73
44
/**
74
45
* Access the field index.
@@ -77,7 +48,7 @@ class QgsEditorWidgetWrapper : QObject
77
48
*
78
49
* @see layer()
79
50
*/
80
- int fieldIdx();
51
+ int fieldIdx() const ;
81
52
82
53
/**
83
54
* Access the field.
@@ -86,7 +57,7 @@ class QgsEditorWidgetWrapper : QObject
86
57
*
87
58
* @see layer()
88
59
*/
89
- QgsField field();
60
+ QgsField field() const ;
90
61
91
62
/**
92
63
* Access the default value of the field.
@@ -95,7 +66,7 @@ class QgsEditorWidgetWrapper : QObject
95
66
*
96
67
* @see layer()
97
68
*/
98
- QVariant defaultValue();
69
+ QVariant defaultValue() const ;
99
70
100
71
/**
101
72
* Will return a wrapper for a given widget
@@ -112,12 +83,6 @@ class QgsEditorWidgetWrapper : QObject
112
83
*/
113
84
void setEnabled( bool enabled );
114
85
115
- virtual bool valid() = 0;
116
- protected:
117
- virtual QWidget* createWidget( QWidget* parent ) = 0;
118
-
119
- virtual void initWidget( QWidget* editor );
120
-
121
86
signals:
122
87
/**
123
88
* Emit this signal, whenever the value changed.
0 commit comments