Browse Source

Add generated files

Neal Wilson 10 years ago
parent
commit
ea0a742003
20 changed files with 3394 additions and 1737 deletions
  1. 5
    5
      src/abouttypica.cpp
  2. 2
    2
      src/abouttypica.h
  3. 37
    62
      src/daterangeselector.cpp
  4. 29
    3
      src/daterangeselector.h
  5. 2
    2
      src/draglabel.cpp
  6. 2
    2
      src/draglabel.h
  7. 25
    10
      src/helpmenu.cpp
  8. 3
    2
      src/helpmenu.h
  9. 3
    13
      src/moc_feedback.cpp
  10. 372
    14
      src/moc_typica.cpp
  11. 1164
    435
      src/qrc_resources.cpp
  12. 6
    6
      src/scale.cpp
  13. 2
    2
      src/scale.h
  14. 1695
    1135
      src/typica.cpp
  15. 6
    6
      src/units.cpp
  16. 2
    2
      src/units.h
  17. 9
    9
      src/webelement.cpp
  18. 3
    3
      src/webelement.h
  19. 24
    22
      src/webview.cpp
  20. 3
    2
      src/webview.h

+ 5
- 5
src/abouttypica.cpp View File

1
-/*222:*/
1
+/*249:*/
2
 #line 33 "./abouttypica.w"
2
 #line 33 "./abouttypica.w"
3
 
3
 
4
 #include "abouttypica.h"
4
 #include "abouttypica.h"
5
 
5
 
6
-/*223:*/
6
+/*250:*/
7
 #line 42 "./abouttypica.w"
7
 #line 42 "./abouttypica.w"
8
 
8
 
9
 AboutTypica::AboutTypica():QMainWindow(NULL)
9
 AboutTypica::AboutTypica():QMainWindow(NULL)
17
 setCentralWidget(banner);
17
 setCentralWidget(banner);
18
 }
18
 }
19
 
19
 
20
-#line 5641 "./typica.w"
20
+#line 5992 "./typica.w"
21
 
21
 
22
-/*:223*/
22
+/*:250*/
23
 #line 36 "./abouttypica.w"
23
 #line 36 "./abouttypica.w"
24
 
24
 
25
 
25
 
26
-/*:222*/
26
+/*:249*/

+ 2
- 2
src/abouttypica.h View File

1
-/*221:*/
1
+/*248:*/
2
 #line 14 "./abouttypica.w"
2
 #line 14 "./abouttypica.w"
3
 
3
 
4
 #include <QMainWindow> 
4
 #include <QMainWindow> 
17
 
17
 
18
 #endif
18
 #endif
19
 
19
 
20
-/*:221*/
20
+/*:248*/

+ 37
- 62
src/daterangeselector.cpp View File

1
-/*603:*/
2
-#line 66 "./daterangeselector.w"
1
+/*639:*/
2
+#line 68 "./daterangeselector.w"
3
 
3
 
4
 #include <QCalendarWidget> 
4
 #include <QCalendarWidget> 
5
 #include <QPushButton> 
5
 #include <QPushButton> 
11
 
11
 
12
 #include "daterangeselector.h"
12
 #include "daterangeselector.h"
13
 
13
 
14
-/*604:*/
15
-#line 86 "./daterangeselector.w"
16
-
17
-class CustomDateRangePopup:public QWidget
18
-{
19
-Q_OBJECT
20
-public:
21
-CustomDateRangePopup(QWidget*parent= NULL);
22
-public slots:
23
-void applyRange();
24
-signals:
25
-void hidingPopup();
26
-protected:
27
-virtual void hideEvent(QHideEvent*event);
28
-private slots:
29
-void validateRange();
30
-private:
31
-QCalendarWidget*startDateSelector;
32
-QCalendarWidget*endDateSelector;
33
-QPushButton*applyButton;
34
-};
35
-
36
-/*:604*/
37
-#line 77 "./daterangeselector.w"
38
-
39
-/*605:*/
40
-#line 110 "./daterangeselector.w"
14
+/*641:*/
15
+#line 111 "./daterangeselector.w"
41
 
16
 
42
 CustomDateRangePopup::CustomDateRangePopup(QWidget*parent):
17
 CustomDateRangePopup::CustomDateRangePopup(QWidget*parent):
43
 QWidget(parent,Qt::Popup),startDateSelector(new QCalendarWidget),
18
 QWidget(parent,Qt::Popup),startDateSelector(new QCalendarWidget),
80
 setLayout(outerLayout);
55
 setLayout(outerLayout);
81
 }
56
 }
82
 
57
 
83
-/*:605*//*606:*/
84
-#line 158 "./daterangeselector.w"
58
+/*:641*//*642:*/
59
+#line 159 "./daterangeselector.w"
85
 
60
 
86
 void CustomDateRangePopup::hideEvent(QHideEvent*)
61
 void CustomDateRangePopup::hideEvent(QHideEvent*)
87
 {
62
 {
88
 emit hidingPopup();
63
 emit hidingPopup();
89
 }
64
 }
90
 
65
 
91
-/*:606*//*607:*/
92
-#line 167 "./daterangeselector.w"
66
+/*:642*//*643:*/
67
+#line 168 "./daterangeselector.w"
93
 
68
 
94
 void CustomDateRangePopup::applyRange()
69
 void CustomDateRangePopup::applyRange()
95
 {
70
 {
103
 hide();
78
 hide();
104
 }
79
 }
105
 
80
 
106
-/*:607*//*608:*/
107
-#line 184 "./daterangeselector.w"
81
+/*:643*//*644:*/
82
+#line 185 "./daterangeselector.w"
108
 
83
 
109
 void CustomDateRangePopup::validateRange()
84
 void CustomDateRangePopup::validateRange()
110
 {
85
 {
118
 }
93
 }
119
 }
94
 }
120
 
95
 
121
-/*:608*/
122
-#line 78 "./daterangeselector.w"
96
+/*:644*/
97
+#line 79 "./daterangeselector.w"
123
 
98
 
124
-/*609:*/
125
-#line 202 "./daterangeselector.w"
99
+/*645:*/
100
+#line 203 "./daterangeselector.w"
126
 
101
 
127
 DateRangeSelector::DateRangeSelector(QWidget*parent):
102
 DateRangeSelector::DateRangeSelector(QWidget*parent):
128
 QWidget(parent),quickSelector(new QComboBox(this)),
103
 QWidget(parent),quickSelector(new QComboBox(this)),
133
 QDate currentDate= QDate::currentDate();
108
 QDate currentDate= QDate::currentDate();
134
 
109
 
135
 QHBoxLayout*layout= new QHBoxLayout;
110
 QHBoxLayout*layout= new QHBoxLayout;
136
-/*610:*/
137
-#line 231 "./daterangeselector.w"
111
+/*646:*/
112
+#line 232 "./daterangeselector.w"
138
 
113
 
139
 quickSelector->addItem("Yesterday",QVariant(QStringList()<<
114
 quickSelector->addItem("Yesterday",QVariant(QStringList()<<
140
 currentDate.addDays(-1).toString(Qt::ISODate)));
115
 currentDate.addDays(-1).toString(Qt::ISODate)));
213
 quickSelector->addItem("Lifetime");
