summaryrefslogtreecommitdiff
path: root/libsowatch/watch.h
blob: 056bfe03bd9588bcb54c9e8b7693d9fd7c93216a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef WATCH_H
#define WATCH_H

#include <QtCore/QObject>
#include <QtCore/QDateTime>
#include <QtGui/QPaintDevice>
#include <QtGui/QImage>
#include "notification.h"

namespace sowatch
{

class Watch : public QObject, public QPaintDevice
{
	Q_OBJECT
	Q_PROPERTY(QString model READ model)
	Q_PROPERTY(bool connected READ isConnected)
	Q_PROPERTY(QDateTime dateTime READ dateTime WRITE setDateTime)

public:
	explicit Watch(QObject* parent = 0);
	~Watch();

	virtual QString model() const = 0;
	virtual bool isConnected() const = 0;

	/** Indicates if watch is too busy atm and we should limit frame rate. */
	virtual bool busy() const = 0;

	virtual QDateTime dateTime() = 0;
	virtual void setDateTime(const QDateTime& dateTime) = 0;

	virtual void updateNotificationCount(Notification::Type type, int count) = 0;

signals:
	void connected();
	void disconnected();
	void buttonPressed(int button);
	void buttonReleased(int button);

public slots:
	virtual void vibrate(bool on) = 0;
	virtual void showNotification(const Notification& n) = 0;
};

}

#endif // WATCH_H