]> cloud.milkyroute.net Git - dolphin.git/blob - src/dolphindetailsview.h
Add libkmetadata detection and minor fixes
[dolphin.git] / src / dolphindetailsview.h
1 /***************************************************************************
2 * Copyright (C) 2006 by Peter Penz *
3 * peter.penz@gmx.at *
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 DOLPHINDETAILSVIEW_H
22 #define DOLPHINDETAILSVIEW_H
23
24 #include <dolphinview.h>
25 #include <QTreeView>
26
27 class DolphinController;
28
29 /**
30 * @brief Represents the details view which shows the name, size,
31 * date, permissions, owner and group of an item.
32 *
33 * The width of the columns is automatically adjusted in a way
34 * that full available width of the view is used by stretching the width
35 * of the name column.
36 */
37 class DolphinDetailsView : public QTreeView
38 {
39 Q_OBJECT
40
41 public:
42 explicit DolphinDetailsView(QWidget* parent, DolphinController* controller);
43 virtual ~DolphinDetailsView();
44
45 protected:
46 virtual bool event(QEvent* event);
47 virtual QStyleOptionViewItem viewOptions() const;
48 virtual void contextMenuEvent(QContextMenuEvent* event);
49 virtual void mouseReleaseEvent(QMouseEvent* event);
50 virtual void dragEnterEvent(QDragEnterEvent* event);
51 virtual void dropEvent(QDropEvent* event);
52
53 private slots:
54 /**
55 * Sets the sort indicator section of the header view
56 * corresponding to \a sorting.
57 */
58 void setSortIndicatorSection(DolphinView::Sorting sorting);
59
60 /**
61 * Sets the sort indicator order of the header view
62 * corresponding to \a sortOrder.
63 */
64 void setSortIndicatorOrder(Qt::SortOrder sortOrder);
65
66 /**
67 * Synchronizes the sorting state of the Dolphin menu 'View -> Sort'
68 * with the current state of the details view.
69 * @param column Index of the current sorting column.
70 */
71 void synchronizeSortingState(int column);
72
73 private:
74 DolphinController* m_controller;
75 };
76
77 #endif