IDeviceFactory Class

(ProjectExplorer::IDeviceFactory)

The IDeviceFactory class implements an interface for classes that provide services related to a certain type of device. More...

Header: #include <IDeviceFactory>

Public Functions

~IDeviceFactory() override
bool canCreate() const
virtual bool canRestore(const QVariantMap &) const
IDevice::Ptr construct() const
virtual IDevice::Ptr create() const
Core::Id deviceType() const
QString displayName() const
QIcon icon() const

Static Public Members

const QList<IDeviceFactory *> allDeviceFactories()
IDeviceFactory *find(Core::Id type)

Protected Functions

IDeviceFactory(Core::Id deviceType)
void setCanCreate(bool canCreate)
void setCombinedIcon(const QString &small, const QString &large)
void setConstructionFunction(const std::function<IDevice::Ptr() > &constructor)
void setDisplayName(const QString &displayName)
void setIcon(const QIcon &icon)

Detailed Description

The IDeviceFactory class implements an interface for classes that provide services related to a certain type of device.

The factory objects have to be added to the global object pool via ExtensionSystem::PluginManager::addObject().

See also ExtensionSystem::PluginManager::addObject().

Member Function Documentation

[protected] IDeviceFactory::IDeviceFactory(Core::Id deviceType)

Default constructs an instance of IDeviceFactory.

IDeviceFactory::~IDeviceFactory()

Destroys the instance of IDeviceFactory.

[static] const QList<IDeviceFactory *> IDeviceFactory::allDeviceFactories()

bool IDeviceFactory::canCreate() const

Checks whether this factory can create new devices. This function is used to hide auto-detect-only factories from the listing of possible devices to create.

See also setCanCreate().

[virtual] bool IDeviceFactory::canRestore(const QVariantMap &) const

IDevice::Ptr IDeviceFactory::construct() const

[virtual] IDevice::Ptr IDeviceFactory::create() const

Core::Id IDeviceFactory::deviceType() const

QString IDeviceFactory::displayName() const

See also setDisplayName().

[static] IDeviceFactory *IDeviceFactory::find(Core::Id type)

QIcon IDeviceFactory::icon() const

See also setIcon().

[protected] void IDeviceFactory::setCanCreate(bool canCreate)

See also canCreate().

[protected] void IDeviceFactory::setCombinedIcon(const QString &small, const QString &large)

[protected] void IDeviceFactory::setConstructionFunction(const std::function<IDevice::Ptr() > &constructor)

[protected] void IDeviceFactory::setDisplayName(const QString &displayName)

See also displayName().

[protected] void IDeviceFactory::setIcon(const QIcon &icon)

See also icon().