diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2011-10-16 00:16:58 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2011-10-16 00:16:58 +0200 |
commit | 2e78de1168112b89755fea52b0938b326b5d1edb (patch) | |
tree | 0e44de0b5c26835ee526461ec30e3f5ee77c2f0f /metawatch/metawatchdigital.cpp | |
parent | de66281645cea6073659ff4d9f534a2f403588cc (diff) | |
download | sowatch-2e78de1168112b89755fea52b0938b326b5d1edb.tar.gz sowatch-2e78de1168112b89755fea52b0938b326b5d1edb.zip |
Update some message and function names according to new protocol spec
Diffstat (limited to 'metawatch/metawatchdigital.cpp')
-rw-r--r-- | metawatch/metawatchdigital.cpp | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/metawatch/metawatchdigital.cpp b/metawatch/metawatchdigital.cpp index 2a25249..a4bb833 100644 --- a/metawatch/metawatchdigital.cpp +++ b/metawatch/metawatchdigital.cpp @@ -12,8 +12,6 @@ MetaWatchDigital::MetaWatchDigital(const QBluetoothAddress& address, QSettings* _image[IdleMode] = baseImage; _image[ApplicationMode] = baseImage; _image[NotificationMode] = baseImage; - - } int MetaWatchDigital::metric(PaintDeviceMetric metric) const @@ -81,14 +79,11 @@ void MetaWatchDigital::displayIdleScreen() MetaWatch::displayIdleScreen(); // Usually, idle screen is kept updated, so we can flip it right away. - updateDisplay(IdleMode); + updateLcdDisplay(IdleMode); } void MetaWatchDigital::displayNotification(Notification *n) { - const bool isCall = n->type() == Notification::CallNotification; - configureWatchMode(NotificationMode, isCall ? 120 : 10, _invertedNotifications); - qDebug() << "display notification" << n->title() << n->body(); // Render the notification and display it before invoking haptic feedback @@ -101,7 +96,7 @@ void MetaWatchDigital::displayNotification(Notification *n) void MetaWatchDigital::displayApplication() { qDebug() << "entering application mode"; - configureWatchMode(ApplicationMode, 250, _invertedApplications); + MetaWatch::displayApplication(); } @@ -118,16 +113,16 @@ void MetaWatchDigital::update(Mode mode, const QList<QRect> &rects) } } - updateLines(mode, _image[mode], lines); + updateLcdLines(mode, _image[mode], lines); if (mode == _currentMode) { - updateDisplay(mode); + updateLcdDisplay(mode); } } void MetaWatchDigital::clear(Mode mode, bool black) { if (!_connected) return; - loadTemplate(mode, black ? 1 : 0); + loadLcdTemplate(mode, black ? 1 : 0); } void MetaWatchDigital::renderIdleScreen() @@ -198,16 +193,6 @@ void MetaWatchDigital::renderIdleCounts() _paintMode = _currentMode; } -void MetaWatchDigital::renderNotificationScreen() -{ - _paintMode = NotificationMode; - QPainter p(this); - - p.fillRect(0, 0, screenWidth, screenHeight, Qt::white); - - _paintMode = _currentMode; -} - void MetaWatchDigital::renderNotification(Notification *n) { _paintMode = NotificationMode; @@ -301,11 +286,8 @@ QImage MetaWatchDigital::iconForNotification(const Notification *n) void MetaWatchDigital::handleWatchConnected() { // Configure to show watch-rendered clock in idle screen - configureIdleSystemArea(false); - // Follow inverted screen user preference - configureWatchMode(IdleMode, 0, _invertedIdle); + configureLcdIdleSystemArea(false); - // Render the idle screen from zero + // Render the idle screen assuming previous contents were lost renderIdleScreen(); - renderNotificationScreen(); } |