Quantum GIS API Documentation  1.7.4
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                : [email protected]
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 /* $Id$ */
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 /* \brief create attribute widget for editing */
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();
00044     void selectDate();
00045 };
00046 
00047 
00048 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines