~super-friends/qml-friends/13.10

« back to all changes in this revision

Viewing changes to modules/Friends/plugin/streammodel.cpp

  • Committer: Tarmac
  • Author(s): Ken VanDine
  • Date: 2013-04-25 20:34:21 UTC
  • mfrom: (31.1.10 docs)
  • Revision ID: tarmac-20130425203421-vptqc8vvvn72e25g
Generate docs and add -doc package.

Approved by PS Jenkins bot, Robert Bruce Park.

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
{
99
99
}
100
100
 
 
101
/*!
 
102
 * \qmltype StreamModel
 
103
 * \inqmlmodule Friends 0.1
 
104
 * \ingroup Friends
 
105
 *
 
106
 * \brief A model of the user's Friends feeds.
 
107
 *
 
108
 * The SteamsModel is a model based on the model provided by the Friends
 
109
 * service, conveniently sorted with pre-defined filters.  By default,
 
110
 * the model contains everything except comments.  You can filter
 
111
 * based on stream, account or service.
 
112
 *
 
113
 * Examples of use:
 
114
 *
 
115
 * 1. Model of the complete Friends feed:
 
116
 * \qml
 
117
 *
 
118
 * Item {
 
119
 *     StreamModel {
 
120
 *         id: StreamModel
 
121
 *     }
 
122
 *
 
123
 *     ListView {
 
124
 *         model: StreamModel
 
125
 *         delegate: Text { text: "message: " + column_9 }
 
126
 *     }
 
127
 * }
 
128
 *
 
129
 * \endqml
 
130
 *
 
131
 * 2. Model of the Friends feed, limited to facebook:
 
132
 * \qml
 
133
 *
 
134
 * Item {
 
135
 *     StreamModel {
 
136
 *         id: StreamModel
 
137
 *         service: "facebook"
 
138
 *     }
 
139
 *
 
140
 *     ListView {
 
141
 *         model: StreamModel
 
142
 *         delegate: Text { text: "message: " + column_9 }
 
143
 *     }
 
144
 * }
 
145
 * \endqml
 
146
 *
 
147
 * 3. Model of the Friends feed, limited to a single account:
 
148
 * \qml
 
149
 *
 
150
 * Item {
 
151
 *     StreamModel {
 
152
 *         id: StreamModel
 
153
 *         account: 1 // The account ID provided but Ubuntu.OnlineAccounts
 
154
 *     }
 
155
 *
 
156
 *     ListView {
 
157
 *         model: StreamModel
 
158
 *         delegate: Text { text: "message: " + column_9 }
 
159
 *     }
 
160
 * }
 
161
 * \endqml
 
162
 *
 
163
 * 4. Model of the Friends feed, limited to a thread of comments:
 
164
 * \qml
 
165
 *
 
166
 * Item {
 
167
 *     StreamModel {
 
168
 *         id: StreamModel
 
169
 *         stream: "reply_to/"+msg_id // The message ID found in column_2
 
170
 *     }
 
171
 *
 
172
 *     ListView {
 
173
 *         model: StreamModel
 
174
 *         delegate: Text { text: "message: " + column_9 }
 
175
 *     }
 
176
 * }
 
177
 * \endqml
 
178
 *
 
179
 * 5. Model of the Friends feed, limited to a specific stream, like private messages:
 
180
 * \qml
 
181
 *
 
182
 * Item {
 
183
 *     StreamModel {
 
184
 *         id: StreamModel
 
185
 *         stream: "private"
 
186
 *     }
 
187
 *
 
188
 *     ListView {
 
189
 *         model: StreamModel
 
190
 *         delegate: Text { text: "message: " + column_9 }
 
191
 *     }
 
192
 * }
 
193
 * \endqml
 
194
 *
 
195
 */
101
196
StreamModel::StreamModel(DeeListModel *parent) :
102
197
    DeeListModel(parent),
103
198
    d_ptr(new StreamModelPrivate(this))
163
258
}
164
259
 
165
260
/*!
166
 
 * \qmlproperty string StreamModel::account
 
261
 * \qmlproperty uint StreamModel::account
167
262
 * If set, the model will include only this account
168
263
 */
169
264
uint StreamModel::account() const