Browse Source

Merge branch 'development' into issue83

Neal Wilson 7 years ago
parent
commit
1121b2a75d
8 changed files with 1493 additions and 1311 deletions
  1. 19
    19
      src/daterangeselector.cpp
  2. 4
    4
      src/daterangeselector.h
  3. 2
    2
      src/draglabel.cpp
  4. 2
    2
      src/draglabel.h
  5. 101
    13
      src/moc_typica.cpp
  6. 6
    6
      src/scale.cpp
  7. 2
    2
      src/scale.h
  8. 1357
    1263
      src/typica.cpp

+ 19
- 19
src/daterangeselector.cpp View File

@@ -1,4 +1,4 @@
1
-/*696:*/
1
+/*702:*/
2 2
 #line 70 "./daterangeselector.w"
3 3
 
4 4
 #include <QCalendarWidget> 
@@ -11,7 +11,7 @@
11 11
 
12 12
 #include "daterangeselector.h"
13 13
 
14
-/*698:*/
14
+/*704:*/
15 15
 #line 115 "./daterangeselector.w"
16 16
 
17 17
 CustomDateRangePopup::CustomDateRangePopup(QWidget*parent):
@@ -55,7 +55,7 @@ outerLayout->addLayout(buttonLayout);
55 55
 setLayout(outerLayout);
56 56
 }
57 57
 
58
-/*:698*//*699:*/
58
+/*:704*//*705:*/
59 59
 #line 163 "./daterangeselector.w"
60 60
 
61 61
 void CustomDateRangePopup::hideEvent(QHideEvent*)
@@ -63,7 +63,7 @@ void CustomDateRangePopup::hideEvent(QHideEvent*)
63 63
 emit hidingPopup();
64 64
 }
65 65
 
66
-/*:699*//*700:*/
66
+/*:705*//*706:*/
67 67
 #line 172 "./daterangeselector.w"
68 68
 
69 69
 void CustomDateRangePopup::applyRange()
@@ -78,7 +78,7 @@ endDateSelector->selectedDate().toString(Qt::ISODate)));
78 78
 hide();
79 79
 }
80 80
 
81
-/*:700*//*701:*/
81
+/*:706*//*707:*/
82 82
 #line 189 "./daterangeselector.w"
83 83
 
84 84
 void CustomDateRangePopup::validateRange()
@@ -93,10 +93,10 @@ applyButton->setEnabled(true);
93 93
 }
94 94
 }
95 95
 
96
-/*:701*/
96
+/*:707*/
97 97
 #line 81 "./daterangeselector.w"
98 98
 
99
-/*702:*/
99
+/*708:*/
100 100
 #line 207 "./daterangeselector.w"
101 101
 
102 102
 DateRangeSelector::DateRangeSelector(QWidget*parent):
@@ -108,7 +108,7 @@ connect(quickSelector,SIGNAL(currentIndexChanged(int)),this,SLOT(updateRange(int
108 108
 QDate currentDate= QDate::currentDate();
109 109
 
110 110
 QHBoxLayout*layout= new QHBoxLayout;
111
-/*703:*/
111
+/*709:*/
112 112
 #line 236 "./daterangeselector.w"
113 113
 
114 114
 quickSelector->addItem("Yesterday",QVariant(QStringList()<<
@@ -188,7 +188,7 @@ quickSelector->insertSeparator(quickSelector->count());
188 188
 quickSelector->addItem("Lifetime");
189 189
 quickSelector->addItem("Custom");
190 190
 
191
-/*:703*/
191
+/*:709*/
192 192
 #line 217 "./daterangeselector.w"
193 193
 
194 194
 QToolButton*customButton= new QToolButton;
@@ -201,7 +201,7 @@ setLayout(layout);
201 201
 connect(customButton,SIGNAL(clicked()),this,SLOT(toggleCustom()));
202 202
 }
203 203
 
204
-/*:702*//*704:*/
204
+/*:708*//*710:*/
205 205
 #line 319 "./daterangeselector.w"
206 206
 
207 207
 void DateRangeSelector::updateRange(int index)
@@ -217,7 +217,7 @@ emit rangeUpdated(quickSelector->itemData(quickSelector->currentIndex()));
217 217
 }
218 218
 }
219 219
 
220
-/*:704*//*705:*/
220
+/*:710*//*711:*/
221 221
 #line 336 "./daterangeselector.w"
222 222
 
223 223
 void DateRangeSelector::popupHidden()
@@ -227,7 +227,7 @@ customRangeSelector= NULL;
227 227
 quickSelector->setCurrentIndex(lastIndex);
228 228
 }
229 229
 
230
-/*:705*//*706:*/
230
+/*:711*//*712:*/
231 231
 #line 347 "./daterangeselector.w"
232 232
 
233 233
 void DateRangeSelector::setCustomRange(QVariant range)
@@ -238,7 +238,7 @@ lastIndex= quickSelector->count()-1;
238 238
 quickSelector->setCurrentIndex(lastIndex);
239 239
 }
