VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineViewScale.h@ 35740

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

FE/Qt4: make the VM view resizable when the VM is paused and in scale mode

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.2 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt GUI ("VirtualBox"):
4 * UIMachineViewScale 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 ___UIMachineViewScale_h___
20#define ___UIMachineViewScale_h___
21
22/* Local includes */
23#include "UIMachineView.h"
24
25class UIMachineViewScale : public UIMachineView
26{
27 Q_OBJECT;
28
29protected:
30
31 /* Scale machine-view constructor: */
32 UIMachineViewScale( UIMachineWindow *pMachineWindow
33 , ulong uScreenId
34#ifdef VBOX_WITH_VIDEOHWACCEL
35 , bool bAccelerate2DVideo
36#endif
37 );
38 /* Scale machine-view destructor: */
39 virtual ~UIMachineViewScale();
40
41 virtual void takePauseShotLive();
42 virtual void takePauseShotSnapshot();
43 virtual void resetPauseShot();
44 void scalePauseShot();
45
46private slots:
47
48 /* Slot to perform guest resize: */
49 void sltPerformGuestScale();
50
51 /* Watch dog for desktop resizes: */
52 void sltDesktopResized();
53
54private:
55
56 /* Event handlers: */
57 bool event(QEvent *pEvent);
58 bool eventFilter(QObject *pWatched, QEvent *pEvent);
59
60 /* Prepare helpers: */
61 void prepareFrameBuffer();
62 void prepareConnections();
63 //void loadMachineViewSettings();
64
65 /* Cleanup helpers: */
66 void saveMachineViewSettings();
67 //void cleanupConnections() {}
68 //void cleanupFrameBuffer() {}
69
70 /* Private helpers: */
71 QSize sizeHint() const;
72 void normalizeGeometry(bool /* fAdjustPosition */) {}
73 QRect workingArea();
74 void calculateDesktopGeometry();
75 void maybeRestrictMinimumSize() {}
76 void updateSliders();
77
78 /* Private members: */
79 QImage *m_pPauseImage;
80
81 /* Friend classes: */
82 friend class UIMachineView;
83};
84
85#endif // !___UIMachineViewScale_h___
86
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use