Dominik Riebeling | 57fbb39 | 2007-07-29 17:35:31 +0000 | [diff] [blame] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
| 8 | * |
| 9 | * Copyright (C) 2007 by Dominik Riebeling |
| 10 | * $Id$ |
| 11 | * |
Daniel Stenberg | 2acc0ac | 2008-06-28 18:10:04 +0000 | [diff] [blame^] | 12 | * This program is free software; you can redistribute it and/or |
| 13 | * modify it under the terms of the GNU General Public License |
| 14 | * as published by the Free Software Foundation; either version 2 |
| 15 | * of the License, or (at your option) any later version. |
Dominik Riebeling | 57fbb39 | 2007-07-29 17:35:31 +0000 | [diff] [blame] | 16 | * |
| 17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 18 | * KIND, either express or implied. |
| 19 | * |
| 20 | ****************************************************************************/ |
| 21 | |
| 22 | |
| 23 | #ifndef QRBUTIL_H |
| 24 | #define QRBUTIL_H |
| 25 | |
Dominik Riebeling | 57fbb39 | 2007-07-29 17:35:31 +0000 | [diff] [blame] | 26 | #include <QSettings> |
| 27 | #include <QTemporaryFile> |
| 28 | |
Dominik Riebeling | fbad897 | 2007-08-03 16:20:48 +0000 | [diff] [blame] | 29 | #include "ui_rbutilqtfrm.h" |
| 30 | #include "httpget.h" |
| 31 | #include "installzip.h" |
| 32 | #include "progressloggergui.h" |
Dominik Wenger | 9789d30 | 2007-08-15 14:16:20 +0000 | [diff] [blame] | 33 | #include "installbootloader.h" |
Dominik Riebeling | fbad897 | 2007-08-03 16:20:48 +0000 | [diff] [blame] | 34 | |
Dominik Wenger | 3a54c9b | 2008-01-25 00:12:25 +0000 | [diff] [blame] | 35 | #include "rbsettings.h" |
Dominik Wenger | 388506e | 2007-08-26 19:06:40 +0000 | [diff] [blame] | 36 | |
Dominik Riebeling | 57fbb39 | 2007-07-29 17:35:31 +0000 | [diff] [blame] | 37 | class RbUtilQt : public QMainWindow |
| 38 | { |
| 39 | Q_OBJECT |
| 40 | |
| 41 | public: |
| 42 | RbUtilQt(QWidget *parent = 0); |
| 43 | |
| 44 | private: |
| 45 | Ui::RbUtilQtFrm ui; |
Dominik Wenger | 3a54c9b | 2008-01-25 00:12:25 +0000 | [diff] [blame] | 46 | RbSettings* settings; |
| 47 | |
Dominik Riebeling | 57fbb39 | 2007-07-29 17:35:31 +0000 | [diff] [blame] | 48 | void initDeviceNames(void); |
| 49 | QString deviceName(QString); |
| 50 | QString platform; |
| 51 | HttpGet *daily; |
Dominik Riebeling | 848abc8 | 2007-08-26 16:03:56 +0000 | [diff] [blame] | 52 | HttpGet *bleeding; |
Dominik Riebeling | 57fbb39 | 2007-07-29 17:35:31 +0000 | [diff] [blame] | 53 | QString absolutePath; |
| 54 | QTemporaryFile buildInfo; |
Dominik Riebeling | 848abc8 | 2007-08-26 16:03:56 +0000 | [diff] [blame] | 55 | QTemporaryFile bleedingInfo; |
Dominik Riebeling | a52d172 | 2007-07-30 18:11:21 +0000 | [diff] [blame] | 56 | void updateManual(void); |
Dominik Riebeling | fbad897 | 2007-08-03 16:20:48 +0000 | [diff] [blame] | 57 | ProgressLoggerGui *logger; |
| 58 | ZipInstaller *installer; |
Dominik Wenger | 9789d30 | 2007-08-15 14:16:20 +0000 | [diff] [blame] | 59 | BootloaderInstaller* blinstaller; |
Dominik Riebeling | b6b1083 | 2007-08-26 11:31:55 +0000 | [diff] [blame] | 60 | QUrl proxy(void); |
Dominik Riebeling | 848abc8 | 2007-08-26 16:03:56 +0000 | [diff] [blame] | 61 | QMap<QString, QString> versmap; |
Dominik Riebeling | f90837f | 2007-09-16 18:32:49 +0000 | [diff] [blame] | 62 | bool chkConfig(bool); |
Antoine Cellerier | 1464c9b | 2007-09-15 22:57:07 +0000 | [diff] [blame] | 63 | |
Dominik Wenger | aabc130 | 2007-08-26 20:32:20 +0000 | [diff] [blame] | 64 | volatile bool m_installed; |
| 65 | volatile bool m_error; |
Dominik Wenger | 2016ab4 | 2008-04-01 18:02:56 +0000 | [diff] [blame] | 66 | bool m_gotInfo; |
Dominik Riebeling | 57fbb39 | 2007-07-29 17:35:31 +0000 | [diff] [blame] | 67 | |
| 68 | private slots: |
| 69 | void about(void); |
Dominik Riebeling | b93621d | 2007-08-29 17:43:11 +0000 | [diff] [blame] | 70 | void help(void); |
Dominik Riebeling | 1876a0b | 2008-06-21 10:28:10 +0000 | [diff] [blame] | 71 | void sysinfo(void); |
Dominik Riebeling | 57fbb39 | 2007-07-29 17:35:31 +0000 | [diff] [blame] | 72 | void configDialog(void); |
Dominik Riebeling | 7a62bb0 | 2007-08-02 21:29:31 +0000 | [diff] [blame] | 73 | void updateDevice(void); |
| 74 | void updateSettings(void); |
Antoine Cellerier | 1464c9b | 2007-09-15 22:57:07 +0000 | [diff] [blame] | 75 | |
Dominik Wenger | 388506e | 2007-08-26 19:06:40 +0000 | [diff] [blame] | 76 | void completeInstall(void); |
| 77 | void smallInstall(void); |
Antoine Cellerier | e6dab6d | 2007-09-15 23:00:02 +0000 | [diff] [blame] | 78 | bool smallInstallInner(void); |
Dominik Wenger | aabc130 | 2007-08-26 20:32:20 +0000 | [diff] [blame] | 79 | void installdone(bool error); |
Antoine Cellerier | 1464c9b | 2007-09-15 22:57:07 +0000 | [diff] [blame] | 80 | |
Dominik Wenger | aabc130 | 2007-08-26 20:32:20 +0000 | [diff] [blame] | 81 | void installBtn(void); |
| 82 | bool installAuto(void); |
Dominik Riebeling | 57fbb39 | 2007-07-29 17:35:31 +0000 | [diff] [blame] | 83 | void install(void); |
Antoine Cellerier | 1464c9b | 2007-09-15 22:57:07 +0000 | [diff] [blame] | 84 | |
Dominik Wenger | aabc130 | 2007-08-26 20:32:20 +0000 | [diff] [blame] | 85 | void installBootloaderBtn(void); |
| 86 | bool installBootloaderAuto(void); |
| 87 | void installBootloader(void); |
Antoine Cellerier | 1464c9b | 2007-09-15 22:57:07 +0000 | [diff] [blame] | 88 | |
Dominik Wenger | aabc130 | 2007-08-26 20:32:20 +0000 | [diff] [blame] | 89 | void installFontsBtn(void); |
| 90 | bool installFontsAuto(void); |
Dominik Riebeling | 57fbb39 | 2007-07-29 17:35:31 +0000 | [diff] [blame] | 91 | void installFonts(void); |
Antoine Cellerier | 1464c9b | 2007-09-15 22:57:07 +0000 | [diff] [blame] | 92 | |
Antoine Cellerier | ef425fe | 2007-09-15 22:32:14 +0000 | [diff] [blame] | 93 | bool hasDoom(void); |
Dominik Wenger | aabc130 | 2007-08-26 20:32:20 +0000 | [diff] [blame] | 94 | void installDoomBtn(void); |
| 95 | bool installDoomAuto(void); |
Dominik Riebeling | 57fbb39 | 2007-07-29 17:35:31 +0000 | [diff] [blame] | 96 | void installDoom(void); |
Antoine Cellerier | 1464c9b | 2007-09-15 22:57:07 +0000 | [diff] [blame] | 97 | |
Dominik Wenger | e70f7f4 | 2007-08-05 16:17:35 +0000 | [diff] [blame] | 98 | void createTalkFiles(void); |
Dominik Wenger | 9f68670 | 2008-01-11 23:59:12 +0000 | [diff] [blame] | 99 | void createVoiceFile(void); |
Dominik Riebeling | 57fbb39 | 2007-07-29 17:35:31 +0000 | [diff] [blame] | 100 | void downloadDone(bool); |
| 101 | void downloadDone(int, bool); |
Dominik Riebeling | 848abc8 | 2007-08-26 16:03:56 +0000 | [diff] [blame] | 102 | void downloadBleedingDone(bool); |
Dominik Riebeling | 57fbb39 | 2007-07-29 17:35:31 +0000 | [diff] [blame] | 103 | void downloadInfo(void); |
Dominik Riebeling | 8dbc7e3 | 2007-08-09 16:06:27 +0000 | [diff] [blame] | 104 | void installVoice(void); |
Dominik Riebeling | 653b996 | 2007-08-15 21:54:15 +0000 | [diff] [blame] | 105 | void installThemes(void); |
Dominik Wenger | 6bc9abc | 2007-08-10 22:17:43 +0000 | [diff] [blame] | 106 | void uninstall(void); |
| 107 | void uninstallBootloader(void); |
Dominik Riebeling | 9295e0a | 2007-08-22 10:55:05 +0000 | [diff] [blame] | 108 | void downloadManual(void); |
Dominik Riebeling | 1c69293 | 2007-08-22 22:25:04 +0000 | [diff] [blame] | 109 | void installPortable(void); |
Dominik Riebeling | 848abc8 | 2007-08-26 16:03:56 +0000 | [diff] [blame] | 110 | void updateInfo(void); |
| 111 | void updateTabs(int); |
Dominik Riebeling | 57fbb39 | 2007-07-29 17:35:31 +0000 | [diff] [blame] | 112 | }; |
| 113 | |
| 114 | #endif |
Dominik Riebeling | 9f0ea77 | 2008-06-27 20:36:41 +0000 | [diff] [blame] | 115 | |