240 240
 
241
-/*:706*//*707:*/
241
+/*:712*//*713:*/
242 242
 #line 362 "./daterangeselector.w"
243 243
 
244 244
 void DateRangeSelector::toggleCustom()
@@ -279,7 +279,7 @@ customRangeSelector= NULL;
279 279
 }
280 280
 }
281 281
 
282
-/*:707*//*708:*/
282
+/*:713*//*714:*/
283 283
 #line 404 "./daterangeselector.w"
284 284
 
285 285
 QVariant DateRangeSelector::currentRange()
@@ -287,7 +287,7 @@ QVariant DateRangeSelector::currentRange()
287 287
 return quickSelector->itemData(lastIndex);
288 288
 }
289 289
 
290
-/*:708*//*709:*/
290
+/*:714*//*715:*/
291 291
 #line 412 "./daterangeselector.w"
292 292
 
293 293
 void DateRangeSelector::setCurrentIndex(int index)
@@ -300,7 +300,7 @@ int DateRangeSelector::currentIndex()
300 300
 return quickSelector->currentIndex();
301 301
 }
302 302
 
303
-/*:709*//*710:*/
303
+/*:715*//*716:*/
304 304
 #line 432 "./daterangeselector.w"
305 305
 
306 306
 void DateRangeSelector::setLifetimeRange(QString startDate,QString endDate)
@@ -309,7 +309,7 @@ quickSelector->setItemData(quickSelector->count()-2,
309 309
 QVariant(QStringList()<<startDate<<endDate));
310 310
 }
311 311
 
312
-/*:710*//*711:*/
312
+/*:716*//*717:*/
313 313
 #line 442 "./daterangeselector.w"
314 314
 
315 315
 void DateRangeSelector::removeIndex(int index)
@@ -317,7 +317,7 @@ void DateRangeSelector::removeIndex(int index)
317 317
 quickSelector->removeItem(index);
318 318
 }
319 319
 
320
-/*:711*/
320
+/*:717*/
321 321
 #line 82 "./daterangeselector.w"
322 322
 
323 323
 
@@ -325,4 +325,4 @@ quickSelector->removeItem(index);
325 325
 #include "moc_daterangeselector.cpp"
326 326
 #endif
327 327
 
328
-/*:696*/
328
+/*:702*/

+ 4
- 4
src/daterangeselector.h View File

@@ -1,4 +1,4 @@
1
-/*695:*/
1
+/*701:*/
2 2
 #line 30 "./daterangeselector.w"
3 3
 
4 4
 
@@ -9,7 +9,7 @@
9 9
 #ifndef TypicaDateRangeSelectorHeader
10 10
 #define TypicaDateRangeSelectorHeader
11 11
 
12
-/*697:*/
12
+/*703:*/
13 13
 #line 91 "./daterangeselector.w"
14 14
 
15 15
 class CustomDateRangePopup:public QWidget
