1 | /** @file
|
---|
2 | *
|
---|
3 | * VBox frontends: Qt GUI ("VirtualBox"):
|
---|
4 | * UIMachineViewSeamless class declaration
|
---|
5 | */
|
---|
6 |
|
---|
7 | /*
|
---|
8 | * Copyright (C) 2010 Oracle Corporation
|
---|
9 | *
|
---|
10 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
11 | * available from http://www.virtualbox.org. This file is free software;
|
---|
12 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
13 | * General Public License (GPL) as published by the Free Software
|
---|
14 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
15 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
16 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
17 | */
|
---|
18 |
|
---|
19 | #ifndef ___UIMachineViewSeamless_h___
|
---|
20 | #define ___UIMachineViewSeamless_h___
|
---|
21 |
|
---|
22 | /* Local includes */
|
---|
23 | #include "UIMachineView.h"
|
---|
24 |
|
---|
25 | class UIMachineViewSeamless : public UIMachineView
|
---|
26 | {
|
---|
27 | Q_OBJECT;
|
---|
28 |
|
---|
29 | public:
|
---|
30 |
|
---|
31 | /* Public getters: */
|
---|
32 | QRegion lastVisibleRegion() const { return m_lastVisibleRegion; }
|
---|
33 |
|
---|
34 | protected:
|
---|
35 |
|
---|
36 | /* Seamless machine-view constructor: */
|
---|
37 | UIMachineViewSeamless( UIMachineWindow *pMachineWindow
|
---|
38 | , ulong uScreenId
|
---|
39 | #ifdef VBOX_WITH_VIDEOHWACCEL
|
---|
40 | , bool bAccelerate2DVideo
|
---|
41 | #endif
|
---|
42 | );
|
---|
43 | /* Seamless machine-view destructor: */
|
---|
44 | virtual ~UIMachineViewSeamless();
|
---|
45 |
|
---|
46 | private slots:
|
---|
47 |
|
---|
48 | /* Slot to perform guest resize: */
|
---|
49 | void sltPerformGuestResize(const QSize &aSize = QSize());
|
---|
50 |
|
---|
51 | /* Console callback handlers: */
|
---|
52 | void sltAdditionsStateChanged();
|
---|
53 |
|
---|
54 | /* Watch dog for desktop resizes: */
|
---|
55 | void sltDesktopResized();
|
---|
56 |
|
---|
57 | private:
|
---|
58 |
|
---|
59 | /* Event handlers: */
|
---|
60 | bool event(QEvent *pEvent);
|
---|
61 | bool eventFilter(QObject *pWatched, QEvent *pEvent);
|
---|
62 |
|
---|
63 | /* Prepare helpers: */
|
---|
64 | void prepareCommon();
|
---|
65 | void prepareFilters();
|
---|
66 | void prepareConnections();
|
---|
67 | void prepareConsoleConnections();
|
---|
68 | void prepareSeamless();
|
---|
69 |
|
---|
70 | /* Cleanup helpers: */
|
---|
71 | void cleanupSeamless();
|
---|
72 | //void cleanupConsoleConnections() {}
|
---|
73 | //void prepareConnections() {}
|
---|
74 | //void cleanupFilters() {}
|
---|
75 | //void cleanupCommon() {}
|
---|
76 |
|
---|
77 | /* Private helpers: */
|
---|
78 | void normalizeGeometry(bool /* fAdjustPosition */) {}
|
---|
79 | QRect workingArea();
|
---|
80 | void calculateDesktopGeometry();
|
---|
81 | void maybeRestrictMinimumSize() {}
|
---|
82 |
|
---|
83 | /* Private variables: */
|
---|
84 | bool m_fShouldWeDoResize : 1;
|
---|
85 | QRegion m_lastVisibleRegion;
|
---|
86 | UIMachineViewBlocker *m_pSyncBlocker;
|
---|
87 |
|
---|
88 | /* Friend classes: */
|
---|
89 | friend class UIMachineView;
|
---|
90 | };
|
---|
91 |
|
---|
92 | #endif // !___UIMachineViewSeamless_h___
|
---|
93 |
|
---|