188
 quickSelector->addItem("Lifetime");
214
 quickSelector->addItem("Custom");
189
 quickSelector->addItem("Custom");
215
 
190
 
216
-/*:610*/
217
-#line 212 "./daterangeselector.w"
191
+/*:646*/
192
+#line 213 "./daterangeselector.w"
218
 
193
 
219
 QToolButton*customButton= new QToolButton;
194
 QToolButton*customButton= new QToolButton;
220
 customButton->setIcon(QIcon::fromTheme("office-calendar",
195
 customButton->setIcon(QIcon::fromTheme("office-calendar",
226
 connect(customButton,SIGNAL(clicked()),this,SLOT(toggleCustom()));
201
 connect(customButton,SIGNAL(clicked()),this,SLOT(toggleCustom()));
227
 }
202
 }
228
 
203
 
229
-/*:609*//*611:*/
230
-#line 314 "./daterangeselector.w"
204
+/*:645*//*647:*/
205
+#line 315 "./daterangeselector.w"
231
 
206
 
232
 void DateRangeSelector::updateRange(int index)
207
 void DateRangeSelector::updateRange(int index)
233
 {
208
 {
242
 }
217
 }
243
 }
218
 }
244
 
219
 
245
-/*:611*//*612:*/
246
-#line 331 "./daterangeselector.w"
220
+/*:647*//*648:*/
221
+#line 332 "./daterangeselector.w"
247
 
222
 
248
 void DateRangeSelector::popupHidden()
223
 void DateRangeSelector::popupHidden()
249
 {
224
 {
252
 quickSelector->setCurrentIndex(lastIndex);
227
 quickSelector->setCurrentIndex(lastIndex);
253
 }
228
 }
254
 
229
 
255
-/*:612*//*613:*/
256
-#line 342 "./daterangeselector.w"
230
+/*:648*//*649:*/
231
+#line 343 "./daterangeselector.w"
257
 
232
 
258
 void DateRangeSelector::setCustomRange(QVariant range)
233
 void DateRangeSelector::setCustomRange(QVariant range)
259
 {
234
 {
263
 quickSelector->setCurrentIndex(lastIndex);
238
 quickSelector->setCurrentIndex(lastIndex);
264
 }
239
 }
265
 
240
 
266
-/*:613*//*614:*/
267
-#line 357 "./daterangeselector.w"
241
+/*:649*//*650:*/
242
+#line 358 "./daterangeselector.w"
268
 
243
 
269
 void DateRangeSelector::toggleCustom()
244
 void DateRangeSelector::toggleCustom()
270
 {
245
 {
304
 }
279
 }
305
 }
280
 }
306
 
281
 
307
-/*:614*//*615:*/
308
-#line 399 "./daterangeselector.w"
282
+/*:650*//*651:*/
283
+#line 400 "./daterangeselector.w"
309
 
284
 
310
 QVariant DateRangeSelector::currentRange()
285
 QVariant DateRangeSelector::currentRange()
311
 {
286
 {
312
 return quickSelector->itemData(lastIndex);
287
 return quickSelector->itemData(lastIndex);
313
 }
288
 }
314
 
289
 
315
-/*:615*//*616:*/
316
-#line 407 "./daterangeselector.w"
290
+/*:651*//*652:*/
291
+#line 408 "./daterangeselector.w"
317
 
292
 
318
 void DateRangeSelector::setCurrentIndex(int index)
293
 void DateRangeSelector::setCurrentIndex(int index)
319
 {
294
 {
320
 quickSelector->setCurrentIndex(index);
295
 quickSelector->setCurrentIndex(index);
321
 }
296
 }
322
 
297
 
323
-/*:616*//*617:*/
324
-#line 422 "./daterangeselector.w"
298
+/*:652*//*653:*/
299
+#line 423 "./daterangeselector.w"
325
 
300
 
326
 void DateRangeSelector::setLifetimeRange(QString startDate,QString endDate)
301
 void DateRangeSelector::setLifetimeRange(QString startDate,QString endDate)
327
 {
302
 {
329
 QVariant(QStringList()<<startDate<<endDate));
304
 QVariant(QStringList()<<startDate<<endDate));
330
 }
305
 }
331
 
306
 
332
-/*:617*//*618:*/
333
-#line 432 "./daterangeselector.w"
307
+/*:653*//*654:*/
308
+#line 433 "./daterangeselector.w"
334
 
309
 
335
 void DateRangeSelector::removeIndex(int index)
310
 void DateRangeSelector::removeIndex(int index)
336
 {
311
 {
337
 quickSelector->removeItem(index);
312
 quickSelector->removeItem(index);
338
 }
313
 }
339
 
314
 
340
-/*:618*/
341
-#line 79 "./daterangeselector.w"
315
+/*:654*/
316
+#line 80 "./daterangeselector.w"
342
 
317
 
343
 
318
 
344
 #include "moc_daterangeselector.cpp"
319
 #include "moc_daterangeselector.cpp"
345
 
320
 
346
-/*:603*/
321
+/*:639*/

+ 29
- 3
src/daterangeselector.h View File

1
-/*602:*/
1
+/*638:*/
2
 #line 30 "./daterangeselector.w"
2
 #line 30 "./daterangeselector.w"
3
 
3
 
4
 
4
 
5
 #include <QComboBox> 
5
 #include <QComboBox> 
6
+#include <QPushButton> 
7
+#include <QCalendarWidget> 
6
 
8
 
7
 #ifndef TypicaDateRangeSelectorHeader
9
 #ifndef TypicaDateRangeSelectorHeader
8
 #define TypicaDateRangeSelectorHeader
10
 #define TypicaDateRangeSelectorHeader
9
 
11
 
10
-class CustomDateRangePopup;
12
+/*640:*/
13
+#line 87 "./daterangeselector.w"
14
+
15
+class CustomDateRangePopup:public QWidget
16
+{
17
+Q_OBJECT
18
+public:
19
+CustomDateRangePopup(QWidget*parent= NULL);
20
+public slots:
21
+void applyRange();
22
+signals:
23
+void hidingPopup();
24
+protected:
25
+virtual void hideEvent(QHideEvent*event);
26
+private slots:
27
+void validateRange();
28
+private:
29
+QCalendarWidget*startDateSelector;
30
+QCalendarWidget*endDateSelector;
31
+QPushButton*applyButton;
32
+};
33
+
34
+/*:640*/
35
+#line 39 "./daterangeselector.w"
36
+
11
 
37
 
12
 class DateRangeSelector:public QWidget
38
 class DateRangeSelector:public QWidget
13
 {
39
 {
34
 
60
 
35
 #endif
61
 #endif
36
 
62
 
37
-/*:602*/
63
+/*:638*/

+ 2
- 2
src/draglabel.cpp View File

1
-/*863:*/
1
+/*958:*/
2
 #line 33 "./scales.w"
2
 #line 33 "./scales.w"
3
 
3
 
4
 #include "draglabel.h"
4
 #include "draglabel.h"
26
 }
26
 }
27
 }
27
 }
28
 
28
 
29
-/*:863*/
29
+/*:958*/

+ 2
- 2
src/draglabel.h View File

1
-/*862:*/
1
+/*957:*/
2
 #line 13 "./scales.w"
