UIMachineSettingsGeneral.cpp revision cb48b678483eed76053da41c3f0f2600eeeed5f4
/* $Id$ */
/** @file
*
* VBox frontends: Qt4 GUI ("VirtualBox"):
* UIMachineSettingsGeneral class implementation
*/
/*
* Copyright (C) 2006-2011 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 "UIMachineSettingsGeneral.h"
#include "VBoxGlobal.h"
#include "UIMessageCenter.h"
#include "QIWidgetValidator.h"
#include <QDir>
: mValidator(0)
, m_fHWVirtExEnabled(false)
{
/* Apply UI decorations */
/* Setup validators */
/* Shared Clipboard mode */
#ifdef Q_WS_MAC
#endif /* Q_WS_MAC */
/* Applying language settings */
}
{
return mOSTypeSelector->type();
}
{
}
bool UIMachineSettingsGeneral::is64BitOSTypeSelected() const
{
}
#ifdef VBOX_WITH_VIDEOHWACCEL
bool UIMachineSettingsGeneral::isWindowsOSTypeSelected() const
{
}
#endif /* VBOX_WITH_VIDEOHWACCEL */
/* Load data to cashe from corresponding external object(s),
* this task COULD be performed in other than GUI thread: */
{
/* Fetch data to machine: */
/* Clear cache initially: */
/* Prepare general data: */
/* Gather general data: */
/* Cache general data: */
/* Upload machine to data: */
}
/* Load data to corresponding widgets from cache,
* this task SHOULD be performed in GUI thread only: */
void UIMachineSettingsGeneral::getFromCache()
{
/* Get general data from cache: */
/* Load general data to page: */
/* Polish page finally: */
polishPage();
/* Revalidate if possible: */
if (mValidator)
mValidator->revalidate();
}
/* Save data from corresponding widgets to cache,
* this task SHOULD be performed in GUI thread only: */
void UIMachineSettingsGeneral::putToCache()
{
/* Prepare general data: */
/* Gather general data: */
/* Cache general data: */
}
/* Save data from cache to corresponding external object(s),
* this task COULD be performed in other than GUI thread: */
{
/* Fetch data to machine: */
/* Check if general data was changed: */
if (m_cache.wasChanged())
{
/* Get general data from cache: */
/* Store general data: */
if (isMachineInValidMode())
{
/* Advanced tab: */
m_machine.SetExtraData(VBoxDefs::GUI_SaveMountedAtRuntime, generalData.m_fSaveMountedAtRuntime ? "yes" : "no");
m_machine.SetExtraData(VBoxDefs::GUI_ShowMiniToolBar, generalData.m_fShowMiniToolBar ? "yes" : "no");
m_machine.SetExtraData(VBoxDefs::GUI_MiniToolBarAlignment, generalData.m_fMiniToolBarAtTop ? "top" : "bottom");
/* Description tab: */
}
if (isMachineOffline())
{
/* Basic tab: */
/* Advanced tab: */
/* Basic (again) tab: */
/* VM name must be last as otherwise its VM rename magic can collide with other settings in the config,
* especially with the snapshot folder: */
}
}
/* Upload machine to data: */
}
{
mValidator = aVal;
}
{
if (is64BitOSTypeSelected() && !m_fHWVirtExEnabled)
"automatically.");
return true;
}
{
/* Basic tab-order */
/* Advanced tab-order */
/* Description tab-order */
}
{
/* Translate uic generated strings */
/* Path selector */
"virtual machine will be stored. Be aware that "
"snapshots can take quite a lot of disk "
"space."));
/* Shared Clipboard mode */
}
void UIMachineSettingsGeneral::polishPage()
{
/* Basic tab: */
/* Advanced tab: */
}