ResourceCollection Class

class QInstaller::ResourceCollection

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

Header: #include <ResourceCollection>

Public Functions

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

Detailed Description

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.

[explicit] ResourceCollection::ResourceCollection(const QByteArray &name)

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

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

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

void ResourceCollection::appendResources(const QList<QSharedPointer<QInstaller::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<QInstaller::Resource> ResourceCollection::resourceByName(const QByteArray &name) const

Returns the resource associated with the name name.

QList<QSharedPointer<QInstaller::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().

© 2021 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. The Qt Company, Qt and their 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.