]> git.sur5r.net Git - minitube/blobdiff - src/searchview.h
Merge tag 'upstream/2.5.2'
[minitube] / src / searchview.h
index 9cefc717ec05643fca2bba1646aa53bd57778383..01895eb7147fcc9c20832ee44b1eea2cc5d0e78e 100644 (file)
@@ -22,14 +22,18 @@ $END_LICENSE */
 #define __SEARCHVIEW_H__
 
 #include <QtGui>
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#endif
 #include "view.h"
 
-class SearchLineEdit;
+class SearchWidget;
 class SearchParams;
 class YTSuggester;
 class ChannelSuggest;
+class Suggestion;
 
-class SearchView : public QWidget, public View {
+class SearchView : public View {
 
     Q_OBJECT
 
@@ -40,10 +44,10 @@ public:
 
 public slots:
     void appear();
-    void disappear() { }
-    void watch(QString query);
-    void watchChannel(QString channel);
-    void watchKeywords(QString query);
+    void disappear();
+    void watch(const QString &query);
+    void watchChannel(const QString &channelId);
+    void watchKeywords(const QString &query);
 
 signals:
     void search(SearchParams*);
@@ -55,13 +59,14 @@ private slots:
     void watch();
     void textChanged(const QString &text);
     void searchTypeChanged(int index);
+    void suggestionAccepted(Suggestion *suggestion);
 
 private:
     YTSuggester *youtubeSuggest;
     ChannelSuggest *channelSuggest;
 
     QComboBox *typeCombo;
-    SearchLineEdit *queryEdit;
+    SearchWidget *queryEdit;
     QLabel *recentKeywordsLabel;
     QBoxLayout *recentKeywordsLayout;
     QLabel *recentChannelsLabel;
@@ -69,6 +74,8 @@ private:
     QLabel *message;
     QPushButton *watchButton;
 
+    QStringList recentKeywords;
+    QStringList recentChannels;
 };
 
 #endif // __SEARCHVIEW_H__