QGIS API Documentation
2.14.11-Essen
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
gui
qgsrelationeditorwidget.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsrelationeditorwidget.h
3
--------------------------------------
4
Date : 17.5.2013
5
Copyright : (C) 2013 Matthias Kuhn
6
Email : matthias at opengis 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
#include <QToolButton>
21
#include <QButtonGroup>
22
#include <QGridLayout>
23
24
#include "
qgsattributeeditorcontext.h
"
25
#include "
qgscollapsiblegroupbox.h
"
26
#include "
qgsdualview.h
"
27
#include "
qgsrelation.h
"
28
29
class
QgsFeature
;
30
class
QgsGenericFeatureSelectionManager
;
31
class
QgsVectorLayer
;
32
class
QgsVectorLayerTools
;
33
34
class
GUI_EXPORT
QgsRelationEditorWidget
:
public
QgsCollapsibleGroupBox
35
{
36
Q_OBJECT
37
Q_PROPERTY(
QgsDualView::ViewMode
viewMode READ viewMode WRITE setViewMode )
38
39
public
:
43
QgsRelationEditorWidget
(
QWidget
* parent =
nullptr
);
44
46
void
setViewMode(
QgsDualView::ViewMode
mode );
47
49
QgsDualView::ViewMode
viewMode
() {
return
mViewMode;}
50
51
void
setRelationFeature(
const
QgsRelation
& relation,
const
QgsFeature
& feature );
52
62
void
setRelations(
const
QgsRelation
& relation,
const
QgsRelation
& nmrelation );
63
64
void
setFeature(
const
QgsFeature
& feature );
65
66
void
setEditorContext(
const
QgsAttributeEditorContext
& context );
67
72
QgsIFeatureSelectionManager
* featureSelectionManager();
73
74
private
slots:
75
void
setViewMode(
int
mode ) {setViewMode( static_cast<QgsDualView::ViewMode>( mode ) );}
76
void
updateButtons();
77
78
void
addFeature();
79
void
linkFeature();
80
void
deleteFeature();
81
void
unlinkFeature();
82
void
saveEdits();
83
void
toggleEditing(
bool
state );
84
void
onCollapsedStateChanged(
bool
collapsed );
85
86
private
:
87
void
updateUi();
88
89
QgsDualView
* mDualView;
90
QgsDualView::ViewMode
mViewMode;
91
QgsGenericFeatureSelectionManager
* mFeatureSelectionMgr;
92
QgsAttributeEditorContext
mEditorContext;
93
QgsRelation
mRelation;
94
QgsRelation
mNmRelation;
95
QgsFeature
mFeature;
96
97
QToolButton
* mToggleEditingButton;
98
QToolButton
* mSaveEditsButton;
99
QToolButton
* mAddFeatureButton;
100
QToolButton
* mDeleteFeatureButton;
101
QToolButton
* mLinkFeatureButton;
102
QToolButton
* mUnlinkFeatureButton;
103
QToolButton
* mFormViewButton;
104
QToolButton
* mTableViewButton;
105
QGridLayout
* mRelationLayout;
106
QButtonGroup
* mViewModeButtonGroup;
107
108
bool
mVisible;
109
};
110
111
#endif // QGSRELATIONEDITOR_H
QgsVectorLayerTools
Methods in this class are used to handle basic operations on vector layers.
Definition:
qgsvectorlayertools.h:33
qgsattributeeditorcontext.h
qgsdualview.h
QWidget
QgsCollapsibleGroupBox
A groupbox that collapses/expands when toggled and can save its collapsed and checked states...
Definition:
qgscollapsiblegroupbox.h:177
QgsAttributeEditorContext
This class contains context information for attribute editor widgets.
Definition:
qgsattributeeditorcontext.h:33
QgsDualView::ViewMode
ViewMode
The view modes, in which this widget can present information.
Definition:
qgsdualview.h:53
QGridLayout
QgsFeature
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Definition:
qgsfeature.h:187
QgsRelationEditorWidget
Definition:
qgsrelationeditorwidget.h:34
qgsrelation.h
QButtonGroup
QToolButton
QgsGenericFeatureSelectionManager
This selection manager synchronizes a local set of selected features with an attribute table...
Definition:
qgsgenericfeatureselectionmanager.h:28
QgsRelation
Definition:
qgsrelation.h:28
QgsRelationEditorWidget::viewMode
QgsDualView::ViewMode viewMode()
Get the view mode for the dual view.
Definition:
qgsrelationeditorwidget.h:49
QgsIFeatureSelectionManager
Is an interface class to abstract feature selection handling.
Definition:
qgsifeatureselectionmanager.h:29
qgscollapsiblegroupbox.h
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition:
qgsvectorlayer.h:386
QgsDualView
This widget is used to show the attributes of a set of features of a QgsVectorLayer.
Definition:
qgsdualview.h:41
Generated on Wed Jan 25 2017 08:47:24 for QGIS API Documentation by
1.8.8