]> cloud.milkyroute.net Git - dolphin.git/blob - src/views/dolphinview.h
SVN_SILENT made messages (.desktop file) - always resolve ours
[dolphin.git] / src / views / dolphinview.h
1 /***************************************************************************
2 * Copyright (C) 2006-2009 by Peter Penz <peter.penz19@gmail.com> *
3 * Copyright (C) 2006 by Gregor Kališnik <gregor@podnapisi.net> *
4 * *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
14 * *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
19 ***************************************************************************/
20
21 #ifndef DOLPHINVIEW_H
22 #define DOLPHINVIEW_H
23
24 #include "dolphintabwidget.h"
25 #include "dolphin_export.h"
26
27 #include <KFileItem>
28 #include <KIO/Job>
29 #include <config-baloo.h>
30 #include <kio/fileundomanager.h>
31 #include <kparts/part.h>
32
33 #include <QMimeData>
34 #include <QUrl>
35 #include <QWidget>
36
37 typedef KIO::FileUndoManager::CommandType CommandType;
38 class QVBoxLayout;
39 class DolphinItemListView;
40 class KFileItemModel;
41 class KItemListContainer;
42 class KItemModelBase;
43 class KItemSet;
44 class ToolTipManager;
45 class VersionControlObserver;
46 class ViewProperties;
47 class QGraphicsSceneDragDropEvent;
48 class QRegExp;
49
50 /**
51 * @short Represents a view for the directory content.
52 *
53 * View modes for icons, compact and details are supported. It's
54 * possible to adjust:
55 * - sort order
56 * - sort type
57 * - show hidden files
58 * - show previews
59 * - enable grouping
60 */
61 class DOLPHIN_EXPORT DolphinView : public QWidget
62 {
63 Q_OBJECT
64
65 public:
66 /**
67 * Defines the view mode for a directory. The
68 * view mode is automatically updated if the directory itself
69 * defines a view mode (see class ViewProperties for details).
70 */
71 enum Mode
72 {
73 /**
74 * The items are shown as icons with a name-label below.
75 */
76 IconsView = 0,
77
78 /**
79 * The icon, the name and the size of the items are
80 * shown per default as a table.
81 */
82 DetailsView,
83
84 /**
85 * The items are shown as icons with the name-label aligned
86 * to the right side.
87 */
88 CompactView
89 };
90
91 /**
92 * @param url Specifies the content which should be shown.
93 * @param parent Parent widget of the view.
94 */
95 DolphinView(const QUrl& url, QWidget* parent);
96
97 ~DolphinView() override;
98
99 /**
100 * Returns the current active URL, where all actions are applied.
101 * The URL navigator is synchronized with this URL.
102 */
103 QUrl url() const;
104
105 /**
106 * If \a active is true, the view will marked as active. The active
107 * view is defined as view where all actions are applied to.
108 */
109 void setActive(bool active);
110 bool isActive() const;
111
112 /**
113 * Changes the view mode for the current directory to \a mode.
114 * If the view properties should be remembered for each directory
115 * (GeneralSettings::globalViewProps() returns false), then the
116 * changed view mode will be stored automatically.
117 */
118 void setMode(Mode mode);
119 Mode mode() const;
120
121 /**
122 * Turns on the file preview for the all files of the current directory,
123 * if \a show is true.
124 * If the view properties should be remembered for each directory
125 * (GeneralSettings::globalViewProps() returns false), then the
126 * preview setting will be stored automatically.
127 */
128 void setPreviewsShown(bool show);
129 bool previewsShown() const;
130
131 /**
132 * Shows all hidden files of the current directory,
133 * if \a show is true.
134 * If the view properties should be remembered for each directory
135 * (GeneralSettings::globalViewProps() returns false), then the
136 * show hidden file setting will be stored automatically.
137 */
138 void setHiddenFilesShown(bool show);
139 bool hiddenFilesShown() const;
140
141 /**
142 * Turns on sorting by groups if \a enable is true.
143 */
144 void setGroupedSorting(bool grouped);
145 bool groupedSorting() const;
146
147 /**
148 * Returns the items of the view.
149 */
150 KFileItemList items() const;
151
152 /**
153 * @return The number of items. itemsCount() is faster in comparison
154 * to items().count().
155 */
156 int itemsCount() const;
157
158 /**
159 * Returns the selected items. The list is empty if no item has been
160 * selected.
161 */
162 KFileItemList selectedItems() const;
163
164 /**
165 * Returns the number of selected items (this is faster than
166 * invoking selectedItems().count()).
167 */
168 int selectedItemsCount() const;
169
170 /**
171 * Marks the items indicated by \p urls to get selected after the
172 * directory DolphinView::url() has been loaded. Note that nothing
173 * gets selected if no loading of a directory has been triggered
174 * by DolphinView::setUrl() or DolphinView::reload().
175 */
176 void markUrlsAsSelected(const QList<QUrl> &urls);
177
178 /**
179 * Marks the item indicated by \p url to be scrolled to and as the
180 * current item after directory DolphinView::url() has been loaded.
181 */
182 void markUrlAsCurrent(const QUrl& url);
183
184 /**
185 * All items that match to the pattern \a pattern will get selected
186 * if \a enabled is true and deselected if \a enabled is false.
187 */
188 void selectItems(const QRegExp& pattern, bool enabled);
189
190 /**
191 * Sets the zoom level to \a level. It is assured that the used
192 * level is adjusted to be inside the range ZoomLevelInfo::minimumLevel() and
193 * ZoomLevelInfo::maximumLevel().
194 */
195 void setZoomLevel(int level);
196 int zoomLevel() const;
197
198 void setSortRole(const QByteArray& role);
199 QByteArray sortRole() const;
200
201 void setSortOrder(Qt::SortOrder order);
202 Qt::SortOrder sortOrder() const;
203
204 /** Sets a separate sorting with folders first (true) or a mixed sorting of files and folders (false). */
205 void setSortFoldersFirst(bool foldersFirst);
206 bool sortFoldersFirst() const;
207
208 /** Sets the additional information which should be shown for the items. */
209 void setVisibleRoles(const QList<QByteArray>& roles);
210
211 /** Returns the additional information which should be shown for the items. */
212 QList<QByteArray> visibleRoles() const;
213
214 void reload();
215
216 /**
217 * Refreshes the view to get synchronized with the settings (e.g. icons size,
218 * font, ...).
219 */
220 void readSettings();
221
222 /**
223 * Saves the current settings (e.g. icons size, font, ..).
224 */
225 void writeSettings();
226
227 /**
228 * Filters the currently shown items by \a nameFilter. All items
229 * which contain the given filter string will be shown.
230 */
231 void setNameFilter(const QString& nameFilter);
232 QString nameFilter() const;
233
234 /**
235 * Filters the currently shown items by \a filters. All items
236 * whose content-type matches those given by the list of filters
237 * will be shown.
238 */
239 void setMimeTypeFilters(const QStringList& filters);
240 QStringList mimeTypeFilters() const;
241
242 /**
243 * Returns a textual representation of the state of the current
244 * folder or selected items, suitable for use in the status bar.
245 */
246 QString statusBarText() const;
247
248 /**
249 * Returns the version control actions that are provided for the items \p items.
250 * Usually the actions are presented in the context menu.
251 */
252 QList<QAction*> versionControlActions(const KFileItemList& items) const;
253
254 /**
255 * Returns the state of the paste action:
256 * first is whether the action should be enabled
257 * second is the text for the action
258 */
259 QPair<bool, QString> pasteInfo() const;
260
261 /**
262 * If \a tabsForFiles is true, the signal tabRequested() will also
263 * emitted also for files. Per default tabs for files is disabled
264 * and hence the signal tabRequested() will only be emitted for
265 * directories.
266 */
267 void setTabsForFilesEnabled(bool tabsForFiles);
268 bool isTabsForFilesEnabled() const;
269
270 /**
271 * Returns true if the current view allows folders to be expanded,
272 * i.e. presents a hierarchical view to the user.
273 */
274 bool itemsExpandable() const;
275
276 /**
277 * Restores the view state (current item, contents position, details view expansion state)
278 */
279 void restoreState(QDataStream& stream);
280
281 /**
282 * Saves the view state (current item, contents position, details view expansion state)
283 */
284 void saveState(QDataStream& stream);
285
286 /**
287 * Returns the root item which represents the current URL.
288 */
289 KFileItem rootItem() const;
290
291 /**
292 * Sets a context that is used for remembering the view-properties.
293 * Per default the context is empty and the path of the currently set URL
294 * is used for remembering the view-properties. Setting a custom context
295 * makes sense if specific types of URLs (e.g. search-URLs) should
296 * share common view-properties.
297 */
298 void setViewPropertiesContext(const QString& context);
299 QString viewPropertiesContext() const;
300
301 /**
302 * Checks if the given \a item can be opened as folder (e.g. archives).
303 * This function will also adjust the \a url (e.g. change the protocol).
304 * @return a valid and adjusted url if the item can be opened as folder,
305 * otherwise return an empty url.
306 */
307 static QUrl openItemAsFolderUrl(const KFileItem& item, const bool browseThroughArchives = true);
308
309 public slots:
310 /**
311 * Changes the directory to \a url. If the current directory is equal to
312 * \a url, nothing will be done (use DolphinView::reload() instead).
313 */
314 void setUrl(const QUrl& url);
315
316 /**
317 * Selects all items.
318 * @see DolphinView::selectedItems()
319 */
320 void selectAll();
321
322 /**
323 * Inverts the current selection: selected items get unselected,
324 * unselected items get selected.
325 * @see DolphinView::selectedItems()
326 */
327 void invertSelection();
328
329 void clearSelection();
330
331 /**
332 * Triggers the renaming of the currently selected items, where
333 * the user must input a new name for the items.
334 */
335 void renameSelectedItems();
336
337 /**
338 * Moves all selected items to the trash.
339 */
340 void trashSelectedItems();
341
342 /**
343 * Deletes all selected items.
344 */
345 void deleteSelectedItems();
346
347 /**
348 * Copies all selected items to the clipboard and marks
349 * the items as cut.
350 */
351 void cutSelectedItems();
352
353 /** Copies all selected items to the clipboard. */
354 void copySelectedItems();
355
356 /** Pastes the clipboard data to this view. */
357 void paste();
358
359 /**
360 * Pastes the clipboard data into the currently selected
361 * folder. If the current selection is not exactly one folder, no
362 * paste operation is done.
363 */
364 void pasteIntoFolder();
365
366 /**
367 * Handles a drop of @p dropEvent onto widget @p dropWidget and destination @p destUrl
368 */
369 void dropUrls(const QUrl &destUrl, QDropEvent *dropEvent, QWidget *dropWidget);
370
371 void stopLoading();
372
373 /** Activates the view if the item list container gets focus. */
374 bool eventFilter(QObject* watched, QEvent* event) override;
375
376 signals:
377 /**
378 * Is emitted if the view has been activated by e. g. a mouse click.
379 */
380 void activated();
381
382 /** Is emitted if the URL of the view has been changed to \a url. */
383 void urlChanged(const QUrl& url);
384
385 /**
386 * Is emitted when clicking on an item with the left mouse button.
387 */
388 void itemActivated(const KFileItem& item);
389
390 /**
391 * Is emitted when multiple items have been activated by e. g.
392 * context menu open with.
393 */
394 void itemsActivated(const KFileItemList& items);
395
396 /**
397 * Is emitted if items have been added or deleted.
398 */
399 void itemCountChanged();
400
401 /**
402 * Is emitted if a new tab should be opened for the URL \a url.
403 */
404 void tabRequested(const QUrl& url, DolphinTabWidget::TabPlacement tabPlacement);
405
406 /**
407 * Is emitted if the view mode (IconsView, DetailsView,
408 * PreviewsView) has been changed.
409 */
410 void modeChanged(DolphinView::Mode current, DolphinView::Mode previous);
411
412 /** Is emitted if the 'show preview' property has been changed. */
413 void previewsShownChanged(bool shown);
414
415 /** Is emitted if the 'show hidden files' property has been changed. */
416 void hiddenFilesShownChanged(bool shown);
417
418 /** Is emitted if the 'grouped sorting' property has been changed. */
419 void groupedSortingChanged(bool groupedSorting);
420
421 /** Is emitted if the sorting by name, size or date has been changed. */
422 void sortRoleChanged(const QByteArray& role);
423
424 /** Is emitted if the sort order (ascending or descending) has been changed. */
425 void sortOrderChanged(Qt::SortOrder order);
426
427 /**
428 * Is emitted if the sorting of files and folders (separate with folders
429 * first or mixed) has been changed.
430 */
431 void sortFoldersFirstChanged(bool foldersFirst);
432
433 /** Is emitted if the additional information shown for this view has been changed. */
434 void visibleRolesChanged(const QList<QByteArray>& current,
435 const QList<QByteArray>& previous);
436
437 /** Is emitted if the zoom level has been changed by zooming in or out. */
438 void zoomLevelChanged(int current, int previous);
439
440 /**
441 * Is emitted if information of an item is requested to be shown e. g. in the panel.
442 * If item is null, no item information request is pending.
443 */
444 void requestItemInfo(const KFileItem& item);
445
446 /**
447 * Is emitted whenever the selection has been changed.
448 */
449 void selectionChanged(const KFileItemList& selection);
450
451 /**
452 * Is emitted if a context menu is requested for the item \a item,
453 * which is part of \a url. If the item is null, the context menu
454 * for the URL should be shown and the custom actions \a customActions
455 * will be added.
456 */
457 void requestContextMenu(const QPoint& pos,
458 const KFileItem& item,
459 const QUrl& url,
460 const QList<QAction*>& customActions);
461
462 /**
463 * Is emitted if an information message with the content \a msg
464 * should be shown.
465 */
466 void infoMessage(const QString& msg);
467
468 /**
469 * Is emitted if an error message with the content \a msg
470 * should be shown.
471 */
472 void errorMessage(const QString& msg);
473
474 /**
475 * Is emitted if an "operation completed" message with the content \a msg
476 * should be shown.
477 */
478 void operationCompletedMessage(const QString& msg);
479
480 /**
481 * Is emitted after DolphinView::setUrl() has been invoked and
482 * the current directory is loaded. If this signal is emitted,
483 * it is assured that the view contains already the correct root
484 * URL and property settings.
485 */
486 void directoryLoadingStarted();
487
488 /**
489 * Is emitted after the directory triggered by DolphinView::setUrl()
490 * has been loaded.
491 */
492 void directoryLoadingCompleted();
493
494 /**
495 * Is emitted after the directory loading triggered by DolphinView::setUrl()
496 * has been canceled.
497 */
498 void directoryLoadingCanceled();
499
500 /**
501 * Is emitted after DolphinView::setUrl() has been invoked and provides
502 * the information how much percent of the current directory have been loaded.
503 */
504 void directoryLoadingProgress(int percent);
505
506 /**
507 * Is emitted if the sorting is done asynchronously and provides the
508 * progress information of the sorting.
509 */
510 void directorySortingProgress(int percent);
511
512 /**
513 * Emitted when the file-item-model emits redirection.
514 * Testcase: fish://localhost
515 */
516 void redirection(const QUrl& oldUrl, const QUrl& newUrl);
517
518 /**
519 * Is emitted when the URL set by DolphinView::setUrl() represents a file.
520 * In this case no signal errorMessage() will be emitted.
521 */
522 void urlIsFileError(const QUrl& url);
523
524 /**
525 * Is emitted when the write state of the folder has been changed. The application
526 * should disable all actions like "Create New..." that depend on the write
527 * state.
528 */
529 void writeStateChanged(bool isFolderWritable);
530
531 /**
532 * Is emitted if the URL should be changed to the previous URL of the
533 * history (e.g. because the "back"-mousebutton has been pressed).
534 */
535 void goBackRequested();
536
537 /**
538 * Is emitted if the URL should be changed to the next URL of the
539 * history (e.g. because the "next"-mousebutton has been pressed).
540 */
541 void goForwardRequested();
542
543 /**
544 * Is emitted when the user wants to move the focus to another view.
545 */
546 void toggleActiveViewRequested();
547
548 /**
549 * Is emitted when the user clicks a tag or a link
550 * in the metadata widget of a tooltip.
551 */
552 void urlActivated(const QUrl& url);
553
554 protected:
555 /** Changes the zoom level if Control is pressed during a wheel event. */
556 void wheelEvent(QWheelEvent* event) override;
557
558 void hideEvent(QHideEvent* event) override;
559 bool event(QEvent* event) override;
560
561 private slots:
562 /**
563 * Marks the view as active (DolphinView:isActive() will return true)
564 * and emits the 'activated' signal if it is not already active.
565 */
566 void activate();
567
568 void slotItemActivated(int index);
569 void slotItemsActivated(const KItemSet& indexes);
570 void slotItemMiddleClicked(int index);
571 void slotItemContextMenuRequested(int index, const QPointF& pos);
572 void slotViewContextMenuRequested(const QPointF& pos);
573 void slotHeaderContextMenuRequested(const QPointF& pos);
574 void slotHeaderColumnWidthChangeFinished(const QByteArray& role, qreal current);
575 void slotItemHovered(int index);
576 void slotItemUnhovered(int index);
577 void slotItemDropEvent(int index, QGraphicsSceneDragDropEvent* event);
578 void slotModelChanged(KItemModelBase* current, KItemModelBase* previous);
579 void slotMouseButtonPressed(int itemIndex, Qt::MouseButtons buttons);
580 void slotRenameDialogRenamingFinished(const QList<QUrl>& urls);
581 void slotSelectedItemTextPressed(int index);
582
583 /*
584 * Is called when new items get pasted or dropped.
585 */
586 void slotItemCreated(const QUrl &url);
587 /*
588 * Is called after all pasted or dropped items have been copied to destination.
589 */
590 void slotPasteJobResult(KJob *job);
591
592 /**
593 * Emits the signal \a selectionChanged() with a small delay. This is
594 * because getting all file items for the selection can be an expensive
595 * operation. Fast selection changes are collected in this case and
596 * the signal is emitted only after no selection change has been done
597 * within a small delay.
598 */
599 void slotSelectionChanged(const KItemSet& current, const KItemSet& previous);
600
601 /**
602 * Is called by emitDelayedSelectionChangedSignal() and emits the
603 * signal \a selectionChanged() with all selected file items as parameter.
604 */
605 void emitSelectionChangedSignal();
606
607 /**
608 * Updates the view properties of the current URL to the
609 * sorting given by \a role.
610 */
611 void updateSortRole(const QByteArray& role);
612
613 /**
614 * Updates the view properties of the current URL to the
615 * sort order given by \a order.
616 */
617 void updateSortOrder(Qt::SortOrder order);
618
619 /**
620 * Updates the view properties of the current URL to the
621 * sorting of files and folders (separate with folders first or mixed) given by \a foldersFirst.
622 */
623 void updateSortFoldersFirst(bool foldersFirst);
624
625 /**
626 * Indicates in the status bar that the delete operation
627 * of the job \a job has been finished.
628 */
629 void slotDeleteFileFinished(KJob* job);
630
631 /**
632 * Indicates in the status bar that the trash operation
633 * of the job \a job has been finished.
634 */
635 void slotTrashFileFinished(KJob* job);
636
637 /**
638 * Invoked when the rename job is done, for error handling.
639 */
640 void slotRenamingResult(KJob* job);
641
642 /**
643 * Invoked when the file item model has started the loading
644 * of the directory specified by DolphinView::url().
645 */
646 void slotDirectoryLoadingStarted();
647
648 /**
649 * Invoked when the file item model indicates that the loading of a directory has
650 * been completed. Assures that pasted items and renamed items get selected.
651 */
652 void slotDirectoryLoadingCompleted();
653
654 /**
655 * Is invoked when items of KFileItemModel have been changed.
656 */
657 void slotItemsChanged();
658
659 /**
660 * Is invoked when the sort order has been changed by the user by clicking
661 * on a header item. The view properties of the directory will get updated.
662 */
663 void slotSortOrderChangedByHeader(Qt::SortOrder current, Qt::SortOrder previous);
664
665 /**
666 * Is invoked when the sort role has been changed by the user by clicking
667 * on a header item. The view properties of the directory will get updated.
668 */
669 void slotSortRoleChangedByHeader(const QByteArray& current, const QByteArray& previous);
670
671 /**
672 * Is invoked when the visible roles have been changed by the user by dragging
673 * a header item. The view properties of the directory will get updated.
674 */
675 void slotVisibleRolesChangedByHeader(const QList<QByteArray>& current,
676 const QList<QByteArray>& previous);
677
678 void slotRoleEditingCanceled();
679 void slotRoleEditingFinished(int index, const QByteArray& role, const QVariant& value);
680
681 /**
682 * Observes the item with the URL \a url. As soon as the directory
683 * model indicates that the item is available, the item will
684 * get selected and it is assured that the item stays visible.
685 */
686 void observeCreatedItem(const QUrl &url);
687
688 /**
689 * Called when a redirection happens.
690 * Testcase: fish://localhost
691 */
692 void slotDirectoryRedirection(const QUrl& oldUrl, const QUrl& newUrl);
693
694 /**
695 * Applies the state that has been restored by restoreViewState()
696 * to the view.
697 */
698 void updateViewState();
699
700 void hideToolTip();
701
702 /**
703 * Calculates the number of currently shown files into
704 * \a fileCount and the number of folders into \a folderCount.
705 * The size of all files is written into \a totalFileSize.
706 * It is recommend using this method instead of asking the
707 * directory lister or the model directly, as it takes
708 * filtering and hierarchical previews into account.
709 */
710 void calculateItemCount(int& fileCount, int& folderCount, KIO::filesize_t& totalFileSize) const;
711
712 void slotTwoClicksRenamingTimerTimeout();
713
714 private:
715 void loadDirectory(const QUrl& url, bool reload = false);
716
717 /**
718 * Applies the view properties which are defined by the current URL
719 * to the DolphinView properties. The view properties are read from a
720 * .directory file either in the current directory, or in the
721 * share/apps/dolphin/view_properties/ subfolder of the user's .kde folder.
722 */
723 void applyViewProperties();
724
725 /**
726 * Applies the given view properties to the DolphinView.
727 */
728 void applyViewProperties(const ViewProperties& props);
729
730 /**
731 * Applies the m_mode property to the corresponding
732 * itemlayout-property of the KItemListView.
733 */
734 void applyModeToView();
735
736 /**
737 * Helper method for DolphinView::paste() and DolphinView::pasteIntoFolder().
738 * Pastes the clipboard data into the URL \a url.
739 */
740 void pasteToUrl(const QUrl& url);
741
742 /**
743 * Returns a list of URLs for all selected items. The list is
744 * simplified, so that when the URLs are part of different tree
745 * levels, only the parent is returned.
746 */
747 QList<QUrl> simplifiedSelectedUrls() const;
748
749 /**
750 * Returns the MIME data for all selected items.
751 */
752 QMimeData* selectionMimeData() const;
753
754 /**
755 * Updates m_isFolderWritable dependent on whether the folder represented by
756 * the current URL is writable. If the state has changed, the signal
757 * writeableStateChanged() will be emitted.
758 */
759 void updateWritableState();
760
761 /**
762 * @return The current URL if no viewproperties-context is given (see
763 * DolphinView::viewPropertiesContext(), otherwise the context
764 * is returned.
765 */
766 QUrl viewPropertiesUrl() const;
767
768 /**
769 * Clears the selection and updates current item and selection according to the parameters
770 *
771 * @param current URL to be set as current
772 * @param selected list of selected items
773 */
774 void forceUrlsSelection(const QUrl& current, const QList<QUrl>& selected);
775
776 void abortTwoClicksRenaming();
777
778 private:
779 void updatePalette();
780
781 bool m_active;
782 bool m_tabsForFiles;
783 bool m_assureVisibleCurrentIndex;
784 bool m_isFolderWritable;
785 bool m_dragging; // True if a dragging is done. Required to be able to decide whether a
786 // tooltip may be shown when hovering an item.
787
788 QUrl m_url;
789 QString m_viewPropertiesContext;
790 Mode m_mode;
791 QList<QByteArray> m_visibleRoles;
792
793 QVBoxLayout* m_topLayout;
794
795 KFileItemModel* m_model;
796 DolphinItemListView* m_view;
797 KItemListContainer* m_container;
798
799 ToolTipManager* m_toolTipManager;
800
801 QTimer* m_selectionChangedTimer;
802
803 QUrl m_currentItemUrl; // Used for making the view to remember the current URL after F5
804 bool m_scrollToCurrentItem; // Used for marking we need to scroll to current item or not
805 QPoint m_restoredContentsPosition;
806
807 QList<QUrl> m_selectedUrls; // Used for making the view to remember selections after F5
808 bool m_clearSelectionBeforeSelectingNewItems;
809 bool m_markFirstNewlySelectedItemAsCurrent;
810
811 VersionControlObserver* m_versionControlObserver;
812
813 QTimer* m_twoClicksRenamingTimer;
814 QUrl m_twoClicksRenamingItemUrl;
815
816 // For unit tests
817 friend class TestBase;
818 friend class DolphinDetailsViewTest;
819 friend class DolphinPart; // Accesses m_model
820 };
821
822 /// Allow using DolphinView::Mode in QVariant
823 Q_DECLARE_METATYPE(DolphinView::Mode)
824
825 #endif // DOLPHINVIEW_H