diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-05-07 01:37:21 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-05-07 01:37:21 +0200 |
commit | 6003bf81107dd9be51589c074b74c5af82bfc8ab (patch) | |
tree | 502193634979c12b45c2a013668d21556e2c7050 /metawatch | |
parent | ae37832316d905889c82706b351b3c037c9e1ab6 (diff) | |
download | sowatch-6003bf81107dd9be51589c074b74c5af82bfc8ab.tar.gz sowatch-6003bf81107dd9be51589c074b74c5af82bfc8ab.zip |
testing qml notifications
Diffstat (limited to 'metawatch')
-rw-r--r-- | metawatch/metawatch.cpp | 3 | ||||
-rw-r--r-- | metawatch/metawatchdigital.cpp | 13 | ||||
-rw-r--r-- | metawatch/metawatchscanner.cpp | 2 | ||||
-rw-r--r-- | metawatch/qml/com/javispedro/sowatch/metawatch/MWTitle.qml | 12 | ||||
-rw-r--r-- | metawatch/res/graphics/idle_call.bmp | bin | 134 -> 0 bytes | |||
-rw-r--r-- | metawatch/res/graphics/idle_mail.bmp | bin | 134 -> 0 bytes | |||
-rw-r--r-- | metawatch/res/graphics/idle_msg.bmp | bin | 134 -> 0 bytes |
7 files changed, 17 insertions, 13 deletions
diff --git a/metawatch/metawatch.cpp b/metawatch/metawatch.cpp index 01dec25..782e47f 100644 --- a/metawatch/metawatch.cpp +++ b/metawatch/metawatch.cpp @@ -125,7 +125,8 @@ MetaWatch::MetaWatch(ConfigKey* settings, QObject* parent) : connect(_localDev, SIGNAL(hostModeStateChanged(QBluetoothLocalDevice::HostMode)), SLOT(localDevModeChanged(QBluetoothLocalDevice::HostMode))); // Check to see if we can connect right away - if (_localDev->hostMode() != QBluetoothLocalDevice::HostPoweredOff) { + if (_localDev->isValid() && + _localDev->hostMode() != QBluetoothLocalDevice::HostPoweredOff) { // Do an initial connection attempt after a short delay // (To give time for other plugins to initialize, etc.) scheduleConnect(); diff --git a/metawatch/metawatchdigital.cpp b/metawatch/metawatchdigital.cpp index de55db6..e099f76 100644 --- a/metawatch/metawatchdigital.cpp +++ b/metawatch/metawatchdigital.cpp @@ -48,7 +48,7 @@ QString MetaWatchDigital::model() const void MetaWatchDigital::displayIdleScreen() { - qDebug() << "displaying idle screen"; + qDebug() << "entering idle screen"; MetaWatch::displayIdleScreen(); // Usually, idle screen is kept updated, so we can flip it right away. @@ -57,22 +57,13 @@ void MetaWatchDigital::displayIdleScreen() void MetaWatchDigital::displayNotification(Notification *n) { - qDebug() << "display notification" << n->title() << n->body(); - - // Render the notification and display it before invoking haptic feedback - _currentMode = NotificationMode; - changeMode(_currentMode); - - renderNotification(n); - - // This will trigger haptic feedback, etc. + qDebug() << "entering notification mode"; MetaWatch::displayNotification(n); } void MetaWatchDigital::displayApplication() { qDebug() << "entering application mode"; - MetaWatch::displayApplication(); } diff --git a/metawatch/metawatchscanner.cpp b/metawatch/metawatchscanner.cpp index 0c1d88e..e560195 100644 --- a/metawatch/metawatchscanner.cpp +++ b/metawatch/metawatchscanner.cpp @@ -45,7 +45,7 @@ void MetaWatchScanner::handleDiscoveredService(const QBluetoothServiceInfo &info foundInfo["driver"] = QString("metawatch-digital"); foundInfo["next-watchlet-button"] = QString("A"); foundInfo["idle-watchlet"] = QString("com.javispedro.sowatch.metawatch.watchface"); - foundInfo["notification-watchlet"] = QString("com.javispedro.sowatch.metawatch.notificationwatchlet"); + foundInfo["notification-watchlet"] = QString("com.javispedro.sowatch.metawatch.notification"); emit watchFound(foundInfo); } } diff --git a/metawatch/qml/com/javispedro/sowatch/metawatch/MWTitle.qml b/metawatch/qml/com/javispedro/sowatch/metawatch/MWTitle.qml index b5ad787..d6d4c42 100644 --- a/metawatch/qml/com/javispedro/sowatch/metawatch/MWTitle.qml +++ b/metawatch/qml/com/javispedro/sowatch/metawatch/MWTitle.qml @@ -27,6 +27,17 @@ Rectangle { } MWLabel { + id: status + anchors.top: parent.top + anchors.left: parent.left + anchors.leftMargin: 1 + height: 8 + font.family: "MetaWatch Large caps 8pt" + font.pixelSize: 8 + text: "" + } + + MWLabel { id: time anchors.right: parent.right anchors.rightMargin: 1 @@ -40,6 +51,7 @@ Rectangle { function updateStatusBar() { var now = new Date time.text = Qt.formatDate(now, "ddd") + " " + Qt.formatTime(now) + status.text = notifications.fullCount() > 0 ? "*" : "" } Timer { diff --git a/metawatch/res/graphics/idle_call.bmp b/metawatch/res/graphics/idle_call.bmp Binary files differdeleted file mode 100644 index 2b69eea..0000000 --- a/metawatch/res/graphics/idle_call.bmp +++ /dev/null diff --git a/metawatch/res/graphics/idle_mail.bmp b/metawatch/res/graphics/idle_mail.bmp Binary files differdeleted file mode 100644 index 253b5bf..0000000 --- a/metawatch/res/graphics/idle_mail.bmp +++ /dev/null diff --git a/metawatch/res/graphics/idle_msg.bmp b/metawatch/res/graphics/idle_msg.bmp Binary files differdeleted file mode 100644 index 0035d4b..0000000 --- a/metawatch/res/graphics/idle_msg.bmp +++ /dev/null |