6#include <QtCore/QByteArrayView>
11#define EDID_DESCRIPTOR_ALPHANUMERIC_STRING 0xfe
12#define EDID_DESCRIPTOR_PRODUCT_NAME 0xfc
13#define EDID_DESCRIPTOR_SERIAL_NUMBER 0xff
15#define EDID_DATA_BLOCK_COUNT 4
16#define EDID_OFFSET_DATA_BLOCKS 0x36
17#define EDID_OFFSET_LAST_BLOCK 0x6c
18#define EDID_OFFSET_PNP_ID 0x08
19#define EDID_OFFSET_SERIAL 0x0c
20#define EDID_PHYSICAL_WIDTH 0x15
21#define EDID_OFFSET_PHYSICAL_HEIGHT 0x16
22#define EDID_TRANSFER_FUNCTION 0x17
23#define EDID_FEATURE_SUPPORT 0x18
24#define EDID_CHROMATICITIES_BLOCK 0x19
41 constexpr int MaxLineSize = 512;
42 char buf[MaxLineSize];
80 if (
data[0] != 0x00 ||
data[1] != 0xff)
127 const auto compareVendorId = [](
const VendorTable &vendor,
const char *
str)
129 return strncmp(vendor.
id,
str, 3) < 0;
134 auto it = std::lower_bound(
b,
139 if (
it !=
e && strncmp(
it->id, pnpId, 3) == 0)
152 if (igamma != 0xff) {
153 gamma = 1.0 + (igamma / 100.0f);
191 if (extensionId == 0x40) {
197 if ((
desc & 0xc0) == 0x40) {
203 whiteTRC[
j] =
data[0x52 +
j] * 0x101;
204 whiteTRC[
len] = 0xffff;
206 }
else if ((
desc & 0xc0) == 0x80) {
216 blueTRC[
j] =
data[0x52 +
j] * 0x101;
217 blueTRC[
len] = 0xffff;
219 greenTRC[
j] =
data[0x61 +
j] * 0x101;
220 greenTRC[
len] = 0xffff;
222 redTRC[
j] =
data[0x70 +
j] * 0x101;
223 redTRC[
len] = 0xffff;
238 for (
int i = 0;
i <
buffer.size(); ++
i) {
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
QList< QList< uint16_t > > tables
QPointF whiteChromaticity
QPointF greenChromaticity
bool parse(const QByteArray &blob)
bool atEnd() const override
Returns true if the end of the file has been reached; otherwise returns false.
bool open(OpenMode flags) override
Opens the file using OpenMode mode, returning true if successful; otherwise false.
qint64 readLine(char *data, qint64 maxlen)
This function reads a line of ASCII characters from the device, up to a maximum of maxSize - 1 bytes,...
void reserve(qsizetype size)
void append(parameter_type t)
constexpr void setY(qreal y) noexcept
Sets the y coordinate of this point to the given finite y coordinate.
constexpr void setX(qreal x) noexcept
Sets the x coordinate of this point to the given finite x coordinate.
\macro QT_RESTRICTED_CAST_FROM_ASCII
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
qsizetype size() const
Returns the number of characters in this string.
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString first(qsizetype n) const
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
static QString number(int, int base=10)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString sliced(qsizetype pos) const
static QString static QString qsizetype indexOf(QChar c, qsizetype from=0, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
QSet< QString >::iterator it
Combined button and popup list for selecting options.
#define EDID_DESCRIPTOR_SERIAL_NUMBER
#define EDID_FEATURE_SUPPORT
#define EDID_CHROMATICITIES_BLOCK
#define EDID_TRANSFER_FUNCTION
static QString lookupVendorIdInSystemDatabase(QByteArrayView id)
#define EDID_OFFSET_SERIAL
#define EDID_DESCRIPTOR_ALPHANUMERIC_STRING
#define EDID_OFFSET_PNP_ID
#define EDID_OFFSET_PHYSICAL_HEIGHT
#define EDID_DESCRIPTOR_PRODUCT_NAME
#define EDID_PHYSICAL_WIDTH
#define EDID_DATA_BLOCK_COUNT
#define EDID_OFFSET_DATA_BLOCKS
static const VendorTable q_edidVendorTable[]
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei length
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
ReturnedValue read(const char *data)