@@ -31,7 +31,7 @@ QCalendarWidget*endDateSelector;
31 31
 QPushButton*applyButton;
32 32
 };
33 33
 
34
-/*:697*/
34
+/*:703*/
35 35
 #line 39 "./daterangeselector.w"
36 36
 
37 37
 
@@ -62,4 +62,4 @@ int lastIndex;
62 62
 
63 63
 #endif
64 64
 
65
-/*:695*/
65
+/*:701*/

+ 2
- 2
src/draglabel.cpp View File

@@ -1,4 +1,4 @@
1
-/*1091:*/
1
+/*1097:*/
2 2
 #line 33 "./scales.w"
3 3
 
4 4
 #include "draglabel.h"
@@ -26,4 +26,4 @@ drag->exec();
26 26
 }
27 27
 }
28 28
 
29
-/*:1091*/
29
+/*:1097*/

+ 2
- 2
src/draglabel.h View File

@@ -1,4 +1,4 @@
1
-/*1090:*/
1
+/*1096:*/
2 2
 #line 13 "./scales.w"
3 3
 
4 4
 #ifndef TypicaDragLabelInclude
@@ -17,4 +17,4 @@ void mousePressEvent(QMouseEvent*event);
17 17
 
18 18
 #endif
19 19
 
20
-/*:1090*/
20
+/*:1096*/

+ 101
- 13
src/moc_typica.cpp View File

