VirtualBox

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

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

FE/Qt: Runtime UI: Geometry adjustment code refactoring (better encapsulation for that mess, renaming to more logical names); Mini-toolbar update bug-fix on machine-window geometry adjustment.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.1 KB
Line 
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: */
24class UIMultiScreenLayout;
25
26/* Seamless machine logic implementation: */
27class UIMachineLogicSeamless : public UIMachineLogic
28{
29 Q_OBJECT;
30
31protected:
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 /** Returns machine-window flags for 'Seamless' machine-logic and passed @a uScreenId. */
41 virtual Qt::WindowFlags windowFlags(ulong uScreenId) const { Q_UNUSED(uScreenId); return Qt::FramelessWindowHint; }
42
43 /** Adjusts machine-window geometry if necessary for 'Seamless'. */
44 virtual void adjustMachineWindowsGeometry();
45
46 /* Helpers: Multi-screen stuff: */
47 int hostScreenForGuestScreen(int iScreenId) const;
48 bool hasHostScreenForGuestScreen(int iScreenId) const;
49
50 /* API: 3D overlay visibility stuff: */
51 void notifyAbout3DOverlayVisibilityChange(bool fVisible);
52
53private slots:
54
55 /** Checks if some visual-state type was requested. */
56 void sltCheckForRequestedVisualStateType();
57
58 /* Handler: Console callback stuff: */
59 void sltMachineStateChanged();
60
61 /** Updates machine-window(s) location/size on screen-layout changes. */
62 void sltScreenLayoutChanged();
63
64 /** Handles guest-screen count change. */
65 virtual void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo);
66 /** Handles host-screen count change. */
67 virtual void sltHostScreenCountChange();
68
69#ifndef RT_OS_DARWIN
70 /** Invokes popup-menu. */
71 void sltInvokePopupMenu();
72#endif /* !RT_OS_DARWIN */
73
74private:
75
76 /* Prepare helpers: */
77 void prepareActionGroups();
78 void prepareActionConnections();
79 void prepareMachineWindows();
80#ifndef Q_WS_MAC
81 void prepareMenu();
82#endif /* !Q_WS_MAC */
83
84 /* Cleanup helpers: */
85#ifndef Q_WS_MAC
86 void cleanupMenu();
87#endif /* !Q_WS_MAC */
88 void cleanupMachineWindows();
89 void cleanupActionConnections();
90 void cleanupActionGroups();
91
92 /* Variables: */
93 UIMultiScreenLayout *m_pScreenLayout;
94
95#ifndef RT_OS_DARWIN
96 /** Holds the popup-menu instance. */
97 QMenu *m_pPopupMenu;
98#endif /* !RT_OS_DARWIN */
99
100 /* Friend classes: */
101 friend class UIMachineLogic;
102 friend class UIMachineWindowSeamless;
103 friend class UIMachineViewSeamless;
104};
105
106#endif /* !___UIMachineLogicSeamless_h___ */
107
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