2
 #line 13 "./scales.w"
3
 
3
 
4
 #ifndef TypicaDragLabelInclude
4
 #ifndef TypicaDragLabelInclude
17
 
17
 
18
 #endif
18
 #endif
19
 
19
 
20
-/*:862*/
20
+/*:957*/

+ 25
- 10
src/helpmenu.cpp View File

1
-/*163:*/
2
-#line 35 "./helpmenu.w"
1
+/*182:*/
2
+#line 36 "./helpmenu.w"
3
 
3
 
4
 #include "helpmenu.h"
4
 #include "helpmenu.h"
5
 #include "abouttypica.h"
5
 #include "abouttypica.h"
6
+#include "feedback.h"
6
 
7
 
7
-/*164:*/
8
-#line 47 "./helpmenu.w"
8
+/*183:*/
9
+#line 49 "./helpmenu.w"
9
 
10
 
10
 HelpMenu::HelpMenu():QMenu()
11
 HelpMenu::HelpMenu():QMenu()
11
 {
12
 {
15
 aboutTypicaAction->setObjectName("aboutTypicaAction");
16
 aboutTypicaAction->setObjectName("aboutTypicaAction");
16
 addAction(aboutTypicaAction);
17
 addAction(aboutTypicaAction);
17
 connect(aboutTypicaAction,SIGNAL(triggered()),this,SLOT(displayAboutTypica()));
18
 connect(aboutTypicaAction,SIGNAL(triggered()),this,SLOT(displayAboutTypica()));
19
+QAction*sendFeedbackAction= new QAction(tr("Send Feedback"),this);
20
+sendFeedbackAction->setObjectName("sendFeedback");
21
+addAction(sendFeedbackAction);
22
+connect(sendFeedbackAction,SIGNAL(triggered()),this,SLOT(displayFeedbackWizard()));
18
 }
23
 }
19
 
24
 
20
-/*:164*//*165:*/
21
-#line 61 "./helpmenu.w"
25
+/*:183*//*184:*/
26
+#line 67 "./helpmenu.w"
22
 
27
 
23
 void HelpMenu::displayAboutTypica()
28
 void HelpMenu::displayAboutTypica()
24
 {
29
 {
26
 aboutBox->show();
31
 aboutBox->show();
27
 }
32
 }
28
 
33
 
29
-#line 3946 "./typica.w"
34
+/*:184*//*185:*/
35
+#line 76 "./helpmenu.w"
30
 
36
 
31
-/*:165*/
32
-#line 39 "./helpmenu.w"
37
+void HelpMenu::displayFeedbackWizard()
38
+{
39
+FeedbackWizard*window= new FeedbackWizard;
40
+window->show();
41
+}
42
+
43
+#line 4266 "./typica.w"
44
+
45
+#line 1 "./feedback.w"
46
+/*:185*/
47
+#line 41 "./helpmenu.w"
33
 
48
 
34
 
49
 
35
-/*:163*/
50
+/*:182*/

+ 3
- 2
src/helpmenu.h View File

1
-/*162:*/
1
+/*181:*/
2
 #line 16 "./helpmenu.w"
2
 #line 16 "./helpmenu.w"
3
 
3
 
4
 #include <QMenu> 
4
 #include <QMenu> 
13
 HelpMenu();
13
 HelpMenu();
14
 public slots:
14
 public slots:
15
 void displayAboutTypica();
15
 void displayAboutTypica();
16
+void displayFeedbackWizard();
16
 };
17
 };
17
 
18
 
18
 #endif
19
 #endif
19
 
20
 
20
-/*:162*/
21
+/*:181*/

+ 3
- 13
src/moc_feedback.cpp View File

22
        6,       // revision
22
        6,       // revision
23
        0,       // classname
23
        0,       // classname
24
        0,    0, // classinfo
24
        0,    0, // classinfo
25
-       5,   14, // methods
25
+       1,   14, // methods
26
        0,    0, // properties
26
        0,    0, // properties
27
        0,    0, // enums/sets
27
        0,    0, // enums/sets
28
        0,    0, // constructors
28
        0,    0, // constructors
31
 
31
 
32
  // slots: signature, parameters, type, tag, flags
32
  // slots: signature, parameters, type, tag, flags
33
       22,   16,   15,   15, 0x08,
33
       22,   16,   15,   15, 0x08,
34
-      50,   15,   15,   15, 0x08,
35
-      70,   15,   15,   15, 0x08,
36
-      91,   15,   15,   15, 0x08,
37
-     107,   15,   15,   15, 0x08,
38
 
34
 
39
        0        // eod
35
        0        // eod
40
 };
36
 };
41
 
37
 
42
 static const char qt_meta_stringdata_FeedbackWizard[] = {
38
 static const char qt_meta_stringdata_FeedbackWizard[] = {
43
     "FeedbackWizard\0\0index\0setCommentInstructions(int)\0"
39
     "FeedbackWizard\0\0index\0setCommentInstructions(int)\0"
44
-    "updateMessageText()\0printButtonPressed()\0"
45
-    "printAccepted()\0copyButtonPressed()\0"
46
 };
40
 };
47
 
41
 
48
 void FeedbackWizard::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
42
 void FeedbackWizard::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
52
         FeedbackWizard *_t = static_cast<FeedbackWizard *>(_o);
46
         FeedbackWizard *_t = static_cast<FeedbackWizard *>(_o);
53
         switch (_id) {
47
         switch (_id) {
54
         case 0: _t->setCommentInstructions((*reinterpret_cast< int(*)>(_a[1]))); break;
48
         case 0: _t->setCommentInstructions((*reinterpret_cast< int(*)>(_a[1]))); break;
55
-        case 1: _t->updateMessageText(); break;
56
-        case 2: _t->printButtonPressed(); break;
57
-        case 3: _t->printAccepted(); break;
58
-        case 4: _t->copyButtonPressed(); break;
59
         default: ;
49
         default: ;
60
         }
50
         }
61
     }
51
     }
93
     if (_id < 0)
83
     if (_id < 0)
94
         return _id;
84
         return _id;
95
     if (_c == QMetaObject::InvokeMetaMethod) {
85
     if (_c == QMetaObject::InvokeMetaMethod) {
96
-        if (_id < 5)
86
+        if (_id < 1)
97
             qt_static_metacall(this, _c, _id, _a);
87
             qt_static_metacall(this, _c, _id, _a);
98
-        _id -= 5;
88
+        _id -= 1;
99
     }
89
     }
100
     return _id;
90
     return _id;
101
 }
91
 }

+ 372
- 14
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: Thu Jul 3 12:34:58 2014
5
-**      by: The Qt Meta Object Compiler version 63 (Qt 4.8.4)
4
+** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.6)
6
 **
5
 **
7
 ** WARNING! All changes made in this file will be lost!
6
 ** WARNING! All changes made in this file will be lost!
8
 *****************************************************************************/
7
 *****************************************************************************/
10
 #if !defined(Q_MOC_OUTPUT_REVISION)
9
 #if !defined(Q_MOC_OUTPUT_REVISION)
11
 #error "The header file 'typica.cpp' doesn't include <QObject>."
10
 #error "The header file 'typica.cpp' doesn't include <QObject>."
