1 | /* $Id: UIExtraDataManager.h 102775 2024-01-05 15:27:12Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBox Qt GUI - UIExtraDataManager class declaration.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2010-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_extradata_UIExtraDataManager_h
|
---|
29 | #define FEQT_INCLUDED_SRC_extradata_UIExtraDataManager_h
|
---|
30 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
31 | # pragma once
|
---|
32 | #endif
|
---|
33 |
|
---|
34 | /* Qt includes: */
|
---|
35 | #include <QMap>
|
---|
36 | #include <QObject>
|
---|
37 | #include <QRect>
|
---|
38 | #include <QSize>
|
---|
39 | #include <QUuid>
|
---|
40 | #ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
|
---|
41 | # include <QPointer>
|
---|
42 | #endif
|
---|
43 |
|
---|
44 | /* GUI includes: */
|
---|
45 | #include "UIExtraDataDefs.h"
|
---|
46 |
|
---|
47 | /* Forward declarations: */
|
---|
48 | class UIExtraDataEventHandler;
|
---|
49 | #ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
|
---|
50 | class UIExtraDataManagerWindow;
|
---|
51 | #endif
|
---|
52 |
|
---|
53 | /** Defines the map of extra data values. The index is an extra-data key. */
|
---|
54 | typedef QMap<QString, QString> ExtraDataMap;
|
---|
55 | /** Defines the map of extra data maps. */
|
---|
56 | typedef QMap<QUuid, ExtraDataMap> MapOfExtraDataMaps;
|
---|
57 |
|
---|
58 | /** Singleton QObject extension
|
---|
59 | * providing GUI with corresponding extra-data values,
|
---|
60 | * and notifying it whenever any of those values changed. */
|
---|
61 | class SHARED_LIBRARY_STUFF UIExtraDataManager : public QObject
|
---|
62 | {
|
---|
63 | Q_OBJECT;
|
---|
64 |
|
---|
65 | /** Extra-data Manager constructor. */
|
---|
66 | UIExtraDataManager();
|
---|
67 | /** Extra-data Manager destructor. */
|
---|
68 | ~UIExtraDataManager();
|
---|
69 |
|
---|
70 | signals:
|
---|
71 |
|
---|
72 | /** Notifies about extra-data map acknowledging. */
|
---|
73 | void sigExtraDataMapAcknowledging(const QUuid &uID);
|
---|
74 |
|
---|
75 | /** Notifies about extra-data change. */
|
---|
76 | void sigExtraDataChange(const QUuid &uID, const QString &strKey, const QString &strValue);
|
---|
77 |
|
---|
78 | /** Notifies about notification-center alignment change. */
|
---|
79 | void sigNotificationCenterAlignmentChange();
|
---|
80 | /** Notifies about notification-center order change. */
|
---|
81 | void sigNotificationCenterOrderChange();
|
---|
82 |
|
---|
83 | /** Notifies about settings expert mode change. */
|
---|
84 | void sigSettingsExpertModeChange();
|
---|
85 |
|
---|
86 | /** Notifies about GUI language change. */
|
---|
87 | void sigLanguageChange(QString strLanguage);
|
---|
88 |
|
---|
89 | /** Notifies about Selector UI keyboard shortcut change. */
|
---|
90 | void sigSelectorUIShortcutChange();
|
---|
91 | /** Notifies about Runtime UI keyboard shortcut change. */
|
---|
92 | void sigRuntimeUIShortcutChange();
|
---|
93 | /** Notifies about Runtime UI host-key combination change. */
|
---|
94 | void sigRuntimeUIHostKeyCombinationChange();
|
---|
95 |
|
---|
96 | /** Notifies about Cloud Profile Manager restriction change. */
|
---|
97 | void sigCloudProfileManagerRestrictionChange();
|
---|
98 |
|
---|
99 | /** Notifies about Cloud Console Manager data change. */
|
---|
100 | void sigCloudConsoleManagerDataChange();
|
---|
101 | /** Notifies about Cloud Console Manager restriction change. */
|
---|
102 | void sigCloudConsoleManagerRestrictionChange();
|
---|
103 |
|
---|
104 | /** Notifies about VirtualBox Manager / Details pane categories change. */
|
---|
105 | void sigDetailsCategoriesChange();
|
---|
106 | /** Notifies about VirtualBox Manager / Details pane options change. */
|
---|
107 | void sigDetailsOptionsChange(DetailsElementType enmType);
|
---|
108 |
|
---|
109 | /** Notifies about visual state change. */
|
---|
110 | void sigVisualStateChange(const QUuid &uMachineID);
|
---|
111 |
|
---|
112 | /** Notifies about menu-bar configuration change. */
|
---|
113 | void sigMenuBarConfigurationChange(const QUuid &uMachineID);
|
---|
114 | /** Notifies about status-bar configuration change. */
|
---|
115 | void sigStatusBarConfigurationChange(const QUuid &uMachineID);
|
---|
116 |
|
---|
117 | /** Notifies about HID LEDs synchronization state change. */
|
---|
118 | void sigHidLedsSyncStateChange(bool fEnabled);
|
---|
119 |
|
---|
120 | /** Notifies about the scale-factor change. */
|
---|
121 | void sigScaleFactorChange(const QUuid &uMachineID);
|
---|
122 |
|
---|
123 | /** Notifies about the scaling optimization type change. */
|
---|
124 | void sigScalingOptimizationTypeChange(const QUuid &uMachineID);
|
---|
125 |
|
---|
126 | /** Notifies about font scale factor. */
|
---|
127 | void sigFontScaleFactorChanged(int iFontScaleFactor);
|
---|
128 |
|
---|
129 | #ifdef VBOX_WS_MAC
|
---|
130 | /** Notifies about the HiDPI optimization type change. */
|
---|
131 | void sigHiDPIOptimizationTypeChange(const QUuid &uMachineID);
|
---|
132 |
|
---|
133 | /** Mac OS X: Notifies about 'dock icon' appearance change. */
|
---|
134 | void sigDockIconAppearanceChange(bool fEnabled);
|
---|
135 | /** Mac OS X: Notifies about 'dock icon overlay' appearance change. */
|
---|
136 | void sigDockIconOverlayAppearanceChange(bool fEnabled);
|
---|
137 | #endif /* VBOX_WS_MAC */
|
---|
138 |
|
---|
139 | #if defined (VBOX_WS_NIX) || defined (VBOX_WS_WIN)
|
---|
140 | /* Is emitted when host screen saver inhibition state changes. */
|
---|
141 | void sigDisableHostScreenSaverStateChange(bool fDisable);
|
---|
142 | #endif
|
---|
143 |
|
---|
144 | public:
|
---|
145 |
|
---|
146 | /** Global extra-data ID. */
|
---|
147 | static const QUuid GlobalID;
|
---|
148 |
|
---|
149 | /** Static Extra-data Manager instance/constructor. */
|
---|
150 | static UIExtraDataManager* instance();
|
---|
151 | /** Static Extra-data Manager destructor. */
|
---|
152 | static void destroy();
|
---|
153 |
|
---|
154 | #ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
|
---|
155 | /** Static show and raise API. */
|
---|
156 | static void openWindow(QWidget *pCenterWidget);
|
---|
157 | #endif
|
---|
158 |
|
---|
159 | /** @name Base
|
---|
160 | * @{ */
|
---|
161 | /** Returns whether Extra-data Manager cached the map with passed @a uID. */
|
---|
162 | bool contains(const QUuid &uID) const { return m_data.contains(uID); }
|
---|
163 | /** Returns read-only extra-data map for passed @a uID. */
|
---|
164 | const ExtraDataMap map(const QUuid &uID) const { return m_data.value(uID); }
|
---|
165 |
|
---|
166 | /** Hot-load machine extra-data map. */
|
---|
167 | void hotloadMachineExtraDataMap(const QUuid &uID);
|
---|
168 |
|
---|
169 | /** Returns extra-data value corresponding to passed @a strKey as QString.
|
---|
170 | * If valid @a uID is set => applies to machine extra-data, otherwise => to global one. */
|
---|
171 | QString extraDataString(const QString &strKey, const QUuid &uID = GlobalID);
|
---|
172 | /** Defines extra-data value corresponding to passed @a strKey as strValue.
|
---|
173 | * If valid @a uID is set => applies to machine extra-data, otherwise => to global one. */
|
---|
174 | void setExtraDataString(const QString &strKey, const QString &strValue, const QUuid &uID = GlobalID);
|
---|
175 |
|
---|
176 | /** Returns extra-data value corresponding to passed @a strKey as QStringList.
|
---|
177 | * If valid @a uID is set => applies to machine extra-data, otherwise => to global one. */
|
---|
178 | QStringList extraDataStringList(const QString &strKey, const QUuid &uID = GlobalID);
|
---|
179 | /** Defines extra-data value corresponding to passed @a strKey as value.
|
---|
180 | * If valid @a uID is set => applies to machine extra-data, otherwise => to global one. */
|
---|
181 | void setExtraDataStringList(const QString &strKey, const QStringList &value, const QUuid &uID = GlobalID);
|
---|
182 | /** @} */
|
---|
183 |
|
---|
184 | /** @name General
|
---|
185 | * @{ */
|
---|
186 | /** Returns a list of restricted dialogs. */
|
---|
187 | UIExtraDataMetaDefs::DialogType restrictedDialogTypes(const QUuid &uID);
|
---|
188 | /** Defines a list of restricted dialogs. */
|
---|
189 | void setRestrictedDialogTypes(UIExtraDataMetaDefs::DialogType enmTypes, const QUuid &uID);
|
---|
190 |
|
---|
191 | /** Returns color theme type. */
|
---|
192 | UIColorThemeType colorTheme();
|
---|
193 | /** Defines color theme @a enmType. */
|
---|
194 | void setColorTheme(const UIColorThemeType &enmType);
|
---|
195 | /** @} */
|
---|
196 |
|
---|
197 | /** @name Messaging
|
---|
198 | * @{ */
|
---|
199 | /** Returns the list of supressed messages for the Message/Popup center frameworks. */
|
---|
200 | QStringList suppressedMessages(const QUuid &uID = GlobalID);
|
---|
201 | /** Defines the @a list of supressed messages for the Message/Popup center frameworks. */
|
---|
202 | void setSuppressedMessages(const QStringList &list);
|
---|
203 |
|
---|
204 | /** Returns the list of messages for the Message/Popup center frameworks with inverted check-box state. */
|
---|
205 | QStringList messagesWithInvertedOption();
|
---|
206 |
|
---|
207 | #ifdef VBOX_NOTIFICATION_CENTER_WITH_KEEP_BUTTON
|
---|
208 | /** Returns whether successfull notification-progresses should NOT close automatically. */
|
---|
209 | bool keepSuccessfullNotificationProgresses();
|
---|
210 | /** Defines whether successfull notification-progresses should NOT close (@a fKeep) automatically. */
|
---|
211 | void setKeepSuccessfullNotificationProgresses(bool fKeep);
|
---|
212 | #endif /* VBOX_NOTIFICATION_CENTER_WITH_KEEP_BUTTON */
|
---|
213 |
|
---|
214 | /** Returns notification-center alignment. */
|
---|
215 | Qt::Alignment notificationCenterAlignment();
|
---|
216 | /** Defines notification-progresses @a enmOrder. */
|
---|
217 | void setNotificationCenterAlignment(Qt::Alignment enmOrder);
|
---|
218 |
|
---|
219 | /** Returns notification-center order. */
|
---|
220 | Qt::SortOrder notificationCenterOrder();
|
---|
221 | /** Defines notification-progresses @a enmOrder. */
|
---|
222 | void setNotificationCenterOrder(Qt::SortOrder enmOrder);
|
---|
223 |
|
---|
224 | /** Returns whether BETA build label should be hidden. */
|
---|
225 | bool preventBetaBuildLavel();
|
---|
226 | #if !defined(VBOX_BLEEDING_EDGE) && !defined(DEBUG)
|
---|
227 | /** Returns version for which user wants to prevent BETA build warning. */
|
---|
228 | QString preventBetaBuildWarningForVersion();
|
---|
229 | #endif
|
---|
230 | /** @} */
|
---|
231 |
|
---|
232 | #ifdef VBOX_GUI_WITH_NETWORK_MANAGER
|
---|
233 | /** @name Application Update
|
---|
234 | * @{ */
|
---|
235 | /** Returns whether Application Update functionality enabled. */
|
---|
236 | bool applicationUpdateEnabled();
|
---|
237 |
|
---|
238 | /** Returns Application Update data. */
|
---|
239 | QString applicationUpdateData();
|
---|
240 | /** Defines Application Update data as @a strValue. */
|
---|
241 | void setApplicationUpdateData(const QString &strValue);
|
---|
242 |
|
---|
243 | /** Returns Application Update check counter. */
|
---|
244 | qulonglong applicationUpdateCheckCounter();
|
---|
245 | /** Increments Application Update check counter. */
|
---|
246 | void incrementApplicationUpdateCheckCounter();
|
---|
247 | /** @} */
|
---|
248 | #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
|
---|
249 |
|
---|
250 | /** @name Progress
|
---|
251 | * @{ */
|
---|
252 | /** Returns whether legacy progress handling method is requested. */
|
---|
253 | bool legacyProgressHandlingRequested();
|
---|
254 | /** @} */
|
---|
255 |
|
---|
256 | /** @name Settings
|
---|
257 | * @{ */
|
---|
258 | /** Returns whether GUI @a enmFeature is enabled. */
|
---|
259 | bool guiFeatureEnabled(GUIFeatureType enmFeature);
|
---|
260 |
|
---|
261 | /** Returns restricted global settings pages. */
|
---|
262 | QList<GlobalSettingsPageType> restrictedGlobalSettingsPages();
|
---|
263 | /** Returns restricted machine settings pages. */
|
---|
264 | QList<MachineSettingsPageType> restrictedMachineSettingsPages(const QUuid &uID);
|
---|
265 |
|
---|
266 | /** Returns whether settings are in expert mode. */
|
---|
267 | bool isSettingsInExpertMode();
|
---|
268 | /** Defines whether settings are in @a fExpertMode. */
|
---|
269 | void setSettingsInExpertMode(bool fExpertMode);
|
---|
270 | /** @} */
|
---|
271 |
|
---|
272 | /** @name Settings: Language
|
---|
273 | * @{ */
|
---|
274 | /** Returns the GUI language ID. */
|
---|
275 | QString languageId();
|
---|
276 | /** Defines the GUI @a strLanguageId. */
|
---|
277 | void setLanguageId(const QString &strLanguageId);
|
---|
278 | /** @} */
|
---|
279 |
|
---|
280 | /** @name Settings: Display
|
---|
281 | * @{ */
|
---|
282 | /** Returns maximum guest-screen resolution policy. */
|
---|
283 | MaximumGuestScreenSizePolicy maxGuestResolutionPolicy();
|
---|
284 | /** Defines maximum guest-screen resolution @a enmPolicy or @a resolution itself for Fixed policy. */
|
---|
285 | void setMaxGuestScreenResolution(MaximumGuestScreenSizePolicy enmPolicy, const QSize resolution = QSize());
|
---|
286 | /** Returns maximum guest-screen resolution for fixed policy. */
|
---|
287 | QSize maxGuestResolutionForPolicyFixed();
|
---|
288 | /** Defines maximum guest-screen @a resolution for fixed policy. */
|
---|
289 | void setMaxGuestResolutionForPolicyFixed(const QSize &resolution);
|
---|
290 |
|
---|
291 | /** Returns whether hovered machine-window should be activated. */
|
---|
292 | bool activateHoveredMachineWindow();
|
---|
293 | /** Defines whether hovered machine-window should be @a fActivated. */
|
---|
294 | void setActivateHoveredMachineWindow(bool fActivate);
|
---|
295 | /* Return whether host screen saver is disabled when a vm is running. */
|
---|
296 | bool disableHostScreenSaver();
|
---|
297 | /* Sets whether host screen saver is disabled when a vm is running. */
|
---|
298 | void setDisableHostScreenSaver(bool fActivate);
|
---|
299 | /* Set global font scale factor as percentage. 100% is for no scaling. */
|
---|
300 | void setFontScaleFactor(int iFontScaleFactor);
|
---|
301 | int fontScaleFactor();
|
---|
302 | /** @} */
|
---|
303 |
|
---|
304 | /** @name Settings: Keyboard
|
---|
305 | * @{ */
|
---|
306 | /** Returns the Runtime UI host-key combination. */
|
---|
307 | QString hostKeyCombination();
|
---|
308 | /** Defines the Runtime UI host-key combination. */
|
---|
309 | void setHostKeyCombination(const QString &strHostCombo);
|
---|
310 |
|
---|
311 | /** Returns shortcut overrides for shortcut-pool with @a strPoolExtraDataID. */
|
---|
312 | QStringList shortcutOverrides(const QString &strPoolExtraDataID);
|
---|
313 |
|
---|
314 | /** Returns whether the Runtime UI auto-capture is enabled. */
|
---|
315 | bool autoCaptureEnabled();
|
---|
316 | /** Defines whether the Runtime UI auto-capture is @a fEnabled. */
|
---|
317 | void setAutoCaptureEnabled(bool fEnabled);
|
---|
318 |
|
---|
319 | /** Returns the Runtime UI remapped scan codes. */
|
---|
320 | QString remappedScanCodes();
|
---|
321 | /** @} */
|
---|
322 |
|
---|
323 | /** @name Settings: Proxy
|
---|
324 | * @{ */
|
---|
325 | /** Returns VBox proxy settings. */
|
---|
326 | QString proxySettings();
|
---|
327 | /** Defines VBox proxy @a strSettings. */
|
---|
328 | void setProxySettings(const QString &strSettings);
|
---|
329 | /** @} */
|
---|
330 |
|
---|
331 | /** @name Settings: Storage
|
---|
332 | * @{ */
|
---|
333 | /** Returns recent folder for hard-drives. */
|
---|
334 | QString recentFolderForHardDrives();
|
---|
335 | /** Returns recent folder for optical-disks. */
|
---|
336 | QString recentFolderForOpticalDisks();
|
---|
337 | /** Returns recent folder for floppy-disks. */
|
---|
338 | QString recentFolderForFloppyDisks();
|
---|
339 | /** Defines recent folder for hard-drives as @a strValue. */
|
---|
340 | void setRecentFolderForHardDrives(const QString &strValue);
|
---|
341 | /** Defines recent folder for optical-disk as @a strValue. */
|
---|
342 | void setRecentFolderForOpticalDisks(const QString &strValue);
|
---|
343 | /** Defines recent folder for floppy-disk as @a strValue. */
|
---|
344 | void setRecentFolderForFloppyDisks(const QString &strValue);
|
---|
345 |
|
---|
346 | /** Returns the list of recently used hard-drives. */
|
---|
347 | QStringList recentListOfHardDrives();
|
---|
348 | /** Returns the list of recently used optical-disk. */
|
---|
349 | QStringList recentListOfOpticalDisks();
|
---|
350 | /** Returns the list of recently used floppy-disk. */
|
---|
351 | QStringList recentListOfFloppyDisks();
|
---|
352 | /** Defines the list of recently used hard-drives as @a value. */
|
---|
353 | void setRecentListOfHardDrives(const QStringList &value);
|
---|
354 | /** Defines the list of recently used optical-disks as @a value. */
|
---|
355 | void setRecentListOfOpticalDisks(const QStringList &value);
|
---|
356 | /** Defines the list of recently used floppy-disks as @a value. */
|
---|
357 | void setRecentListOfFloppyDisks(const QStringList &value);
|
---|
358 | /** @} */
|
---|
359 |
|
---|
360 | /** @name Settings: Network
|
---|
361 | * @{ */
|
---|
362 | /** Returns the list of restricted network attachment types. */
|
---|
363 | UIExtraDataMetaDefs::DetailsElementOptionTypeNetwork restrictedNetworkAttachmentTypes();
|
---|
364 | /** @} */
|
---|
365 |
|
---|
366 | /** @name VISO Creator
|
---|
367 | * @{ */
|
---|
368 | /** Returns recent folder for VISO creation content. */
|
---|
369 | QString visoCreatorRecentFolder();
|
---|
370 | /** Defines recent folder for VISO creation content as @a strValue. */
|
---|
371 | void setVISOCreatorRecentFolder(const QString &strValue);
|
---|
372 | /** Returns viso creator geometry using @a pWidget as the hint. */
|
---|
373 | QRect visoCreatorDialogGeometry(QWidget *pWidget, QWidget *pParentWidget, const QRect &defaultGeometry);
|
---|
374 | /** Set viso creator geometry. */
|
---|
375 | void setVisoCreatorDialogGeometry(const QRect &geometry, bool fMaximized);
|
---|
376 | /** Returns whether viso creator dialog should be maximized. */
|
---|
377 | bool visoCreatorDialogShouldBeMaximized();
|
---|
378 | /** @} */
|
---|
379 |
|
---|
380 | /** @name VirtualBox Manager
|
---|
381 | * @{ */
|
---|
382 | /** Returns selector-window geometry using @a pWidget as the hint. */
|
---|
383 | QRect selectorWindowGeometry(QWidget *pWidget);
|
---|
384 | /** Returns whether selector-window should be maximized. */
|
---|
385 | bool selectorWindowShouldBeMaximized();
|
---|
386 | /** Defines selector-window @a geometry and @a fMaximized state. */
|
---|
387 | void setSelectorWindowGeometry(const QRect &geometry, bool fMaximized);
|
---|
388 |
|
---|
389 | /** Returns selector-window splitter hints. */
|
---|
390 | QList<int> selectorWindowSplitterHints();
|
---|
391 | /** Defines selector-window splitter @a hints. */
|
---|
392 | void setSelectorWindowSplitterHints(const QList<int> &hints);
|
---|
393 |
|
---|
394 | /** Returns whether selector-window tool-bar visible. */
|
---|
395 | bool selectorWindowToolBarVisible();
|
---|
396 | /** Defines whether selector-window tool-bar @a fVisible. */
|
---|
397 | void setSelectorWindowToolBarVisible(bool fVisible);
|
---|
398 |
|
---|
399 | /** Returns whether selector-window tool-bar text visible. */
|
---|
400 | bool selectorWindowToolBarTextVisible();
|
---|
401 | /** Defines whether selector-window tool-bar text @a fVisible. */
|
---|
402 | void setSelectorWindowToolBarTextVisible(bool fVisible);
|
---|
403 |
|
---|
404 | /** Returns last selected tool set of VirtualBox Manager. */
|
---|
405 | QList<UIToolType> toolsPaneLastItemsChosen();
|
---|
406 | /** Defines last selected tool @a set of VirtualBox Manager. */
|
---|
407 | void setToolsPaneLastItemsChosen(const QList<UIToolType> &set);
|
---|
408 | /** Returns the list of detached tools of VirtualBox Manager. */
|
---|
409 | QList<UIToolType> detachedTools();
|
---|
410 | /** Defines the list of detached @a tools of VirtualBox Manager. */
|
---|
411 | void setDetachedTools(const QList<UIToolType> &tools);
|
---|
412 |
|
---|
413 | /** Returns whether selector-window status-bar visible. */
|
---|
414 | bool selectorWindowStatusBarVisible();
|
---|
415 | /** Defines whether selector-window status-bar @a fVisible. */
|
---|
416 | void setSelectorWindowStatusBarVisible(bool fVisible);
|
---|
417 |
|
---|
418 | /** Returns all the existing selector-window chooser-pane' group definition keys. */
|
---|
419 | QStringList knownMachineGroupDefinitionKeys();
|
---|
420 | /** Returns selector-window chooser-pane' group definitions for passed @a strGroupID. */
|
---|
421 | QStringList machineGroupDefinitions(const QString &strGroupID);
|
---|
422 | /** Defines selector-window chooser-pane' group @a definitions for passed @a strGroupID. */
|
---|
423 | void setMachineGroupDefinitions(const QString &strGroupID, const QStringList &definitions);
|
---|
424 |
|
---|
425 | /** Returns last-item ID of the item chosen in selector-window chooser-pane. */
|
---|
426 | QString selectorWindowLastItemChosen();
|
---|
427 | /** Defines @a lastItemID of the item chosen in selector-window chooser-pane. */
|
---|
428 | void setSelectorWindowLastItemChosen(const QString &strItemID);
|
---|
429 |
|
---|
430 | /** Returns selector-window details-pane' elements. */
|
---|
431 | QMap<DetailsElementType, bool> selectorWindowDetailsElements();
|
---|
432 | /** Defines selector-window details-pane' @a elements. */
|
---|
433 | void setSelectorWindowDetailsElements(const QMap<DetailsElementType, bool> &elements);
|
---|
434 |
|
---|
435 | /** Returns selector-window details-pane' preview update interval. */
|
---|
436 | PreviewUpdateIntervalType selectorWindowPreviewUpdateInterval();
|
---|
437 | /** Defines selector-window details-pane' preview update @a interval. */
|
---|
438 | void setSelectorWindowPreviewUpdateInterval(PreviewUpdateIntervalType interval);
|
---|
439 |
|
---|
440 | /** Returns VirtualBox Manager / Details pane options for certain @a enmElementType. */
|
---|
441 | QStringList vboxManagerDetailsPaneElementOptions(DetailsElementType enmElementType);
|
---|
442 | /** Defines VirtualBox Manager / Details pane @a options for certain @a enmElementType. */
|
---|
443 | void setVBoxManagerDetailsPaneElementOptions(DetailsElementType enmElementType, const QStringList &options);
|
---|
444 | /** @} */
|
---|
445 |
|
---|
446 | /** @name Snapshot Manager
|
---|
447 | * @{ */
|
---|
448 | /** Returns whether Snapshot Manager details expanded. */
|
---|
449 | bool snapshotManagerDetailsExpanded();
|
---|
450 | /** Defines whether Snapshot Manager details @a fExpanded. */
|
---|
451 | void setSnapshotManagerDetailsExpanded(bool fExpanded);
|
---|
452 | /** @} */
|
---|
453 |
|
---|
454 | /** @name Virtual Media Manager
|
---|
455 | * @{ */
|
---|
456 | /** Returns whether Virtual Media Manager details expanded. */
|
---|
457 | bool virtualMediaManagerDetailsExpanded();
|
---|
458 | /** Defines whether Virtual Media Manager details @a fExpanded. */
|
---|
459 | void setVirtualMediaManagerDetailsExpanded(bool fExpanded);
|
---|
460 | /** Returns whether Virtual Media Manager search widget expanded. */
|
---|
461 | bool virtualMediaManagerSearchWidgetExpanded();
|
---|
462 | /** Defines whether Virtual Media Manager search widget @a fExpanded. */
|
---|
463 | void setVirtualMediaManagerSearchWidgetExpanded(bool fExpanded);
|
---|
464 | /** @} */
|
---|
465 |
|
---|
466 | /** @name Host Network Manager
|
---|
467 | * @{ */
|
---|
468 | /** Returns whether Host Network Manager details expanded. */
|
---|
469 | bool hostNetworkManagerDetailsExpanded();
|
---|
470 | /** Defines whether Host Network Manager details @a fExpanded. */
|
---|
471 | void setHostNetworkManagerDetailsExpanded(bool fExpanded);
|
---|
472 | /** @} */
|
---|
473 |
|
---|
474 | /** @name Cloud Profile Manager
|
---|
475 | * @{ */
|
---|
476 | /** Returns Cloud Profile Manager restrictions. */
|
---|
477 | QStringList cloudProfileManagerRestrictions();
|
---|
478 | /** Defines Cloud Profile Manager @a restrictions. */
|
---|
479 | void setCloudProfileManagerRestrictions(const QStringList &restrictions);
|
---|
480 |
|
---|
481 | /** Returns whether Cloud Profile Manager details expanded. */
|
---|
482 | bool cloudProfileManagerDetailsExpanded();
|
---|
483 | /** Defines whether Cloud Profile Manager details @a fExpanded. */
|
---|
484 | void setCloudProfileManagerDetailsExpanded(bool fExpanded);
|
---|
485 | /** @} */
|
---|
486 |
|
---|
487 | /** @name Cloud Console Manager
|
---|
488 | * @{ */
|
---|
489 | /** Returns registered Cloud Console Manager applications. */
|
---|
490 | QStringList cloudConsoleManagerApplications();
|
---|
491 | /** Returns registered Cloud Console Manager profiles for application with @a strId. */
|
---|
492 | QStringList cloudConsoleManagerProfiles(const QString &strId);
|
---|
493 |
|
---|
494 | /** Returns definition for Cloud Console Manager application with @a strId. */
|
---|
495 | QString cloudConsoleManagerApplication(const QString &strId);
|
---|
496 | /** Defines @a strDefinition for Cloud Console Manager application with @a strId. */
|
---|
497 | void setCloudConsoleManagerApplication(const QString &strId, const QString &strDefinition);
|
---|
498 |
|
---|
499 | /** Returns definition for Cloud Console Manager profile with @a strProfileId for application with @a strApplicationId. */
|
---|
500 | QString cloudConsoleManagerProfile(const QString &strApplicationId, const QString &strProfileId);
|
---|
501 | /** Returns @a strDefinition for Cloud Console Manager profile with @a strProfileId for application with @a strApplicationId. */
|
---|
502 | void setCloudConsoleManagerProfile(const QString &strApplicationId, const QString &strProfileId, const QString &strDefinition);
|
---|
503 |
|
---|
504 | /** Returns Cloud Console Manager restrictions. */
|
---|
505 | QStringList cloudConsoleManagerRestrictions();
|
---|
506 | /** Defines Cloud Console Manager @a restrictions. */
|
---|
507 | void setCloudConsoleManagerRestrictions(const QStringList &restrictions);
|
---|
508 |
|
---|
509 | /** Returns whether Cloud Console Manager details expanded. */
|
---|
510 | bool cloudConsoleManagerDetailsExpanded();
|
---|
511 | /** Defines whether Cloud Console Manager details @a fExpanded. */
|
---|
512 | void setCloudConsoleManagerDetailsExpanded(bool fExpanded);
|
---|
513 | /** @} */
|
---|
514 |
|
---|
515 | /** @name Cloud Console
|
---|
516 | * @{ */
|
---|
517 | /** Returns Cloud Console public key path. */
|
---|
518 | QString cloudConsolePublicKeyPath();
|
---|
519 | /** Defines Cloud Console public key @a strPath. */
|
---|
520 | void setCloudConsolePublicKeyPath(const QString &strPath);
|
---|
521 | /** @} */
|
---|
522 |
|
---|
523 | /** @name Wizards
|
---|
524 | * @{ */
|
---|
525 | /** Returns mode for wizard of passed @a type. */
|
---|
526 | WizardMode modeForWizardType(WizardType type);
|
---|
527 | /** Defines @a mode for wizard of passed @a type. */
|
---|
528 | void setModeForWizardType(WizardType type, WizardMode mode);
|
---|
529 | /** @} */
|
---|
530 |
|
---|
531 | /** @name Virtual Machine
|
---|
532 | * @{ */
|
---|
533 | /** Returns whether machine should be shown in VirtualBox Manager Chooser-pane. */
|
---|
534 | bool showMachineInVirtualBoxManagerChooser(const QUuid &uID);
|
---|
535 | /** Returns whether machine should be shown in VirtualBox Manager Details-pane. */
|
---|
536 | bool showMachineInVirtualBoxManagerDetails(const QUuid &uID);
|
---|
537 |
|
---|
538 | /** Returns whether machine reconfiguration enabled. */
|
---|
539 | bool machineReconfigurationEnabled(const QUuid &uID);
|
---|
540 | /** Returns whether machine snapshot operations enabled. */
|
---|
541 | bool machineSnapshotOperationsEnabled(const QUuid &uID);
|
---|
542 |
|
---|
543 | /** Except Mac OS X: Returns redefined machine-window icon names. */
|
---|
544 | QStringList machineWindowIconNames(const QUuid &uID);
|
---|
545 | #ifndef VBOX_WS_MAC
|
---|
546 | /** Except Mac OS X: Returns redefined machine-window name postfix. */
|
---|
547 | QString machineWindowNamePostfix(const QUuid &uID);
|
---|
548 | #endif
|
---|
549 |
|
---|
550 | /** Returns geometry for machine-window with @a uScreenIndex in @a visualStateType. */
|
---|
551 | QRect machineWindowGeometry(UIVisualStateType visualStateType, ulong uScreenIndex, const QUuid &uID);
|
---|
552 | /** Returns whether machine-window with @a uScreenIndex in @a visualStateType should be maximized. */
|
---|
553 | bool machineWindowShouldBeMaximized(UIVisualStateType visualStateType, ulong uScreenIndex, const QUuid &uID);
|
---|
554 | /** Defines @a geometry and @a fMaximized state for machine-window with @a uScreenIndex in @a visualStateType. */
|
---|
555 | void setMachineWindowGeometry(UIVisualStateType visualStateType, ulong uScreenIndex, const QRect &geometry, bool fMaximized, const QUuid &uID);
|
---|
556 |
|
---|
557 | #ifndef VBOX_WS_MAC
|
---|
558 | /** Returns whether Runtime UI menu-bar is enabled. */
|
---|
559 | bool menuBarEnabled(const QUuid &uID);
|
---|
560 | /** Defines whether Runtime UI menu-bar is @a fEnabled. */
|
---|
561 | void setMenuBarEnabled(bool fEnabled, const QUuid &uID);
|
---|
562 | #endif /* !VBOX_WS_MAC */
|
---|
563 |
|
---|
564 | /** Returns whether Runtime UI menu-bar context-menu is enabled. */
|
---|
565 | bool menuBarContextMenuEnabled(const QUuid &uID);
|
---|
566 | /** Defines whether Runtime UI menu-bar context-menu is @a fEnabled. */
|
---|
567 | void setMenuBarContextMenuEnabled(bool fEnabled, const QUuid &uID);
|
---|
568 |
|
---|
569 | /** Returns restricted Runtime UI menu types. */
|
---|
570 | UIExtraDataMetaDefs::MenuType restrictedRuntimeMenuTypes(const QUuid &uID);
|
---|
571 | /** Defines restricted Runtime UI menu types. */
|
---|
572 | void setRestrictedRuntimeMenuTypes(UIExtraDataMetaDefs::MenuType types, const QUuid &uID);
|
---|
573 |
|
---|
574 | /** Returns restricted Runtime UI action types for Application menu. */
|
---|
575 | UIExtraDataMetaDefs::MenuApplicationActionType restrictedRuntimeMenuApplicationActionTypes(const QUuid &uID);
|
---|
576 | /** Defines restricted Runtime UI action types for Application menu. */
|
---|
577 | void setRestrictedRuntimeMenuApplicationActionTypes(UIExtraDataMetaDefs::MenuApplicationActionType types, const QUuid &uID);
|
---|
578 |
|
---|
579 | /** Returns restricted Runtime UI action types for Machine menu. */
|
---|
580 | UIExtraDataMetaDefs::RuntimeMenuMachineActionType restrictedRuntimeMenuMachineActionTypes(const QUuid &uID);
|
---|
581 | /** Defines restricted Runtime UI action types for Machine menu. */
|
---|
582 | void setRestrictedRuntimeMenuMachineActionTypes(UIExtraDataMetaDefs::RuntimeMenuMachineActionType types, const QUuid &uID);
|
---|
583 |
|
---|
584 | /** Returns restricted Runtime UI action types for View menu. */
|
---|
585 | UIExtraDataMetaDefs::RuntimeMenuViewActionType restrictedRuntimeMenuViewActionTypes(const QUuid &uID);
|
---|
586 | /** Defines restricted Runtime UI action types for View menu. */
|
---|
587 | void setRestrictedRuntimeMenuViewActionTypes(UIExtraDataMetaDefs::RuntimeMenuViewActionType types, const QUuid &uID);
|
---|
588 |
|
---|
589 | /** Returns restricted Runtime UI action types for Input menu. */
|
---|
590 | UIExtraDataMetaDefs::RuntimeMenuInputActionType restrictedRuntimeMenuInputActionTypes(const QUuid &uID);
|
---|
591 | /** Defines restricted Runtime UI action types for Input menu. */
|
---|
592 | void setRestrictedRuntimeMenuInputActionTypes(UIExtraDataMetaDefs::RuntimeMenuInputActionType types, const QUuid &uID);
|
---|
593 |
|
---|
594 | /** Returns restricted Runtime UI action types for Devices menu. */
|
---|
595 | UIExtraDataMetaDefs::RuntimeMenuDevicesActionType restrictedRuntimeMenuDevicesActionTypes(const QUuid &uID);
|
---|
596 | /** Defines restricted Runtime UI action types for Devices menu. */
|
---|
597 | void setRestrictedRuntimeMenuDevicesActionTypes(UIExtraDataMetaDefs::RuntimeMenuDevicesActionType types, const QUuid &uID);
|
---|
598 |
|
---|
599 | #ifdef VBOX_WITH_DEBUGGER_GUI
|
---|
600 | /** Returns restricted Runtime UI action types for Debugger menu. */
|
---|
601 | UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType restrictedRuntimeMenuDebuggerActionTypes(const QUuid &uID);
|
---|
602 | /** Defines restricted Runtime UI action types for Debugger menu. */
|
---|
603 | void setRestrictedRuntimeMenuDebuggerActionTypes(UIExtraDataMetaDefs::RuntimeMenuDebuggerActionType types, const QUuid &uID);
|
---|
604 | #endif /* VBOX_WITH_DEBUGGER_GUI */
|
---|
605 |
|
---|
606 | #ifdef VBOX_WS_MAC
|
---|
607 | /** Mac OS X: Returns restricted Runtime UI action types for Window menu. */
|
---|
608 | UIExtraDataMetaDefs::MenuWindowActionType restrictedRuntimeMenuWindowActionTypes(const QUuid &uID);
|
---|
609 | /** Mac OS X: Defines restricted Runtime UI action types for Window menu. */
|
---|
610 | void setRestrictedRuntimeMenuWindowActionTypes(UIExtraDataMetaDefs::MenuWindowActionType types, const QUuid &uID);
|
---|
611 | #endif /* VBOX_WS_MAC */
|
---|
612 |
|
---|
613 | /** Returns restricted Runtime UI action types for Help menu. */
|
---|
614 | UIExtraDataMetaDefs::MenuHelpActionType restrictedRuntimeMenuHelpActionTypes(const QUuid &uID);
|
---|
615 | /** Defines restricted Runtime UI action types for Help menu. */
|
---|
616 | void setRestrictedRuntimeMenuHelpActionTypes(UIExtraDataMetaDefs::MenuHelpActionType types, const QUuid &uID);
|
---|
617 |
|
---|
618 | /** Returns restricted Runtime UI visual-states. */
|
---|
619 | UIVisualStateType restrictedVisualStates(const QUuid &uID);
|
---|
620 |
|
---|
621 | /** Returns requested Runtime UI visual-state. */
|
---|
622 | UIVisualStateType requestedVisualState(const QUuid &uID);
|
---|
623 | /** Defines requested Runtime UI visual-state as @a visualState. */
|
---|
624 | void setRequestedVisualState(UIVisualStateType visualState, const QUuid &uID);
|
---|
625 |
|
---|
626 | #ifdef VBOX_WS_NIX
|
---|
627 | /** Returns whether legacy full-screen mode is requested. */
|
---|
628 | bool legacyFullscreenModeRequested();
|
---|
629 |
|
---|
630 | /** Returns whether internal machine-window name should be unique. */
|
---|
631 | bool distinguishMachineWindowGroups(const QUuid &uID);
|
---|
632 | /** Defines whether internal machine-window name should be unique. */
|
---|
633 | void setDistinguishMachineWindowGroups(const QUuid &uID, bool fEnabled);
|
---|
634 | #endif /* VBOX_WS_NIX */
|
---|
635 |
|
---|
636 | /** Returns whether guest-screen auto-resize according machine-window size is enabled. */
|
---|
637 | bool guestScreenAutoResizeEnabled(const QUuid &uID);
|
---|
638 | /** Defines whether guest-screen auto-resize according machine-window size is @a fEnabled. */
|
---|
639 | void setGuestScreenAutoResizeEnabled(bool fEnabled, const QUuid &uID);
|
---|
640 |
|
---|
641 | /** Returns last guest-screen visibility status for screen with @a uScreenIndex. */
|
---|
642 | bool lastGuestScreenVisibilityStatus(ulong uScreenIndex, const QUuid &uID);
|
---|
643 | /** Defines whether last guest-screen visibility status was @a fEnabled for screen with @a uScreenIndex. */
|
---|
644 | void setLastGuestScreenVisibilityStatus(ulong uScreenIndex, bool fEnabled, const QUuid &uID);
|
---|
645 |
|
---|
646 | /** Returns last guest-screen size-hint for screen with @a uScreenIndex. */
|
---|
647 | QSize lastGuestScreenSizeHint(ulong uScreenIndex, const QUuid &uID);
|
---|
648 | /** Defines last guest-screen @a sizeHint for screen with @a uScreenIndex. */
|
---|
649 | void setLastGuestScreenSizeHint(ulong uScreenIndex, const QSize &sizeHint, const QUuid &uID);
|
---|
650 |
|
---|
651 | /** Returns host-screen index corresponding to passed guest-screen @a iGuestScreenIndex. */
|
---|
652 | int hostScreenForPassedGuestScreen(int iGuestScreenIndex, const QUuid &uID);
|
---|
653 | /** Defines @a iHostScreenIndex corresponding to passed guest-screen @a iGuestScreenIndex. */
|
---|
654 | void setHostScreenForPassedGuestScreen(int iGuestScreenIndex, int iHostScreenIndex, const QUuid &uID);
|
---|
655 |
|
---|
656 | /** Returns whether automatic mounting/unmounting of guest-screens enabled. */
|
---|
657 | bool autoMountGuestScreensEnabled(const QUuid &uID);
|
---|
658 |
|
---|
659 | #ifndef VBOX_WS_MAC
|
---|
660 | /** Returns whether mini-toolbar is enabled for full and seamless screens. */
|
---|
661 | bool miniToolbarEnabled(const QUuid &uID);
|
---|
662 | /** Defines whether mini-toolbar is @a fEnabled for full and seamless screens. */
|
---|
663 | void setMiniToolbarEnabled(bool fEnabled, const QUuid &uID);
|
---|
664 |
|
---|
665 | /** Returns whether mini-toolbar should auto-hide itself. */
|
---|
666 | bool autoHideMiniToolbar(const QUuid &uID);
|
---|
667 | /** Defines whether mini-toolbar should @a fAutoHide itself. */
|
---|
668 | void setAutoHideMiniToolbar(bool fAutoHide, const QUuid &uID);
|
---|
669 |
|
---|
670 | /** Returns mini-toolbar alignment. */
|
---|
671 | Qt::AlignmentFlag miniToolbarAlignment(const QUuid &uID);
|
---|
672 | /** Returns mini-toolbar @a alignment. */
|
---|
673 | void setMiniToolbarAlignment(Qt::AlignmentFlag alignment, const QUuid &uID);
|
---|
674 | #endif /* VBOX_WS_MAC */
|
---|
675 |
|
---|
676 | /** Returns whether Runtime UI status-bar is enabled. */
|
---|
677 | bool statusBarEnabled(const QUuid &uID);
|
---|
678 | /** Defines whether Runtime UI status-bar is @a fEnabled. */
|
---|
679 | void setStatusBarEnabled(bool fEnabled, const QUuid &uID);
|
---|
680 |
|
---|
681 | /** Returns whether Runtime UI status-bar context-menu is enabled. */
|
---|
682 | bool statusBarContextMenuEnabled(const QUuid &uID);
|
---|
683 | /** Defines whether Runtime UI status-bar context-menu is @a fEnabled. */
|
---|
684 | void setStatusBarContextMenuEnabled(bool fEnabled, const QUuid &uID);
|
---|
685 |
|
---|
686 | /** Returns restricted Runtime UI status-bar indicator list. */
|
---|
687 | QList<IndicatorType> restrictedStatusBarIndicators(const QUuid &uID);
|
---|
688 | /** Defines restricted Runtime UI status-bar indicator @a list. */
|
---|
689 | void setRestrictedStatusBarIndicators(const QList<IndicatorType> &list, const QUuid &uID);
|
---|
690 |
|
---|
691 | /** Returns Runtime UI status-bar indicator order list. */
|
---|
692 | QList<IndicatorType> statusBarIndicatorOrder(const QUuid &uID);
|
---|
693 | /** Defines Runtime UI status-bar indicator order @a list. */
|
---|
694 | void setStatusBarIndicatorOrder(const QList<IndicatorType> &list, const QUuid &uID);
|
---|
695 |
|
---|
696 | #ifdef VBOX_WS_MAC
|
---|
697 | /** Mac OS X: Returns whether Dock icon should be updated at runtime. */
|
---|
698 | bool realtimeDockIconUpdateEnabled(const QUuid &uID);
|
---|
699 | /** Mac OS X: Defines whether Dock icon update should be fEnabled at runtime. */
|
---|
700 | void setRealtimeDockIconUpdateEnabled(bool fEnabled, const QUuid &uID);
|
---|
701 |
|
---|
702 | /** Mac OS X: Returns guest-screen which Dock icon should reflect at runtime. */
|
---|
703 | int realtimeDockIconUpdateMonitor(const QUuid &uID);
|
---|
704 | /** Mac OS X: Defines guest-screen @a iIndex which Dock icon should reflect at runtime. */
|
---|
705 | void setRealtimeDockIconUpdateMonitor(int iIndex, const QUuid &uID);
|
---|
706 |
|
---|
707 | /** Mac OS X: Returns whether Dock icon overlay is disabled. */
|
---|
708 | bool dockIconDisableOverlay(const QUuid &uID);
|
---|
709 | /** Mac OS X: Defines whether Dock icon overlay is @a fDisabled. */
|
---|
710 | void setDockIconDisableOverlay(bool fDisabled, const QUuid &uID);
|
---|
711 | #endif /* VBOX_WS_MAC */
|
---|
712 |
|
---|
713 | /** Returns whether machine should pass CAD to guest. */
|
---|
714 | bool passCADtoGuest(const QUuid &uID);
|
---|
715 |
|
---|
716 | /** Returns the mouse-capture policy. */
|
---|
717 | MouseCapturePolicy mouseCapturePolicy(const QUuid &uID);
|
---|
718 |
|
---|
719 | /** Returns redefined guru-meditation handler type. */
|
---|
720 | GuruMeditationHandlerType guruMeditationHandlerType(const QUuid &uID);
|
---|
721 |
|
---|
722 | /** Returns whether machine should perform HID LEDs synchronization. */
|
---|
723 | bool hidLedsSyncState(const QUuid &uID);
|
---|
724 |
|
---|
725 | /** Returns the scale-factor. */
|
---|
726 | double scaleFactor(const QUuid &uID, const int uScreenIndex);
|
---|
727 | QList<double> scaleFactors(const QUuid &uID);
|
---|
728 | /** Saves the @a dScaleFactor for the monitor with @a uScreenIndex. If the existing scale factor
|
---|
729 | * list (from extra data) does not have scale factors for the screens with ids in [0, uScreenIndex)
|
---|
730 | * the this function appends a default scale factor for said screens.*/
|
---|
731 | void setScaleFactor(double dScaleFactor, const QUuid &uID, const int uScreenIndex);
|
---|
732 | /** Replaces the scale factor list of the machine with @a uID with @a scaleFactors. */
|
---|
733 | void setScaleFactors(const QList<double> &scaleFactors, const QUuid &uID);
|
---|
734 |
|
---|
735 | /** Returns the scaling optimization type. */
|
---|
736 | ScalingOptimizationType scalingOptimizationType(const QUuid &uID);
|
---|
737 | /** @} */
|
---|
738 |
|
---|
739 | /** @name Virtual Machine: Session Information dialog
|
---|
740 | * @{ */
|
---|
741 | /** Returns session information dialog geometry using @a pWidget and @a pParentWidget as hints. */
|
---|
742 | QRect sessionInformationDialogGeometry(QWidget *pWidget, QWidget *pParentWidget);
|
---|
743 | /** Returns whether information-window should be maximized or not. */
|
---|
744 | bool sessionInformationDialogShouldBeMaximized();
|
---|
745 | /** Defines information-window @a geometry and @a fMaximized state. */
|
---|
746 | void setSessionInformationDialogGeometry(const QRect &geometry, bool fMaximized);
|
---|
747 | /** @} */
|
---|
748 |
|
---|
749 | /** @name Guest Control related dialogs
|
---|
750 | * @{ */
|
---|
751 | void setGuestControlProcessControlSplitterHints(const QList<int> &hints);
|
---|
752 | QList<int> guestControlProcessControlSplitterHints();
|
---|
753 | QRect fileManagerDialogGeometry(QWidget *pWidget, QWidget *pParentWidget);
|
---|
754 | bool fileManagerDialogShouldBeMaximized();
|
---|
755 | void setFileManagerDialogGeometry(const QRect &geometry, bool fMaximized);
|
---|
756 | QRect guestProcessControlDialogGeometry(QWidget *pWidget, QWidget *pParentWidget, const QRect &defaultGeometry);
|
---|
757 | bool guestProcessControlDialogShouldBeMaximized();
|
---|
758 | void setGuestProcessControlDialogGeometry(const QRect &geometry, bool fMaximized);
|
---|
759 | void setFileManagerVisiblePanels(const QStringList &panelNameList);
|
---|
760 | QStringList fileManagerVisiblePanels();
|
---|
761 | /** @} */
|
---|
762 |
|
---|
763 | /** @name Soft Keyboard
|
---|
764 | * @{ */
|
---|
765 | QRect softKeyboardDialogGeometry(QWidget *pWidget, QWidget *pParentWidget, const QRect &defaultGeometry);
|
---|
766 | void setSoftKeyboardDialogGeometry(const QRect &geometry, bool fMaximized);
|
---|
767 | bool softKeyboardDialogShouldBeMaximized();
|
---|
768 | void setSoftKeyboardOptions(bool fShowNumPad, bool fHideOSMenuKeys, bool fMultimediaKeys);
|
---|
769 | void softKeyboardOptions(bool &fOutShowNumPad, bool &fOutHideOSMenuKeys, bool &fOutHideMultimediaKeys);
|
---|
770 | void setSoftKeyboardColorTheme(const QStringList &colorStringList);
|
---|
771 | QStringList softKeyboardColorTheme();
|
---|
772 | void setSoftKeyboardSelectedColorTheme(const QString &strColorThemeName);
|
---|
773 | QString softKeyboardSelectedColorTheme();
|
---|
774 | void setSoftKeyboardSelectedLayout(const QUuid &uLayoutUid);
|
---|
775 | QUuid softKeyboardSelectedLayout();
|
---|
776 | /** @} */
|
---|
777 |
|
---|
778 | /** @name File Manager options
|
---|
779 | * @{ */
|
---|
780 | void setFileManagerOptions(bool fListDirectoriesFirst,
|
---|
781 | bool fShowDeleteConfirmation,
|
---|
782 | bool fshowHumanReadableSizes,
|
---|
783 | bool fShowHiddenObjects);
|
---|
784 | bool fileManagerListDirectoriesFirst();
|
---|
785 | bool fileManagerShowDeleteConfirmation();
|
---|
786 | bool fileManagerShowHumanReadableSizes();
|
---|
787 | bool fileManagerShowHiddenObjects();
|
---|
788 | /** @} */
|
---|
789 |
|
---|
790 | /** @name Virtual Machine: Close dialog
|
---|
791 | * @{ */
|
---|
792 | /** Returns default machine close action. */
|
---|
793 | MachineCloseAction defaultMachineCloseAction(const QUuid &uID);
|
---|
794 | /** Returns restricted machine close actions. */
|
---|
795 | MachineCloseAction restrictedMachineCloseActions(const QUuid &uID);
|
---|
796 |
|
---|
797 | /** Returns last machine close action. */
|
---|
798 | MachineCloseAction lastMachineCloseAction(const QUuid &uID);
|
---|
799 | /** Defines last @a machineCloseAction. */
|
---|
800 | void setLastMachineCloseAction(MachineCloseAction machineCloseAction, const QUuid &uID);
|
---|
801 |
|
---|
802 | /** Returns machine close hook script name as simple string. */
|
---|
803 | QString machineCloseHookScript(const QUuid &uID);
|
---|
804 |
|
---|
805 | /** Returns whether machine should discard state on power off. */
|
---|
806 | bool discardStateOnPowerOff(const QUuid &uID);
|
---|
807 | /** @} */
|
---|
808 |
|
---|
809 | #ifdef VBOX_WITH_DEBUGGER_GUI
|
---|
810 | /** @name Virtual Machine: Debug UI
|
---|
811 | * @{ */
|
---|
812 | /** Returns debug flag value for passed @a strDebugFlagKey. */
|
---|
813 | QString debugFlagValue(const QString &strDebugFlagKey);
|
---|
814 | /** @} */
|
---|
815 | #endif /* VBOX_WITH_DEBUGGER_GUI */
|
---|
816 |
|
---|
817 | #ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
|
---|
818 | /** @name VirtualBox: Extra-data Manager window
|
---|
819 | * @{ */
|
---|
820 | /** Returns Extra-data Manager geometry using @a pWidget and @a pParentWidget as hint. */
|
---|
821 | QRect extraDataManagerGeometry(QWidget *pWidget, QWidget *pParentWidget);
|
---|
822 | /** Returns whether Extra-data Manager should be maximized or not. */
|
---|
823 | bool extraDataManagerShouldBeMaximized();
|
---|
824 | /** Defines Extra-data Manager @a geometry and @a fMaximized state. */
|
---|
825 | void setExtraDataManagerGeometry(const QRect &geometry, bool fMaximized);
|
---|
826 |
|
---|
827 | /** Returns Extra-data Manager splitter hints using @a pWidget as hint. */
|
---|
828 | QList<int> extraDataManagerSplitterHints(QWidget *pWidget);
|
---|
829 | /** Defines Extra-data Manager splitter @a hints. */
|
---|
830 | void setExtraDataManagerSplitterHints(const QList<int> &hints);
|
---|
831 | /** @} */
|
---|
832 | #endif /* VBOX_GUI_WITH_EXTRADATA_MANAGER_UI */
|
---|
833 |
|
---|
834 | /** @name Virtual Machine: Log Viewer dialog
|
---|
835 | * @{ */
|
---|
836 | /** Returns log-window geometry using @a pWidget, @a pParentWidget and @a defaultGeometry as hints. */
|
---|
837 | QRect logWindowGeometry(QWidget *pWidget, QWidget *pParentWidget, const QRect &defaultGeometry);
|
---|
838 | /** Returns whether log-window should be maximized or not. */
|
---|
839 | bool logWindowShouldBeMaximized();
|
---|
840 | /** Defines log-window @a geometry and @a fMaximized state. */
|
---|
841 | void setLogWindowGeometry(const QRect &geometry, bool fMaximized);
|
---|
842 | /** @} */
|
---|
843 |
|
---|
844 | /** @name Virtual Machine: Log Viewer widget options
|
---|
845 | * @{ */
|
---|
846 | void setLogViweverOptions(const QFont &font, bool wrapLines, bool showLineNumbers);
|
---|
847 | /** Returns log-viewer line wrapping flag. */
|
---|
848 | bool logViewerWrapLines();
|
---|
849 | /** Returns log-viewer show line numbers flag. */
|
---|
850 | bool logViewerShowLineNumbers();
|
---|
851 | /** Tries to find system font by searching by family and style strings within the font database. */
|
---|
852 | QFont logViewerFont();
|
---|
853 | void setLogViewerVisiblePanels(const QStringList &panelNameList);
|
---|
854 | QStringList logViewerVisiblePanels();
|
---|
855 | /** @} */
|
---|
856 |
|
---|
857 | /** @name Help Browser
|
---|
858 | * @{ */
|
---|
859 | void setHelpBrowserLastUrlList(const QStringList &urlList);
|
---|
860 | QStringList helpBrowserLastUrlList();
|
---|
861 | void setHelpBrowserZoomPercentage(int iZoomPercentage);
|
---|
862 | int helpBrowserZoomPercentage();
|
---|
863 | QRect helpBrowserDialogGeometry(QWidget *pWidget, QWidget *pParentWidget, const QRect &defaultGeometry);
|
---|
864 | void setHelpBrowserDialogGeometry(const QRect &geometry, bool fMaximized);
|
---|
865 | bool helpBrowserDialogShouldBeMaximized();
|
---|
866 | void setHelpBrowserBookmarks(const QStringList &bookmarks);
|
---|
867 | QStringList helpBrowserBookmarks();
|
---|
868 | /** @} */
|
---|
869 |
|
---|
870 | /** @name Manager UI: VM Activity Overview
|
---|
871 | * @{ */
|
---|
872 | void setVMActivityOverviewHiddenColumnList(const QStringList &hiddenColumnList);
|
---|
873 | QStringList VMActivityOverviewHiddenColumnList();
|
---|
874 | bool VMActivityOverviewShowAllMachines();
|
---|
875 | void setVMActivityOverviewShowAllMachines(bool fShow);
|
---|
876 | /** @} */
|
---|
877 |
|
---|
878 | /** @name Medium Selector
|
---|
879 | * @{ */
|
---|
880 | QRect mediumSelectorDialogGeometry(QWidget *pWidget, QWidget *pParentWidget, const QRect &defaultGeometry);
|
---|
881 | void setMediumSelectorDialogGeometry(const QRect &geometry, bool fMaximized);
|
---|
882 | bool mediumSelectorDialogShouldBeMaximized();
|
---|
883 | /** @} */
|
---|
884 |
|
---|
885 | private slots:
|
---|
886 |
|
---|
887 | /** Handles 'extra-data change' event: */
|
---|
888 | void sltExtraDataChange(const QUuid &uMachineID, const QString &strKey, const QString &strValue);
|
---|
889 |
|
---|
890 | private:
|
---|
891 |
|
---|
892 | /** Prepare Extra-data Manager. */
|
---|
893 | void prepare();
|
---|
894 | /** Prepare global extra-data map. */
|
---|
895 | void prepareGlobalExtraDataMap();
|
---|
896 | /** Prepare extra-data event-handler. */
|
---|
897 | void prepareExtraDataEventHandler();
|
---|
898 | #ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
|
---|
899 | // /** Prepare window. */
|
---|
900 | // void prepareWindow();
|
---|
901 |
|
---|
902 | /** Cleanup window. */
|
---|
903 | void cleanupWindow();
|
---|
904 | #endif /* VBOX_GUI_WITH_EXTRADATA_MANAGER_UI */
|
---|
905 | /** Cleanup extra-data event-handler. */
|
---|
906 | void cleanupExtraDataEventHandler();
|
---|
907 | // /** Cleanup extra-data map. */
|
---|
908 | // void cleanupExtraDataMap();
|
---|
909 | /** Cleanup Extra-data Manager. */
|
---|
910 | void cleanup();
|
---|
911 |
|
---|
912 | #ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
|
---|
913 | /** Open window. */
|
---|
914 | void open(QWidget *pCenterWidget);
|
---|
915 | #endif
|
---|
916 |
|
---|
917 | /** Retrieves an extra-data key from both machine and global sources.
|
---|
918 | *
|
---|
919 | * If @a uID isn't #GlobalID, this will first check the extra-data associated
|
---|
920 | * with the machine given by @a uID then fallback on the global extra-data.
|
---|
921 | *
|
---|
922 | * @returns String value if found, null string if not.
|
---|
923 | * @param strKey The extra-data key to get.
|
---|
924 | * @param uID Machine UUID or #GlobalID.
|
---|
925 | * @param strValue Where to return the value when found. */
|
---|
926 | QString extraDataStringUnion(const QString &strKey, const QUuid &uID);
|
---|
927 | /** Determines whether feature corresponding to passed @a strKey is allowed.
|
---|
928 | * If valid @a uID is set => applies to machine and global extra-data,
|
---|
929 | * otherwise => only to global one. */
|
---|
930 | bool isFeatureAllowed(const QString &strKey, const QUuid &uID = GlobalID);
|
---|
931 | /** Determines whether feature corresponding to passed @a strKey is restricted.
|
---|
932 | * If valid @a uID is set => applies to machine and global extra-data,
|
---|
933 | * otherwise => only to global one. */
|
---|
934 | bool isFeatureRestricted(const QString &strKey, const QUuid &uID = GlobalID);
|
---|
935 |
|
---|
936 | /** Translates bool flag into QString value. */
|
---|
937 | QString toFeatureState(bool fState);
|
---|
938 | /** Translates bool flag into 'allowed' value. */
|
---|
939 | QString toFeatureAllowed(bool fAllowed);
|
---|
940 | /** Translates bool flag into 'restricted' value. */
|
---|
941 | QString toFeatureRestricted(bool fRestricted);
|
---|
942 |
|
---|
943 | /** Defines saved dialog geometry according to specified attributes.
|
---|
944 | * @param strKey Brings geometry extra-data key of particular dialog.
|
---|
945 | * @param geometry Brings the dialog geometry to save.
|
---|
946 | * @param fMaximized Brings whether saved dialog geometry should be marked as maximized. */
|
---|
947 | void setDialogGeometry(const QString &strKey, const QRect &geometry, bool fMaximized);
|
---|
948 | /** Returns saved dialog geometry according to specified attributes.
|
---|
949 | * @param strKey Brings geometry extra-data key of particular dialog.
|
---|
950 | * @param pWidget Brings the widget to limit geometry bounds according to.
|
---|
951 | * @param pParentWidget Brings the widget to center geometry rectangle according to.
|
---|
952 | * @param defaultGeometry Brings the default geometry which should be used to
|
---|
953 | * calculate resulting geometry if saved was not found. */
|
---|
954 | QRect dialogGeometry(const QString &strKey, QWidget *pWidget, QWidget *pParentWidget = 0, const QRect &defaultGeometry = QRect());
|
---|
955 | /** Returns true if the dialog should be maximized.
|
---|
956 | * @param strKey Brings geometry extra-data key of particular dialog. */
|
---|
957 | bool dialogShouldBeMaximized(const QString &strKey);
|
---|
958 |
|
---|
959 | /** Returns string consisting of @a strBase appended with @a uScreenIndex for the *non-primary* screen-index.
|
---|
960 | * If @a fSameRuleForPrimary is 'true' same rule will be used for *primary* screen-index. Used for storing per-screen extra-data. */
|
---|
961 | static QString extraDataKeyPerScreen(const QString &strBase, ulong uScreenIndex, bool fSameRuleForPrimary = false);
|
---|
962 |
|
---|
963 | /** Holds the singleton instance. */
|
---|
964 | static UIExtraDataManager *s_pInstance;
|
---|
965 |
|
---|
966 | /** Holds extra-data event-handler instance. */
|
---|
967 | UIExtraDataEventHandler *m_pHandler;
|
---|
968 |
|
---|
969 | /** Holds extra-data map instance. */
|
---|
970 | MapOfExtraDataMaps m_data;
|
---|
971 |
|
---|
972 | #ifdef VBOX_GUI_WITH_EXTRADATA_MANAGER_UI
|
---|
973 | /** Holds Extra-data Manager window instance. */
|
---|
974 | QPointer<UIExtraDataManagerWindow> m_pWindow;
|
---|
975 | #endif
|
---|
976 | };
|
---|
977 |
|
---|
978 | /** Singleton Extra-data Manager 'official' name. */
|
---|
979 | #define gEDataManager UIExtraDataManager::instance()
|
---|
980 |
|
---|
981 | #endif /* !FEQT_INCLUDED_SRC_extradata_UIExtraDataManager_h */
|
---|