1 | /** @file
|
---|
2 | * VBox Qt GUI - UIMachineLogicSeamless class declaration.
|
---|
3 | */
|
---|
4 |
|
---|
5 | /*
|
---|
6 | * Copyright (C) 2010-2013 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 ___UIMachineLogicSeamless_h___
|
---|
18 | #define ___UIMachineLogicSeamless_h___
|
---|
19 |
|
---|
20 | /* Local includes: */
|
---|
21 | #include "UIMachineLogic.h"
|
---|
22 |
|
---|
23 | /* Forward declarations: */
|
---|
24 | class UIMultiScreenLayout;
|
---|
25 |
|
---|
26 | /* Seamless machine logic implementation: */
|
---|
27 | class UIMachineLogicSeamless : public UIMachineLogic
|
---|
28 | {
|
---|
29 | Q_OBJECT;
|
---|
30 |
|
---|
31 | protected:
|
---|
32 |
|
---|
33 | /* Constructor/destructor: */
|
---|
34 | UIMachineLogicSeamless(QObject *pParent, UISession *pSession);
|
---|
35 | ~UIMachineLogicSeamless();
|
---|
36 |
|
---|
37 | /* Check if this logic is available: */
|
---|
38 | bool checkAvailability();
|
---|
39 |
|
---|
40 | /* Helpers: Multi-screen stuff: */
|
---|
41 | void maybeAdjustGuestScreenSize();
|
---|
42 | int hostScreenForGuestScreen(int iScreenId) const;
|
---|
43 | bool hasHostScreenForGuestScreen(int iScreenId) const;
|
---|
44 |
|
---|
45 | /* API: 3D overlay visibility stuff: */
|
---|
46 | void notifyAbout3DOverlayVisibilityChange(bool fVisible);
|
---|
47 |
|
---|
48 | private slots:
|
---|
49 |
|
---|
50 | /** Checks if some visual-state type was requested. */
|
---|
51 | void sltCheckForRequestedVisualStateType();
|
---|
52 |
|
---|
53 | /* Handler: Console callback stuff: */
|
---|
54 | void sltMachineStateChanged();
|
---|
55 |
|
---|
56 | /** Updates machine-window(s) location/size on screen-layout changes. */
|
---|
57 | void sltScreenLayoutChanged();
|
---|
58 |
|
---|
59 | /** Handles guest-screen count change. */
|
---|
60 | virtual void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo);
|
---|
61 | /** Handles host-screen count change. */
|
---|
62 | virtual void sltHostScreenCountChange();
|
---|
63 |
|
---|
64 | #ifndef RT_OS_DARWIN
|
---|
65 | /** Invokes popup-menu. */
|
---|
66 | void sltInvokePopupMenu();
|
---|
67 | #endif /* !RT_OS_DARWIN */
|
---|
68 |
|
---|
69 | private:
|
---|
70 |
|
---|
71 | /* Prepare helpers: */
|
---|
72 | void prepareActionGroups();
|
---|
73 | void prepareActionConnections();
|
---|
74 | void prepareMachineWindows();
|
---|
75 | #ifndef Q_WS_MAC
|
---|
76 | void prepareMenu();
|
---|
77 | #endif /* !Q_WS_MAC */
|
---|
78 |
|
---|
79 | /* Cleanup helpers: */
|
---|
80 | #ifndef Q_WS_MAC
|
---|
81 | void cleanupMenu();
|
---|
82 | #endif /* !Q_WS_MAC */
|
---|
83 | void cleanupMachineWindows();
|
---|
84 | void cleanupActionConnections();
|
---|
85 | void cleanupActionGroups();
|
---|
86 |
|
---|
87 | /* Variables: */
|
---|
88 | UIMultiScreenLayout *m_pScreenLayout;
|
---|
89 |
|
---|
90 | #ifndef RT_OS_DARWIN
|
---|
91 | /** Holds the popup-menu instance. */
|
---|
92 | QMenu *m_pPopupMenu;
|
---|
93 | #endif /* !RT_OS_DARWIN */
|
---|
94 |
|
---|
95 | /* Friend classes: */
|
---|
96 | friend class UIMachineLogic;
|
---|
97 | friend class UIMachineWindowSeamless;
|
---|
98 | friend class UIMachineViewSeamless;
|
---|
99 | };
|
---|
100 |
|
---|
101 | #endif /* !___UIMachineLogicSeamless_h___ */
|
---|
102 |
|
---|