SelectionRectangle.qml 896 B

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright (C) 2021 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
  3. // Qt-Security score:significant reason:default
  4. import QtQuick
  5. import QtQuick.Templates as T
  6. import QtQuick.Controls.impl
  7. import QtQuick.Controls.Material
  8. import QtQuick.Controls.Material.impl
  9. T.SelectionRectangle {
  10. id: control
  11. topLeftHandle: handle
  12. bottomRightHandle: handle
  13. Component {
  14. id: handle
  15. SliderHandle {
  16. palette: SelectionRectangle.control.palette
  17. handlePressed: tapHandler.pressed || SelectionRectangle.dragging
  18. handleHovered: hoverHandler.hovered
  19. visible: SelectionRectangle.control.active
  20. HoverHandler {
  21. id: hoverHandler
  22. }
  23. TapHandler {
  24. id: tapHandler
  25. }
  26. }
  27. }
  28. }