VirtualBox

source: vbox/trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQImage.h@ 26823

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

FE/Qt4: new core: factor out the remaining framebuffers as well

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.7 KB
Line 
1/** @file
2 *
3 * VBox frontends: Qt GUI ("VirtualBox"):
4 * UIFrameBufferQImage class declarations
5 */
6
7/*
8 * Copyright (C) 2010 Sun Microsystems, Inc.
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 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
19 * Clara, CA 95054 USA or visit http://www.sun.com if you need
20 * additional information or have any questions.
21 */
22
23#ifndef ___UIFrameBufferQImage_h___
24#define ___UIFrameBufferQImage_h___
25
26#ifdef VBOX_GUI_USE_QIMAGE
27
28/* Local includes */
29#include "UIFrameBuffer.h"
30
31/* Global includes */
32#include <QImage>
33#include <QPixmap>
34
35class UIFrameBufferQImage : public UIFrameBuffer
36{
37public:
38
39 UIFrameBufferQImage(UIMachineView *pMachineView);
40
41 STDMETHOD(NotifyUpdate) (ULONG uX, ULONG uY, ULONG uW, ULONG uH);
42
43 ulong pixelFormat() { return m_uPixelFormat; }
44 bool usesGuestVRAM() { return m_bUsesGuestVRAM; }
45
46 uchar *address() { return m_img.bits(); }
47 ulong bitsPerPixel() { return m_img.depth(); }
48 ulong bytesPerLine() { return m_img.bytesPerLine(); }
49
50 void paintEvent(QPaintEvent *pEvent);
51 void resizeEvent(UIResizeEvent *pEvent);
52
53private:
54
55 QPixmap m_PM;
56 QImage m_img;
57 ulong m_uPixelFormat;
58 bool m_bUsesGuestVRAM;
59};
60
61#endif /* VBOX_GUI_USE_QIMAGE */
62
63#endif /* !___UIFrameBufferQImage_h___ */
64
Note: See TracBrowser for help on using the repository browser.

© 2023 Oracle
ContactPrivacy policyTerms of Use