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);
44 void searchForTranslations(QString);
48 //! Enable or disable search word line edit and history buttons
50 While searching it disables only history button and line edit.
51 Search/Stop button is always enabled
53 void setEnabled(bool);
56 void clearSearchWordToolButtonClicked();
57 void searchPushButtonClicked();
58 void historyPrevToolButtonClicked();
59 void historyNextToolButtonClicked();
60 void historyShowToolButtonClicked();
63 QLineEdit* searchWordLineEdit;
64 QToolButton* clearSearchWordToolButton;
65 QPushButton* searchPushButton;
66 QToolButton* historyPrevToolButton;
67 QToolButton* historyNextToolButton;
68 QToolButton* historyShowToolButton;
69 QHBoxLayout* horizontalLayout;
70 QProgressBar* searchingProgressBar;
72 QVBoxLayout* verticalLayout;
77 void showHistoryListDialog();
80 #endif // SEARCHBARWIDGET_H