QtBase  v6.3.1
Signals | Protected Member Functions | List of all members
MouseInterceptingGraphicsScene Class Reference

#include <accessibilityinspector.h>

Inheritance diagram for MouseInterceptingGraphicsScene:
Inheritance graph
[legend]
Collaboration diagram for MouseInterceptingGraphicsScene:
Collaboration graph
[legend]

Signals

void mousePressed (const QPoint point)
 
void mouseDobleClicked ()
 
- Signals inherited from QGraphicsScene
void changed (const QList< QRectF > &region)
 
void sceneRectChanged (const QRectF &rect)
 
void selectionChanged ()
 
void focusItemChanged (QGraphicsItem *newFocus, QGraphicsItem *oldFocus, Qt::FocusReason reason)
 
- Signals inherited from QObject
void destroyed (QObject *=nullptr)
 
void objectNameChanged (const QString &objectName, QPrivateSignal)
 

Protected Member Functions

virtual void mousePressEvent (QGraphicsSceneMouseEvent *event)
 
virtual void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event)
 
- Protected Member Functions inherited from QGraphicsScene
bool event (QEvent *event) override
 
bool eventFilter (QObject *watched, QEvent *event) override
 
virtual void contextMenuEvent (QGraphicsSceneContextMenuEvent *event)
 
virtual void dragEnterEvent (QGraphicsSceneDragDropEvent *event)
 
virtual void dragMoveEvent (QGraphicsSceneDragDropEvent *event)
 
virtual void dragLeaveEvent (QGraphicsSceneDragDropEvent *event)
 
virtual void dropEvent (QGraphicsSceneDragDropEvent *event)
 
virtual void focusInEvent (QFocusEvent *event)
 
virtual void focusOutEvent (QFocusEvent *event)
 
virtual void helpEvent (QGraphicsSceneHelpEvent *event)
 
virtual void keyPressEvent (QKeyEvent *event)
 
virtual void keyReleaseEvent (QKeyEvent *event)
 
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *event)
 
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
 
virtual void wheelEvent (QGraphicsSceneWheelEvent *event)
 
virtual void inputMethodEvent (QInputMethodEvent *event)
 
virtual void drawBackground (QPainter *painter, const QRectF &rect)
 
virtual void drawForeground (QPainter *painter, const QRectF &rect)
 
virtual void drawItems (QPainter *painter, int numItems, QGraphicsItem *items[], const QStyleOptionGraphicsItem options[], QWidget *widget=nullptr)
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
 QObject (QObjectPrivate &dd, QObject *parent=nullptr)
 

Additional Inherited Members

- Public Types inherited from QGraphicsScene
enum  ItemIndexMethod { BspTreeIndex , NoIndex = -1 }
 
enum  SceneLayer { ItemLayer = 0x1 , BackgroundLayer = 0x2 , ForegroundLayer = 0x4 , AllLayers = 0xffff }
 
- Public Slots inherited from QGraphicsScene
void update (const QRectF &rect=QRectF())
 
void invalidate (const QRectF &rect=QRectF(), SceneLayers layers=AllLayers)
 
void advance ()
 
void clearSelection ()
 
void clear ()
 
- Public Slots inherited from QObject
void deleteLater ()
 
- Public Member Functions inherited from QGraphicsScene
 QGraphicsScene (QObject *parent=nullptr)
 
 QGraphicsScene (const QRectF &sceneRect, QObject *parent=nullptr)
 
 QGraphicsScene (qreal x, qreal y, qreal width, qreal height, QObject *parent=nullptr)
 
virtual ~QGraphicsScene ()
 
QRectF sceneRect () const
 
qreal width () const
 
qreal height () const
 
void setSceneRect (const QRectF &rect)
 
void setSceneRect (qreal x, qreal y, qreal w, qreal h)
 
void render (QPainter *painter, const QRectF &target=QRectF(), const QRectF &source=QRectF(), Qt::AspectRatioMode aspectRatioMode=Qt::KeepAspectRatio)
 
