Browse Source

Enable batch counting

Neal Wilson 5 years ago
parent
commit
3805a2c39b

+ 2
- 0
config/Windows/productionroaster.xml View File

552
 						setParam.windowTitle = TTR("basicWindow", "Typica - Set Sample Parameters");
552
 						setParam.windowTitle = TTR("basicWindow", "Typica - Set Sample Parameters");
553
 						setParam.button = button;
553
 						setParam.button = button;
554
 					});
554
 					});
555
+					stop.clicked.connect(button.incrementBatch);
556
+					stop.clicked.connect(button.resetCount);
555
 				}
557
 				}
556
 				else if(driverReference.driver == "annotationspinbox")
558
 				else if(driverReference.driver == "annotationspinbox")
557
 				{
559
 				{

+ 2
- 1
config/Windows/setsampleparameters.xml View File

2
     <layout type="vertical">
2
     <layout type="vertical">
3
         <layout type="horizontal">
3
         <layout type="horizontal">
4
             <label>Annotation:</label>
4
             <label>Annotation:</label>
5
-            <line id="template">Sample %1</line>
5
+            <line id="template">%A-%1</line>
6
         </layout>
6
         </layout>
7
         <textarea id="instructions" />
7
         <textarea id="instructions" />
8
         <button name="Reset Sample Number" type="push" id="reset" />
8
         <button name="Reset Sample Number" type="push" id="reset" />
18
         var reset = findChildObject(this, 'reset');
18
         var reset = findChildObject(this, 'reset');
19
         reset.clicked.connect(function() {
19
         reset.clicked.connect(function() {
20
             window.button.resetCount();
20
             window.button.resetCount();
21
+			window.button.resetBatch();
21
         });
22
         });
22
         var okay = findChildObject(this, 'ok');
23
         var okay = findChildObject(this, 'ok');
23
         var template = findChildObject(this, 'template');
24
         var template = findChildObject(this, 'template');

+ 10
- 6
src/moc_typica.cpp View File

1
 /****************************************************************************
1
 /****************************************************************************
2
 ** Meta object code from reading C++ file 'typica.cpp'
2
 ** Meta object code from reading C++ file 'typica.cpp'
3
 **
3
 **
4
-** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.7)
4
+** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.6)
5
 **
5
 **
6
 ** WARNING! All changes made in this file will be lost!
6
 ** WARNING! All changes made in this file will be lost!
7
 *****************************************************************************/
7
 *****************************************************************************/
9
 #if !defined(Q_MOC_OUTPUT_REVISION)
9
 #if !defined(Q_MOC_OUTPUT_REVISION)
10
 #error "The header file 'typica.cpp' doesn't include <QObject>."
10
 #error "The header file 'typica.cpp' doesn't include <QObject>."
11
 #elif Q_MOC_OUTPUT_REVISION != 63
11
 #elif Q_MOC_OUTPUT_REVISION != 63
12
-#error "This file was generated using the moc from 4.8.7. It"
12
+#error "This file was generated using the moc from 4.8.6. It"
13
 #error "cannot be used with the include files from this version of Qt."
13
 #error "cannot be used with the include files from this version of Qt."
14
 #error "(The moc has changed too much.)"
14
 #error "(The moc has changed too much.)"
15
 #endif
15
 #endif
1716
        6,       // revision
1716
        6,       // revision
1717
        0,       // classname
1717
        0,       // classname
1718
        0,    0, // classinfo
1718
        0,    0, // classinfo
1719
-       6,   14, // methods
1719
+       8,   14, // methods
1720
        0,    0, // properties
1720
        0,    0, // properties
1721
        0,    0, // enums/sets
1721
        0,    0, // enums/sets
1722
        0,    0, // constructors
1722
        0,    0, // constructors
1732
      167,  150,   17,   17, 0x0a,
1732
      167,  150,   17,   17, 0x0a,
1733
      192,   17,   17,   17, 0x0a,
1733
      192,   17,   17,   17, 0x0a,
1734
      203,   17,   17,   17, 0x0a,
1734
      203,   17,   17,   17, 0x0a,
1735
+     216,   17,   17,   17, 0x0a,
1736
+     229,   17,   17,   17, 0x0a,
1735
 
1737
 
1736
        0        // eod
1738
        0        // eod
1737
 };
1739
 };
