Qt 4.8
Public Functions | Private Functions | Properties | List of all members
QProxyScreenCursor Class Reference

The QProxyScreenCursor class provides a generic interface to QScreenCursor implementations. More...

#include <qscreenproxy_qws.h>

Inheritance diagram for QProxyScreenCursor:
QScreenCursor QVNCClientCursor QVNCCursor

Public Functions

void hide ()
 Reimplemented Function More...
 
void move (int x, int y)
 Reimplemented Function More...
 
 QProxyScreenCursor ()
 Constructs a proxy screen cursor. More...
 
QScreenCursorscreenCursor () const
 Returns the real screen cursor used by the proxy screen cursor. More...
 
void set (const QImage &image, int hotx, int hoty)
 Reimplemented Function More...
 
void setScreenCursor (QScreenCursor *cursor)
 Sets the real screen cursor to be used for the proxy screen cursor to the cursor specified. More...
 
void show ()
 Reimplemented Function More...
 
 ~QProxyScreenCursor ()
 Destroys the proxy screen cursor. More...
 
- Public Functions inherited from QScreenCursor
QRect boundingRect () const
 Returns the cursor's bounding rectangle. More...
 
QImage image () const
 Returns the cursor's image. More...
 
bool isAccelerated () const
 Returns true if the cursor is accelerated; otherwise false. More...
 
bool isVisible () const
 Returns true if the cursor is visible; otherwise false. More...
 
 QScreenCursor ()
 Constructs a screen cursor. More...
 
bool supportsAlphaCursor () const
 
virtual ~QScreenCursor ()
 Destroys the screen cursor. More...
 

Private Functions

void configure ()
 

Properties

QProxyScreenCursorPrivate * d_ptr
 
QScreenCursorrealCursor
 

Additional Inherited Members

- Static Public Functions inherited from QScreenCursor
static bool enabled ()
 
static void initSoftwareCursor ()
 Initializes the screen cursor. More...
 
static QScreenCursorinstance ()
 
- Protected Variables inherited from QScreenCursor
QImage cursor
 
uint enable: 1
 
QPoint hotspot
 
uint hwaccel: 1
 
QPoint pos
 
QSize size
 
uint supportsAlpha: 1
 

Detailed Description

The QProxyScreenCursor class provides a generic interface to QScreenCursor implementations.

Since
4.5

Definition at line 61 of file qscreenproxy_qws.h.

Constructors and Destructors

◆ QProxyScreenCursor()

QProxyScreenCursor::QProxyScreenCursor ( )

Constructs a proxy screen cursor.

Definition at line 65 of file qscreenproxy_qws.cpp.

66  : QScreenCursor(), realCursor(0), d_ptr(0)
67 {
68 }
QProxyScreenCursorPrivate * d_ptr
QScreenCursor()
Constructs a screen cursor.
QScreenCursor * realCursor

◆ ~QProxyScreenCursor()

QProxyScreenCursor::~QProxyScreenCursor ( )

Destroys the proxy screen cursor.

Definition at line 73 of file qscreenproxy_qws.cpp.

74 {
75 }

Functions

◆ configure()

void QProxyScreenCursor::configure ( )
private
Warning
This function is not part of the public interface.

Definition at line 156 of file qscreenproxy_qws.cpp.

Referenced by setScreenCursor().

157 {
158  if (!realCursor)
159  return;
160 
162  size = realCursor->size;
163  pos = realCursor->pos;
168 }
QPoint hotspot
Definition: qscreen_qws.h:163
QScreenCursor * realCursor
uint supportsAlpha
Definition: qscreen_qws.h:166

◆ hide()

void QProxyScreenCursor::hide ( )
virtual

Reimplemented Function

Reimplemented from QScreenCursor.

Reimplemented in QVNCCursor.

Definition at line 143 of file qscreenproxy_qws.cpp.

Referenced by QVNCCursor::hide().

144 {
145  if (realCursor) {
146  realCursor->hide();
147  enable = false;
148  } else {
150  }
151 }
QScreenCursor * realCursor
virtual void hide()
Hides the cursor from the screen.

◆ move()

void QProxyScreenCursor::move ( int  x,
int  y 
)
virtual

Reimplemented Function

Reimplemented from QScreenCursor.

Reimplemented in QVNCCursor.

Definition at line 117 of file qscreenproxy_qws.cpp.

Referenced by QVNCCursor::move().

118 {
119  if (realCursor) {
120  pos = QPoint(x, y);
121  realCursor->move(x, y);
122  } else {
123  QScreenCursor::move(x, y);
124  }
125 }
virtual void move(int x, int y)
Moves the mouse cursor to the given position, i.e., (x, y).
QScreenCursor * realCursor
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53

◆ screenCursor()

QScreenCursor * QProxyScreenCursor::screenCursor ( ) const

Returns the real screen cursor used by the proxy screen cursor.

See also
setScreenCursor()

Definition at line 94 of file qscreenproxy_qws.cpp.

Referenced by QVNCClientCursor::~QVNCClientCursor(), and QVNCCursor::~QVNCCursor().

95 {
96  return realCursor;
97 }
QScreenCursor * realCursor

◆ set()

void QProxyScreenCursor::set ( const QImage image,
int  hotx,
int  hoty 
)
virtual

Reimplemented Function

Reimplemented from QScreenCursor.

Reimplemented in QVNCClientCursor, and QVNCCursor.

Definition at line 102 of file qscreenproxy_qws.cpp.

Referenced by QVNCCursor::set().

103 {
104  if (realCursor) {
105  hotspot = QPoint(hotx, hoty);
106  cursor = image;
107  size = image.size();
108  realCursor->set(image, hotx, hoty);
109  } else {
110  QScreenCursor::set(image, hotx, hoty);
111  }
112 }
QPoint hotspot
Definition: qscreen_qws.h:163
QImage image() const
Returns the cursor&#39;s image.
Definition: qscreen_qws.h:151
QScreenCursor * realCursor
QSize size() const
Returns the size of the image, i.
Definition: qimage.cpp:1587
The QPoint class defines a point in the plane using integer precision.
Definition: qpoint.h:53
virtual void set(const QImage &image, int hotx, int hoty)
Sets the cursor&#39;s image to be the given image.

◆ setScreenCursor()

void QProxyScreenCursor::setScreenCursor ( QScreenCursor cursor)

Sets the real screen cursor to be used for the proxy screen cursor to the cursor specified.

See also
screenCursor()

Definition at line 83 of file qscreenproxy_qws.cpp.

Referenced by QVNCClientCursor::QVNCClientCursor(), and QVNCCursor::QVNCCursor().

84 {
86  configure();
87 }
QScreenCursor * realCursor

◆ show()

void QProxyScreenCursor::show ( )
virtual

Reimplemented Function

Reimplemented from QScreenCursor.

Reimplemented in QVNCCursor.

Definition at line 130 of file qscreenproxy_qws.cpp.

Referenced by QVNCCursor::show().

131 {
132  if (realCursor) {
133  realCursor->show();
134  enable = true;
135  } else {
137  }
138 }
QScreenCursor * realCursor
virtual void show()
Shows the mouse cursor.

Properties

◆ d_ptr

QProxyScreenCursorPrivate* QProxyScreenCursor::d_ptr
private

Definition at line 79 of file qscreenproxy_qws.h.

◆ realCursor

QScreenCursor* QProxyScreenCursor::realCursor
private

Definition at line 78 of file qscreenproxy_qws.h.

Referenced by configure(), hide(), move(), screenCursor(), set(), setScreenCursor(), and show().


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