UIWizardCloneVDPageBasic2.cpp revision 8bf8c6b1914c9e7e60b1547888400668f1774497
/* $Id$ */
/** @file
*
* VBox frontends: Qt4 GUI ("VirtualBox"):
* UIWizardCloneVDPageBasic2 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>
/* GUI includes: */
#include "UIWizardCloneVDPageBasic2.h"
#include "UIWizardCloneVD.h"
#include "VBoxGlobal.h"
#include "QIRichTextLabel.h"
/* COM includes: */
#include "CSystemProperties.h"
{
}
void UIWizardCloneVDPage2::addFormatButton(QWidget *pParent, QVBoxLayout *pFormatLayout, CMediumFormat medFormat)
{
/* Check that medium format supports creation: */
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: */
}
bool UIWizardCloneVDPageBasic2::isComplete() const
{
/* Make sure medium format is correct: */
return !mediumFormat().isNull();
}
int UIWizardCloneVDPageBasic2::nextId() const
{
/* Show variant page only if there is something to show: */
int cTest = 0;
++cTest;
++cTest;
++cTest;
if (cTest > 1)
return UIWizardCloneVD::Page3;
/* Skip otherwise: */
return UIWizardCloneVD::Page4;
}