• HardwareResource
  • HardwareResource Class

    The base class for hardware resources. More...

    Header: #include <HardwareResource>
    Inherits:
    Inherited By:

    BluetoothLowEnergyManager, NetworkAccessManager, PluginTimerManager, QtAvahiServiceBrowser, Radio433, and UpnpDiscovery

    Public Functions

    HardwareResource(const QString & name, QObject * parent = nullptr)
    virtual ~HardwareResource()
    virtual bool available() const = 0
    virtual bool enabled() const = 0
    QString name() const

    Signals

    void availableChanged(bool available)
    void enabledChanged(bool enabled)

    Protected Functions

    virtual void setEnabled(bool enabled) = 0

    Detailed Description

    The base class for hardware resources.

    See also HardwareResource.

    Member Function Documentation

    HardwareResource::HardwareResource(const QString & name, QObject * parent = nullptr)

    Constructs a new HardwareResource with the given name and parent.

    [virtual] HardwareResource::~HardwareResource()

    The virtual destructor of the HardwareResource.

    [pure virtual] bool HardwareResource::available() const

    Returns true if the hardware resource is available.

    See also availableChanged().

    [signal] void HardwareResource::availableChanged(bool available)

    This signal will be emitted if the hardware resource available changed.

    [pure virtual] bool HardwareResource::enabled() const

    Returns true if the hardware resource is enabled.

    See also setEnabled() and enabledChanged().

    [signal] void HardwareResource::enabledChanged(bool enabled)

    This signal will be emitted if the hardware resource was enabled or disabled.

    QString HardwareResource::name() const

    Returns the name of this resource.

    [pure virtual protected] void HardwareResource::setEnabled(bool enabled)

    Sets the hardware resource to enabled.

    See also enabledChanged().