1 | /* $Id: UIMachineSettingsSystem.h 103803 2024-03-12 11:15:18Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIMachineSettingsSystem class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2008-2023 Oracle and/or its affiliates.
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox base platform packages, as
|
---|
10 | * available from https://www.virtualbox.org.
|
---|
11 | *
|
---|
12 | * This program is free software; you can redistribute it and/or
|
---|
13 | * modify it under the terms of the GNU General Public License
|
---|
14 | * as published by the Free Software Foundation, in version 3 of the
|
---|
15 | * License.
|
---|
16 | *
|
---|
17 | * This program is distributed in the hope that it will be useful, but
|
---|
18 | * WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
---|
20 | * General Public License for more details.
|
---|
21 | *
|
---|
22 | * You should have received a copy of the GNU General Public License
|
---|
23 | * along with this program; if not, see <https://www.gnu.org/licenses>.
|
---|
24 | *
|
---|
25 | * SPDX-License-Identifier: GPL-3.0-only
|
---|
26 | */
|
---|
27 |
|
---|
28 | #ifndef FEQT_INCLUDED_SRC_settings_machine_UIMachineSettingsSystem_h
|
---|
29 | #define FEQT_INCLUDED_SRC_settings_machine_UIMachineSettingsSystem_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* COM includes: */
|
---|
35 | #include "KChipsetType.h"
|
---|
36 |
|
---|
37 | /* GUI includes: */
|
---|
38 | #include "UISettingsPage.h"
|
---|
39 |
|
---|
40 | /* Forward declarations: */
|
---|
41 | struct UIDataSettingsMachineSystem;
|
---|
42 | typedef UISettingsCache<UIDataSettingsMachineSystem> UISettingsCacheMachineSystem;
|
---|
43 | class QITabWidget;
|
---|
44 | class UIAccelerationFeaturesEditor;
|
---|
45 | class UIBaseMemoryEditor;
|
---|
46 | class UIBootOrderEditor;
|
---|
47 | class UIChipsetEditor;
|
---|
48 | class UIExecutionCapEditor;
|
---|
49 | class UIMotherboardFeaturesEditor;
|
---|
50 | class UIParavirtProviderEditor;
|
---|
51 | class UIPointingHIDEditor;
|
---|
52 | class UIProcessorFeaturesEditor;
|
---|
53 | class UITpmEditor;
|
---|
54 | class UIVirtualCPUEditor;
|
---|
55 |
|
---|
56 | /** Machine settings: System page. */
|
---|
57 | class SHARED_LIBRARY_STUFF UIMachineSettingsSystem : public UISettingsPageMachine
|
---|
58 | {
|
---|
59 | Q_OBJECT;
|
---|
60 |
|
---|
61 | public:
|
---|
62 |
|
---|
63 | /** Constructs System settings page. */
|
---|
64 | UIMachineSettingsSystem();
|
---|
65 | /** Destructs System settings page. */
|
---|
66 | virtual ~UIMachineSettingsSystem() RT_OVERRIDE;
|
---|
67 |
|
---|
68 | /** Returns whether the HW Virt Ex is supported. */
|
---|
69 | bool isHWVirtExSupported() const;
|
---|
70 |
|
---|
71 | /** Returns whether the Nested Paging is supported. */
|
---|
72 | bool isNestedPagingSupported() const;
|
---|
73 | /** Returns whether the Nested Paging is enabled. */
|
---|
74 | bool isNestedPagingEnabled() const;
|
---|
75 |
|
---|
76 | /** Returns whether the Nested HW Virt Ex is supported. */
|
---|
77 | bool isNestedHWVirtExSupported() const;
|
---|
78 | /** Returns whether the Nested HW Virt Ex is enabled. */
|
---|
79 | bool isNestedHWVirtExEnabled() const;
|
---|
80 |
|
---|
81 | /** Returns whether the HID is enabled. */
|
---|
82 | bool isHIDEnabled() const;
|
---|
83 |
|
---|
84 | /** Returns the chipset type. */
|
---|
85 | KChipsetType chipsetType() const;
|
---|
86 |
|
---|
87 | /** Defines whether the USB is enabled. */
|
---|
88 | void setUSBEnabled(bool fEnabled);
|
---|
89 |
|
---|
90 | protected:
|
---|
91 |
|
---|
92 | /** Returns whether the page content was changed. */
|
---|
93 | virtual bool changed() const RT_OVERRIDE;
|
---|
94 |
|
---|
95 | /** Loads settings from external object(s) packed inside @a data to cache.
|
---|
96 | * @note This task WILL be performed in other than the GUI thread, no widget interactions! */
|
---|
97 | virtual void loadToCacheFrom(QVariant &data) RT_OVERRIDE;
|
---|
98 | /** Loads data from cache to corresponding widgets.
|
---|
99 | * @note This task WILL be performed in the GUI thread only, all widget interactions here! */
|
---|
100 | virtual void getFromCache() RT_OVERRIDE;
|
---|
101 |
|
---|
102 | /** Saves data from corresponding widgets to cache.
|
---|
103 | * @note This task WILL be performed in the GUI thread only, all widget interactions here! */
|
---|
104 | virtual void putToCache() RT_OVERRIDE;
|
---|
105 | /** Saves settings from cache to external object(s) packed inside @a data.
|
---|
106 | * @note This task WILL be performed in other than the GUI thread, no widget interactions! */
|
---|
107 | virtual void saveFromCacheTo(QVariant &data) RT_OVERRIDE;
|
---|
108 |
|
---|
109 | /** Performs validation, updates @a messages list if something is wrong. */
|
---|
110 | virtual bool validate(QList<UIValidationMessage> &messages) RT_OVERRIDE;
|
---|
111 |
|
---|
112 | /** Defines TAB order for passed @a pWidget. */
|
---|
113 | virtual void setOrderAfter(QWidget *pWidget) RT_OVERRIDE;
|
---|
114 |
|
---|
115 | /** Handles translation event. */
|
---|
116 | virtual void retranslateUi() RT_OVERRIDE;
|
---|
117 |
|
---|
118 | /** Handles filter change. */
|
---|
119 | virtual void handleFilterChange() RT_OVERRIDE;
|
---|
120 |
|
---|
121 | /** Performs final page polishing. */
|
---|
122 | virtual void polishPage() RT_OVERRIDE;
|
---|
123 |
|
---|
124 | private:
|
---|
125 |
|
---|
126 | /** Prepares all. */
|
---|
127 | void prepare();
|
---|
128 | /** Prepares widgets. */
|
---|
129 | void prepareWidgets();
|
---|
130 | /** Prepares 'Motherboard' tab. */
|
---|
131 | void prepareTabMotherboard();
|
---|
132 | /** Prepares 'Processor' tab. */
|
---|
133 | void prepareTabProcessor();
|
---|
134 | /** Prepares 'Acceleration' tab. */
|
---|
135 | void prepareTabAcceleration();
|
---|
136 | /** Prepares connections. */
|
---|
137 | void prepareConnections();
|
---|
138 | /** Updates option set. */
|
---|
139 | void updateOptionSet();
|
---|
140 | /** Cleanups all. */
|
---|
141 | void cleanup();
|
---|
142 |
|
---|
143 | /** Saves existing data from cache. */
|
---|
144 | bool saveData();
|
---|
145 | /** Saves existing 'Motherboard' data from cache. */
|
---|
146 | bool saveMotherboardData();
|
---|
147 | /** Saves existing 'Processor' data from cache. */
|
---|
148 | bool saveProcessorData();
|
---|
149 | /** Saves existing 'Acceleration' data from cache. */
|
---|
150 | bool saveAccelerationData();
|
---|
151 |
|
---|
152 | /** Updates minimum layout hint. */
|
---|
153 | void updateMinimumLayoutHint();
|
---|
154 |
|
---|
155 | /** Holds whether the USB is enabled. */
|
---|
156 | bool m_fIsUSBEnabled;
|
---|
157 |
|
---|
158 | /** Holds the page data cache instance. */
|
---|
159 | UISettingsCacheMachineSystem *m_pCache;
|
---|
160 |
|
---|
161 | /** @name Widgets
|
---|
162 | * @{ */
|
---|
163 | /** Holds the tab-widget instance. */
|
---|
164 | QITabWidget *m_pTabWidget;
|
---|
165 |
|
---|
166 | /** Holds the 'Motherboard' tab instance. */
|
---|
167 | UIEditor *m_pTabMotherboard;
|
---|
168 | /** Holds the base memory editor instance. */
|
---|
169 | UIBaseMemoryEditor *m_pEditorBaseMemory;
|
---|
170 | /** Holds the boot order editor instance. */
|
---|
171 | UIBootOrderEditor *m_pEditorBootOrder;
|
---|
172 | /** Holds the chipset editor instance. */
|
---|
173 | UIChipsetEditor *m_pEditorChipset;
|
---|
174 | /** Holds the TPM editor instance. */
|
---|
175 | UITpmEditor *m_pEditorTpm;
|
---|
176 | /** Holds the pointing HID editor instance. */
|
---|
177 | UIPointingHIDEditor *m_pEditorPointingHID;
|
---|
178 | /** Holds the motherboard features editor instance. */
|
---|
179 | UIMotherboardFeaturesEditor *m_pEditorMotherboardFeatures;
|
---|
180 |
|
---|
181 | /** Holds the 'Processor' tab instance. */
|
---|
182 | UIEditor *m_pTabProcessor;
|
---|
183 | /** Holds the VCPU editor instance. */
|
---|
184 | UIVirtualCPUEditor *m_pEditorVCPU;
|
---|
185 | /** Holds the exec cap editor instance. */
|
---|
186 | UIExecutionCapEditor *m_pEditorExecCap;
|
---|
187 | /** Holds the motherboard features editor instance. */
|
---|
188 | UIProcessorFeaturesEditor *m_pEditorProcessorFeatures;
|
---|
189 |
|
---|
190 | /** Holds the 'Acceleration' tab instance. */
|
---|
191 | UIEditor *m_pTabAcceleration;
|
---|
192 | /** Holds the paravirtualization provider editor instance. */
|
---|
193 | UIParavirtProviderEditor *m_pEditorParavirtProvider;
|
---|
194 | /** Holds the acceleration features editor instance. */
|
---|
195 | UIAccelerationFeaturesEditor *m_pEditorAccelerationFeatures;
|
---|
196 | /** @} */
|
---|
197 | };
|
---|
198 |
|
---|
199 | #endif /* !FEQT_INCLUDED_SRC_settings_machine_UIMachineSettingsSystem_h */
|
---|