Changeset 64e2b3


Ignore:
Timestamp:
01/13/12 16:12:13 (4 months ago)
Author:
Micke Prag <micke.prag@…>
Branches:
('master', 'deebf2045e7119c339412580f37a1e653f7d5715')('controller-upgrade', '00f95d22e12d96ef089e0902ef62ae8ce841dc6f')
Children:
99c2b0e158d7a587a0b2cba693c0c15a54818171
Parents:
c90a4c1f1228464d23cf043d910d9c128d5e717f
git-author:
Micke Prag <micke.prag@telldus.se>2012-01-13 16:12:13+01:00
git-committer:
Micke Prag <micke.prag@telldus.se>2012-01-13 16:12:13+01:00
Message:

Convert our checkbox to a qt-component checkbox

Location:
telldus-gui/Plugins/Sensors
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • telldus-gui/Plugins/Sensors/SensorList.qml

    raadc45 r64e2b3  
    3939                        text: "Visible in list" 
    4040                        anchors.right: sensorinformationTitle.left 
     41                        horizontalAlignment: Text.AlignHCenter 
    4142                        visible: main.state == "EDIT" 
    4243                        width: 100 
  • telldus-gui/Plugins/Sensors/SensorView.qml

    rdf5e08 r64e2b3  
    11import Qt 4.7 
     2import QtDesktop 0.1 
    23 
    34Component { 
     
    6869                                width: 100 
    6970                        } 
    70                         Item{ 
     71                        Item  { 
    7172                                id: visibleinlistcheckbox 
     73                                height: 40 
     74                                width: 100 
    7275                                anchors.right: sensorInfo.left 
    73                                 visible: main.state == "EDIT" 
    74                                 height: 40 
    75                                 Rectangle{ 
     76                                CheckBox { 
     77                                        id: checkBox 
    7678                                        anchors.centerIn: parent 
    77                                         height: 10 
    78                                         width: 10 
    79                                         color: "white" 
    80                                         Text{ 
    81                                                 anchors.centerIn: parent 
    82                                                 color: "#004275" 
    83                                                 text: modelData.showInList ? "X" : "" 
    84                                         } 
    85                                         MouseArea{ 
    86                                                 anchors.fill: parent 
    87                                                 onClicked: { 
    88                                                         modelData.setShowInList(!modelData.showInList); 
    89                                                 } 
    90                                         } 
     79                                        width: checkBox.height 
     80                                        visible: main.state == "EDIT" 
     81                                        checked: modelData.showInList 
     82                                        onClicked: modelData.setShowInList(!modelData.showInList) 
    9183                                } 
    92                                 width: 100 
    9384                        } 
    9485 
Note: See TracChangeset for help on using the changeset viewer.