1 #ifndef __SEARCHVIEW_H__
2 #define __SEARCHVIEW_H__
6 #include "searchlineedit.h"
7 #include "updatechecker.h"
9 class SearchView : public QWidget, public View {
14 SearchView(QWidget *parent);
15 void updateRecentKeywords();
18 updateRecentKeywords();
20 queryEdit->setFocus(Qt::OtherFocusReason);
21 queryEdit->enableSuggest();
26 QMap<QString, QVariant> metadata() {
27 QMap<QString, QVariant> metadata;
28 metadata.insert("title", "");
29 metadata.insert("description", tr("Make yourself comfortable"));
34 void watch(QString query);
35 void gotNewVersion(QString version);
38 void search(QString query);
41 void paintEvent(QPaintEvent *);
45 void textChanged(const QString &text);
48 void checkForUpdate();
50 SearchLineEdit *queryEdit;
51 QLabel *recentKeywordsLabel;
52 QVBoxLayout *recentKeywordsLayout;
54 QPushButton *watchButton;
56 UpdateChecker *updateChecker;
60 #endif // __SEARCHVIEW_H__