1 /*******************************************************************************
3 This file is part of mDictionary.
5 mDictionary is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 mDictionary is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with mDictionary. If not, see <http://www.gnu.org/licenses/>.
18 Copyright 2010 Comarch S.A.
20 *******************************************************************************/
22 //Created by Mateusz Półrola
25 #ifndef SEARCHBARWIDGET_H
26 #define SEARCHBARWIDGET_H
32 //! Displays search bar
34 Contains line edit field to input word which user would to find, and buttons
35 to browse search history.
37 class SearchBarWidget : public QWidget {
40 explicit SearchBarWidget(QWidget *parent = 0);
43 //! Returns searching status
44 /*! If backbone is still searching returns true */
45 bool isSearching() const;
48 //! Requests to search for translation of word passed as parameter
49 void searchForTranslations(QString);
51 //! Request to stop all active searchings
55 //! Enable or disable search word line edit and history buttons
57 While searching it disables only history button and line edit.
58 Search/Stop button is always enabled
60 void setEnabled(bool);
63 void clearSearchWordToolButtonClicked();
64 void searchPushButtonClicked();
65 void historyPrevToolButtonClicked();
66 void historyNextToolButtonClicked();
67 void historyShowToolButtonClicked();
70 QLineEdit* searchWordLineEdit;
71 QToolButton* clearSearchWordToolButton;
72 QPushButton* searchPushButton;
73 QToolButton* historyPrevToolButton;
74 QToolButton* historyNextToolButton;
75 QToolButton* historyShowToolButton;
76 QHBoxLayout* horizontalLayout;
77 QProgressBar* searchingProgressBar;
79 QVBoxLayout* verticalLayout;
84 void showHistoryListDialog();
87 #endif // SEARCHBARWIDGET_H