Quantum GIS API Documentation  1.7.5-Wroclaw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
qgsattributeeditor.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsattributeeditor.h - description
3  -------------------
4  begin : July 2009
5  copyright : (C) 2009 by Jürgen E. Fischer
6  email : jef@norbit.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 /* $Id$ */
18 #ifndef QGSATTRIBUTEEDITOR_H
19 #define QGSATTRIBUTEEDITOR_H
20 
21 #include <QVariant>
22 
23 class QObject;
24 class QWidget;
25 class QgsVectorLayer;
26 class QComboBox;
27 
28 /* \brief create attribute widget for editing */
29 class GUI_EXPORT QgsAttributeEditor : public QObject
30 {
31  Q_OBJECT
32 
33  public:
34  QgsAttributeEditor( QObject *parent ) : QObject( parent ) {};
35  static QWidget *createAttributeEditor( QWidget *parent, QWidget *editor, QgsVectorLayer *vl, int idx, const QVariant &value );
36  static bool retrieveValue( QWidget *widget, QgsVectorLayer *vl, int idx, QVariant &value );
37  static bool setValue( QWidget *widget, QgsVectorLayer *vl, int idx, const QVariant &value );
38 
39  private:
40  static QComboBox *comboBox( QWidget *editor, QWidget *parent );
41 
42  public slots:
43  void selectFileName();
44  void selectDate();
45 };
46 
47 
48 #endif