rahulch

Untitled

Oct 21st, 2019
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 1.94 KB | None | 0 0
  1. Item {
  2.         id: videoOverlayWindow
  3. //         color: "transparent"
  4.         anchors.fill: videoWindow
  5. //         z: 1
  6.  
  7.         Repeater {
  8.             model: personDisplayDetailsModel
  9.             delegate: Item {
  10.                 Rectangle {
  11.                     id: faceBoundaryBoxRect
  12.                     x: xCoord
  13.                     y: yCoord
  14.                     height: faceHeight
  15.                     width: faceWidth
  16.                     color: "transparent"
  17.                     border.color: frID < 0 ? "red" : "green"
  18.                     border.width: 3
  19.                     visible: peopleidentificationmainwindow.faceCount > 0
  20.                 }
  21.                 Rectangle {
  22.                     id: faceBoundaryBoxRectBackgroundColor
  23.                     anchors {
  24.                         fill: faceBoundaryBoxRect
  25. //                         margins: faceBoundaryBoxRect.border.width
  26.                     }
  27.                     opacity: 0
  28.                     MouseArea {
  29.                         //                     enabled: frID < 0 && peopleidentificationmainwindow.isRegisterMode
  30.                         id: faceBoundaryBoxRectBackgroundColorMouseArea
  31.                         acceptedButtons: Qt.AllButtons
  32.                         anchors.fill: faceBoundaryBoxRectBackgroundColor
  33.                         hoverEnabled: true
  34.                         onEntered: {
  35.                             faceBoundaryBoxRectBackgroundColor.opacity = 0.3
  36.                         }
  37.                         onExited: {
  38.                             faceBoundaryBoxRectBackgroundColor.opacity = 0
  39.                         }
  40.                         onClicked: {
  41.                             if (mouse.button == Qt.RightButton)
  42.                                 parent.color = 'blue';
  43.                             else
  44.                                 parent.color = 'red';
  45.                         }
  46.                     }
  47.                 }
  48.             }
  49.         }
  50.     }
Add Comment
Please, Sign In to add comment