QAbstractAttribute Class | Qt 3D 5.6

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

Qt 5.6.2 Reference Documentation

# QAbstractAttribute Class

(Qt3DRender::QAbstractAttribute)

Header: | #include <QAbstractAttribute>
qmake: | QT += 3drender
Instantiated By: | AbstractAttribute
Inherits: | Qt3DCore::QNode

- List of all members, including inherited members

## Public Types

enum | AttributeType { VertexAttribute, IndexAttribute }
enum | DataType { Byte, UnsignedByte, Short, UnsignedShort, ..., Double }

## Properties

attributeType : AttributeType buffer : Qt3DRender::QAbstractBuffer * byteOffset : uint byteStride : uint count : uint | dataSize : uint dataType : DataType divisor : uint name : QString

- 2 properties inherited from Qt3DCore::QNode
- 1 property inherited from QObject

## Public Functions

| QAbstractAttribute(QNode *parent = Q_NULLPTR)
| QAbstractAttribute(QAbstractBuffer *buf, DataType type, uint dataSize, uint count, uint offset = 0, uint stride = 0, QNode *parent = Q_NULLPTR)
| ~QAbstractAttribute()
virtual QVector<QVector2D> | asVector2D() const = 0
virtual QVector<QVector3D> | asVector3D() const = 0
virtual QVector<QVector4D> | asVector4D() const = 0
AttributeType | attributeType() const
QAbstractBuffer * | buffer() const
uint | byteOffset() const
uint | byteStride() const
uint | count() const
uint | dataSize() const
DataType | dataType() const
uint | divisor() const
virtual void | dump(int count) = 0
QString | name() const

- 6 public functions inherited from Qt3DCore::QNode
- 31 public functions inherited from QObject

## Public Slots

void | setAttributeType(AttributeType attributeType)
void | setBuffer(QAbstractBuffer *buffer)
void | setByteOffset(uint byteOffset)
void | setByteStride(uint byteStride)
void | setCount(uint count)
void | setDataSize(uint size)
void | setDataType(DataType type)
void | setDivisor(uint divisor)
void | setName(const QString &name)

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

## Signals

void | attributeTypeChanged(AttributeType attributeType)
void | bufferChanged(QAbstractBuffer *buffer)
void | byteOffsetChanged(uint byteOffset)
void | byteStrideChanged(uint byteStride)
void | countChanged(uint count)
void | dataSizeChanged(uint dataSize)
void | dataTypeChanged(DataType dataType)
void | divisorChanged(uint divisor)
void | nameChanged(const QString &name)

- 2 signals inherited from Qt3DCore::QNode
- 2 signals inherited from QObject

## Related Non-Members

typedef | QAbstractBufferPtr

### Additional Inherited Members

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

## Detailed Description

Abstract class.

## Member Type Documentation

### enum QAbstractAttribute::AttributeType

The type of the attribute.

Constant | Value
--- | ---
`Qt3DRender::QAbstractAttribute::VertexAttribute` | `0`
`Qt3DRender::QAbstractAttribute::IndexAttribute` | `1`

### enum QAbstractAttribute::DataType

The type of the data.

Constant | Value
--- | ---
`Qt3DRender::QAbstractAttribute::Byte` | `0`
`Qt3DRender::QAbstractAttribute::UnsignedByte` | `1`
`Qt3DRender::QAbstractAttribute::Short` | `2`
`Qt3DRender::QAbstractAttribute::UnsignedShort` | `3`
`Qt3DRender::QAbstractAttribute::Int` | `4`
`Qt3DRender::QAbstractAttribute::UnsignedInt` | `5`
`Qt3DRender::QAbstractAttribute::HalfFloat` | `6`
`Qt3DRender::QAbstractAttribute::Float` | `7`
`Qt3DRender::QAbstractAttribute::Double` | `8`

## Property Documentation

### attributeType : AttributeType

Holds the attribute type.

Access functions:

AttributeType | attributeType() const
void | setAttributeType(AttributeType attributeType)

Notifier signal:

void | attributeTypeChanged(AttributeType attributeType)

### buffer : Qt3DRender::QAbstractBuffer *

Holds the buffer.

Access functions:

QAbstractBuffer * | buffer() const
void | setBuffer(QAbstractBuffer *buffer)

Notifier signal:

void | bufferChanged(QAbstractBuffer *buffer)

### byteOffset : uint

Holds the byte offset.

Access functions:

uint | byteOffset() const
void | setByteOffset(uint byteOffset)

Notifier signal:

void | byteOffsetChanged(uint byteOffset)

### byteStride : uint

Holds the byte stride.

Access functions:

uint | byteStride() const
void | setByteStride(uint byteStride)

Notifier signal:

void | byteStrideChanged(uint byteStride)

### count : uint

Holds the count.

Access functions:

uint | count() const
void | setCount(uint count)

Notifier signal:

void | countChanged(uint count)

### dataSize : uint

Holds the data size.

Access functions:

uint | dataSize() const
void | setDataSize(uint size)

Notifier signal:

void | dataSizeChanged(uint dataSize)

### dataType : DataType

Holds the data type.

Access functions:

DataType | dataType() const
void | setDataType(DataType type)

Notifier signal:

void | dataTypeChanged(DataType dataType)

### divisor : uint

Holds the divisor.

Access functions:

uint | divisor() const
void | setDivisor(uint divisor)

Notifier signal:

void | divisorChanged(uint divisor)

### name : QString

Holds the name.

Access functions:

QString | name() const
void | setName(const QString &name)

Notifier signal:

void | nameChanged(const QString &name)

## Member Function Documentation

### QAbstractAttribute::QAbstractAttribute(QNode *parent = Q_NULLPTR)

Constructs a new QAbstractAttribute with parent.

### QAbstractAttribute::QAbstractAttribute(QAbstractBuffer *buf, DataType type, uint dataSize, uint count, uint offset = 0, uint stride = 0, QNode *parent = Q_NULLPTR)

Constructs a new QAbstractAttribute from buf of type, dataSize, count, offset, and stride with parent.

### QAbstractAttribute::~QAbstractAttribute()

Destroys the abstract attribute.

### `[pure virtual]` QVector<QVector2D> QAbstractAttribute::asVector2D() const

### `[pure virtual]` QVector<QVector3D> QAbstractAttribute::asVector3D() const

### `[pure virtual]` QVector<QVector4D> QAbstractAttribute::asVector4D() const

### `[pure virtual]` void QAbstractAttribute::dump(int count)

count

## Related Non-Members

### typedef Qt3DRender::QAbstractBufferPtr