KGuiAddons 5.109.0
|
Class to temporarily set a mouse cursor and restore the previous one on destruction. More...
#include <KCursorSaver>
Public Member Functions | |
KCursorSaver (KCursorSaver &&other) | |
Move-constructs a KCursorSaver from other. | |
KCursorSaver (Qt::CursorShape shape) | |
Creates a KCursorSaver, setting the mouse cursor to shape . | |
~KCursorSaver () | |
restore the cursor | |
KCursorSaver & | operator= (KCursorSaver &&other) |
void | restoreCursor () |
call this to explicitly restore the cursor | |
Class to temporarily set a mouse cursor and restore the previous one on destruction.
Create a KCursorSaver object when you want to set the cursor. As soon as it gets out of scope, it will restore the original cursor.
|
explicit |
Creates a KCursorSaver, setting the mouse cursor to shape
.
KCursorSaver::KCursorSaver | ( | KCursorSaver && | other | ) |
Move-constructs a KCursorSaver from other.
KCursorSaver::~KCursorSaver | ( | ) |
restore the cursor
void KCursorSaver::restoreCursor | ( | ) |
call this to explicitly restore the cursor