Typica is a free program for professional coffee roasters. https://typica.us
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

offline.xml 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <window id="offline">
  2. <layout type="vertical">
  3. <splitter type="horizontal" id="logsplit">
  4. <measurementtable id="log">
  5. <column>Time</column>
  6. <column>Bean</column>
  7. <column>Air</column>
  8. <column>Note</column>
  9. </measurementtable>
  10. <graph id="graph" />
  11. </splitter>
  12. </layout>
  13. <menu name="File">
  14. <item id="save" shortcut="Ctrl+S">Save…</item>
  15. <item id="print" shortcut="Ctrl+P">Print…</item>
  16. <item id="export">Export CSV…</item>
  17. <item id="svgexport">Export XHTML+SVG…</item>
  18. <item id="quit" shortcut="Ctrl+Q">Quit</item>
  19. </menu>
  20. <menu name="Log">
  21. <item id="showC">Display Celsius</item>
  22. <item id="showF">Display Fahrenheit</item>
  23. <separator />
  24. <item id="ms">Millisecond View</item>
  25. <item id="1s">1 Second View</item>
  26. <item id="5s">5 Second View</item>
  27. <item id="10s">10 Second View</item>
  28. <item id="15s">15 Second View</item>
  29. <item id="30s">30 Second View</item>
  30. <item id="1m">1 Minute View</item>
  31. </menu>
  32. <program>
  33. <![CDATA[
  34. var window = this;
  35. var splitter = findChildObject(this, 'logsplit');
  36. splitter.restoreState("script/offlineViewSplitter");
  37. window.saveTemperatureColumns = new Array();
  38. window.saveAnnotationColumns = new Array();
  39. this.aboutToClose.connect(function() {
  40. splitter.saveState("script/offlineViewSplitter");
  41. });
  42. var log = findChildObject(this, 'log');
  43. var graph = findChildObject(this, 'graph');
  44. var setLogOutputColumns = function() {
  45. log.clearOutputColumns();
  46. for(var c = 0; c < window.saveTemperatureColumns.length; c++)
  47. {
  48. log.addOutputTemperatureColumn(window.saveTemperatureColumns[c]);
  49. }
  50. for(var c = 0; c < window.saveAnnotationColumns.length; c++)
  51. {
  52. log.addOutputAnnotationColumn(window.saveAnnotationColumns[c]);
  53. }
  54. };
  55. var saveMenu = findChildObject(this, 'save');
  56. saveMenu.triggered.connect(function() {
  57. var filename = QFileDialog.getSaveFileName(window, "Save Log As…", QSettings.value("script/lastDir", "") + "/");
  58. if(filename != "") {
  59. var file = new QFile(filename);
  60. setLogOutputColumns();
  61. log.saveXML(file);
  62. QSettings.setValue("script/lastDir", dir(filename));
  63. }
  64. });
  65. var printMenu = findChildObject(this, 'print');
  66. printMenu.triggered.connect(function() {
  67. var exportWindow = createWindow("print");
  68. exportWindow.windowTitle = "Typica - Print";
  69. exportWindow.log = log;
  70. });
  71. var exportMenu = findChildObject(this, 'export');
  72. exportMenu.triggered.connect(function() {
  73. var filename = QFileDialog.getSaveFileName(window, "Export CSV As…", QSettings.value("script/lastDir", "") + "/");
  74. if(filename != "") {
  75. var file = new QFile(filename);
  76. setLogOutputColumns();
  77. log.saveCSV(file);
  78. QSettings.setValue("script/lastDir", dir(filename));
  79. }
  80. });
  81. var svgExportMenu = findChildObject(this, 'svgexport');
  82. svgExportMenu.triggered.connect(function() {
  83. var exportWindow = createWindow("exportWindow");
  84. exportWindow.windowTitle = "Typica - Export XHTML+SVG";
  85. exportWindow.log = log;
  86. });
  87. var quitMenu = findChildObject(this, 'quit');
  88. quitMenu.triggered.connect(function() {
  89. window.close();
  90. Application.quit();
  91. });
  92. var showC = findChildObject(this, 'showC');
  93. showC.triggered.connect(function() {
  94. log.setDisplayUnits(TemperatureDisplay.Celsius);
  95. graph.showC();
  96. });
  97. var showF = findChildObject(this, 'showF');
  98. showF.triggered.connect(function() {
  99. log.setDisplayUnits(TemperatureDisplay.Fahrenheit);
  100. graph.showF();
  101. });
  102. var v1 = findChildObject(this, 'ms');
  103. v1.triggered.connect(log.LOD_ms);
  104. var v2 = findChildObject(this, '1s');
  105. v2.triggered.connect(log.LOD_1s);
  106. var v3 = findChildObject(this, '5s');
  107. v3.triggered.connect(log.LOD_5s);
  108. var v4 = findChildObject(this, '10s');
  109. v4.triggered.connect(log.LOD_10s);
  110. var v5 = findChildObject(this, '15s');
  111. v5.triggered.connect(log.LOD_15s);
  112. var v6 = findChildObject(this, '30s');
  113. v6.triggered.connect(log.LOD_30s);
  114. var v7 = findChildObject(this, '1m');
  115. v7.triggered.connect(log.LOD_1m);
  116. ]]>
  117. </program>
  118. </window>