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);
17 updateRecentKeywords();
19 queryEdit->setFocus(Qt::OtherFocusReason);
20 queryEdit->enableSuggest();
25 QMap<QString, QVariant> metadata() {
26 QMap<QString, QVariant> metadata;
27 metadata.insert("title", "");
28 metadata.insert("description", tr("Make yourself comfortable"));
33 void watch(QString query);
34 void gotNewVersion(QString version);
37 void paintEvent(QPaintEvent *);
40 void search(QString query);
44 void textChanged(const QString &text);
47 void updateRecentKeywords();
48 void checkForUpdate();
50 SearchLineEdit *queryEdit;
51 QLabel *recentKeywordsLabel;
52 QVBoxLayout *recentKeywordsLayout;
54 QPushButton *watchButton;
56 UpdateChecker *updateChecker;
60 #endif // __SEARCHVIEW_H__