Krita Source Code Documentation
Loading...
Searching...
No Matches
KisColord.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2012 Daniel Nicoletti <dantti12@gmail.com>
3 * SPDX-FileCopyrightText: 2015 Boudewijn Rempt <boud@valdyas.org>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7
8#ifndef KIS_COLORD_H
9#define KIS_COLORD_H
10
11#include "dbus-types.h"
12
13#include <QDBusObjectPath>
14#include <QDBusServiceWatcher>
15#include <QDBusPendingCallWatcher>
16
17#include <QMap>
18#include <QString>
19
20#include <QMetaType>
21
22
23#define CD_PROFILE_METADATA_DATA_SOURCE_EDID "edid"
24#define CD_PROFILE_METADATA_DATA_SOURCE_CALIB "calib"
25#define CD_PROFILE_METADATA_DATA_SOURCE_STANDARD "standard"
26#define CD_PROFILE_METADATA_DATA_SOURCE_TEST "test"
27
28class CdInterface;
29struct Device;
30
31
32#include "kritacolord_export.h"
33
34class KRITACOLORD_EXPORT KisColord : public QObject
35{
36 Q_OBJECT
37public:
38 KisColord(QObject *parent = 0);
39 ~KisColord() override;
40
41 QStringList devices(const QString &type) const;
42 const QString deviceName(const QString &id) const;
43 QByteArray deviceProfile(const QString &id, int profile);
44
45Q_SIGNALS:
46 void changed();
47 void changed(const QString& device);
48
49
50private Q_SLOTS:
51
52 void serviceOwnerChanged(const QString &serviceName, const QString &oldOwner, const QString &newOwner);
53
54 void gotDevices(QDBusPendingCallWatcher *call);
55 void deviceChanged(const QDBusObjectPath &objectPath);
56 void deviceAdded(const QDBusObjectPath &objectPath, bool emitChanged = true);
57 void deviceRemoved(const QDBusObjectPath &objectPath);
58
59private:
60
61 void addProfilesToDevice(Device *dev, QList<QDBusObjectPath> profiles) const;
62
63 QMap<QDBusObjectPath, Device*> m_devices;
64
65 CdInterface *m_cdInterface;
66};
67
68#endif // COLORD_KCM_H
CdInterface * m_cdInterface
Definition KisColord.h:65
void changed()
QMap< QDBusObjectPath, Device * > m_devices
Definition KisColord.h:63
void changed(const QString &device)