QGIS API Documentation
3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
src
core
browser
qgsfielddomainsitem.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsfielddomainsitem.h
3
-------------------
4
begin : 2022-01-27
5
copyright : (C) 2022 Nyall Dawson
6
email : nyall dot dawson at gmail dot com
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 QGSFIELDDOMAINSITEM_H
18
#define QGSFIELDDOMAINSITEM_H
19
20
#include "
qgis_sip.h
"
21
#include "qgis_core.h"
22
#include "
qgsdataitem.h
"
23
#include "
qgsabstractdatabaseproviderconnection.h
"
24
30
class
CORE_EXPORT
QgsFieldDomainsItem
:
public
QgsDataItem
31
{
32
Q_OBJECT
33
34
public
:
35
45
QgsFieldDomainsItem
(
QgsDataItem
*parent
SIP_TRANSFERTHIS
,
46
const
QString &path,
47
const
QString &connectionUri,
48
const
QString &providerKey );
49
50
~QgsFieldDomainsItem
()
override
;
51
52
#ifdef SIP_RUN
53
SIP_PYOBJECT __repr__();
54
% MethodCode
55
QString str = QStringLiteral(
"<QgsFieldDomainsItem: %1>"
).arg( sipCpp->path() );
56
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
57
% End
58
#endif
59
60
QVector<QgsDataItem *>
createChildren
()
override
;
61
62
QIcon
icon
()
override
;
63
67
QString connectionUri()
const
;
68
69
private
:
70
71
QString mConnectionUri;
72
QStringList mFieldDomainNames;
73
74
};
75
76
82
class
CORE_EXPORT
QgsFieldDomainItem
:
public
QgsDataItem
83
{
84
Q_OBJECT
85
public
:
86
94
QgsFieldDomainItem
(
QgsDataItem
*parent
SIP_TRANSFERTHIS
,
95
QgsFieldDomain
*domain
SIP_TRANSFER
);
96
97
~QgsFieldDomainItem
()
override
;
98
99
#ifdef SIP_RUN
100
SIP_PYOBJECT __repr__();
101
% MethodCode
102
QString str = QStringLiteral(
"<QgsFieldDomainItem: %1>"
).arg( sipCpp->name() );
103
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
104
% End
105
#endif
106
107
QIcon
icon
()
override
;
108
112
const
QgsFieldDomain
*fieldDomain();
113
114
private
:
115
116
std::unique_ptr< QgsFieldDomain > mDomain;
117
118
};
119
120
#endif
// QGSFIELDDOMAINSITEM_H
121
122
QgsDataItem
Base class for all items in the model.
Definition
qgsdataitem.h:46
QgsDataItem::createChildren
virtual QVector< QgsDataItem * > createChildren()
Create children.
Definition
qgsdataitem.cpp:185
QgsDataItem::icon
virtual QIcon icon()
Definition
qgsdataitem.cpp:163
QgsFieldDomainItem
A browser item representing a field domain.
Definition
qgsfielddomainsitem.h:83
QgsFieldDomainItem::~QgsFieldDomainItem
~QgsFieldDomainItem() override
QgsFieldDomain
Base class for field domains.
Definition
qgsfielddomain.h:34
QgsFieldDomainsItem
Contains a collection of field domain items.
Definition
qgsfielddomainsitem.h:31
QgsFieldDomainsItem::~QgsFieldDomainsItem
~QgsFieldDomainsItem() override
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:53
SIP_TRANSFER
#define SIP_TRANSFER
Definition
qgis_sip.h:36
qgsabstractdatabaseproviderconnection.h
qgsdataitem.h
Generated on Thu Dec 26 2024 02:19:01 for QGIS API Documentation by
1.9.8