1 #ifndef __SEARCHVIEW_H__
2 #define __SEARCHVIEW_H__
6 #include "searchlineedit.h"
7 #include "updatechecker.h"
13 class SearchView : public QWidget, public View {
18 SearchView(QWidget *parent);
19 void updateRecentKeywords();
20 void updateRecentChannels();
23 updateRecentKeywords();
24 updateRecentChannels();
26 queryEdit->setFocus(Qt::OtherFocusReason);
27 queryEdit->enableSuggest();
32 QMap<QString, QVariant> metadata() {
33 QMap<QString, QVariant> metadata;
34 metadata.insert("title", "");
35 metadata.insert("description", tr("Make yourself comfortable"));
40 void watch(QString query);
41 void watchChannel(QString channel);
42 void watchKeywords(QString query);
43 void gotNewVersion(QString version);
46 void search(SearchParams*);
49 void paintEvent(QPaintEvent *);
53 void textChanged(const QString &text);
54 void searchTypeChanged(int index);
57 void checkForUpdate();
59 YouTubeSuggest *youtubeSuggest;
60 ChannelSuggest *channelSuggest;
63 SearchLineEdit *queryEdit;
64 QLabel *recentKeywordsLabel;
65 QBoxLayout *recentKeywordsLayout;
66 QLabel *recentChannelsLabel;
67 QBoxLayout *recentChannelsLayout;
69 QPushButton *watchButton;
71 UpdateChecker *updateChecker;
75 #endif // __SEARCHVIEW_H__