Copyright 2010 Comarch S.A.
*******************************************************************************/
-/*! \file TranslationXdxf.h
-*/
+/*!
+ \file TranslationStarDict.h
+ \author Mateusz Półrola <mateusz.polrola@comarch.pl>
+ */
+
#ifndef TRANSLATIONSTARDICT_H
#define TRANSLATIONSTARDICT_H
#include <QString>
+#include <QHash>
+#include <QDebug>
+#include <QTranslator>
+#include <QCoreApplication>
+#include <QThread>
+#include <QSet>
+
+#include "StarDictReaderFactory.h"
#include "../../include/translation.h"
#include "StarDictPlugin.h"
+#include "../../include/Notify.h"
+#include "TranslationStarDict.h"
class TranslationStarDict : public Translation
{
TranslationStarDict(QString _key,
QString _dictionaryInfo,
StarDictPlugin *starDictPlugin);
+ TranslationStarDict(const TranslationStarDict &base);
//! \return word to be translated
QString key() const;
//! \return parsed raw format into xml
QString toXml() const;
- /*! sets the word for which we want to find a translation
- \param word for which we want to find a translation */
+ /*!
+ sets the word for which we want to find a translation
+ \param word for which we want to find a translation
+ */
void setKey(QString);
//! sets information about dictionary
//! returns corresponding dict object
uint dict() const {return _dictHash;}
+ /*!
+ Add another hit in *.id(x) file
+ \param offset offset from begining of file to searched keyword
+ \param len lenght of searched keyword
+ */
+ void add(qint64 offset, qint32 len);
+
+ bool operator==(const TranslationStarDict &key) {
+ if (this->key() == key.key())
+ return true;
+ return false;
+ }
+
private:
QString _key;
QString _dictionaryInfo;
StarDictPlugin *starDictPlugin;
int _dictHash;
+ QVector<qint64> offsets;
+ QVector<qint32> lengths;
};
+
#endif // TRANSLATIONSTARDICT_H