瀏覽代碼

Implement Delete All in roasting schedule

Neal Wilson 7 年之前
父節點
當前提交
e568f50eae
共有 1 個檔案被更改,包括 9 行新增0 行删除
  1. 9
    0
      config/Windows/schedule.xml

+ 9
- 0
config/Windows/schedule.xml 查看文件

@@ -480,6 +480,15 @@
480 480
     notifier.notify.connect(function() {
481 481
         batches.setQuery("SELECT id, (SELECT name FROM items WHERE id = (data#>>'{roasted}')::numeric), (data#>>'{green_weight}')::numeric FROM scheduled_roasts WHERE machine IS NULL");
482 482
     });
483
+    var deleteall = findChildObject(this, 'deleteall');
484
+    deleteall.triggered.connect(function() {
485
+        var query = QSqlQuery();
486
+        query.exec("DELETE FROM scheduled_roasts WHERE machine IS NULL");
487
+        query = query.invalidate();
488
+        editingstack.setCurrentIndex(0);
489
+        saved = false;
490
+        deletebutton.enabled = false;
491
+    });
483 492
 ]]>
484 493
     </program>
485 494
 </window>

Loading…
取消
儲存