Quantum GIS API Documentation  1.8
src/gui/qgsattributeeditor.h
Go to the documentation of this file.
00001 /***************************************************************************
00002                          qgsattributeeditor.h  -  description
00003                              -------------------
00004     begin                : July 2009
00005     copyright            : (C) 2009 by J├╝rgen E. Fischer
00006     email                : jef@norbit.de
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 #ifndef QGSATTRIBUTEEDITOR_H
00018 #define QGSATTRIBUTEEDITOR_H
00019 
00020 #include <QVariant>
00021 
00022 class QObject;
00023 class QWidget;
00024 class QgsVectorLayer;
00025 class QComboBox;
00026 
00027 /* \brief create attribute widget for editing */
00028 class GUI_EXPORT QgsAttributeEditor : public QObject
00029 {
00030     Q_OBJECT
00031 
00032   public:
00033     QgsAttributeEditor( QObject *parent ) : QObject( parent ) {};
00034     static QWidget *createAttributeEditor( QWidget *parent, QWidget *editor, QgsVectorLayer *vl, int idx, const QVariant &value );
00035     static bool retrieveValue( QWidget *widget, QgsVectorLayer *vl, int idx, QVariant &value );
00036     static bool setValue( QWidget *widget, QgsVectorLayer *vl, int idx, const QVariant &value );
00037 
00038   private:
00039     static QComboBox *comboBox( QWidget *editor, QWidget *parent );
00040 
00041   public slots:
00042     void selectFileName();
00043     void selectDate();
00044 };
00045 
00046 
00047 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines