|
Krita Source Code Documentation
|
#include <KisOutputColorInfoInterface.h>
Inheritance diagram for KisOutputColorInfoInterface:Signals | |
| void | sigOutputDescriptionChanged (QScreen *screen, const KisSurfaceColorimetry::SurfaceDescription &desc) |
| void | sigReadyChanged (bool isReady) |
Public Member Functions | |
| virtual bool | isReady () const =0 |
| KisOutputColorInfoInterface (QObject *parent=nullptr) | |
| virtual std::optional< KisSurfaceColorimetry::SurfaceDescription > | outputDescription (const QScreen *screen) const =0 |
| virtual | ~KisOutputColorInfoInterface () |
Protected Attributes | |
| QWindow * | m_window |
A basic interface for fetching colorimetry information from a QScreen object.
Due to complications of some protocols (i.e. Wayland), the construction and initialization of the object may be not straight forward and may include several steps:
1) Initially, when KisOutputColorInfoInterface is created, it is created in a "not ready" state. isReady() will return false and outputDescription() for any screen may (or may not) return std::nullopt.
2) Then the screens will asynchronously initialize. The interface will emit sigOutputDescriptionChanged() for each known interfrace.
3) When all known screens are initialized (and all sigOutputDescriptionChanged() signals are emitted), the interface emits sigReadyChanged() with argument set to true. At this point outputDescription() will return a correct description for every known screen.
When the connection to the compositor is lost, the interface first emits sigReadyChanged() with argument set to false, and restarts the initialization process.
Definition at line 43 of file KisOutputColorInfoInterface.h.
| KisOutputColorInfoInterface::KisOutputColorInfoInterface | ( | QObject * | parent = nullptr | ) |
Definition at line 9 of file KisOutputColorInfoInterface.cpp.
|
virtual |
Definition at line 14 of file KisOutputColorInfoInterface.cpp.
|
pure virtual |
Implemented in KisWaylandOutputColorInfo.
|
pure virtual |
When isReady() is set to false may or may not return std::nullopt, wait for sigReadyChanged() to make sure all screens are initialized.
Implemented in KisWaylandOutputColorInfo.
|
signal |
Emits when a screen has changed its color description, e.g. when the user assigned a new color profile to this screen in the compositor
Please note that during the initialization process this signal is emitted for every screen before sigReadyChanged(true).
|
signal |
Emits when the interface transitions between ready and non-ready states.
The interface becomes ready when the connection to the compositor is established and information about all screens is fetched.
The interface may become non-ready at any moment of time when the connection to the compositor is lost. You should wait for sigReadyChanged(true) in such a case.
|
protected |
Definition at line 87 of file KisOutputColorInfoInterface.h.