UIWizardFirstRunPageBasic.cpp revision 8bf8c6b1914c9e7e60b1547888400668f1774497
/* $Id$ */
/** @file
*
* VBox frontends: Qt4 GUI ("VirtualBox"):
* UIWizardFirstRunPageBasic class implementation
*/
/*
* Copyright (C) 2008-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 <QHBoxLayout>
/* GUI includes: */
#include "UIWizardFirstRunPageBasic.h"
#include "UIWizardFirstRun.h"
#include "UIIconPool.h"
#include "VBoxGlobal.h"
#include "UIMessageCenter.h"
#include "VBoxMediaComboBox.h"
#include "QIToolButton.h"
#include "QIRichTextLabel.h"
{
}
{
/* Get opened vboxMedium id: */
QString strMediumId = vboxGlobal().openMediumWithFileOpenDialog(m_pMediaSelector->type(), thisImp());
/* Update medium-combo if necessary: */
if (!strMediumId.isNull())
}
{
return m_pMediaSelector->id();
}
{
}
UIWizardFirstRunPageBasic::UIWizardFirstRunPageBasic(const QString &strMachineId, bool fBootHardDiskWasSet)
{
/* Create widgets: */
{
m_pLabel = new QIRichTextLabel(this);
{
m_pMediaSelector = new VBoxMediaComboBox(this);
{
}
m_pSelectMediaButton = new QIToolButton(this);
{
m_pSelectMediaButton->setIcon(UIIconPool::iconSet(":/select_file_16px.png", ":/select_file_dis_16px.png"));
m_pSelectMediaButton->setAutoRaise(true);
}
}
}
/* Setup connections: */
/* Register fields: */
}
{
/* Call to base-class: */
}
{
/* Translate widgets: */
"or a physical optical drive containing a disk "
"to start your new virtual machine from.</p>"
"<p>The disk should be suitable for starting a computer from "
"and should contain the operating system you wish to install "
"on the virtual machine if you want to do that now. "
"The disk will be ejected from the virtual drive "
"automatically next time you switch the virtual machine off, "
"but you can also do this yourself if needed using the Devices menu.</p>"));
else
"or a physical optical drive containing a disk "
"to start your new virtual machine from.</p>"
"<p>The disk should be suitable for starting a computer from. "
"As this virtual machine has no hard drive "
"you will not be able to install an operating system on it at the moment.</p>"));
}
{
/* Translate page: */
}
bool UIWizardFirstRunPageBasic::isComplete() const
{
/* Make sure valid medium chosen: */
}
{
/* Initial result: */
bool fResult = true;
/* Lock finish button: */
/* Try to insert chosen medium: */
if (fResult)
/* Unlock finish button: */
/* Return result: */
return fResult;
}
{
return m_pMediaSelector->currentText();
}