-
Notifications
You must be signed in to change notification settings - Fork 341
/
netsearch.h
114 lines (90 loc) · 2.89 KB
/
netsearch.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#ifndef NETSEARCH_H
#define NETSEARCH_H
// libmythui
#include <mythuibutton.h>
#include <mythuibuttonlist.h>
#include <mythuitextedit.h>
#include <mythuiprogressbar.h>
#include <mythprogressdialog.h>
#include <mythuistatetype.h>
#include <mythscreentype.h>
#include <mythdialogbox.h>
#include <netgrabbermanager.h>
#include <mythrssmanager.h>
#include <mythdownloadmanager.h>
#include <metadata/metadataimagedownload.h>
class MythUIBusyDialog;
class NetSearch : public MythScreenType
{
Q_OBJECT
public:
enum DialogType { DLG_DEFAULT = 0, DLG_SEARCH = 0x1, DLG_RSS = 0x2,
dtLast };
NetSearch(MythScreenStack *parent, const char *name = 0);
~NetSearch();
bool Create(void);
bool keyPressEvent(QKeyEvent *);
void populateResultList(ResultItem::resultList list);
public slots:
protected:
void createBusyDialog(QString title);
private:
virtual void Load();
virtual void Init();
void initProgressDialog();
void cleanCacheDir(void);
MythUIButtonList *m_searchResultList;
MythUIButtonList *m_siteList;
MythUITextEdit *m_search;
MythUIText *m_pageText;
MythUIText *m_noSites;
MythUIImage *m_thumbImage;
MythUIStateType *m_downloadable;
MythUIProgressBar *m_progress;
MythUIBusyDialog *m_busyPopup;
MythConfirmationDialog *m_okPopup;
MythDialogBox *m_menuPopup;
MythScreenStack *m_popupStack;
MythUIProgressDialog *m_progressDialog;
QNetworkAccessManager *m_netSearch;
QNetworkReply *m_reply;
MythDownloadManager *m_download;
MetadataImageDownload *m_imageDownload;
QFile *m_file;
QString m_currentSearch;
int m_currentGrabber;
QString m_currentCmd;
QString m_downloadFile;
uint m_pagenum;
uint m_maxpage;
bool m_playing;
uint m_redirects;
QString m_mythXML;
GrabberScript::scriptList m_grabberList;
RSSSite::rssList m_rssList;
QMap<MythUIButtonListItem*,ResultItem> m_rssitems;
private slots:
void streamWebVideo(void);
void showWebVideo(void);
void doDownloadAndPlay(void);
void doPlayVideo(QString filename);
void showMenu(void);
void getMoreResults();
void getLastResults();
void runSearchEditor();
void doListRefresh();
void doSearch(void);
void searchFinished(void);
void searchTimeout(Search *item);
void loadData(void);
void fillGrabberButtonList(void);
void slotItemChanged(void);
void slotDoProgress(qint64 bytesReceived,
qint64 bytesTotal);
void slotDownloadFinished(void);
void slotDeleteVideo(void);
void doDeleteVideo(bool remove);
void DownloadVideo(QString url, QString dest);
void customEvent(QEvent *levent);
};
#endif