VirtualBox

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

Last change on this file was 106001, checked in by vboxsync, 4 weeks ago

doc/manual/man_VBoxManage-*: Updated a variety of the VBoxManage help
files to improve readability, corrected some typos, and made various
other corrections.

src/VBox/*: Updated some comments and log messages for a variety of
source files to correct the spelling of 'suppress'. A few APIC files
and USB files use 'supress' in variable names or manifest constants but
those were not changed.

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

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