summaryrefslogtreecommitdiff
path: root/qml/tapasboard
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-04-01 15:04:58 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-04-01 15:04:58 +0200
commit5ef8b38e55c1883224fe1f01f47aba45b7b42666 (patch)
tree67a873c6a7c5263d202793314c3b3a61543fbb40 /qml/tapasboard
downloadtapasboard-5ef8b38e55c1883224fe1f01f47aba45b7b42666.tar.gz
tapasboard-5ef8b38e55c1883224fe1f01f47aba45b7b42666.zip
initial import
Diffstat (limited to 'qml/tapasboard')
-rw-r--r--qml/tapasboard/BoardPage.qml57
-rw-r--r--qml/tapasboard/ForumPage.qml43
-rw-r--r--qml/tapasboard/GroupHeader.qml26
-rw-r--r--qml/tapasboard/MainPage.qml17
-rw-r--r--qml/tapasboard/main.qml30
5 files changed, 173 insertions, 0 deletions
diff --git a/qml/tapasboard/BoardPage.qml b/qml/tapasboard/BoardPage.qml
new file mode 100644
index 0000000..7c3f1cd
--- /dev/null
+++ b/qml/tapasboard/BoardPage.qml
@@ -0,0 +1,57 @@
+import QtQuick 1.1
+import com.nokia.meego 1.1
+import com.nokia.extras 1.1
+import com.javispedro.tapasboard 1.0
+
+Page {
+ id: boardPage
+
+ anchors.leftMargin: UiConstants.DefaultMargin
+ anchors.rightMargin: UiConstants.DefaultMargin
+
+ property string boardUrl;
+ property int rootForumId;
+
+ tools: ToolBarLayout {
+ ToolIcon {
+ id: backToolIcon
+ platformIconId: "toolbar-back"
+ anchors.left: parent.left
+ onClicked: pageStack.pop()
+ }
+ }
+
+ ListView {
+ id: forumsView
+ anchors.fill: parent
+ model: BoardModel {
+ boardUrl: boardPage.boardUrl
+ rootForumId: boardPage.rootForumId
+ }
+ section.criteria: ViewSection.FullString
+ section.property: "category"
+ section.delegate: GroupHeader {
+ width: parent.width
+ text: section
+ }
+
+ delegate: ListDelegate {
+ Image {
+ source: "image://theme/icon-m-common-drilldown-arrow" + (theme.inverted ? "-inverse" : "")
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ onClicked: {
+ pageStack.push(Qt.resolvedUrl("ForumPage.qml"), {
+ boardUrl: boardPage.boardUrl,
+ forumId: model.forumId
+ });
+ }
+ }
+ }
+
+ ScrollDecorator {
+ flickableItem: forumsView
+ }
+}
diff --git a/qml/tapasboard/ForumPage.qml b/qml/tapasboard/ForumPage.qml
new file mode 100644
index 0000000..a70fe74
--- /dev/null
+++ b/qml/tapasboard/ForumPage.qml
@@ -0,0 +1,43 @@
+import QtQuick 1.1
+import com.nokia.meego 1.1
+import com.nokia.extras 1.1
+import com.javispedro.tapasboard 1.0
+
+Page {
+ id: forumPage
+
+ anchors.leftMargin: UiConstants.DefaultMargin
+ anchors.rightMargin: UiConstants.DefaultMargin
+
+ property string boardUrl;
+ property int forumId;
+
+ tools: ToolBarLayout {
+ ToolIcon {
+ id: backToolIcon
+ platformIconId: "toolbar-back"
+ anchors.left: parent.left
+ onClicked: pageStack.pop()
+ }
+ }
+
+ ListView {
+ id: topicsView
+ anchors.fill: parent
+ model: ForumModel {
+ boardUrl: forumPage.boardUrl
+ forumId: forumPage.forumId
+ }
+ delegate: ListDelegate {
+ Image {
+ source: "image://theme/icon-m-common-drilldown-arrow" + (theme.inverted ? "-inverse" : "")
+ anchors.right: parent.right
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ }
+ }
+
+ ScrollDecorator {
+ flickableItem: topicsView
+ }
+}
diff --git a/qml/tapasboard/GroupHeader.qml b/qml/tapasboard/GroupHeader.qml
new file mode 100644
index 0000000..0350ee0
--- /dev/null
+++ b/qml/tapasboard/GroupHeader.qml
@@ -0,0 +1,26 @@
+import QtQuick 1.1
+import com.nokia.meego 1.1
+
+Item {
+ id: header
+ height: 40
+
+ property alias text: headerLabel.text
+
+ Text {
+ id: headerLabel
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ anchors.rightMargin: 8
+ anchors.bottomMargin: 2
+ font: UiConstants.GroupHeaderFont
+ color: theme.inverted ? "#4D4D4D" : "#3C3C3C";
+ }
+ Image {
+ anchors.right: headerLabel.left
+ anchors.left: parent.left
+ anchors.verticalCenter: headerLabel.verticalCenter
+ anchors.rightMargin: 24
+ source: "image://theme/meegotouch-groupheader" + (theme.inverted ? "-inverted" : "") + "-background"
+ }
+}
diff --git a/qml/tapasboard/MainPage.qml b/qml/tapasboard/MainPage.qml
new file mode 100644
index 0000000..7337b12
--- /dev/null
+++ b/qml/tapasboard/MainPage.qml
@@ -0,0 +1,17 @@
+import QtQuick 1.1
+import com.nokia.meego 1.0
+
+Page {
+ tools: commonTools
+
+ Button {
+ anchors {
+ centerIn: parent
+ }
+ text: qsTr("Open board")
+ onClicked: pageStack.push(Qt.resolvedUrl("BoardPage.qml"), {
+ boardUrl: "http://support.tapatalk.com/mobiquo/mobiquo.php",
+ rootForumId: 0
+ })
+ }
+}
diff --git a/qml/tapasboard/main.qml b/qml/tapasboard/main.qml
new file mode 100644
index 0000000..bfb4552
--- /dev/null
+++ b/qml/tapasboard/main.qml
@@ -0,0 +1,30 @@
+import QtQuick 1.1
+import com.nokia.meego 1.0
+
+PageStackWindow {
+ id: appWindow
+
+ initialPage: mainPage
+
+ MainPage {
+ id: mainPage
+ }
+
+ ToolBarLayout {
+ id: commonTools
+ visible: true
+ ToolIcon {
+ platformIconId: "toolbar-view-menu"
+ anchors.right: (parent === undefined) ? undefined : parent.right
+ onClicked: (myMenu.status === DialogStatus.Closed) ? myMenu.open() : myMenu.close()
+ }
+ }
+
+ Menu {
+ id: myMenu
+ visualParent: pageStack
+ MenuLayout {
+ MenuItem { text: qsTr("Sample menu item") }
+ }
+ }
+}