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 | void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo);
|
---|
60 | void sltHostScreenCountChanged();
|
---|
61 |
|
---|
62 | private:
|
---|
63 |
|
---|
64 | /* Prepare helpers: */
|
---|
65 | void prepareActionGroups();
|
---|
66 | void prepareActionConnections();
|
---|
67 | void prepareMachineWindows();
|
---|
68 | void prepareMenu();
|
---|
69 |
|
---|
70 | /* Cleanup helpers: */
|
---|
71 | //void cleanupMenu() {}
|
---|
72 | void cleanupMachineWindows();
|
---|
73 | void cleanupActionConnections();
|
---|
74 | void cleanupActionGroups();
|
---|
75 |
|
---|
76 | /* Variables: */
|
---|
77 | UIMultiScreenLayout *m_pScreenLayout;
|
---|
78 |
|
---|
79 | /* Friend classes: */
|
---|
80 | friend class UIMachineLogic;
|
---|
81 | friend class UIMachineWindowSeamless;
|
---|
82 | friend class UIMachineViewSeamless;
|
---|
83 | };
|
---|
84 |
|
---|
85 | #endif /* !___UIMachineLogicSeamless_h___ */
|
---|
86 |
|
---|