QGIS API Documentation 4.0.0-Norrköping (1ddcee3d0e4)
Loading...
Searching...
No Matches
qgsmapinfosymbolconverter.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmapinfosymbolconverter.h
3 --------------------------------------
4 Date : March 2021
5 Copyright : (C) 2021 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 QGSMAPINFOSYMBOLCONVERTER_H
17#define QGSMAPINFOSYMBOLCONVERTER_H
18
19#include "qgis.h"
20#include "qgis_core.h"
21#include "qgis_sip.h"
22
23#include <QColor>
24#include <QStringList>
25
26class QgsLineSymbol;
27class QgsFillSymbol;
28class QgsMarkerSymbol;
29
37{
38 public:
42 void pushWarning( const QString &warning );
43
47 QStringList warnings() const { return mWarnings; }
48
52 void clearWarnings() { mWarnings.clear(); }
53
54 private:
55 QStringList mWarnings;
56};
57
65{
66 public:
67 // clang-format off
73 static QgsLineSymbol *convertLineSymbol( int identifier, QgsMapInfoSymbolConversionContext &context, const QColor &foreColor, double size, Qgis::RenderUnit sizeUnit, bool interleaved = false ) SIP_FACTORY;
74 // clang-format on
75
81 static QgsFillSymbol *convertFillSymbol( int identifier, QgsMapInfoSymbolConversionContext &context, const QColor &foreColor, const QColor &backColor = QColor() ) SIP_FACTORY;
82
90 static QgsMarkerSymbol *convertMarkerSymbol( int identifier, QgsMapInfoSymbolConversionContext &context, const QColor &color, double size, Qgis::RenderUnit sizeUnit ) SIP_FACTORY;
91};
92
93#endif // QGSMAPINFOSYMBOLCONVERTER_H
RenderUnit
Rendering size units.
Definition qgis.h:5340
A fill symbol type, for rendering Polygon and MultiPolygon geometries.
A line symbol type, for rendering LineString and MultiLineString geometries.
Context for a MapInfo symbol conversion operation.
QStringList warnings() const
Returns a list of warning messages generated during the conversion.
void pushWarning(const QString &warning)
Pushes a warning message generated during the conversion.
void clearWarnings()
Clears the list of warning messages.
Handles conversion of MapInfo symbols to QGIS symbology.
static QgsFillSymbol * convertFillSymbol(int identifier, QgsMapInfoSymbolConversionContext &context, const QColor &foreColor, const QColor &backColor=QColor())
Converts the MapInfo fill symbol with the specified identifier to a QgsFillSymbol.
static QgsMarkerSymbol * convertMarkerSymbol(int identifier, QgsMapInfoSymbolConversionContext &context, const QColor &color, double size, Qgis::RenderUnit sizeUnit)
Converts the MapInfo marker symbol with the specified identifier to a QgsMarkerSymbol.
static QgsLineSymbol * convertLineSymbol(int identifier, QgsMapInfoSymbolConversionContext &context, const QColor &foreColor, double size, Qgis::RenderUnit sizeUnit, bool interleaved=false)
Converts the MapInfo line symbol with the specified identifier to a QgsLineSymbol.
A marker symbol type, for rendering Point and MultiPoint geometries.
#define SIP_FACTORY
Definition qgis_sip.h:83