7#include <QtCore/qglobal.h>
8#include <QtCore/qxmlstream.h>
15 XmlParser(QXmlStreamReader &r,
bool whitespaceOnlyData =
false)
24 virtual bool startElement(QStringView namespaceURI, QStringView localName,
25 QStringView qName,
const QXmlStreamAttributes &atts);
26 virtual bool endElement(QStringView namespaceURI, QStringView localName,
30 virtual bool fatalError(qint64 line, qint64 column,
const QString &message);
void append(Phrase *phrase)
QString friendlyPhraseBookName() const
bool load(const QString &fileName, bool *langGuessed)
bool save(const QString &fileName)
void remove(Phrase *phrase)
void setPhraseBook(PhraseBook *book)
PhraseBook * phraseBook() const
void setDefinition(const QString &nd)
void setSource(const QString &ns)
Phrase(const QString &source, const QString &target, const QString &definition, PhraseBook *phraseBook)
Phrase(const QString &source, const QString &target, const QString &definition, const Candidate &candidate, int sc=-1)
void setTarget(const QString &nt)
bool fatalError(qint64 line, qint64 column, const QString &message) override
QphHandler(PhraseBook *phraseBook, QXmlStreamReader &reader)
QString sourceLanguage() const
bool endElement(QStringView namespaceURI, QStringView localName, QStringView qName) override
~QphHandler() override=default
bool startElement(QStringView namespaceURI, QStringView localName, QStringView qName, const QXmlStreamAttributes &atts) override
bool characters(QStringView ch) override
QXmlStreamReader & reader
virtual bool characters(QStringView text)
virtual bool endElement(QStringView namespaceURI, QStringView localName, QStringView qName)
virtual bool endDocument()
virtual bool startElement(QStringView namespaceURI, QStringView localName, QStringView qName, const QXmlStreamAttributes &atts)
XmlParser(QXmlStreamReader &r, bool whitespaceOnlyData=false)
virtual bool fatalError(qint64 line, qint64 column, const QString &message)
bool reportWhitespaceOnlyData
virtual ~XmlParser()=default
Combined button and popup list for selecting options.
static QT_BEGIN_NAMESPACE QString xmlProtect(const QString &str)
bool operator==(const Phrase &p, const Phrase &q)