18#ifndef SRC_WIDGETS_PLAYLISTICONVIEW_H
19#define SRC_WIDGETS_PLAYLISTICONVIEW_H
21#include <QAbstractItemView>
23class PlaylistIconView :
public QAbstractItemView
27 PlaylistIconView(QWidget *parent);
28 void resetMultiSelect();
29 void setIconRole(
int role);
31 QRect visualRect(
const QModelIndex &index)
const Q_DECL_OVERRIDE;
32 void scrollTo(
const QModelIndex &index, ScrollHint hint = EnsureVisible) Q_DECL_OVERRIDE;
33 QModelIndex indexAt(
const QPoint &point)
const Q_DECL_OVERRIDE;
34 QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers) Q_DECL_OVERRIDE;
35 int horizontalOffset() const Q_DECL_OVERRIDE;
36 int verticalOffset() const Q_DECL_OVERRIDE;
37 bool isIndexHidden(const QModelIndex &index) const Q_DECL_OVERRIDE;
38 void setSelection(const QRect &rect, QItemSelectionModel::SelectionFlags command) Q_DECL_OVERRIDE;
39 QRegion visualRegionForSelection(const QItemSelection &selection) const Q_DECL_OVERRIDE;
40 void currentChanged(const QModelIndex ¤t, const QModelIndex &previous) Q_DECL_OVERRIDE;
42 void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
43 void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
44 void dragMoveEvent(QDragMoveEvent *e) Q_DECL_OVERRIDE;
45 void dragLeaveEvent(QDragLeaveEvent *e) Q_DECL_OVERRIDE;
46 void dropEvent(QDropEvent *e) Q_DECL_OVERRIDE;
47 void resizeEvent(QResizeEvent *event) Q_DECL_OVERRIDE;
48 void setModel(QAbstractItemModel *model) Q_DECL_OVERRIDE;
49 void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
50 void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
52 void rowsInserted(const QModelIndex &parent,
int start,
int end) Q_DECL_OVERRIDE;
53 void rowsAboutToBeRemoved(const QModelIndex &parent,
int start,
int end) Q_DECL_OVERRIDE;
54 void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight,
55 const QVector<
int> &roles = QVector<
int>()) Q_DECL_OVERRIDE;
61 void selectionChanged(const QItemSelection &selected,
62 const QItemSelection &deselected) Q_DECL_OVERRIDE;
66 QAbstractItemView::DropIndicatorPosition position(const QPoint &pos, const QRect &rect,
67 const QModelIndex &index) const;
70 QPoint m_draggingOverPos;
72 bool m_isToggleSelect {
false};
73 bool m_isRangeSelect {
false};
74 QModelIndex m_pendingSelect;