labplot  2.8.2
About: LabPlot is an application for plotting and analysis of 2D and 3D functions and data. It is a complete rewrite of LabPlot1 and lacks in the first release a lot of features available in the predecessor. On the other hand, the GUI and the usability is more superior.
  Fossies Dox: labplot-2.8.2.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

XmlStreamReader.h
Go to the documentation of this file.
1 /***************************************************************************
2  File : XmlStreamReader.h
3  Project : LabPlot
4  Description : XML stream parser that supports errors and warnings
5  --------------------------------------------------------------------
6  Copyright : (C) 2009 Tilman Benkert (thzs@gmx.net)
7  Copyright : (C) 2015-2016 Alexander Semke (alexander.semke@web.de)
8  ***************************************************************************/
9 
10 /***************************************************************************
11  * *
12  * This program is free software; you can redistribute it and/or modify *
13  * it under the terms of the GNU General Public License as published by *
14  * the Free Software Foundation; either version 2 of the License, or *
15  * (at your option) any later version. *
16  * *
17  * This program is distributed in the hope that it will be useful, *
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
20  * GNU General Public License for more details. *
21  * *
22  * You should have received a copy of the GNU General Public License *
23  * along with this program; if not, write to the Free Software *
24  * Foundation, Inc., 51 Franklin Street, Fifth Floor, *
25  * Boston, MA 02110-1301 USA *
26  * *
27  ***************************************************************************/
28 
29 #ifndef XML_STREAM_READER_H
30 #define XML_STREAM_READER_H
31 
32 #include <QXmlStreamReader>
33 
34 class QString;
35 class QStringList;
36 
37 class XmlStreamReader : public QXmlStreamReader {
38 public:
40  explicit XmlStreamReader(QIODevice* device);
41  explicit XmlStreamReader(const QByteArray& data);
42  explicit XmlStreamReader(const QString& data);
43  explicit XmlStreamReader(const char* data);
44 
45  const QStringList& warningStrings() const;
46  QString missingCASWarning() const;
47 
48  bool hasWarnings() const;
49  bool hasMissingCASWarnings() const;
50 
51  void setFailedCASMissing(bool);
52  bool failedCASMissing() const;
53 
54  void raiseWarning(const QString&);
55  void raiseMissingCASWarning(const QString&);
56  void raiseError(const QString&);
57 
58  bool skipToNextTag();
59  bool skipToEndElement();
60  int readAttributeInt(const QString& name, bool* ok);
61 
62 private:
63  QStringList m_warnings;
64  QStringList m_missingCASPlugins;
65  bool m_failedCASMissing{false};
66  void init();
67 };
68 
69 #endif // XML_STREAM_READER_H
XML stream parser that supports errors as well as warnings. This class also adds line and column numb...
void setFailedCASMissing(bool)
const QStringList & warningStrings() const
bool hasWarnings() const
bool hasMissingCASWarnings() const
void raiseWarning(const QString &)
QStringList m_warnings
int readAttributeInt(const QString &name, bool *ok)
QStringList m_missingCASPlugins
void raiseError(const QString &)
QString missingCASWarning() const
void raiseMissingCASWarning(const QString &)
bool failedCASMissing() const