My Project
Loading...
Searching...
No Matches
MirMousePointerInterface Class Referenceabstract

The QML mouse pointer. More...

#include <unity/shell/application/MirMousePointerInterface.h>

Inheritance diagram for MirMousePointerInterface:
Collaboration diagram for MirMousePointerInterface:

Public Slots

virtual void handleMouseEvent (ulong timestamp, QPointF movement, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)=0
 Handler for Mir mouse events The implementation should respond to Mir mouse events by moving itself along its parent area. This is called by Mir's platform cursor. More...
 
virtual void handleWheelEvent (ulong timestamp, QPoint angleDelta, Qt::KeyboardModifiers modifiers)=0
 Handler for Mir mouse wheel events This is called by Mir's platform cursor.
 

Public Member Functions

 MirMousePointerInterface (QQuickItem *parent=nullptr)
 The constructor.
 
virtual void setCustomCursor (const QCursor &)=0
 Sets the custom cursor. More...
 

Properties

QString cursorName
 Name of the cursor Defines the look of the mouse pointer along with themeName.
 
QString themeName
 Name of the cursor theme Defines the look of the mouse pointer along with cursorName Its default value is "default".
 

Detailed Description

The QML mouse pointer.

FIXME: Get this out of unity-api

This QML item drives the position of the Mir mouse pointer on the scene

Member Function Documentation

◆ handleMouseEvent

virtual void MirMousePointerInterface::handleMouseEvent ( ulong  timestamp,
QPointF  movement,
Qt::MouseButtons  buttons,
Qt::KeyboardModifiers  modifiers 
)
pure virtualslot

Handler for Mir mouse events The implementation should respond to Mir mouse events by moving itself along its parent area. This is called by Mir's platform cursor.

Note that we get only relative mouse movement, since the mouse pointer position is defined by this very item. Ie., it's up to this class to decide whether or not it (the mouse pointer) should move (and how much) due to movement in a mouse device.

Parameters
movementMovement vector

◆ setCustomCursor()

virtual void MirMousePointerInterface::setCustomCursor ( const QCursor &  )
pure virtual

Sets the custom cursor.

If it's not a pixmap cursor it will be ignored.

To use it, cursorName must be set to "custom". themeName is ignored in this case.


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