~ubuntu-branches/ubuntu/precise/virtualbox/precise-updates

« back to all changes in this revision

Viewing changes to src/VBox/Frontends/VirtualBox/src/net/UIDownloaderExtensionPack.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-10-17 23:23:09 UTC
  • mfrom: (3.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20111017232309-kzm6841lzk61ranj
Tags: 4.1.4-dfsg-1
* New upstream release.
  - Fixes missing icons when using pt_BR locale. (Closes: #507188)
  - Fixes guest additions download url. (Closes: #637349; LP: #840668)
* Refresh patches.
* Drop the vboxmouse x11 driver. The mouse integration is now completely
  handled by the kernel module.
* Restrict dh_pycentral to the virtualbox binary package.
* Merge changes from the Ubuntu package but use them only when built
  on Ubuntu:
  - Add an Apport hook.
  - Add vboxguest modalias to the package control field.
* Pass KBUILD_VERBOSE=2 to kmk.
* Add 36-fix-text-mode.patch to fix text mode when using the vboxvideo driver.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/** @file
 
2
 *
 
3
 * VBox frontends: Qt GUI ("VirtualBox"):
 
4
 * UIDownloader for extension pack
 
5
 */
 
6
 
 
7
/*
 
8
 * Copyright (C) 2011 Oracle Corporation
 
9
 *
 
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.
 
17
 */
 
18
 
 
19
#ifndef __UIDownloaderExtensionPack_h__
 
20
#define __UIDownloaderExtensionPack_h__
 
21
 
 
22
/* Local includes: */
 
23
#include "QIWithRetranslateUI.h"
 
24
#include "UIDownloader.h"
 
25
 
 
26
/* UIMiniProgressWidget reimplementation for the VirtualBox extension pack downloading: */
 
27
class UIMiniProgressWidgetExtension : public QIWithRetranslateUI<UIMiniProgressWidget>
 
28
{
 
29
    Q_OBJECT;
 
30
 
 
31
public:
 
32
 
 
33
    /* Constructor: */
 
34
    UIMiniProgressWidgetExtension(const QString &strSource, QWidget *pParent = 0);
 
35
 
 
36
private:
 
37
 
 
38
    /* Translating stuff: */
 
39
    void retranslateUi();
 
40
};
 
41
 
 
42
/* UIDownloader reimplementation for the VirtualBox Extension Pack updating: */
 
43
class UIDownloaderExtensionPack : public UIDownloader
 
44
{
 
45
    Q_OBJECT;
 
46
 
 
47
public:
 
48
 
 
49
    /* Returns updater if exists: */
 
50
    static UIDownloaderExtensionPack* current() { return m_pInstance; }
 
51
    /* Start downloading: */
 
52
    static void download(QObject *pListener);
 
53
 
 
54
signals:
 
55
 
 
56
    /* Notify listeners about extension pack downloaded: */
 
57
    void sigNotifyAboutExtensionPackDownloaded(const QString &strSource, const QString &strTarget);
 
58
 
 
59
private:
 
60
 
 
61
    /* Constructor/destructor: */
 
62
    UIDownloaderExtensionPack();
 
63
    ~UIDownloaderExtensionPack();
 
64
 
 
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);
 
70
 
 
71
    /* Variables: */
 
72
    static UIDownloaderExtensionPack *m_pInstance;
 
73
};
 
74
 
 
75
#endif // __UIDownloaderExtensionPack_h__