MeVisLab Scripting Reference
MLRemoteRenderingSlaveWrapper Class Reference

#include <mlRemoteRenderingWrapper.h>

Inherits QObject, and ml::RemoteRendering::SlaveListener.

Public Types

enum  ImageType { JPG = ml::RemoteRendering::JPG , PNG = ml::RemoteRendering::PNG , SHARED_MEMORY_BGR = ml::RemoteRendering::SHARED_MEMORY_BGR , SHARED_MEMORY_BGRA = ml::RemoteRendering::SHARED_MEMORY_BGRA }
 

Public Slots

Scripting access


void mouseMoveTo (int x, int y)
 
void mousePress (Qt::MouseButton button=Qt::LeftButton)
 
void mousePress (Qt::MouseButton button, int x, int y)
 
void mouseRelease (Qt::MouseButton button=Qt::LeftButton)
 
void mouseRelease (Qt::MouseButton button, int x, int y)
 
void mouseClick (Qt::MouseButton button=Qt::LeftButton)
 
void mouseClick (Qt::MouseButton button, int x, int y)
 
void mouseDoubleClick (Qt::MouseButton button=Qt::LeftButton)
 
void mouseDoubleClick (Qt::MouseButton button, int x, int y)
 
void mouseDoubleClickPress (Qt::MouseButton button=Qt::LeftButton)
 
void mouseDoubleClickPress (Qt::MouseButton button, int x, int y)
 
void enter ()
 
void leave ()
 
void keyPress (Qt::Key key)
 
void keyRelease (Qt::Key key)
 
void keyStroke (Qt::Key key)
 
void mouseWheelForward ()
 
void mouseWheelBackward ()
 
void mouseWheel (int delta)
 
void mouseWheel (int delta, int x, int y)
 
void sendEvent (QEvent *event)
 
void resize (int x, int y)
 
void sendRenderRequest (ImageType type)
 
void startStreaming ()
 
void stopStreaming ()
 
void setStreamingSettings (const QVariantMap &settings)
 
QSize sizeHint ()
 
QSize minimumSize ()
 
QSize maximumSize ()
 
void setMousePosition (int x, int y)
 
void setKeyboardModifiers (Qt::KeyboardModifiers modifiers)
 
void setMouseButtonState (Qt::MouseButtons buttons)
 

Signals

Signals


void cursorChanged (int id, const QCursor &cursor)
 
void sceneChanged ()
 
void imageReceived (const QImage &image, ImageType type, const QVariantMap &metaInformation)
 
void sizeHintsChanged ()
 

Detailed Description

Script wrapper for a single RemoteRendering slave The first method to call on a slave is setRenderSize(), otherwise the remote side does not know the reference viewport for the events and the image rendering.

Member Enumeration Documentation

◆ ImageType

Transfer type of rendering image (irrelevant in local scenarios)

Enumerator
JPG 

Transfer as JPEG.

PNG 

Transfer as PNG.

SHARED_MEMORY_BGR 

Transfer as shared memory, BGR color arrangement.

SHARED_MEMORY_BGRA 

Transfer as shared memory, BGRA color arrangement.

Member Function Documentation

◆ cursorChanged

void MLRemoteRenderingSlaveWrapper::cursorChanged ( int id,
const QCursor & cursor )
signal

Emitted when the cursor changed.

◆ enter

void MLRemoteRenderingSlaveWrapper::enter ( )
slot

enter the viewport area (sends enter event)

◆ imageReceived

void MLRemoteRenderingSlaveWrapper::imageReceived ( const QImage & image,
ImageType type,
const QVariantMap & metaInformation )
signal

Emitted when an image was received.

◆ keyPress

void MLRemoteRenderingSlaveWrapper::keyPress ( Qt::Key key)
slot

sends that the given key was pressed.

If the key is a modifier key, the internal modifier state is adjusted.

◆ keyRelease

void MLRemoteRenderingSlaveWrapper::keyRelease ( Qt::Key key)
slot

sends that the given key was released

◆ keyStroke

void MLRemoteRenderingSlaveWrapper::keyStroke ( Qt::Key key)
slot

sends that the given key was pressed and released again

◆ leave

void MLRemoteRenderingSlaveWrapper::leave ( )
slot

leave the viewport area (sends leave event)

◆ maximumSize

QSize MLRemoteRenderingSlaveWrapper::maximumSize ( )
slot

get the current maximum size

◆ minimumSize

QSize MLRemoteRenderingSlaveWrapper::minimumSize ( )
slot

get the current minimum size

◆ mouseClick [1/2]

void MLRemoteRenderingSlaveWrapper::mouseClick ( Qt::MouseButton button,
int x,
int y )
slot

click the given mouse button at the given position

◆ mouseClick [2/2]

void MLRemoteRenderingSlaveWrapper::mouseClick ( Qt::MouseButton button = Qt::LeftButton)
slot

click the given mouse button at the last moveTo position

◆ mouseDoubleClick [1/2]

void MLRemoteRenderingSlaveWrapper::mouseDoubleClick ( Qt::MouseButton button,
int x,
int y )
slot

double-click the given mouse button at the given position (this will send a single click followed by a double click event)

