X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/d7d4fb9d26773c2d729b49d71af10e1378381ff3..abf17941f7:/src/dolphindetailsview.h diff --git a/src/dolphindetailsview.h b/src/dolphindetailsview.h index 99127abc4..e66adf573 100644 --- a/src/dolphindetailsview.h +++ b/src/dolphindetailsview.h @@ -21,27 +21,57 @@ #ifndef DOLPHINDETAILSVIEW_H #define DOLPHINDETAILSVIEW_H -#include +#include +#include -class DolphinView; +class DolphinController; /** * @brief Represents the details view which shows the name, size, - * date, permissions, owner and group of an item. + * date, permissions, owner and group of an item. * - * The width of the columns are automatically adjusted in a way + * The width of the columns is automatically adjusted in a way * that full available width of the view is used by stretching the width * of the name column. - * - * @author Peter Penz */ -class DolphinDetailsView : public QListView +class DolphinDetailsView : public QTreeView { Q_OBJECT public: - DolphinDetailsView(DolphinView* parent); + explicit DolphinDetailsView(QWidget* parent, DolphinController* controller); virtual ~DolphinDetailsView(); + +protected: + virtual bool event(QEvent* event); + virtual QStyleOptionViewItem viewOptions() const; + virtual void contextMenuEvent(QContextMenuEvent* event); + virtual void mouseReleaseEvent(QMouseEvent* event); + virtual void dragEnterEvent(QDragEnterEvent* event); + virtual void dropEvent(QDropEvent* event); + +private slots: + /** + * Sets the sort indicator section of the header view + * corresponding to \a sorting. + */ + void setSortIndicatorSection(DolphinView::Sorting sorting); + + /** + * Sets the sort indicator order of the header view + * corresponding to \a sortOrder. + */ + void setSortIndicatorOrder(Qt::SortOrder sortOrder); + + /** + * Synchronizes the sorting state of the Dolphin menu 'View -> Sort' + * with the current state of the details view. + * @param column Index of the current sorting column. + */ + void synchronizeSortingState(int column); + +private: + DolphinController* m_controller; }; #endif