@@ -2496,7 +2496,7 @@ static const uint qt_meta_data_Application[] = {
2496 2496
        6,       // revision
2497 2497
        0,       // classname
2498 2498
        0,    0, // classinfo
2499
-       8,   14, // methods
2499
+       9,   14, // methods
2500 2500
        0,    0, // properties
2501 2501
        0,    0, // enums/sets
2502 2502
        0,    0, // constructors
@@ -2509,13 +2509,14 @@ static const uint qt_meta_data_Application[] = {
2509 2509
  // slots: signature, parameters, type, tag, flags
2510 2510
       46,   39,   12,   12, 0x0a,
2511 2511
       73,   13,   12,   12, 0x0a,
2512
-     103,   12,   12,   12, 0x0a,
2512
+     116,  103,   12,   12, 0x0a,
2513
+     132,   12,   12,   12, 0x0a,
2513 2514
 
2514 2515
  // methods: signature, parameters, type, tag, flags
2515
-     134,   12,  129,   12, 0x02,
2516
-     162,   12,  154,   12, 0x02,
2517
-     196,  182,  129,   12, 0x02,
2518
-     219,   12,  129,   12, 0x02,
2516
+     163,   12,  158,   12, 0x02,
2517
+     191,   12,  183,   12, 0x02,
2518
+     225,  211,  158,   12, 0x02,
2519
+     248,   12,  158,   12, 0x02,
2519 2520
 
2520 2521
        0        // eod
2521 2522
 };
@@ -2524,6 +2525,7 @@ static const char qt_meta_stringdata_Application[] = {
2524 2525
     "Application\0\0user\0userChanged(QString)\0"
2525 2526
     "status\0setDatabaseConnected(bool)\0"
2526 2527
     "setCurrentTypicaUser(QString)\0"
2528
+    "notification\0notify(QString)\0"
2527 2529
     "saveDeviceConfiguration()\0bool\0"
2528 2530
     "databaseConnected()\0QString\0"
2529 2531
     "currentTypicaUser()\0user,password\0"
@@ -2539,14 +2541,15 @@ void Application::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id,
2539 2541
         case 0: _t->userChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break;
2540 2542
         case 1: _t->setDatabaseConnected((*reinterpret_cast< bool(*)>(_a[1]))); break;
2541 2543
         case 2: _t->setCurrentTypicaUser((*reinterpret_cast< const QString(*)>(_a[1]))); break;
2542
-        case 3: _t->saveDeviceConfiguration(); break;
2543
-        case 4: { bool _r = _t->databaseConnected();
2544
+        case 3: _t->notify((*reinterpret_cast< const QString(*)>(_a[1]))); break;
2545
+        case 4: _t->saveDeviceConfiguration(); break;
2546
+        case 5: { bool _r = _t->databaseConnected();
2544 2547
             if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; }  break;
2545
-        case 5: { QString _r = _t->currentTypicaUser();
2548
+        case 6: { QString _r = _t->currentTypicaUser();
2546 2549
             if (_a[0]) *reinterpret_cast< QString*>(_a[0]) = _r; }  break;
2547
-        case 6: { bool _r = _t->login((*reinterpret_cast< const QString(*)>(_a[1])),(*reinterpret_cast< const QString(*)>(_a[2])));
2550
+        case 7: { bool _r = _t->login((*reinterpret_cast< const QString(*)>(_a[1])),(*reinterpret_cast< const QString(*)>(_a[2])));
2548 2551
             if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; }  break;
2549
-        case 7: { bool _r = _t->autoLogin();
2552
+        case 8: { bool _r = _t->autoLogin();
2550 2553
             if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; }  break;
2551 2554
         default: ;
2552 2555
         }
@@ -2585,9 +2588,9 @@ int Application::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
2585 2588
     if (_id < 0)
2586 2589
         return _id;
2587 2590
     if (_c == QMetaObject::InvokeMetaMethod) {
2588
-        if (_id < 8)
2591
+        if (_id < 9)
2589 2592
             qt_static_metacall(this, _c, _id, _a);
2590
-        _id -= 8;
2593
+        _id -= 9;
2591 2594
     }
2592 2595
     return _id;
2593 2596
 }
@@ -2598,6 +2601,91 @@ void Application::userChanged(const QString & _t1)
2598 2601
     void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
2599 2602
     QMetaObject::activate(this, &staticMetaObject, 0, _a);
2600 2603
 }
2604
+static const uint qt_meta_data_DatabaseNotification[] = {
2605
+
2606
+ // content:
2607
+       6,       // revision
2608
+       0,       // classname
2609
+       0,    0, // classinfo
2610
+       2,   14, // methods
2611
+       0,    0, // properties
2612
+       0,    0, // enums/sets
2613
+       0,    0, // constructors
2614
+       0,       // flags
2615
+       1,       // signalCount
2616
+
2617
+ // signals: signature, parameters, type, tag, flags
2618
+      35,   22,   21,   21, 0x05,
2619
+
2620
+ // slots: signature, parameters, type, tag, flags
2621
+      51,   22,   21,   21, 0x0a,
2622
+
2623
+       0        // eod
2624
+};
2625
+
2626
+static const char qt_meta_stringdata_DatabaseNotification[] = {
2627
+    "DatabaseNotification\0\0notification\0"
2628
+    "notify(QString)\0forwardNotification(QString)\0"
2629
+};
2630
+
2631
+void DatabaseNotification::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
2632
+{
2633
+    if (_c == QMetaObject::InvokeMetaMethod) {
2634
+        Q_ASSERT(staticMetaObject.cast(_o));
2635
+        DatabaseNotification *_t = static_cast<DatabaseNotification *>(_o);
2636
+        switch (_id) {
2637
+        case 0: _t->notify((*reinterpret_cast< const QString(*)>(_a[1]))); break;
2638
+        case 1: _t->forwardNotification((*reinterpret_cast< const QString(*)>(_a[1]))); break;
2639
+        default: ;
2640
+        }
2641
+    }
2642
+}
2643
+
2644
+const QMetaObjectExtraData DatabaseNotification::staticMetaObjectExtraData = {
2645
+    0,  qt_static_metacall 
2646
+};
2647
+
2648
+const QMetaObject DatabaseNotification::staticMetaObject = {
2649
+    { &QObject::staticMetaObject, qt_meta_stringdata_DatabaseNotification,
2650
+      qt_meta_data_DatabaseNotification, &staticMetaObjectExtraData }
2651
+};
2652
+
2653
+#ifdef Q_NO_DATA_RELOCATION
2654
+const QMetaObject &DatabaseNotification::getStaticMetaObject() { return staticMetaObject; }
2655
+#endif //Q_NO_DATA_RELOCATION
2656
+
2657
+const QMetaObject *DatabaseNotification::metaObject() const
2658
+{
2659
+    return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
2660
+}
2661
+
2662
+void *DatabaseNotification::qt_metacast(const char *_clname)
2663
+{
2664
+    if (!_clname) return 0;
2665
+    if (!strcmp(_clname, qt_meta_stringdata_DatabaseNotification))
2666
+        return static_cast<void*>(const_cast< DatabaseNotification*>(this));
2667
+    return QObject::qt_metacast(_clname);
2668
+}
2669
+
2670
+int DatabaseNotification::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
2671
+{
2672
+    _id = QObject::qt_metacall(_c, _id, _a);
2673
+    if (_id < 0)
2674
+        return _id;
2675
+    if (_c == QMetaObject::InvokeMetaMethod) {
2676
+        if (_id < 2)
2677
+            qt_static_metacall(this, _c, _id, _a);
2678
+        _id -= 2;
2679
+    }
2680
+    return _id;
2681
+}
2682
+
2683
+// SIGNAL 0
2684
+void DatabaseNotification::notify(const QString & _t1)
2685
+{
2686
+    void *_a[] = { 0, const_cast<void*>(reinterpret_cast<const void*>(&_t1)) };
2687
+    QMetaObject::activate(this, &staticMetaObject, 0, _a);
2688
+}
2601 2689
 static const uint qt_meta_data_SaltModel[] = {
2602 2690
 
2603 2691
  // content:

+ 6
- 6
src/scale.cpp View File

@@ -1,4 +1,4 @@
1
-/*1097:*/
1
+/*1103:*/
2 2
 #line 135 "./scales.w"
3 3
 
4 4
 #include "scale.h"
@@ -10,7 +10,7 @@ QextSerialPort(port,QextSerialPort::EventDriven)
10 10
 connect(this,SIGNAL(readyRead()),this,SLOT(dataAvailable()));
11 11
 }
12 12
 
13
-/*:1097*//*1098:*/
13
+/*:1103*//*1104:*/
14 14
 #line 153 "./scales.w"
15 15
 
16 16
 void SerialScale::dataAvailable()
@@ -24,7 +24,7 @@ responseBuffer.clear();
24 24
 }
25 25
 else
26 26
 {
27
-/*1099:*/
27
+/*1105:*/
28 28
 #line 193 "./scales.w"
29 29
 
30 30
 QStringList responseParts= QString(responseBuffer.simplified()).split(' ');
@@ -53,7 +53,7 @@ unit= Units::Ounce;
53 53
 }
54 54
 emit newMeasurement(weight,unit);
55 55
 
56
-/*:1099*/
56
+/*:1105*/
57 57
 #line 165 "./scales.w"
58 58
 
59 59
 responseBuffer.clear();
@@ -61,7 +61,7 @@ responseBuffer.clear();
61 61
 }
62 62
 }
63 63
 
64
-/*:1098*//*1100:*/
64
+/*:1104*//*1106:*/
65 65
 #line 224 "./scales.w"
66 66
 
67 67
 void SerialScale::tare()
@@ -96,4 +96,4 @@ commandTerminator= "\x0A";
96 96
 }
97 97
 }
98 98
 
99
-/*:1100*/
99
+/*:1106*/

+ 2
- 2
src/scale.h View File

@@ -1,4 +1,4 @@
1
-/*1096:*/
1
+/*1102:*/
2 2
 #line 103 "./scales.w"
3 3
 
4 4
 #ifndef TypicaScaleInclude
@@ -29,4 +29,4 @@ QByteArray commandTerminator;
29 29
 
30 30
 #endif
31 31
 
32
-/*:1096*/
32
+/*:1102*/

+ 1357
- 1263
src/typica.cpp
File diff suppressed because it is too large
View File


Loading…
Cancel
Save