Explorar el Código

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

Neal Wilson hace 10 años
padre
commit
fbc3214176
Se han modificado 5 ficheros con 3175 adiciones y 2179 borrados
  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 Ver fichero

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

+ 2
- 0
config/Windows/productionroaster.xml Ver fichero

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

+ 1
- 0
config/config.xml Ver fichero

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

+ 3161
- 2165
src/typica.cpp
La diferencia del archivo ha sido suprimido porque es demasiado grande
Ver fichero


+ 2
- 1
src/typica.w Ver fichero

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

Loading…
Cancelar
Guardar