@@ -300,10 +300,11 @@ string getBasePart(const string &id)
300
300
}
301
301
302
302
" 0
303
- 3
303
+ 4
304
304
"CBRef" "1"
305
305
"EClose" E
306
306
"dpi" "120"
307
+ "pdpi" "120"
307
308
2 1 0 0 0 0 0
308
309
""
309
310
DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
@@ -327,7 +328,7 @@ LANG:10000 0
327
328
"dashclr"N "_Transparent"
328
329
"antiAliased" "0"
329
330
"transformable" "0"
330
- E E 0 1 3 2 1 E 0.9988465974635842 0 1 -55.41061130365657 -9.5 0 E 77.5 29 511 60
331
+ E E 0 1 3 2 1 E 0.9988465974635842 0 1 -55.41061130365657 -9.5 0 E 77.5 29 506 60
331
332
0 2 2 "0s" 0 0 0 192 0 0 77.5 29 1
332
333
2
333
334
LANG:10001 26 Arial,-1,27,5,50,0,0,0,0,0
@@ -485,14 +486,14 @@ LANG:10000 26 Arial,-1,13,5,50,0,0,0,0,0
485
486
editSettings(id);
486
487
}"
487
488
"main()
488
- {
489
+ {
489
490
initTree();
490
491
fillWithData();
491
492
this.expandAll();
492
493
this.alternatingRowColors(true);
493
494
}
494
495
495
- void initTree()
496
+ void initTree()
496
497
{
497
498
this.addColumn(\"Id\");
498
499
this.addColumn(\"Description\");
@@ -509,79 +510,84 @@ void initTree()
509
510
void fillWithData()
510
511
{
511
512
settings = QgSettings::getAllSettingsAsMapping();
512
-
513
+
513
514
for (int i = 1; i <= dynlen(settings); i++)
514
515
{
515
516
mapping json_data = settings[i];
516
-
517
+
517
518
if (mappingHasKey(json_data, \"settingsVersion\") == false ||
518
519
mappingHasKey(json_data, \"checks\") == false )
519
520
{
520
521
continue;
521
522
}
522
-
523
+
523
524
//determine machting check for id
524
525
dyn_mapping checks = json_data[\"checks\"];
525
-
526
-
526
+
527
+
527
528
for (int j = 1; j <= dynlen(checks); j++)
528
529
{
529
- mapping check = checks[j];
530
-
530
+ mapping check = checks[j];
531
+
531
532
if ( mappinglen(check) < 1 )
532
533
{
533
534
continue;
534
- }
535
-
535
+ }
536
+
536
537
Mapping map = Mapping(check);
537
538
dyn_string id_parts = strsplit(map.getAt(\"id\"), \".\");
538
539
string id = \"\";
539
- string parent_id = \"\";
540
-
540
+ string parent_id = \"\";
541
+
541
542
for (int z = 1; z <= dynlen(id_parts); z++)
542
- {
543
+ {
543
544
if (id != \"\")
544
- {
545
+ {
545
546
id += \".\";
546
547
}
547
-
548
- id += id_parts[z];
549
-
548
+
549
+ id += id_parts[z];
550
+
550
551
if (z > 1)
551
552
{
552
553
if (parent_id != \"\")
553
- {
554
+ {
554
555
parent_id += \".\";
555
556
}
556
557
parent_id += id_parts[z-1];
557
558
}
558
-
559
+
559
560
if (!this.itemExists(id))
560
561
{
561
562
this.appendItem(parent_id, id, id_parts[z]);
562
563
}
563
- }
564
-
564
+ }
565
+
565
566
//read settings depeding on the version
567
+ OaLanguage lang = getActiveLangId();
568
+
569
+ string sLang = getLocale(lang, LOCALE_FORMAT_ISO).startsWith(\"de_\") ? \"de_AT.utf8\" : \"en_US.utf8\";
570
+
566
571
switch(json_data[\"settingsVersion\"])
567
572
{
568
573
case 0:
569
574
default:
570
-
571
-
572
- this.setText(id, 1, map.getAt(\"description\")[getActiveLang() ]);
573
-
575
+
576
+
577
+ this.setText(id, 1, map.getAt(\"description\")[sLang ]);
578
+
574
579
setSettingsValue(id, 2, map.getAt(\"lowLimit\", -1), \"lowLimit\");
575
580
setSettingsValue(id, 3, map.getAt(\"highLimit\", -1), \"highLimit\");
576
581
setSettingsValue(id, 4, getReferenceValuesAsString(map.getAt(\"referenceValues\", makeDynMixed(\"-1\"))), \"referenceValues\");
577
582
setSettingsValue(id, 5, map.getAt(\"scorePoints\", -1), \"scorePoints\");
578
583
setSettingsValue(id, 6, map.getAt(\"enabled\", -1), \"enabled\");
579
-
584
+
580
585
this.setText(id, 7, \"...\");
581
586
}
582
587
}
583
588
}
584
- }" 0
589
+ }
590
+ " 0
585
591
13 43
586
592
"PUSH_BUTTON2"
587
593
""
0 commit comments