UIWizardCloneVDPageBasic3.cpp revision c08aa36b1e3aa3c1ece14402ab7440f1e7f52503
/* $Id$ */
/** @file
*
* VBox frontends: Qt4 GUI ("VirtualBox"):
* UIWizardCloneVDPageBasic3 class implementation
*/
/*
* Copyright (C) 2006-2012 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.
*/
/* Qt includes: */
#include <QVBoxLayout>
#include <QButtonGroup>
#include <QRadioButton>
#include <QCheckBox>
/* GUI includes: */
#include "UIWizardCloneVDPageBasic3.h"
#include "UIWizardCloneVD.h"
#include "QIRichTextLabel.h"
/* COM includes: */
#include "CMediumFormat.h"
{
}
{
/* Initial value: */
/* Exclusive options: */
if (m_pDynamicalButton->isChecked())
else if (m_pFixedButton->isChecked())
/* Additional options: */
if (m_pSplitBox->isChecked())
/* Return options: */
return uMediumVariant;
}
{
/* Exclusive options: */
{
m_pFixedButton->click();
}
else
{
}
/* Additional options: */
}
{
/* Create widgets: */
{
m_pDescriptionLabel = new QIRichTextLabel(this);
m_pDynamicLabel = new QIRichTextLabel(this);
m_pFixedLabel = new QIRichTextLabel(this);
m_pSplitLabel = new QIRichTextLabel(this);
{
m_pVariantButtonGroup = new QButtonGroup(this);
{
m_pDynamicalButton = new QRadioButton(this);
{
}
m_pFixedButton = new QRadioButton(this);
}
m_pSplitBox = new QCheckBox(this);
}
}
/* Setup connections: */
connect(m_pVariantButtonGroup, SIGNAL(buttonClicked(QAbstractButton *)), this, SIGNAL(completeChanged()));
/* Register fields: */
}
{
/* Translate page: */
/* Translate widgets: */
m_pDescriptionLabel->setText(UIWizardCloneVD::tr("Please choose whether the new virtual hard drive file should grow as it is used "
"(dynamically allocated) or if it should be created at its maximum size (fixed size)."));
m_pDynamicLabel->setText(UIWizardCloneVD::tr("<p>A <b>dynamically allocated</b> hard drive file will only use space "
"on your physical hard drive as it fills up (up to a maximum <b>fixed size</b>), "
"although it will not shrink again automatically when space on it is freed.</p>"));
m_pFixedLabel->setText(UIWizardCloneVD::tr("<p>A <b>fixed size</b> hard drive file may take longer to create on some "
"systems but is often faster to use.</p>"));
m_pSplitLabel->setText(UIWizardCloneVD::tr("<p>You can also choose to <b>split</b> the hard drive file into several files "
"of up to two gigabytes each. This is mainly useful if you wish to store the "
"virtual machine on removable USB devices or old systems, some of which cannot "
"handle very large files."));
}
{
/* Translate page: */
/* Setup visibility: */
ULONG uCapabilities = 0;
uCapabilities |= capabilities[i];
}
bool UIWizardCloneVDPageBasic3::isComplete() const
{
/* Make sure medium variant is correct: */
}