Added direct search of translation, changed searching for translation of words list...
[mdictionary] / trunk / src / base / gui / WordListWidget.h
index d670973..12d94c3 100644 (file)
@@ -47,9 +47,23 @@ public Q_SLOTS:
     /*! Request to show search results, requested by backbone when it finished
       search*/
     void showSearchResults();
+
+    //! Lock words list, while backbone is doing somethig in background
     void lockList();
+
+    //! Unlocks words list
     void unlockList();
 
+    //! Sets string which exact match will be searched
+    /*!
+      When exactMatchString is not empty, widget will not display found words,
+      but when in found words is exactMatchString it will direct display it's
+      translation. When exactMatchString isn't in list widget will display
+      suitable information, and list of found words
+      */
+    void setExactMatchString(QString exactMatchString);
+    QString exactMatchString();
+
 private Q_SLOTS:
     void itemClicked(QModelIndex index);
 
@@ -61,6 +75,7 @@ private:
     //clears all list of words
     void clear();
     QHash<QString, QList<Translation*> > searchResult;
+    QString _exactMatchString;
 };
 
 #endif // WORDLISTWIDGET_H