VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineLogicSeamless.h@ 69498

Last change on this file since 69498 was 69498, checked in by vboxsync, 7 years ago

backed out r118835 as it incorrectly updated the 'This file is based on' file headers.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.2 KB
Line 
1/* $Id: UIMachineLogicSeamless.h 69498 2017-10-28 15:07:25Z vboxsync $ */
2/** @file
3 * VBox Qt GUI - UIMachineLogicSeamless class declaration.
4 */
5
6/*
7 * Copyright (C) 2010-2016 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef ___UIMachineLogicSeamless_h___
19#define ___UIMachineLogicSeamless_h___
20
21/* Local includes: */
22#include "UIMachineLogic.h"
23
24/* Forward declarations: */
25class UIMultiScreenLayout;
26
27/* Seamless machine logic implementation: */
28class UIMachineLogicSeamless : public UIMachineLogic
29{
30 Q_OBJECT;
31
32protected:
33
34 /* Constructor/destructor: */
35 UIMachineLogicSeamless(QObject *pParent, UISession *pSession);
36 ~UIMachineLogicSeamless();
37
38 /* Check if this logic is available: */
39 bool checkAvailability();
40
41 /** Returns machine-window flags for 'Seamless' machine-logic and passed @a uScreenId. */
42 virtual Qt::WindowFlags windowFlags(ulong uScreenId) const { Q_UNUSED(uScreenId); return Qt::FramelessWindowHint; }
43
44 /** Adjusts machine-window geometry if necessary for 'Seamless'. */
45 virtual void adjustMachineWindowsGeometry();
46
47 /* Helpers: Multi-screen stuff: */
48 int hostScreenForGuestScreen(int iScreenId) const;
49 bool hasHostScreenForGuestScreen(int iScreenId) const;
50
51 /* API: 3D overlay visibility stuff: */
52 void notifyAbout3DOverlayVisibilityChange(bool fVisible);
53
54private slots:
55
56 /** Checks if some visual-state type was requested. */
57 void sltCheckForRequestedVisualStateType();
58
59 /* Handler: Console callback stuff: */
60 void sltMachineStateChanged();
61
62 /** Updates machine-window(s) location/size on screen-layout changes. */
63 void sltScreenLayoutChanged();
64
65 /** Handles guest-screen count change. */
66 virtual void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo);
67 /** Handles host-screen count change. */
68 virtual void sltHostScreenCountChange();
69 /** Handles additions-state change. */
70 virtual void sltAdditionsStateChanged();
71
72#ifndef RT_OS_DARWIN
73 /** Invokes popup-menu. */
74 void sltInvokePopupMenu();
75#endif /* !RT_OS_DARWIN */
76
77private:
78
79 /* Prepare helpers: */
80 void prepareActionGroups();
81 void prepareActionConnections();
82 void prepareMachineWindows();
83#ifndef VBOX_WS_MAC
84 void prepareMenu();
85#endif /* !VBOX_WS_MAC */
86
87 /* Cleanup helpers: */
88#ifndef VBOX_WS_MAC
89 void cleanupMenu();
90#endif /* !VBOX_WS_MAC */
91 void cleanupMachineWindows();
92 void cleanupActionConnections();
93 void cleanupActionGroups();
94
95 /* Variables: */
96 UIMultiScreenLayout *m_pScreenLayout;
97
98#ifndef RT_OS_DARWIN
99 /** Holds the popup-menu instance. */
100 QMenu *m_pPopupMenu;
101#endif /* !RT_OS_DARWIN */
102
103 /* Friend classes: */
104 friend class UIMachineLogic;
105 friend class UIMachineWindowSeamless;
106 friend class UIMachineViewSeamless;
107};
108
109#endif /* !___UIMachineLogicSeamless_h___ */
110
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