3 * SPDX-FileCopyrightText: 2021 Harald Sitter <[email protected]>
48 static KIdleTime *instance();
53 ~KIdleTime() override;
70 QHash<int, int> idleTimeouts() const;
74 * method, the idle time of the system will become 0 and eventually \link resumingFromIdle \endlink
81 public Q_SLOTS:
84 * \c msec milliseconds, the signal \c timeoutReached will be triggered. Please note that until you will
91 * @returns an unique identifier for the timeout being added, that will be streamed by timeoutReached
116 * @param identifier the token returned from addIdleTimeout of the timeout you want to stop listening to
121 * Stops catching every set timeout (if any). This means that after calling this method, the signal
130 * Catches the next resume from idle event. This means that whenever user activity will be registered, or
131 * \link simulateUserActivity \endlink is called, the signal \link resumingFromIdle \endlink will be triggered.
133 * Please note that this method will trigger the signal just for the very first resume event after the call:
134 * this means you explicitly have to request to track every single resume event you are interested in.
136 * @note This behavior is due to the fact that a resume event happens whenever the user sends an input to the
137 * system. This would lead to a massive amount of signals being delivered when the PC is being used.
138 * Moreover, you are usually interested in catching just significant resume events, such as the ones after
139 * a significant period of inactivity. For tracking user input, you can use the more efficient methods provided
149 * Stops listening for resume event. This function serves for canceling \c catchNextResumeEvent, as it
150 * will have effect just when \c catchNextResumeEvent has been called and \c resumingFromIdle not
161 * Triggered, if KIdleTime is catching resume events, when the system resumes from an idle state. This means
162 * that either \link simulateUserActivity \endlink was called or the user sent an input to the system.
173 * This signal is triggered whenever each timeout previously registered with \link addIdleTimeout \endlink