VBoxImportApplianceWgt.cpp revision e64031e20c39650a7bc902a3e1aba613b9415dee
/* $Id$ */
/** @file
*
* VBox frontends: Qt4 GUI ("VirtualBox"):
* VBoxImportApplianceWgt class implementation
*/
/*
* Copyright (C) 2009 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.
*/
/* VBox includes */
#include "VBoxImportApplianceWgt.h"
#include "VBoxGlobal.h"
#include "VBoxProblemReporter.h"
////////////////////////////////////////////////////////////////////////////////
// ImportSortProxyModel
class ImportSortProxyModel: public VirtualSystemSortProxyModel
{
public:
{
}
};
////////////////////////////////////////////////////////////////////////////////
// VBoxImportApplianceWgt
{
}
{
bool fResult = false;
{
/* Create a appliance object */
if (fResult)
{
/* Read the appliance */
if (fResult)
{
/* Show some progress, so the user know whats going on */
{
return false;
}
/* Now we have to interpret that stuff */
mAppliance->Interpret();
if (fResult)
{
if (mModel)
delete mModel;
/* Set our own model */
/* Set our own delegate */
/* For now we hide the original column. This data is displayed as tooltip
also. */
mTvSettings->expandAll();
/* Check for warnings & if there are one display them. */
bool fWarningsEnabled = false;
{
fWarningsEnabled = true;
}
}
}
}
if (!fResult)
{
/* Delete the appliance in a case of an error */
delete mAppliance;
mAppliance = NULL;
}
}
return fResult;
}
void VBoxImportApplianceWgt::prepareImport()
{
if (mAppliance)
}
bool VBoxImportApplianceWgt::import()
{
if (mAppliance)
{
/* Start the import asynchronously */
if (fResult)
{
/* Show some progress, so the user know whats going on */
{
return false;
}
else
return true;
}
if (!fResult)
}
return false;
}
{
{
{
}
}
return list;
}