VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.h@ 86095

Last change on this file since 86095 was 86095, checked in by vboxsync, 4 years ago

FE/Qt: bugref:9827: A bit of doxygen fixes for settings load/save API.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1/* $Id: UIGlobalSettingsGeneral.h 86095 2020-09-11 14:28:34Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIGlobalSettingsGeneral class declaration.
4 */
5
6/*
7 * Copyright (C) 2006-2020 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef FEQT_INCLUDED_SRC_settings_global_UIGlobalSettingsGeneral_h
19#define FEQT_INCLUDED_SRC_settings_global_UIGlobalSettingsGeneral_h
20#ifndef RT_WITHOUT_PRAGMA_ONCE
21# pragma once
22#endif
23
24/* GUI includes: */
25#include "UISettingsPage.h"
26
27/* Forward declarations: */
28class QLabel;
29class UIFilePathSelector;
30struct UIDataSettingsGlobalGeneral;
31typedef UISettingsCache<UIDataSettingsGlobalGeneral> UISettingsCacheGlobalGeneral;
32
33/** Global settings: General page. */
34class SHARED_LIBRARY_STUFF UIGlobalSettingsGeneral : public UISettingsPageGlobal
35{
36 Q_OBJECT;
37
38public:
39
40 /** Constructs General settings page. */
41 UIGlobalSettingsGeneral();
42 /** Destructs General settings page. */
43 ~UIGlobalSettingsGeneral();
44
45protected:
46
47 /** Loads settings from external object(s) packed inside @a data to cache.
48 * @note This task WILL be performed in other than the GUI thread, no widget interactions! */
49 virtual void loadToCacheFrom(QVariant &data) /* override */;
50 /** Loads data from cache to corresponding widgets.
51 * @note This task WILL be performed in the GUI thread only, all widget interactions here! */
52 virtual void getFromCache() /* override */;
53
54 /** Saves data from corresponding widgets to cache.
55 * @note This task WILL be performed in the GUI thread only, all widget interactions here! */
56 virtual void putToCache() /* override */;
57 /** Saves settings from cache to external object(s) packed inside @a data.
58 * @note This task WILL be performed in other than the GUI thread, no widget interactions! */
59 virtual void saveFromCacheTo(QVariant &data) /* overrride */;
60
61 /** Handles translation event. */
62 virtual void retranslateUi() /* override */;
63
64private:
65
66 /** Prepares all. */
67 void prepare();
68 /** Prepares widgets. */
69 void prepareWidgets();
70 /** Cleanups all. */
71 void cleanup();
72
73 /** Saves existing general data from the cache. */
74 bool saveGeneralData();
75
76 /** Holds the page data cache instance. */
77 UISettingsCacheGlobalGeneral *m_pCache;
78
79 /** @name Widgets
80 * @{ */
81 /** Holds machine folder label instance. */
82 QLabel *m_pLabelMachineFolder;
83 /** Holds machine folder selector instance. */
84 UIFilePathSelector *m_pSelectorMachineFolder;
85 /** Holds VRDP library name label instance. */
86 QLabel *m_pLabelVRDPLibraryName;
87 /** Holds VRDP library name selector instance. */
88 UIFilePathSelector *m_pSelectorVRDPLibraryName;
89 /** @} */
90};
91
92#endif /* !FEQT_INCLUDED_SRC_settings_global_UIGlobalSettingsGeneral_h */
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette