kiten/lib
entryDeinflect.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KITEN_ENTRYDEINFLECT_H
00022 #define KITEN_ENTRYDEINFLECT_H
00023
00024 #include "Entry.h"
00025 #include <QtCore/QString>
00026 #include "klocale.h"
00027
00028 class entryDeinflect : public Entry {
00029
00030 public:
00031 entryDeinflect(const QString &correction, const QString &type, int index, const QString &matchedEnding)
00032 : Entry(QString("Deinflect")),m_correction(correction),m_type(type),m_index(index),
00033 m_matchedEnding(matchedEnding) {}
00034 entryDeinflect(const entryDeinflect &old) : Entry(old), m_correction(old.m_correction),
00035 m_type(old.m_type), m_index(old.m_index) {}
00036 entryDeinflect *clone() const { return new entryDeinflect(*this); }
00037
00038 virtual QString toHTML() const {
00039 return QString("<div class=\"Deinflect\">") +
00040 i18n("Possible de-conjugation %1 as %2",makeLink(m_correction),m_type)+"</div>";
00041 }
00042
00043 virtual bool loadEntry(const QString &) {return true;}
00044 virtual QString dumpEntry() const {return QString();}
00045 virtual bool matchesQuery(const DictQuery& query) const {return query.toString().contains(m_matchedEnding);}
00046
00047 private:
00048 QString m_matchedEnding;
00049 QString m_correction;
00050 QString m_type;
00051 int m_index;
00052 };
00053
00054 #endif