#include <QString>
#include <QMetaType>
+class CommonDictInterface;
/*! Translation is kind of GoF proxy, it stores key:translation pair and
as late as possible*/
class Translation {
public:
+ Translation () { _bookmark = 0; }
//! \return word to be translated
virtual QString key() const = 0;
//! \return parsed raw format into html
virtual QString toHtml() const = 0;
+ //! \retrun whether given translation is taken from bookmarks
+ virtual bool isBookmark() const {
+ return _bookmark;
+ }
+
+ //! \param b if true then translation is from bookmarks
+ void setBookmark(bool b) {
+ _bookmark = b;
+ }
+
+ //! returns coresponding dict object
+ virtual uint dict() const {return 0;}
+
+ protected:
+ bool _bookmark;
+
};
Q_DECLARE_METATYPE(Translation*);