QGIS API Documentation
2.8.2-Wien
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
src
gui
editorwidgets
core
qgseditorwidgetwrapper.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgseditorwidgetwrapper.h
3
--------------------------------------
4
Date : 20.4.2013
5
Copyright : (C) 2013 Matthias Kuhn
6
Email : matthias dot kuhn at gmx 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
#ifndef QGSEDITORWIDGETWRAPPER_H
17
#define QGSEDITORWIDGETWRAPPER_H
18
19
#include <QObject>
20
#include <QMap>
21
#include <QVariant>
22
23
class
QgsVectorLayer
;
24
class
QgsField
;
25
26
#include "
qgseditorwidgetconfig.h
"
27
#include "
qgsattributeeditorcontext.h
"
28
#include "
qgswidgetwrapper.h
"
29
41
class
GUI_EXPORT
QgsEditorWidgetWrapper
:
public
QgsWidgetWrapper
42
{
43
Q_OBJECT
44
public
:
53
explicit
QgsEditorWidgetWrapper
(
QgsVectorLayer
* vl,
int
fieldIdx, QWidget* editor = 0, QWidget* parent = 0 );
54
64
virtual
QVariant value() = 0;
65
73
int
fieldIdx();
74
82
QgsField
field();
83
89
static
QgsEditorWidgetWrapper
*
fromWidget
( QWidget* widget );
90
97
void
setEnabled
(
bool
enabled )
override
;
98
99
signals:
105
void
valueChanged(
const
QVariant& value );
106
107
public
slots:
115
void
setFeature
(
const
QgsFeature
& feature )
override
;
116
123
virtual
void
setValue(
const
QVariant& value ) = 0;
124
125
protected
slots:
132
void
valueChanged(
const
QString& value );
133
141
void
valueChanged(
int
value );
142
150
void
valueChanged(
double
value );
151
159
void
valueChanged(
bool
value );
160
167
void
valueChanged( qlonglong value );
168
172
void
valueChanged();
173
174
private
:
175
int
mFieldIdx;
176
};
177
178
// We'll use this class inside a QVariant in the widgets properties
179
Q_DECLARE_METATYPE
(
QgsEditorWidgetWrapper
* )
180
181
#endif // QGSEDITORWIDGETWRAPPER_H
Generated on Sun May 10 2015 16:33:25 for QGIS API Documentation by
1.8.1.2