Rabbit Remote Control 0.1.0-bate1
Loading...
Searching...
No Matches
FrmDownload.h
1// Author: Kang Lin <kl222@126.com>
2
3#pragma once
4#include <QFrame>
5#include <QLabel>
6#include <QPushButton>
7#include <QProgressBar>
8#include <QElapsedTimer>
9#include <QFileSystemWatcher>
10
11#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
12#include <QWebEngineDownloadRequest>
13#else
14#include <QWebEngineDownloadItem>
15#define QWebEngineDownloadRequest QWebEngineDownloadItem
16#endif
17
18namespace Ui {
19class CFrmDownload;
20}
21
22class CFrmDownload : public QFrame
23{
24 Q_OBJECT
25
26public:
27 explicit CFrmDownload(QWebEngineDownloadRequest* downalod, QWidget *parent = nullptr);
29
30Q_SIGNALS:
31 // This signal is emitted when the user indicates that they want to remove
32 // this download from the downloads list.
33 void sigRemoveClicked(CFrmDownload *self);
34 void sigSelected(CFrmDownload* item);
35
36protected:
37 virtual void mouseDoubleClickEvent(QMouseEvent *event) override;
38 virtual void mouseReleaseEvent(QMouseEvent *event) override;
39
40private slots:
41 void slotUpdateWidget();
42 void slotCustomContextMenuRequested(const QPoint &pos);
43
44 void on_pbButton_clicked();
45
46private:
47 Ui::CFrmDownload *ui;
48 QWebEngineDownloadRequest* m_pDownload;
49
50 QElapsedTimer m_timeAdded;
51 QFileSystemWatcher m_FileWatcher;
52};
53