Make configuration check reusable.
[maemo-rb.git] / rbutil / rbutilqt / rbutilqt.h
blob5cc1f0de947158a52b9576e585e541b6f41a34f8
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2007 by Dominik Riebeling
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
19 ****************************************************************************/
22 #ifndef QRBUTIL_H
23 #define QRBUTIL_H
25 #include <QSettings>
26 #include <QTemporaryFile>
27 #include <QList>
28 #include <QTranslator>
30 #include "ui_rbutilqtfrm.h"
31 #include "httpget.h"
32 #include "zipinstaller.h"
33 #include "progressloggergui.h"
34 #include "bootloaderinstallbase.h"
36 class RbUtilQt : public QMainWindow
38 Q_OBJECT
40 public:
41 RbUtilQt(QWidget *parent = 0);
42 static QList<QTranslator*> translators;
43 static bool chkConfig(QWidget *parent = 0);
45 private:
46 Ui::RbUtilQtFrm ui;
48 void changeEvent(QEvent *e);
49 void initDeviceNames(void);
50 QString deviceName(QString);
51 QString platform;
52 HttpGet *daily;
53 HttpGet *bleeding;
54 HttpGet *update;
55 QString absolutePath;
56 QTemporaryFile buildInfo;
57 QTemporaryFile bleedingInfo;
58 void updateManual(void);
59 ProgressLoggerGui *logger;
60 ZipInstaller *installer;
61 QUrl proxy(void);
63 volatile bool m_installed;
64 volatile bool m_error;
65 QString m_networkerror;
66 bool m_gotInfo;
67 bool m_auto;
69 private slots:
70 void shutdown(void);
71 void about(void);
72 void help(void);
73 void sysinfo(void);
74 void trace(void);
75 void configDialog(void);
76 void updateDevice(void);
77 void updateSettings(void);
79 void completeInstall(void);
80 void smallInstall(void);
81 bool smallInstallInner(void);
82 void installdone(bool error);
84 void installBtn(void);
85 bool installAuto(void);
86 void install(void);
88 void installBootloaderBtn(void);
89 bool installBootloaderAuto(void);
90 void installBootloader(void);
91 void installBootloaderPost(bool error);
93 void installFontsBtn(void);
94 bool installFontsAuto(void);
95 void installFonts(void);
97 bool hasDoom(void);
98 void installDoomBtn(void);
99 bool installDoomAuto(void);
100 void installDoom(void);
102 void createTalkFiles(void);
103 void createVoiceFile(void);
104 void downloadDone(bool);
105 void downloadBleedingDone(bool);
106 void downloadInfo(void);
108 void installVoice(void);
109 void installThemes(void);
110 void uninstall(void);
111 void uninstallBootloader(void);
112 void downloadManual(void);
113 void installPortable(void);
114 void updateInfo(void);
115 void updateTabs(int);
117 void checkUpdate(void);
118 void downloadUpdateDone(bool errror);
121 #endif