- virtual bool showEvent(QShowEvent* event);
- virtual bool hideEvent(QHideEvent* event);
- virtual bool keyPressEvent(QKeyEvent* event);
- virtual bool inputMethodEvent(QInputMethodEvent* event);
- virtual bool mousePressEvent(QGraphicsSceneMouseEvent* event, const QTransform& transform);
- virtual bool mouseMoveEvent(QGraphicsSceneMouseEvent* event, const QTransform& transform);
- virtual bool mouseReleaseEvent(QGraphicsSceneMouseEvent* event, const QTransform& transform);
- virtual bool mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event, const QTransform& transform);
- virtual bool dragEnterEvent(QGraphicsSceneDragDropEvent* event, const QTransform& transform);
- virtual bool dragLeaveEvent(QGraphicsSceneDragDropEvent* event, const QTransform& transform);
- virtual bool dragMoveEvent(QGraphicsSceneDragDropEvent* event, const QTransform& transform);
- virtual bool dropEvent(QGraphicsSceneDragDropEvent* event, const QTransform& transform);
- virtual bool hoverEnterEvent(QGraphicsSceneHoverEvent* event, const QTransform& transform);
- virtual bool hoverMoveEvent(QGraphicsSceneHoverEvent* event, const QTransform& transform);
- virtual bool hoverLeaveEvent(QGraphicsSceneHoverEvent* event, const QTransform& transform);
- virtual bool wheelEvent(QGraphicsSceneWheelEvent* event, const QTransform& transform);
- virtual bool resizeEvent(QGraphicsSceneResizeEvent* event, const QTransform& transform);
- virtual bool processEvent(QEvent* event, const QTransform& transform);
-
-signals:
- void itemClicked(int index, Qt::MouseButton button);
+ void setAutoActivationBehavior(AutoActivationBehavior behavior);
+ AutoActivationBehavior autoActivationBehavior() const;
+
+ void setMouseDoubleClickAction(MouseDoubleClickAction action);
+ MouseDoubleClickAction mouseDoubleClickAction() const;
+
+ int indexCloseToMousePressedPosition() const;
+
+ /**
+ * Sets the delay in milliseconds when dragging an object above an item
+ * until the item gets activated automatically. A value of -1 indicates
+ * that no automatic activation will be done at all (= default value).
+ *
+ * The hovered item must support dropping (see KItemModelBase::supportsDropping()),
+ * otherwise the automatic activation is not available.
+ *
+ * After activating the item the signal itemActivated() will be
+ * emitted. If the view supports the expanding of items
+ * (KItemListView::supportsItemExpanding() returns true) and the item
+ * itself is expandable (see KItemModelBase::isExpandable()) then instead
+ * of activating the item it gets expanded instead (see
+ * KItemModelBase::setExpanded()).
+ */
+ void setAutoActivationDelay(int delay);
+ int autoActivationDelay() const;
+
+ /**
+ * If set to true, the signals itemActivated() and itemsActivated() are emitted
+ * after a single-click of the left mouse button. If set to false (the default),
+ * the setting from style()->styleHint(QStyle::SH_ItemView_ActivateItemOnSingleClick) is used.
+ */
+ void setSingleClickActivationEnforced(bool singleClick);
+ bool singleClickActivationEnforced() const;
+
+ /**
+ * Setting the selection mode to enabled will make selecting and deselecting easier by acting
+ * kind of similar to when the Control Key is held down.
+ */
+ void setSelectionModeEnabled(bool enabled);
+ bool selectionMode() const;
+
+ /**
+ * @return \c true if search as you type is active, or \c false otherwise.
+ */
+ bool isSearchAsYouTypeActive() const;
+
+ bool processEvent(QEvent *event, const QTransform &transform);
+
+Q_SIGNALS:
+ /**
+ * Is emitted if exactly one item has been activated by e.g. a mouse-click
+ * or by pressing Return/Enter.
+ */
+ void itemActivated(int index);
+
+ /**
+ * Is emitted if more than one item has been activated by pressing Return/Enter
+ * when having a selection.
+ */
+ void itemsActivated(const KItemSet &indexes);
+
+ void itemMiddleClicked(int index);
+
+ /**
+ * Emitted if a context-menu is requested for the item with
+ * the index \a index. It is assured that the index is valid.
+ */
+ void itemContextMenuRequested(int index, const QPointF &pos);
+
+ /**
+ * Emitted if a context-menu is requested for the KItemListView.
+ */
+ void viewContextMenuRequested(const QPointF &pos);
+
+ /**
+ * Emitted if a context-menu is requested for the header of the KItemListView.
+ */
+ void headerContextMenuRequested(const QPointF &pos);