File indexing completed on 2024-12-08 03:40:22
0001 /* 0002 SPDX-FileCopyrightText: 2007 Peter Penz <peter.penz@gmx.at> 0003 SPDX-FileCopyrightText: 2019 Méven Car <meven.car@kdemail.net> 0004 0005 SPDX-License-Identifier: LGPL-2.0-only 0006 */ 0007 0008 #ifndef KDIROPERATORICONVIEW_P_H 0009 #define KDIROPERATORICONVIEW_P_H 0010 0011 #include <QListView> 0012 0013 /** 0014 * Default icon view for KDirOperator using 0015 * custom view options. 0016 */ 0017 class KDirOperatorIconView : public QListView 0018 { 0019 Q_OBJECT 0020 public: 0021 KDirOperatorIconView(QWidget *parent = nullptr, QStyleOptionViewItem::Position decorationPosition = QStyleOptionViewItem::Position::Top); 0022 ~KDirOperatorIconView() override; 0023 void setDecorationPosition(QStyleOptionViewItem::Position decorationPosition); 0024 0025 protected: 0026 void initViewItemOption(QStyleOptionViewItem *option) const override; 0027 void dragEnterEvent(QDragEnterEvent *event) override; 0028 void mousePressEvent(QMouseEvent *event) override; 0029 void wheelEvent(QWheelEvent *event) override; 0030 void resizeEvent(QResizeEvent *event) override; 0031 0032 protected 0033 Q_SLOT : void updateLayout(); 0034 0035 private: 0036 QStyleOptionViewItem::Position decorationPosition; 0037 }; 0038 0039 #endif // KDIROPERATORICONVIEW_P_H