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