File indexing completed on 2024-04-28 04:21:25
0001 /* SPDX-FileCopyrightText: 2003-2010 Jesper K. Pedersen <blackie@kde.org> 0002 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 0006 #include "ShowBusyCursor.h" 0007 0008 #include <qapplication.h> 0009 #include <qcursor.h> 0010 0011 Utilities::ShowBusyCursor::ShowBusyCursor(Qt::CursorShape shape) 0012 { 0013 qApp->setOverrideCursor(QCursor(shape)); 0014 m_active = true; 0015 } 0016 0017 Utilities::ShowBusyCursor::~ShowBusyCursor() 0018 { 0019 stop(); 0020 } 0021 0022 void Utilities::ShowBusyCursor::stop() 0023 { 0024 if (m_active) { 0025 qApp->restoreOverrideCursor(); 0026 m_active = false; 0027 } 0028 } 0029 // vi:expandtab:tabstop=4 shiftwidth=4: