QCCustomBrush Class
QCCustomBrush is a brush with custom shaders. More...
| Header: | #include <QCCustomBrush> |
| Inherits: | QCBrush |
Public Functions
| QCCustomBrush() | |
| QCCustomBrush(const QString &fragmentShader, const QString &vertexShader) | |
| ~QCCustomBrush() | |
| void | setData1(const QVector4D &data) |
| void | setData2(const QVector4D &data) |
| void | setData3(const QVector4D &data) |
| void | setData4(const QVector4D &data) |
| void | setFragmentShader(const QString &fragmentShader) |
| void | setTimeRunning(bool running) |
| void | setVertexShader(const QString &vertexShader) |
| bool | timeRunning() const |
| QVariant | operator QVariant() const |
| bool | operator!=(const QCCustomBrush &brush) const |
| bool | operator==(const QCCustomBrush &brush) const |
Member Function Documentation
QCCustomBrush::QCCustomBrush()
Constructs a default custom brush.
QCCustomBrush::QCCustomBrush(const QString &fragmentShader, const QString &vertexShader)
Constructs a custom brush. The fragment shader is fragmentShader and vertex shader is vertexShader.
[noexcept] QCCustomBrush::~QCCustomBrush()
Destroys the custom brush.
void QCCustomBrush::setData1(const QVector4D &data)
Sets the uniform data1 value to data. This allows setting custom data into shaders.
void QCCustomBrush::setData2(const QVector4D &data)
Sets the uniform data2 value to data. This allows setting custom data into shaders.
void QCCustomBrush::setData3(const QVector4D &data)
Sets the uniform data3 value to data. This allows setting custom data into shaders.
void QCCustomBrush::setData4(const QVector4D &data)
Sets the uniform data4 value to data. This allows setting custom data into shaders.
void QCCustomBrush::setFragmentShader(const QString &fragmentShader)
Sets the custom brush to use fragmentShader. This must be path to a valid qsb file.
void QCCustomBrush::setTimeRunning(bool running)
Sets the time running state to running. When this is true, the shader uniform iTime value is animated to get the current animation running time. The default value is false.
See also timeRunning().
void QCCustomBrush::setVertexShader(const QString &vertexShader)
Sets the custom brush to use vertexShader. This must be path to a valid qsb file.
bool QCCustomBrush::timeRunning() const
Returns true if the time is running.
See also setTimeRunning().
QVariant QCCustomBrush::operator QVariant() const
Returns the custom brush as a QVariant.
bool QCCustomBrush::operator!=(const QCCustomBrush &brush) const
Returns true if the custom brush is different from the given brush; otherwise false.
See also operator==().
bool QCCustomBrush::operator==(const QCCustomBrush &brush) const
Returns true if the custom brush is equal to the given brush; otherwise false.
See also operator!=().
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.