blob: 8eebe4318eaa1f86e8eff85c92255b8725470221 [file] [log] [blame]
Dominik Riebeling57fbb392007-07-29 17:35:31 +00001/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 *
9 * Copyright (C) 2007 by Dominik Riebeling
10 * $Id$
11 *
Daniel Stenberg2acc0ac2008-06-28 18:10:04 +000012 * 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 Riebeling57fbb392007-07-29 17:35:31 +000016 *
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 Riebeling57fbb392007-07-29 17:35:31 +000026#include <QSettings>
27#include <QTemporaryFile>
28
Dominik Riebelingfbad8972007-08-03 16:20:48 +000029#include "ui_rbutilqtfrm.h"
30#include "httpget.h"
31#include "installzip.h"
32#include "progressloggergui.h"
Dominik Wenger9789d302007-08-15 14:16:20 +000033#include "installbootloader.h"
Dominik Riebelingfbad8972007-08-03 16:20:48 +000034
Dominik Wenger3a54c9b2008-01-25 00:12:25 +000035#include "rbsettings.h"
Dominik Wenger388506e2007-08-26 19:06:40 +000036
Dominik Riebeling57fbb392007-07-29 17:35:31 +000037class RbUtilQt : public QMainWindow
38{
39 Q_OBJECT
40
41 public:
42 RbUtilQt(QWidget *parent = 0);
43
44 private:
45 Ui::RbUtilQtFrm ui;
Dominik Wenger3a54c9b2008-01-25 00:12:25 +000046 RbSettings* settings;
47
Dominik Riebeling57fbb392007-07-29 17:35:31 +000048 void initDeviceNames(void);
49 QString deviceName(QString);
50 QString platform;
51 HttpGet *daily;
Dominik Riebeling848abc82007-08-26 16:03:56 +000052 HttpGet *bleeding;
Dominik Riebeling57fbb392007-07-29 17:35:31 +000053 QString absolutePath;
54 QTemporaryFile buildInfo;
Dominik Riebeling848abc82007-08-26 16:03:56 +000055 QTemporaryFile bleedingInfo;
Dominik Riebelinga52d1722007-07-30 18:11:21 +000056 void updateManual(void);
Dominik Riebelingfbad8972007-08-03 16:20:48 +000057 ProgressLoggerGui *logger;
58 ZipInstaller *installer;
Dominik Wenger9789d302007-08-15 14:16:20 +000059 BootloaderInstaller* blinstaller;
Dominik Riebelingb6b10832007-08-26 11:31:55 +000060 QUrl proxy(void);
Dominik Riebeling848abc82007-08-26 16:03:56 +000061 QMap<QString, QString> versmap;
Dominik Riebelingf90837f2007-09-16 18:32:49 +000062 bool chkConfig(bool);
Antoine Cellerier1464c9b2007-09-15 22:57:07 +000063
Dominik Wengeraabc1302007-08-26 20:32:20 +000064 volatile bool m_installed;
65 volatile bool m_error;
Dominik Wenger2016ab42008-04-01 18:02:56 +000066 bool m_gotInfo;
Dominik Riebeling57fbb392007-07-29 17:35:31 +000067
68 private slots:
69 void about(void);
Dominik Riebelingb93621d2007-08-29 17:43:11 +000070 void help(void);
Dominik Riebeling1876a0b2008-06-21 10:28:10 +000071 void sysinfo(void);
Dominik Riebeling57fbb392007-07-29 17:35:31 +000072 void configDialog(void);
Dominik Riebeling7a62bb02007-08-02 21:29:31 +000073 void updateDevice(void);
74 void updateSettings(void);
Antoine Cellerier1464c9b2007-09-15 22:57:07 +000075
Dominik Wenger388506e2007-08-26 19:06:40 +000076 void completeInstall(void);
77 void smallInstall(void);
Antoine Celleriere6dab6d2007-09-15 23:00:02 +000078 bool smallInstallInner(void);
Dominik Wengeraabc1302007-08-26 20:32:20 +000079 void installdone(bool error);
Antoine Cellerier1464c9b2007-09-15 22:57:07 +000080
Dominik Wengeraabc1302007-08-26 20:32:20 +000081 void installBtn(void);
82 bool installAuto(void);
Dominik Riebeling57fbb392007-07-29 17:35:31 +000083 void install(void);
Antoine Cellerier1464c9b2007-09-15 22:57:07 +000084
Dominik Wengeraabc1302007-08-26 20:32:20 +000085 void installBootloaderBtn(void);
86 bool installBootloaderAuto(void);
87 void installBootloader(void);
Antoine Cellerier1464c9b2007-09-15 22:57:07 +000088
Dominik Wengeraabc1302007-08-26 20:32:20 +000089 void installFontsBtn(void);
90 bool installFontsAuto(void);
Dominik Riebeling57fbb392007-07-29 17:35:31 +000091 void installFonts(void);
Antoine Cellerier1464c9b2007-09-15 22:57:07 +000092
Antoine Cellerieref425fe2007-09-15 22:32:14 +000093 bool hasDoom(void);
Dominik Wengeraabc1302007-08-26 20:32:20 +000094 void installDoomBtn(void);
95 bool installDoomAuto(void);
Dominik Riebeling57fbb392007-07-29 17:35:31 +000096 void installDoom(void);
Antoine Cellerier1464c9b2007-09-15 22:57:07 +000097
Dominik Wengere70f7f42007-08-05 16:17:35 +000098 void createTalkFiles(void);
Dominik Wenger9f686702008-01-11 23:59:12 +000099 void createVoiceFile(void);
Dominik Riebeling57fbb392007-07-29 17:35:31 +0000100 void downloadDone(bool);
101 void downloadDone(int, bool);
Dominik Riebeling848abc82007-08-26 16:03:56 +0000102 void downloadBleedingDone(bool);
Dominik Riebeling57fbb392007-07-29 17:35:31 +0000103 void downloadInfo(void);
Dominik Riebeling8dbc7e32007-08-09 16:06:27 +0000104 void installVoice(void);
Dominik Riebeling653b9962007-08-15 21:54:15 +0000105 void installThemes(void);
Dominik Wenger6bc9abc2007-08-10 22:17:43 +0000106 void uninstall(void);
107 void uninstallBootloader(void);
Dominik Riebeling9295e0a2007-08-22 10:55:05 +0000108 void downloadManual(void);
Dominik Riebeling1c692932007-08-22 22:25:04 +0000109 void installPortable(void);
Dominik Riebeling848abc82007-08-26 16:03:56 +0000110 void updateInfo(void);
111 void updateTabs(int);
Dominik Riebeling57fbb392007-07-29 17:35:31 +0000112};
113
114#endif
Dominik Riebeling9f0ea772008-06-27 20:36:41 +0000115