Displays search bar. More...
#include <SearchBarWidget.h>
Public Slots | |
void | setEnabled (bool) |
Enable or disable search word line edit and history buttons. | |
void | setBusy () |
Sets search bar in busy state. | |
void | setIdle () |
Sets search bar in idle state. | |
void | search (QString word) |
Search for given word. | |
void | searchDelay (QString word) |
Start to search for given word after 500 ms. | |
void | updateHistoryButtons (bool prev, bool next, bool list) |
Updates state of history buttons. | |
Signals | |
void | searchForTranslations (QString) |
void | stopSearching () |
Request to stop all active searchings. | |
void | historyPrev () |
Request to show previous translation in history. | |
void | historyNext () |
Request to show next translation in history. | |
void | historyShow () |
Request to show history list. | |
void | refreshHistoryButtons () |
Request to refresh state of history buttons. | |
Public Member Functions | |
SearchBarWidget (QWidget *parent=0) |
Displays search bar.
Contains line edit field to input word which user would like to find and buttons to start/stop search and browse search history. Line edit and history buttons are disabled when search is ongoing, only start/stop button stays active. When searching it also displays progress bar
void SearchBarWidget::search | ( | QString | word | ) | [slot] |
Search for given word.
Sets word as text in search word line edit
void SearchBarWidget::searchDelay | ( | QString | word | ) | [slot] |
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 SearchBarWidget::searchForTranslations | ( | QString | _t1 | ) | [signal] |
Requests to search for list of matching words to word passed as parameter
void SearchBarWidget::setBusy | ( | ) | [slot] |
Sets search bar in busy state.
Displays "busy" bar and disables search word text edit and history buttons
void SearchBarWidget::setEnabled | ( | bool | enabled | ) | [slot] |
Enable or disable search word line edit and history buttons.
While searching it disables only history button and line edit. Search/Stop button is always enabled
void SearchBarWidget::setIdle | ( | ) | [slot] |
Sets search bar in idle state.
Hides "busy" bar and enables all widgets, refresh state of history buttons by emmiting refreshHistoryButtons signal