Warning, /education/analitza/declarative/qml/Graph3D.qml is written in an unsupported language. File is not indexed.
0001 // SPDX-FileCopyrightText: 2015 by Aleix Pol <aleixpol@kde.org> 0002 // SPDX-License-Identifier: GPL-2.0-or-later 0003 0004 import QtQuick 0005 import QtQuick.Layouts 0006 import org.kde.analitza 0007 0008 Graph3DView { 0009 id: view 0010 MouseArea { 0011 id: mouse 0012 anchors.fill: parent 0013 property int lastX: 0 0014 property int lastY: 0 0015 acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton 0016 0017 onPressed: { lastX=mouse.x; lastY=mouse.y } 0018 0019 onPositionChanged: { 0020 view.rotate(mouse.x-lastX, mouse.y-lastY) 0021 0022 lastX=mouse.x 0023 lastY=mouse.y 0024 } 0025 0026 onWheel: { 0027 view.scale(wheel.angleDelta.y>0 ? 0.9 : 1.1, wheel.x, wheel.y) 0028 } 0029 } 0030 }