Schim
Public Member Functions | Protected Member Functions | List of all members
GObjectHandle Class Reference

The base class for object handles. More...

#include <gobject.h>

Inheritance diagram for GObjectHandle:
[legend]
Collaboration diagram for GObjectHandle:
[legend]

Public Member Functions

 GObjectHandle (GObject *obj)
 Construct a handle associated with the specified GObject. More...
 
SheetScenescene ()
 

Protected Member Functions

QVariant itemChange (QGraphicsItem::GraphicsItemChange change, const QVariant &value) override
 
void mousePressEvent (QGraphicsSceneMouseEvent *event) override
 Initiate dragging when the left button is pressed. More...
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event) override
 Move the handle when the mouse is dragged over it with the left button down. More...
 

Detailed Description

The base class for object handles.

A handle is an item that allows the user to manipulate the object in some way, e.g. to resize, rotate, etc.

Constructor & Destructor Documentation

◆ GObjectHandle()

GObjectHandle::GObjectHandle ( GObject obj)
explicit

Construct a handle associated with the specified GObject.

obj is assigned as the parent of the handle in the scene. The handle is configured to send geometry changes.

Member Function Documentation

◆ itemChange()

QVariant GObjectHandle::itemChange ( QGraphicsItem::GraphicsItemChange  change,
const QVariant &  value 
)
overrideprotected

Used to notify obj of any changes to this handle

◆ mouseMoveEvent()

void GObjectHandle::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

Move the handle when the mouse is dragged over it with the left button down.

This method is used because the selection flag is disabled due to practical reasons. The handle is moved using moveBy, whereby snap-to-grid is applied if appropriate. The event is accepted.

◆ mousePressEvent()

void GObjectHandle::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
overrideprotected

Initiate dragging when the left button is pressed.

The handle accepts the event, which means that it will not be further processed by the scene.

◆ scene()

SheetScene* GObjectHandle::scene ( )

Return the scene cast to a SheetScene*.


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