summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2012-08-09 19:06:46 +0200
committerJavier S. Pedro <maemo@javispedro.com>2012-08-09 19:06:46 +0200
commit118cb64416eb3bbbfee47bd3c618fc8825d85f54 (patch)
tree8a2d0e51cba858eda83c82dfd591c10b92300487
parentbc5b70046e84c6e5a33a19bd2e64e626fdf0579e (diff)
downloadsowatch-118cb64416eb3bbbfee47bd3c618fc8825d85f54.tar.gz
sowatch-118cb64416eb3bbbfee47bd3c618fc8825d85f54.zip
add some UI stubs
-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();
}