QTextureImage Class | Qt 3D 5.6

Qt 5.6 | Qt 3D | C++ Classes | QTextureImage

Qt 5.6.2 Reference Documentation

# QTextureImage Class

(Qt3DRender::QTextureImage)

Encapsulates the necessary information to create an OpenGL texture image from an image source. More...

Header: | #include <QTextureImage>
qmake: | QT += 3drender
Since: | Qt 5.5
Instantiated By: | TextureImage
Inherits: | QAbstractTextureImage

- List of all members, including inherited members

## Properties

- source : QUrl

- 3 properties inherited from Qt3DRender::QAbstractTextureImage
- 2 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject

## Public Functions

| QTextureImage(Qt3DCore::QNode *parent = Q_NULLPTR)
| ~QTextureImage()
QUrl | source() const

## Reimplemented Public Functions

virtual QTextureDataFunctorPtr | dataFunctor() const

- 5 public functions inherited from Qt3DRender::QAbstractTextureImage
- 6 public functions inherited from Qt3DCore::QNode
- 31 public functions inherited from QObject

## Public Slots

void | setSource(const QUrl &source)

- 3 public slots inherited from Qt3DRender::QAbstractTextureImage
- 2 public slots inherited from Qt3DCore::QNode
- 1 public slot inherited from QObject

## Signals

void | sourceChanged(const QUrl &source)

- 3 signals inherited from Qt3DRender::QAbstractTextureImage
- 2 signals inherited from Qt3DCore::QNode
- 2 signals inherited from QObject

## Protected Functions

void | copy(const Qt3DCore::QNode *ref)

- 1 protected function inherited from Qt3DRender::QAbstractTextureImage
- 3 protected functions inherited from Qt3DCore::QNode
- 9 protected functions inherited from QObject

### Additional Inherited Members

- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 2 protected variables inherited from QObject
- 1 static protected member inherited from Qt3DCore::QNode

## Detailed Description

Encapsulates the necessary information to create an OpenGL texture image from an image source.

It contains the necessary information mipmap level, layer, cube face and source URL to load at the proper place data into an OpenGL texture.

## Property Documentation

### source : QUrl

This property holdsthe source url from which data for the texture image will be loaded.

Access functions:

QUrl | source() const
void | setSource(const QUrl &source)

Notifier signal:

void | sourceChanged(const QUrl &source)

## Member Function Documentation

### QTextureImage::QTextureImage(Qt3DCore::QNode *parent = Q_NULLPTR)

Default constructs an instance of QTextureImage.

### QTextureImage::~QTextureImage()

The destructor.

### `[protected]` void QTextureImage::copy(const Qt3DCore::QNode *ref)

### `[virtual]` QTextureDataFunctorPtr QTextureImage::dataFunctor() const

Reimplemented from QAbstractTextureImage::dataFunctor().

Returns the Qt3DRender::QTextureDataFunctorPtr functor to be used by the backend to load the texture image data into an OpenGL texture object.

### `[slot]` void QTextureImage::setSource(const QUrl &source)

Sets the source url of the texture image to source.

Note: This triggers a call to update()

Note: Setter function for property source.

See also source().

### QUrl QTextureImage::source() const

Returns the source url from which data for the texture image will be loaded.

Note: Getter function for property source.

See also setSource().