Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_cursor_override_hijacker.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2016 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef __KIS_CURSOR_OVERRIDE_HIJACKER_H
8#define __KIS_CURSOR_OVERRIDE_HIJACKER_H
9
10#include <QCursor>
11#include <QStack>
12#include <QApplication>
13
14
22{
23public:
25 while (qApp->overrideCursor()) {
26 m_cursorStack.push(*qApp->overrideCursor());
27 qApp->restoreOverrideCursor();
28 }
29 }
30
32 while (!m_cursorStack.isEmpty()) {
33 qApp->setOverrideCursor(m_cursorStack.pop());
34 }
35 }
36
37private:
39};
40
41#endif /* __KIS_CURSOR_OVERRIDE_HIJACKER_H */
The KisCursorOverrideHijacker class stores all override cursors in a stack, and resets them back afte...