1791 const quint32 encoding = htonl(5);
1795 const char tmp[2] = { 0, 0 };
1796 socket->
write(tmp,
sizeof(tmp));
1800 socket->
write((
char *)&count,
sizeof(count));
1814 for (
int y = 0; y < map->
mapHeight; ++y) {
1818 for (
int x = 0; x < map->
mapWidth; ++x) {
1819 if (!map->
dirty(x, y))
1828 socket->
write((
char *)&encoding,
sizeof(encoding));
1831 + rect.x * screenImage.
depth() / 8;
1834 #ifndef QT_NO_QWS_CURSOR 1840 if (doBlendCursor) {
1841 const QRect tileRect(rect.x, rect.y, rect.w, rect.h);
1844 if (tileRect.intersects(cursorRect)) {
1845 tileImage = screenImage.
copy(tileRect);
1848 screendata = tileImage.
bits();
1852 #endif // QT_NO_QWS_CURSOR 1861 const int bufferSize = rect.w * rect.h * bytesPerPixel + 1;
1862 const int padding =
sizeof(
quint32) -
sizeof(
char);
1870 for (
int i = 0; i < rect.h; ++i) {
1872 screendata += linestep;
1878 socket->
write((
char *)&subenc, 1);
1881 for (
int i = 0; i < rect.h; ++i) {
1882 socket->
write((
const char*)screendata,
1883 rect.w * bytesPerPixel);
1884 screendata += linestep;
void convertPixels(char *dst, const char *src, int count) const
QImage copy(const QRect &rect=QRect()) const
Returns a sub-area of the image as a new image.
int height() const
Returns the logical height of the framebuffer in pixels.
bool dirty(int x, int y) const
char * data()
Returns a pointer to the data stored in the byte array.
bool flush()
This function writes as much as possible from the internal write buffer to the underlying network soc...
bool hasClientCursor() const
static int bytesPerPixel(QImage::Format format)
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...
int deviceWidth() const
Returns the physical width of the framebuffer device in pixels.
int bytesPerLine() const
Returns the number of bytes per image scanline.
bool doPixelConversion() const
QVNCScreen * screen() const
bool isAccelerated() const
Returns true if the cursor is accelerated; otherwise false.
The QImage class provides a hardware-independent image representation that allows direct access to th...
The QTcpSocket class provides a TCP socket.
int depth() const
Returns the depth of the image.
const char * constData() const
Returns a pointer to the data stored in the byte array.
uchar * bits()
Returns a pointer to the first pixel data.
QTcpSocket * clientSocket() const
QVNCDirtyMap * dirtyMap() const
QRect boundingRect() const
Returns the cursor's bounding rectangle.
void resize(int size)
Sets the size of the byte array to size bytes.
The QRect class defines a rectangle in the plane using integer precision.
static void blendCursor(QImage &image, const QRect &imageRect)
QImage screenImage() const
Q_GUI_EXPORT QScreenCursor * qt_screencursor
qint64 write(const char *data, qint64 len)
Writes at most maxSize bytes of data from data to the device.
void setClean(int x, int y)
QRfbSingleColorHextile< SRC > singleColorHextile
QRfbMultiColorHextile< SRC > multiColorHextile
QRfbDualColorHextile< SRC > dualColorHextile
uchar * scanLine(int)
Returns a pointer to the pixel data at the scanline with index i.
SocketState state() const
Returns the state of the socket.
QPoint offset() const
Returns the logical offset of the screen, i.
int clientBytesPerPixel() const