diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-04-04 00:00:38 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-04-04 00:00:38 +0200 |
commit | 5d8d6fed3fd7dd796a5a3093a7dbd46fab8d380a (patch) | |
tree | 56d1aa55260d0081cfd99b52c53f5ddc78cba200 /topicmodel.h | |
parent | a6d8b23fd03993c0b94d21806ac3a36e251c8b9c (diff) | |
download | tapasboard-5d8d6fed3fd7dd796a5a3093a7dbd46fab8d380a.tar.gz tapasboard-5d8d6fed3fd7dd796a5a3093a7dbd46fab8d380a.zip |
pass Board objects instead of boardUrls around QML
Diffstat (limited to 'topicmodel.h')
-rw-r--r-- | topicmodel.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/topicmodel.h b/topicmodel.h index 39dcdee..6f1e99f 100644 --- a/topicmodel.h +++ b/topicmodel.h @@ -10,7 +10,7 @@ class Board; class TopicModel : public QAbstractListModel { Q_OBJECT - Q_PROPERTY(QString boardUrl READ boardUrl WRITE setBoardUrl NOTIFY boardUrlChanged) + Q_PROPERTY(Board * board READ board WRITE setBoard NOTIFY boardChanged) Q_PROPERTY(int topicId READ topicId WRITE setTopicId NOTIFY topicIdChanged) public: @@ -29,8 +29,8 @@ public: HumanTimeRole }; - QString boardUrl() const; - void setBoardUrl(const QString& url); + Board * board() const; + void setBoard(Board * board); int topicId() const; void setTopicId(const int id); @@ -42,7 +42,7 @@ public: void fetchMore(const QModelIndex &parent = QModelIndex()); signals: - void boardUrlChanged(); + void boardChanged(); void topicIdChanged(); protected: @@ -69,7 +69,6 @@ private slots: void reload(); private: - QString _boardUrl; Board *_board; int _topicId; QList<Post> _data; |