27 #ifndef CUSTOMLISTVIEW_H
28 #define CUSTOMLISTVIEW_H
33 #include <QPaintEvent>
50 inline void setPositionForIndex(
const QPoint& position,
const QModelIndex& index) {
51 QListView::setPositionForIndex(position, index);
56 void specialDropEvent(QDropEvent *event);
59 QAbstractItemDelegate* getItemDelegateForIndex(
const QModelIndex& index)
const {
60 return itemDelegate(index);
63 void requestDesktopPictureToBePainted(
bool request);
65 void paintEvent(QPaintEvent* event)
override;
67 void queueLayout(
int delay = 0);
69 void dropEvent(QDropEvent *event)
override;
72 void dragEnterEvent(QDragEnterEvent *event)
override;
73 void dragMoveEvent(QDragMoveEvent *event)
override;
74 void dragLeaveEvent(QDragLeaveEvent *event)
override;
75 void startDrag(Qt::DropActions supportedActions)
override;
76 virtual void resizeEvent(QResizeEvent* event)
override;
78 void updateGeometries()
override;
85 void dragEnterEventSignal(QDragEnterEvent *event);
86 void dragMoveEventSignal(QDragMoveEvent *event);
87 void dragLeaveEventSignal(QDragLeaveEvent *event);
88 void dropEventSignal(QDropEvent *event);
89 void startDragSignal(Qt::DropActions supportedActions);
92 void paintDesktopPicture();
93 bool should_paint_desktop_picture =
false;
94 QTimer* m_layoutTimer;
96 QAbstractItemModel* m_sourceModel;
Definition: CustomListView.h:38