Typica is a free program for professional coffee roasters. https://typica.us
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

cuppingitemselection.xml 2.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <window id="sampleitemselection">
  2. <layout type="grid">
  3. <row>
  4. <column colspan="5">
  5. <label>Add Existing Item to Cupping Session</label>
  6. </column>
  7. </row>
  8. <row>
  9. <column>
  10. <label>Category:</label>
  11. </column>
  12. <column>
  13. <sqldrop data="0" display="0" showdata="false" id="category">
  14. <query>SELECT DISTINCT category FROM items WHERE category LIKE 'Coffee:%'</query>
  15. </sqldrop>
  16. </column>
  17. <column>
  18. <label>Item:</label>
  19. </column>
  20. <column>
  21. <sqldrop data="0" display="1" showdata="true" id="item" />
  22. </column>
  23. <column>
  24. <button type="push" name="Add Item" id="additem" />
  25. </column>
  26. </row>
  27. <row>
  28. <column colspan="5">
  29. <label>Add New Item to Cupping Session</label>
  30. </column>
  31. </row>
  32. <row>
  33. <column>
  34. <label>Item:</label>
  35. </column>
  36. <column colspan="3">
  37. <line id="itemname" />
  38. </column>
  39. <column column="4">
  40. <button type="push" name="New Item" id="newitem" />
  41. </column>
  42. </row>
  43. </layout>
  44. <program>
  45. <![CDATA[
  46. var categorydrop = findChildObject(this, 'category');
  47. var itemdrop = findChildObject(this, 'item');
  48. var q = "SELECT id, name FROM items WHERE category = '";
  49. q = q + categorydrop.currentText;
  50. q = q + "' ORDER BY name";
  51. itemdrop.addSqlOptions(q);
  52. categorydrop['currentIndexChanged(QString)'].connect(function(arg) {
  53. itemdrop.clear();
  54. q = "SELECT id, name FROM items WHERE category = '";
  55. q = q + arg;
  56. q = q + "' ORDER BY name";
  57. itemdrop.addSqlOptions(q);
  58. });
  59. ]]>
  60. </program>
  61. </window>