#ifndef QGSCOPEDEVICE_H
#define QGSCOPEDEVICE_H

#include "qgscopeobject.h"

#include "qgscopechrono.h"

class QgScopeDevice : public QgScopeObject
{
    Q_OBJECT

    Q_PROPERTY(bool deviceActive READ deviceActive WRITE setDeviceActive)

    Q_PROPERTY(QString nickName READ nickName)


public:
    explicit QgScopeDevice(const QString& name, const QString& nickName_);
    virtual ~QgScopeDevice();

    bool deviceActive() const;

    virtual bool onActivate(bool activate);

    QString nickName() const
    {
        return m_nickName;
    }

    QgScopeChronoTimer& chronoTimer();

public slots:
    void setDeviceActive(bool activate);

signals:
    void deviceActivated(bool active);

protected:
    bool m_deviceActive;
    QString m_nickName;
    QgScopeChronoTimer m_chronoTimer;
};

#endif // QGSCOPEDEVICE_H
