summaryrefslogtreecommitdiff
path: root/declarativewatchwrapper.h
blob: 09e0923f4e97fd8285bcafb0cdfe9e0dd7eee0a7 (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
#ifndef DECLARATIVEWATCHWRAPPER_H
#define DECLARATIVEWATCHWRAPPER_H

#include <QtDeclarative/QtDeclarative>

namespace sowatch
{

class Watch;
class DeclarativeWatchlet;

class DeclarativeWatchWrapper : public QObject
{
    Q_OBJECT
	Q_PROPERTY(QString model READ model NOTIFY modelChanged)

public:
	explicit DeclarativeWatchWrapper(Watch *watch, QObject *parent = 0);

	Q_INVOKABLE QString model() const;

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

	void modelChanged();

protected:
	Watch* _watch;

	void activate();
	void deactivate();

friend class DeclarativeWatchlet;
};

}

QML_DECLARE_TYPE(sowatch::DeclarativeWatchWrapper)

#endif // DECLARATIVEWATCHWRAPPER_H