Changeset View
Changeset View
Standalone View
Standalone View
src/qtquick/CategoryEntriesModel.cpp
Context not available. | |||||
53 | obj->setProperty("title", entry->title); | 53 | obj->setProperty("title", entry->title); | ||
---|---|---|---|---|---|
54 | obj->setProperty("totalPages", entry->totalPages); | 54 | obj->setProperty("totalPages", entry->totalPages); | ||
55 | obj->setProperty("thumbnail", entry->thumbnail); | 55 | obj->setProperty("thumbnail", entry->thumbnail); | ||
56 | obj->setProperty("description", entry->description); | ||||
57 | obj->setProperty("comment", entry->comment); | ||||
58 | obj->setProperty("tags", entry->tags); | ||||
59 | obj->setProperty("rating", entry->rating); | ||||
56 | return obj; | 60 | return obj; | ||
57 | } | 61 | } | ||
58 | }; | 62 | }; | ||
Context not available. | |||||
86 | roles[CategoryEntriesModelRole] = "categoryEntriesModel"; | 90 | roles[CategoryEntriesModelRole] = "categoryEntriesModel"; | ||
87 | roles[CategoryEntryCountRole] = "categoryEntriesCount"; | 91 | roles[CategoryEntryCountRole] = "categoryEntriesCount"; | ||
88 | roles[ThumbnailRole] = "thumbnail"; | 92 | roles[ThumbnailRole] = "thumbnail"; | ||
93 | roles[DescriptionRole] = "description"; | ||||
94 | roles[CommentRole] = "comment"; | ||||
95 | roles[TagsRole] = "tags"; | ||||
96 | roles[RatingRole] = "rating"; | ||||
89 | return roles; | 97 | return roles; | ||
90 | } | 98 | } | ||
91 | 99 | | |||
Context not available. | |||||
159 | case ThumbnailRole: | 167 | case ThumbnailRole: | ||
160 | result.setValue(entry->thumbnail); | 168 | result.setValue(entry->thumbnail); | ||
161 | break; | 169 | break; | ||
170 | case DescriptionRole: | ||||
171 | result.setValue(entry->description); | ||||
172 | break; | ||||
173 | case CommentRole: | ||||
174 | result.setValue(entry->comment); | ||||
175 | break; | ||||
176 | case TagsRole: | ||||
177 | result.setValue(entry->tags); | ||||
178 | break; | ||||
179 | case RatingRole: | ||||
180 | result.setValue(entry->rating); | ||||
181 | break; | ||||
162 | default: | 182 | default: | ||
163 | result.setValue(QString("Unknown role")); | 183 | result.setValue(QString("Unknown role")); | ||
164 | break; | 184 | break; | ||
Context not available. | |||||
354 | int totalPages = data.attribute("peruse.totalPages").toInt(); | 374 | int totalPages = data.attribute("peruse.totalPages").toInt(); | ||
355 | obj->setProperty("totalPages", QVariant::fromValue<int>(totalPages)); | 375 | obj->setProperty("totalPages", QVariant::fromValue<int>(totalPages)); | ||
356 | } | 376 | } | ||
377 | qDebug()<<"baloo rating"<< filename<< data.rating(); | ||||
378 | obj->setProperty("rating", QVariant::fromValue<int>(data.rating())); | ||||
379 | if (!data.tags().isEmpty()) { | ||||
380 | obj->setProperty("tags", QVariant::fromValue<QStringList>(data.tags())); | ||||
381 | } | ||||
382 | if (!data.userComment().isEmpty()) { | ||||
383 | obj->setProperty("comment", QVariant::fromValue<QString>(data.userComment())); | ||||
384 | } | ||||
357 | obj->setProperty("filename", filename); | 385 | obj->setProperty("filename", filename); | ||
358 | 386 | | |||
359 | QString thumbnail; | 387 | QString thumbnail; | ||
Context not available. |