HMI_DateTimeSettings.qml 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806
  1. import QtQuick 2.5
  2. import ApplicationLauncher 1.0
  3. import "qrc:/Globals"
  4. Item {
  5. id: dateTimeSETTINGS
  6. property int dateListTextFontSize: mHighlightBarHeight - 3 * mHighlightBarThickness
  7. property int mHighlightBarThickness: 3
  8. property int mHighlightBarHeight: (setMonthRect.height / 3) * 0.8
  9. property color cGreenLetterColor: "gray" //Globals.customer_color_base
  10. property color bgColor: "lightgray"
  11. property color selCol: Globals.customer_color_base //"black"//"white"
  12. property int numITEMS: 3
  13. property double pathScale: 0.5
  14. property int defaultMONTHIDX: 0
  15. property int defaultDAYIDX: 0
  16. property int defaultYEARIDX: 0
  17. property int defaultHOURIDX: 0
  18. property int defaultMINIDX: 0
  19. property int defaultSECIDX: 0
  20. property int defaultTZIDX: 0
  21. //------------------
  22. property int dtDay: -1
  23. property int dtMonth: -1
  24. property int dtYear: -1
  25. property int dtHour: -1
  26. property int dtMin: -1
  27. property int dtSec: -1
  28. property string dtTZ: ""
  29. function datetimeSet() {
  30. dayNumSet();
  31. monthNamesSet();
  32. yearNumSet();
  33. hourNumSet();
  34. minNumSet();
  35. secNumSet();
  36. tzNamesSet();
  37. defaultDAYIDX = parseInt(Qt.formatDate(new Date(), "d")) - 1;
  38. dayView.currentIndex = defaultDAYIDX;
  39. }
  40. function monthNamesSet(){
  41. var monthnames = transLoad.getMonthNames();
  42. monthModel.clear();
  43. defaultMONTHIDX = 0;
  44. var i = 0;
  45. for ( i = 0; i < monthnames.length; i++){
  46. monthModel.append( {index: i,
  47. month: monthnames[i],
  48. } );
  49. }
  50. defaultMONTHIDX = new Date().getMonth();
  51. }
  52. function dayNumSet(){
  53. if ( dayModel.count === 0) {
  54. dayModel.clear();
  55. defaultDAYIDX = 0;
  56. var i = 0;
  57. for ( i = 0; i < 31; i++){
  58. dayModel.append( {index: i,
  59. day: (i + 1).toString(),
  60. } );
  61. }
  62. }
  63. defaultDAYIDX = parseInt(Qt.formatDate(new Date(), "d")) - 1;
  64. }
  65. function dayNumSetMonth(){
  66. var rows = dayModel.count;
  67. if ( rows === 0) {
  68. dayModel.clear();
  69. defaultDAYIDX = 0;
  70. var i = 0;
  71. for ( i = 0; i < 31; i++){
  72. dayModel.append( {index: i,
  73. day: (i + 1).toString(),
  74. } );
  75. }
  76. defaultDAYIDX = parseInt(Qt.formatDate(new Date(), "d")) - 1;
  77. }
  78. if ((dtYear != -1) && (dtMonth != -1)) {
  79. var daysinmonth = new Date(dtYear, dtMonth, 0).getDate();
  80. if (daysinmonth > dayModel.count) {
  81. for (i = dayModel.count; i < daysinmonth; i++ ) {
  82. dayModel.append( {index: i,
  83. day: (i + 1).toString(),
  84. } );
  85. }
  86. }
  87. if (daysinmonth < dayModel.count) {
  88. var rmcnt = dayModel.count;
  89. for (i = daysinmonth; i < rmcnt; i++ ) {
  90. var idx = dayModel.count - 1;
  91. dayModel.remove(idx);
  92. }
  93. }
  94. }
  95. }
  96. function yearNumSet(){
  97. yearModel.clear();
  98. defaultYEARIDX = 0;
  99. var i = 0;
  100. for ( i = 2010; i < 2035; i++){
  101. yearModel.append( {index: i - 2010,
  102. year: i.toString(),
  103. } );
  104. }
  105. var year = new Date().getFullYear();
  106. year -= 2010;
  107. defaultYEARIDX = year;
  108. }
  109. function hourNumSet() {
  110. hourModel.clear();
  111. defaultHOURIDX = 0;
  112. var i = 0;
  113. for ( i = 0; i < 24; i++){
  114. hourModel.append( {index: i,
  115. hour: i.toString(),
  116. } );
  117. }
  118. defaultHOURIDX = new Date().getHours();
  119. }
  120. function minNumSet() {
  121. minModel.clear();
  122. defaultMINIDX = 0;
  123. var i = 0;
  124. for ( i = 0; i < 60; i++){
  125. minModel.append( {index: i,
  126. min: i.toString(),
  127. } );
  128. }
  129. defaultMINIDX = new Date().getMinutes();
  130. }
  131. function secNumSet() {
  132. secModel.clear();
  133. defaultSECIDX = 0;
  134. var i = 0;
  135. for ( i = 0; i < 60; i++){
  136. secModel.append( {index: i,
  137. sec: i.toString(),
  138. } );
  139. }
  140. defaultSECIDX = new Date().getSeconds();
  141. }
  142. function tzNamesSet(){
  143. var tznames = transLoad.getTimeZoneIds();
  144. var idxtxt = transLoad.getSystemTimeZoneId();
  145. var idx = 0;
  146. tzModel.clear();
  147. defaultTZIDX = 0;
  148. var i = 0;
  149. for ( i = 0; i < tznames.length; i++){
  150. tzModel.append( {index: i,
  151. tz: tznames[i],
  152. } );
  153. if (tznames[i] === idxtxt) idx = i;
  154. }
  155. defaultTZIDX = idx;
  156. }
  157. Rectangle {
  158. id: setDayRect
  159. width: (parent.width / 2) / 3
  160. height: (parent.height / 3) - mHighlightBarThickness
  161. x: 0
  162. y: 0
  163. color: bgColor
  164. Component.onCompleted: {
  165. dayNumSet();
  166. }
  167. ListModel {
  168. id: dayModel
  169. }
  170. Component {
  171. id: dayDelegate
  172. Text {
  173. anchors.horizontalCenter: parent.horizontalCenter
  174. scale: PathView.pathScale
  175. opacity: scale
  176. font.pixelSize: dateListTextFontSize
  177. onScaleChanged: {
  178. color = scale === 1.0 ? selCol:cGreenLetterColor;
  179. }
  180. text: day
  181. }
  182. }
  183. PathView{
  184. id: dayView
  185. onCurrentIndexChanged: {
  186. dtDay = currentIndex + 1;
  187. }
  188. anchors.fill: parent
  189. preferredHighlightBegin: 0.5
  190. preferredHighlightEnd: 0.5
  191. highlightRangeMode: PathView.StrictlyEnforceRange
  192. highlight: Component {
  193. Rectangle{
  194. visible: PathView.onPath
  195. anchors.centerIn: parent
  196. height: mHighlightBarHeight
  197. width: parent.width
  198. color: "transparent"
  199. border.color: "transparent"
  200. Rectangle{
  201. anchors.top: parent.top
  202. width: parent.width
  203. height: mHighlightBarThickness
  204. color: cGreenLetterColor
  205. }
  206. Rectangle{
  207. anchors.bottom: parent.bottom
  208. width: parent.width
  209. height: mHighlightBarThickness
  210. color: cGreenLetterColor
  211. }
  212. }
  213. }
  214. model: dayModel
  215. delegate: dayDelegate
  216. currentIndex: defaultDAYIDX
  217. pathItemCount: numITEMS
  218. path:Path{
  219. startX: 0
  220. startY: 0
  221. PathAttribute { name: "pathScale"; value: pathScale }
  222. PathLine { x:0; y: setMonthRect.height/2}
  223. PathAttribute { name: "pathScale"; value: 1.0 }
  224. PathLine { x: 0; y: setMonthRect.height }
  225. PathAttribute { name: "pathScale"; value: pathScale }
  226. }
  227. }
  228. } // END DAY
  229. Rectangle {
  230. id: setMonthRect
  231. width: (parent.width / 2) * 1.15
  232. height: (parent.height / 3) - mHighlightBarThickness
  233. x: (parent.width / 2) / 3
  234. y: 0
  235. color: bgColor
  236. Component.onCompleted: {
  237. monthNamesSet();
  238. }
  239. ListModel {
  240. id: monthModel
  241. }
  242. Component {
  243. id: monthDelegate
  244. Text {
  245. anchors.horizontalCenter: parent.horizontalCenter
  246. scale: PathView.pathScale
  247. opacity: scale
  248. font.pixelSize: dateListTextFontSize
  249. onScaleChanged: {
  250. color = scale === 1.0 ? selCol:cGreenLetterColor;
  251. }
  252. text: month
  253. }
  254. }
  255. PathView{
  256. id: monthView
  257. onCurrentIndexChanged: {
  258. dtMonth = currentIndex + 1;
  259. dayNumSetMonth();
  260. }
  261. anchors.fill: parent
  262. preferredHighlightBegin: 0.5
  263. preferredHighlightEnd: 0.5
  264. highlightRangeMode: PathView.StrictlyEnforceRange
  265. highlight: Component {
  266. Rectangle{
  267. visible: PathView.onPath
  268. anchors.centerIn: parent
  269. height: mHighlightBarHeight
  270. width: parent.width
  271. color: "transparent"
  272. border.color: "transparent"
  273. Rectangle{
  274. anchors.top: parent.top
  275. width: parent.width
  276. height: mHighlightBarThickness
  277. color: cGreenLetterColor
  278. }
  279. Rectangle{
  280. anchors.bottom: parent.bottom
  281. width: parent.width
  282. height: mHighlightBarThickness
  283. color: cGreenLetterColor
  284. }
  285. }
  286. }
  287. model: monthModel
  288. delegate: monthDelegate
  289. currentIndex: defaultMONTHIDX
  290. pathItemCount: numITEMS
  291. path:Path{
  292. startX: 0
  293. startY: 0
  294. PathAttribute { name: "pathScale"; value: pathScale }
  295. PathLine { x:0; y: setMonthRect.height/2}
  296. PathAttribute { name: "pathScale"; value: 1.0 }
  297. PathLine { x: 0; y: setMonthRect.height }
  298. PathAttribute { name: "pathScale"; value: pathScale }
  299. }
  300. }
  301. } // Month END
  302. Rectangle {
  303. id: setYearRect
  304. width: parent.width - (setMonthRect.x + setMonthRect.width)
  305. height: (parent.height / 3) - mHighlightBarThickness
  306. x: setMonthRect.x + setMonthRect.width
  307. y: 0
  308. color: bgColor
  309. Component.onCompleted: {
  310. yearNumSet();
  311. }
  312. ListModel {
  313. id: yearModel
  314. }
  315. Component {
  316. id: yearDelegate
  317. Text {
  318. anchors.horizontalCenter: parent.horizontalCenter
  319. scale: PathView.pathScale
  320. opacity: scale
  321. font.pixelSize: dateListTextFontSize
  322. onScaleChanged: {
  323. color = scale === 1.0 ? selCol:cGreenLetterColor;
  324. }
  325. text: year
  326. }
  327. }
  328. PathView{
  329. id: yearView
  330. onCurrentIndexChanged: {
  331. dtYear = currentIndex + 2010;
  332. dayNumSetMonth();
  333. }
  334. anchors.fill: parent
  335. preferredHighlightBegin: 0.5
  336. preferredHighlightEnd: 0.5
  337. highlightRangeMode: PathView.StrictlyEnforceRange
  338. highlight: Component {
  339. Rectangle{
  340. visible: PathView.onPath
  341. anchors.centerIn: parent
  342. height: mHighlightBarHeight
  343. width: parent.width
  344. color: "transparent"
  345. border.color: "transparent"
  346. Rectangle{
  347. anchors.top: parent.top
  348. width: parent.width
  349. height: mHighlightBarThickness
  350. color: cGreenLetterColor
  351. }
  352. Rectangle{
  353. anchors.bottom: parent.bottom
  354. width: parent.width
  355. height: mHighlightBarThickness
  356. color: cGreenLetterColor
  357. }
  358. }
  359. }
  360. model: yearModel
  361. delegate: yearDelegate
  362. currentIndex: defaultYEARIDX
  363. pathItemCount: numITEMS
  364. path:Path{
  365. startX: 0
  366. startY: 0
  367. PathAttribute { name: "pathScale"; value: pathScale }
  368. PathLine { x:0; y: setYearRect.height/2}
  369. PathAttribute { name: "pathScale"; value: 1.0 }
  370. PathLine { x: 0; y: setYearRect.height }
  371. PathAttribute { name: "pathScale"; value: pathScale }
  372. }
  373. }
  374. } // YEAR END
  375. Rectangle {
  376. id: setHourRect
  377. width: (parent.width / 2) / 3
  378. height: (parent.height / 3) - mHighlightBarThickness
  379. x: 0
  380. y: (parent.height / 3)
  381. color: bgColor
  382. Component.onCompleted: {
  383. hourNumSet();
  384. }
  385. ListModel {
  386. id: hourModel
  387. }
  388. Component {
  389. id: hourDelegate
  390. Text {
  391. anchors.horizontalCenter: parent.horizontalCenter
  392. scale: PathView.pathScale
  393. opacity: scale
  394. font.pixelSize: dateListTextFontSize
  395. onScaleChanged: {
  396. color = scale === 1.0 ? selCol:cGreenLetterColor;
  397. }
  398. text: hour
  399. }
  400. }
  401. PathView{
  402. id: hourView
  403. onCurrentIndexChanged: {
  404. dtHour = currentIndex;
  405. }
  406. anchors.fill: parent
  407. preferredHighlightBegin: 0.5
  408. preferredHighlightEnd: 0.5
  409. highlightRangeMode: PathView.StrictlyEnforceRange
  410. highlight: Component {
  411. Rectangle{
  412. visible: PathView.onPath
  413. anchors.centerIn: parent
  414. height: mHighlightBarHeight
  415. width: parent.width
  416. color: "transparent"
  417. border.color: "transparent"
  418. Rectangle{
  419. anchors.top: parent.top
  420. width: parent.width
  421. height: mHighlightBarThickness
  422. color: cGreenLetterColor
  423. }
  424. Rectangle{
  425. anchors.bottom: parent.bottom
  426. width: parent.width
  427. height: mHighlightBarThickness
  428. color: cGreenLetterColor
  429. }
  430. }
  431. }
  432. model: hourModel
  433. delegate: hourDelegate
  434. currentIndex: defaultHOURIDX
  435. pathItemCount: numITEMS
  436. path:Path{
  437. startX: 0
  438. startY: 0
  439. PathAttribute { name: "pathScale"; value: pathScale }
  440. PathLine { x:0; y: setHourRect.height/2}
  441. PathAttribute { name: "pathScale"; value: 1.0 }
  442. PathLine { x: 0; y: setHourRect.height }
  443. PathAttribute { name: "pathScale"; value: pathScale }
  444. }
  445. }
  446. } // HOUR END
  447. Rectangle {
  448. id: setMinRect
  449. width: (parent.width / 2) / 3
  450. height: (parent.height / 3) - mHighlightBarThickness
  451. x: (parent.width / 2) / 3
  452. y: parent.height / 3
  453. color: bgColor
  454. Component.onCompleted: {
  455. minNumSet();
  456. }
  457. ListModel {
  458. id: minModel
  459. }
  460. Component {
  461. id: minDelegate
  462. Text {
  463. anchors.horizontalCenter: parent.horizontalCenter
  464. scale: PathView.pathScale
  465. opacity: scale
  466. font.pixelSize: dateListTextFontSize
  467. onScaleChanged: {
  468. color = scale === 1.0 ? selCol:cGreenLetterColor;
  469. }
  470. text: min
  471. }
  472. }
  473. PathView{
  474. id: minView
  475. onCurrentIndexChanged: {
  476. dtMin = currentIndex;
  477. }
  478. anchors.fill: parent
  479. preferredHighlightBegin: 0.5
  480. preferredHighlightEnd: 0.5
  481. highlightRangeMode: PathView.StrictlyEnforceRange
  482. highlight: Component {
  483. Rectangle{
  484. visible: PathView.onPath
  485. anchors.centerIn: parent
  486. height: mHighlightBarHeight
  487. width: parent.width
  488. color: "transparent"
  489. border.color: "transparent"
  490. Rectangle{
  491. anchors.top: parent.top
  492. width: parent.width
  493. height: mHighlightBarThickness
  494. color: cGreenLetterColor
  495. }
  496. Rectangle{
  497. anchors.bottom: parent.bottom
  498. width: parent.width
  499. height: mHighlightBarThickness
  500. color: cGreenLetterColor
  501. }
  502. }
  503. }
  504. model: minModel
  505. delegate: minDelegate
  506. currentIndex: defaultMINIDX
  507. pathItemCount: numITEMS
  508. path:Path{
  509. startX: 0
  510. startY: 0
  511. PathAttribute { name: "pathScale"; value: pathScale }
  512. PathLine { x:0; y: setMinRect.height/2}
  513. PathAttribute { name: "pathScale"; value: 1.0 }
  514. PathLine { x: 0; y: setMinRect.height }
  515. PathAttribute { name: "pathScale"; value: pathScale }
  516. }
  517. }
  518. } // MIN END
  519. Rectangle {
  520. id: setSecRect
  521. width: (parent.width / 2) / 3
  522. height: (parent.height / 3) - mHighlightBarThickness
  523. x: 2 * ((parent.width / 2) / 3)
  524. y: parent.height / 3
  525. color: bgColor
  526. Component.onCompleted: {
  527. secNumSet();
  528. }
  529. ListModel {
  530. id: secModel
  531. }
  532. Component {
  533. id: secDelegate
  534. Text {
  535. anchors.horizontalCenter: parent.horizontalCenter
  536. scale: PathView.pathScale
  537. opacity: scale
  538. font.pixelSize: dateListTextFontSize
  539. onScaleChanged: {
  540. color = scale === 1.0 ? selCol:cGreenLetterColor;
  541. }
  542. text: sec
  543. }
  544. }
  545. PathView{
  546. id: secView
  547. onCurrentIndexChanged: {
  548. dtSec = currentIndex;
  549. }
  550. anchors.fill: parent
  551. preferredHighlightBegin: 0.5
  552. preferredHighlightEnd: 0.5
  553. highlightRangeMode: PathView.StrictlyEnforceRange
  554. highlight: Component {
  555. Rectangle{
  556. visible: PathView.onPath
  557. anchors.centerIn: parent
  558. height: mHighlightBarHeight
  559. width: parent.width
  560. color: "transparent"
  561. border.color: "transparent"
  562. Rectangle{
  563. anchors.top: parent.top
  564. width: parent.width
  565. height: mHighlightBarThickness
  566. color: cGreenLetterColor
  567. }
  568. Rectangle{
  569. anchors.bottom: parent.bottom
  570. width: parent.width
  571. height: mHighlightBarThickness
  572. color: cGreenLetterColor
  573. }
  574. }
  575. }
  576. model: secModel
  577. delegate: secDelegate
  578. currentIndex: defaultSECIDX
  579. pathItemCount: numITEMS
  580. path:Path{
  581. startX: 0
  582. startY: 0
  583. PathAttribute { name: "pathScale"; value: pathScale }
  584. PathLine { x:0; y: setSecRect.height/2}
  585. PathAttribute { name: "pathScale"; value: 1.0 }
  586. PathLine { x: 0; y: setSecRect.height }
  587. PathAttribute { name: "pathScale"; value: pathScale }
  588. }
  589. }
  590. } // END SEC
  591. Rectangle {
  592. id: setTzRect
  593. width: parent.width
  594. height: (parent.height / 3) - mHighlightBarThickness
  595. x: 0
  596. y: 2 * (parent.height / 3)
  597. color: bgColor
  598. Component.onCompleted: {
  599. tzNamesSet();
  600. }
  601. ListModel {
  602. id: tzModel
  603. }
  604. Component {
  605. id: tzDelegate
  606. Text {
  607. anchors.horizontalCenter: parent.horizontalCenter
  608. scale: PathView.pathScale
  609. opacity: scale
  610. font.pixelSize: dateListTextFontSize
  611. onScaleChanged: {
  612. color = scale === 1.0 ? selCol:cGreenLetterColor;
  613. }
  614. text: tz
  615. }
  616. }
  617. PathView{
  618. id: tzView
  619. anchors.fill: parent
  620. onCurrentIndexChanged: {
  621. dtTZ = tzModel.get(currentIndex).tz;
  622. }
  623. preferredHighlightBegin: 0.5
  624. preferredHighlightEnd: 0.5
  625. highlightRangeMode: PathView.StrictlyEnforceRange
  626. highlight: Component {
  627. Rectangle{
  628. visible: PathView.onPath
  629. anchors.centerIn: parent
  630. height: mHighlightBarHeight
  631. width: parent.width
  632. color: "transparent"
  633. border.color: "transparent"
  634. Rectangle{
  635. anchors.top: parent.top
  636. width: parent.width
  637. height: mHighlightBarThickness
  638. color: cGreenLetterColor
  639. }
  640. Rectangle{
  641. anchors.bottom: parent.bottom
  642. width: parent.width
  643. height: mHighlightBarThickness
  644. color: cGreenLetterColor
  645. }
  646. }
  647. }
  648. model: tzModel
  649. delegate: tzDelegate
  650. currentIndex: defaultTZIDX
  651. pathItemCount: numITEMS
  652. path:Path{
  653. startX: 0
  654. startY: 0
  655. PathAttribute { name: "pathScale"; value: pathScale }
  656. PathLine { x:0; y: tzView.height/2}
  657. PathAttribute { name: "pathScale"; value: 1.0 }
  658. PathLine { x: 0; y: tzView.height }
  659. PathAttribute { name: "pathScale"; value: pathScale }
  660. }
  661. }
  662. } // END TZ
  663. //==================================
  664. ApplicationLaunch {
  665. id: setTimeZone
  666. appName: "sudo " + Globals.baseDir + "/Scripts/SetTimeDateZone.sh " + dtTZ + " " + dtYear + " " + dtMonth + " " + dtDay + " " + dtHour + " " + dtMin + " " + dtSec + " " + sysinfo.currentCpuArchitecture;
  667. onAppFinished: {
  668. transLoad.reloadTimeZone();
  669. }
  670. }
  671. Rectangle {
  672. id: setDateTimeButtArea
  673. width: parent.width / 2
  674. height: (parent.height / 3) - mHighlightBarThickness
  675. x: 3 * ((parent.width / 2) / 3)
  676. y: parent.height / 3
  677. color: bgColor
  678. //border.color: "blue"
  679. //border.width: 3
  680. ButtHMI {
  681. id: datetimeOK
  682. buttY: (parent.height / 2) - (buttHeight / 2)
  683. buttX: (parent.width / 2) * 0.1 // (parent.width / 2) - (buttWidth / 2)
  684. buttWidth: parent.width / 2 * 0.75
  685. buttHeight: buttWidth
  686. color: Globals.customer_color_base
  687. text: "\uf046" //check-sqare
  688. onButtPressed: {
  689. // Take selected settings and save to SystemPalette
  690. console.log(dtYear+"."+dtMonth+"."+dtDay+" "+dtHour+":"+dtMin+":"+dtSec);
  691. console.log(dtTZ);
  692. setTimeZone.launchScript();
  693. }
  694. }
  695. ButtHMI {
  696. id: datetimeREDO
  697. buttY: (parent.height / 2) - (buttHeight / 2)
  698. buttX: parent.width / 2 + (parent.width / 2) * 0.1 // (parent.width / 2) - (buttWidth / 2)
  699. buttWidth: parent.width / 2 * 0.75
  700. buttHeight: buttWidth
  701. color: Globals.customer_color_base
  702. text: "\uf01e" // redo
  703. onButtPressed: {
  704. datetimeSet();
  705. }
  706. }
  707. }
  708. }