File indexing completed on 2024-04-21 16:17:34

0001 /*
0002  *   SPDX-FileCopyrightText: 2012 Daniel Nicoletti <dantti12@gmail.com>
0003  *   SPDX-FileCopyrightText: 2012, 2013 Daniel Vrátil <dvratil@redhat.com>
0004  *
0005  *  SPDX-License-Identifier: LGPL-2.1-or-later
0006  */
0007 
0008 #ifndef KSCREEN_EDID_H
0009 #define KSCREEN_EDID_H
0010 
0011 #include "kscreen_export.h"
0012 
0013 #include <QObject>
0014 #include <QQuaternion>
0015 #include <QtGlobal>
0016 
0017 namespace KScreen
0018 {
0019 class KSCREEN_EXPORT Edid : public QObject
0020 {
0021     Q_OBJECT
0022 
0023     Q_PROPERTY(QString deviceId READ deviceId CONSTANT)
0024     Q_PROPERTY(QString name READ name CONSTANT)
0025     Q_PROPERTY(QString vendor READ vendor CONSTANT)
0026     Q_PROPERTY(QString serial READ serial CONSTANT)
0027     Q_PROPERTY(QString eisaId READ eisaId CONSTANT)
0028     Q_PROPERTY(QString hash READ hash CONSTANT)
0029     Q_PROPERTY(uint width READ width CONSTANT)
0030     Q_PROPERTY(uint height READ height CONSTANT)
0031     Q_PROPERTY(qreal gamma READ gamma CONSTANT)
0032     Q_PROPERTY(QQuaternion red READ red CONSTANT)
0033     Q_PROPERTY(QQuaternion green READ green CONSTANT)
0034     Q_PROPERTY(QQuaternion blue READ blue CONSTANT)
0035     Q_PROPERTY(QQuaternion white READ white CONSTANT)
0036 
0037 public:
0038     explicit Edid();
0039     explicit Edid(const QByteArray &data, QObject *parent = nullptr);
0040     ~Edid() override;
0041 
0042     Q_REQUIRED_RESULT Edid *clone() const;
0043 
0044     bool isValid() const;
0045 
0046     QString deviceId(const QString &fallbackName = QString()) const;
0047     QString name() const;
0048     QString vendor() const;
0049     QString serial() const;
0050     QString eisaId() const;
0051     QString hash() const;
0052     QString pnpId() const;
0053     uint width() const;
0054     uint height() const;
0055     qreal gamma() const;
0056     QQuaternion red() const;
0057     QQuaternion green() const;
0058     QQuaternion blue() const;
0059     QQuaternion white() const;
0060 
0061 private:
0062     Q_DISABLE_COPY(Edid)
0063 
0064     class Private;
0065     Private *const d;
0066 
0067     explicit Edid(Private *dd);
0068 };
0069 
0070 }
0071 
0072 Q_DECLARE_METATYPE(KScreen::Edid *)
0073 
0074 #endif // EDID_H