VirtualBox

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

Last change on this file since 52190 was 52190, checked in by vboxsync, 11 years ago

FE/Qt: 7468: Extra-data flag to configure mouse-capture policy for Runtime UI.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 24.9 KB
Line 
1/** @file
2 * VBox Qt GUI - UIExtraDataManager class declaration.
3 */
4
5/*
6 * Copyright (C) 2010-2014 Oracle Corporation
7 *
8 * This file is part of VirtualBox Open Source Edition (OSE), as
9 * available from http://www.virtualbox.org. This file is free software;
10 * you can redistribute it and/or modify it under the terms of the GNU
11 * General Public License (GPL) as published by the Free Software
12 * Foundation, in version 2 as it comes in the "COPYING" file of the
13 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
14 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
15 */
16
17#ifndef ___UIExtraDataManager_h___
18#define ___UIExtraDataManager_h___
19
20/* Qt includes: */
21#include <QObject>
22#include <QMap>
23#ifdef DEBUG
24# include <QPointer>
25#endif /* DEBUG */
26
27/* GUI includes: */
28#include "UIExtraDataDefs.h"
29
30/* COM includes: */
31#include "CEventListener.h"
32
33/* Forward declarations: */
34class UIExtraDataEventHandler;
35#ifdef DEBUG
36class UIExtraDataManagerWindow;
37#endif /* DEBUG */
38
39/* Type definitions: */
40typedef QMap<QString, QString> ExtraDataMap;
41
42/** Singleton QObject extension
43 * providing GUI with corresponding extra-data values,
44 * and notifying it whenever any of those values changed. */
45class UIExtraDataManager : public QObject
46{
47 Q_OBJECT;
48
49 /** Extra-data Manager constructor. */
50 UIExtraDataManager();
51 /** Extra-data Manager destructor. */
52 ~UIExtraDataManager();
53
54signals:
55
56 /** Notifies about extra-data map acknowledging. */
57 void sigExtraDataMapAcknowledging(QString strID);
58
59 /** Notifies about extra-data change. */
60 void sigExtraDataChange(QString strID, QString strKey, QString strValue);
61
62 /** Notifies about GUI language change. */
63 void sigLanguageChange(QString strLanguage);
64
65 /** Notifies about Selector UI keyboard shortcut change. */
66 void sigSelectorUIShortcutChange();
67 /** Notifies about Runtime UI keyboard shortcut change. */
68 void sigRuntimeUIShortcutChange();
69
70 /** Notifies about status-bar configuration change. */
71 void sigStatusBarConfigurationChange();
72
73 /** Notifies about HID LEDs synchronization state change. */
74 void sigHidLedsSyncStateChange(bool fEnabled);
75
76#ifdef RT_OS_DARWIN
77 /** Mac OS X: Notifies about 'presentation mode' status change. */
78 void sigPresentationModeChange(bool fEnabled);
79 /** Mac OS X: Notifies about 'dock icon' appearance change. */
80 void sigDockIconAppearanceChange(bool fEnabled);
81#endif /* RT_OS_DARWIN */
82
83public:
84
85 /** Global extra-data ID. */
86 static const QString GlobalID;
87
88 /** Static Extra-data Manager instance/constructor. */
89 static UIExtraDataManager* instance();
90 /** Static Extra-data Manager destructor. */
91 static void destroy();
92
93#ifdef DEBUG
94 /** Static show and raise API. */
95 static void openWindow(QWidget *pCenterWidget);
96#endif /* DEBUG */
97
98 /** @name General
99 * @{ */
100 /** Returns whether Extra-data Manager cached the map with passed @a strID. */
101 bool contains(const QString &strID) const { return m_data.contains(strID); }
102 /** Returns read-only extra-data map for passed @a strID. */
103 const ExtraDataMap map(const QString &strID) const { return m_data.value(strID); }
104
105 /** Hot-load machine extra-data map. */
106 void hotloadMachineExtraDataMap(const QString &strID);
107
108 /** Returns extra-data value corresponding to passed @a strKey as QString.
109 * If valid @a strID is set => applies to machine extra-data, otherwise => to global one. */
110 QString extraDataString(const QString &strKey, const QString &strID = GlobalID);
111 /** Defines extra-data value corresponding to passed @a strKey as strValue.
112 * If valid @a strID is set => applies to machine extra-data, otherwise => to global one. */
113 void setExtraDataString(const QString &strKey, const QString &strValue, const QString &strID = GlobalID);
114
115 /** Returns extra-data value corresponding to passed @a strKey as QStringList.
116 * If valid @a strID is set => applies to machine extra-data, otherwise => to global one. */
117 QStringList extraDataStringList(const QString &strKey, const QString &strID = GlobalID);
118 /** Defines extra-data value corresponding to passed @a strKey as strValue.
119 * If valid @a strID is set => applies to machine extra-data, otherwise => to global one. */
120 void setExtraDataStringList(const QString &strKey, const QStringList &strValue, const QString &strID = GlobalID);
121 /** @} */
122
123 /** @name Messaging
124 * @{ */
125 /** Returns the list of supressed messages for the Message/Popup center frameworks. */
126 QStringList suppressedMessages();
127 /** Defines the @a list of supressed messages for the Message/Popup center frameworks. */
128 void setSuppressedMessages(const QStringList &list);
129
130 /** Returns the list of messages for the Message/Popup center frameworks with inverted check-box state. */
131 QStringList messagesWithInvertedOption();
132
133#if !defined(VBOX_BLEEDING_EDGE) && !defined(DEBUG)
134 /** Returns version for which user wants to prevent BETA build warning. */
135 QString preventBetaBuildWarningForVersion();
136#endif /* !defined(VBOX_BLEEDING_EDGE) && !defined(DEBUG) */
137 /** @} */
138
139#ifdef VBOX_GUI_WITH_NETWORK_MANAGER
140 /** @name Application Update
141 * @{ */
142 /** Returns whether Application Update functionality enabled. */
143 bool applicationUpdateEnabled();
144
145 /** Returns Application Update data. */
146 QString applicationUpdateData();
147 /** Defines Application Update data as @a strValue. */
148 void setApplicationUpdateData(const QString &strValue);
149
150 /** Returns Application Update check counter. */
151 qulonglong applicationUpdateCheckCounter();
152 /** Increments Application Update check counter. */
153 void incrementApplicationUpdateCheckCounter();
154 /** @} */
155#endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
156
157 /** @name Settings
158 * @{ */
159 /** Returns restricted global settings pages. */
160 QList<GlobalSettingsPageType> restrictedGlobalSettingsPages();
161 /** Returns restricted machine settings pages. */
162 QList<MachineSettingsPageType> restrictedMachineSettingsPages(const QString &strID);
163 /** @} */
164
165 /** @name Settings: Keyboard
166 * @{ */
167 /** Returns shortcut overrides for shortcut-pool with @a strPoolExtraDataID. */
168 QStringList shortcutOverrides(const QString &strPoolExtraDataID);
169 /** @} */
170
171 /** @name Settings: Storage
172 * @{ */
173 /** Returns recent folder for hard-drives. */
174 QString recentFolderForHardDrives();
175 /** Returns recent folder for optical-disks. */
176 QString recentFolderForOpticalDisks();
177 /** Returns recent folder for floppy-disks. */
178 QString recentFolderForFloppyDisks();
179 /** Defines recent folder for hard-drives as @a strValue. */
180 void setRecentFolderForHardDrives(const QString &strValue);
181 /** Defines recent folder for optical-disk as @a strValue. */
182 void setRecentFolderForOpticalDisks(const QString &strValue);
183 /** Defines recent folder for floppy-disk as @a strValue. */
184 void setRecentFolderForFloppyDisks(const QString &strValue);
185
186 /** Returns the list of recently used hard-drives. */
187 QStringList recentListOfHardDrives();
188 /** Returns the list of recently used optical-disk. */
189 QStringList recentListOfOpticalDisks();
190 /** Returns the list of recently used floppy-disk. */
191 QStringList recentListOfFloppyDisks();
192 /** Defines the list of recently used hard-drives as @a value. */
193 void setRecentListOfHardDrives(const QStringList &value);
194 /** Defines the list of recently used optical-disks as @a value. */
195 void setRecentListOfOpticalDisks(const QStringList &value);
196 /** Defines the list of recently used floppy-disks as @a value. */
197 void setRecentListOfFloppyDisks(const QStringList &value);
198 /** @} */
199
200 /** @name VirtualBox Manager
201 * @{ */
202 /** Returns selector-window geometry using @a pWidget as the hint. */
203 QRect selectorWindowGeometry(QWidget *pWidget);
204 /** Returns whether selector-window should be maximized. */
205 bool selectorWindowShouldBeMaximized();
206 /** Defines selector-window @a geometry and @a fMaximized state. */
207 void setSelectorWindowGeometry(const QRect &geometry, bool fMaximized);
208
209 /** Returns selector-window splitter hints. */
210 QList<int> selectorWindowSplitterHints();
211 /** Defines selector-window splitter @a hints. */
212 void setSelectorWindowSplitterHints(const QList<int> &hints);
213
214 /** Returns whether selector-window tool-bar visible. */
215 bool selectorWindowToolBarVisible();
216 /** Defines whether selector-window tool-bar @a fVisible. */
217 void setSelectorWindowToolBarVisible(bool fVisible);
218
219 /** Returns whether selector-window status-bar visible. */
220 bool selectorWindowStatusBarVisible();
221 /** Defines whether selector-window status-bar @a fVisible. */
222 void setSelectorWindowStatusBarVisible(bool fVisible);
223
224 /** Clears all the existing selector-window chooser-pane' group definitions. */
225 void clearSelectorWindowGroupsDefinitions();
226 /** Returns selector-window chooser-pane' groups definitions for passed @a strGroupID. */
227 QStringList selectorWindowGroupsDefinitions(const QString &strGroupID);
228 /** Defines selector-window chooser-pane' groups @a definitions for passed @a strGroupID. */
229 void setSelectorWindowGroupsDefinitions(const QString &strGroupID, const QStringList &definitions);
230
231 /** Returns last-item ID of the item chosen in selector-window chooser-pane. */
232 QString selectorWindowLastItemChosen();
233 /** Defines @a lastItemID of the item chosen in selector-window chooser-pane. */
234 void setSelectorWindowLastItemChosen(const QString &strItemID);
235
236 /** Returns selector-window details-pane' elements. */
237 QMap<DetailsElementType, bool> selectorWindowDetailsElements();
238 /** Defines selector-window details-pane' @a elements. */
239 void setSelectorWindowDetailsElements(const QMap<DetailsElementType, bool> &elements);
240
241 /** Returns selector-window details-pane' preview update interval. */
242 PreviewUpdateIntervalType selectorWindowPreviewUpdateInterval();
243 /** Defines selector-window details-pane' preview update @a interval. */
244 void setSelectorWindowPreviewUpdateInterval(PreviewUpdateIntervalType interval);
245 /** @} */
246
247 /** @name Wizards
248 * @{ */
249 /** Returns mode for wizard of passed @a type. */
250 WizardMode modeForWizardType(WizardType type);
251 /** Defines @a mode for wizard of passed @a type. */
252 void setModeForWizardType(WizardType type, WizardMode mode);
253 /** @} */
254
255 /** @name Virtual Machine
256 * @{ */
257 /** Returns whether machine should be shown in selector-window chooser-pane. */
258 bool showMachineInSelectorChooser(const QString &strID);
259 /** Returns whether machine should be shown in selector-window details-pane. */
260 bool showMachineInSelectorDetails(const QString &strID);
261
262 /** Returns whether machine reconfiguration enabled. */
263 bool machineReconfigurationEnabled(const QString &strID);
264 /** Returns whether machine snapshot operations enabled. */
265 bool machineSnapshotOperationsEnabled(const QString &strID);
266
267 /** Returns whether this machine is first time started. */
268 bool machineFirstTimeStarted(const QString &strID);
269 /** Returns whether this machine is fFirstTimeStarted. */
270 void setMachineFirstTimeStarted(bool fFirstTimeStarted, const QString &strID);
271
272#ifndef Q_WS_MAC
273 /** Except Mac OS X: Returns redefined machine-window icon names. */
274 QStringList machineWindowIconNames(const QString &strID);
275 /** Except Mac OS X: Returns redefined machine-window name postfix. */
276 QString machineWindowNamePostfix(const QString &strID);
277#endif /* !Q_WS_MAC */
278
279 /** Returns geometry for machine-window with @a uScreenIndex in @a visualStateType. */
280 QRect machineWindowGeometry(UIVisualStateType visualStateType, ulong uScreenIndex, const QString &strID);
281 /** Returns whether machine-window with @a uScreenIndex in @a visualStateType should be maximized. */
282 bool machineWindowShouldBeMaximized(UIVisualStateType visualStateType, ulong uScreenIndex, const QString &strID);
283 /** Defines @a geometry and @a fMaximized state for machine-window with @a uScreenIndex in @a visualStateType. */
284 void setMachineWindowGeometry(UIVisualStateType visualStateType, ulong uScreenIndex, const QRect &geometry, bool fMaximized, const QString &strID);
285
286 /** Returns restricted Runtime UI menu types. */
287 RuntimeMenuType restrictedRuntimeMenuTypes(const QString &strID);
288 #ifdef Q_WS_MAC
289 /** Mac OS X: Returns restricted Runtime UI action types for Application menu. */
290 RuntimeMenuApplicationActionType restrictedRuntimeMenuApplicationActionTypes(const QString &strID);
291 #endif /* Q_WS_MAC */
292 /** Returns restricted Runtime UI action types for Machine menu. */
293 RuntimeMenuMachineActionType restrictedRuntimeMenuMachineActionTypes(const QString &strID);
294 /** Returns restricted Runtime UI action types for View menu. */
295 RuntimeMenuViewActionType restrictedRuntimeMenuViewActionTypes(const QString &strID);
296 /** Returns restricted Runtime UI action types for Devices menu. */
297 RuntimeMenuDevicesActionType restrictedRuntimeMenuDevicesActionTypes(const QString &strID);
298 #ifdef VBOX_WITH_DEBUGGER_GUI
299 /** Returns restricted Runtime UI action types for Debugger menu. */
300 RuntimeMenuDebuggerActionType restrictedRuntimeMenuDebuggerActionTypes(const QString &strID);
301 #endif /* VBOX_WITH_DEBUGGER_GUI */
302 /** Returns restricted Runtime UI action types for Help menu. */
303 RuntimeMenuHelpActionType restrictedRuntimeMenuHelpActionTypes(const QString &strID);
304
305 /** Returns restricted Runtime UI visual-states. */
306 UIVisualStateType restrictedVisualStates(const QString &strID);
307
308 /** Returns requested Runtime UI visual-state. */
309 UIVisualStateType requestedVisualState(const QString &strID);
310 /** Defines requested Runtime UI visual-state as @a visualState. */
311 void setRequestedVisualState(UIVisualStateType visualState, const QString &strID);
312
313 /** Returns whether guest-screen auto-resize according machine-window size is enabled. */
314 bool guestScreenAutoResizeEnabled(const QString &strID);
315 /** Defines whether guest-screen auto-resize according machine-window size is @a fEnabled. */
316 void setGuestScreenAutoResizeEnabled(bool fEnabled, const QString &strID);
317
318 /** Returns last guest-screen size-hint for screen with @a uScreenIndex. */
319 QSize lastGuestSizeHint(ulong uScreenIndex, const QString &strID);
320 /** Defines last guest-screen @a sizeHint for screen with @a uScreenIndex. */
321 void setLastGuestSizeHint(ulong uScreenIndex, const QSize &sizeHint, const QString &strID);
322 /** Returns whether guest size-hint was for full or seamless screen with @a uScreenIndex. */
323 bool wasLastGuestSizeHintForFullScreen(ulong uScreenIndex, const QString &strID);
324 /** Defines whether guest size-hint @a fWas for full or seamless screen with @a uScreenIndex. */
325 void markLastGuestSizeHintAsFullScreen(ulong uScreenIndex, bool fWas, const QString &strID);
326
327 /** Returns host-screen index corresponding to passed guest-screen @a iGuestScreenIndex. */
328 int hostScreenForPassedGuestScreen(int iGuestScreenIndex, const QString &strID);
329 /** Defines @a iHostScreenIndex corresponding to passed guest-screen @a iGuestScreenIndex. */
330 void setHostScreenForPassedGuestScreen(int iGuestScreenIndex, int iHostScreenIndex, const QString &strID);
331
332 /** Returns whether automatic mounting/unmounting of guest-screens enabled. */
333 bool autoMountGuestScreensEnabled(const QString &strID);
334
335#ifdef VBOX_WITH_VIDEOHWACCEL
336 /** Returns whether 2D acceleration should use linear sretch. */
337 bool useLinearStretch(const QString &strID);
338 /** Returns whether 2D acceleration should use YV12 pixel format. */
339 bool usePixelFormatYV12(const QString &strID);
340 /** Returns whether 2D acceleration should use UYVY pixel format. */
341 bool usePixelFormatUYVY(const QString &strID);
342 /** Returns whether 2D acceleration should use YUY2 pixel format. */
343 bool usePixelFormatYUY2(const QString &strID);
344 /** Returns whether 2D acceleration should use AYUV pixel format. */
345 bool usePixelFormatAYUV(const QString &strID);
346#endif /* VBOX_WITH_VIDEOHWACCEL */
347
348 /** Returns Runtime UI HiDPI optimization type. */
349 HiDPIOptimizationType hiDPIOptimizationType(const QString &strID);
350
351 /** Returns whether mini-toolbar is enabled for full and seamless screens. */
352 bool miniToolbarEnabled(const QString &strID);
353 /** Defines whether mini-toolbar is @a fEnabled for full and seamless screens. */
354 void setMiniToolbarEnabled(bool fEnabled, const QString &strID);
355
356 /** Returns whether mini-toolbar should auto-hide itself. */
357 bool autoHideMiniToolbar(const QString &strID);
358 /** Defines whether mini-toolbar should @a fAutoHide itself. */
359 void setAutoHideMiniToolbar(bool fAutoHide, const QString &strID);
360
361 /** Returns mini-toolbar alignment. */
362 Qt::AlignmentFlag miniToolbarAlignment(const QString &strID);
363 /** Returns mini-toolbar @a alignment. */
364 void setMiniToolbarAlignment(Qt::AlignmentFlag alignment, const QString &strID);
365
366 /** Returns whether Runtime UI status-bar is enabled. */
367 bool statusBarEnabled(const QString &strID);
368 /** Defines whether Runtime UI status-bar is @a fEnabled. */
369 void setStatusBarEnabled(bool fEnabled, const QString &strID);
370
371 /** Returns restricted Runtime UI status-bar indicator list. */
372 QList<IndicatorType> restrictedStatusBarIndicators(const QString &strID);
373 /** Defines restricted Runtime UI status-bar indicator @a list. */
374 void setRestrictedStatusBarIndicators(const QList<IndicatorType> &list, const QString &strID);
375
376 /** Returns Runtime UI status-bar indicator order list. */
377 QList<IndicatorType> statusBarIndicatorOrder(const QString &strID);
378 /** Defines Runtime UI status-bar indicator order @a list. */
379 void setStatusBarIndicatorOrder(const QList<IndicatorType> &list, const QString &strID);
380
381#ifdef Q_WS_MAC
382 /** Mac OS X: Returns whether 'presentation mode' enabled. */
383 bool presentationModeEnabled(const QString &strID);
384
385 /** Mac OS X: Returns whether Dock icon should be updated at runtime. */
386 bool realtimeDockIconUpdateEnabled(const QString &strID);
387 /** Mac OS X: Defines whether Dock icon update should be fEnabled at runtime. */
388 void setRealtimeDockIconUpdateEnabled(bool fEnabled, const QString &strID);
389
390 /** Mac OS X: Returns guest-screen which Dock icon should reflect at runtime. */
391 int realtimeDockIconUpdateMonitor(const QString &strID);
392 /** Mac OS X: Defines guest-screen @a iIndex which Dock icon should reflect at runtime. */
393 void setRealtimeDockIconUpdateMonitor(int iIndex, const QString &strID);
394#endif /* Q_WS_MAC */
395
396 /** Returns whether machine should pass CAD to guest. */
397 bool passCADtoGuest(const QString &strID);
398
399 /** Returns the mouse-capture policy. */
400 MouseCapturePolicy mouseCapturePolicy(const QString &strID);
401
402 /** Returns redefined guru-meditation handler type. */
403 GuruMeditationHandlerType guruMeditationHandlerType(const QString &strID);
404
405 /** Returns whether machine should perform HID LEDs synchronization. */
406 bool hidLedsSyncState(const QString &strID);
407 /** @} */
408
409 /** @name Virtual Machine: Information dialog
410 * @{ */
411 /** Returns information-window geometry using @a pWidget and @a pParentWidget as hints. */
412 QRect informationWindowGeometry(QWidget *pWidget, QWidget *pParentWidget, const QString &strID);
413 /** Returns whether information-window should be maximized or not. */
414 bool informationWindowShouldBeMaximized(const QString &strID);
415 /** Defines information-window @a geometry and @a fMaximized state. */
416 void setInformationWindowGeometry(const QRect &geometry, bool fMaximized, const QString &strID);
417 /** @} */
418
419 /** @name Virtual Machine: Close dialog
420 * @{ */
421 /** Returns default machine close action. */
422 MachineCloseAction defaultMachineCloseAction(const QString &strID);
423 /** Returns restricted machine close actions. */
424 MachineCloseAction restrictedMachineCloseActions(const QString &strID);
425
426 /** Returns last machine close action. */
427 MachineCloseAction lastMachineCloseAction(const QString &strID);
428 /** Defines last @a machineCloseAction. */
429 void setLastMachineCloseAction(MachineCloseAction machineCloseAction, const QString &strID);
430
431 /** Returns machine close hook script name as simple string. */
432 QString machineCloseHookScript(const QString &strID);
433 /** @} */
434
435#ifdef VBOX_WITH_DEBUGGER_GUI
436 /** @name Virtual Machine: Debug UI
437 * @{ */
438 /** Returns debug flag value for passed @a strDebugFlagKey. */
439 QString debugFlagValue(const QString &strDebugFlagKey);
440 /** @} */
441#endif /* VBOX_WITH_DEBUGGER_GUI */
442
443#ifdef DEBUG
444 /** @name VirtualBox: Extra-data Manager window
445 * @{ */
446 /** Returns Extra-data Manager geometry using @a pWidget as hint. */
447 QRect extraDataManagerGeometry(QWidget *pWidget);
448 /** Returns whether Extra-data Manager should be maximized or not. */
449 bool extraDataManagerShouldBeMaximized();
450 /** Defines Extra-data Manager @a geometry and @a fMaximized state. */
451 void setExtraDataManagerGeometry(const QRect &geometry, bool fMaximized);
452
453 /** Returns Extra-data Manager splitter hints using @a pWidget as hint. */
454 QList<int> extraDataManagerSplitterHints(QWidget *pWidget);
455 /** Defines Extra-data Manager splitter @a hints. */
456 void setExtraDataManagerSplitterHints(const QList<int> &hints);
457 /** @} */
458#endif /* DEBUG */
459
460private slots:
461
462 /** Handles 'extra-data change' event: */
463 void sltExtraDataChange(QString strMachineID, QString strKey, QString strValue);
464
465private:
466
467 /** Prepare Extra-data Manager. */
468 void prepare();
469 /** Prepare global extra-data map. */
470 void prepareGlobalExtraDataMap();
471 /** Prepare extra-data event-handler. */
472 void prepareExtraDataEventHandler();
473 /** Prepare Main event-listener. */
474 void prepareMainEventListener();
475#ifdef DEBUG
476 // /** Prepare window. */
477 // void prepareWindow();
478
479 /** Cleanup window. */
480 void cleanupWindow();
481#endif /* DEBUG */
482 /** Cleanup Main event-listener. */
483 void cleanupMainEventListener();
484 // /** Cleanup extra-data event-handler. */
485 // void cleanupExtraDataEventHandler();
486 // /** Cleanup extra-data map. */
487 // void cleanupExtraDataMap();
488 /** Cleanup Extra-data Manager. */
489 void cleanup();
490
491#ifdef DEBUG
492 /** Open window. */
493 void open(QWidget *pCenterWidget);
494#endif /* DEBUG */
495
496 /** Determines whether feature corresponding to passed @a strKey is allowed.
497 * If valid @a strID is set => applies to machine extra-data, otherwise => to global one. */
498 bool isFeatureAllowed(const QString &strKey, const QString &strID = GlobalID);
499 /** Determines whether feature corresponding to passed @a strKey is restricted.
500 * If valid @a strID is set => applies to machine extra-data, otherwise => to global one. */
501 bool isFeatureRestricted(const QString &strKey, const QString &strID = GlobalID);
502
503 /** Translates bool flag into 'allowed' value. */
504 QString toFeatureAllowed(bool fAllowed);
505 /** Translates bool flag into 'restricted' value. */
506 QString toFeatureRestricted(bool fRestricted);
507
508 /** Returns string consisting of @a strBase appended with @a uScreenIndex for the *non-primary* screen-index.
509 * If @a fSameRuleForPrimary is 'true' same rule will be used for *primary* screen-index. Used for storing per-screen extra-data. */
510 static QString extraDataKeyPerScreen(const QString &strBase, ulong uScreenIndex, bool fSameRuleForPrimary = false);
511
512 /** Singleton Extra-data Manager instance. */
513 static UIExtraDataManager *m_spInstance;
514
515 /** Holds main event-listener instance. */
516 CEventListener m_listener;
517 /** Holds extra-data event-handler instance. */
518 UIExtraDataEventHandler *m_pHandler;
519
520 /** Holds extra-data map instance. */
521 QMap<QString, ExtraDataMap> m_data;
522
523#ifdef DEBUG
524 /** Holds Extra-data Manager window instance. */
525 QPointer<UIExtraDataManagerWindow> m_pWindow;
526#endif /* DEBUG */
527};
528
529/** Singleton Extra-data Manager 'official' name. */
530#define gEDataManager UIExtraDataManager::instance()
531
532#endif /* !___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