QGIS API Documentation 4.3.0-Master (c8cdfe19d7b)
Loading...
Searching...
No Matches
qgsesriarcadeconverter.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsesriarcadeconverter.h
3 --------------------
4 begin : October 2026
5 copyright : (C) 2020 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#ifndef QGSESRIARCADECONVERTER_H
16#define QGSESRIARCADECONVERTER_H
17
18#include "qgis.h"
19#include "qgis_core.h"
20#include "qgis_sip.h"
21
22#include <QString>
23
30
31class CORE_EXPORT QgsEsriArcadeConverter
32{
33 public:
37 enum class Result
38 {
39 Success,
40 ParserError,
41 InvalidScriptMultiStatements,
42 InvalidScriptIncompatible,
43 UnknownError,
44 };
45
49 QgsEsriArcadeConverter( const QString &script );
50
58 Result result() const { return mResult; }
59
65 QString errorMessage() const { return mErrorString; }
66
70 QString expression() const { return mExpression; }
71
72 private:
73 QString mScript;
74
75 QString mErrorString;
76 Result mResult = Result::Success;
77
78 QString mExpression;
79};
80
81#endif // QGSESRIARCADECONVERTER_H
Converts an Esri Arcade script to a QgsExpression.
Result result() const
Returns the result of converting the script.
QString errorMessage() const
Returns the descriptive error message, if an error was obtained while converting the script.
QString expression() const
Returns the QGIS expression equivalent of the Arcade script, if conversion was successful.
Result
Results of converting the Arcade script.
QgsEsriArcadeConverter(const QString &script)
Constructor for QgsEsriArcadeConverter for converting the specified script.