Fixed displaying translation of the same keyword from different dictionaries
[mdictionary] / trunk / src / base / gui / WordListWidget.h
index 0da5d76..b505443 100644 (file)
@@ -39,20 +39,25 @@ class WordListWidget : public QListView {
 public:
     explicit WordListWidget(Backbone* backbone, QWidget *parent = 0);
 
+Q_SIGNALS:
+    void showTranslation(QList<Translation*>);
 
 public Q_SLOTS:
     /*! Request to show search results, requested by backbone when it finished
       search*/
     void showSearchResults();
 
+private Q_SLOTS:
+    void itemClicked(QModelIndex index);
+
 private:
     Backbone *backbone;
     //words are keeping as QStringListModel which allow to sort them
     QStringListModel *wordListModel;
-    void addWord(QString word, Translation* trans);
+    void addWord(QString word);
     //clears all list of words
     void clear();
-    QHash<QString, Translation*> searchResult;
+    QHash<QString, QList<Translation*> > searchResult;
 };
 
 #endif // WORDLISTWIDGET_H