00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef QGSATTRIBUTEEDITOR_H
00019 #define QGSATTRIBUTEEDITOR_H
00020
00021 #include <QVariant>
00022
00023 class QObject;
00024 class QWidget;
00025 class QgsVectorLayer;
00026 class QComboBox;
00027
00028
00029 class GUI_EXPORT QgsAttributeEditor : public QObject
00030 {
00031 Q_OBJECT
00032
00033 public:
00034 QgsAttributeEditor( QObject *parent ) : QObject( parent ) {}
00035 static QWidget *createAttributeEditor( QWidget *parent, QWidget *editor, QgsVectorLayer *vl, int idx, const QVariant &value );
00036 static bool retrieveValue( QWidget *widget, QgsVectorLayer *vl, int idx, QVariant &value );
00037 static bool setValue( QWidget *widget, QgsVectorLayer *vl, int idx, const QVariant &value );
00038
00039 private:
00040 static QComboBox *comboBox( QWidget *editor, QWidget *parent );
00041
00042 public slots:
00043 void selectFileName( void );
00044 void selectDate( void );
00045 };
00046
00047
00048 #endif