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