1 | // Copyright (C) 2016 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QSCXMLERROR_H |
5 | #define QSCXMLERROR_H |
6 | |
7 | #include <QtScxml/qscxmlglobals.h> |
8 | #include <QtCore/qobjectdefs.h> |
9 | #include <QtCore/qmetatype.h> |
10 | #include <QtCore/qstring.h> |
11 | |
12 | QT_BEGIN_NAMESPACE |
13 | |
14 | class Q_SCXML_EXPORT QScxmlError |
15 | { |
16 | #ifndef BUILD_QSCXMLC |
17 | Q_GADGET |
18 | Q_PROPERTY(bool valid READ isValid CONSTANT) |
19 | Q_PROPERTY(QString fileName READ fileName CONSTANT) |
20 | Q_PROPERTY(int line READ line CONSTANT) |
21 | Q_PROPERTY(int column READ column CONSTANT) |
22 | Q_PROPERTY(QString description READ description CONSTANT) |
23 | #endif // BUILD_QSCXMLC |
24 | |
25 | public: |
26 | QScxmlError(); |
27 | QScxmlError(const QString &fileName, int line, int column, const QString &description); |
28 | QScxmlError(const QScxmlError &); |
29 | QScxmlError &operator=(const QScxmlError &); |
30 | ~QScxmlError(); |
31 | |
32 | bool isValid() const; |
33 | |
34 | QString fileName() const; |
35 | int line() const; |
36 | int column() const; |
37 | QString description() const; |
38 | |
39 | QString toString() const; |
40 | |
41 | private: |
42 | class ScxmlErrorPrivate; |
43 | ScxmlErrorPrivate *d; |
44 | }; |
45 | |
46 | QT_END_NAMESPACE |
47 | |
48 | Q_DECLARE_METATYPE(QScxmlError) |
49 | |
50 | #endif // QSCXMLERROR_H |
51 | |