UIGlobalSettingsUpdate.cpp revision 9f72be0517ae135bdd3e6ee140d3321b40aeb6e7
/* $Id$ */
/** @file
*
* VBox frontends: Qt4 GUI ("VirtualBox"):
* UIGlobalSettingsUpdate class implementation
*/
/*
* Copyright (C) 2006-2010 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.
*/
/* Local includes */
#include "UIGlobalSettingsUpdate.h"
#include "VBoxGlobal.h"
/* Update page constructor: */
: m_pLastChosenRadio(0)
, m_fChanged(false)
{
/* Apply UI decorations: */
/* Setup connections: */
/* Apply language settings: */
}
/* Load data to cashe from corresponding external object(s),
* this task COULD be performed in other than GUI thread: */
{
/* Fetch data to properties & settings: */
/* Fill internal variables with corresponding values: */
/* Upload properties & settings to data: */
}
/* Load data to corresponding widgets from cache,
* this task SHOULD be performed in GUI thread only: */
void UIGlobalSettingsUpdate::getFromCache()
{
/* Apply internal variables data to QWidget(s): */
if (m_pEnableUpdateCheckbox->isChecked())
{
m_pUpdateFilterBetasRadio->setChecked(true);
m_pUpdateFilterEveryRadio->setChecked(true);
else
m_pUpdateFilterStableRadio->setChecked(true);
}
/* Reset settings altering flag: */
m_fChanged = false;
}
/* Save data from corresponding widgets to cache,
* this task SHOULD be performed in GUI thread only: */
void UIGlobalSettingsUpdate::putToCache()
{
/* Gather internal variables data from QWidget(s): */
}
/* Save data from cache to corresponding external object(s),
* this task COULD be performed in other than GUI thread: */
{
/* Test settings altering flag: */
if (!m_fChanged)
return;
/* Fetch data to properties & settings: */
/* Gather corresponding values from internal variables: */
/* Upload properties & settings to data: */
}
{
}
void UIGlobalSettingsUpdate::retranslateUi()
{
/* Translate uic generated strings: */
/* Retranslate m_pUpdatePeriodCombo combobox: */
}
{
/* Update time of next check: */
/* Temporary remember branch type if was switched off: */
if (!fEnabled)
{
}
if (m_pLastChosenRadio)
}
{
m_fChanged = true;
}
{
m_fChanged = true;
}
{
}
{
if (m_pUpdateFilterBetasRadio->isChecked())
return VBoxUpdateData::BranchWithBetas;
else if (m_pUpdateFilterEveryRadio->isChecked())
return VBoxUpdateData::BranchAllRelease;
else
return VBoxUpdateData::BranchStable;
}