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: */
|
---|
28 | class QLabel;
|
---|
29 | class UIFilePathSelector;
|
---|
30 | struct UIDataSettingsGlobalGeneral;
|
---|
31 | typedef UISettingsCache<UIDataSettingsGlobalGeneral> UISettingsCacheGlobalGeneral;
|
---|
32 |
|
---|
33 | /** Global settings: General page. */
|
---|
34 | class SHARED_LIBRARY_STUFF UIGlobalSettingsGeneral : public UISettingsPageGlobal
|
---|
35 | {
|
---|
36 | Q_OBJECT;
|
---|
37 |
|
---|
38 | public:
|
---|
39 |
|
---|
40 | /** Constructs General settings page. */
|
---|
41 | UIGlobalSettingsGeneral();
|
---|
42 | /** Destructs General settings page. */
|
---|
43 | ~UIGlobalSettingsGeneral();
|
---|
44 |
|
---|
45 | protected:
|
---|
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 |
|
---|
64 | private:
|
---|
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 */
|
---|