13#include <qpa/qplatformnativeinterface.h>
54 return !it.second->m_imageDescription->info.isReady();
68 for (QScreen *screen : qApp->screens()) {
77 auto waylandScreen = screen->nativeInterface<QNativeInterface::QWaylandScreen>();
81 if (!waylandScreen)
return;
83 ::wl_output *output = waylandScreen->output();
84 ::wp_color_management_output_v1 *cmoutput =
m_waylandManager->get_output(output);
87 auto outputObject = std::make_unique<KisWaylandAPIOutput>(cmoutput);
89 auto desc = outputPtr->m_imageDescription->info.m_data;
90 Q_EMIT sigOutputDescriptionChanged(screen, desc.toSurfaceDescription());
92 setReadyImpl(checkIfAllReady());
130 const auto &info = it->second->m_imageDescription->info;
132 if (!info.isReady()) {
136 return info.m_data.toSurfaceDescription();
139#include <moc_KisWaylandOutputColorInfo.cpp>
float value(const T *src, size_t ch)
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
void sigReadyChanged(bool isReady)
void sigReadyChanged(bool value)
void outputImageDescriptionChanged()
void setReadyImpl(bool value)
bool checkIfAllReady() const
std::unordered_map< const QScreen *, std::unique_ptr< KisWaylandAPIOutput > > m_waylandOutputs
std::optional< KisSurfaceColorimetry::SurfaceDescription > outputDescription(const QScreen *screen) const override
std::shared_ptr< KisWaylandAPIColorManager > m_waylandManager
KisWaylandOutputColorInfo(QObject *parent=nullptr)
void initScreenConnection(QScreen *screen)
void slotScreenAdded(QScreen *screen)
bool isReady() const override
void slotScreenRemoved(QScreen *screen)
~KisWaylandOutputColorInfo() override
static std::shared_ptr< KisWaylandAPIColorManager > getOrCreateGlobalWaylandManager()