QGIS API Documentation 3.99.0-Master (21b3aa880ba)
Loading...
Searching...
No Matches
qgsmaskidprovider.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmaskidprovider.h
3 ---------------------
4 begin : August 2019
5 copyright : (C) 2019 by Hugo Mercier / Oslandia
6 email : infos at oslandia 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 QGSMASKIDPROVIDER_H
17#define QGSMASKIDPROVIDER_H
18
19#include "qgis_core.h"
21
22#include <QList>
23#include <QSet>
24
40class CORE_EXPORT QgsMaskIdProvider
41{
42 public:
43
51 int insertLabelLayer( const QString &layerId, const QString &ruleId, const QSet<QgsSymbolLayerReference> &maskedSymbolLayers );
52
57 int maskId( const QString &labelLayerId = QString(), const QString &labelRuleId = QString() ) const;
58
62 int size() const;
63
64 private:
65
69 QList<QSet<QgsSymbolLayerReference>> mLabelLayers;
70
74 QList<QSet<QString>> mMaskIds;
75};
76
77#endif
Allows the creation of mask ids based on the different label layers and to give a mask id from a labe...
int size() const
Returns the number of identifiers allocated.
int maskId(const QString &labelLayerId=QString(), const QString &labelRuleId=QString()) const
Returns the mask id associated with a label layer and its optional label rule.
int insertLabelLayer(const QString &layerId, const QString &ruleId, const QSet< QgsSymbolLayerReference > &maskedSymbolLayers)
Inserts a label layer to the provider and returns its associated mask id.