small change
[mdictionary] / trunk / src / includes / translation.h
index 8d4332b..3940f60 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <QString>
 #include <QMetaType>
+class CommonDictInterface;
 
 
 /*! Translation is kind of GoF proxy, it stores key:translation pair and
@@ -37,6 +38,7 @@
   as late as possible*/
 class Translation {
   public:
+    Translation  () { _bookmark = 0; }
     //! \return word to be translated
     virtual QString key() const = 0;
  
@@ -51,6 +53,22 @@ class Translation {
     //! \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*);