12
 #elif Q_MOC_OUTPUT_REVISION != 63
11
 #elif Q_MOC_OUTPUT_REVISION != 63
13
-#error "This file was generated using the moc from 4.8.4. It"
12
+#error "This file was generated using the moc from 4.8.6. It"
14
 #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."
15
 #error "(The moc has changed too much.)"
14
 #error "(The moc has changed too much.)"
16
 #endif
15
 #endif
5625
     }
5624
     }
5626
     return _id;
5625
     return _id;
5627
 }
5626
 }
5627
+static const uint qt_meta_data_AdvancedSettingsWidget[] = {
5628
+
5629
+ // content:
5630
+       6,       // revision
5631
+       0,       // classname
5632
+       0,    0, // classinfo
5633
+       1,   14, // methods
5634
+       0,    0, // properties
5635
+       0,    0, // enums/sets
5636
+       0,    0, // constructors
5637
+       0,       // flags
5638
+       0,       // signalCount
5639
+
5640
+ // slots: signature, parameters, type, tag, flags
5641
+      32,   24,   23,   23, 0x0a,
5642
+
5643
+       0        // eod
5644
+};
5645
+
5646
+static const char qt_meta_stringdata_AdvancedSettingsWidget[] = {
5647
+    "AdvancedSettingsWidget\0\0enabled\0"
5648
+    "enableDiagnosticLogging(bool)\0"
5649
+};
5650
+
5651
+void AdvancedSettingsWidget::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
5652
+{
5653
+    if (_c == QMetaObject::InvokeMetaMethod) {
5654
+        Q_ASSERT(staticMetaObject.cast(_o));
5655
+        AdvancedSettingsWidget *_t = static_cast<AdvancedSettingsWidget *>(_o);
5656
+        switch (_id) {
5657
+        case 0: _t->enableDiagnosticLogging((*reinterpret_cast< bool(*)>(_a[1]))); break;
5658
+        default: ;
5659
+        }
5660
+    }
5661
+}
5662
+
5663
+const QMetaObjectExtraData AdvancedSettingsWidget::staticMetaObjectExtraData = {
5664
+    0,  qt_static_metacall 
5665
+};
5666
+
5667
+const QMetaObject AdvancedSettingsWidget::staticMetaObject = {
5668
+    { &QWidget::staticMetaObject, qt_meta_stringdata_AdvancedSettingsWidget,
5669
+      qt_meta_data_AdvancedSettingsWidget, &staticMetaObjectExtraData }
5670
+};
5671
+
5672
+#ifdef Q_NO_DATA_RELOCATION
5673
+const QMetaObject &AdvancedSettingsWidget::getStaticMetaObject() { return staticMetaObject; }
5674
+#endif //Q_NO_DATA_RELOCATION
5675
+
5676
+const QMetaObject *AdvancedSettingsWidget::metaObject() const
5677
+{
5678
+    return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
5679
+}
5680
+
5681
+void *AdvancedSettingsWidget::qt_metacast(const char *_clname)
5682
+{
5683
+    if (!_clname) return 0;
5684
+    if (!strcmp(_clname, qt_meta_stringdata_AdvancedSettingsWidget))
5685
+        return static_cast<void*>(const_cast< AdvancedSettingsWidget*>(this));
5686
+    return QWidget::qt_metacast(_clname);
5687
+}
5688
+
5689
+int AdvancedSettingsWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
5690
+{
5691
+    _id = QWidget::qt_metacall(_c, _id, _a);
5692
+    if (_id < 0)
5693
+        return _id;
5694
+    if (_c == QMetaObject::InvokeMetaMethod) {
5695
+        if (_id < 1)
5696
+            qt_static_metacall(this, _c, _id, _a);
5697
+        _id -= 1;
5698
+    }
5699
+    return _id;
5700
+}
5628
 static const uint qt_meta_data_ModbusRTUDevice[] = {
5701
 static const uint qt_meta_data_ModbusRTUDevice[] = {
5629
 
5702
 
5630
  // content:
5703
  // content:
5631
        6,       // revision
5704
        6,       // revision
5632
        0,       // classname
5705
        0,       // classname
5633
        0,    0, // classinfo
5706
        0,    0, // classinfo
5634
-      17,   14, // methods
5707
+      18,   14, // methods
5635
        0,    0, // properties
5708
        0,    0, // properties
5636
        0,    0, // enums/sets
5709
        0,    0, // enums/sets
5637
        0,    0, // constructors
5710
        0,    0, // constructors
5655
      262,   16,   16,   16, 0x08,
5728
      262,   16,   16,   16, 0x08,
5656
      283,  152,   16,   16, 0x08,
5729
      283,  152,   16,   16, 0x08,
5657
      305,  152,   16,   16, 0x08,
5730
      305,  152,   16,   16, 0x08,
5731
+     324,   16,   16,   16, 0x08,
5658
 
5732
 
5659
  // methods: signature, parameters, type, tag, flags
5733
  // methods: signature, parameters, type, tag, flags
5660
-     331,   16,  324,   16, 0x02,
5661
-     341,   16,  324,   16, 0x02,
5662
-     355,   16,  351,   16, 0x02,
5734
+     341,   16,  334,   16, 0x02,
5735
+     351,   16,  334,   16, 0x02,
5736
+     365,   16,  361,   16, 0x02,
5663
 
5737
 
5664
        0        // eod
5738
        0        // eod
5665
 };
5739
 };
5673
     "unitResponse(QByteArray)\0"
5747
     "unitResponse(QByteArray)\0"
5674
     "svlResponse(QByteArray)\0svuResponse(QByteArray)\0"
5748
     "svlResponse(QByteArray)\0svuResponse(QByteArray)\0"
5675
     "requestMeasurement()\0mResponse(QByteArray)\0"
5749
     "requestMeasurement()\0mResponse(QByteArray)\0"
5676
-    "ignore(QByteArray)\0double\0SVLower()\0"
5677
-    "SVUpper()\0int\0decimals()\0"
5750
+    "ignore(QByteArray)\0timeout()\0double\0"
5751
+    "SVLower()\0SVUpper()\0int\0decimals()\0"
5678
 };
5752
 };
5679
 
5753
 
5680
 void ModbusRTUDevice::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
5754
 void ModbusRTUDevice::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
5697
         case 11: _t->requestMeasurement(); break;
5771
         case 11: _t->requestMeasurement(); break;
5698
         case 12: _t->mResponse((*reinterpret_cast< QByteArray(*)>(_a[1]))); break;
5772
         case 12: _t->mResponse((*reinterpret_cast< QByteArray(*)>(_a[1]))); break;
5699
         case 13: _t->ignore((*reinterpret_cast< QByteArray(*)>(_a[1]))); break;
5773
         case 13: _t->ignore((*reinterpret_cast< QByteArray(*)>(_a[1]))); break;
5700
-        case 14: { double _r = _t->SVLower();
5774
+        case 14: _t->timeout(); break;
5775
+        case 15: { double _r = _t->SVLower();
5701
             if (_a[0]) *reinterpret_cast< double*>(_a[0]) = _r; }  break;
5776
             if (_a[0]) *reinterpret_cast< double*>(_a[0]) = _r; }  break;
