VirtualBox

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

Last change on this file was 108985, checked in by vboxsync, 7 days ago

FE/Qt: bugref:10814: VBox Manager / Tool-pane: Handle tool labels visibility change through extra-data; That affects both toolbars instead of the one where the change issued.

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