1 Star 0 Fork 0

uthelei/QmlGraphics

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
qmlgraphicsviewpreview.h 818 Bytes
一键复制 编辑 原始数据 按行查看 历史
uthelei 提交于 2024-02-27 20:58 . 优化代码
#pragma once
#include "qmlgraphicsview.h"
class QmlGraphicsViewPreview : public QQuickItem
{
Q_OBJECT
public:
explicit QmlGraphicsViewPreview(QQuickItem* parent = nullptr);
virtual ~QmlGraphicsViewPreview() = default;
Q_DISABLE_COPY(QmlGraphicsViewPreview)
public:
Q_PROPERTY(QmlGraphicsView* source READ getSource WRITE setSource NOTIFY sourceChanged FINAL)
inline QmlGraphicsView* getSource() const noexcept
{
return m_source.data();
}
void setSource(QmlGraphicsView* source) noexcept;
protected:
Q_INVOKABLE QRectF rectUnion(QRectF a, QRectF b) const;
signals:
void sourceChanged();
void visibleWindowChanged(QRectF visibleWindowRect, qreal navigableZoom);
private:
QPointer<QmlGraphicsView> m_source;
};
QML_DECLARE_TYPE(QmlGraphicsViewPreview)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
QML
1
https://gitee.com/uthelei/qml-graphics.git
git@gitee.com:uthelei/qml-graphics.git
uthelei
qml-graphics
QmlGraphics
master

搜索帮助