Refactoring and model improvements
[quicknewsreader] / qml / QuickNewsReader / content / view / Sources.qml
diff --git a/qml/QuickNewsReader/content/view/Sources.qml b/qml/QuickNewsReader/content/view/Sources.qml
new file mode 100644 (file)
index 0000000..ab3e640
--- /dev/null
@@ -0,0 +1,31 @@
+import QtQuick 1.0
+
+Rectangle {
+    id: sourcesRect
+    width: 150; height: window.height
+    color: "#dfdfdf"
+
+    ListModel {
+        id: sourceList
+
+        ListElement {  }
+        ListElement {  }
+        ListElement {  }
+    }
+
+    ListView {
+        focus: true
+        id: sources
+        x: 0; y: 0
+        width: 150; height: window.height
+        currentIndex: currentSourceIndex
+        model: sourceList
+        footer: quitButtonDelegate
+        delegate: SourceDelegate {}
+        highlight: Rectangle { color: "steelblue" }
+        highlightMoveSpeed: 9999999
+    }
+    ScrollBar { scrollArea: sources; height: sources.height; width: 8; anchors.right: sources.right }
+
+    Component.onCompleted: sources.currentIndex = -1
+}