QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
symbology
qgscombinedstylemodel.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgscombinedstylemodel.h
3
---------------
4
begin : May 2022
5
copyright : (C) 2022 by Nyall Dawson
6
email : nyall dot dawson at gmail dot 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 QGSCOMBINEDSTYLEMODEL_H
17
#define QGSCOMBINEDSTYLEMODEL_H
18
19
#include "qgis_core.h"
20
#include "
qgis_sip.h
"
21
22
#include <QConcatenateTablesProxyModel>
23
#include <QSet>
24
#include <QtGlobal>
25
26
class
QgsStyle
;
27
class
QgsStyleModel
;
28
class
QgsSingleItemModel
;
29
class
QgsScreenProperties
;
30
40
class
CORE_EXPORT
QgsCombinedStyleModel
:
public
QConcatenateTablesProxyModel
41
{
42
Q_OBJECT
43
44
public
:
48
explicit
QgsCombinedStyleModel
( QObject *parent
SIP_TRANSFERTHIS
=
nullptr
);
49
50
QVariant
headerData
(
int
section, Qt::Orientation orientation,
int
role = Qt::DisplayRole )
const override
;
51
61
void
addStyle
(
QgsStyle
*style );
62
68
void
addDefaultStyle
();
69
75
void
removeStyle
(
QgsStyle
*style );
76
82
QList< QgsStyle * >
styles
()
const
;
83
90
void
addDesiredIconSize
( QSize size );
91
100
void
addTargetScreenProperties
(
const
QgsScreenProperties
&properties );
101
102
private
:
103
QList< QgsStyle * > mStyles;
104
QHash< QgsStyle *, QgsStyleModel * > mOwnedStyleModels;
105
QHash< QgsStyle *, QgsSingleItemModel * > mTitleModels;
106
107
QList< QSize > mAdditionalSizes;
108
QSet< QgsScreenProperties > mTargetScreenProperties;
109
};
110
111
#endif
//QGSCOMBINEDSTYLEMODEL_H
QgsCombinedStyleModel::addTargetScreenProperties
void addTargetScreenProperties(const QgsScreenProperties &properties)
Adds additional target screen properties to use when generating icons for Qt::DecorationRole data.
Definition
qgscombinedstylemodel.cpp:165
QgsCombinedStyleModel::styles
QList< QgsStyle * > styles() const
Returns a list of all styles shown in the model.
Definition
qgscombinedstylemodel.cpp:144
QgsCombinedStyleModel::headerData
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Definition
qgscombinedstylemodel.cpp:29
QgsCombinedStyleModel::QgsCombinedStyleModel
QgsCombinedStyleModel(QObject *parent=nullptr)
Constructor for QgsCombinedStyleModel with the specified parent object.
Definition
qgscombinedstylemodel.cpp:25
QgsCombinedStyleModel::removeStyle
void removeStyle(QgsStyle *style)
Removes a style from the model.
Definition
qgscombinedstylemodel.cpp:87
QgsCombinedStyleModel::addStyle
void addStyle(QgsStyle *style)
Adds a style to the model.
Definition
qgscombinedstylemodel.cpp:34
QgsCombinedStyleModel::addDefaultStyle
void addDefaultStyle()
Adds the default style (QgsStyle::defaultStyle()) to the model.
Definition
qgscombinedstylemodel.cpp:105
QgsCombinedStyleModel::addDesiredIconSize
void addDesiredIconSize(QSize size)
Adds an additional icon size to generate for Qt::DecorationRole data.
Definition
qgscombinedstylemodel.cpp:149
QgsScreenProperties
Stores properties relating to a screen.
Definition
qgsscreenproperties.h:36
QgsSingleItemModel
A QAbstractItemModel subclass which contains a single read-only item.
Definition
qgssingleitemmodel.h:33
QgsStyleModel
A QAbstractItemModel subclass for showing symbol and color ramp entities contained within a QgsStyle ...
Definition
qgsstylemodel.h:129
QgsStyle
A database of saved style entities, including symbols, color ramps, text formats and others.
Definition
qgsstyle.h:91
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:52
Generated on
for QGIS API Documentation by
1.17.0