Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_idle_watcher.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2015 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef __KIS_IDLE_WATCHER_H
8#define __KIS_IDLE_WATCHER_H
9
10#include "kritaimage_export.h"
11
12#include <QScopedPointer>
13#include <QObject>
14
15#include "kis_types.h"
16
17
18class KRITAIMAGE_EXPORT KisIdleWatcher : public QObject
19{
20 Q_OBJECT
21public:
22 KisIdleWatcher(int delay = 200, QObject* parent = 0);
23 ~KisIdleWatcher() override;
24
25 bool isIdle() const;
26 bool isCounting() const;
27
28 void setTrackedImages(const QVector<KisImageSP> &images);
29 void setTrackedImage(KisImageSP image);
30
31 //Force to image modified state and start countdown to event
32 void forceImageModified() { slotImageModified(); }
33 void restartCountdown();
34 void triggerCountdownNoDelay();
35
36Q_SIGNALS:
39
40private Q_SLOTS:
41 void slotImageModified();
42 void slotIdleCheckTick();
43
44 void startIdleCheck();
45 void stopIdleCheck();
46
47private:
48 struct Private;
49 const QScopedPointer<Private> m_d;
50};
51
52#endif /* __KIS_IDLE_WATCHER_H */
void imageModified()
const QScopedPointer< Private > m_d
void startedIdleMode()