Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qhaikubuffer.cpp
Go to the documentation of this file.
1// Copyright (C) 2015 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Tobias Koenig <tobias.koenig@kdab.com>
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#include "qhaikubuffer.h"
5
6#include <Bitmap.h>
7#include <Rect.h>
8
10
12 : m_buffer(nullptr)
13{
14}
15
17 : m_buffer(buffer)
18{
19 // wrap buffer in an image
20 m_image = QImage(static_cast<uchar*>(m_buffer->Bits()), m_buffer->Bounds().right, m_buffer->Bounds().bottom, m_buffer->BytesPerRow(), QImage::Format_RGB32);
21}
22
24{
25 return m_buffer;
26}
27
29{
30 return (m_buffer != nullptr) ? &m_image : nullptr;
31}
32
34{
35 return (m_buffer != nullptr) ? &m_image : nullptr;
36}
37
39{
40 return m_image.rect();
41}
42
BBitmap * nativeBuffer() const
const QImage * image() const
QRect rect() const
\inmodule QtGui
Definition qimage.h:37
@ Format_RGB32
Definition qimage.h:46
QRect rect() const
Returns the enclosing rectangle (0, 0, width(), height()) of the image.
\inmodule QtCore\reentrant
Definition qrect.h:30
Combined button and popup list for selecting options.
GLenum GLuint buffer
unsigned char uchar
Definition qtypes.h:32
QObject::connect nullptr