From 5ef8b38e55c1883224fe1f01f47aba45b7b42666 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Mon, 1 Apr 2013 15:04:58 +0200 Subject: initial import --- qml/tapasboard/BoardPage.qml | 57 ++++++++++++++++++++++++++++++++++++++++++ qml/tapasboard/ForumPage.qml | 43 +++++++++++++++++++++++++++++++ qml/tapasboard/GroupHeader.qml | 26 +++++++++++++++++++ qml/tapasboard/MainPage.qml | 17 +++++++++++++ qml/tapasboard/main.qml | 30 ++++++++++++++++++++++ 5 files changed, 173 insertions(+) create mode 100644 qml/tapasboard/BoardPage.qml create mode 100644 qml/tapasboard/ForumPage.qml create mode 100644 qml/tapasboard/GroupHeader.qml create mode 100644 qml/tapasboard/MainPage.qml create mode 100644 qml/tapasboard/main.qml (limited to 'qml') 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") } + } + } +} -- cgit v1.2.3