Warning, file /office/calligra/filters/karbon/xfig/XFigStreamLineReader.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 /* 0002 This file is part of the Calligra project, made within the KDE community. 0003 0004 SPDX-FileCopyrightText: 2012 Friedrich W. H. Kossebau <kossebau@kde.org> 0005 0006 SPDX-License-Identifier: LGPL-2.0-or-later 0007 */ 0008 0009 #ifndef XFIGSTREAMLINEREADER_H 0010 #define XFIGSTREAMLINEREADER_H 0011 0012 // Qt 0013 #include <QTextStream> 0014 #include <QString> 0015 0016 class QIODevice; 0017 0018 0019 class XFigStreamLineReader 0020 { 0021 public: 0022 enum CommentReadModus {DropComments, TakeComment, CollectComments}; 0023 0024 explicit XFigStreamLineReader(QIODevice* device); 0025 ~XFigStreamLineReader(); 0026 0027 bool atEnd() const; 0028 // Error error() const; 0029 QString errorString() const; 0030 bool hasError() const; 0031 0032 int objectCode() const; 0033 QString comment() const; 0034 QString line() const; 0035 0036 bool readNextObjectLine(); 0037 bool readNextLine(CommentReadModus commentModus = DropComments); 0038 0039 private: 0040 QTextStream m_TextStream; 0041 0042 QString m_Comment; 0043 QString m_Line; 0044 int m_ObjectCode; 0045 0046 bool m_HasError; 0047 QString m_ErrorString; 0048 }; 0049 0050 0051 inline bool XFigStreamLineReader::hasError() const 0052 { 0053 return m_HasError; 0054 } 0055 inline QString XFigStreamLineReader::errorString() const 0056 { 0057 return m_ErrorString; 0058 } 0059 inline int XFigStreamLineReader::objectCode() const 0060 { 0061 return m_ObjectCode; 0062 } 0063 inline QString XFigStreamLineReader::comment() const 0064 { 0065 return m_Comment; 0066 } 0067 inline QString XFigStreamLineReader::line() const 0068 { 0069 return m_Line; 0070 } 0071 0072 #endif