|
@@ -746,11 +746,17 @@ undertaking to distribute a binary created from this code, you may want to
|
746
|
746
|
either determine your rights with regard to these libraries or modify the
|
747
|
747
|
program to remove them.
|
748
|
748
|
|
749
|
|
-The following is an overview of the structure of \pn:
|
750
|
|
-
|
751
|
|
-@d PROGRAM_NAME "Typica"
|
|
749
|
+As CWEB generates files with the wrong extension, we leave the default
|
|
750
|
+generated file empty.
|
752
|
751
|
|
753
|
752
|
@c
|
|
753
|
+/* Nothing to see here. */
|
|
754
|
+
|
|
755
|
+@ The following is an overview of the structure of \pn:
|
|
756
|
+
|
|
757
|
+@(typica.cpp@>=
|
|
758
|
+#define PROGRAM_NAME "Typica"
|
|
759
|
+
|
754
|
760
|
@<Header files to include@>@/
|
755
|
761
|
@<Class declarations@>@/
|
756
|
762
|
@<Function prototypes for scripting@>@/
|
|
@@ -7909,6 +7915,8 @@ of line items is initialized when the second measurement is taken. Subsequent
|
7909
|
7915
|
measurements are able to simply append new line segments to the list.
|
7910
|
7916
|
|
7911
|
7917
|
@<GraphView Implementation@>=
|
|
7918
|
+#define FULLTIMETOINT(t) (t.msec() + (t.second() * 1000) + (t.minute() * 60 * 1000))
|
|
7919
|
+
|
7912
|
7920
|
void GraphView::newMeasurement(Measurement measure, int tempcolumn)@/
|
7913
|
7921
|
{@/
|
7914
|
7922
|
double offset = 0;
|
|
@@ -7954,8 +7962,6 @@ even with the minor data loss below.
|
7954
|
7962
|
|
7955
|
7963
|
In the case of the first measurement,
|
7956
|
7964
|
|
7957
|
|
-@d FULLTIMETOINT(t) (t.msec() + (t.second() * 1000) + (t.minute() * 60 * 1000))
|
7958
|
|
-
|
7959
|
7965
|
@<Handle the first measurement@>=
|
7960
|
7966
|
int x = FULLTIMETOINT(measure.time())/1000;
|
7961
|
7967
|
prevPoints->insert(tempcolumn, QPointF(x, measure.temperature()));
|
|
@@ -9910,9 +9916,9 @@ if(nt != s)
|
9910
|
9916
|
number of seconds in a base time, and the difference between the two. The
|
9911
|
9917
|
value loaded into oseconds could probably be cached.
|
9912
|
9918
|
|
9913
|
|
-@d TIMETOINT(t) ((t.hour() * 60 * 60) + (t.minute() * 60) + (t.second()))
|
9914
|
|
-
|
9915
|
9919
|
@<Load seconds since base time into r@>=
|
|
9920
|
+#define TIMETOINT(t) ((t.hour() * 60 * 60) + (t.minute() * 60) + (t.second()))
|
|
9921
|
+
|
9916
|
9922
|
time = QTime::currentTime();
|
9917
|
9923
|
cseconds = TIMETOINT(time);
|
9918
|
9924
|
oseconds = TIMETOINT(relative);
|
|
@@ -9951,9 +9957,9 @@ if(time != s)
|
9951
|
9957
|
timer starts. The clock that triggers time updates must also be started. The
|
9952
|
9958
|
timer also needs to reset its value if that behavior is desired.
|
9953
|
9959
|
|
9954
|
|
-@d TIMESUBTRACT(t1, t2) (t1.addSecs(-(TIMETOINT(t2))).addMSecs(-t2.msec()))
|
9955
|
|
-
|
9956
|
9960
|
@<TimerDisplay Implementation@>=
|
|
9961
|
+#define TIMESUBTRACT(t1, t2) (t1.addSecs(-(TIMETOINT(t2))).addSecs(-t2.msec()))
|
|
9962
|
+
|
9957
|
9963
|
void TimerDisplay::startTimer()@t\2\2@>@/
|
9958
|
9964
|
{@t\1@>@/
|
9959
|
9965
|
if(!running)@/
|
|
@@ -11676,9 +11682,9 @@ setting up the settings object and localization in addition to the normal
|
11676
|
11682
|
responsibilities of |QApplication|. In addition to declaring the class, we also
|
11677
|
11683
|
define a macro that returns the |Application| instance.
|
11678
|
11684
|
|
11679
|
|
-@d AppInstance (qobject_cast<@[Application *@]>(qApp))
|
11680
|
|
-
|
11681
|
11685
|
@<Class declarations@>=
|
|
11686
|
+#define AppInstance (qobject_cast<@[Application *@]>(qApp))
|
|
11687
|
+
|
11682
|
11688
|
class NodeInserter;
|
11683
|
11689
|
class DeviceTreeModel;
|
11684
|
11690
|
class Application : public QApplication@/
|