Pārlūkot izejas kodu

Implement Delete All in roasting schedule

Neal Wilson 7 gadus atpakaļ
vecāks
revīzija
e568f50eae
1 mainītis faili ar 9 papildinājumiem un 0 dzēšanām
  1. 9
    0
      config/Windows/schedule.xml

+ 9
- 0
config/Windows/schedule.xml Parādīt failu

@@ -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>

Notiek ielāde…
Atcelt
Saglabāt