1/*
2 SPDX-FileCopyrightText: 2007 Peter Penz <peter.penz@gmx.at>
3
4 SPDX-License-Identifier: LGPL-2.0-only
5*/
6
7#ifndef KDIROPERATORDETAILVIEW_P_H
8#define KDIROPERATORDETAILVIEW_P_H
9
10#include <QTreeView>
11
12#include <kfile.h>
13
14class QAbstractItemModel;
15
16/**
17 * Default detail view for KDirOperator using
18 * custom resizing options and columns.
19 */
20class KDirOperatorDetailView : public QTreeView
21{
22 Q_OBJECT
23
24public:
25 explicit KDirOperatorDetailView(QWidget *parent = nullptr);
26 ~KDirOperatorDetailView() override;
27
28 /**
29 * Displays either Detail, Tree or DetailTree modes.
30 */
31 virtual bool setViewMode(KFile::FileView viewMode);
32
33protected:
34 void initViewItemOption(QStyleOptionViewItem *option) const override;
35
36 bool event(QEvent *event) override;
37 void dragEnterEvent(QDragEnterEvent *event) override;
38 void mousePressEvent(QMouseEvent *event) override;
39 void currentChanged(const QModelIndex &current, const QModelIndex &previous) override;
40
41private:
42 bool m_hideDetailColumns;
43};
44
45#endif
46

source code of kio/src/filewidgets/kdiroperatordetailview_p.h