/* $Id$ */
/** @file
* VBox Qt GUI - UIWizardCloneVDPageBasic2 class implementation.
*/
/*
* Copyright (C) 2006-2013 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.
*/
# include <precomp.h>
#else /* !VBOX_WITH_PRECOMPILED_HEADERS */
/* Qt includes: */
# include <QVBoxLayout>
# include <QButtonGroup>
# include <QRadioButton>
/* GUI includes: */
# include "UIWizardCloneVDPageBasic2.h"
# include "UIWizardCloneVD.h"
# include "VBoxGlobal.h"
# include "QIRichTextLabel.h"
/* COM includes: */
# include "CSystemProperties.h"
#endif /* !VBOX_WITH_PRECOMPILED_HEADERS */
{
}
void UIWizardCloneVDPage2::addFormatButton(QWidget *pParent, QVBoxLayout *pFormatLayout, CMediumFormat medFormat)
{
/* Check that medium format supports creation: */
//ULONG uFormatCapabilities = medFormat.GetCapabilities();
for (int i = 0; i < capabilities.size(); i++)
uFormatCapabilities |= capabilities[i];
return;
/* Check that medium format supports creation of virtual hard-disks: */
return;
}
{
return m_pFormatButtonGroup->checkedButton() ? m_formats[m_pFormatButtonGroup->checkedId()] : CMediumFormat();
}
{
if (iPosition >= 0)
{
}
}
{
/* Create widgets: */
{
m_pLabel = new QIRichTextLabel(this);
{
m_pFormatButtonGroup = new QButtonGroup(this);
{
for (int i = 0; i < medFormats.size(); ++i)
{
}
for (int i = 0; i < medFormats.size(); ++i)
{
}
{
}
}
}
}
/* Setup connections: */
connect(m_pFormatButtonGroup, SIGNAL(buttonClicked(QAbstractButton *)), this, SIGNAL(completeChanged()));
/* Register classes: */
/* Register fields: */
}
{
/* Translate page: */
/* Translate widgets: */
"for the new virtual hard drive. If you do not need to use it "
"with other virtualization software you can leave this setting unchanged."));
{
pButton->setText(VBoxGlobal::fullMediumFormatName(m_formatNames[m_pFormatButtonGroup->id(pButton)]));
}
}
{
/* Translate page: */
}
{
/* Make sure medium format is correct: */
return !mediumFormat().isNull();
}
{
/* Show variant page only if there is something to show: */
{
AssertMsgFailed(("No medium format set!"));
}
else
{
for (int i = 0; i < capabilities.size(); i++)
uCapabilities |= capabilities[i];
int cTest = 0;
++cTest;
++cTest;
++cTest;
if (cTest > 1)
return UIWizardCloneVD::Page3;
}
/* Skip otherwise: */
return UIWizardCloneVD::Page4;
}