]> cloud.milkyroute.net Git - dolphin.git/blob - src/dolphinview.h
Reset the location to the home URL, if a place has been removed (e. g. a DVD has...
[dolphin.git] / src / dolphinview.h
1 /***************************************************************************
2 * Copyright (C) 2006-2009 by Peter Penz <peter.penz@gmx.at> *
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
22 #ifndef DOLPHINVIEW_H
23 #define DOLPHINVIEW_H
24
25 #include <config-nepomuk.h>
26
27 #include "libdolphin_export.h"
28
29 #include <kparts/part.h>
30 #include <kfileitem.h>
31 #include <kfileitemdelegate.h>
32 #include <kio/fileundomanager.h>
33 #include <kio/job.h>
34
35 #include <QBoxLayout>
36 #include <QKeyEvent>
37 #include <QLinkedList>
38 #include <QListView>
39 #include <QSet>
40 #include <QWidget>
41
42 typedef KIO::FileUndoManager::CommandType CommandType;
43
44 class DolphinColumnViewContainer;
45 class DolphinDetailsView;
46 class DolphinIconsView;
47 class DolphinModel;
48 class DolphinSortFilterProxyModel;
49 class DolphinViewController;
50 class KFilePreviewGenerator;
51 class KAction;
52 class KActionCollection;
53 class KDirLister;
54 class KUrl;
55 class ViewModeController;
56 class ViewProperties;
57 class DolphinDetailsViewExpander;
58
59 /**
60 * @short Represents a view for the directory content.
61 *
62 * View modes for icons, details and columns are supported. It's
63 * possible to adjust:
64 * - sort order
65 * - sort type
66 * - show hidden files
67 * - show previews
68 *
69 * @see DolphinIconsView
70 * @see DolphinDetailsView
71 * @see DolphinColumnView
72 */
73 class LIBDOLPHINPRIVATE_EXPORT DolphinView : public QWidget
74 {
75 Q_OBJECT
76
77 public:
78 /**
79 * Defines the view mode for a directory. The view mode
80 * can be defined when constructing a DolphinView. The
81 * view mode is automatically updated if the directory itself
82 * defines a view mode (see class ViewProperties for details).
83 */
84 enum Mode
85 {
86 /**
87 * The directory items are shown as icons including an
88 * icon name.
89 */
90 IconsView = 0,
91
92 /**
93 * The icon, the name and at least the size of the directory
94 * items are shown in a table. It is possible to add columns
95 * for date, group and permissions.
96 */
97 DetailsView = 1,
98
99 /**
100 * Each folder is shown in a separate column.
101 */
102 ColumnView = 2,
103 MaxModeEnum = ColumnView
104 };
105
106 /** Defines the sort order for the items of a directory. */
107 enum Sorting
108 {
109 SortByName = 0,
110 SortBySize,
111 SortByDate,
112 SortByPermissions,
113 SortByOwner,
114 SortByGroup,
115 SortByType,
116 MaxSortEnum = SortByType
117 };
118
119 /**
120 * @param parent Parent widget of the view.
121 * @param url Specifies the content which should be shown.
122 * @param proxyModel Used proxy model which specifies the sorting. The
123 * model is not owned by the view and won't get
124 * deleted.
125 */
126 DolphinView(QWidget* parent,
127 const KUrl& url,
128 DolphinSortFilterProxyModel* proxyModel);
129
130 virtual ~DolphinView();
131
132 /**
133 * Returns the current active URL, where all actions are applied.
134 * The URL navigator is synchronized with this URL.
135 */
136 KUrl url() const;
137
138 /**
139 * Returns the root URL of the view, which is defined as the first
140 * visible path of DolphinView::url(). Usually the root URL is
141 * equal to DolphinView::url(), but in the case of the column view
142 * when 2 columns are shown, the root URL might be:
143 * /home/peter/Documents
144 * and DolphinView::url() might return
145 * /home/peter/Documents/Music/
146 */
147 KUrl rootUrl() const;
148
149 /**
150 * If \a active is true, the view will marked as active. The active
151 * view is defined as view where all actions are applied to.
152 */
153 void setActive(bool active);
154 bool isActive() const;
155
156 /**
157 * Changes the view mode for the current directory to \a mode.
158 * If the view properties should be remembered for each directory
159 * (GeneralSettings::globalViewProps() returns false), then the
160 * changed view mode will be stored automatically.
161 */
162 void setMode(Mode mode);
163 Mode mode() const;
164
165 /** See setShowPreview */
166 bool showPreview() const;
167
168 /** See setShowHiddenFiles */
169 bool showHiddenFiles() const;
170
171 /** See setCategorizedSorting */
172 bool categorizedSorting() const;
173
174 /**
175 * Returns true, if the categorized sorting is supported by the current
176 * used mode (see DolphinView::setMode()). Currently only DolphinView::IconsView
177 * supports categorizations. To check whether the categorized
178 * sorting is set, use DolphinView::categorizedSorting().
179 */
180 bool supportsCategorizedSorting() const;
181
182 /**
183 * Marks the items indicated by \p urls to get selected after the
184 * directory DolphinView::url() has been loaded. Note that nothing
185 * gets selected if no loading of a directory has been triggered
186 * by DolphinView::setUrl() or DolphinView::reload().
187 */
188 void markUrlsAsSelected(const QList<KUrl>& urls);
189
190 /**
191 * Returns the selected items. The list is empty if no item has been
192 * selected.
193 * @see DolphinView::selectedUrls()
194 */
195 KFileItemList selectedItems() const;
196
197 /**
198 * Returns a list of URLs for all selected items. An empty list
199 * is returned, if no item is selected.
200 * @see DolphinView::selectedItems()
201 */
202 KUrl::List selectedUrls() const;
203
204 /**
205 * Returns the number of selected items (this is faster than
206 * invoking selectedItems().count()).
207 */
208 int selectedItemsCount() const;
209
210 QItemSelectionModel* selectionModel() const;
211
212 /**
213 * Sets the zoom level to \a level. It is assured that the used
214 * level is adjusted to be inside the range ZoomLevelInfo::minimumLevel() and
215 * ZoomLevelInfo::maximumLevel().
216 */
217 void setZoomLevel(int level);
218 int zoomLevel() const;
219
220 /**
221 * Returns true, if zooming in is possible. If false is returned,
222 * the maximum zooming level has been reached.
223 */
224 bool isZoomInPossible() const;
225
226 /**
227 * Returns true, if zooming out is possible. If false is returned,
228 * the minimum zooming level has been reached.
229 */
230 bool isZoomOutPossible() const;
231
232 /** Sets the sort order of the items inside a directory (see DolphinView::Sorting). */
233 void setSorting(Sorting sorting);
234
235 /** Returns the sort order of the items inside a directory (see DolphinView::Sorting). */
236 Sorting sorting() const;
237
238 /** Sets the sort order (Qt::Ascending or Qt::Descending) for the items. */
239 void setSortOrder(Qt::SortOrder order);
240
241 /** Returns the current used sort order (Qt::Ascending or Qt::Descending). */
242 Qt::SortOrder sortOrder() const;
243
244 /** Sets a separate sorting with folders first (true) or a mixed sorting of files and folders (false). */
245 void setSortFoldersFirst(bool foldersFirst);
246
247 /** Returns if files and folders are sorted separately or not. */
248 bool sortFoldersFirst() const;
249
250 /** Sets the additional information which should be shown for the items. */
251 void setAdditionalInfo(KFileItemDelegate::InformationList info);
252
253 /** Returns the additional information which should be shown for the items. */
254 KFileItemDelegate::InformationList additionalInfo() const;
255
256 /** Reloads the current directory. */
257 void reload();
258
259 /**
260 * Refreshes the view to get synchronized with the (updated) Dolphin settings.
261 * This method only needs to get invoked if the view settings for the Icons View,
262 * Details View or Columns View have been changed.
263 */
264 void refresh();
265
266 /**
267 * Filters the currently shown items by \a nameFilter. All items
268 * which contain the given filter string will be shown.
269 */
270 void setNameFilter(const QString& nameFilter);
271
272 /**
273 * Calculates the number of currently shown files into
274 * \a fileCount and the number of folders into \a folderCount.
275 * The size of all files is written into \a totalFileSize.
276 * It is recommend using this method instead of asking the
277 * directory lister or the model directly, as it takes
278 * filtering and hierarchical previews into account.
279 */
280 void calculateItemCount(int& fileCount, int& folderCount, KIO::filesize_t& totalFileSize) const;
281
282 /**
283 * Returns a textual representation of the state of the current
284 * folder or selected items, suitable for use in the status bar.
285 */
286 QString statusBarText() const;
287
288 /**
289 * Returns the version control actions that are provided for the items \p items.
290 * Usually the actions are presented in the context menu.
291 */
292 QList<QAction*> versionControlActions(const KFileItemList& items) const;
293
294 /**
295 * Updates the state of the 'Additional Information' actions in \a collection.
296 */
297 void updateAdditionalInfoActions(KActionCollection* collection);
298
299 /**
300 * Returns the state of the paste action:
301 * first is whether the action should be enabled
302 * second is the text for the action
303 */
304 QPair<bool, QString> pasteInfo() const;
305
306 /**
307 * If \a tabsForFiles is true, the signal tabRequested() will also
308 * emitted also for files. Per default tabs for files is disabled
309 * and hence the signal tabRequested() will only be emitted for
310 * directories.
311 */
312 void setTabsForFilesEnabled(bool tabsForFiles);
313 bool isTabsForFilesEnabled() const;
314
315 /**
316 * Returns true if the current view allows folders to be expanded,
317 * i.e. presents a hierarchical view to the user.
318 */
319 bool itemsExpandable() const;
320
321 /**
322 * Restores the view state (current item, contents position, details view expansion state)
323 */
324 void restoreState(QDataStream& stream);
325
326 /**
327 * Saves the view state (current item, contents position, details view expansion state)
328 */
329 void saveState(QDataStream& stream);
330
331 public slots:
332 /**
333 * Changes the directory to \a url. If the current directory is equal to
334 * \a url, nothing will be done (use DolphinView::reload() instead).
335 */
336 void setUrl(const KUrl& url);
337
338 /**
339 * Selects all items.
340 * @see DolphinView::selectedItems()
341 */
342 void selectAll();
343
344 /**
345 * Inverts the current selection: selected items get unselected,
346 * unselected items get selected.
347 * @see DolphinView::selectedItems()
348 */
349 void invertSelection();
350
351 /** Returns true, if at least one item is selected. */
352 bool hasSelection() const;
353
354 void clearSelection();
355
356 /**
357 * Triggers the renaming of the currently selected items, where
358 * the user must input a new name for the items.
359 */
360 void renameSelectedItems();
361
362 /**
363 * Moves all selected items to the trash.
364 */
365 void trashSelectedItems();
366
367 /**
368 * Deletes all selected items.
369 */
370 void deleteSelectedItems();
371
372 /**
373 * Copies all selected items to the clipboard and marks
374 * the items as cut.
375 */
376 void cutSelectedItems();
377
378 /** Copies all selected items to the clipboard. */
379 void copySelectedItems();
380
381 /** Pastes the clipboard data to this view. */
382 void paste();
383
384 /**
385 * Pastes the clipboard data into the currently selected
386 * folder. If the current selection is not exactly one folder, no
387 * paste operation is done.
388 */
389 void pasteIntoFolder();
390
391 /**
392 * Turns on the file preview for the all files of the current directory,
393 * if \a show is true.
394 * If the view properties should be remembered for each directory
395 * (GeneralSettings::globalViewProps() returns false), then the
396 * preview setting will be stored automatically.
397 */
398 void setShowPreview(bool show);
399
400 /**
401 * Shows all hidden files of the current directory,
402 * if \a show is true.
403 * If the view properties should be remembered for each directory
404 * (GeneralSettings::globalViewProps() returns false), then the
405 * show hidden file setting will be stored automatically.
406 */
407 void setShowHiddenFiles(bool show);
408
409 /**
410 * Summarizes all sorted items by their category \a categorized
411 * is true.
412 * If the view properties should be remembered for each directory
413 * (GeneralSettings::globalViewProps() returns false), then the
414 * categorized sorting setting will be stored automatically.
415 */
416 void setCategorizedSorting(bool categorized);
417
418 /** Switches between an ascending and descending sorting order. */
419 void toggleSortOrder();
420
421 /** Switches between a separate sorting (with folders first) and a mixed sorting of files and folders. */
422 void toggleSortFoldersFirst();
423
424 /**
425 * Switches on or off the displaying of additional information
426 * as specified by \a action.
427 */
428 void toggleAdditionalInfo(QAction* action);
429
430 signals:
431 /**
432 * Is emitted if the view has been activated by e. g. a mouse click.
433 */
434 void activated();
435
436 /** Is emitted if URL of the view has been changed to \a url. */
437 void urlChanged(const KUrl& url);
438
439 /**
440 * Is emitted when clicking on an item with the left mouse button.
441 */
442 void itemTriggered(const KFileItem& item);
443
444 /**
445 * Is emitted if a new tab should be opened for the URL \a url.
446 */
447 void tabRequested(const KUrl& url);
448
449 /**
450 * Is emitted if the view mode (IconsView, DetailsView,
451 * PreviewsView) has been changed.
452 */
453 void modeChanged();
454
455 /** Is emitted if the 'show preview' property has been changed. */
456 void showPreviewChanged();
457
458 /** Is emitted if the 'show hidden files' property has been changed. */
459 void showHiddenFilesChanged();
460
461 /** Is emitted if the 'categorized sorting' property has been changed. */
462 void categorizedSortingChanged();
463
464 /** Is emitted if the sorting by name, size or date has been changed. */
465 void sortingChanged(DolphinView::Sorting sorting);
466
467 /** Is emitted if the sort order (ascending or descending) has been changed. */
468 void sortOrderChanged(Qt::SortOrder order);
469
470 /** Is emitted if the sorting of files and folders (separate with folders first or mixed) has been changed. */
471 void sortFoldersFirstChanged(bool foldersFirst);
472
473 /** Is emitted if the additional information shown for this view has been changed. */
474 void additionalInfoChanged();
475
476 /** Is emitted if the zoom level has been changed by zooming in or out. */
477 void zoomLevelChanged(int level);
478
479 /**
480 * Is emitted if information of an item is requested to be shown e. g. in the panel.
481 * If item is null, no item information request is pending.
482 */
483 void requestItemInfo(const KFileItem& item);
484
485 /**
486 * Is emitted whenever the selection has been changed.
487 */
488 void selectionChanged(const KFileItemList& selection);
489
490 /**
491 * Is emitted if a context menu is requested for the item \a item,
492 * which is part of \a url. If the item is null, the context menu
493 * for the URL should be shown and the custom actions \a customActions
494 * will be added.
495 */
496 void requestContextMenu(const KFileItem& item,
497 const KUrl& url,
498 const QList<QAction*>& customActions);
499
500 /**
501 * Is emitted if an information message with the content \a msg
502 * should be shown.
503 */
504 void infoMessage(const QString& msg);
505
506 /**
507 * Is emitted if an error message with the content \a msg
508 * should be shown.
509 */
510 void errorMessage(const QString& msg);
511
512 /**
513 * Is emitted if an "operation completed" message with the content \a msg
514 * should be shown.
515 */
516 void operationCompletedMessage(const QString& msg);
517
518 /**
519 * Is emitted after DolphinView::setUrl() has been invoked and
520 * the path \a url is currently loaded. If this signal is emitted,
521 * it is assured that the view contains already the correct root
522 * URL and property settings.
523 */
524 void startedPathLoading(const KUrl& url);
525
526 /**
527 * Emitted when KDirLister emits redirection.
528 * Testcase: fish://localhost
529 */
530 void redirection(const KUrl& oldUrl, const KUrl& newUrl);
531
532 protected:
533 /** @see QWidget::mouseReleaseEvent */
534 virtual void mouseReleaseEvent(QMouseEvent* event);
535 virtual bool eventFilter(QObject* watched, QEvent* event);
536
537 private slots:
538 /**
539 * Marks the view as active (DolphinView:isActive() will return true)
540 * and emits the 'activated' signal if it is not already active.
541 */
542 void activate();
543
544 /**
545 * If the item \a item is a directory, then this
546 * directory will be loaded. If the item is a file, the corresponding
547 * application will get started.
548 */
549 void triggerItem(const KFileItem& index);
550
551 /**
552 * Emits the signal \a selectionChanged() with a small delay. This is
553 * because getting all file items for the signal can be an expensive
554 * operation. Fast selection changes are collected in this case and
555 * the signal is emitted only after no selection change has been done
556 * within a small delay.
557 */
558 void slotSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected);
559
560 /**
561 * Is called by emitDelayedSelectionChangedSignal() and emits the
562 * signal \a selectionChanged() with all selected file items as parameter.
563 */
564 void emitSelectionChangedSignal();
565
566 /**
567 * Opens the context menu on position \a pos. The position
568 * is used to check whether the context menu is related to an
569 * item or to the viewport.
570 */
571 void openContextMenu(const QPoint& pos, const QList<QAction*>& customActions);
572
573 /**
574 * Drops dragged URLs to the destination path \a destPath. If
575 * the URLs are dropped above an item inside the destination path,
576 * the item is indicated by \a destItem.
577 */
578 void dropUrls(const KFileItem& destItem,
579 const KUrl& destPath,
580 QDropEvent* event);
581
582 /**
583 * Updates the view properties of the current URL to the
584 * sorting given by \a sorting.
585 */
586 void updateSorting(DolphinView::Sorting sorting);
587
588 /**
589 * Updates the view properties of the current URL to the
590 * sort order given by \a order.
591 */
592 void updateSortOrder(Qt::SortOrder order);
593
594 /**
595 * Updates the view properties of the current URL to the
596 * sorting of files and folders (separate with folders first or mixed) given by \a foldersFirst.
597 */
598 void updateSortFoldersFirst(bool foldersFirst);
599
600 /**
601 * Updates the view properties of the current URL to the
602 * additional information given by \a info.
603 */
604 void updateAdditionalInfo(const KFileItemDelegate::InformationList& info);
605
606 /**
607 * Updates the status bar to show hover information for the
608 * item \a item. If currently other items are selected,
609 * no hover information is shown.
610 * @see DolphinView::clearHoverInformation()
611 */
612 void showHoverInformation(const KFileItem& item);
613
614 /**
615 * Clears the hover information shown in the status bar.
616 * @see DolphinView::showHoverInformation().
617 */
618 void clearHoverInformation();
619
620 /**
621 * Indicates in the status bar that the delete operation
622 * of the job \a job has been finished.
623 */
624 void slotDeleteFileFinished(KJob* job);
625
626 /**
627 * Invoked when the directory lister has completed the loading of
628 * items. Assures that pasted items and renamed items get seleced.
629 */
630 void slotDirListerCompleted();
631
632 /**
633 * Invoked when the loading of the directory is finished.
634 * Restores the active item and the scroll position if possible.
635 */
636 void slotLoadingCompleted();
637
638 /**
639 * Is invoked when the KDirLister indicates refreshed items.
640 */
641 void slotRefreshItems();
642
643 /**
644 * Observes the item with the URL \a url. As soon as the directory
645 * model indicates that the item is available, the item will
646 * get selected and it is assure that the item stays visible.
647 *
648 * @see selectAndScrollToCreatedItem()
649 */
650 void observeCreatedItem(const KUrl& url);
651
652 /**
653 * Selects and scrolls to the item that got observed
654 * by observeCreatedItem().
655 */
656 void selectAndScrollToCreatedItem();
657
658 /**
659 * Called when a redirection happens.
660 * Testcase: fish://localhost
661 */
662 void slotRedirection(const KUrl& oldUrl, const KUrl& newUrl);
663
664 /**
665 * Restores the contents position, if history information about the old position is available.
666 */
667 void restoreContentsPosition();
668
669 private:
670 void loadDirectory(const KUrl& url, bool reload = false);
671
672 /**
673 * Applies the view properties which are defined by the current URL
674 * to the DolphinView properties.
675 */
676 void applyViewProperties();
677
678 /**
679 * Creates a new view representing the given view mode (DolphinView::mode()).
680 * The current view will get deleted.
681 */
682 void createView();
683
684 void deleteView();
685
686 /**
687 * Helper method for DolphinView::paste() and DolphinView::pasteIntoFolder().
688 * Pastes the clipboard data into the URL \a url.
689 */
690 void pasteToUrl(const KUrl& url);
691
692 /**
693 * Checks whether the current item view has the same zoom level
694 * as \a oldZoomLevel. If this is not the case, the zoom level
695 * of the controller is updated and a zoomLevelChanged() signal
696 * is emitted.
697 */
698 void updateZoomLevel(int oldZoomLevel);
699
700 /**
701 * Returns a list of URLs for all selected items. The list is
702 * simplified, so that when the URLs are part of different tree
703 * levels, only the parent is returned.
704 */
705 KUrl::List simplifiedSelectedUrls() const;
706
707 /**
708 * Returns the MIME data for all selected items.
709 */
710 QMimeData* selectionMimeData() const;
711
712 /**
713 * Is invoked after a paste operation or a drag & drop
714 * operation and adds the filenames of all URLs from \a mimeData to
715 * m_newFileNames. This allows to select all newly added
716 * items in slotDirListerCompleted().
717 */
718 void addNewFileNames(const QMimeData* mimeData);
719
720 private:
721 /**
722 * Abstracts the access to the different view implementations
723 * for icons-, details- and column-view.
724 */
725 class ViewAccessor
726 {
727 public:
728 ViewAccessor(DolphinSortFilterProxyModel* proxyModel);
729 ~ViewAccessor();
730
731 void createView(QWidget* parent,
732 DolphinViewController* dolphinViewController,
733 const ViewModeController* viewModeController,
734 Mode mode);
735 void deleteView();
736
737 /**
738 * Must be invoked before the URL has been changed and allows view implementations
739 * like the column view to create a new column.
740 */
741 void prepareUrlChange(const KUrl& url);
742
743 QAbstractItemView* itemView() const;
744 KFileItemDelegate* itemDelegate() const;
745
746 /**
747 * Returns the widget that should be added to the layout as target. Usually
748 * the item view itself is returned, but in the case of the column view
749 * a container widget is returned.
750 */
751 QWidget* layoutTarget() const;
752
753 KUrl rootUrl() const;
754
755 bool supportsCategorizedSorting() const;
756 bool itemsExpandable() const;
757 QSet<KUrl> expandedUrls() const;
758 const DolphinDetailsViewExpander* setExpandedUrls(const QSet<KUrl>& urlsToExpand);
759
760 /**
761 * Returns true, if a reloading of the items is required
762 * when the additional information properties have been changed
763 * by the user.
764 */
765 bool reloadOnAdditionalInfoChange() const;
766
767 DolphinModel* dirModel() const;
768 DolphinSortFilterProxyModel* proxyModel() const;
769 KDirLister* dirLister() const;
770
771 private:
772 DolphinIconsView* m_iconsView;
773 DolphinDetailsView* m_detailsView;
774 DolphinColumnViewContainer* m_columnsContainer;
775 DolphinSortFilterProxyModel* m_proxyModel;
776 QAbstractItemView* m_dragSource;
777 QPointer<DolphinDetailsViewExpander> m_detailsViewExpander;
778 };
779
780 bool m_active : 1;
781 bool m_showPreview : 1;
782 bool m_storedCategorizedSorting : 1;
783 bool m_tabsForFiles : 1;
784 bool m_isContextMenuOpen : 1; // TODO: workaround for Qt-issue 207192
785 bool m_ignoreViewProperties : 1;
786 bool m_assureVisibleCurrentIndex : 1;
787 bool m_expanderActive : 1;
788
789 Mode m_mode;
790
791 QVBoxLayout* m_topLayout;
792
793 DolphinViewController* m_dolphinViewController;
794 ViewModeController* m_viewModeController;
795 ViewAccessor m_viewAccessor;
796
797 QItemSelectionModel* m_selectionModel; // allow to switch views without losing the selection
798 QTimer* m_selectionChangedTimer;
799
800 KUrl m_rootUrl;
801 KUrl m_activeItemUrl;
802 QPoint m_restoredContentsPosition;
803 KUrl m_createdItemUrl; // URL for a new item that got created by the "Create New..." menu
804 KFileItemList m_selectedItems; // this is used for making the View to remember selections after F5
805
806 /**
807 * Remembers the filenames that have been added by a paste operation
808 * or a drag & drop operation. Allows to select the items in
809 * slotDirListerCompleted().
810 */
811 QSet<QString> m_newFileNames;
812 };
813
814 /// Allow using DolphinView::Mode in QVariant
815 Q_DECLARE_METATYPE(DolphinView::Mode)
816
817 #endif // DOLPHINVIEW_H