QGIS API Documentation  2.4.0-Chugiak
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgsrelationeditor.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrelationeditor.h
3  --------------------------------------
4  Date : 17.5.2013
5  Copyright : (C) 2013 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 QGSRELATIONEDITOR_H
17 #define QGSRELATIONEDITOR_H
18 
19 #include <QWidget>
20 
21 #include "ui_qgsrelationeditorwidgetbase.h"
23 #include "qgsrelation.h"
24 
25 class QgsDualView;
26 class QgsFeature;
28 class QgsVectorLayer;
30 
31 class GUI_EXPORT QgsRelationEditorWidget : public QgsCollapsibleGroupBox, private Ui::QgsRelationEditorWidgetBase
32 {
33  Q_OBJECT
34 
35  public:
36  static QgsRelationEditorWidget* createRelationEditor( const QgsRelation& relation, const QgsFeature& feature, QgsAttributeEditorContext context, QWidget* parent = NULL );
37 
38  private slots:
39  void onCollapsedStateChanged( bool state );
40  void referencingLayerEditingToggled();
41  void viewModeChanged( int mode );
42 
43  void on_mAddFeatureButton_clicked();
44  void on_mLinkFeatureButton_clicked();
45  void on_mDeleteFeatureButton_clicked();
46  void on_mUnlinkFeatureButton_clicked();
47  void on_mToggleEditingButton_toggled( bool state );
48 
49  private:
58  QgsRelationEditorWidget( const QgsRelation& relation, const QgsFeature& feature, QgsAttributeEditorContext context, QWidget* parent = NULL );
59 
65 
66 };
67 
68 #endif // QGSRELATIONEDITOR_H
Methods in this class are used to handle basic operations on vector layers.
A groupbox that collapses/expands when toggled and can save its collapsed and checked states...
This class contains context information for attribute editor widgets.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Definition: qgsfeature.h:113
This selection manager synchronizes a local set of selected features with an attribute table...
QgsGenericFeatureSelectionManager * mFeatureSelectionMgr
Represents a vector layer which manages a vector based data sets.
This widget is used to show the attributes of a set of features of a QgsVectorLayer.
Definition: qgsdualview.h:42
QgsAttributeEditorContext mEditorContext