Krita Source Code Documentation
Loading...
Searching...
No Matches
KisScreenInformationAdapter.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
7#ifndef KISSCREENINFORMATIONADAPTER_H
8#define KISSCREENINFORMATIONADAPTER_H
9
10#include "kritaui_export.h"
11#include <QScopedPointer>
13
14class QScreen;
15class QOpenGLContext;
16
17class KRITAUI_EXPORT KisScreenInformationAdapter
18{
19public:
20 struct ScreenInfo {
21 QScreen *screen = 0;
22 int bitsPerColor = 0;
24 qreal redPrimary[2] = {0, 0};
25 qreal greenPrimary[2] = {0, 0};
26 qreal bluePrimary[2] = {0, 0};
27 qreal whitePoint[2] = {0, 0};
28 qreal minLuminance = 0;
29 qreal maxLuminance = 0;
30 qreal maxFullFrameLuminance = 0;
31
32 bool isValid() const {
33 return screen;
34 }
35 };
36
37public:
38 KisScreenInformationAdapter(QOpenGLContext *context);
40
41 bool isValid() const;
42 QString errorString() const;
43
44 ScreenInfo infoForScreen(QScreen *screen) const;
45
46
47private:
48 struct Private;
49 const QScopedPointer<Private> m_d;
50};
51
53
54#endif // KISSCREENINFORMATIONADAPTER_H
QDebug operator<<(QDebug, const KisScreenInformationAdapter::ScreenInfo &)
const QScopedPointer< Private > m_d