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