Added link to gnu licenses size
[mdictionary] / trunk / src / includes / CommonDictInterface.h
index d03fbc2..596220e 100644 (file)
 
 *******************************************************************************/
 
-// Created by Bartosz Szatkowski
+/*! /file CommonDictInterface.h
+\brief Common interface for all dicts and plugins \see CommonDictInterface
+
+\author Bartosz Szatkowski <bulislaw@linux.com>
+*/
 
 #ifndef COMMONDICTINTERFACE_H
 #define COMMONDICTINTERFACE_H
@@ -56,12 +60,11 @@ class CommonDictInterface : public QObject {
     virtual QString infoNote() const = 0;
 
     /*! returns DictDialog object that creates dialogs
-        for adding new dictionary and change plugin settings
-      */
+        for adding new dictionary and change plugin settings*/
     virtual DictDialog* dictDialog() = 0;
 
 
-    //! return new, clean copy of plugin with setting set as in Settings*
+    //! returns new, clean copy of plugin with setting set as in Settings*
     virtual CommonDictInterface* getNew(const Settings*) const = 0;
 
     //! returns whether plugin can start searching
@@ -73,30 +76,36 @@ class CommonDictInterface : public QObject {
     //! \returns unique value (unique for every dictionary not plugin
     virtual uint hash() const = 0;
 
-    //! set unique value (unique for every dictionary not plugin)
+    //! sets unique value (unique for every dictionary not plugin)
     virtual void setHash(uint) = 0;
 
     //! returns current plugin settings
     virtual Settings* settings() = 0;
 
+    //! returns plugin icon
+    virtual QIcon* icon() = 0;
+
  public Q_SLOTS:
     /*! performs search in dictionary
         \param  word word to search in dictionary
-        \param limit limit on number of results
+        \param  limit limit on number of results,
+                if limit=0 all matching words are returned
 
         After finishing search it have to emit
         \see CommonDictInterface:finalTranslation  finalTranslation
-
     */
-    virtual QList<Translation*> searchWordList(QString word, int limit) = 0;
+    virtual QList<Translation*> searchWordList(QString word, int limit=0) = 0;
 
-    //! stop current operation
+    //! stops current operation
     virtual void stop() = 0;
 
   Q_SIGNALS:
 
     //! emited after dictionary is ready to use afer being loaded
     void loaded(CommonDictInterface*);
+
+    //! emited after change dictionary settings
+    void settingsChanged();
 };
 
 Q_DECLARE_INTERFACE(CommonDictInterface, "CommonDictInterface/0.1");