5702
-        case 15: { double _r = _t->SVUpper();
5777
+        case 16: { double _r = _t->SVUpper();
5703
             if (_a[0]) *reinterpret_cast< double*>(_a[0]) = _r; }  break;
5778
             if (_a[0]) *reinterpret_cast< double*>(_a[0]) = _r; }  break;
5704
-        case 16: { int _r = _t->decimals();
5779
+        case 17: { int _r = _t->decimals();
5705
             if (_a[0]) *reinterpret_cast< int*>(_a[0]) = _r; }  break;
5780
             if (_a[0]) *reinterpret_cast< int*>(_a[0]) = _r; }  break;
5706
         default: ;
5781
         default: ;
5707
         }
5782
         }
5740
     if (_id < 0)
5815
     if (_id < 0)
5741
         return _id;
5816
         return _id;
5742
     if (_c == QMetaObject::InvokeMetaMethod) {
5817
     if (_c == QMetaObject::InvokeMetaMethod) {
5743
-        if (_id < 17)
5818
+        if (_id < 18)
5744
             qt_static_metacall(this, _c, _id, _a);
5819
             qt_static_metacall(this, _c, _id, _a);
5745
-        _id -= 17;
5820
+        _id -= 18;
5746
     }
5821
     }
5747
     return _id;
5822
     return _id;
5748
 }
5823
 }
6261
 {
6336
 {
6262
     QMetaObject::activate(this, &staticMetaObject, 3, 0);
6337
     QMetaObject::activate(this, &staticMetaObject, 3, 0);
6263
 }
6338
 }
