59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync/** @file
d34409ad02ea0d28e08a6c4b089a412fdb3b4c9cvboxsync * VBox Qt GUI - UIGlobalSettingsProxy class declaration.
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync */
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync/*
4d3b35c51a38e2583286c7bfb4c5312741c27723vboxsync * Copyright (C) 2011-2012 Oracle Corporation
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync *
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync * available from http://www.virtualbox.org. This file is free software;
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync * you can redistribute it and/or modify it under the terms of the GNU
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync * General Public License (GPL) as published by the Free Software
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync */
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync#ifndef __UIGlobalSettingsProxy_h__
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync#define __UIGlobalSettingsProxy_h__
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync/* Local includes */
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync#include "UISettingsPage.h"
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync#include "UIGlobalSettingsProxy.gen.h"
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync/* Global settings / Proxy page / Cache: */
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsyncstruct UISettingsCacheGlobalProxy
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync{
4d3b35c51a38e2583286c7bfb4c5312741c27723vboxsync UISettingsCacheGlobalProxy()
4d3b35c51a38e2583286c7bfb4c5312741c27723vboxsync : m_fProxyEnabled(false)
4d3b35c51a38e2583286c7bfb4c5312741c27723vboxsync {}
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync bool m_fProxyEnabled;
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync QString m_strProxyHost;
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync QString m_strProxyPort;
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync};
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync/* Global settings / Proxy page: */
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsyncclass UIGlobalSettingsProxy : public UISettingsPageGlobal, public Ui::UIGlobalSettingsProxy
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync{
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync Q_OBJECT;
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsyncpublic:
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync /* Constructor: */
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync UIGlobalSettingsProxy();
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsyncprotected:
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync
ab6b321de44ece2b31cc0240f85599772772bbdfvboxsync /* Load data to cache from corresponding external object(s),
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync * this task COULD be performed in other than GUI thread: */
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync void loadToCacheFrom(QVariant &data);
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync /* Load data to corresponding widgets from cache,
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync * this task SHOULD be performed in GUI thread only: */
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync void getFromCache();
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync /* Save data from corresponding widgets to cache,
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync * this task SHOULD be performed in GUI thread only: */
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync void putToCache();
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync /* Save data from cache to corresponding external object(s),
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync * this task COULD be performed in other than GUI thread: */
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync void saveFromCacheTo(QVariant &data);
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync
8380cc1ac2d9181f710c40bb046358d18286014dvboxsync /* API: Validation stuff: */
da6804db0b8c7fd172bf4ec081a49a42537e6716vboxsync bool validate(QList<UIValidationMessage> &messages);
593227a154e31a3bb9a0ac8d56a946d12f5e7133vboxsync
3f57089db8b1ebd0965c646c5c19fbd5c9e86f30vboxsync /* Helper: Navigation stuff: */
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync void setOrderAfter(QWidget *pWidget);
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync
3f57089db8b1ebd0965c646c5c19fbd5c9e86f30vboxsync /* Helper: Translation stuff: */
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync void retranslateUi();
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsyncprivate slots:
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync
3f57089db8b1ebd0965c646c5c19fbd5c9e86f30vboxsync /* Handler: Proxy-checkbox stuff: */
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync void sltProxyToggled();
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsyncprivate:
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync /* Cache: */
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync UISettingsCacheGlobalProxy m_cache;
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync};
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync#endif // __UIGlobalSettingsProxy_h__
59ea9a9e5d84a87a4e3f4dd3a8f21fbfa82b1190vboxsync