Krita Source Code Documentation
Loading...
Searching...
No Matches
KisBusyWaitBroker.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2020 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6#ifndef KISBUSYWAITBROKER_H
7#define KISBUSYWAITBROKER_H
8
9#include <kis_types.h>
10#include "kritaimage_export.h"
11
20class KRITAIMAGE_EXPORT KisBusyWaitBroker
21{
22public:
25
27
28 void notifyWaitOnImageStarted(KisImage *image);
29 void notifyWaitOnImageEnded(KisImage *image);
30
31 void notifyGeneralWaitStarted();
32 void notifyGeneralWaitEnded();
33
41 void setFeedbackCallback(std::function<void(KisImageSP)> callback);
42
48 bool guiThreadIsWaitingForBetterWeather() const;
49
50private:
51
52private:
54
55 struct Private;
56 QScopedPointer<Private> m_d;
57};
58
59#endif // KISBUSYWAITBROKER_H
PythonPluginManager * instance
a simple singleton class for tracking busy-waits on the image and breaking deadlock ties when needed.
QScopedPointer< Private > m_d
Q_DISABLE_COPY(KisBusyWaitBroker)