QGIS API Documentation 3.38.0-Grenoble (exported)
Loading...
Searching...
No Matches
qgsvariantutils.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsvariantutils.h
3 ------------------
4 Date : January 2022
5 Copyright : (C) 2022 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 QGSVARIANTUTILS_H
17#define QGSVARIANTUTILS_H
18
19#include "qgis_core.h"
20#include "qgis_sip.h"
21#include "qgis.h"
22
31class CORE_EXPORT QgsVariantUtils
32{
33 public:
34
40 static QString typeToDisplayString( QMetaType::Type type, QMetaType::Type subType = QMetaType::Type::UnknownType );
41
48 Q_DECL_DEPRECATED static QString typeToDisplayString( QVariant::Type type, QVariant::Type subType = QVariant::Type::Invalid ) SIP_DEPRECATED;
49
58 static bool isNull( const QVariant &variant, bool silenceNullWarnings SIP_PYARGREMOVE = false );
59
65 static QMetaType::Type variantTypeToMetaType( QVariant::Type variantType ) SIP_SKIP;
66
79 static QVariant::Type metaTypeToVariantType( QMetaType::Type metaType ) SIP_SKIP;
80
81
82 // TODO QGIS 4 remove this method
83
88 static QVariant createNullVariant( QMetaType::Type metaType ) SIP_SKIP;
89
90};
91
92#endif // QGSVARIANTUTILS_H
Contains utility functions for working with QVariants and QVariant types.
#define SIP_DEPRECATED
Definition qgis_sip.h:106
#define SIP_SKIP
Definition qgis_sip.h:126
#define SIP_PYARGREMOVE
Definition qgis_sip.h:151