![]() |
Qt 6.x
The Qt SDK
|
#include <qquick3dtexturedatafrontend_p.h>
Signals | |
void | formatChanged () |
void | depthChanged () |
void | hasTransparencyChanged () |
void | textureDataChanged () |
void | widthChanged () |
void | heightChanged () |
![]() | |
void | textureDataNodeDirty () |
![]() | |
void | parentChanged () |
void | childrenChanged () |
void | stateChanged () |
![]() | |
void | destroyed (QObject *=nullptr) |
This signal is emitted immediately before the object obj is destroyed, after any instances of QPointer have been notified, and cannot be blocked. | |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
This signal is emitted after the object's name has been changed. | |
Public Member Functions | |
QQuick3DTextureDataFrontend () | |
\qmlproperty int ProceduralTextureData::width | |
QQuick3DTextureData::Format | format () const |
void | setFormat (const QQuick3DTextureData::Format &newFormat) |
int | depth () const |
void | setDepth (int newDepth) |
bool | hasTransparency () const |
void | setHasTransparency (bool newHasTransparency) |
QByteArray | textureData () const |
void | setTextureData (const QByteArray &newTextureData) |
int | width () const |
void | setWidth (int newWidth) |
int | height () const |
void | setHeight (int newHeight) |
![]() | |
QQuick3DTextureData (QQuick3DObject *parent=nullptr) | |
~QQuick3DTextureData () | |
const QByteArray | textureData () const |
Returns the current texture data defined by this item. | |
void | setTextureData (const QByteArray &data) |
Sets the texture data. | |
QSize | size () const |
Returns the size of the texture data in pixels. | |
void | setSize (const QSize &size) |
Sets the size of the texture data in pixels. | |
int | depth () const |
Returns the depth of the texture data in pixels. | |
void | setDepth (int depth) |
Sets the depth of the texture data in pixels. | |
Format | format () const |
Returns the format of the texture data. | |
void | setFormat (Format format) |
Sets the format of the texture data. | |
bool | hasTransparency () const |
Returns true if the texture data has transparency. | |
void | setHasTransparency (bool hasTransparency) |
Set hasTransparency to true if the texture data has an active alpha channel with non-opaque values. | |
![]() | |
Q_INVOKABLE | QObject (QObject *parent=nullptr) |
Constructs an object with parent object parent. | |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. | |
virtual bool | event (QEvent *event) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. | |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
Filters events if this object has been installed as an event filter for the watched object. | |
QString | objectName () const |
Q_WEAK_OVERLOAD void | setObjectName (const QString &name) |
Sets the object's name to name. | |
void | setObjectName (QAnyStringView name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
QBindable< QString > | bindableObjectName () |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false . | |
bool | isWindowType () const |
Returns true if the object is a window; otherwise returns false . | |
bool | isQuickItemType () const |
Returns true if the object is a QQuickItem; otherwise returns false . | |
bool | signalsBlocked () const noexcept |
Returns true if signals are blocked; otherwise returns false . | |
bool | blockSignals (bool b) noexcept |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). | |
QThread * | thread () const |
Returns the thread in which the object lives. | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. | |
int | startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer) |
This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds. | |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
void | killTimer (int id) |
Kills the timer with timer identifier, id. | |
template<typename T > | |
T | findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object. | |
template<typename T > | |
QList< T > | findChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. | |
template<typename T > | |
QList< T > | findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const QObjectList & | children () const |
Returns a list of child objects. | |
void | setParent (QObject *parent) |
Makes the object a child of parent. | |
void | installEventFilter (QObject *filterObj) |
Installs an event filter filterObj on this object. | |
void | removeEventFilter (QObject *obj) |
Removes an event filter object obj from this object. | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const |
bool | disconnect (const QObject *receiver, const char *member=nullptr) const |
void | dumpObjectTree () const |
Dumps a tree of children to the debug output. | |
void | dumpObjectInfo () const |
Dumps information about signal connections, etc. | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. | |
bool | setProperty (const char *name, QVariant &&value) |
QVariant | property (const char *name) const |
Returns the value of the object's name property. | |
QList< QByteArray > | dynamicPropertyNames () const |
QBindingStorage * | bindingStorage () |
const QBindingStorage * | bindingStorage () const |
QObject * | parent () const |
Returns a pointer to the parent object. | |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false . | |
![]() | |
QQmlParserStatus () | |
virtual | ~QQmlParserStatus () |
virtual void | classBegin ()=0 |
Invoked after class creation, but before any properties have been set. | |
virtual void | componentComplete ()=0 |
Invoked after the root component that caused this instantiation has completed construction. | |
Properties | |
QQuick3DTextureData::Format | format |
int | width |
int | height |
int | depth |
bool | hasTransparency |
QByteArray | textureData |
![]() | |
QQuick3DObject * | parent |
\qmlproperty Object3D QtQuick3D::Object3D::parent This property holds the parent of the Object3D in a 3D scene. | |
![]() | |
QString | objectName |
the name of this object | |
Additional Inherited Members | |
![]() | |
enum | Format { None , RGBA8 , RGBA16F , RGBA32F , RGBE8 , R8 , R16 , R16F , R32F , BC1 , BC2 , BC3 , BC4 , BC5 , BC6H , BC7 , DXT1_RGBA , DXT1_RGB , DXT3_RGBA , DXT5_RGBA , ETC2_RGB8 , ETC2_RGB8A1 , ETC2_RGBA8 , ASTC_4x4 , ASTC_5x4 , ASTC_5x5 , ASTC_6x5 , ASTC_6x6 , ASTC_8x5 , ASTC_8x6 , ASTC_8x8 , ASTC_10x5 , ASTC_10x6 , ASTC_10x8 , ASTC_10x10 , ASTC_12x10 , ASTC_12x12 } |
Returns the color format of the texture data assigned in \l textureData property. More... | |
![]() | |
void | update () |
void | setParentItem (QQuick3DObject *parentItem) |
![]() | |
void | deleteLater () |
\threadsafe | |
![]() | |
static QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
\threadsafe | |
static QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
\threadsafe | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static bool | disconnect (const QMetaObject::Connection &) |
Disconnect a connection. | |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot) |
template<typename Func1 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero) |
![]() | |
QSSGRenderGraphObject * | updateSpatialNode (QSSGRenderGraphObject *node) override |
void | markAllDirty () override |
![]() | |
virtual QSSGRenderGraphObject * | updateSpatialNode (QSSGRenderGraphObject *node) |
virtual void | markAllDirty () |
virtual void | itemChange (ItemChange, const ItemChangeData &) |
QQuick3DObject (QQuick3DObjectPrivate &dd, QQuick3DObject *parent=nullptr) | |
void | classBegin () override |
Invoked after class creation, but before any properties have been set. | |
void | componentComplete () override |
Invoked after the root component that caused this instantiation has completed construction. | |
bool | isComponentComplete () const |
virtual void | preSync () |
![]() | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr. | |
int | senderSignalIndex () const |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. | |
bool | isSignalConnected (const QMetaMethod &signal) const |
virtual void | timerEvent (QTimerEvent *event) |
This event handler can be reimplemented in a subclass to receive timer events for the object. | |
virtual void | childEvent (QChildEvent *event) |
This event handler can be reimplemented in a subclass to receive child events. | |
virtual void | customEvent (QEvent *event) |
This event handler can be reimplemented in a subclass to receive custom events. | |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
QObject (QObjectPrivate &dd, QObject *parent=nullptr) | |
![]() | |
QScopedPointer< QObjectData > | d_ptr |
![]() | |
template< class T > T | qobject_cast (const QObject *object) |
Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QObjectList | |
\macro Q_CLASSINFO(Name, Value) | |
Definition at line 25 of file qquick3dtexturedatafrontend_p.h.
QT_BEGIN_NAMESPACE QQuick3DTextureDataFrontend::QQuick3DTextureDataFrontend | ( | ) |
\qmlproperty int ProceduralTextureData::width
\qmltype ProceduralTextureData \inqmlmodule QtQuick3D.Helpers \inherits TextureData \brief Allows creation of TextureData from QML. \since 6.6 ProceduralTextureData is a helper type that allows creation of TextureData from QML. The TextureData component iself is Abstract, and is usually created from C++. With ProceduralTextureData, it is possible to populate a TextureData from QML. \qml ProceduralTextureData { id: dynamicTextureData property color color1: "red" property color color2: "black" width: 32 height: 32 hasTransparency: false format: TextureData.RGBA8 textureData: generateTextureData(color1, color2) function generateTextureData(newColor1: color, newColor2 : color) : ArrayBuffer { let dataBuffer = new ArrayBuffer(width * height * 4) let data = new Uint8Array(dataBuffer)
Create a checkered pattern using newColor1 and newColor2 for (let x = 0; x < width; x++) { for (let y = 0; y < height; y++) { let index = (x + y * width) * 4 let color = (x % 2 === y % 2) ? newColor1 : newColor2 data[index + 0] = color.r * 255 data[index + 1] = color.g * 255 data[index + 2] = color.b * 255 data[index + 3] = 255 } } return dataBuffer } } \endqml
In the above code snippet, the function generateTextureData is used to generate a checkerboard pattern using the two colors color1 and color2. By filling an ArrayBuffer with the generated data, the textureData property of the TextureData is populated.
This property holds the width of the texture data in pixels. The value defaults to 0.
\qmlproperty int ProceduralTextureData::height
This property holds the height of the texture data in pixels. The value defaults to 0.
\qmlproperty int ProceduralTextureData::depth
This property holds the depth of the texture data in pixels. The value defaults to 0. Setting the depth above 0 means that the texture is handled as a 3D texture.
\qmlproperty bool ProceduralTextureData::hasTransparency
This property holds whether the texture data has transparency.
\qmlproperty enumeration ProceduralTextureData::format
This property holds the format of the texture data. The default format is /c TexureData.RGBA8
\value TexureData.None The color format is not defined \value TexureData.RGBA8 The color format is considered as 8-bit integer in R, G, B and alpha channels. \value TexureData.RGBA16F The color format is considered as 16-bit float in R,G,B and alpha channels. \value TexureData.RGBA32F The color format is considered as 32-bit float in R, G, B and alpha channels. \value TexureData.RGBE8 The color format is considered as 8-bit mantissa in the R, G, and B channels and 8-bit shared exponent. \value TexureData.R8 The color format is considered as 8-bit integer in R channel. \value TexureData.R16 The color format is considered as 16-bit integer in R channel. \value TexureData.R16F The color format is considered as 16-bit float in R channel. \value TexureData.R32F The color format is considered as 32-bit float R channel. \value TexureData.BC1 The color format is considred as BC1 compressed format with R, G, B, and alpha channels. \value TexureData.BC2 The color format is considred as BC2 compressed format with R, G, B, and alpha channels. \value TexureData.BC3 The color format is considred as BC3 compressed format with R, G, B, and alpha channels. \value TexureData.BC4 The color format is considred as BC4 compressed format with one color channel. \value TexureData.BC5 The color format is considred as BC5 compressed format with two color channels. \value TexureData.BC6H The color format is considred as BC6H compressed format with three high dynamic range color channels. \value TexureData.BC7 The color format is considred as BC7 compressed format with R, G, B, and alpha channels. \value TexureData.DXT1_RGBA The color format is considered as DXT1 compressed format with R, G, B and alpha channels. \value TexureData.DXT1_RGB The color format is considered as DXT1 compressed format with R, G and B channels. \value TexureData.DXT3_RGBA The color format is considered as DXT3 compressed format with R, G, B and alpha channels. \value TexureData.DXT5_RGBA The color format is considered as DXT5 compressed format with R, G, B and alpha channels. \value TexureData.ETC2_RGB8 The color format is considered as ETC2 compressed format for RGB888 data \value TexureData.ETC2_RGB8A1 The color format is considered as ETC2 compressed format for RGBA data where alpha is 1-bit. \value TexureData.ETC2_RGBA8 The color format is considered as ETC2 compressed format with RGBA8888 data. \value TexureData.ASTC_4x4 The color format is considered as ASTC compressed format with 4x4 block footprint. \value TexureData.ASTC_5x4 The color format is considered as ASTC compressed format with 5x4 block footprint. \value TexureData.ASTC_5x5 The color format is considered as ASTC compressed format with 5x5 block footprint. \value TexureData.ASTC_6x5 The color format is considered as ASTC compressed format with 6x5 block footprint. \value TexureData.ASTC_6x6 The color format is considered as ASTC compressed format with 6x6 block footprint. \value TexureData.ASTC_8x5 The color format is considered as ASTC compressed format with 8x5 block footprint. \value TexureData.ASTC_8x6 The color format is considered as ASTC compressed format with 8x6 block footprint. \value TexureData.ASTC_8x8 The color format is considered as ASTC compressed format with 8x8 block footprint. \value TexureData.ASTC_10x5 The color format is considered as ASTC compressed format with 10x5 block footprint. \value TexureData.ASTC_10x6 The color format is considered as ASTC compressed format with 10x6 block footprint. \value TexureData.ASTC_10x8 The color format is considered as ASTC compressed format with 10x8 block footprint. \value TexureData.ASTC_10x10 The color format is considered as ASTC compressed format with 10x10 block footprint. \value TexureData.ASTC_12x10 The color format is considered as ASTC compressed format with 12x10 block footprint. \value TexureData.ASTC_12x12 The color format is considered as ASTC compressed format with 12x12 block footprint.
TexureData.RGBA8
, not every format is supported at runtime as this depends on which backend is being used as well which hardware is being used.TexureData.RGBE
is internally represented as an TexureData.RGBA8
but is intepreted as described when used as a lightProbe or skybox texture.TexureData.None
will assume the default value of TexureData.RGBA8
\qmlproperty ArrayBuffer ProceduralTextureData::textureData
This property holds the texture data.
Definition at line 141 of file qquick3dtexturedatafrontend.cpp.
int QQuick3DTextureDataFrontend::depth | ( | ) | const |
Definition at line 162 of file qquick3dtexturedatafrontend.cpp.
References QQuick3DTextureData::depth().
|
signal |
QQuick3DTextureData::Format QQuick3DTextureDataFrontend::format | ( | ) | const |
Definition at line 147 of file qquick3dtexturedatafrontend.cpp.
References QQuick3DTextureData::format().
|
signal |
bool QQuick3DTextureDataFrontend::hasTransparency | ( | ) | const |
Definition at line 178 of file qquick3dtexturedatafrontend.cpp.
References QQuick3DTextureData::hasTransparency().
|
signal |
int QQuick3DTextureDataFrontend::height | ( | ) | const |
Definition at line 221 of file qquick3dtexturedatafrontend.cpp.
References QSize::height(), and QQuick3DTextureData::size().
|
signal |
void QQuick3DTextureDataFrontend::setDepth | ( | int | newDepth | ) |
Definition at line 167 of file qquick3dtexturedatafrontend.cpp.
References QQuick3DTextureData::depth(), depthChanged(), Q_EMIT, and QQuick3DTextureData::setDepth().
void QQuick3DTextureDataFrontend::setFormat | ( | const QQuick3DTextureData::Format & | newFormat | ) |
Definition at line 152 of file qquick3dtexturedatafrontend.cpp.
References QQuick3DTextureData::format(), formatChanged(), Q_EMIT, and QQuick3DTextureData::setFormat().
void QQuick3DTextureDataFrontend::setHasTransparency | ( | bool | newHasTransparency | ) |
Definition at line 183 of file qquick3dtexturedatafrontend.cpp.
References QQuick3DTextureData::hasTransparency(), hasTransparencyChanged(), Q_EMIT, and QQuick3DTextureData::setHasTransparency().
void QQuick3DTextureDataFrontend::setHeight | ( | int | newHeight | ) |
Definition at line 226 of file qquick3dtexturedatafrontend.cpp.
References heightChanged(), Q_EMIT, QQuick3DTextureData::setSize(), and QQuick3DTextureData::size().
void QQuick3DTextureDataFrontend::setTextureData | ( | const QByteArray & | newTextureData | ) |
Definition at line 198 of file qquick3dtexturedatafrontend.cpp.
References Q_EMIT, QQuick3DTextureData::setTextureData(), and textureDataChanged().
void QQuick3DTextureDataFrontend::setWidth | ( | int | newWidth | ) |
Definition at line 209 of file qquick3dtexturedatafrontend.cpp.
References Q_EMIT, QQuick3DTextureData::setSize(), QQuick3DTextureData::size(), and widthChanged().
QByteArray QQuick3DTextureDataFrontend::textureData | ( | ) | const |
Definition at line 193 of file qquick3dtexturedatafrontend.cpp.
References QQuick3DTextureData::textureData().
|
signal |
int QQuick3DTextureDataFrontend::width | ( | ) | const |
Definition at line 204 of file qquick3dtexturedatafrontend.cpp.
References QQuick3DTextureData::size(), and QSize::width().
|
signal |
|
readwrite |
Definition at line 66 of file qquick3dtexturedatafrontend_p.h.
|
readwrite |
Definition at line 66 of file qquick3dtexturedatafrontend_p.h.
|
readwrite |
Definition at line 66 of file qquick3dtexturedatafrontend_p.h.
|
readwrite |
Definition at line 66 of file qquick3dtexturedatafrontend_p.h.
|
readwrite |
Definition at line 66 of file qquick3dtexturedatafrontend_p.h.
|
readwrite |
Definition at line 66 of file qquick3dtexturedatafrontend_p.h.