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