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