◆ mouseDoubleClick [2/2]

void MLRemoteRenderingSlaveWrapper::mouseDoubleClick ( Qt::MouseButton button = Qt::LeftButton)
slot

double-click the given mouse button at the last moveTo position (this will send a single click followed by a double click event)

◆ mouseDoubleClickPress [1/2]

void MLRemoteRenderingSlaveWrapper::mouseDoubleClickPress ( Qt::MouseButton button,
int x,
int y )
slot

send a single double-click event for the given mouse button at the given position (this will only send a single press event, in contrast to mouseDoubleClick(), which will perform a full single click, double click and release)

◆ mouseDoubleClickPress [2/2]

void MLRemoteRenderingSlaveWrapper::mouseDoubleClickPress ( Qt::MouseButton button = Qt::LeftButton)
slot

send a single double-click event for the given mouse button at the last moveTo position (this will only send a single press event, in contrast to mouseDoubleClick(), which will perform a full single click, double click and release)

◆ mouseMoveTo

void MLRemoteRenderingSlaveWrapper::mouseMoveTo ( int x,
int y )
slot

move the mouse to the given position.

◆ mousePress [1/2]

void MLRemoteRenderingSlaveWrapper::mousePress ( Qt::MouseButton button,
int x,
int y )
slot

press the given mouse button at the given position

◆ mousePress [2/2]

void MLRemoteRenderingSlaveWrapper::mousePress ( Qt::MouseButton button = Qt::LeftButton)
slot

press the given mouse button at the last move to position

◆ mouseRelease [1/2]

void MLRemoteRenderingSlaveWrapper::mouseRelease ( Qt::MouseButton button,
int x,
int y )
slot

release the given mouse button at the given position

◆ mouseRelease [2/2]

void MLRemoteRenderingSlaveWrapper::mouseRelease ( Qt::MouseButton button = Qt::LeftButton)
slot

release the given mouse button at the last moveTo position

◆ mouseWheel [1/2]

void MLRemoteRenderingSlaveWrapper::mouseWheel ( int delta)
slot

send a mouse wheel movement, delta of -120 and 120 is typically for normal resolution wheels

◆ mouseWheel [2/2]

void MLRemoteRenderingSlaveWrapper::mouseWheel ( int delta,
int x,
int y )
slot

send a mouse wheel movement, delta of -120 and 120 is typically for normal resolution wheels

◆ mouseWheelBackward

void MLRemoteRenderingSlaveWrapper::mouseWheelBackward ( )
slot

send a backward mouse wheel movement with standard delta

◆ mouseWheelForward

void MLRemoteRenderingSlaveWrapper::mouseWheelForward ( )
slot

send a forward mouse wheel movement with standard delta

◆ resize

void MLRemoteRenderingSlaveWrapper::resize ( int x,
int y )
slot

set requested size of rendering/viewport

◆ sceneChanged

void MLRemoteRenderingSlaveWrapper::sceneChanged ( )
signal

Emitted when the scene has changed.

◆ sendEvent

void MLRemoteRenderingSlaveWrapper::sendEvent ( QEvent * event)
slot

send a low-level Qt event from slave, supported are QEvent::Enter,Leave,Wheel,Mouse*,Key* (Events can be created using PythonQt.QtCore/QtGui).

◆ sendRenderRequest

void MLRemoteRenderingSlaveWrapper::sendRenderRequest ( ImageType type)
slot

request update of the rendering

◆ setKeyboardModifiers

void MLRemoteRenderingSlaveWrapper::setKeyboardModifiers ( Qt::KeyboardModifiers modifiers)
inlineslot

Sets the keyboard modifiers to the given value.

NOTE: It is better to send the correct key press event (SHIFT, ALT, CONTROL) to the scene, this method is mainly for testing the synthetic generation of missing events.

◆ setMouseButtonState

void MLRemoteRenderingSlaveWrapper::setMouseButtonState ( Qt::MouseButtons buttons)
inlineslot

Sets the mouse button state to the given value.

NOTE: It is better to send the correct button press event to the scene, this method is mainly for testing the synthetic generation of missing events.

◆ setMousePosition

void MLRemoteRenderingSlaveWrapper::setMousePosition ( int x,
int y )
slot

sets the mouse position without sending a MouseMove event.

The given position will be used for all further events. NOTE: Please prefer the mouseMoveTo() method, this method is mainly for testing the automatic generation of MouseMove events when they are missing.

◆ setStreamingSettings

void MLRemoteRenderingSlaveWrapper::setStreamingSettings ( const QVariantMap & settings)
slot

set the streaming quality of the remote rendering

◆ sizeHint

QSize MLRemoteRenderingSlaveWrapper::sizeHint ( )
slot

get the current size hint

◆ sizeHintsChanged

void MLRemoteRenderingSlaveWrapper::sizeHintsChanged ( )
signal

Emitted when size hints have changed.

◆ startStreaming

void MLRemoteRenderingSlaveWrapper::startStreaming ( )
slot

start the streaming for the given listener

◆ stopStreaming

void MLRemoteRenderingSlaveWrapper::stopStreaming ( )
slot

stop the streaming for the given listener