]> git.sur5r.net Git - minitube/blob - src/searchview.h
Renamed uppercase filenames to lowercase
[minitube] / src / searchview.h
1 #ifndef __SEARCHVIEW_H__
2 #define __SEARCHVIEW_H__
3
4 #include <QtGui>
5 #include "view.h"
6
7 class SearchLineEdit;
8 class SearchParams;
9 class YouTubeSuggest;
10 class ChannelSuggest;
11
12 class SearchView : public QWidget, public View {
13
14     Q_OBJECT
15
16 public:
17     SearchView(QWidget *parent);
18     void updateRecentKeywords();
19     void updateRecentChannels();
20     QHash<QString, QVariant> metadata() {
21         QHash<QString, QVariant> metadata;
22         metadata.insert("description", tr("Make yourself comfortable"));
23         return metadata;
24     }
25
26 public slots:
27     void appear();
28     void watch(QString query);
29     void watchChannel(QString channel);
30     void watchKeywords(QString query);
31
32 signals:
33     void search(SearchParams*);
34
35 protected:
36     void paintEvent(QPaintEvent *);
37
38 private slots:
39     void watch();
40     void textChanged(const QString &text);
41     void searchTypeChanged(int index);
42
43 private:
44     YouTubeSuggest *youtubeSuggest;
45     ChannelSuggest *channelSuggest;
46
47     QComboBox *typeCombo;
48     SearchLineEdit *queryEdit;
49     QLabel *recentKeywordsLabel;
50     QBoxLayout *recentKeywordsLayout;
51     QLabel *recentChannelsLabel;
52     QBoxLayout *recentChannelsLayout;
53     QLabel *message;
54     QPushButton *watchButton;
55
56 };
57
58 #endif // __SEARCHVIEW_H__