IDeviceFactory Class | Extending Qt Creator Manual

Extending Qt Creator Manual | IDeviceFactory

Extending Qt Creator Manual 4.4.1

# 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>

- List of all members, including inherited members

## Public Functions

virtual QList<Core::Id> | availableCreationIds() const = 0
virtual bool | canCreate() const
virtual bool | canRestore(const QVariantMap &map) const = 0
virtual IDevice::Ptr | create(Core::Id id) const = 0
virtual QString | displayNameForId(Core::Id type) const = 0
virtual QIcon | iconForId(Core::Id type) const = 0
virtual IDevice::Ptr | restore(const QVariantMap &map) const = 0

## Static Public Members

IDeviceFactory * | find(Core::Id type)

## Protected Functions

| IDeviceFactory(QObject *parent = 0)

## 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(QObject *parent = 0)

Default constructs an instance of IDeviceFactory.

### `[pure virtual]` QList<Core::Id> IDeviceFactory::availableCreationIds() const

### `[virtual]` 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.

### `[pure virtual]` bool IDeviceFactory::canRestore(const QVariantMap &map) const

### `[pure virtual]` IDevice::Ptr IDeviceFactory::create(Core::Id id) const

### `[pure virtual]` QString IDeviceFactory::displayNameForId(Core::Id type) const

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

### `[pure virtual]` QIcon IDeviceFactory::iconForId(Core::Id type) const

### `[pure virtual]` IDevice::Ptr IDeviceFactory::restore(const QVariantMap &map) const