QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
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
23#include <QConcatenateTablesProxyModel>
24
25class QgsStyle;
26class QgsStyleModel;
28
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
94 private:
95
96 QList< QgsStyle * > mStyles;
97 QHash< QgsStyle *, QgsStyleModel * > mOwnedStyleModels;
98 QHash< QgsStyle *, QgsSingleItemModel * > mTitleModels;
99
100 QList< QSize > mAdditionalSizes;
101
102};
103
104#endif //QGSCOMBINEDSTYLEMODEL_H
A model which contains entities from multiple QgsStyle databases.
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