6339
+static const uint qt_meta_data_PhidgetsTemperatureSensorConfWidget[] = {
6340
+
6341
+ // content:
6342
+       6,       // revision
6343
+       0,       // classname
6344
+       0,    0, // classinfo
6345
+       2,   14, // methods
6346
+       0,    0, // properties
6347
+       0,    0, // enums/sets
6348
+       1,   24, // constructors
6349
+       0,       // flags
6350
+       0,       // signalCount
6351
+
6352
+ // slots: signature, parameters, type, tag, flags
6353
+      37,   36,   36,   36, 0x08,
6354
+      53,   50,   36,   36, 0x08,
6355
+
6356
+ // constructors: signature, parameters, type, tag, flags
6357
+      81,   69,   36,   36, 0x0e,
6358
+
6359
+       0        // eod
6360
+};
6361
+
6362
+static const char qt_meta_stringdata_PhidgetsTemperatureSensorConfWidget[] = {
6363
+    "PhidgetsTemperatureSensorConfWidget\0"
6364
+    "\0addChannel()\0ms\0updateRate(int)\0"
6365
+    "model,index\0"
6366
+    "PhidgetsTemperatureSensorConfWidget(DeviceTreeModel*,QModelIndex)\0"
6367
+};
6368
+
6369
+void PhidgetsTemperatureSensorConfWidget::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
6370
+{
6371
+    if (_c == QMetaObject::CreateInstance) {
6372
+        switch (_id) {
6373
+        case 0: { PhidgetsTemperatureSensorConfWidget *_r = new PhidgetsTemperatureSensorConfWidget((*reinterpret_cast< DeviceTreeModel*(*)>(_a[1])),(*reinterpret_cast< const QModelIndex(*)>(_a[2])));
6374
+            if (_a[0]) *reinterpret_cast<QObject**>(_a[0]) = _r; } break;
6375
+        }
6376
+    } else if (_c == QMetaObject::InvokeMetaMethod) {
6377
+        Q_ASSERT(staticMetaObject.cast(_o));
6378
+        PhidgetsTemperatureSensorConfWidget *_t = static_cast<PhidgetsTemperatureSensorConfWidget *>(_o);
6379
+        switch (_id) {
6380
+        case 0: _t->addChannel(); break;
6381
+        case 1: _t->updateRate((*reinterpret_cast< int(*)>(_a[1]))); break;
6382
+        default: ;
6383
+        }
6384
+    }
6385
+}
6386
+
6387
+const QMetaObjectExtraData PhidgetsTemperatureSensorConfWidget::staticMetaObjectExtraData = {
6388
+    0,  qt_static_metacall 
6389
+};
6390
+
6391
+const QMetaObject PhidgetsTemperatureSensorConfWidget::staticMetaObject = {
6392
+    { &BasicDeviceConfigurationWidget::staticMetaObject, qt_meta_stringdata_PhidgetsTemperatureSensorConfWidget,
6393
+      qt_meta_data_PhidgetsTemperatureSensorConfWidget, &staticMetaObjectExtraData }
6394
+};
6395
+
6396
+#ifdef Q_NO_DATA_RELOCATION
6397
+const QMetaObject &PhidgetsTemperatureSensorConfWidget::getStaticMetaObject() { return staticMetaObject; }
6398
+#endif //Q_NO_DATA_RELOCATION
6399
+
6400
+const QMetaObject *PhidgetsTemperatureSensorConfWidget::metaObject() const
6401
+{
6402
+    return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
6403
+}
6404
+
6405
+void *PhidgetsTemperatureSensorConfWidget::qt_metacast(const char *_clname)
6406
+{
6407
+    if (!_clname) return 0;
6408
+    if (!strcmp(_clname, qt_meta_stringdata_PhidgetsTemperatureSensorConfWidget))
6409
+        return static_cast<void*>(const_cast< PhidgetsTemperatureSensorConfWidget*>(this));
6410
+    return BasicDeviceConfigurationWidget::qt_metacast(_clname);
6411
+}
6412
+
6413
+int PhidgetsTemperatureSensorConfWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
6414
+{
6415
+    _id = BasicDeviceConfigurationWidget::qt_metacall(_c, _id, _a);
6416
+    if (_id < 0)
6417
+        return _id;
6418
+    if (_c == QMetaObject::InvokeMetaMethod) {
6419
+        if (_id < 2)
6420
+            qt_static_metacall(this, _c, _id, _a);
6421
+        _id -= 2;
6422
+    }
6423
+    return _id;
6424
+}
6425
+static const uint qt_meta_data_PhidgetTemperatureSensorChannelConfWidget[] = {
6426
+
6427
+ // content:
6428
+       6,       // revision
6429
+       0,       // classname
6430
+       0,    0, // classinfo
6431
+       4,   14, // methods
6432
+       0,    0, // properties
6433
+       0,    0, // enums/sets
6434
+       1,   34, // constructors
6435
+       0,       // flags
6436
+       0,       // signalCount
6437
+
6438
+ // slots: signature, parameters, type, tag, flags
6439
+      49,   43,   42,   42, 0x08,
6440
+      82,   75,   42,   42, 0x08,
6441
+     107,  101,   42,   42, 0x08,
6442
+     129,  121,   42,   42, 0x08,
6443
+
6444
+ // constructors: signature, parameters, type, tag, flags
6445
+     160,  148,   42,   42, 0x0e,
6446
+
6447
+       0        // eod
6448
+};
6449
+
6450
+static const char qt_meta_stringdata_PhidgetTemperatureSensorChannelConfWidget[] = {
6451
+    "PhidgetTemperatureSensorChannelConfWidget\0"
6452
+    "\0value\0updateColumnName(QString)\0"
6453
+    "hidden\0updateHidden(bool)\0index\0"
6454
+    "updateTC(int)\0channel\0updateChannel(int)\0"
6455
+    "model,index\0"
6456
+    "PhidgetTemperatureSensorChannelConfWidget(DeviceTreeModel*,QModelIndex"
6457
+    ")\0"
6458
+};
6459
+
6460
+void PhidgetTemperatureSensorChannelConfWidget::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
6461
+{
6462
+    if (_c == QMetaObject::CreateInstance) {
6463
+        switch (_id) {
6464
+        case 0: { PhidgetTemperatureSensorChannelConfWidget *_r = new PhidgetTemperatureSensorChannelConfWidget((*reinterpret_cast< DeviceTreeModel*(*)>(_a[1])),(*reinterpret_cast< const QModelIndex(*)>(_a[2])));
6465
+            if (_a[0]) *reinterpret_cast<QObject**>(_a[0]) = _r; } break;
6466
+        }
6467
+    } else if (_c == QMetaObject::InvokeMetaMethod) {
6468
+        Q_ASSERT(staticMetaObject.cast(_o));
6469
+        PhidgetTemperatureSensorChannelConfWidget *_t = static_cast<PhidgetTemperatureSensorChannelConfWidget *>(_o);
6470
+        switch (_id) {
6471
+        case 0: _t->updateColumnName((*reinterpret_cast< const QString(*)>(_a[1]))); break;
6472
+        case 1: _t->updateHidden((*reinterpret_cast< bool(*)>(_a[1]))); break;
6473
+        case 2: _t->updateTC((*reinterpret_cast< int(*)>(_a[1]))); break;
6474
+        case 3: _t->updateChannel((*reinterpret_cast< int(*)>(_a[1]))); break;
6475
+        default: ;
6476
+        }
6477
+    }
6478
+}
6479
+
6480
+const QMetaObjectExtraData PhidgetTemperatureSensorChannelConfWidget::staticMetaObjectExtraData = {
6481
+    0,  qt_static_metacall 
6482
+};
6483
+
6484
+const QMetaObject PhidgetTemperatureSensorChannelConfWidget::staticMetaObject = {
6485
+    { &BasicDeviceConfigurationWidget::staticMetaObject, qt_meta_stringdata_PhidgetTemperatureSensorChannelConfWidget,
6486
+      qt_meta_data_PhidgetTemperatureSensorChannelConfWidget, &staticMetaObjectExtraData }
6487
+};
6488
+
6489
+#ifdef Q_NO_DATA_RELOCATION
6490
+const QMetaObject &PhidgetTemperatureSensorChannelConfWidget::getStaticMetaObject() { return staticMetaObject; }
6491
+#endif //Q_NO_DATA_RELOCATION
6492
+
6493
+const QMetaObject *PhidgetTemperatureSensorChannelConfWidget::metaObject() const
6494
+{
6495
+    return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
6496
+}
6497
+
6498
+void *PhidgetTemperatureSensorChannelConfWidget::qt_metacast(const char *_clname)
6499
+{
6500
+    if (!_clname) return 0;
6501
+    if (!strcmp(_clname, qt_meta_stringdata_PhidgetTemperatureSensorChannelConfWidget))
6502
+        return static_cast<void*>(const_cast< PhidgetTemperatureSensorChannelConfWidget*>(this));
6503
+    return BasicDeviceConfigurationWidget::qt_metacast(_clname);
6504
+}
6505
+
6506
+int PhidgetTemperatureSensorChannelConfWidget::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
6507
+{
6508
+    _id = BasicDeviceConfigurationWidget::qt_metacall(_c, _id, _a);
6509
+    if (_id < 0)
6510
+        return _id;
6511
+    if (_c == QMetaObject::InvokeMetaMethod) {
6512
+        if (_id < 4)
6513
+            qt_static_metacall(this, _c, _id, _a);
6514
+        _id -= 4;
6515
+    }
6516
+    return _id;
6517
+}
6518
+static const uint qt_meta_data_PhidgetsTemperatureSensor[] = {
6519
+
6520
+ // content:
6521
+       6,       // revision
6522
+       0,       // classname
6523
+       0,    0, // classinfo
6524
+       7,   14, // methods
6525
+       0,    0, // properties
6526
+       0,    0, // enums/sets
6527
+       1,   49, // constructors
6528
+       0,       // flags
6529
+       0,       // signalCount
6530
+
6531
+ // slots: signature, parameters, type, tag, flags
6532
+      27,   26,   26,   26, 0x0a,
6533
+      35,   26,   26,   26, 0x0a,
6534
+      42,   26,   26,   26, 0x08,
6535
+
6536
+ // methods: signature, parameters, type, tag, flags
6537
+      64,   26,   60,   26, 0x02,
6538
+      92,   84,   79,   26, 0x02,
6539
+     121,   84,  113,   26, 0x02,
6540
+     144,   84,  113,   26, 0x02,
6541
+
6542
+ // constructors: signature, parameters, type, tag, flags
6543
+     182,  170,   26,   26, 0x0e,
6544
+
6545
+       0        // eod
6546
+};
6547
+
6548
+static const char qt_meta_stringdata_PhidgetsTemperatureSensor[] = {
6549
+    "PhidgetsTemperatureSensor\0\0start()\0"
6550
+    "stop()\0getMeasurements()\0int\0"
6551
+    "channelCount()\0bool\0channel\0"
6552
+    "isChannelHidden(int)\0QString\0"
6553
+    "channelColumnName(int)\0channelIndicatorText(int)\0"
6554
+    "deviceIndex\0PhidgetsTemperatureSensor(QModelIndex)\0"
6555
+};
6556
+
6557
+void PhidgetsTemperatureSensor::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a)
6558
+{
6559
+    if (_c == QMetaObject::CreateInstance) {
6560
+        switch (_id) {
6561
+        case 0: { PhidgetsTemperatureSensor *_r = new PhidgetsTemperatureSensor((*reinterpret_cast< const QModelIndex(*)>(_a[1])));
6562
+            if (_a[0]) *reinterpret_cast<QObject**>(_a[0]) = _r; } break;
6563
+        }
6564
+    } else if (_c == QMetaObject::InvokeMetaMethod) {
6565
+        Q_ASSERT(staticMetaObject.cast(_o));
6566
+        PhidgetsTemperatureSensor *_t = static_cast<PhidgetsTemperatureSensor *>(_o);
6567
+        switch (_id) {
6568
+        case 0: _t->start(); break;
6569
+        case 1: _t->stop(); break;
6570
+        case 2: _t->getMeasurements(); break;
6571
+        case 3: { int _r = _t->channelCount();
6572
+            if (_a[0]) *reinterpret_cast< int*>(_a[0]) = _r; }  break;
6573
+        case 4: { bool _r = _t->isChannelHidden((*reinterpret_cast< int(*)>(_a[1])));
6574
+            if (_a[0]) *reinterpret_cast< bool*>(_a[0]) = _r; }  break;
6575
+        case 5: { QString _r = _t->channelColumnName((*reinterpret_cast< int(*)>(_a[1])));
6576
+            if (_a[0]) *reinterpret_cast< QString*>(_a[0]) = _r; }  break;
6577
+        case 6: { QString _r = _t->channelIndicatorText((*reinterpret_cast< int(*)>(_a[1])));
6578
+            if (_a[0]) *reinterpret_cast< QString*>(_a[0]) = _r; }  break;
6579
+        default: ;
6580
+        }
6581
+    }
6582
+}
6583
+
6584
+const QMetaObjectExtraData PhidgetsTemperatureSensor::staticMetaObjectExtraData = {
6585
+    0,  qt_static_metacall 
6586
+};
6587
+
6588
+const QMetaObject PhidgetsTemperatureSensor::staticMetaObject = {
6589
+    { &QObject::staticMetaObject, qt_meta_stringdata_PhidgetsTemperatureSensor,
6590
+      qt_meta_data_PhidgetsTemperatureSensor, &staticMetaObjectExtraData }
6591
+};
6592
+
6593
+#ifdef Q_NO_DATA_RELOCATION
6594
+const QMetaObject &PhidgetsTemperatureSensor::getStaticMetaObject() { return staticMetaObject; }
6595
+#endif //Q_NO_DATA_RELOCATION
6596
+
6597
+const QMetaObject *PhidgetsTemperatureSensor::metaObject() const
6598
+{
6599
+    return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject;
6600
+}
6601
+
6602
+void *PhidgetsTemperatureSensor::qt_metacast(const char *_clname)
6603
+{
6604
+    if (!_clname) return 0;
6605
+    if (!strcmp(_clname, qt_meta_stringdata_PhidgetsTemperatureSensor))
6606
+        return static_cast<void*>(const_cast< PhidgetsTemperatureSensor*>(this));
6607
+    return QObject::qt_metacast(_clname);
6608
+}
6609
+
6610
+int PhidgetsTemperatureSensor::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
6611
+{
6612
+    _id = QObject::qt_metacall(_c, _id, _a);
6613
+    if (_id < 0)
6614
+        return _id;
6615
+    if (_c == QMetaObject::InvokeMetaMethod) {
6616
+        if (_id < 7)
6617
+            qt_static_metacall(this, _c, _id, _a);
6618
+        _id -= 7;
6619
+    }
6620
+    return _id;
6621
+}
6264
 static const uint qt_meta_data_LinearSplineInterpolationConfWidget[] = {
6622
 static const uint qt_meta_data_LinearSplineInterpolationConfWidget[] = {
6265
 
6623
 
6266
  // content:
6624
  // content:

+ 1164
- 435
src/qrc_resources.cpp
File diff suppressed because it is too large
View File


+ 6
- 6
src/scale.cpp View File

1
-/*869:*/
1
+/*964:*/
2
 #line 131 "./scales.w"
2
 #line 131 "./scales.w"
3
 
3
 
4
 #include "scale.h"
4
 #include "scale.h"
10
 connect(this,SIGNAL(readyRead()),this,SLOT(dataAvailable()));
10
 connect(this,SIGNAL(readyRead()),this,SLOT(dataAvailable()));
11
 }
11
 }
