aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/componentcore/hdrimage.h
blob: 7d254dadc9295233bc805a5b3f5295cf332a2de5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once

#include <qmldesignercorelib_global.h>

#include <QImage>
#include <QPixmap>
#include <QString>

namespace QmlDesigner {

class QMLDESIGNERCORE_EXPORT HdrImage
{
public:
    HdrImage(const QString &fileName);

    QString fileName() const { return m_fileName; }
    const QImage &image() const { return m_image; }
    QPixmap toPixmap() const;

private:
    void loadHdr();

    QImage m_image;
    QString m_fileName;
    QByteArray m_buf;
};

} // namespace QmlDesigner