#ifndef TAG_H
#define TAG_H

#include <QObject>
#include <QDateTime>
#include "QDebug"
#include "QtPositioning/qgeopositioninfosource.h"
#include <QBluetoothDeviceDiscoveryAgent>


class Tag : public QObject
{
    Q_OBJECT
public:
    explicit Tag(QObject *parent = 0);
    Q_INVOKABLE double getLatitude();
    Q_INVOKABLE double getLongtitude();
    Q_INVOKABLE void setTag(int TagNum);
    Q_INVOKABLE QString getStrDate();
    Q_INVOKABLE void updateGPSCoordinates();

signals:
    void coordinatesChanged();
    void tagChanged();

public slots:
    int getTagNum();
    void setCoordinates(double newLatitude, double newLongtitude);
    void setGPSCoordinates(QGeoPositionInfo geoPositionInfo);
    void deviceDiscovered(const QBluetoothDeviceInfo &device);
    void setName(QString newName);

private:
    int itsTagNum = 0;
    double itsLatitude = 49.629289;
    double itsLongtitude = 15.382266;
    QDateTime itsDate = QDateTime::currentDateTime();
    QGeoPositionInfoSource* locationInfo;
    QString itsName = "0";
    QBluetoothDeviceDiscoveryAgent *discoveryAgent;
};

#endif // TAG_H