ItemIndexMethod itemIndexMethod () const
 
void setItemIndexMethod (ItemIndexMethod method)
 
int bspTreeDepth () const
 
void setBspTreeDepth (int depth)
 
QRectF itemsBoundingRect () const
 
QList< QGraphicsItem * > items (Qt::SortOrder order=Qt::DescendingOrder) const
 
QList< QGraphicsItem * > items (const QPointF &pos, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape, Qt::SortOrder order=Qt::DescendingOrder, const QTransform &deviceTransform=QTransform()) const
 Returns all visible items that, depending on mode, are at the specified pos in a list sorted using order. In this case, "visible" defines items for which: isVisible() returns true, effectiveOpacity() returns a value greater than 0.0 (which is fully transparent) and the parent item does not clip it. More...
 
QList< QGraphicsItem * > items (const QRectF &rect, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape, Qt::SortOrder order=Qt::DescendingOrder, const QTransform &deviceTransform=QTransform()) const
 Returns all visible items that, depending on mode, are either inside or intersect with the specified rect, in a list sorted using order. In this case, "visible" defines items for which: isVisible() returns true, effectiveOpacity() returns a value greater than 0.0 (which is fully transparent) and the parent item does not clip it. More...
 
QList< QGraphicsItem * > items (const QPolygonF &polygon, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape, Qt::SortOrder order=Qt::DescendingOrder, const QTransform &deviceTransform=QTransform()) const
 Returns all visible items that, depending on mode, are either inside or intersect with the specified polygon, in a list sorted using order. In this case, "visible" defines items for which: isVisible() returns true, effectiveOpacity() returns a value greater than 0.0 (which is fully transparent) and the parent item does not clip it. More...
 
QList< QGraphicsItem * > items (const QPainterPath &path, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape, Qt::SortOrder order=Qt::DescendingOrder, const QTransform &deviceTransform=QTransform()) const
 Returns all visible items that, depending on mode, are either inside or intersect with the specified path, in a list sorted using order. In this case, "visible" defines items for which: isVisible() returns true, effectiveOpacity() returns a value greater than 0.0 (which is fully transparent) and the parent item does not clip it. More...
 
QList< QGraphicsItem * > items (qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform=QTransform()) const
 Returns all visible items that, depending on mode, are either inside or intersect with the rectangle defined by x, y, w and h, in a list sorted using order. In this case, "visible" defines items for which: isVisible() returns true, effectiveOpacity() returns a value greater than 0.0 (which is fully transparent) and the parent item does not clip it. More...
 
QList< QGraphicsItem * > collidingItems (const QGraphicsItem *item, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape) const
 
QGraphicsItemitemAt (const QPointF &pos, const QTransform &deviceTransform) const
 
QGraphicsItemitemAt (qreal x, qreal y, const QTransform &deviceTransform) const
 
QList< QGraphicsItem * > selectedItems () const
 
QPainterPath selectionArea () const
 
void setSelectionArea (const QPainterPath &path, const QTransform &deviceTransform)
 
void setSelectionArea (const QPainterPath &path, Qt::ItemSelectionOperation selectionOperation=Qt::ReplaceSelection, Qt::ItemSelectionMode mode=Qt::IntersectsItemShape, const QTransform &deviceTransform=QTransform())
 
QGraphicsItemGroupcreateItemGroup (const QList< QGraphicsItem * > &items)
 
void destroyItemGroup (QGraphicsItemGroup *group)
 
void addItem (QGraphicsItem *item)
 
QGraphicsEllipseItemaddEllipse (const QRectF &rect, const QPen &pen=QPen(), const QBrush &brush=QBrush())
 
QGraphicsLineItemaddLine (const QLineF &line, const QPen &pen=QPen())
 
QGraphicsPathItemaddPath (const QPainterPath &path, const QPen &pen=QPen(), const QBrush &brush=QBrush())
 
QGraphicsPixmapItemaddPixmap (const QPixmap &pixmap)
 
