summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sowatchui/qml/WatchPage.qml40
-rw-r--r--sowatchui/watchesmodel.cpp1
-rw-r--r--sowatchui/watchscannermodel.cpp6
3 files changed, 43 insertions, 4 deletions
diff --git a/sowatchui/qml/WatchPage.qml b/sowatchui/qml/WatchPage.qml
index 83932eb..6ddb7e8 100644
--- a/sowatchui/qml/WatchPage.qml
+++ b/sowatchui/qml/WatchPage.qml
@@ -71,11 +71,51 @@ Page {
visible: configQmlLoader.status === Loader.Ready
}
+ ListView {
+ id: watchletsListView
+ interactive: false
+ width: parent.width
+ height: UiConstants.ListItemHeightDefault * count
+ model: ListModel {
+ ListElement {
+ title: "Test"
+ }
+ }
+ delegate: ListDelegate {
+
+ }
+ }
+
+ Button {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("Add watchlet")
+ }
+
GroupHeader {
width: parent.width
text: "Notification sources"
visible: configQmlLoader.status === Loader.Ready
}
+
+ ListView {
+ id: providersListView
+ interactive: false
+ width: parent.width
+ height: UiConstants.ListItemHeightDefault * count
+ model: ListModel {
+ ListElement {
+ title: "Test"
+ }
+ }
+ delegate: ListDelegate {
+
+ }
+ }
+
+ Button {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("Add notification source")
+ }
}
}
ScrollDecorator {
diff --git a/sowatchui/watchesmodel.cpp b/sowatchui/watchesmodel.cpp
index c45a229..69de3a0 100644
--- a/sowatchui/watchesmodel.cpp
+++ b/sowatchui/watchesmodel.cpp
@@ -39,7 +39,6 @@ int WatchesModel::rowCount(const QModelIndex &parent) const
QVariant WatchesModel::data(const QModelIndex &index, int role) const
{
- qDebug() << "Asked for data" << index.row() << index.column() << role;
ConfigKey *config = _list[index.row()];
QString key = config->key();
QString id = key.mid(key.lastIndexOf('/') + 1);
diff --git a/sowatchui/watchscannermodel.cpp b/sowatchui/watchscannermodel.cpp
index 2f58523..5d3b0ac 100644
--- a/sowatchui/watchscannermodel.cpp
+++ b/sowatchui/watchscannermodel.cpp
@@ -53,7 +53,6 @@ int WatchScannerModel::rowCount(const QModelIndex &parent) const
QVariant WatchScannerModel::data(const QModelIndex &index, int role) const
{
- qDebug() << "Asked for data" << index.row() << index.column() << role;
const QVariantMap &info = _list.at(index.row());
switch (role) {
case Qt::DisplayRole:
@@ -68,7 +67,7 @@ QVariant WatchScannerModel::data(const QModelIndex &index, int role) const
void WatchScannerModel::handleWatchFound(const QVariantMap &info)
{
- qDebug() << "Watch found" << info << endl;
+ qDebug() << "Scan found a watch:" << info << endl;
if (!_list.contains(info)) {
int count = _list.count();
beginInsertRows(QModelIndex(), count, count);
@@ -88,6 +87,7 @@ void WatchScannerModel::handleFinished()
qDebug() << "Scan finished";
_active = false;
if (_enabled) {
+ qDebug() << "Setting timer for next scan";
_timer->start();
}
emit activeChanged();
@@ -95,6 +95,6 @@ void WatchScannerModel::handleFinished()
void WatchScannerModel::handleTimeout()
{
- qDebug() << "Restarting scan";
+ qDebug() << "Restarting scan now";
_scanner->start();
}