]> git.sur5r.net Git - minitube/blob - src/searchview.h
Imported Upstream version 2.0
[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 YTSuggester;
10 class ChannelSuggest;
11
12 class SearchView : public QWidget, public View {
13
14     Q_OBJECT
15
16 public:
17     SearchView(QWidget *parent = 0);
18     void updateRecentKeywords();
19     void updateRecentChannels();
20
21 public slots:
22     void appear();
23     void disappear() { }
24     void watch(QString query);
25     void watchChannel(QString channel);
26     void watchKeywords(QString query);
27
28 signals:
29     void search(SearchParams*);
30
31 protected:
32     void paintEvent(QPaintEvent *);
33
34 private slots:
35     void watch();
36     void textChanged(const QString &text);
37     void searchTypeChanged(int index);
38
39 private:
40     YTSuggester *youtubeSuggest;
41     ChannelSuggest *channelSuggest;
42
43     QComboBox *typeCombo;
44     SearchLineEdit *queryEdit;
45     QLabel *recentKeywordsLabel;
46     QBoxLayout *recentKeywordsLayout;
47     QLabel *recentChannelsLabel;
48     QBoxLayout *recentChannelsLayout;
49     QLabel *message;
50     QPushButton *watchButton;
51
52 };
53
54 #endif // __SEARCHVIEW_H__