QGraphicsPolygonItemaddPolygon (const QPolygonF &polygon, const QPen &pen=QPen(), const QBrush &brush=QBrush())
 
QGraphicsRectItemaddRect (const QRectF &rect, const QPen &pen=QPen(), const QBrush &brush=QBrush())
 
QGraphicsTextItemaddText (const QString &text, const QFont &font=QFont())
 
QGraphicsSimpleTextItemaddSimpleText (const QString &text, const QFont &font=QFont())
 
QGraphicsProxyWidgetaddWidget (QWidget *widget, Qt::WindowFlags wFlags=Qt::WindowFlags())
 
QGraphicsEllipseItemaddEllipse (qreal x, qreal y, qreal w, qreal h, const QPen &pen=QPen(), const QBrush &brush=QBrush())
 
QGraphicsLineItemaddLine (qreal x1, qreal y1, qreal x2, qreal y2, const QPen &pen=QPen())
 
QGraphicsRectItemaddRect (qreal x, qreal y, qreal w, qreal h, const QPen &pen=QPen(), const QBrush &brush=QBrush())
 
void removeItem (QGraphicsItem *item)
 
QGraphicsItemfocusItem () const
 
void setFocusItem (QGraphicsItem *item, Qt::FocusReason focusReason=Qt::OtherFocusReason)
 
bool hasFocus () const
 
void setFocus (Qt::FocusReason focusReason=Qt::OtherFocusReason)
 
void clearFocus ()
 
void setStickyFocus (bool enabled)
 
bool stickyFocus () const
 
QGraphicsItemmouseGrabberItem () const
 
QBrush backgroundBrush () const
 
void setBackgroundBrush (const QBrush &brush)
 
QBrush foregroundBrush () const
 
void setForegroundBrush (const QBrush &brush)
 
virtual QVariant inputMethodQuery (Qt::InputMethodQuery query) const
 
QList< QGraphicsView * > views () const
 
void update (qreal x, qreal y, qreal w, qreal h)
 
void invalidate (qreal x, qreal y, qreal w, qreal h, SceneLayers layers=AllLayers)
 
QStylestyle () const
 
void setStyle (QStyle *style)
 
QFont font () const
 
void setFont (const QFont &font)
 
QPalette palette () const
 
void setPalette (const QPalette &palette)
 
bool isActive () const
 
QGraphicsItemactivePanel () const
 
void setActivePanel (QGraphicsItem *item)
 
QGraphicsWidgetactiveWindow () const
 
void setActiveWindow (QGraphicsWidget *widget)
 
bool sendEvent (QGraphicsItem *item, QEvent *event)
 
qreal minimumRenderSize () const
 
void setMinimumRenderSize (qreal minSize)
 
bool focusOnTouch () const
 
void setFocusOnTouch (bool enabled)
 
- Public Member Functions inherited from QObject
Q_INVOKABLE QObject (QObject *parent=nullptr)
 
virtual ~QObject ()
 
QString objectName () const
 
void setObjectName (const QString &name)
 
QBindable< QStringbindableObjectName ()
 
bool isWidgetType () const
 
bool isWindowType () const
 
bool signalsBlocked () const noexcept
 
bool blockSignals (bool b) noexcept
 
QThreadthread () const
 
void moveToThread (QThread *thread)
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
void killTimer (int id)
 
template<typename T >
T findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<typename T >
QList< TfindChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<typename T >
QList< TfindChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
const QObjectListchildren () const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const
 
bool disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const
 
bool disconnect (const QObject *receiver, const char *member=nullptr) const
 
void dumpObjectTree () const
 
void dumpObjectInfo () const
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
QBindingStoragebindingStorage ()
 
const QBindingStoragebindingStorage () const
 
QObjectparent () const
 
bool inherits (const char *classname) const
 
- Static Public Member Functions inherited from QObject
static QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
 
static QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
static QMetaObject::Connection ::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 slot)
 
