Qt 4.8
Public Types | Public Functions | Public Variables | List of all members
QRfbPointerEvent Class Reference

#include <qscreenvnc_p.h>

Public Types

enum  {
  WheelNone, WheelUp, WheelDown, WheelLeft,
  WheelRight
}
 

Public Functions

bool read (QTcpSocket *s)
 
bool read (QTcpSocket *s)
 

Public Variables

uint buttons
 
Qt::MouseButtons buttons
 
enum QRfbPointerEvent:: { ... }  wheelDirection
 
quint16 x
 
quint16 y
 

Detailed Description

Definition at line 223 of file qscreenvnc_p.h.

Enumerations

◆ anonymous enum

anonymous enum
Enumerator
WheelNone 
WheelUp 
WheelDown 
WheelLeft 
WheelRight 

Definition at line 231 of file qvncserver.h.

Functions

◆ read() [1/2]

bool QRfbPointerEvent::read ( QTcpSocket s)

Definition at line 533 of file qscreenvnc_qws.cpp.

Referenced by buttonChange(), and QVNCServer::pointerEvent().

534 {
535  if (s->bytesAvailable() < 5)
536  return false;
537 
538  char buttonMask;
539  s->read(&buttonMask, 1);
540  buttons = 0;
541  if (buttonMask & 1)
543  if (buttonMask & 2)
545  if (buttonMask & 4)
547 
548  quint16 tmp;
549  s->read((char *)&tmp, 2);
550  x = ntohs(tmp);
551  s->read((char *)&tmp, 2);
552  y = ntohs(tmp);
553 
554  return true;
555 }
qint64 bytesAvailable() const
Returns the number of incoming bytes that are waiting to be read.
qint64 read(char *data, qint64 maxlen)
Reads at most maxSize bytes from the device into data, and returns the number of bytes read...
Definition: qiodevice.cpp:791
unsigned short quint16
Definition: qglobal.h:936

◆ read() [2/2]

bool QRfbPointerEvent::read ( QTcpSocket s)

Properties

◆ buttons [1/2]

uint QRfbPointerEvent::buttons

Definition at line 228 of file qscreenvnc_p.h.

Referenced by buttonChange(), and QVNCServer::pointerEvent().

◆ buttons [2/2]

Qt::MouseButtons QRfbPointerEvent::buttons

Definition at line 230 of file qvncserver.h.

◆ wheelDirection

enum { ... } QRfbPointerEvent::wheelDirection

Referenced by buttonChange().

◆ x

quint16 QRfbPointerEvent::x

Definition at line 229 of file qscreenvnc_p.h.

Referenced by buttonChange(), and QVNCServer::pointerEvent().

◆ y

quint16 QRfbPointerEvent::y

Definition at line 230 of file qscreenvnc_p.h.

Referenced by buttonChange(), and QVNCServer::pointerEvent().


The documentation for this class was generated from the following files: