QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsrelationwidgetwrapper.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrelationwidgetwrapper.h
3  --------------------------------------
4  Date : 14.5.2014
5  Copyright : (C) 2014 Matthias Kuhn
6  Email : matthias dot kuhn at gmx dot ch
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSRELATIONWIDGETWRAPPER_H
17 #define QGSRELATIONWIDGETWRAPPER_H
18 
19 #include "qgswidgetwrapper.h"
20 
22 
23 class GUI_EXPORT QgsRelationWidgetWrapper : public QgsWidgetWrapper
24 {
25  Q_OBJECT
26 
27  public:
28  explicit QgsRelationWidgetWrapper( QgsVectorLayer* vl, const QgsRelation& relation, QWidget* editor = 0, QWidget* parent = 0 );
29 
30  protected:
31  QWidget* createWidget( QWidget* parent ) override;
32  void initWidget( QWidget* editor ) override;
33 
34  public slots:
35  void setFeature( const QgsFeature& feature ) override;
36 
37  private:
38  QgsRelation mRelation;
39  QgsRelationEditorWidget* mWidget;
40 };
41 
42 #endif // QGSRELATIONWIDGETWRAPPER_H