Parcourir la source

Logging view can now be referenced from windows created by reports.

Neal Wilson il y a 10 ans
Parent
révision
fbc3214176
5 fichiers modifiés avec 3175 ajouts et 2179 suppressions
  1. 9
    13
      config/Windows/batchdetailsnew.xml
  2. 2
    0
      config/Windows/productionroaster.xml
  3. 1
    0
      config/config.xml
  4. 3161
    2165
      src/typica.cpp
  5. 2
    1
      src/typica.w

+ 9
- 13
config/Windows/batchdetailsnew.xml Voir le fichier

@@ -17,14 +17,10 @@
17 17
 			var compare = findChildObject(this, 'compare');
18 18
 			var edit = findChildObject(this, 'edit');
19 19
 			edit.enabled = false;
20
-			if(typeof(navigationwindow) == "undefined") {
21
-				compare.enabled = false;
22
-				target.enabled = false;
23
-			} else if(typeof(navigationwindow.loggingWindow) == "undefined") {
20
+			if(typeof(Windows.loggingWindow) == "undefined") {
24 21
 				compare.enabled = false;
25 22
 				target.enabled = false;
26 23
 			}
27
-
28 24
 			var tableReference;
29 25
 			var rowReference;
30 26
 			var batchTime;
@@ -48,7 +44,7 @@
48 44
                 var nextSeries = startSeries + 2;
49 45
                 QSettings.setValue('cseries', nextSeries);
50 46
                 var input = new XMLInput(buffer, startSeries);
51
-                var graph = findChildObject(navigationwindow.loggingWindow, 'graph');
47
+                var graph = findChildObject(Windows.loggingWindow, 'graph');
52 48
                 input.measure.connect(graph.newMeasurement);
53 49
                 input.input();
54 50
 				query = query.invalidate();
@@ -63,13 +59,13 @@
63 59
 				var pname = query.value(1);
64 60
                 query = query.invalidate();
65 61
 				var input = new XMLInput(buffer, 1);
66
-				var graph = findChildObject(navigationwindow.loggingWindow, 'graph');
67
-				var log = findChildObject(navigationwindow.loggingWindow, 'log');
62
+				var graph = findChildObject(Windows.loggingWindow, 'graph');
63
+				var log = findChildObject(Windows.loggingWindow, 'log');
68 64
 				log.clear();
69 65
 				graph.clear();
70 66
 				input.newTemperatureColumn.connect(log.setHeaderData);
71 67
 				input.newTemperatureColumn.connect(function(col, text) {
72
-					if(text == navigationwindow.loggingWindow.targetcolumnname)
68
+					if(text == Windows.loggingWindow.targetcolumnname)
73 69
 					{
74 70
 						targetseries = col;
75 71
 					}
@@ -87,7 +83,7 @@
87 83
 				input.lastColumn.connect(function(c) {
88 84
 					lc = c;
89 85
 					QSettings.setValue("liveColumn", c + 1);
90
-					navigationwindow.loggingWindow.postLoadColumnSetup(c);
86
+					Windows.loggingWindow.postLoadColumnSetup(c);
91 87
 				});
92 88
 				input.annotation.connect(log.newAnnotation);
93 89
 				input.annotation.connect(function(note, tcol, ncol) {
@@ -95,9 +91,9 @@
95 91
 						log.newAnnotation(note, i, ncol);
96 92
 					}
97 93
 				});
98
-				navigationwindow.loggingWindow.windowTitle = "Typica - " + pname;
99
-				navigationwindow.loggingWindow.raise();
100
-				navigationwindow.loggingWindow.activateWindow();
94
+				Windows.loggingWindow.windowTitle = "Typica - " + pname;
95
+				Windows.loggingWindow.raise();
96
+				Windows.loggingWindow.activateWindow();
101 97
 				input.input();
102 98
 				log.newAnnotation("End", 1, lc);
103 99
 				query = query.invalidate();

+ 2
- 0
config/Windows/productionroaster.xml Voir le fichier

@@ -644,6 +644,7 @@
644 644
             lsplit.saveState("script/logSplitter");
645 645
             log.saveState("script/log", 7);
646 646
 			window.navigationWindow.loggingWindow = undefined;
647
+			Windows.loggingWindow = undefined;
647 648
         });
648 649
 		this.restoreSizeAndPosition('window');
649 650
         vsplit.restoreState("script/mainSplitter");
@@ -985,6 +986,7 @@
985 986
 			var bwindow = createWindow("sampleRoastingBatch");
986 987
 		});
987 988
 		window.postLoadColumnSetup(0);
989
+		Windows.loggingWindow = window;
988 990
 		]]>
989 991
     </program>
990 992
 </window>

+ 1
- 0
config/config.xml Voir le fichier

@@ -34,6 +34,7 @@
34 34
 	<include src="Windows/editbatchdetails.xml" />
35 35
 	<include src="Windows/newsamplebatch.xml" />
36 36
 	<program>
37
+		Windows = new Object();
37 38
 		var loggingWindow;
38 39
 		var currentBatchInfo;
39 40
 		var navwindow = createWindow("navwindow");

+ 3161
- 2165
src/typica.cpp
Fichier diff supprimé car celui-ci est trop grand
Voir le fichier


+ 2
- 1
src/typica.w Voir le fichier

@@ -3530,7 +3530,8 @@ engine->globalObject().setProperty("sqlToArray",
3530 3530
 engine->globalObject().setProperty("setFont", engine->newFunction(setFont));
3531 3531
 engine->globalObject().setProperty("annotationFromRecord",
3532 3532
                                    engine->newFunction(annotationFromRecord));
3533
-engine->globalObject().setProperty("setTabOrder", engine->newFunction(setTabOrder));
3533
+engine->globalObject().setProperty("setTabOrder",
3534
+                                   engine->newFunction(setTabOrder));
3534 3535
 
3535 3536
 @ These functions are not part of an object. They expect a string specifying
3536 3537
 the path to a file and return a string with either the name of the file without

Chargement…
Annuler
Enregistrer