static QMetaObject::Connection ::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *context, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static std::enable_if< QtPrivate::FunctionPointer< Func2 >::ArgumentCount==-1 &&!std::is_convertible_v< Func2, const char * >, QMetaObject::Connection >::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 slot)
 
template<typename Func1 , typename Func2 >
static std::enable_if< QtPrivate::FunctionPointer< Func2 >::ArgumentCount==-1 &&!std::is_convertible_v< Func2, const char * >, QMetaObject::Connection >::type connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *context, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member)
 
static bool disconnect (const QMetaObject::Connection &)
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot)
 
template<typename Func1 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero)
 
- Protected Slots inherited from QGraphicsScene
virtual bool focusNextPrevChild (bool next)
 
- Protected Attributes inherited from QObject
QScopedPointer< QObjectDatad_ptr
 
- Properties inherited from QGraphicsScene
QBrush backgroundBrush
 the background brush of the scene. More...
 
QBrush foregroundBrush
 the foreground brush of the scene. More...
 
ItemIndexMethod itemIndexMethod
 the item indexing method. More...
 
QRectF sceneRect
 the scene rectangle; the bounding rectangle of the scene More...
 
int bspTreeDepth
 the depth of QGraphicsScene's BSP index tree More...
 
QPalette palette
 the scene's default palette More...
 
QFont font
 the scene's default font More...
 
bool stickyFocus
 whether clicking into the scene background will clear focus More...
 
qreal minimumRenderSize
 the minimal view-transformed size an item must have to be drawn More...
 
bool focusOnTouch
 whether items gain focus when receiving a {touch begin} event. More...
 
- Properties inherited from QObject
QString objectName
 the name of this object More...
 

Detailed Description

Definition at line 63 of file accessibilityinspector.h.

Member Function Documentation

◆ mouseDobleClicked

void MouseInterceptingGraphicsScene::mouseDobleClicked ( )
signal
Here is the caller graph for this function:

◆ mouseDoubleClickEvent()

void MouseInterceptingGraphicsScene::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent mouseEvent)
protectedvirtual

This event handler, for event mouseEvent, can be reimplemented in a subclass to receive mouse double-click events for the scene.

If someone doubleclicks on the scene, the scene will first receive a mouse press event, followed by a release event (i.e., a click), then a double-click event, and finally a release event. If the double-click event is delivered to a different item than the one that received the first press and release, it will be delivered as a press event. However, tripleclick events are not delivered as double-click events in this case.

The default implementation is similar to mousePressEvent().

Note: See items() for a definition of which items are considered visible by this function.

See also
QGraphicsItem::mousePressEvent(), QGraphicsItem::mouseMoveEvent(), QGraphicsItem::mouseReleaseEvent(), QGraphicsItem::setAcceptedMouseButtons()

Reimplemented from QGraphicsScene.

Definition at line 43 of file accessibilityinspector.cpp.

Here is the call graph for this function:

◆ mousePressed

void MouseInterceptingGraphicsScene::mousePressed ( const QPoint  point)
signal
Here is the caller graph for this function:

◆ mousePressEvent()

void MouseInterceptingGraphicsScene::mousePressEvent ( QGraphicsSceneMouseEvent mouseEvent)
protectedvirtual

This event handler, for event mouseEvent, can be reimplemented in a subclass to receive mouse press events for the scene.

The default implementation depends on the state of the scene. If there is a mouse grabber item, then the event is sent to the mouse grabber. Otherwise, it is forwarded to the topmost visible item that accepts mouse events at the scene position from the event, and that item promptly becomes the mouse grabber item.

If there is no item at the given position on the scene, the selection area is reset, any focus item loses its input focus, and the event is then ignored.

Note: See items() for a definition of which items are considered visible by this function.

See also
QGraphicsItem::mousePressEvent(), QGraphicsItem::setAcceptedMouseButtons()

Reimplemented from QGraphicsScene.

Definition at line 37 of file accessibilityinspector.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: