Qt 5.10 Book Examples
DownloaderGui.h
Go to the documentation of this file.
1 // ======================================================================
2 // DownloaderGui.h
3 // ======================================================================
4 // This file is a part of the book
5 // "Qt 5.10 Professional programming with C++"
6 // http://qt-book.com
7 // ======================================================================
8 // Copyright (c) 2017 by Max Schlee
9 // ======================================================================
10 
11 #pragma once
12 
13 #include <QWidget>
14 #include <QUrl>
15 
16 class Downloader;
17 class QProgressBar;
18 class QLineEdit;
19 class QPushButton;
20 
21 // ======================================================================
22 class DownloaderGui : public QWidget {
23 Q_OBJECT
24 
25 private:
26  Downloader* m_pdl;
27  QProgressBar* m_ppb;
28  QLineEdit* m_ptxt;
29  QPushButton* m_pcmd;
30 
31  void showPic(const QString&);
32 
33 public:
34  DownloaderGui(QWidget* pwgt = 0);
35 
36 private slots:
37  void slotGo ( );
38  void slotError ( );
39  void slotDownloadProgress(qint64, qint64 );
40  void slotDone (const QUrl&, const QByteArray&);
41 };
42 
DownloaderGui(QWidget *pwgt=0)