class KItemListSelectionManager;
class KItemListView;
class KItemListWidget;
+class QContextMenuEvent;
class QGestureEvent;
class QGraphicsSceneHoverEvent;
class QGraphicsSceneDragDropEvent;
class DOLPHIN_EXPORT KItemListController : public QObject
{
Q_OBJECT
- Q_PROPERTY(KItemModelBase *model READ model WRITE setModel)
- Q_PROPERTY(KItemListView *view READ view WRITE setView)
- Q_PROPERTY(SelectionBehavior selectionBehavior READ selectionBehavior WRITE setSelectionBehavior)
- Q_PROPERTY(AutoActivationBehavior autoActivationBehavior READ autoActivationBehavior WRITE setAutoActivationBehavior)
- Q_PROPERTY(MouseDoubleClickAction mouseDoubleClickAction READ mouseDoubleClickAction WRITE setMouseDoubleClickAction)
+ Q_PROPERTY(KItemModelBase *model READ model WRITE setModel NOTIFY modelChanged)
+ Q_PROPERTY(KItemListView *view READ view WRITE setView NOTIFY viewChanged)
public:
enum SelectionBehavior { NoSelection, SingleSelection, MultiSelection };
bool mouseMoveEvent(QGraphicsSceneMouseEvent *event, const QTransform &transform);
bool mouseReleaseEvent(QGraphicsSceneMouseEvent *event, const QTransform &transform);
bool mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event, const QTransform &transform);
+ bool contextMenuEvent(QContextMenuEvent *event);
bool dragEnterEvent(QGraphicsSceneDragDropEvent *event, const QTransform &transform);
bool dragLeaveEvent(QGraphicsSceneDragDropEvent *event, const QTransform &transform);
bool dragMoveEvent(QGraphicsSceneDragDropEvent *event, const QTransform &transform);
KItemListSelectionManager *m_selectionManager;
KItemListKeyboardSearchManager *m_keyboardManager;
std::optional<int> m_pressedIndex;
- QPointF m_pressedMousePos;
+ QPointF m_pressedMouseGlobalPos;
QTimer *m_autoActivationTimer;