3
* VBox frontends: Qt GUI ("VirtualBox"):
4
* UIDownloader for extension pack
8
* Copyright (C) 2011 Oracle Corporation
10
* This file is part of VirtualBox Open Source Edition (OSE), as
11
* available from http://www.virtualbox.org. This file is free software;
12
* you can redistribute it and/or modify it under the terms of the GNU
13
* General Public License (GPL) as published by the Free Software
14
* Foundation, in version 2 as it comes in the "COPYING" file of the
15
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
16
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
19
#ifndef __UIDownloaderExtensionPack_h__
20
#define __UIDownloaderExtensionPack_h__
23
#include "QIWithRetranslateUI.h"
24
#include "UIDownloader.h"
26
/* UIMiniProgressWidget reimplementation for the VirtualBox extension pack downloading: */
27
class UIMiniProgressWidgetExtension : public QIWithRetranslateUI<UIMiniProgressWidget>
34
UIMiniProgressWidgetExtension(const QString &strSource, QWidget *pParent = 0);
38
/* Translating stuff: */
42
/* UIDownloader reimplementation for the VirtualBox Extension Pack updating: */
43
class UIDownloaderExtensionPack : public UIDownloader
49
/* Returns updater if exists: */
50
static UIDownloaderExtensionPack* current() { return m_pInstance; }
51
/* Start downloading: */
52
static void download(QObject *pListener);
56
/* Notify listeners about extension pack downloaded: */
57
void sigNotifyAboutExtensionPackDownloaded(const QString &strSource, const QString &strTarget);
61
/* Constructor/destructor: */
62
UIDownloaderExtensionPack();
63
~UIDownloaderExtensionPack();
65
/* Virtual methods reimplementations: */
66
UIMiniProgressWidget* createProgressWidgetFor(QWidget *pParent) const;
67
bool askForDownloadingConfirmation(QNetworkReply *pReply);
68
void handleDownloadedObject(QNetworkReply *pReply);
69
void warnAboutNetworkError(const QString &strError);
72
static UIDownloaderExtensionPack *m_pInstance;
75
#endif // __UIDownloaderExtensionPack_h__