2007-08-15 21:54:15 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
*
|
|
|
|
* Copyright (C) 2007 by Dominik Riebeling
|
|
|
|
*
|
2008-06-28 18:10:04 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2007-08-15 21:54:15 +00:00
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
|
|
|
|
#ifndef INSTALLTHEMES_H
|
|
|
|
#define INSTALLTHEMES_H
|
|
|
|
|
|
|
|
#include <QtGui>
|
|
|
|
#include <QTemporaryFile>
|
|
|
|
|
2009-03-31 19:50:43 +00:00
|
|
|
#include "ui_themesinstallfrm.h"
|
2007-08-15 21:54:15 +00:00
|
|
|
#include "httpget.h"
|
2009-04-27 19:58:24 +00:00
|
|
|
#include "zipinstaller.h"
|
2007-08-15 21:54:15 +00:00
|
|
|
#include "progressloggergui.h"
|
|
|
|
|
|
|
|
class ThemesInstallWindow : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
ThemesInstallWindow(QWidget* parent = 0);
|
2007-09-14 22:16:22 +00:00
|
|
|
~ThemesInstallWindow();
|
2007-08-15 21:54:15 +00:00
|
|
|
void downloadInfo(void);
|
|
|
|
void show(void);
|
2012-06-23 09:15:46 +00:00
|
|
|
void setLogger(ProgressLoggerGui* l) { logger = l; }
|
|
|
|
void setSelectOnly(bool state) { windowSelectOnly = state; }
|
|
|
|
void install(void);
|
2007-09-14 22:16:22 +00:00
|
|
|
|
2007-08-15 21:54:15 +00:00
|
|
|
public slots:
|
2007-09-15 21:58:31 +00:00
|
|
|
void accept(void);
|
2007-08-15 21:54:15 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::ThemeInstallFrm ui;
|
|
|
|
HttpGet *getter;
|
|
|
|
HttpGet igetter;
|
|
|
|
QTemporaryFile themesInfo;
|
|
|
|
void resizeEvent(QResizeEvent*);
|
2011-10-02 14:30:05 +00:00
|
|
|
void changeEvent(QEvent *event);
|
2007-08-15 21:54:15 +00:00
|
|
|
QByteArray imgData;
|
|
|
|
ProgressLoggerGui *logger;
|
|
|
|
ZipInstaller *installer;
|
|
|
|
QString file;
|
|
|
|
QString fileName;
|
2007-09-14 22:16:22 +00:00
|
|
|
|
|
|
|
QString infocachedir;
|
2012-06-23 09:15:46 +00:00
|
|
|
bool windowSelectOnly;
|
2007-09-14 22:16:22 +00:00
|
|
|
|
2007-08-15 21:54:15 +00:00
|
|
|
private slots:
|
|
|
|
void downloadDone(bool);
|
|
|
|
void downloadDone(int, bool);
|
|
|
|
void updateImage(bool);
|
|
|
|
void abort(void);
|
2009-03-30 21:15:43 +00:00
|
|
|
void updateDetails(QListWidgetItem* cur, QListWidgetItem* prev);
|
|
|
|
void updateSize(void);
|
2007-08-15 21:54:15 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|