QGIS API Documentation 3.27.0-Master (1c05421486)
qgscolorutils.h
Go to the documentation of this file.
1/***************************************************************************
2 qgscolorutils.h
3 ---------------------------
4 begin : July 2022
5 copyright : (C) 2022 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSCOLORUTILS_H
19#define QGSCOLORUTILS_H
20
21#include "qgis_core.h"
22#include "qgis_sip.h"
23#include "qgis.h"
24
25#include <QDomDocument>
26#include <QDomElement>
27
29
36class CORE_EXPORT QgsColorUtils
37{
38 public:
39
54 static void writeXml( const QColor &color, const QString &identifier,
55 QDomDocument &document, QDomElement &element, const QgsReadWriteContext &context );
56
69 static QColor readXml( const QDomElement &element, const QString &identifier, const QgsReadWriteContext &context );
70
81 static QString colorToString( const QColor &color );
82
95 static QColor colorFromString( const QString &string );
96
97};
98
99#endif // QGSCOLORUTILS_H
Contains utility functions for working with colors.
Definition: qgscolorutils.h:37
The class is used as a container of context for various read/write operations on other objects.