|
| 1 | +/******************************************************************************* |
| 2 | + * Copyright 2012-2020 Esri |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + ******************************************************************************/ |
| 16 | + |
| 17 | +import QtQuick 2.12 |
| 18 | +import QtQuick.Controls 2.2 |
| 19 | + |
| 20 | +/*! |
| 21 | + \qmltype ClippingView |
| 22 | + \ingroup ArcGISQtToolkitAR |
| 23 | + \ingroup ArcGISQtToolkitARCppApi |
| 24 | + \ingroup ArcGISQtToolkitARQmlApi |
| 25 | + \ingroup ArcGISQtToolkit |
| 26 | + \ingroup ArcGISQtToolkitCppApi |
| 27 | + \ingroup ArcGISQtToolkitQmlApi |
| 28 | + \inqmlmodule Esri.ArcGISRuntime.Toolkit.AR |
| 29 | + \since Esri.ArcGISRutime 100.8 |
| 30 | + \brief An item displaying controls for adjusting a scene view's clipping distance. |
| 31 | +
|
| 32 | + This item can be used to change manually the clipping distance of the scene. |
| 33 | +*/ |
| 34 | + |
| 35 | +Item { |
| 36 | + id: root |
| 37 | + height: rect.height |
| 38 | + property alias clippingDistance: slider.value |
| 39 | + |
| 40 | + Rectangle { |
| 41 | + id: rect |
| 42 | + anchors { |
| 43 | + left: parent.left |
| 44 | + right: parent.right |
| 45 | + bottom: parent.bottom |
| 46 | + } |
| 47 | + height: column.height + 20 |
| 48 | + color: "#88ffffff" // transparent white |
| 49 | + radius: 5 |
| 50 | + |
| 51 | + Column { |
| 52 | + id: column |
| 53 | + anchors { |
| 54 | + left: parent.left |
| 55 | + right: parent.right |
| 56 | + bottom: parent.bottom |
| 57 | + margins: 10 |
| 58 | + } |
| 59 | + spacing: 5 |
| 60 | + |
| 61 | + Text { |
| 62 | + width: parent.width |
| 63 | + text: "Clipping distance: " + Math.floor(slider.value) + " m" |
| 64 | + horizontalAlignment: Text.AlignHCenter |
| 65 | + font.bold: true |
| 66 | + } |
| 67 | + Slider { |
| 68 | + id: slider |
| 69 | + width: parent.width |
| 70 | + from: 0.0 |
| 71 | + to: 5000.0 |
| 72 | + value: 0.0 |
| 73 | + } |
| 74 | + } |
| 75 | + } |
| 76 | +} |
0 commit comments