KInhibitionJobTracker Class
Block standby mode while a job is running. This class was introduced in Qt 6.18. More...
- Header:
#include <KInhibitionJobTracker> - Since: Qt 6.18
- CMake:
find_package(KF6 REQUIRED COMPONENTS JobWidgets)
target_link_libraries(mytarget PRIVATE KF6::JobWidgets) - Inherits: KJobTrackerInterface
List of all members, including inherited members
Public Functions
- KInhibitionJobTracker(QObject *parent = nullptr)
- ~KInhibitionJobTracker()
- void registerJob(KJob *job)
- void unregisterJob(KJob *job)
Detailed Description
This job tracker will prevent the system from going into standby mode while a given job is running. This can be used to guard potentially lengthy operations, such as copying files, encoding videos, extracting archives, etc.
When the job is started, a power management inhibition is posted after a short delay. When the job is paused, the inhibition is lifted until the job is resumed again.
Member Function Documentation
[explicit] KInhibitionJobTracker::KInhibitionJobTracker(QObject *parent = nullptr)
Creates a new KInhibitionJobTracker
parent the parent object
[override virtual noexcept] KInhibitionJobTracker::~KInhibitionJobTracker()
Creates a new KJobTrackerInterface
parent the parent object
[override virtual] void KInhibitionJobTracker::registerJob(KJob *job)
Reimplements: KJobTrackerInterface::registerJob(KJob *job).
Register a new job in this tracker.
job the job to register
[override virtual] void KInhibitionJobTracker::unregisterJob(KJob *job)
Reimplements: KJobTrackerInterface::unregisterJob(KJob *job).
Unregister a job from this tracker.
job the job to unregister