12
 
12
 
13
-/*:869*//*870:*/
13
+/*:964*//*965:*/
14
 #line 149 "./scales.w"
14
 #line 149 "./scales.w"
15
 
15
 
16
 void SerialScale::dataAvailable()
16
 void SerialScale::dataAvailable()
24
 }
24
 }
25
 else
25
 else
26
 {
26
 {
27
-/*871:*/
27
+/*966:*/
28
 #line 189 "./scales.w"
28
 #line 189 "./scales.w"
29
 
29
 
30
 QStringList responseParts= QString(responseBuffer.simplified()).split(' ');
30
 QStringList responseParts= QString(responseBuffer.simplified()).split(' ');
53
 }
53
 }
54
 emit newMeasurement(weight,unit);
54
 emit newMeasurement(weight,unit);
55
 
55
 
56
-/*:871*/
56
+/*:966*/
57
 #line 161 "./scales.w"
57
 #line 161 "./scales.w"
58
 
58
 
59
 responseBuffer.clear();
59
 responseBuffer.clear();
61
 }
61
 }
62
 }
62
 }
63
 
63
 
64
-/*:870*//*872:*/
64
+/*:965*//*967:*/
65
 #line 220 "./scales.w"
65
 #line 220 "./scales.w"
66
 
66
 
67
 void SerialScale::tare()
67
 void SerialScale::tare()
74
 write("!KP\x0D");
74
 write("!KP\x0D");
75
 }
75
 }
76
 
76
 
77
-/*:872*/
77
+/*:967*/

+ 2
- 2
src/scale.h View File

1
-/*868:*/
1
+/*963:*/
2
 #line 103 "./scales.w"
2
 #line 103 "./scales.w"
3
 
3
 
4
 #ifndef TypicaScaleInclude
4
 #ifndef TypicaScaleInclude
25
 
25
 
26
 #endif
26
 #endif
27
 
27
 
28
-/*:868*/
28
+/*:963*/

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


+ 6
- 6
src/units.cpp View File

1
-/*226:*/
1
+/*253:*/
2
 #line 42 "./units.w"
2
 #line 42 "./units.w"
3
 
3
 
4
 #include "units.h"
4
 #include "units.h"
5
 
5
 
6
-/*:226*//*227:*/
6
+/*:253*//*254:*/
7
 #line 52 "./units.w"
7
 #line 52 "./units.w"
8
 
8
 
9
 bool Units::isTemperatureUnit(Unit unit)
9
 bool Units::isTemperatureUnit(Unit unit)
14
 unit==Rankine);
14
 unit==Rankine);
15
 }
15
 }
16
 
16
 
17
-/*:227*//*228:*/
17
+/*:254*//*255:*/
18
 #line 70 "./units.w"
18
 #line 70 "./units.w"
19
 
19
 
20
 double Units::convertTemperature(double value,Unit fromUnit,Unit toUnit)
20
 double Units::convertTemperature(double value,Unit fromUnit,Unit toUnit)
100
 return 0;
100
 return 0;
101
 }
101
 }
102
 
102
 
103
-/*:228*//*229:*/
103
+/*:255*//*256:*/
104
 #line 156 "./units.w"
104
 #line 156 "./units.w"
105
 
105
 
106
 double Units::convertRelativeTemperature(double value,Unit fromUnit,Unit toUnit)
106
 double Units::convertRelativeTemperature(double value,Unit fromUnit,Unit toUnit)
198
 return 0;
198
 return 0;
199
 }
199
 }
200
 
200
 
201
-/*:229*//*230:*/
201
+/*:256*//*257:*/
202
 #line 254 "./units.w"
202
 #line 254 "./units.w"
203
 
203
 
204
 double Units::convertWeight(double value,Unit fromUnit,Unit toUnit)
204
 double Units::convertWeight(double value,Unit fromUnit,Unit toUnit)
303
 unit==Gram);
303
 unit==Gram);
304
 }
304
 }
305
 
305
 
306
-/*:230*/
306
+/*:257*/

+ 2
- 2
src/units.h View File

1
-/*225:*/
1
+/*252:*/
2
 #line 8 "./units.w"
2
 #line 8 "./units.w"
3
 
3
 
4
 #include <QObject> 
