--- /dev/null
+import QtQuick 1.1
+import Qt.labs.components 1.0
+import com.nokia.meego 1.0
+import com.meego 1.0
+import com.nokia.extras 1.0
+
+import QtRapids 1.0
+
+Page {
+ id: tabbarPage
+
+ property bool busy: Boolean(tabGroup.currentTab.busy)
+ anchors.margins: rootWindow.pageMargin
+
+ tools: ToolBarLayout {
+ ToolIcon { iconId: "toolbar-back"; onClicked: pageStack.pop(); }
+ ButtonRow {
+ platformStyle: TabButtonStyle { }
+ TabButton {
+ text: "Downloads"
+ tab: downloads
+ }
+ TabButton {
+ text: "Seeds"
+ tab: seeds
+ }
+ }
+ ToolIcon { iconId: "toolbar-view-menu"; onClicked: (myMenu.status == DialogStatus.Closed) ? myMenu.open() : myMenu.close() }
+ }
+// Text {
+// text: "Hello World!"
+// font.family: "Helvetica"
+// font.pointSize: 24
+// color: "red"
+// anchors.fill: parent
+// }
+
+ ListView {
+ width: 200; height: 400
+/*
+ DownloadListModel {
+ id: downloadModel
+ // TODO: Does not work like this. Need properties to set from QML?
+ // Try setting test data from C++ side and view here..
+ /*
+ ListElement {
+ Hash: "QMLHASH1"
+ Size: "Size1"
+ Status: "DONE1"
+ }
+ ListElement {
+ Hash: "QMLHASH2"
+ Size: "Size2"
+ Status: "DONE2"
+ }
+ ListElement {
+ Hash: "QMLHASH3"
+ Size: "Size3"
+ Status: "DONE3"
+ }
+ }
+*/
+ Component {
+ id: downloadDelegate
+ Item {
+ height: 40
+ width: parent.width
+ Text {
+ id: hashText
+ text: hash
+ }
+ Text {
+ id: nameText
+ anchors.leftMargin: 10
+ anchors.left: hashText.right
+ text: name
+ }
+ Text {
+ id: seedsText
+ anchors.leftMargin: 10
+ anchors.left: nameText.right
+ text: seeds
+ }
+ Text {
+ id: leechesText
+ anchors.leftMargin: 10
+ anchors.left: seedsText.right
+ text: leeches
+ }
+ }
+ }
+
+ // downloadModel is from rootContext, set in main.cpp
+ model: downloadModel
+ delegate: downloadDelegate
+ }
+
+ /*
+ ListModel {
+ id: pagesModel
+ ListElement {
+ page: "CountBubble.qml"
+ title: "CountBubble"
+ subtitle: "Indicates current count"
+ }
+ ListElement {
+ page: "NetPromoterScore.qml"
+ title: "NetPromoterScore"
+ subtitle: "Shows net promotion query page"
+ }
+ ListElement {
+ page: "PageIndicator.qml"
+ title: "PageIndicator"
+ subtitle: "Indicates total & current pages"
+ }
+ ListElement {
+ page: "RatingIndicator.qml"
+ title: "RatingIndicator"
+ subtitle: "Indicates ratings"
+ }
+ ListElement {
+ page: "ListDelegates.qml"
+ title: "List Delegates"
+ subtitle: "Various List Delegates"
+ }
+ ListElement {
+ page: "MoreIndicator.qml"
+ title: "MoreIndicator"
+ subtitle: "Indicates that there are more contents"
+ }
+ ListElement {
+ page: "StyledButtons.qml"
+ title: "StyledButtons"
+ subtitle: "Buttons with different styles"
+ }
+ }
+ ListView {
+ id: listview
+ anchors.fill: parent
+ model: pagesModel
+
+ delegate: ListDelegate {
+ Image {
+ source: "image://theme/icon-m-common-drilldown-arrow" + (theme.inverted ? "-inverse" : "")
+ anchors.right: parent.right;
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ subtitleColor: "#cc6633"
+ onClicked: { openFile(model.page); }
+ }
+ }
+*/
+ TabGroup {
+ id: tabGroup
+
+ currentTab: downloads
+
+ PageStack {
+ id: downloads
+ }
+ PageStack {
+ id: seeds
+ }
+ Page {
+ id: tab3
+ Column {
+ spacing: 10
+
+ Text {
+ text: "This is a single page"
+ }
+ }
+ }
+ }
+
+}
\ No newline at end of file