ResourceCollection Class | Qt Installer Framework Manual

Qt Installer Framework Manual | ResourceCollection

# ResourceCollection Class

(QInstaller::ResourceCollection)

The ResourceCollection class is an abstraction that groups together a number of resources. More...

Header: | #include <ResourceCollection>

- List of all members, including inherited members

## Public Functions

| ResourceCollection()
| ResourceCollection(const QByteArray &name)
void | appendResource(const QSharedPointer<Resource> &resource)
void | appendResources(const QList<QSharedPointer<Resource> > &resources)
QByteArray | name() const
QSharedPointer<Resource> | resourceByName(const QByteArray &name) const
QList<QSharedPointer<Resource> > | resources() const
void | setName(const QByteArray &name)

## Detailed Description

The ResourceCollection class is an abstraction that groups together a number of resources.

The resources are supposed to be sequential, so the collection keeps them ordered once a new resource is added. The name can be set at any time using setName().

## Member Function Documentation

### ResourceCollection::ResourceCollection()

The class constructor creates an empty resource collection. By default the collection gets a unique name assigned using QUuid.

### ResourceCollection::ResourceCollection(const QByteArray &name)

The class constructor creates an empty resource collection with a name set to name.

### void ResourceCollection::appendResource(const QSharedPointer<Resource> &resource)

Appends resource to this collection. The collection takes ownership of resource.

### void ResourceCollection::appendResources(const QList<QSharedPointer<Resource> > &resources)

Appends a list of resources to this collection. The collection takes ownership of resources.

### QByteArray ResourceCollection::name() const

Returns the name of the resource collection.

See also setName().

### QSharedPointer<Resource> ResourceCollection::resourceByName(const QByteArray &name) const

Returns the resource associated with the name name.

### QList<QSharedPointer<Resource> > ResourceCollection::resources() const

Returns the resources associated with this collection.

### void ResourceCollection::setName(const QByteArray &name)

Sets the name of the resource collection to name.

See also name().