QGIS API Documentation
3.10.0-A Coruña (6c816b4204)
src
gui
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 "
qgsattributeeditorcontext.h
"
21
#include "
qgis_sip.h
"
22
#include "
qgsattributeform.h
"
23
#include "
qgstrackedvectorlayertools.h
"
24
#include "
qgsactionmenu.h
"
25
26
#include <QDialog>
27
#include <QMenuBar>
28
#include <QGridLayout>
29
#include "qgis_gui.h"
30
31
class
QgsHighlight
;
32
37
class
GUI_EXPORT
QgsAttributeDialog
:
public
QDialog
38
{
39
Q_OBJECT
40
41
public
:
42
54
QgsAttributeDialog
(
QgsVectorLayer
*vl,
QgsFeature
*thepFeature,
bool
featureOwner, QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
,
bool
showDialogButtons =
true
,
const
QgsAttributeEditorContext
&context =
QgsAttributeEditorContext
() );
55
56
~
QgsAttributeDialog
()
override
;
57
62
void
setHighlight(
QgsHighlight
*h );
63
64
QgsAttributeForm
*
attributeForm
() {
return
mAttributeForm; }
65
66
const
QgsFeature
*
feature
() {
return
&mAttributeForm->feature(); }
67
73
bool
editable
() {
return
mAttributeForm->editable(); }
74
80
void
setMode(
QgsAttributeEditorContext::Mode
mode );
81
87
void
setEditCommandMessage
(
const
QString &message ) { mAttributeForm->setEditCommandMessage( message ); }
88
96
bool
event( QEvent *e )
override
;
97
98
public
slots:
99
void
accept()
override
;
100
void
reject()
override
;
101
103
void
show();
104
105
private
:
106
void
init(
QgsVectorLayer
*layer,
QgsFeature
*feature,
const
QgsAttributeEditorContext
&context,
bool
showDialogButtons );
107
108
QString mSettingsPath;
109
// Used to sync multiple widgets for the same field
110
QgsHighlight
*mHighlight =
nullptr
;
111
int
mFormNr;
112
bool
mShowDialogButtons;
113
QString mReturnvarname;
114
QgsAttributeForm
*mAttributeForm =
nullptr
;
115
QgsFeature
*mOwnedFeature =
nullptr
;
116
117
QgsTrackedVectorLayerTools
mTrackedVectorLayerTools;
118
119
// true if this dialog is editable
120
bool
mEditable;
121
122
QgsActionMenu
*mMenu;
123
124
static
int
sFormCounter;
125
static
QString sSettingsPath;
126
127
void
saveGeometry
();
128
void
restoreGeometry
();
129
};
130
131
#endif
qgsattributeeditorcontext.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition:
qgis_sip.h:53
QgsAttributeEditorContext
This class contains context information for attribute editor widgets.
Definition:
qgsattributeeditorcontext.h:39
qgstrackedvectorlayertools.h
QgsAttributeDialog
Definition:
qgsattributedialog.h:37
QgsFeature
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Definition:
qgsfeature.h:55
QgsAttributeDialog::editable
bool editable()
Is this dialog editable?
Definition:
qgsattributedialog.h:73
QgsGuiUtils::saveGeometry
void saveGeometry(QWidget *widget, const QString &keyName)
Save the wigget geometry into settings.
Definition:
qgsguiutils.cpp:211
QgsAttributeDialog::setEditCommandMessage
void setEditCommandMessage(const QString &message)
Sets the edit command message (Undo) that will be used when the dialog is accepted.
Definition:
qgsattributedialog.h:87
QgsGuiUtils::restoreGeometry
bool restoreGeometry(QWidget *widget, const QString &keyName)
Restore the wigget geometry from settings.
Definition:
qgsguiutils.cpp:218
QgsAttributeEditorContext::Mode
Mode
modes
Definition:
qgsattributeeditorcontext.h:46
QgsActionMenu
This class is a menu that is populated automatically with the actions defined for a given layer...
Definition:
qgsactionmenu.h:38
qgis_sip.h
QgsHighlight
A class for highlight features on the map.
Definition:
qgshighlight.h:56
QgsAttributeForm
Definition:
qgsattributeform.h:44
QgsAttributeDialog::attributeForm
QgsAttributeForm * attributeForm()
Definition:
qgsattributedialog.h:64
qgsattributeform.h
QgsAttributeDialog::feature
const QgsFeature * feature()
Definition:
qgsattributedialog.h:66
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition:
qgsvectorlayer.h:366
qgsactionmenu.h
QgsTrackedVectorLayerTools
Definition:
qgstrackedvectorlayertools.h:26
Generated on Sun Oct 27 2019 00:43:28 for QGIS API Documentation by
1.8.13