kwin/plugins/colord-integration/colordintegration.h
Vlad Zahorodnii 83003f0ccc Re-initialize colord integration when colord daemon is restarted
We need to re-create all colord devices in case colord daemon is reloaded.
2020-11-26 20:28:08 +00:00

40 lines
727 B
C++

/*
SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include "colordinterface.h"
#include "plugin.h"
#include <QHash>
#include <QObject>
namespace KWin
{
class AbstractOutput;
class ColordDevice;
class KWIN_EXPORT ColordIntegration : public Plugin
{
Q_OBJECT
public:
explicit ColordIntegration(QObject *parent = nullptr);
private Q_SLOTS:
void handleOutputAdded(AbstractOutput *output);
void handleOutputRemoved(AbstractOutput *output);
private:
void initialize();
void teardown();
QHash<AbstractOutput *, ColordDevice *> m_outputToDevice;
CdInterface *m_colordInterface;
};
} // namespace KWin