src/download.h

changeset 538
2f85d4d286e5
parent 504
6a1fa662bfc1
child 539
72ad83a67165
equal deleted inserted replaced
537:1add0ee96fb3 538:2f85d4d286e5
33 class QAbstractButton; 33 class QAbstractButton;
34 34
35 // ============================================================================= 35 // =============================================================================
36 // ----------------------------------------------------------------------------- 36 // -----------------------------------------------------------------------------
37 class PartDownloader : public QDialog 37 class PartDownloader : public QDialog
38 { Q_OBJECT 38 { Q_OBJECT
39 PROPERTY (LDFile*, primaryFile, setPrimaryFile) 39 PROPERTY (LDFile*, primaryFile, setPrimaryFile)
40 PROPERTY (bool, aborted, setAborted) 40 PROPERTY (bool, aborted, setAborted)
41 41
42 public: 42 public:
43 constexpr static const char* k_UnofficialURL = "http://ldraw.org/library/unofficial/"; 43 constexpr static const char* k_UnofficialURL = "http://ldraw.org/library/unofficial/";
44 44
45 enum Source 45 enum Source
62 virtual ~PartDownloader(); 62 virtual ~PartDownloader();
63 str getURL() const; 63 str getURL() const;
64 static str getDownloadPath(); 64 static str getDownloadPath();
65 Source getSource() const; 65 Source getSource() const;
66 void downloadFile (str dest, str url, bool primary); 66 void downloadFile (str dest, str url, bool primary);
67 void modifyDest (str& dest) const; 67 void modifyDestination (str& dest) const;
68 QPushButton* getButton (Button i); 68 QPushButton* getButton (Button i);
69 static void k_download(); 69 static void k_download();
70 70
71 public slots: 71 public slots:
72 void sourceChanged (int i); 72 void sourceChanged (int i);
76 protected: 76 protected:
77 Ui_DownloadFrom* ui; 77 Ui_DownloadFrom* ui;
78 friend class PartDownloadRequest; 78 friend class PartDownloadRequest;
79 79
80 private: 80 private:
81 QList<str> m_filesToDownload; 81 QStringList m_filesToDownload;
82 QList<PartDownloadRequest*> m_requests; 82 QList<PartDownloadRequest*> m_requests;
83 QPushButton* m_downloadButton; 83 QPushButton* m_downloadButton;
84 }; 84 };
85 85
86 // ============================================================================= 86 // =============================================================================

mercurial