VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h

Last change on this file was 109082, checked in by vboxsync, 3 weeks ago

FE/Qt: bugref:10807: Reverting old dark mode support removal done in r166131; The reason is that Windows 10 still requires our old implementation; Qt6.8 dark mode doesn't support Windows 10.

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