Changeset View
Changeset View
Standalone View
Standalone View
applets/binary-clock/package/contents/ui/DotColumn.qml
Show All 20 Lines | |||||
21 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 21 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
22 | */ | 22 | */ | ||
23 | 23 | | |||
24 | import QtQuick 2.0 | 24 | import QtQuick 2.0 | ||
25 | 25 | | |||
26 | 26 | | |||
27 | Item { | 27 | Item { | ||
28 | property int val | 28 | property int val | ||
29 | property int startbit | | |||
30 | Dot { | 29 | Dot { | ||
31 | x:0 | 30 | x:0 | ||
32 | y:0 | 31 | y:0 | ||
33 | val:parent.val | 32 | val:parent.val | ||
34 | bit:1<<(startbit+3) | 33 | bit:8 | ||
35 | } | 34 | } | ||
36 | Dot { | 35 | Dot { | ||
37 | x:0 | 36 | x:0 | ||
38 | y:(dotSize+units.smallSpacing) | 37 | y:(dotSize+units.smallSpacing) | ||
39 | val:parent.val | 38 | val:parent.val | ||
40 | bit:1<<(startbit+2) | 39 | bit:4 | ||
41 | } | 40 | } | ||
42 | Dot { | 41 | Dot { | ||
43 | x:0 | 42 | x:0 | ||
44 | y:2*(dotSize+units.smallSpacing) | 43 | y:2*(dotSize+units.smallSpacing) | ||
45 | val:parent.val | 44 | val:parent.val | ||
46 | bit:1<<(startbit+1) | 45 | bit:2 | ||
47 | } | 46 | } | ||
48 | Dot { | 47 | Dot { | ||
49 | x:0 | 48 | x:0 | ||
50 | y:3*(dotSize+units.smallSpacing) | 49 | y:3*(dotSize+units.smallSpacing) | ||
51 | val:parent.val | 50 | val:parent.val | ||
52 | bit:1<<startbit | 51 | bit:1 | ||
53 | } | 52 | } | ||
54 | } | 53 | } |