VirtualBox

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

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

FE/Qt: 6660: Advanced extra-data management framework: Prepare/cleanup routines encapsulation.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.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
23/* COM includes: */
24#include "CEventListener.h"
25
26/* Forward declarations: */
27class UIExtraDataEventHandler;
28
29/** Singleton QObject extension
30 * providing GUI with corresponding extra-data values,
31 * and notifying it whenever any of those values changed. */
32class UIExtraDataManager : public QObject
33{
34 Q_OBJECT;
35
36signals:
37
38 /** Notifies about GUI language change. */
39 void sigLanguageChange(QString strLanguage);
40
41 /** Notifies about Selector UI keyboard shortcut change. */
42 void sigSelectorUIShortcutChange();
43 /** Notifies about Runtime UI keyboard shortcut change. */
44 void sigRuntimeUIShortcutChange();
45
46 /** Notifies about HID LED sync state change. */
47 void sigHIDLedsSyncStateChange(bool fEnabled);
48
49#ifdef RT_OS_DARWIN
50 /** Mac OS X: Notifies about 'presentation mode' status change. */
51 void sigPresentationModeChange(bool fEnabled);
52 /** Mac OS X: Notifies about 'dock icon' appearance change. */
53 void sigDockIconAppearanceChange(bool fEnabled);
54#endif /* RT_OS_DARWIN */
55
56public:
57
58 /** Static Extra-data Manager instance/constructor. */
59 static UIExtraDataManager* instance();
60 /** Static Extra-data Manager destructor. */
61 static void destroy();
62
63private:
64
65 /** Extra-data Manager constructor. */
66 UIExtraDataManager();
67 /** Extra-data Manager destructor. */
68 ~UIExtraDataManager();
69
70 /** Prepare Extra-data Manager. */
71 void prepare();
72 /** Prepare Main event-listener. */
73 void prepareMainEventListener();
74 /** Prepare extra-data event-handler. */
75 void prepareExtraDataEventHandler();
76
77 /** Cleanup Extra-data Manager. */
78 void cleanup();
79 /** Cleanup Main event-listener. */
80 void cleanupMainEventListener();
81 // /** Cleanup extra-data event-handler. */
82 // void cleanupExtraDataEventHandler() {}
83
84 /** Singleton Extra-data Manager instance. */
85 static UIExtraDataManager *m_pInstance;
86
87 /** Main event-listener instance. */
88 CEventListener m_listener;
89 /** Extra-data event-handler instance. */
90 UIExtraDataEventHandler *m_pHandler;
91};
92
93/** Singleton Extra-data Manager 'official' name. */
94#define gEDataManager UIExtraDataManager::instance()
95
96#endif /* !___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