QPaintedTextureImage Class
(Qt3DRender::QPaintedTextureImage)A QAbstractTextureImage that can be written through a QPainter 更多...
头文件: | #include <QPaintedTextureImage> |
qmake: | QT += 3drender |
开始支持版本: | Qt 5.8 |
基类: | Qt3DRender::QAbstractTextureImage |
属性
- 3 个属性继承自 Qt3DRender::QAbstractTextureImage
- 3 个属性继承自 Qt3DCore::QNode
- 1 个属性继承自 QObject
公有函数
QPaintedTextureImage(Qt3DCore::QNode *parent = nullptr) | |
~QPaintedTextureImage() | |
int | height() const |
QSize | size() const |
void | update(const QRect &rect = QRect()) |
int | width() const |
- 3 个公有函数继承自 Qt3DRender::QAbstractTextureImage
- 11 个公有函数继承自 Qt3DCore::QNode
- 32 个公有函数继承自 QObject
公有槽函数
- 3 个公有槽函数继承自 Qt3DRender::QAbstractTextureImage
- 3 个公有槽函数继承自 Qt3DCore::QNode
- 1 个公有槽函数继承自 QObject
信号
void | heightChanged(int w) |
void | sizeChanged(QSize size) |
void | widthChanged(int w) |
- 3 个信号继承自 Qt3DRender::QAbstractTextureImage
- 4 个信号继承自 Qt3DCore::QNode
- 2 个信号继承自 QObject
受保护的函数
virtual void | paint(QPainter *painter) = 0 |
- 2 个受保护的函数继承自 Qt3DRender::QAbstractTextureImage
- 2 个受保护的函数继承自 Qt3DCore::QNode
- 9 个受保护的函数继承自 QObject
其他继承的成员
详细描述
A QAbstractTextureImage that can be written through a QPainter
A QPaintedTextureImage provides a way to specify a texture image (and thus an OpenGL texture) through a QPainter. The width and height of the texture image can be specified through the width and height or size properties.
A QPaintedTextureImage must be subclassed and the virtual paint() function implemented. Each time update() is called on the QPaintedTextureImage, the paint() function is invoked and the resulting image is uploaded.
The QPaintedTextureImage must be attached to some QAbstractTexture.
属性
height : int
This property holds the height of the texture image. The height must be greater than or equal to 1.
访问函数:
int | height() const |
void | setHeight(int h) |
Notifier signal:
void | heightChanged(int w) |
size : QSize
This property holds the size of the texture image.
访问函数:
QSize | size() const |
void | setSize(QSize size) |
Notifier signal:
void | sizeChanged(QSize size) |
width : int
This property holds the width of the texture image. The width must be greater than or equal to 1.
访问函数:
int | width() const |
void | setWidth(int w) |
Notifier signal:
void | widthChanged(int w) |
成员函数
QPaintedTextureImage::QPaintedTextureImage(Qt3DCore::QNode *parent = nullptr)
Default constructs an instance of QPaintedTextureImage.
QPaintedTextureImage::~QPaintedTextureImage()
Destroys the instance of QPaintedTextureImage.
[pure virtual protected]
void QPaintedTextureImage::paint(QPainter *painter)
[slot]
void QPaintedTextureImage::setHeight(int h)
Sets the height (h) of the texture image. Triggers an update, if the size changes.
Note: Setter function for property height.
参见 height().
[slot]
void QPaintedTextureImage::setSize(QSize size)
Sets the width and height of the texture image. Triggers an update, if the size changes.
Note: Setter function for property size.
参见 size().
[slot]
void QPaintedTextureImage::setWidth(int w)
Sets the width (w) of the texture image. Triggers an update, if the size changes.
Note: Setter function for property width.
参见 width().
void QPaintedTextureImage::update(const QRect &rect = QRect())
Schedules the painted texture's paint() function to be called, which in turn uploads the new image to the GPU. Parameter rect is currently unused.