Advertisement
Guest User

Untitled

a guest
Apr 28th, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 13.36 KB | None | 0 0
  1. ListView {
  2.     anchors.fill: parent
  3.     id: mainList
  4.     spacing: 80
  5.     layoutDirection: "LeftToRight"
  6.     orientation: "Horizontal"
  7.            Item{
  8.                anchors.fill: parent
  9.               ListView{
  10.                 anchors.fill: parent
  11.                 id: parslist
  12.                 spacing: 25
  13.                 orientation: "Vertical"
  14.                 delegate:
  15.                     Item{
  16.                                      visible: model.visible || false
  17.                                      id: delegatetolistItem
  18.                                    /* height:25
  19.                                      width: 25*/
  20.                                        Rectangle {
  21.                                          id: roundforgenerator
  22.                                          height: 25
  23.                                          width: 25
  24.                                          radius:25
  25.                                          anchors.fill: parent
  26.                                       //   color: "#008000"
  27.  
  28.                                          border.width: 1
  29.                                          state: model.state || "good"
  30.  
  31.                                          ToolTip {
  32.                                          id: rectangleToolTip
  33.                                          visible: rectangleToolTip.text ? rectangleArea.containsMouse : false
  34.                                          text: descriptionforgenerator.text
  35.  
  36.                                          }
  37.  
  38.                                          MouseArea {
  39.                                              id: rectangleArea
  40.                                              anchors.fill: parent
  41.                                              hoverEnabled: true
  42.                                                  }
  43.  
  44.                                          Text {
  45.                                              y: parent.height + 2
  46.                                              font.pixelSize: 13
  47.                                              id: textforgenerator
  48.                                              text: model.textid || qsTr("id")
  49.  
  50.  
  51.                                              }
  52.  
  53.                                          Text{
  54.                                              id: descriptionforgenerator
  55.                                              text: model.place || qsTr("place")
  56.                                              visible: false
  57.  
  58.  
  59.                                              }/**Tooltip text*/
  60.  
  61.                                          Text {
  62.                                             id: textformeasuregenerator
  63.                                             text: model.measure || qsTr("0")
  64.                                             visible: true
  65.                                             anchors.centerIn: parent
  66.                                              }
  67.  
  68.                                          states: [
  69.                                                  State {
  70.                                                      name: "good"
  71.                                                      PropertyChanges {
  72.                                                          target: roundforgenerator; color: "#92D050"
  73.  
  74.                                                      }
  75.                                                  },
  76.                                                  State {
  77.                                                      name: "bad"
  78.                                                      PropertyChanges {
  79.                                                          target: roundforgenerator; color: "red"
  80.  
  81.                                                      }
  82.                                                  },
  83.                                                  State {
  84.                                                      name: "working"
  85.                                                      PropertyChanges {
  86.                                                          target: roundforgenerator; color: "orange"
  87.  
  88.                                                      }
  89.                                                  },
  90.                                                  State {
  91.                                                      name: "available"
  92.                                                      PropertyChanges {
  93.                                                          target: roundforgenerator; color: "skyblue"
  94.  
  95.                                                      }
  96.                                                  }
  97.                                              ]
  98.  
  99.  
  100.                                      }
  101.                                  }
  102.  
  103.                 model: parsmodel
  104.             }
  105.  
  106.             }
  107.  
  108.             Item{
  109.                 anchors.fill: parent
  110.             ListView{
  111.                 anchors.fill: parent
  112.                 id: claplist
  113.                 spacing: 25
  114.                 orientation: "Vertical"
  115.                 delegate:
  116.                     Item{
  117.                                      visible: model.visible || false
  118.                                      id: delegatetoclapItem
  119.                                    /* height:25
  120.                                      width: 25*/
  121.                                        Rectangle {
  122.                                          id: roundforclap
  123.                                          height: 25
  124.                                          width: 25
  125.                                          radius:25
  126.                                         // anchors.fill: parent
  127.                                       //   color: "#008000"
  128.  
  129.                                          border.width: 1
  130.                                          state: model.state || "good"
  131.  
  132.                                          ToolTip {
  133.                                          id: claprectangleToolTip
  134.                                          visible: claprectangleToolTip.text ? claprectangleArea.containsMouse : false
  135.                                          text: descriptionforclap.text
  136.  
  137.                                          }
  138.  
  139.                                          MouseArea {
  140.                                              id: claprectangleArea
  141.                                              anchors.fill: parent
  142.                                              hoverEnabled: true
  143.                                                  }
  144.  
  145.                                          Text {
  146.                                              y: parent.height + 2
  147.                                              font.pixelSize: 13
  148.                                              id: textforclap
  149.                                              text: model.textid || qsTr("id")
  150.  
  151.  
  152.                                              }
  153.  
  154.                                          Text{
  155.                                              id: descriptionforclap
  156.                                              text: model.place || qsTr("place")
  157.                                              visible: false
  158.  
  159.  
  160.                                              }/**Tooltip text*/
  161.  
  162.                                          Text {
  163.                                             id: textforclapgenerator
  164.                                             text: model.measure || qsTr("0")
  165.                                             visible: true
  166.                                             anchors.centerIn: parent
  167.                                              }
  168.  
  169.                                          states: [
  170.                                                  State {
  171.                                                      name: "good"
  172.                                                      PropertyChanges {
  173.                                                          target: roundforclap; color: "#92D050"
  174.  
  175.                                                      }
  176.                                                  },
  177.                                                  State {
  178.                                                      name: "bad"
  179.                                                      PropertyChanges {
  180.                                                          target: roundforclap; color: "red"
  181.  
  182.                                                      }
  183.                                                  },
  184.                                                  State {
  185.                                                      name: "working"
  186.                                                      PropertyChanges {
  187.                                                          target: roundforclap; color: "orange"
  188.  
  189.                                                      }
  190.                                                  },
  191.                                                  State {
  192.                                                      name: "available"
  193.                                                      PropertyChanges {
  194.                                                          target: roundforclap; color: "skyblue"
  195.  
  196.                                                      }
  197.                                                  }
  198.                                              ]
  199.  
  200.  
  201.                                      }
  202.                                  }
  203.                 model: clapmodel
  204.             }
  205.             }
  206.  
  207.             Item{
  208.                 anchors.fill: parent
  209.             GridView{
  210.                 anchors.fill: parent
  211.                 id: tempgrid
  212.                 cellWidth: 35; cellHeight: 35
  213.                 delegate: Item{
  214.                     visible: model.visible || false
  215.                     id: delegatetotemp
  216.                   /* height:25
  217.                     width: 25*/
  218.                       Rectangle {
  219.                         id: roundfortemp
  220.                         height: 25
  221.                         width: 25
  222.                         radius:25
  223.                        // anchors.fill: parent
  224.                      //   color: "#008000"
  225.  
  226.                         border.width: 1
  227.                         state: model.state || "good"
  228.  
  229.                         ToolTip {
  230.                         id: temprectangleToolTip
  231.                         visible: temprectangleToolTip.text ? temprectangleArea.containsMouse : false
  232.                         text: descriptionfortemp.text
  233.  
  234.                         }
  235.  
  236.                         MouseArea {
  237.                             id: temprectangleArea
  238.                             anchors.fill: parent
  239.                             hoverEnabled: true
  240.                                 }
  241.  
  242.                         Text {
  243.                             y: parent.height + 2
  244.                             font.pixelSize: 13
  245.                             id: textfortemp
  246.                             text: model.textid || qsTr("id")
  247.  
  248.  
  249.                             }
  250.  
  251.                         Text{
  252.                             id: descriptionfortemp
  253.                             text: model.place || qsTr("place")
  254.                             visible: false
  255.  
  256.  
  257.                             }/**Tooltip text*/
  258.  
  259.                         Text {
  260.                            id: textformeasuretemp
  261.                            text: model.measure || qsTr("0")
  262.                            visible: true
  263.                            anchors.centerIn: parent
  264.                             }
  265.  
  266.                         states: [
  267.                                 State {
  268.                                     name: "good"
  269.                                     PropertyChanges {
  270.                                         target: roundfortemp; color: "#92D050"
  271.  
  272.                                     }
  273.                                 },
  274.                                 State {
  275.                                     name: "bad"
  276.                                     PropertyChanges {
  277.                                         target: roundfortemp; color: "red"
  278.  
  279.                                     }
  280.                                 },
  281.                                 State {
  282.                                     name: "working"
  283.                                     PropertyChanges {
  284.                                         target: roundfortemp; color: "orange"
  285.  
  286.                                     }
  287.                                 },
  288.                                 State {
  289.                                     name: "available"
  290.                                     PropertyChanges {
  291.                                         target: roundfortemp; color: "skyblue"
  292.  
  293.                                     }
  294.                                 }
  295.                             ]
  296.  
  297.  
  298.                     }
  299.                 }
  300.                 model: tempmodel
  301.             }
  302.         }
  303.         ListModel {
  304.             ListElement{
  305.                 state: "bad"
  306.                 textid: "id"
  307.                 place: "placeid"
  308.                 measure: "2.25"
  309.                 visible: true
  310.             }
  311.             id:parsmodel
  312.         }
  313.  
  314.         ListModel{
  315.  
  316.             ListElement{
  317.                 state: "bad"
  318.                 textid: "id"
  319.                 place: "placeid"
  320.                 measure: "2.25"
  321.                 visible: true
  322.             }
  323.             id: clapmodel
  324.         }
  325.  
  326.         ListModel {
  327.             ListElement{
  328.                 state: "bad"
  329.                 textid: "id"
  330.                 place: "placeid"
  331.                 measure: "2.25"
  332.                 visible: true
  333.             }
  334.             id: tempmodel
  335.         }
  336.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement