KCursorSaver

Search for usage in LXR

KCursorSaver Class Reference

#include <KCursorSaver>

Public Member Functions

 KCursorSaver (KCursorSaver &&other)
 
 KCursorSaver (Qt::CursorShape shape)
 
 ~KCursorSaver ()
 
KCursorSaveroperator= (KCursorSaver &&other)
 
void restoreCursor ()
 

Detailed Description

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.

... long-running operation here ...
Class to temporarily set a mouse cursor and restore the previous one on destruction.
WaitCursor
Since
5.73

Definition at line 29 of file kcursorsaver.h.

Constructor & Destructor Documentation

◆ KCursorSaver() [1/2]

KCursorSaver::KCursorSaver ( Qt::CursorShape shape)
explicit

Creates a KCursorSaver, setting the mouse cursor to shape.

Definition at line 17 of file kcursorsaver.cpp.

◆ KCursorSaver() [2/2]

KCursorSaver::KCursorSaver ( KCursorSaver && other)

Move-constructs a KCursorSaver from other.

Definition at line 24 of file kcursorsaver.cpp.

◆ ~KCursorSaver()

KCursorSaver::~KCursorSaver ( )

restore the cursor

Definition at line 30 of file kcursorsaver.cpp.

Member Function Documentation

◆ operator=()

KCursorSaver & KCursorSaver::operator= ( KCursorSaver && other)

Definition at line 48 of file kcursorsaver.cpp.

◆ restoreCursor()

void KCursorSaver::restoreCursor ( )

call this to explicitly restore the cursor

Definition at line 38 of file kcursorsaver.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 20 2024 11:52:29 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.