Fixes for CheckButton API.
[harmattan/cameraplus] / qml / CheckButton.qml
1 // -*- qml -*-
2 import QtQuick 1.1
3 import com.nokia.meego 1.1
4
5 Button {
6         id: button
7         property string normalIcon: ""
8         property string checkedIcon: ""
9         property QtObject fader: null
10         property int value: -1
11         property bool doClose: true
12         property int savedValue: -1
13
14         width: visible ? 56 : 0
15         height: visible ? 56 : 0
16         iconSource: !visible ? "" : savedValue == value ? checkedIcon : normalIcon
17
18         onClicked: {
19                 if (doClose) {
20                         close();
21                 }
22         }
23 }