VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineViewNormal.h@ 35740

Last change on this file since 35740 was 30547, checked in by vboxsync, 14 years ago

FE/Qt: New running VM core: Normalize-geometry slot moved from UIMachineView to UIMachineViewNormal (x11 ifdef part) as it used only there.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.6 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt GUI ("VirtualBox"):
4 * UIMachineViewNormal 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 ___UIMachineViewNormal_h___
20#define ___UIMachineViewNormal_h___
21
22/* Local includes */
23#include "UIMachineView.h"
24
25class UIMachineViewNormal : public UIMachineView
26{
27 Q_OBJECT;
28
29protected:
30
31 /* Normal machine-view constructor: */
32 UIMachineViewNormal( UIMachineWindow *pMachineWindow
33 , ulong uScreenId
34#ifdef VBOX_WITH_VIDEOHWACCEL
35 , bool bAccelerate2DVideo
36#endif
37 );
38 /* Normal machine-view destructor: */
39 virtual ~UIMachineViewNormal();
40
41private slots:
42
43 /* Slot to perform guest resize: */
44 void sltPerformGuestResize(const QSize &size = QSize());
45
46 /* Console callback handlers: */
47 void sltAdditionsStateChanged();
48
49 /* Watch dog for desktop resizes: */
50 void sltDesktopResized();
51
52#ifdef Q_WS_X11
53 /* Slot to perform synchronized geometry normalization.
54 * Currently its only required under X11 as of its async nature: */
55 virtual void sltNormalizeGeometry() { normalizeGeometry(true); }
56#endif /* Q_WS_X11 */
57
58private:
59
60 /* Event handlers: */
61 bool event(QEvent *pEvent);
62 bool eventFilter(QObject *pWatched, QEvent *pEvent);
63
64 /* Prepare helpers: */
65 void prepareCommon();
66 void prepareFilters();
67 void prepareConnections();
68 void prepareConsoleConnections();
69 //void loadMachineViewSettings();
70
71 /* Cleanup helpers: */
72 void saveMachineViewSettings();
73 //void cleanupConsoleConnections() {}
74 //void prepareConnections() {}
75 //void cleanupFilters() {}
76 //void cleanupCommon() {}
77
78 /* Hidden setters: */
79 void setGuestAutoresizeEnabled(bool bEnabled);
80
81 /* Private helpers: */
82 void normalizeGeometry(bool fAdjustPosition);
83 QRect workingArea();
84 void calculateDesktopGeometry();
85 void maybeRestrictMinimumSize();
86
87 /* Private members: */
88 bool m_bIsGuestAutoresizeEnabled : 1;
89 bool m_fShouldWeDoResize : 1;
90
91 /* Friend classes: */
92 friend class UIMachineView;
93};
94
95#endif // !___UIMachineViewNormal_h___
96
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use