UIMessageCenter.h revision eb9b4d0a3abf0bff7bbfff28039e4fc46be595e5
/** @file
*
* VBox frontends: Qt GUI ("VirtualBox"):
* UIMessageCenter class declaration
*/
/*
* Copyright (C) 2006-2011 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef __UIMessageCenter_h__
#define __UIMessageCenter_h__
/* Global includes */
#include <QObject>
#include <QPointer>
/* Local includes */
#include "COMDefs.h"
#include "QIMessageBox.h"
/* Forward declarations */
struct StorageSlot;
/**
* situations that happen during application runtime and require the user's
* attention.
*
* error to the user and give him the opportunity to select an action (when
* appropriate).
*
* Every problem situation has its own (correspondingly named) method in this
* class that takes a list of arguments necessary to describe the situation and
* to provide the appropriate actions. The method then returns the choice to the
* caller.
*/
{
enum Type
{
Info = 1,
};
enum
{
AutoConfirmed = 0x8000
};
bool isAnyWarningShown();
void closeAllWarnings();
const char *pcszAutoConfirmId = 0,
const char *pcszAutoConfirmId,
{
}
const char *pcszAutoConfirmId = 0,
{
0,
}
const char *pcszAutoConfirmId,
{
}
const char *pcszAutoConfirmId = 0,
{
0,
}
const char *pcszAutoConfirmId,
{
}
const QString &strMessage,
const QString &strOptionText,
bool fDefaultOptionValue = true,
int iButton1 = 0,
int iButton2 = 0,
int iButton3 = 0,
QWidget* mainWindowShown() const;
QWidget* mainMachineWindowShown() const;
void checkForMountedWrongUSB();
void showBETAWarning();
void showBEBWarning();
#ifdef Q_WS_X11
#endif
void cannotReregisterMachine(QWidget *pParent, const QString &strMachinePath, const QString &strMachineName);
void cannotSendACPIToMachine();
bool warnAboutVirtNotEnabled64BitsGuest(bool fHWVirtExSupported);
const QString &strTargetImageName,
const QString &strTargetImageMaxSize,
const QString &strTargetFileSystemFree);
void cannotFindSnapshotByName(QWidget *pParent, const CMachine &machine, const QString &strMachine) const;
int cannotEnterFullscreenMode();
int cannotEnterSeamlessMode();
void cannotChangeMediumType(QWidget *pParent, const CMedium &medium, KMediumType oldMediumType, KMediumType newMediumType);
const QString &strLocation);
const QString &strLocation);
int confirmRemovingOfLastDVDDevice() const;
const QString &strLocation,
int cannotRemountMedium(QWidget *pParent, const CMachine &machine, const VBoxMedium &aMedium, bool fMount, bool fRetry);
const CVirtualBoxErrorInfo &error);
const CVirtualBoxErrorInfo &error);
bool proposeDownloadExtensionPack();
const QString &strVersion,
void remindAboutAutoCapture();
void remindAboutMouseIntegration(bool fSupportsAbsolute);
bool remindAboutPausedVMInput();
bool remindAboutInaccessibleMedia();
const QString &strLogFolder);
void cannotRunInSelectorMode();
void cannotImportAppliance(const CProgress &progress, CAppliance *pAppliance, QWidget *pParent = NULL) const;
bool confirmExportMachinesInSaveState(const QStringList &strMachineNames, QWidget *pParent = NULL) const;
void cannotExportAppliance(const CMachine &machine, CAppliance *pAppliance, QWidget *pParent = NULL) const;
void cannotExportAppliance(const CProgress &progress, CAppliance *pAppliance, QWidget *pParent = NULL) const;
void cannotOpenExtPack(const QString &strFilename, const CExtPackManager &extPackManager, QWidget *pParent);
void cannotInstallExtPack(const QString &strFilename, const CExtPackFile &extPackFile, const CProgress &progress, QWidget *pParent);
void cannotUninstallExtPack(const QString &strPackName, const CExtPackManager &extPackManager, const CProgress &progress, QWidget *pParent);
bool confirmInstallingPackage(const QString &strPackName, const QString &strPackVersion, const QString &strPackDescription, QWidget *pParent);
bool confirmReplacePackage(const QString &strPackName, const QString &strPackVersionNew, const QString &strPackVersionOld,
const QString &strErrorId,
const QString &strErrorMsg) const;
{
}
{
}
{
}
/* Stuff supporting interthreading: */
void cannotRemoveHostInterface(const CHost &host, const CHostNetworkInterface &iface, QWidget *pParent = 0);
void cannotRemoveHostInterface(const CProgress &progress, const CHostNetworkInterface &iface, QWidget *pParent = 0);
void sigDownloaderUserManualCreated();
void sigToCloseAllWarnings();
/* Stuff supporting interthreading: */
void sigCannotRemoveHostInterface(const CHost &host, const CHostNetworkInterface &iface, QWidget *pParent);
void sigCannotRemoveHostInterface(const CProgress &progress, const CHostNetworkInterface &iface, QWidget *pParent);
void sltShowHelpWebDialog();
void sltShowHelpAboutDialog();
void sltShowHelpHelpDialog();
void sltResetSuppressedMessages();
/* Stuff supporting interthreading: */
void sltCannotRemoveHostInterface(const CHost &host, const CHostNetworkInterface &iface, QWidget *pParent);
void sltCannotRemoveHostInterface(const CProgress &progress, const CHostNetworkInterface &iface, QWidget *pParent);
static UIMessageCenter &instance();
};
/* Shortcut to the static UIMessageCenter::instance() method, for convenience. */
#endif // __UIMessageCenter_h__