Typica is a free program for professional coffee roasters. https://typica.us
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

setsampleparameters.xml 1.1KB

12345678910111213141516171819202122232425262728293031
  1. <window id="sampleParameters">
  2. <layout type="vertical">
  3. <layout type="horizontal">
  4. <label>Annotation:</label>
  5. <line id="template">%A-%1</line>
  6. </layout>
  7. <textarea id="instructions" />
  8. <button name="Reset Sample Number" type="push" id="reset" />
  9. <button name="Okay" type="push" id="ok" />
  10. </layout>
  11. <program>
  12. <![CDATA[
  13. print("Program loaded");
  14. var window = this;
  15. var instructions = findChildObject(this, 'instructions');
  16. instructions.plainText = TTR("sampleParameters", "%1 will be replaced with a sample number.");
  17. instructions.readOnly = true;
  18. var reset = findChildObject(this, 'reset');
  19. reset.clicked.connect(function() {
  20. window.button.resetCount();
  21. window.button.resetBatch();
  22. });
  23. var okay = findChildObject(this, 'ok');
  24. var template = findChildObject(this, 'template');
  25. okay.clicked.connect(function() {
  26. window.button.setAnnotation(template.text);
  27. window.close();
  28. });
  29. ]]>
  30. </program>
  31. <window>