summaryrefslogtreecommitdiff
path: root/qml/tapasboard
diff options
context:
space:
mode:
Diffstat (limited to 'qml/tapasboard')
-rw-r--r--qml/tapasboard/BoardPage.qml14
-rw-r--r--qml/tapasboard/ForumPage.qml6
-rw-r--r--qml/tapasboard/MainPage.qml7
-rw-r--r--qml/tapasboard/TopicPage.qml4
4 files changed, 17 insertions, 14 deletions
diff --git a/qml/tapasboard/BoardPage.qml b/qml/tapasboard/BoardPage.qml
index 4aeba79..dd1bd24 100644
--- a/qml/tapasboard/BoardPage.qml
+++ b/qml/tapasboard/BoardPage.qml
@@ -9,8 +9,8 @@ Page {
anchors.leftMargin: UiConstants.DefaultMargin
anchors.rightMargin: UiConstants.DefaultMargin
- property string boardUrl;
- property int rootForumId;
+ property Board board : null;
+ property int forumId;
tools: ToolBarLayout {
ToolIcon {
@@ -25,8 +25,8 @@ Page {
id: forumsView
anchors.fill: parent
model: BoardModel {
- boardUrl: boardPage.boardUrl
- rootForumId: boardPage.rootForumId
+ board: boardPage.board
+ forumId: boardPage.forumId
}
section.criteria: ViewSection.FullString
section.property: "category"
@@ -71,12 +71,12 @@ Page {
onClicked: {
if (model.subOnly) {
pageStack.push(Qt.resolvedUrl("BoardPage.qml"), {
- boardUrl: boardPage.boardUrl,
- rootForumId: model.forumId
+ board: boardPage.board,
+ forumId: model.forumId
});
} else {
pageStack.push(Qt.resolvedUrl("ForumPage.qml"), {
- boardUrl: boardPage.boardUrl,
+ board: boardPage.board,
forumId: model.forumId
});
}
diff --git a/qml/tapasboard/ForumPage.qml b/qml/tapasboard/ForumPage.qml
index 6e39fe2..18953cb 100644
--- a/qml/tapasboard/ForumPage.qml
+++ b/qml/tapasboard/ForumPage.qml
@@ -9,7 +9,7 @@ Page {
anchors.leftMargin: UiConstants.DefaultMargin
anchors.rightMargin: UiConstants.DefaultMargin
- property string boardUrl;
+ property Board board: null;
property int forumId;
tools: ToolBarLayout {
@@ -25,7 +25,7 @@ Page {
id: topicsView
anchors.fill: parent
model: ForumModel {
- boardUrl: forumPage.boardUrl
+ board: forumPage.board
forumId: forumPage.forumId
}
delegate: EmptyListDelegate {
@@ -56,7 +56,7 @@ Page {
onClicked: {
pageStack.push(Qt.resolvedUrl("TopicPage.qml"), {
- boardUrl: forumPage.boardUrl,
+ board: forumPage.board,
topicId: model.topicId
});
}
diff --git a/qml/tapasboard/MainPage.qml b/qml/tapasboard/MainPage.qml
index de3240a..f94b505 100644
--- a/qml/tapasboard/MainPage.qml
+++ b/qml/tapasboard/MainPage.qml
@@ -21,9 +21,12 @@ Page {
}
onClicked: {
+ var board = boardManager.getBoard(model.boardUrl,
+ model.loginUsername,
+ model.loginPassword);
pageStack.push(Qt.resolvedUrl("BoardPage.qml"), {
- boardUrl: model.boardUrl,
- rootForumId: 0
+ board: board,
+ forumId: board.rootForumId
});
}
}
diff --git a/qml/tapasboard/TopicPage.qml b/qml/tapasboard/TopicPage.qml
index 805154f..ba132b5 100644
--- a/qml/tapasboard/TopicPage.qml
+++ b/qml/tapasboard/TopicPage.qml
@@ -9,7 +9,7 @@ Page {
anchors.leftMargin: UiConstants.DefaultMargin
anchors.rightMargin: UiConstants.DefaultMargin
- property string boardUrl;
+ property Board board;
property int topicId;
tools: ToolBarLayout {
@@ -25,7 +25,7 @@ Page {
id: postsView
anchors.fill: parent
model: TopicModel {
- boardUrl: topicPage.boardUrl
+ board: topicPage.board
topicId: topicPage.topicId
}
section.property: "humanDate"