1742
     "setAnnotation(QString)\0tempcolumn\0"
1744
     "setAnnotation(QString)\0tempcolumn\0"
1743
     "setTemperatureColumn(int)\0annotationcolumn\0"
1745
     "setTemperatureColumn(int)\0annotationcolumn\0"
1744
     "setAnnotationColumn(int)\0annotate()\0"
1746
     "setAnnotationColumn(int)\0annotate()\0"
1745
-    "resetCount()\0"
1747
+    "resetCount()\0resetBatch()\0incrementBatch()\0"
1746
 };
1748
 };
1747
 
1749
 
1748
 void AnnotationButton::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
1750
 void AnnotationButton::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
1757
         case 3: _t->setAnnotationColumn((*reinterpret_cast< int(*)>(_a[1]))); break;
1759
         case 3: _t->setAnnotationColumn((*reinterpret_cast< int(*)>(_a[1]))); break;
1758
         case 4: _t->annotate(); break;
1760
         case 4: _t->annotate(); break;
1759
         case 5: _t->resetCount(); break;
1761
         case 5: _t->resetCount(); break;
1762
+        case 6: _t->resetBatch(); break;
1763
+        case 7: _t->incrementBatch(); break;
1760
         default: ;
1764
         default: ;
1761
         }
1765
         }
1762
     }
1766
     }
1794
     if (_id < 0)
1798
     if (_id < 0)
1795
         return _id;
1799
         return _id;
1796
     if (_c == QMetaObject::InvokeMetaMethod) {
1800
     if (_c == QMetaObject::InvokeMetaMethod) {
1797
-        if (_id < 6)
1801
+        if (_id < 8)
1798
             qt_static_metacall(this, _c, _id, _a);
1802
             qt_static_metacall(this, _c, _id, _a);
1799
-        _id -= 6;
1803
+        _id -= 8;
1800
     }
1804
     }
1801
     return _id;
1805
     return _id;
1802
 }
1806
 }

+ 4
- 1
src/typica.w View File

10795
 int batchReplace = noteTemplate.indexOf("%A");
10795
 int batchReplace = noteTemplate.indexOf("%A");
10796
 if(batchReplace >= 0)
10796
 if(batchReplace >= 0)
10797
 {
10797
 {
10798
-	note = noteTemplate.replace(batchReplace, 2, batch);
10798
+	QString temp = noteTemplate;
10799
+	note = temp.replace(batchReplace, 2, batch);
10799
 }
10800
 }
10800
 else
10801
 else
10801
 {
10802
 {
10814
 void AnnotationButton::resetBatch()
10815
 void AnnotationButton::resetBatch()
10815
 {
10816
 {
10816
 	batch = "A";
10817
 	batch = "A";
10818
+	@<Replace batch holder in template@>@;
10817
 }
10819
 }
10818
 
10820
 
10819
 @ The batch sequence starts at A through Z, then proceeds to AA through AZ
10821
 @ The batch sequence starts at A through Z, then proceeds to AA through AZ
18443
     QFormLayout *layout = new QFormLayout;
18445
     QFormLayout *layout = new QFormLayout;
18444
     QLineEdit *buttonTextEdit = new QLineEdit;
18446
     QLineEdit *buttonTextEdit = new QLineEdit;
18445
     QLineEdit *annotationTextEdit = new QLineEdit;
18447
     QLineEdit *annotationTextEdit = new QLineEdit;
18448
+	annotationTextEdit->setText("%A-%1");
18446
     layout->addRow(tr("Button Text:"), buttonTextEdit);
18449
     layout->addRow(tr("Button Text:"), buttonTextEdit);
18447
     layout->addRow(tr("Annotation Text:"), annotationTextEdit);
18450
     layout->addRow(tr("Annotation Text:"), annotationTextEdit);
18448
     @<Get device configuration data for current node@>@;
18451
     @<Get device configuration data for current node@>@;

Loading…
Cancel
Save