-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMainScreen.qml
1936 lines (1695 loc) · 63 KB
/
MainScreen.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import QtQuick 2.9
import QtQuick 2.12
import QtQuick.Window 2.2
import QtCharts 2.2
import QtQuick.Controls 2.3
import QtPositioning 5.4
import QtSensors 5.9
import QtQuick.Scene2D 2.9
import QtQuick 2.1
import QtQuick.Layouts 1.11
import QtQuick 2.9
import QtQuick.Window 2.12
import QtQuick.Controls.Styles 1.4
import QtQuick.Controls 2.3
import QtQuick.Layouts 1.4
import QtQuick.Controls 1.4
import QtQuick.Controls.Private 1.0
import QtGraphicalEffects 1.12
import QtQuick.Controls 2.12
import "."
Window {
id: mainWindow
visible: true
width: MyGlobal.screenWidth
height: MyGlobal.screenHeight
color: MyStyle.backgroundColor
title: qsTr("Reach Technologies -- Medical Demo")
property int theValue: MyGlobal.screenFactor
property int fontSize80: theValue / 6
property int fontSize60: theValue / 8
property int fontSize50: theValue / 10
property int fontSize40: theValue / 12
property int fontSize35: theValue / 14
property int fontSize32: theValue / 15
property int fontSize30: theValue / 16
property int fontSize25: theValue / 19
property int fontSize24: theValue / 20
property int fontSize20: theValue / 24
property int fontSize18: theValue / 27
property int fontSize14: theValue / 34
property int fontSize13: theValue / 37
property int fontSize12: theValue / 40
property int fontSize11: theValue / 44
property int fontSize10: theValue / 48
property int fontSize8: theValue / 60
property int fontSize6: theValue / 80
property int fontSize5: theValue / 96
property int fontSize2: theValue / 240
property int boxSize: theValue / 6
property int boxSize1: theValue / 5
property int textMargin: fontSize12 / 2
property int mainLeftMargin: fontSize30
property int column1: fontSize80 + fontSize40 + fontSize24
property int myBarNum: 20
property int myBarSpace: fontSize2
property int myBarHeight: fontSize8
property int myBarBase: myBarNum * (myBarSpace + myBarHeight)
signal submitTextField(string text)
function doVal(mouse) {
if (mouse < 0) mouse = 0;
if (mouse > myBarBase) mouse = myBarBase;
var val = 100 - (parseInt( (mouse / myBarBase ) * 100));
return val
}
function doIt(val, repeater) {
var theNum = parseInt(repeater.count - (val / 5))
for (var i = 0; i < repeater.count; i++) {
if (theNum > i ) {
repeater.itemAt(i).color = MyStyle.barGraphOffColor
} else {
repeater.itemAt(i).color = MyStyle.barGraphOnColor
}
}
}
//Function to get the date with the format "Weekday, Month day (Eg. Monday, June 10)"
function getDate() {
var date = new Date();
var weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'];
var months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
var weekday = weekdays[date.getDay()];
var month = months[date.getMonth()];
var day = date.getDate();
//var secs = date.getTime();
return weekday + ", " + month + " " + day
}
//Function to get the local time
function getTime() {
var time = new Date().toLocaleTimeString([], {
hour: '2-digit'
}, {
minute: '2-digit'
}).toString()
var hour = time.slice(1, 2) === ":" ? time.slice(0, 1) : time.slice(0, 2)
var minute = time.slice(1, 2) === ":" ? time.slice(2, 4) : time.slice(3, 5)
var secs = time.slice(1, 2) === ":" ? time.slice(5, 7) : time.slice(6, 8)
return hour + ":" + minute + ":" + secs
}
Rectangle {
id: main
signal sendPreviousScreen(int screen)
signal startAnimation()
width: MyGlobal.screenWidth
height: MyGlobal.screenHeight
anchors {
top: parent.top
left: parent.left
}
FontLoader {
id: sourceSansLight;
source: "Fonts/SourceSansPro-Light.otf";
}
property
var screen: {
"main": 0,
"schedule": 1,
"patients": 2,
"alarm": 3
}
property int buttonsAnimationX: 760
property int circleDuration: 10
property int gifDuration: 150
property int gifDelay: 10
property int textDuration: 20
property int textDelay: 10
property string gender: "Male"
property var patientObj
property double subTextOpacity: 0.8
property int opacityAnimation: 0
function receivePatientInfo(patientJSON) { //TO DO: change to patientInfo (object)
patientObj = JSON.parse(patientJSON);
patient = patientObj;
}
function restartYAnimations() {
patientAnimation.restart();
secondRowAnimation.restart();
conditionRowAnimation.restart();
greenDotAnimation.restart();
hospitalAnimation.restart();
paNumAnimation.restart();
clockAnimation.restart();
}
function restartOpacityAnimations() {
gifAnimation.restart();
circleAnimation.restart();
textAnimation.restart();
valueAnimation.restart();
bloodPressureLeftAnimation.restart()
bloodPressureRightAnimation.restart()
buttonAnimation.restart()
alarmButtonAnimation.restart()
temperatureAnimation.restart()
}
function initializeOpacity() {
//Initialize the target elements on opacity 0
gifEKGLine.opacity = 0;
gifPulseLine.opacity = 0;
greenCircle.opacity = 0;
purpleCircle.opacity = opacityAnimation;
blueCircle.opacity = opacityAnimation;
textEKG.opacity = opacityAnimation;
textEKGValue.opacity = opacityAnimation;
textBMP.opacity = opacityAnimation;
textPulse.opacity = opacityAnimation;
textPulseValue.opacity = opacityAnimation;
textSpO.opacity = opacityAnimation;
textInsulinPump.opacity = opacityAnimation;
textUHr.opacity = opacityAnimation;
insulinP.opacity = opacityAnimation;
temperatureLeft.opacity = opacityAnimation;
temperatureRight.opacity = opacityAnimation;
salineTimer.sliderNumber = 25;
}
function restartSliders() {
console.log("RESTART SLIDERS");
for (var i = 0; i < 25; ++i) {
if (repeater.itemAt(i) !== null) {
repeater.itemAt(i).color = MyGlobal.barGraphOffColor
}
if (repeater1.itemAt(i) !== null) {
repeater1.itemAt(i).color = MyGlobal.barGraphOffColor
}
if (repeater2.itemAt(i) !== null) {
repeater2.itemAt(i).color = MyGlobal.barGraphOffColor
}
}
salineAnimation.restart()
salineTimer.restart()
salineTextAnimation.restart()
hicorAnimation.restart()
hicorTimer.restart()
hicorTextAnimation.restart()
glucagonAnimation.restart()
glucagonTimer.restart()
glucagonTextAnimation.restart()
}
function receiveAnimation() {
initializeOpacity();
restartYAnimations();
restartOpacityAnimations();
restartSliders();
}
color: MyStyle.backgroundColor
//----- Patient Info
Rectangle {
id: topRow
height: MyGlobal.screenHeight / 6
width: MyGlobal.screenWidth
Rectangle {
id: patientBox
anchors.left: parent.left
width: MyGlobal.screenWidth / 3 //- fontSize40
height: parent.height
color: MyStyle.backgroundColor
Text {
anchors {
bottom: parent.bottom
bottomMargin: fontSize50
left: parent.left
leftMargin: fontSize12
}
objectName: "textPatientName"
id: textPatientName
color: MyStyle.titleColor
text: MyGlobal.patientName
font.pixelSize: fontSize20
}
Text {
objectName: "textPatientGender"
id: textPatientGender
anchors {
bottom: parent.bottom
bottomMargin: fontSize25
left: parent.left
leftMargin: mainLeftMargin
}
color: MyStyle.propertyValueColor
text: MyGlobal.patientGender
font.pixelSize: fontSize14
}
Text {
id: textPatientAgeTitle
anchors {
bottom: textPatientGender.bottom
right: textPatientAgeValue.left
rightMargin: fontSize11
}
color: MyStyle.propertyTitleColor
text: qsTr("Age:")
font.pixelSize: fontSize13
}
Text {
objectName: "textPatientAge"
id: textPatientAgeValue
anchors {
bottom: textPatientGender.bottom
left: parent.left
leftMargin: column1
}
color: MyStyle.propertyValueColor
text: MyGlobal.patientAge
font.pixelSize: fontSize14
}
//Patient Condition
Rectangle {
id: rectCond
anchors {
bottom: parent.bottom
left: parent.left
leftMargin: mainLeftMargin
}
radius: width / 2
color: MyGlobal.patientConditionColor
width: fontSize18
height: width
smooth: true
} //Icon rectangle
Text {
id: textCondition
anchors {
bottom: rectCond.bottom
right: textConditionValue.left
rightMargin: fontSize11
}
color: MyStyle.propertyTitleColor
text: "Condition:"
font.pixelSize: fontSize13
}
Text {
objectName: "textConditionValue"
id: textConditionValue
anchors {
bottom: rectCond.bottom
left: parent.left
leftMargin: column1
}
color: MyStyle.propertyValueColor
text: MyGlobal.patientCondition
font.pixelSize: fontSize14
}
} //Patient Box rectangle
Rectangle {
id: admitBox
color: MyStyle.backgroundColor
anchors.left: patientBox.right
anchors.bottom: patientBox.bottom
width: MyGlobal.screenWidth / 3 + 25
height: parent.height
Text {
objectName: "paNumValue"
id: paNumValue
anchors {
bottom: parent.bottom
bottomMargin: fontSize50
left: parent.left
}
color: MyStyle.titleColor
text: MyGlobal.patientNumber
renderType: Text.NativeRendering
font.pixelSize: fontSize18
}
NumberAnimation {
id: paNumAnimation
target: paNumValue
property: "y"
duration: 500
from: -10
to: 20
running: true
}
Text {
id: textAdmission
anchors {
bottom: parent.bottom
bottomMargin: fontSize25
left: parent.left
}
color: MyStyle.propertyTitleColor
text: qsTr("Admission:")
font.pixelSize: fontSize13
}
Text {
objectName: "admissionDateTime"
id: admissionDateValue
anchors {
bottom: textAdmission.bottom
left: textAdmission.right
leftMargin: fontSize11
}
color: MyStyle.propertyValueColor
text: MyGlobal.patientAdmitDate + " / " + MyGlobal.patientAdmitTime
font.pixelSize: fontSize14
}
//Room Number
Text {
id: textRoomNo
anchors {
bottom: parent.bottom
right: textAdmission.right
}
color: MyStyle.propertyTitleColor
text: qsTr("Room:")
font.pixelSize: fontSize14
}
Text {
objectName: "roomNumber"
id: roomValue
anchors {
bottom: textRoomNo.bottom
left: textAdmission.right
leftMargin: fontSize11
}
color: MyStyle.propertyValueColor
text: MyGlobal.hospitalRoom
font.pixelSize: fontSize14
}
} //rectangle
//Hospital Name
Rectangle {
id: hospitalBox
color: MyStyle.backgroundColor
anchors.left: admitBox.right
anchors.bottom: patientBox.bottom
width: MyGlobal.screenWidth / 3 - 100
height: parent.height
Text {
objectName: "hospitalName"
id: textHospitalName
anchors {
bottom: parent.bottom
bottomMargin: fontSize50
left: parent.left
}
color: MyStyle.titleColor
text: MyGlobal.hospitalName
font.pixelSize: fontSize14
}
NumberAnimation {
id: hospitalAnimation
target: textHospitalName
property: "y"
duration: 500
from: -10
to: 18
running: true
}
//Date and Time
Rectangle {
id: clockRow
width: 50
height: timeLabel.implicitHeight
color: MyStyle.backgroundColor
anchors {
bottom: parent.bottom
bottomMargin: fontSize25
left: parent.left
}
Text {
id: timeLabel
font.pixelSize: fontSize14
color: MyStyle.propertyValueColor
anchors {
left: parent.left
}
}
//Timer to update the time using the getTime() function"
Timer {
id: timeTimer
interval: 1000
repeat: true
running: true
triggeredOnStart: true
onTriggered: timeLabel.text = getTime()
}
} //rectangle
NumberAnimation {
id: clockAnimation
target: clockRow
property: "y"
from: -10
to: 40
duration: 500
running: true
}
Label {
id: currentDateLabel
property date currentDate: new Date()
//elide: Text.ElideRight
font.pixelSize: fontSize13
//horizontalAlignment: Text.AlignRight
anchors {
bottom: parent.bottom;
left: parent.left;
}
color: MyStyle.propertyValueColor
}
//Timer to update the date using the getDate() function"
Timer {
id: dateTimer
interval: 1000
repeat: true
running: true
triggeredOnStart: true
onTriggered: currentDateLabel.text = getDate()
}
} //HospitalName
} //row
//----- Temperature
Rectangle {
id: tempBox
height: fontSize80
width: MyGlobal.screenWidth / 2 - fontSize40
color: MyStyle.backgroundColor
anchors {
left: parent.left
top: topRow.bottom
}
Text {
id: textTemperature
anchors {
left: tempBox.left
leftMargin: mainLeftMargin
top: tempBox.top
topMargin: fontSize18
}
color: MyStyle.titleColor
text: qsTr("Temperature")
font.pixelSize: fontSize13
}
Text {
id: textCelsius
anchors {
left: textTemperature.right
leftMargin: fontSize14
bottom: textTemperature.bottom
}
color: MyStyle.propertyValueColor
text: MyGlobal.temperatureCelsius
font.pixelSize: fontSize11
}
Text {
id: temperatureLeft
anchors {
top: textTemperature.top;
topMargin: fontSize12
left: parent.left;
leftMargin: fontSize30
}
color: MyStyle.propertyValueColor
text: MyGlobal.temperature1
font.pixelSize: fontSize32
font.family: sourceSansLight.name
}
Rectangle {
id: imageCircleArrow
height: fontSize20
width: height
radius: width / 2
color: MyGlobal.temperatureArrowColor
anchors {
left: temperatureLeft.right;
verticalCenter: temperatureLeft.verticalCenter;
leftMargin: fontSize10;
}
Image {
id: imageArrow
fillMode: Image.PreserveAspectFit
sourceSize: Qt.size(parent.width, parent.height)
source: "Images/arrow_50x50.png"
smooth: true
rotation: MyGlobal.temperatureArrowRotation
}
}
Text {
id: temperatureRight
anchors {
top: temperatureLeft.top;
left: imageCircleArrow.right;
leftMargin: fontSize10
}
color: MyStyle.propertyValueColor
text: MyGlobal.temperature2
font.pixelSize: fontSize32
font.family: sourceSansLight.name
}
Text {
id: textHighest
anchors {
left: temperatureRight.right;
leftMargin: fontSize24;
verticalCenter: temperatureLeft.verticalCenter;
}
color: MyStyle.propertyTitleColor
text: qsTr("Highest")
font.pixelSize: fontSize12
font.family: sourceSansLight.name
}
Text {
objectName: "tempHighest"
id: tempHighest
anchors {
left: textHighest.right;
leftMargin: fontSize14;
verticalCenter: temperatureLeft.verticalCenter;
}
color: MyStyle.propertyValueColor
text: MyGlobal.temperatureHigh
font.pixelSize: fontSize24
font.family: sourceSansLight.name
}
}
//----- Blood Pressure
Rectangle {
id: bpBox
height: MyGlobal.screenHeight / 4
width: MyGlobal.screenWidth / 2 - fontSize40
anchors {
left: parent.left
top: tempBox.bottom
}
color: MyStyle.backgroundColor
Text {
id: textBloodPressure
anchors {
left: parent.left
leftMargin: mainLeftMargin
top: parent.top
}
color: MyStyle.titleColor
text: qsTr("Blood Pressure")
font.pixelSize: fontSize14
}
Text {
id: textmmHg
anchors {
left: textBloodPressure.right
leftMargin: fontSize18
bottom: textBloodPressure.bottom
}
color: MyStyle.propertyTitleColor
text: qsTr("mmHg")
font.pixelSize: fontSize12
}
Text {
id: textSYS
anchors {
left: textBloodPressure.left
top: textBloodPressure.bottom
}
color: MyStyle.propertyTitleColor
text: qsTr("SYS")
font.pixelSize: fontSize10
}
Text {
id: textDIA
anchors {
left: bpDia.left
bottom: textSYS.bottom
}
color: MyStyle.propertyTitleColor
text: qsTr("DIA")
font.pixelSize: fontSize10
}
Text {
objectName: "bpSys"
id: bpSys
anchors {
left: parent.left;
leftMargin: fontSize30
verticalCenter: imageBackSlashLarge.verticalCenter;
}
color: MyStyle.propertyBPColor
text: MyGlobal.bpSysValue
font.pixelSize: fontSize60
}
Image {
id: imageBackSlashLarge
anchors {
left: bpSys.right
leftMargin: fontSize14
bottom: parent.bottom
bottomMargin: fontSize14
}
fillMode: Image.PreserveAspectFit
source: "Images/back-slash-large.png"
}
Text {
objectName: "bpDia"
id: bpDia
anchors {
left: imageBackSlashLarge.right;
leftMargin: fontSize14
verticalCenter: imageBackSlashLarge.verticalCenter;
}
color: MyStyle.propertyBPColor
text: MyGlobal.bpDiaValue
font.pixelSize: fontSize60
}
}
//----- Medications
Rectangle {
id: medsBox
height: MyGlobal.screenFactor / 2
width: MyGlobal.screenWidth / 2 - fontSize40
anchors {
left: tempBox.right
top: topRow.bottom
topMargin: fontSize18
}
color: MyStyle.backgroundColor
Text {
id: elementTextMedication
anchors {
left: parent.left
top: medsBox.top
}
color: MyStyle.titleColor
text: qsTr("Medications")
font.pixelSize: fontSize14
}
//----------------------------------- Saline
Rectangle {
id: salineBox
anchors {
left: parent.left
top: elementTextMedication.bottom
topMargin: fontSize10
}
width: fontSize80 + fontSize20
height: fontSize80 * 2 + fontSize40
color: MyStyle.backgroundColor
Text {
id: elementTextSaline
anchors {
left: rectangleRepeaterComponent.right
leftMargin: fontSize5
top: parent.top
}
color: MyStyle.propertyTitleColor
text: qsTr("Saline")
font.pixelSize: fontSize14
}
Text {
objectName: "elementTextSalineVal"
id: elementTextSalineVal
anchors {
left: elementTextSaline.left
top: elementTextSaline.bottom
}
color: MyStyle.propertyValueColor
text: MyGlobal.salineValue
font.pixelSize: fontSize40
font.family: sourceSansLight.name
onTextChanged: {
console.log("SALINE CHANGED ", MyGlobal.salineValue);
doIt(MyGlobal.salineValue, repeater);
}
}
Text {
id: salinePercentage
color: MyStyle.propertyValueColor
text: "%"
font.pixelSize: fontSize30
font.family: sourceSansLight.name
anchors {
left: elementTextSalineVal.right;
top: elementTextSalineVal.top;
}
}
Rectangle {
id: rectangleRepeaterComponent
anchors {
left: parent.left
top: elementTextSaline.top
}
width: fontSize25
height: fontSize80 + fontSize80 + fontSize30
color: MyStyle.backgroundColor
Column {
x: 0
y: 0
spacing: myBarSpace
Repeater {
id: repeater
model: myBarNum
Rectangle {
width: fontSize25
height: myBarHeight
color: MyStyle.barGraphOffColor
}
}
}
Timer {
id: salineTimer
interval: 2000
repeat: true
running: true
triggeredOnStart: true
onTriggered: {
doIt(MyGlobal.salineValue, repeater);
}
} //Timer
MouseArea {
anchors.fill: parent
onClicked: {
var val = doVal(mouseY)
doIt(val, repeater);
elementTextSalineVal.text = val
MyGlobal.salineValue = val
} //onClicked
onReleased: {
var val = doVal(mouseY)
doIt(MyGlobal.salineValue, repeater);
elementTextSalineVal.text = val
MyGlobal.salineValue = val
submitTextField("Saline.value=" + elementTextSalineVal.text)
} //onReleased:
onPositionChanged: {
var val = doVal(mouseY);
doIt(val, repeater);
elementTextSalineVal.text = val
MyGlobal.salineValue = val
} //onPositionChanged
} //MouseArea
} //Rectangle
} // Saline
//----- HiCor
Rectangle {
id: hiCorBox
anchors {
left: salineBox.right
leftMargin: fontSize20
top: elementTextMedication.bottom
topMargin: fontSize10
}
width: fontSize80 + fontSize20
height: fontSize80 * 2 + fontSize40
color: MyStyle.backgroundColor
Text {
id: elementTextHiCor
anchors {
left: rectangleRepeaterComponent1.right
leftMargin: fontSize5
top: parent.top
}
color: MyStyle.propertyTitleColor
text: qsTr("HiCor")
font.pixelSize: fontSize14
}
Text {
objectName: "elementTextHicorVal"
id: elementTextHicorVal
anchors {
left: elementTextHiCor.left
top: elementTextHiCor.bottom
}
color: MyStyle.propertyValueColor
text: MyGlobal.hiCorValue
font.pixelSize: fontSize40
font.family: sourceSansLight.name
onTextChanged: {
doIt(MyGlobal.hiCorValue, repeater1);
}
}
Text {
id: hiCorPercentage
color: MyStyle.propertyValueColor
text: "%"
font.pixelSize: fontSize30
font.family: sourceSansLight.name
anchors {
left: elementTextHicorVal.right;
top: elementTextHicorVal.top;
}
}
Rectangle {
id: rectangleRepeaterComponent1
anchors {
left: parent.left
top: elementTextHiCor.top
}
width: fontSize25
height: fontSize80 + fontSize80 + fontSize30
color: MyStyle.backgroundColor
Column {
x: 0
y: 0
spacing: myBarSpace
Repeater {
id: repeater1
model: myBarNum
Rectangle {
width: fontSize25
height: myBarHeight
color: MyStyle.barGraphOffColor
}
}
} //Column
Timer {
id: hiCorTimer
interval: 2000
repeat: true
running: true
triggeredOnStart: true
onTriggered: {
doIt(MyGlobal.hiCorValue, repeater1);
}
} //Timer
MouseArea {
anchors.fill: parent
onClicked: {
var val = doVal(mouseY);
elementTextHicorVal.text = val;
MyGlobal.hiCorValue = val;
doIt(val, repeater1);
} //onClicked:
onReleased: {
var val = doVal(mouseY);
elementTextHicorVal.text = val;
MyGlobal.hiCorValue = val;
doIt(val, repeater1);