Changeset View
Changeset View
Standalone View
Standalone View
libs/global/kis_signal_compressor.h
Context not available. | |||||
19 | #ifndef __KIS_SIGNAL_COMPRESSOR_H | 19 | #ifndef __KIS_SIGNAL_COMPRESSOR_H | ||
---|---|---|---|---|---|
20 | #define __KIS_SIGNAL_COMPRESSOR_H | 20 | #define __KIS_SIGNAL_COMPRESSOR_H | ||
21 | 21 | | |||
22 | #include <QTimer> | 22 | #include <QObject> | ||
23 | #include "kritaglobal_export.h" | 23 | #include "kritaglobal_export.h" | ||
24 | 24 | | |||
25 | class QTimer; | 25 | class KisRelaxedTimer; | ||
26 | 26 | | |||
27 | /** | 27 | /** | ||
28 | * Sets a timer to delay or throttle activation of a Qt slot. One example of | 28 | * Sets a timer to delay or throttle activation of a Qt slot. One example of | ||
Context not available. | |||||
51 | * delay ms. The compressor becomes inactive and all events are ignored until | 51 | * delay ms. The compressor becomes inactive and all events are ignored until | ||
52 | * the timer has elapsed. | 52 | * the timer has elapsed. | ||
53 | * | 53 | * | ||
54 | * The current implementation allows the timeout() to be delayed by up to 2 times | ||||
55 | * \p delay in certain situations (for details see cpp file). | ||||
54 | */ | 56 | */ | ||
55 | class KRITAGLOBAL_EXPORT KisSignalCompressor : public QObject | 57 | class KRITAGLOBAL_EXPORT KisSignalCompressor : public QObject | ||
56 | { | 58 | { | ||
Context not available. | |||||
83 | void timeout(); | 85 | void timeout(); | ||
84 | 86 | | |||
85 | private: | 87 | private: | ||
86 | QTimer *m_timer; | 88 | KisRelaxedTimer *m_timer; | ||
87 | Mode m_mode; | 89 | Mode m_mode; | ||
88 | bool m_gotSignals; | 90 | bool m_gotSignals; | ||
89 | }; | 91 | }; | ||
Context not available. |