diff options
Diffstat (limited to 'qml/tapasboard/BoardPage.qml')
-rw-r--r-- | qml/tapasboard/BoardPage.qml | 57 |
1 files changed, 57 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 + } +} |