QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsattributedialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsattributedialog.h - description
3  -------------------
4  begin : October 2004
5  copyright : (C) 2004 by Marco Hugentobler
6  email : [email protected]
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 #ifndef QGSATTRIBUTEDIALOG_H
18 #define QGSATTRIBUTEDIALOG_H
19 
20 #include "qgsfeature.h"
21 
22 class QDialog;
23 class QgsFeature;
24 class QLayout;
25 class QgsField;
26 class QgsVectorLayer;
27 class QgsHighlight;
28 class QgsDistanceArea;
29 
30 class GUI_EXPORT QgsAttributeDialog : public QObject
31 {
32  Q_OBJECT
33 
34  public:
35  QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeature, bool featureOwner, QgsDistanceArea myDa, QWidget* parent = 0, bool showDialogButtons = true );
37 
41  void saveGeometry();
42 
46  void restoreGeometry();
47 
48  void setHighlight( QgsHighlight *h );
49 
50  QDialog *dialog() { return mDialog; }
51 
52  QgsFeature* feature() { return mFeature; }
53 
54  public slots:
55  void accept();
56 
57  int exec();
58  void show();
59 
60  void dialogDestroyed();
61 
62  protected:
63  bool eventFilter( QObject *obj, QEvent *event );
64 
65  private:
66  QDialog *mDialog;
67  QString mSettingsPath;
68  // Used to sync multiple widgets for the same field
69  QMap<int, QWidget*> mProxyWidgets;
74  int mFormNr;
75  static int smFormCounter;
77  QString mReturnvarname;
78 };
79 
80 #endif