4
 #include <QObject> 
32
 
32
 
33
 #endif
33
 #endif
34
 
34
 
35
-/*:225*/
35
+/*:252*/

+ 9
- 9
src/webelement.cpp View File

1
-/*513:*/
2
-#line 365 "./webview.w"
1
+/*546:*/
2
+#line 368 "./webview.w"
3
 
3
 
4
 #include "webelement.h"
4
 #include "webelement.h"
5
 
5
 
6
-/*511:*/
7
-#line 308 "./webview.w"
6
+/*544:*/
7
+#line 311 "./webview.w"
8
 
8
 
9
 TypicaWebElement::TypicaWebElement(QWebElement element):e(element)
9
 TypicaWebElement::TypicaWebElement(QWebElement element):e(element)
10
 {
10
 {
11
 
11
 
12
 }
12
 }
13
 
13
 
14
-/*:511*//*512:*/
15
-#line 317 "./webview.w"
14
+/*:544*//*545:*/
15
+#line 320 "./webview.w"
16
 
16
 
17
 void TypicaWebElement::appendInside(const QString&markup)
17
 void TypicaWebElement::appendInside(const QString&markup)
18
 {
18
 {
59
 e.setPlainText(text);
59
 e.setPlainText(text);
60
 }
60
 }
61
 
61
 
62
-/*:512*/
63
-#line 368 "./webview.w"
62
+/*:545*/
63
+#line 371 "./webview.w"
64
 
64
 
65
 
65
 
66
-/*:513*/
66
+/*:546*/

+ 3
- 3
src/webelement.h View File

1
-/*506:*/
2
-#line 245 "./webview.w"
1
+/*539:*/
2
+#line 248 "./webview.w"
3
 
3
 
4
 #include <QWebElement> 
4
 #include <QWebElement> 
5
 #include <QObject> 
5
 #include <QObject> 
27
 
27
 
28
 #endif
28
 #endif
29
 
29
 
30
-/*:506*/
30
+/*:539*/

+ 24
- 22
src/webview.cpp View File

1
-/*491:*/
2
-#line 49 "./webview.w"
1
+/*524:*/
2
+#line 50 "./webview.w"
3
 
3
 
4
 #include "webview.h"
4
 #include "webview.h"
5
 
5
 
6
-/*492:*/
7
-#line 56 "./webview.w"
6
+/*525:*/
7
+#line 57 "./webview.w"
8
 
8
 
9
 TypicaWebView::TypicaWebView():QWebView()
9
 TypicaWebView::TypicaWebView():QWebView()
10
 {
10
 {
12
 connect(page(),SIGNAL(linkClicked(QUrl)),this,SLOT(linkDelegate(QUrl)));
12
 connect(page(),SIGNAL(linkClicked(QUrl)),this,SLOT(linkDelegate(QUrl)));
13
 }
13
 }
14
 
14
 
15
-/*:492*//*493:*/
16
-#line 72 "./webview.w"
15
+/*:525*//*526:*/
16
+#line 73 "./webview.w"
17
 
17
 
18
 void TypicaWebView::linkDelegate(const QUrl&url)
18
 void TypicaWebView::linkDelegate(const QUrl&url)
19
 {
19
 {
20
 if(url.scheme()=="typica")
20
 if(url.scheme()=="typica")
21
 {
21
 {
22
 QString address(url.toEncoded());
22
 QString address(url.toEncoded());
23
-/*494:*/
24
-#line 90 "./webview.w"
23
+/*527:*/
24
+#line 91 "./webview.w"
25
 
25
 
26
 if(address=="typica://aboutqt")
26
 if(address=="typica://aboutqt")
27
 {
27
 {
29
 return;
29
 return;
30
 }
30
 }
31
 
31
 
32
-/*:494*/
33
-#line 78 "./webview.w"
32
+/*:527*/
33
+#line 79 "./webview.w"
34
 
34
 
35
-/*495:*/
36
-#line 99 "./webview.w"
35
+/*528:*/
36
+#line 100 "./webview.w"
37
 
37
 
38
 if(address.startsWith("typica://script/"))
38
 if(address.startsWith("typica://script/"))
39
 {
39
 {
41
 return;
41
 return;
42
 }
42
 }
43
 
43
 
44
-/*:495*/
45
-#line 79 "./webview.w"
44
+/*:528*/
45
+#line 80 "./webview.w"
46
 
46
 
47
 }
47
 }
48
 else
48
 else
51
 }
51
 }
52
 }
52
 }
53
 
53
 
54
-/*:493*//*496:*/
55
-#line 111 "./webview.w"
54
+/*:526*//*529:*/
55
+#line 112 "./webview.w"
56
 
56
 
57
 void TypicaWebView::load(const QString&url)
57
 void TypicaWebView::load(const QString&url)
58
 {
58
 {
76
 
76
 
77
 void TypicaWebView::setContent(QIODevice*device)
77
 void TypicaWebView::setContent(QIODevice*device)
78
 {
78
 {
79
+QSettings settings;
79
 device->reset();
80
 device->reset();
80
 QByteArray content= device->readAll();
81
 QByteArray content= device->readAll();
81
-QWebView::setContent(content,"application/xhtml+xml");
82
+QUrl baseDir= QUrl("file://"+settings.value("config").toString()+"/");
83
+QWebView::setContent(content,"application/xhtml+xml",baseDir);
82
 }
84
 }
83
 
85
 
84
 QString TypicaWebView::saveXml()
86
 QString TypicaWebView::saveXml()
86
 return page()->currentFrame()->documentElement().toOuterXml();
88
 return page()->currentFrame()->documentElement().toOuterXml();
87
 }
89
 }
88
 
90
 
89
-/*:496*//*502:*/
90
-#line 202 "./webview.w"
91
+/*:529*//*535:*/
92
+#line 205 "./webview.w"
91
 
93
 
92
 QWebElement TypicaWebView::documentElement()
94
 QWebElement TypicaWebView::documentElement()
93
 {
95
 {
99
 return page()->mainFrame()->findFirstElement(selector);
101
 return page()->mainFrame()->findFirstElement(selector);
100
 }
102
 }
101
 
103
 
102
-/*:502*/
103
-#line 52 "./webview.w"
104
+/*:535*/
105
+#line 53 "./webview.w"
104
 
106
 
105
 
107
 
106
-/*:491*/
108
+/*:524*/

+ 3
- 2
src/webview.h View File

1
-/*490:*/
1
+/*523:*/
2
 #line 14 "./webview.w"
2
 #line 14 "./webview.w"
3
 
3
 
4
 #include <QWebView> 
4
 #include <QWebView> 
9
 #include <QPrintDialog> 
9
 #include <QPrintDialog> 
10
 #include <QWebFrame> 
10
 #include <QWebFrame> 
11
 #include <QWebElement> 
11
 #include <QWebElement> 
12
+#include <QSettings> 
12
 
13
 
13
 #ifndef TypicaWebViewHeader
14
 #ifndef TypicaWebViewHeader
14
 #define TypicaWebViewHeader
15
 #define TypicaWebViewHeader
33
 
34
 
34
 #endif
35
 #endif
35
 
36
 
36
-/*:490*/
37
+/*:523*/

Loading…
Cancel
Save