Changeset View
Changeset View
Standalone View
Standalone View
src/kitemviews/kfileitemmodelrolesupdater.h
Show First 20 Lines • Show All 245 Lines • ▼ Show 20 Line(s) | 217 | private: | |||
---|---|---|---|---|---|
246 | 246 | | |||
247 | /** | 247 | /** | ||
248 | * Resolves the sort role of the item and applies it to the model. | 248 | * Resolves the sort role of the item and applies it to the model. | ||
249 | */ | 249 | */ | ||
250 | void applySortRole(int index); | 250 | void applySortRole(int index); | ||
251 | 251 | | |||
252 | void applySortProgressToModel(); | 252 | void applySortProgressToModel(); | ||
253 | 253 | | |||
254 | enum ResolveHint { | 254 | enum class ResolveHint { | ||
255 | ResolveFast, | 255 | ResolveFast, | ||
256 | ResolveAll | 256 | ResolveAll | ||
257 | }; | 257 | }; | ||
258 | bool applyResolvedRoles(int index, ResolveHint hint); | 258 | bool applyResolvedRoles(int index, ResolveHint hint); | ||
259 | QHash<QByteArray, QVariant> rolesData(const KFileItem& item); | 259 | QHash<QByteArray, QVariant> rolesData(const KFileItem& item); | ||
260 | 260 | | |||
261 | /** | 261 | /** | ||
262 | * @return The number of items of the path \a path. | 262 | * @return The number of items of the path \a path. | ||
263 | */ | 263 | */ | ||
264 | int subItemsCount(const QString& path) const; | 264 | int subItemsCount(const QString& path) const; | ||
265 | 265 | | |||
266 | /** | 266 | /** | ||
267 | * Must be invoked if a property has been changed that affects | 267 | * Must be invoked if a property has been changed that affects | ||
268 | * the look of the preview. Takes care to update all previews. | 268 | * the look of the preview. Takes care to update all previews. | ||
269 | */ | 269 | */ | ||
270 | void updateAllPreviews(); | 270 | void updateAllPreviews(); | ||
271 | 271 | | |||
272 | void killPreviewJob(); | 272 | void killPreviewJob(); | ||
273 | 273 | | |||
274 | QList<int> indexesToResolve() const; | 274 | QList<int> indexesToResolve() const; | ||
275 | 275 | | |||
276 | private: | 276 | private: | ||
277 | enum State { | 277 | enum class State { | ||
278 | Idle, | 278 | Idle, | ||
279 | Paused, | 279 | Paused, | ||
280 | ResolvingSortRole, | 280 | ResolvingSortRole, | ||
281 | ResolvingAllRoles, | 281 | ResolvingAllRoles, | ||
282 | PreviewJobRunning | 282 | PreviewJobRunning | ||
283 | }; | 283 | }; | ||
284 | 284 | | |||
285 | State m_state; | 285 | State m_state; | ||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |