Changed history behaviour, history next and prev buttons now start searching after...
[mdictionary] / trunk / src / base / gui / SearchBarWidget.h
index b3b8f18..2bf1ee0 100644 (file)
@@ -93,12 +93,21 @@ public Q_SLOTS:
       */
     void search(QString word);
 
+    //! Start to search for given word after 500 ms
+    /*!
+      Sets word as text in search word line edit, and wait 500 ms to start
+      search. If in meanwhile this slot is called again it will stop previous
+      timers.
+      */
+    void searchDelay(QString word);
+
     //! Updates state of history buttons
     void updateHistoryButtons(bool prev, bool next, bool list);
 
 private Q_SLOTS:
     void clearSearchWordToolButtonClicked();
     void searchPushButtonClicked();
+    void delaySearchTimeout();
 
 
 private:
@@ -117,6 +126,9 @@ private:
 
     bool _isSearching;
 
+    QTimer delayTimer;
+    QString delayString;
+
     void initializeUI();
 };