ComponentAlias Class

class QInstaller::ComponentAlias

The ComponentAlias class represents an alias for single or multiple components. More...

Header: #include <ComponentAlias>
Inherits: QObject

Public Types

enum UnstableError { ReferenceToUnstable, MissingComponent, UnselectableComponent, MissingAlias, ComponentNameConfict }

Public Functions

ComponentAlias(QInstaller::PackageManagerCore *core)
virtual ~ComponentAlias()
QList<QInstaller::ComponentAlias *> aliases()
QList<QInstaller::Component *> components()
QString description() const
QString displayName() const
bool isSelected() const
bool isUnstable() const
bool isVirtual() const
QStringList keys() const
QString name() const
void setSelected(bool selected)
void setUnstable(QInstaller::ComponentAlias::UnstableError error, const QString &message = QString())
void setValue(const QString &key, const QString &value)
QString value(const QString &key, const QString &defaultValue = QString()) const
QString version() const

Detailed Description

Member Type Documentation

enum ComponentAlias::UnstableError

This enum type holds the possible reasons for marking an alias unstable:

ConstantValueDescription
QInstaller::ComponentAlias::ReferenceToUnstable0Alias requires another alias that is marked unstable.
QInstaller::ComponentAlias::MissingComponent1Alias requires a component that is missing.
QInstaller::ComponentAlias::UnselectableComponent2Alias requires a component that cannot be selected.
QInstaller::ComponentAlias::MissingAlias3Alias requires another alias that is missing.
QInstaller::ComponentAlias::ComponentNameConfict4Alias has a name that conflicts with a name of a component

Member Function Documentation

ComponentAlias::ComponentAlias(QInstaller::PackageManagerCore *core)

Constructs a new component alias with core as the package manager instance.

[virtual noexcept] ComponentAlias::~ComponentAlias()

Destructs the alias.

QList<QInstaller::ComponentAlias *> ComponentAlias::aliases()

Returns the list of other aliases required by this alias, or an empty list if this alias does not require any other aliases.

QList<QInstaller::Component *> ComponentAlias::components()

Returns the list of components required by this alias, or an empty list if this alias does not require any components.

QString ComponentAlias::description() const

Returns the description text of the alias.

QString ComponentAlias::displayName() const

Returns the display name of the alias.

bool ComponentAlias::isSelected() const

Returns true if the alias is selected for installation, false otherwise.

bool ComponentAlias::isUnstable() const

Returns true if the alias is marked unstable, false otherwise.

bool ComponentAlias::isVirtual() const

Returns true if the alias is virtual, false otherwise.

Virtual aliases are aliases that cannot be selected by the user, and are invisible. They can be required by other aliases however.

QStringList ComponentAlias::keys() const

Returns all keys for the component alias values.

QString ComponentAlias::name() const

Returns the name of the alias.

void ComponentAlias::setSelected(bool selected)

Sets the selection state of the alias to selected. The selection does not have an effect if the alias is unselectable.

See also isSelected().

void ComponentAlias::setUnstable(QInstaller::ComponentAlias::UnstableError error, const QString &message = QString())

Sets the alias unstable with error, and a message describing the error.

See also isUnstable().

void ComponentAlias::setValue(const QString &key, const QString &value)

Sets the value specified by key to value. If the value exists already, it is replaced with the new value.

See also value().

QString ComponentAlias::value(const QString &key, const QString &defaultValue = QString()) const

Returns the value specified by key, with an optional default value defaultValue.

See also setValue().

QString ComponentAlias::version() const

Returns the version of the alias.

© 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.