12#include <QCoreApplication>
16#include <QVersionNumber>
59 static bool canPaste(
const QMimeData *mimeData);
76 static QImage
buildDragImage(
Scene *scene,
const QTransform &viewTransform,
const QRectF &sourceRect);
80 static void serializeItems(
const QList<QGraphicsItem *> &items, QDataStream &stream);
83 void serializeAndDelete(
const QList<QGraphicsItem *> &items, QDataStream &stream);
88 QList<QGraphicsItem *> deserializeAndAdd(QDataStream &stream,
const QVersionNumber &version,
89 std::optional<QPointF> fixedOffset = std::nullopt);
91 Scene *m_scene =
nullptr;
void paste()
Pastes items from the system clipboard into the scene.
static QImage buildDragImage(Scene *scene, const QTransform &viewTransform, const QRectF &sourceRect)
Renders sourceRect of scene, mapped through viewTransform, into a transparent-filled QImage bounded b...
void cut()
Cuts the currently selected items (copy + delete).
ClipboardManager(Scene *scene)
void cloneDrag(const QPointF &mousePos)
Initiates a clone-drag (Ctrl+drag) of the current selection.
static bool canPaste(const QMimeData *mimeData)
Returns whether mimeData carries circuit data paste() accepts.
void copy()
Copies the currently selected items to the system clipboard.
static constexpr int kMaxDragImageDimension
Main circuit editing scene.