4 * This file is part of CameraPlus.
6 * Copyright (C) 2012 Mohammed Sameer <msameer@foolab.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 import com.nokia.meego 1.1
28 width: Math.max(150, Math.max(label.width, icon.width) + 20);
31 property string normalIcon: ""
32 property string checkedIcon: ""
33 property int value: -1
34 property int savedValue: -1
36 property alias iconSource: icon.source
37 property alias text: label.text
43 onClicked: root.clicked();
49 anchors.top: parent.top
50 anchors.left: parent.left
51 anchors.right: parent.right
53 anchors.leftMargin: 10
54 anchors.rightMargin: 10
55 source: root.value == root.savedValue ? checkedIcon : normalIcon
56 fillMode: Image.PreserveAspectFit
61 anchors.left: parent.left
62 anchors.right: parent.right
63 anchors.bottom: parent.bottom
64 anchors.top: icon.bottom
65 anchors.bottomMargin: 10
66 anchors.leftMargin: 10
67 anchors.rightMargin: 10
69 horizontalAlignment: Text.AlignHCenter