Commit 4bf90fc2 authored by Alberto Mardegan's avatar Alberto Mardegan
Browse files

VncOutput: expose transformation methods to QML

parent a40e521c
......@@ -238,6 +238,18 @@ qreal VncOutput::topMargin() const
return d->m_paintedRect.y();
}
QPointF VncOutput::itemToVnc(const QPointF &p) const
{
Q_D(const VncOutput);
return d->m_itemToVnc.map(p);
}
QPointF VncOutput::vncToItem(const QPointF &p) const
{
Q_D(const VncOutput);
return d->m_vncToItem.map(p);
}
void VncOutput::paint(QPainter *painter)
{
Q_D(VncOutput);
......
......@@ -66,6 +66,9 @@ public:
qreal rightMargin() const;
qreal topMargin() const;
Q_INVOKABLE QPointF itemToVnc(const QPointF &p) const;
Q_INVOKABLE QPointF vncToItem(const QPointF &p) const;
void paint(QPainter *painter) override;
Q_SIGNALS:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment