QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
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#include <QtGlobal>
22#include <QSet>
23#include <QConcatenateTablesProxyModel>
24
25class QgsStyle;
26class QgsStyleModel;
29
39class CORE_EXPORT QgsCombinedStyleModel: public QConcatenateTablesProxyModel
40{
41
42 Q_OBJECT
43
44 public:
45
49 explicit QgsCombinedStyleModel( QObject *parent SIP_TRANSFERTHIS = nullptr );
50
51 QVariant headerData( int section, Qt::Orientation orientation,
52 int role = Qt::DisplayRole ) const override;
53
63 void addStyle( QgsStyle *style );
64
70 void addDefaultStyle();
71
77 void removeStyle( QgsStyle *style );
78
84 QList< QgsStyle * > styles() const;
85
92 void addDesiredIconSize( QSize size );
93
102 void addTargetScreenProperties( const QgsScreenProperties &properties );
103
104 private:
105
106 QList< QgsStyle * > mStyles;
107 QHash< QgsStyle *, QgsStyleModel * > mOwnedStyleModels;
108 QHash< QgsStyle *, QgsSingleItemModel * > mTitleModels;
109
110 QList< QSize > mAdditionalSizes;
111 QSet< QgsScreenProperties > mTargetScreenProperties;
112
113};
114
115#endif //QGSCOMBINEDSTYLEMODEL_H
A model which contains entities from multiple QgsStyle databases.
Stores properties relating to a screen.
A QgsSingleItemModel subclass which contains a single read-only item.
A QAbstractItemModel subclass for showing symbol and color ramp entities contained within a QgsStyle ...
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:53