First stab at porting rbutil to Qt4. Currently only installing a current or archived...
[Rockbox.git] / rbutil / rbutilqt / install.h
blobf84b6008e2a4318e1482d869b2ab53e1603a1a3b
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2007 by Dominik Riebeling
10 * $Id:$
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef INSTALL_H
21 #define INSTALL_H
23 #include <QtGui>
24 #include <QtNetwork>
26 #include <QSettings>
28 #include "ui_installfrm.h"
29 #include "ui_installprogressfrm.h"
30 #include "httpget.h"
32 class Install : public QDialog
34 Q_OBJECT
35 public:
36 Install(QWidget *parent = 0);
37 void setProxy(QUrl);
38 void setReleased(QString);
39 void setMountPoint(QString);
40 void setUserSettings(QSettings*);
41 void setDeviceSettings(QSettings*);
42 void setArchivedString(QString);
44 public slots:
45 void accept(void);
46 // void extractBuild(bool);
48 private:
49 Ui::InstallFrm ui;
50 Ui::InstallProgressFrm dp;
51 QUrl proxy;
52 QString releasever;
53 QSettings *devices;
54 QSettings *userSettings;
55 QDialog *downloadProgress;
56 QHttp *download;
57 QFile *target;
58 HttpGet *getter;
59 QString file;
60 QString fileName;
61 QString mountPoint;
62 QString archived;
63 QTemporaryFile downloadFile;
65 private slots:
66 void setCached(bool);
67 void browseFolder(void);
68 void setDetailsCurrent(bool);
69 void setDetailsStable(bool);
70 void setDetailsArchived(bool);
71 void updateDataReadProgress(int, int);
72 void downloadDone(bool);
73 void downloadRequestFinished(int, bool);
77 #endif