19 #include <qapplication.h>
34 cursorStream.seekg(0, std::ios::end);
35 std::ios::pos_type length = cursorStream.tellg();
36 cursorStream.seekg(0, std::ios::beg);
38 auto data =
new char[length];
39 cursorStream.read(data, length);
41 pixmap.loadFromData(QByteArray::fromRawData(data, length));
42 QCursor cursor(pixmap, hotspotX, hotspotY);
43 QApplication::setOverrideCursor(cursor);
51 QCursor cursor(pixmap, hotspotX, hotspotY);
52 QApplication::setOverrideCursor(cursor);
57 QApplication::restoreOverrideCursor();
63 QPoint qp = QCursor::pos();
71 static bool selfCall =
false;
75 QCursor::setPos(p[0], p[1]);
static void RegisterImplementation(ApplicationCursorImplementation *implementation)
To be called by a toolkit specific ApplicationCursorImplementation.
virtual const mitk::Point2I GetCursorPosition() override
Get absolute mouse position on screen.
virtual void SetCursorPosition(const mitk::Point2I &) override
Set absolute mouse position on screen.
virtual void PopCursor() override
Restore the previous cursor.
virtual void PushCursor(const char *XPM[], int hotspotX, int hotspotY) override
Change the current application cursor.