QGIS API Documentation
3.36.0-Maidenhead (09951dc0acf)
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
w
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
z
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
c
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Related Symbols
3
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
Files
File List
File Members
All
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
l
n
o
p
q
r
s
t
u
w
Typedefs
3
a
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
c
l
s
t
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
w
x
y
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Loading...
Searching...
No Matches
src
core
qgsfieldproxymodel.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsfieldproxymodel.h
3
--------------------------------------
4
Date : 01.04.2014
5
Copyright : (C) 2014 Denis Rouzaud
6
Email : denis.rouzaud@gmail.com
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 QGSFIELDPROXYMODEL_H
17
#define QGSFIELDPROXYMODEL_H
18
19
#include <QSortFilterProxyModel>
20
21
#include "qgis_core.h"
22
23
#include "
qgis_sip.h
"
24
25
class
QgsFieldModel
;
26
31
class
CORE_EXPORT
QgsFieldProxyModel
:
public
QSortFilterProxyModel
32
{
33
Q_OBJECT
34
35
public
:
36
38
enum
Filter
SIP_ENUM_BASETYPE
( IntFlag )
39
{
40
String = 1,
41
Int = 2,
42
LongLong = 4,
43
Double = 8,
44
Numeric = Int | LongLong | Double,
45
Date = 16,
46
Time = 32,
47
HideReadOnly = 64,
48
DateTime = 128,
49
Binary = 256,
50
Boolean = 512,
51
AllTypes = Numeric | Date | String | Time | DateTime | Binary | Boolean,
52
};
38
enum
Filter
SIP_ENUM_BASETYPE
( IntFlag ) {
…
};
53
Q_DECLARE_FLAGS( Filters, Filter )
54
Q_FLAG( Filters )
55
56
60
explicit
QgsFieldProxyModel
( QObject *parent
SIP_TRANSFERTHIS
=
nullptr
);
61
63
QgsFieldModel
*
sourceFieldModel
() {
return
mModel; }
64
70
QgsFieldProxyModel
*setFilters( QgsFieldProxyModel::Filters filters );
71
76
const
Filters &
filters
()
const
{
return
mFilters; }
77
78
private
:
79
Filters mFilters;
80
QgsFieldModel
*mModel =
nullptr
;
81
83
bool
isReadOnly(
const
QModelIndex &index )
const
;
84
85
// QSortFilterProxyModel interface
86
public
:
87
bool
filterAcceptsRow(
int
source_row,
const
QModelIndex &source_parent )
const override
;
88
bool
lessThan(
const
QModelIndex &left,
const
QModelIndex &right )
const override
;
89
};
31
class
CORE_EXPORT
QgsFieldProxyModel
:
public
QSortFilterProxyModel {
…
};
90
91
Q_DECLARE_OPERATORS_FOR_FLAGS
( QgsFieldProxyModel::Filters )
92
93
#endif
// QGSFIELDPROXYMODEL_H
QgsFieldModel
The QgsFieldModel class is a model to display the list of fields in widgets (optionally associated wi...
Definition
qgsfieldmodel.h:38
QgsFieldProxyModel
The QgsFieldProxyModel class provides an easy to use model to display the list of fields of a layer.
Definition
qgsfieldproxymodel.h:32
QgsFieldProxyModel::sourceFieldModel
QgsFieldModel * sourceFieldModel()
Returns the QgsFieldModel used in this QSortFilterProxyModel.
Definition
qgsfieldproxymodel.h:63
QgsFieldProxyModel::Filter
Filter
Field type filters.
Definition
qgsfieldproxymodel.h:39
QgsFieldProxyModel::filters
const Filters & filters() const
Returns the filters controlling displayed fields.
Definition
qgsfieldproxymodel.h:76
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:53
SIP_ENUM_BASETYPE
#define SIP_ENUM_BASETYPE(type)
Definition
qgis_sip.h:278
Q_DECLARE_OPERATORS_FOR_FLAGS
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)
Generated on Mon Feb 26 2024 10:02:44 for QGIS API Documentation by
1.9.8