Changeset View
Changeset View
Standalone View
Standalone View
lib/contextmanager.cpp
Show All 40 Lines | |||||
41 | struct ContextManagerPrivate | 41 | struct ContextManagerPrivate | ||
42 | { | 42 | { | ||
43 | SortedDirModel* mDirModel; | 43 | SortedDirModel* mDirModel; | ||
44 | QItemSelectionModel* mSelectionModel; | 44 | QItemSelectionModel* mSelectionModel; | ||
45 | QUrl mCurrentDirUrl; | 45 | QUrl mCurrentDirUrl; | ||
46 | QUrl mCurrentUrl; | 46 | QUrl mCurrentUrl; | ||
47 | 47 | | |||
48 | QUrl mUrlToSelect; | 48 | QUrl mUrlToSelect; | ||
49 | QUrl mTargetUrl; | ||||
49 | 50 | | |||
50 | bool mSelectedFileItemListNeedsUpdate; | 51 | bool mSelectedFileItemListNeedsUpdate; | ||
51 | QSet<QByteArray> mQueuedSignals; | 52 | QSet<QByteArray> mQueuedSignals; | ||
52 | KFileItemList mSelectedFileItemList; | 53 | KFileItemList mSelectedFileItemList; | ||
53 | 54 | | |||
54 | QTimer* mQueuedSignalsTimer; | 55 | QTimer* mQueuedSignalsTimer; | ||
55 | 56 | | |||
56 | void queueSignal(const QByteArray& signal) | 57 | void queueSignal(const QByteArray& signal) | ||
▲ Show 20 Lines • Show All 217 Lines • ▼ Show 20 Line(s) | |||||
274 | void ContextManager::setUrlToSelect(const QUrl &url) | 275 | void ContextManager::setUrlToSelect(const QUrl &url) | ||
275 | { | 276 | { | ||
276 | GV_RETURN_IF_FAIL(url.isValid()); | 277 | GV_RETURN_IF_FAIL(url.isValid()); | ||
277 | d->mUrlToSelect = url; | 278 | d->mUrlToSelect = url; | ||
278 | setCurrentUrl(url); | 279 | setCurrentUrl(url); | ||
279 | selectUrlToSelect(); | 280 | selectUrlToSelect(); | ||
280 | } | 281 | } | ||
281 | 282 | | |||
283 | QUrl ContextManager::targetUrl() const | ||||
284 | { | ||||
285 | return d->mTargetUrl; | ||||
286 | } | ||||
287 | | ||||
288 | void ContextManager::setTargetUrl(const QUrl &url) | ||||
289 | { | ||||
290 | GV_RETURN_IF_FAIL(url.isValid()); | ||||
291 | d->mTargetUrl = url; | ||||
292 | } | ||||
293 | | ||||
282 | void ContextManager::slotRowsInserted() | 294 | void ContextManager::slotRowsInserted() | ||
cfeck: Double empty line here, too. | |||||
283 | { | 295 | { | ||
284 | // We reach this method when rows have been inserted in the model, but views | 296 | // We reach this method when rows have been inserted in the model, but views | ||
285 | // may not have been updated yet and thus do not have the matching items. | 297 | // may not have been updated yet and thus do not have the matching items. | ||
286 | // Delay the selection of mUrlToSelect so that the view items exist. | 298 | // Delay the selection of mUrlToSelect so that the view items exist. | ||
287 | // | 299 | // | ||
288 | // Without this, when Gwenview is started with an image as argument and the | 300 | // Without this, when Gwenview is started with an image as argument and the | ||
289 | // thumbnail bar is visible, the image will not be selected in the thumbnail | 301 | // thumbnail bar is visible, the image will not be selected in the thumbnail | ||
290 | // bar. | 302 | // bar. | ||
Show All 28 Lines |
Double empty line here, too.