blob: cfd8f192c605acd44f8ab2d816b21546d39e6ff2 (
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
|
#include "metawatchanalog.h"
using namespace sowatch;
MetaWatchAnalog::MetaWatchAnalog(const QBluetoothAddress& address, QSettings* settings, QObject *parent) :
MetaWatch(address, settings, parent)
{
}
int MetaWatchAnalog::metric(PaintDeviceMetric metric) const
{
switch (metric) {
case PdmWidth:
return screenWidth;
case PdmHeight:
return screenHeight;
case PdmWidthMM:
return 8;
case PdmHeightMM:
return 8;
case PdmNumColors:
return 2;
case PdmDepth:
return 1;
case PdmDpiX:
case PdmPhysicalDpiX:
return 96;
case PdmDpiY:
case PdmPhysicalDpiY:
return 96;
}
return -1;
}
QString MetaWatchAnalog::model() const
{
return "metawatch-analog";
}
void MetaWatchAnalog::updateNotificationCount(Notification::Type type, int count)
{
// Analog doesn't do anything with this
}
void MetaWatchAnalog::updateWeather(WeatherNotification *weather)
{
// Analog doesn't do anything with this
}
void MetaWatchAnalog::displayIdleScreen()
{
qDebug() << "displaying idle screen";
MetaWatch::displayIdleScreen();
}
void MetaWatchAnalog::displayNotification(Notification *n)
{
qDebug() << "display notification" << n->title() << n->body();
// Render the notification and display it before invoking haptic feedback
_currentMode = NotificationMode;
// TODO
MetaWatch::displayNotification(n);
}
void MetaWatchAnalog::displayApplication()
{
qDebug() << "entering application mode";
MetaWatch::displayApplication();
}
void MetaWatchAnalog::update(Mode mode, const QList<QRect> &rects)
{
if (!_connected) return;
// TODO
}
void MetaWatchAnalog::clear(Mode mode, bool black)
{
if (!_connected) return;
// TODO Still need to understand this
}
void MetaWatchAnalog::handleWatchConnected()
{
}
|