MeVisLab Scripting Reference
MLRemoteRenderingSlaveWrapper Class Reference

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

Enters 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

Leaves the viewport area (sends leave event).

◆ maximumSize

QSize MLRemoteRenderingSlaveWrapper::maximumSize ( )
slot

Returns the current maximum size.

◆ minimumSize

QSize MLRemoteRenderingSlaveWrapper::minimumSize ( )
slot

Returns the current minimum size.

◆ mouseClick [1/2]

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

Clicks the given mouse button at the given position.

◆ mouseClick [2/2]

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

Clicks the given mouse button at the last moveTo position.

◆ mouseDoubleClick [1/2]

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

Double-clicks 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-clicks 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

Sends 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

Sends 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

Moves the mouse to the given position.

◆ mousePress [1/2]

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

Presses the given mouse button at the given position.

◆ mousePress [2/2]

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

Presses the given mouse button at the last move to position.

◆ mouseRelease [1/2]

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

Releases the given mouse button at the given position.

◆ mouseRelease [2/2]

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

Releases the given mouse button at the last moveTo position.

◆ mouseWheel [1/2]

void MLRemoteRenderingSlaveWrapper::mouseWheel ( int  delta)
slot

Sends a mouse wheel movement; a delta of -120 and 120 is typical for normal resolution wheels.

◆ mouseWheel [2/2]

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

Sends a mouse wheel movement; a delta of -120 and 120 is typical for normal resolution wheels.

◆ mouseWheelBackward

void MLRemoteRenderingSlaveWrapper::mouseWheelBackward ( )
slot

Sends a backward mouse wheel movement with standard delta.

◆ mouseWheelForward

void MLRemoteRenderingSlaveWrapper::mouseWheelForward ( )
slot

Sends a forward mouse wheel movement with standard delta.

◆ resize

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

Sets the requested size of rendering/viewport.

◆ sceneChanged

void MLRemoteRenderingSlaveWrapper::sceneChanged ( )
signal

Emitted when the scene has changed.

◆ sendEvent

void MLRemoteRenderingSlaveWrapper::sendEvent ( QEvent *  event)
slot

Sends 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

Requests an 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

Sets the streaming quality of the remote rendering.

◆ sizeHint

QSize MLRemoteRenderingSlaveWrapper::sizeHint ( )
slot

Returns the current size hint.

◆ sizeHintsChanged

void MLRemoteRenderingSlaveWrapper::sizeHintsChanged ( )
signal

Emitted when size hints have changed.

◆ startStreaming

void MLRemoteRenderingSlaveWrapper::startStreaming ( )
slot

Starts the streaming for the given listener.

◆ stopStreaming

void MLRemoteRenderingSlaveWrapper::stopStreaming ( )
slot

Stops the streaming for the given listener.