Qt 4.8
Functions | Variables
qscreenvnc_qws.cpp File Reference
#include "qscreenvnc_qws.h"
#include "qscreenvnc_p.h"
#include "qwindowsystem_qws.h"
#include "qwsdisplay_qws.h"
#include "qscreendriverfactory_qws.h"
#include <QtCore/qtimer.h>
#include <QtCore/qregexp.h>
#include <QtGui/qwidget.h>
#include <QtGui/qpolygon.h>
#include <QtGui/qpainter.h>
#include <qdebug.h>
#include <private/qwindowsurface_qws_p.h>
#include <private/qwssignalhandler_p.h>
#include <private/qwidget_p.h>
#include <private/qdrawhelper_p.h>
#include <stdlib.h>

Go to the source code of this file.

Functions

static void blendCursor (QImage &image, const QRect &imageRect)
 
static int getDisplayId (const QString &spec)
 
QString qws_qtePipeFilename ()
 

Variables

struct {
   int   keycode
 
   int   keysym
 
keyMap []
 

Function Documentation

◆ blendCursor()

static void blendCursor ( QImage image,
const QRect imageRect 
)
static

Definition at line 1651 of file qscreenvnc_qws.cpp.

Referenced by QRfbRawEncoder::write(), and QRfbHextileEncoder< SRC >::write().

1652 {
1653  const QRect cursorRect = qt_screencursor->boundingRect();
1654  const QRect intersection = (cursorRect & imageRect);
1655  const QRect destRect = intersection.translated(-imageRect.topLeft());
1656  const QRect srcRect = intersection.translated(-cursorRect.topLeft());
1657 
1658  QPainter painter(&image);
1659  painter.drawImage(destRect, qt_screencursor->image(), srcRect);
1660  painter.end();
1661 }
The QPainter class performs low-level painting on widgets and other paint devices.
Definition: qpainter.h:86
QRect translated(int dx, int dy) const
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis...
Definition: qrect.h:328
QImage image() const
Returns the cursor&#39;s image.
Definition: qscreen_qws.h:151
QRect boundingRect() const
Returns the cursor&#39;s bounding rectangle.
Definition: qscreen_qws.h:150
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
Q_GUI_EXPORT QScreenCursor * qt_screencursor
Definition: qscreen_qws.cpp:67
QPoint topLeft() const
Returns the position of the rectangle&#39;s top-left corner.
Definition: qrect.h:288

◆ getDisplayId()

static int getDisplayId ( const QString spec)
static

Definition at line 2129 of file qscreenvnc_qws.cpp.

Referenced by QVNCScreen::connect().

2130 {
2131  QRegExp regexp(QLatin1String(":(\\d+)\\b"));
2132  if (regexp.lastIndexIn(spec) != -1) {
2133  const QString capture = regexp.cap(1);
2134  return capture.toInt();
2135  }
2136  return 0;
2137 }
The QRegExp class provides pattern matching using regular expressions.
Definition: qregexp.h:61
int toInt(bool *ok=0, int base=10) const
Returns the string converted to an int using base base, which is 10 by default and must be between 2 ...
Definition: qstring.cpp:6090
QLatin1String(DBUS_INTERFACE_DBUS))) Q_GLOBAL_STATIC_WITH_ARGS(QString
The QString class provides a Unicode character string.
Definition: qstring.h:83

◆ qws_qtePipeFilename()

QString qws_qtePipeFilename ( )

Definition at line 220 of file qapplication_qws.cpp.

Referenced by QVNCScreenPrivate::configure(), QWSDisplay::Data::connectToPipe(), QWSDisplay::Data::init(), and QWSDisplay::Data::reinit().

221 {
222  qws_dataDir();
223  return QTE_PIPE(qws_display_id);
224 }
#define QTE_PIPE(DISPLAY)
Definition: qvfbhdr.h:84
Q_GUI_EXPORT int qws_display_id
QString qws_dataDir()

Variable Documentation

◆ keycode

int keycode

◆ keyMap

const { ... } keyMap[]

Referenced by QRfbKeyEvent::read().

◆ keysym

int keysym

Definition at line 291 of file qscreenvnc_qws.cpp.

Referenced by qt_keyrelease_scanner(), QRfbKeyEvent::read(), and translateKeySym().