Qt 4.8
qvncintegration.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the plugins of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QGRAPHICSSYSTEM_VNC_H
43 #define QGRAPHICSSYSTEM_VNC_H
44 
45 #include "qvnccursor.h"
46 #include "../fb_base/fb_base.h"
47 #include <QPlatformIntegration>
49 
51 
52 class QVNCServer;
53 class QVNCDirtyMap;
54 
55 class QVNCScreenPrivate;
56 
57 class QVNCScreen : public QFbScreen
58 {
59  Q_OBJECT
60 public:
61  QVNCScreen(QRect screenSize, int screenId);
62 
63  int linestep() const { return image() ? image()->bytesPerLine() : 0; }
64  uchar *base() const { return image() ? image()->bits() : 0; }
66 
67 public:
69 
70 private:
72  QRegion doRedraw();
73  friend class QVNCIntegration;
74 };
75 
76 class QVNCIntegrationPrivate;
77 
78 
80 {
81 public:
82  QVNCIntegration(const QStringList& paramList);
83 
84  bool hasCapability(QPlatformIntegration::Capability cap) const;
85  QPixmapData *createPixmapData(QPixmapData::PixelType type) const;
86  QPlatformWindow *createPlatformWindow(QWidget *widget, WId winId) const;
87  QWindowSurface *createWindowSurface(QWidget *widget, WId winId) const;
88 
89  QPixmap grabWindow(WId window, int x, int y, int width, int height) const;
90 
91  QList<QPlatformScreen *> screens() const { return mScreens; }
92 
93  bool isVirtualDesktop() { return virtualDesktop; }
94  void moveToScreen(QWidget *window, int screen);
95 
96  QPlatformFontDatabase *fontDatabase() const;
97 
98 private:
103 };
104 
105 
106 
108 
109 #endif //QGRAPHICSSYSTEM_VNC_H
110 
unsigned long WId
Definition: qwindowdefs.h:119
int type
Definition: qmetatype.cpp:239
int height() const
Returns the logical height of the framebuffer in pixels.
Definition: qscreen_qws.h:228
QList< QPlatformScreen * > screens() const
Accessor function to a list of all the screens on the current system.
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
QPointer< QWidget > widget
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
int bytesPerLine() const
Returns the number of bytes per image scanline.
Definition: qimage.cpp:1812
The QPlatformWindow class provides an abstraction for top-level windows.
friend class QVNCIntegration
unsigned char uchar
Definition: qglobal.h:994
int width() const
Returns the logical width of the framebuffer in pixels.
Definition: qscreen_qws.h:227
NSWindow * window
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
The QVNCScreen class implements a screen driver for VNC servers.
QPlatformFontDatabase * fontDb
The QStringList class provides a list of strings.
Definition: qstringlist.h:66
The QRegion class specifies a clip region for a painter.
Definition: qregion.h:68
QRegion doRedraw()
QVNCDirtyMap * dirtyMap()
#define Q_OBJECT
Definition: qobjectdefs.h:157
The QWindowSurface class provides the drawing area for top-level windows.
int linestep() const
The QPlatformIntegration class is the entry for WindowSystem specific functionality.
QImage * image() const
Definition: fb_base.h:180
uchar * bits()
Returns a pointer to the first pixel data.
Definition: qimage.cpp:1946
QList< QPlatformScreen * > mScreens
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
The QPlatformFontDatabase class makes it possible to customize how fonts are discovered and how they ...
The QPixmap class is an off-screen image representation that can be used as a paint device...
Definition: qpixmap.h:71
bool isVirtualDesktop()
Returns if the current windowing system configuration defines all the screens to be one desktop(virtu...
QVNCScreen * mPrimaryScreen
QScreen * screen() const
Returns the real screen used by the proxy screen.
QVNCServer * server
uchar * base() const
int screenSize() const
Returns the size of the screen in bytes.
Definition: qscreen_qws.h:242
QVNCScreenPrivate * d_ptr
The QList class is a template class that provides lists.
Definition: qdatastream.h:62
QVNCScreen(int display_id)
Constructs a QVNCScreen object.