NDEVR
API Documentation
VncClientWidget

A QWidget that renders the remote VNC framebuffer and forwards user input events (mouse, keyboard) to the VncDevice for transmission to the remote server. More...

Public Member Functions

 VncClientWidget (QWidget *parent=0)
 Constructs the VNC client widget.
void commit (const QRegion &region)
 Commits updated regions of the framebuffer for display.
bool connectToVncServer (const StringView &ip, const StringView &password, int port=5900)
 Connects to a VNC server at the given address.
void disconnectFromVncServer ()
 Disconnects from the VNC server.
QImage * imageToRender ()
 Returns the current framebuffer image for rendering.
bool isConnectedToServer ()
 Checks whether the client is connected to a VNC server.
void refreshTcpSize ()
 Sends a resize request to the associated TCP server.
void setMouse (const Vector< 2, uint04 > &hotspot, QImage mouse)
 Sets the mouse cursor image and hotspot.
void setResizeTcpServer (TcpServer *server, fltp08 size_multiplier)
 Associates a TCP server for dynamic window resizing.
void tryRefreshScreen (bool force_refresh_all)
 Triggers a screen refresh, optionally forcing a full redraw.

Detailed Description

A QWidget that renders the remote VNC framebuffer and forwards user input events (mouse, keyboard) to the VncDevice for transmission to the remote server.


Definition at line 122 of file VncClientWidget.h.

Constructor & Destructor Documentation

◆ VncClientWidget()

VncClientWidget::VncClientWidget ( QWidget * parent = 0)
explicit

Constructs the VNC client widget.

Parameters
[in]parentOptional parent widget.

References VncClientWidget().

Referenced by VncClientWidget().

Member Function Documentation

◆ commit()

void VncClientWidget::commit ( const QRegion & region)

Commits updated regions of the framebuffer for display.

Parameters
[in]regionThe dirty region that was updated.

◆ connectToVncServer()

bool VncClientWidget::connectToVncServer ( const StringView & ip,
const StringView & password,
int port = 5900 )

Connects to a VNC server at the given address.

Parameters
[in]ipThe server IP address or hostname.
[in]passwordThe VNC authentication password.
[in]portThe VNC port (default 5900).
Returns
true on successful connection.

◆ imageToRender()

QImage * VncClientWidget::imageToRender ( )

Returns the current framebuffer image for rendering.

Returns
Pointer to the active screen buffer image.

◆ isConnectedToServer()

bool VncClientWidget::isConnectedToServer ( )

Checks whether the client is connected to a VNC server.

Returns
true if connected.

◆ setMouse()

void VncClientWidget::setMouse ( const Vector< 2, uint04 > & hotspot,
QImage mouse )

Sets the mouse cursor image and hotspot.

Parameters
[in]hotspotThe cursor hotspot offset.
[in]mouseThe cursor image.

◆ setResizeTcpServer()

void VncClientWidget::setResizeTcpServer ( TcpServer * server,
fltp08 size_multiplier )

Associates a TCP server for dynamic window resizing.

Parameters
[in]serverThe resize TCP server.
[in]size_multiplierScale factor for resize requests.

◆ tryRefreshScreen()

void VncClientWidget::tryRefreshScreen ( bool force_refresh_all)

Triggers a screen refresh, optionally forcing a full redraw.

Parameters
[in]force_refresh_allWhether to request a full framebuffer refresh.

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