Browse Source

Merge branch 'aboutbox' into development

Neal Wilson 11 years ago
parent
commit
fa25e09fa1
12 changed files with 2515 additions and 1992 deletions
  1. 30
    26
      src/Typica.pro
  2. 51
    0
      src/abouttypica.cpp
  3. 25
    0
      src/abouttypica.h
  4. 82
    0
      src/abouttypica.w
  5. 35
    0
      src/helpmenu.cpp
  6. 20
    0
      src/helpmenu.h
  7. 67
    0
      src/helpmenu.w
  8. 3
    0
      src/resources.qrc
  9. 132
    0
      src/resources/html/about.html
  10. 36
    0
      src/resources/html/style.css
  11. 1989
    1958
      src/typica.cpp
  12. 45
    8
      src/typica.w

+ 30
- 26
src/Typica.pro View File

@@ -1,26 +1,30 @@
1
-######################################################################
2
-# Automatically generated by qmake (2.01a) Sat May 23 23:41:13 2009
3
-######################################################################
4
-
5
-QT += script
6
-QT += xml
7
-QT += sql
8
-QT += xmlpatterns
9
-QT += scripttools
10
-QT += webkit
11
-
12
-include(3rdparty/qextserialport/src/qextserialport.pri)
13
-
14
-TEMPLATE = app
15
-TARGET = 
16
-DEPENDPATH += .
17
-
18
-# Input
19
-HEADERS += moc_typica.cpp
20
-SOURCES += typica.cpp
21
-
22
-RESOURCES += \
23
-    resources.qrc
24
-
25
-RC_FILE = typica.rc
26
-ICON = resources/icons/appicons/logo.icns
1
+######################################################################
2
+# Automatically generated by qmake (2.01a) Sat May 23 23:41:13 2009
3
+######################################################################
4
+
5
+QT += script
6
+QT += xml
7
+QT += sql
8
+QT += xmlpatterns
9
+QT += scripttools
10
+QT += webkit
11
+
12
+include(3rdparty/qextserialport/src/qextserialport.pri)
13
+
14
+TEMPLATE = app
15
+TARGET = 
16
+DEPENDPATH += .
17
+
18
+# Input
19
+HEADERS += moc_typica.cpp \
20
+    helpmenu.h \
21
+    abouttypica.h
22
+SOURCES += typica.cpp \
23
+    helpmenu.cpp \
24
+    abouttypica.cpp
25
+
26
+RESOURCES += \
27
+    resources.qrc
28
+
29
+RC_FILE = typica.rc
30
+ICON = resources/icons/appicons/logo.icns

+ 51
- 0
src/abouttypica.cpp View File

@@ -0,0 +1,51 @@
1
+/*224:*/
2
+#line 36 "./abouttypica.w"
3
+
4
+#include "abouttypica.h"
5
+
6
+/*225:*/
7
+#line 45 "./abouttypica.w"
8
+
9
+AboutTypica::AboutTypica():QMainWindow(NULL)
10
+{
11
+QFile aboutFile(":/resources/html/about.html");
12
+aboutFile.open(QIODevice::ReadOnly);
13
+QByteArray content= aboutFile.readAll();
14
+QWebView*banner= new QWebView;
15
+banner->setHtml(content,QUrl("qrc:/resources/html/about.html"));
16
+aboutFile.close();
17
+setCentralWidget(banner);
18
+QWebPage*page= banner->page();
19
+page->setLinkDelegationPolicy(QWebPage::DelegateExternalLinks);
20
+connect(page,SIGNAL(linkClicked(QUrl)),this,SLOT(linkClicked(QUrl)));
21
+}
22
+
23
+/*:225*//*226:*/
24
+#line 63 "./abouttypica.w"
25
+
26
+void AboutTypica::linkClicked(const QUrl&url)
27
+{
28
+if(url.scheme()=="typica")
29
+{
30
+QString address(url.toEncoded());
31
+if(address=="typica://aboutqt")
32
+{
33
+QMessageBox::aboutQt(this);
34
+}
35
+else
36
+{
37
+qDebug()<<"Unexpected link. Got: "<<address;
38
+}
39
+}
40
+else
41
+{
42
+QDesktopServices::openUrl(url);
43
+}
44
+}
45
+#line 5656 "./typica.w"
46
+
47
+/*:226*/
48
+#line 39 "./abouttypica.w"
49
+
50
+
51
+/*:224*/

+ 25
- 0
src/abouttypica.h View File

@@ -0,0 +1,25 @@
1
+/*223:*/
2
+#line 12 "./abouttypica.w"
3
+
4
+#include <QMainWindow> 
5
+#include <QWebView> 
6
+#include <QFile> 
7
+#include <QtDebug> 
8
+#include <QMessageBox> 
9
+#include <QDesktopServices> 
10
+
11
+#ifndef AboutTypicaHeader
12
+#define AboutTypicaHeader
13
+
14
+class AboutTypica:public QMainWindow
15
+{
16
+Q_OBJECT
17
+public:
18
+AboutTypica();
19
+public slots:
20
+void linkClicked(const QUrl&url);
21
+};
22
+
23
+#endif
24
+
25
+/*:223*/

+ 82
- 0
src/abouttypica.w View File

@@ -0,0 +1,82 @@
1
+@** A Window for Displaying Information About Typica.
2
+
3
+\noindent The About window for an application typically displays a few pieces
4
+of information: The application logo, name, and version number, copyright and
5
+license information, and other assorted information. In Typica this also
6
+includes a list of the people and companies that have provided financial
7
+assistance toward the ongoing development of the software and information that
8
+others can use to help in this way. Some of this information would benefit
9
+from existing as a link which can open an external application such as a web
10
+browser or email client.
11
+
12
+@(abouttypica.h@>=
13
+#include <QMainWindow>
14
+#include <QWebView>
15
+#include <QFile>
16
+#include <QtDebug>
17
+#include <QMessageBox>
18
+#include <QDesktopServices>
19
+
20
+#ifndef AboutTypicaHeader
21
+#define AboutTypicaHeader
22
+
23
+class AboutTypica : public QMainWindow
24
+{
25
+	Q_OBJECT
26
+	public:
27
+		AboutTypica();
28
+	public slots:
29
+		void linkClicked(const QUrl &url);
30
+};
31
+
32
+#endif
33
+
34
+@ The implementation is in a separate file.
35
+
36
+@(abouttypica.cpp@>=
37
+#include "abouttypica.h"
38
+
39
+@<AboutTypica implementation@>@;
40
+
41
+@ The information provided here comes from a set of HTML documents stored as
42
+compiled resources and presented in a set of |QWebView| instances accessible
43
+through a set of tabs.
44
+
45
+@<AboutTypica implementation@>=
46
+AboutTypica::AboutTypica() : QMainWindow(NULL)
47
+{
48
+	QFile aboutFile(":/resources/html/about.html");
49
+	aboutFile.open(QIODevice::ReadOnly);
50
+	QByteArray content = aboutFile.readAll();
51
+	QWebView *banner = new QWebView;
52
+ 	banner->setHtml(content, QUrl("qrc:/resources/html/about.html"));
53
+	aboutFile.close();
54
+	setCentralWidget(banner);
55
+	QWebPage *page = banner->page();
56
+	page->setLinkDelegationPolicy(QWebPage::DelegateExternalLinks);
57
+	connect(page, SIGNAL(linkClicked(QUrl)), this, SLOT(linkClicked(QUrl)));
58
+}
59
+
60
+@ In order to display the About Qt window, we detect a special URL from a link
61
+clicked in the about box.
62
+
63
+@<AboutTypica implementation@>=
64
+void AboutTypica::linkClicked(const QUrl &url)
65
+{
66
+	if(url.scheme() == "typica")
67
+	{
68
+		QString address(url.toEncoded());
69
+		if(address == "typica://aboutqt")
70
+		{
71
+			QMessageBox::aboutQt(this);
72
+		}
73
+		else
74
+		{
75
+			qDebug() << "Unexpected link. Got: " << address;
76
+		}
77
+	}
78
+	else
79
+	{
80
+		QDesktopServices::openUrl(url);
81
+	}
82
+}

+ 35
- 0
src/helpmenu.cpp View File

@@ -0,0 +1,35 @@
1
+/*168:*/
2
+#line 35 "./helpmenu.w"
3
+
4
+#include "helpmenu.h"
5
+#include "abouttypica.h"
6
+
7
+/*169:*/
8
+#line 47 "./helpmenu.w"
9
+
10
+HelpMenu::HelpMenu():QMenu()
11
+{
12
+setObjectName("helpMenu");
13
+setTitle(tr("Help"));
14
+QAction*aboutTypicaAction= new QAction(tr("About Typica"),this);
15
+aboutTypicaAction->setObjectName("aboutTypicaAction");
16
+addAction(aboutTypicaAction);
17
+connect(aboutTypicaAction,SIGNAL(triggered()),this,SLOT(displayAboutTypica()));
18
+}
19
+
20
+/*:169*//*170:*/
21
+#line 61 "./helpmenu.w"
22
+
23
+void HelpMenu::displayAboutTypica()
24
+{
25
+AboutTypica*aboutBox= new AboutTypica;
26
+aboutBox->show();
27
+}
28
+
29
+#line 4037 "./typica.w"
30
+
31
+/*:170*/
32
+#line 39 "./helpmenu.w"
33
+
34
+
35
+/*:168*/

+ 20
- 0
src/helpmenu.h View File

@@ -0,0 +1,20 @@
1
+/*167:*/
2
+#line 16 "./helpmenu.w"
3
+
4
+#include <QMenu> 
5
+
6
+#ifndef HelpMenuHeader
7
+#define HelpMenuHeader
8
+
9
+class HelpMenu:public QMenu
10
+{
11
+Q_OBJECT
12
+public:
13
+HelpMenu();
14
+public slots:
15
+void displayAboutTypica();
16
+};
17
+
18
+#endif
19
+
20
+/*:167*/

+ 67
- 0
src/helpmenu.w View File

@@ -0,0 +1,67 @@
1
+@* The Help Menu.
2
+
3
+\noindent Every window has a help menu that is inserted at the end of any
4
+configuration defined menus. At present this only serves to have a place to
5
+hold the "About Typica" menu item which brings up an appropriate about box, but
6
+there is the possibility that future developments will introduce other items
7
+that should be included in this menu.
8
+
9
+@<Insert help menu@>=
10
+HelpMenu *helpMenu = new HelpMenu();
11
+window->menuBar()->addMenu(helpMenu);
12
+
13
+@ Since the help menu is represented by its own class, we must have a
14
+declaration for that class. This is a trivial case.
15
+
16
+@(helpmenu.h@>=
17
+#include <QMenu>
18
+
19
+#ifndef HelpMenuHeader
20
+#define HelpMenuHeader
21
+
22
+class HelpMenu : public QMenu
23
+{
24
+	Q_OBJECT
25
+	public:
26
+		HelpMenu();
27
+	public slots:
28
+		void displayAboutTypica();
29
+};
30
+
31
+#endif
32
+
33
+@ Implementation is in a separate file.
34
+
35
+@(helpmenu.cpp@>=
36
+#include "helpmenu.h"
37
+#include "abouttypica.h"
38
+
39
+@<Help menu implementation@>@;
40
+
41
+@ The constructor sets an object name for the menu so scripts are able to look
42
+up the menu and add additional items. The "About Typica" menu item also has an
43
+object name which can be used to provide custom handling if this is desired.
44
+The |triggered()| signal from that item is immediately connected to a handler
45
+for displaying an about box.
46
+
47
+@<Help menu implementation@>=
48
+HelpMenu::HelpMenu() : QMenu()
49
+{
50
+	setObjectName("helpMenu");
51
+	setTitle(tr("Help"));
52
+	QAction *aboutTypicaAction = new QAction(tr("About Typica"), this);
53
+	aboutTypicaAction->setObjectName("aboutTypicaAction");
54
+	addAction(aboutTypicaAction);
55
+	connect(aboutTypicaAction, SIGNAL(triggered()), this, SLOT(displayAboutTypica()));
56
+}
57
+
58
+@ When "About Typica" is selected from the menu, we display an about box. This
59
+is also handled by a separate class.
60
+
61
+@<Help menu implementation@>=
62
+void HelpMenu::displayAboutTypica()
63
+{
64
+	AboutTypica *aboutBox = new AboutTypica;
65
+	aboutBox->show();
66
+}
67
+

+ 3
- 0
src/resources.qrc View File

@@ -11,5 +11,8 @@
11 11
         <file>resources/icons/tango/scalable/actions/list-remove.svg</file>
12 12
         <file>resources/icons/tango/index.theme</file>
13 13
         <file>resources/icons/appicons/logo.svg</file>
14
+        <file>resources/icons/appicons/logo96.png</file>
15
+        <file>resources/html/about.html</file>
16
+        <file>resources/html/style.css</file>
14 17
     </qresource>
15 18
 </RCC>

+ 132
- 0
src/resources/html/about.html View File

@@ -0,0 +1,132 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg.dtd">
2
+<html xmlns="http://www.w3.org/1999/xhtml">
3
+	<head>
4
+		<title>Typica - Data for Coffee Roasters</title>
5
+		<link rel="stylesheet" type="text/css" href="style.css" />
6
+	</head>
7
+	<body>
8
+		<div id="page">
9
+			<div id="topmatter">
10
+				<div id="topbanner">
11
+					<img src="../icons/appicons/logo96.png" height="96px" width="96px" alt="Typica logo" />
12
+					<h1>Typica</h1>
13
+					<h2>Version 1.5</h2>
14
+				</div>
15
+			<div id="maintext">
16
+				<p>Copyright &copy; 2007&ndash;2013 Neal Evan Wilson</p>
17
+				<h3>Special Thanks</h3>
18
+				<p>Ongoing development of Typica is made possible through the
19
+				generous financial contributions from the following:</p>
20
+				
21
+				<p>Pinnacle Coffee Roasting</p>
22
+				
23
+				<h3>Get Involved</h3>
24
+				<p>Typica has reached a point in its development where it can
25
+				be considered mature with a feature set appropriate for many
26
+				coffee roasting firms. There is, however, considerable variety
27
+				among roasting firms in the equipment used, roasting styles,
28
+				process traceability requirements, languages understood, and
29
+				other preferences. There is also still considerable room for
30
+				improvement in many areas. The development of Typica has been
31
+				on a budget of approximately $0, but software development is
32
+				not without cost. This is especially the case for cross
33
+				platform development of software that interfaces with external
34
+				hardware. These are some of the things that could be done with
35
+				additional funding:
36
+					<ul>
37
+						<li>Improve development and testing infrastructure.
38
+						This would allow more complete testing of release
39
+						candidates on all platforms and greatly increase the
40
+						quality and speed at which new releases could be made
41
+						available.</li>
42
+						<li>Purchase additional measurement devices. Interest
43
+						has been expressed in using many types of hardware not
44
+						currently supported in Typica. Some of these
45
+						suggestions are quite reasonable and the only reason I
46
+						am not able to include support for them is simply that
47
+						I do not have a sample of the hardware to test my code
48
+						against.</li>
49
+						<li>Pay for web hosting. While the Internet allows
50
+						free software to be distributed cheaply, this is not
51
+						without cost.</li>
52
+						<li>Allow more development time. As of this writing,
53
+						nobody has contributed any improvements to Typica's
54
+						program code. This has all been designed and written
55
+						by a single person working on it as time is available.
56
+						Many of the planned improvements require nothing beyond
57
+						time to plan an implementation, to write the program
58
+						code, to integrate it with the rest of the program, and
59
+						to test that the feature is sound. With sufficient
60
+						sustained funding it would be possible to devote more
61
+						time to continuing development, resulting in a more
62
+						rapid release of features and other improvements to
63
+						Typica.</li>
64
+					</ul>
65
+				</p>
66
+				<p>Financial assistance toward these ends can be sent (checks
67
+				payable in US dollars preferred) to:</p>
68
+				<p>Neal Wilson<br />
69
+				c/o Wilson's Coffee &amp; Tea<br />
70
+				3306 Washington Ave.<br />
71
+				Racine, WI 53405<br />
72
+				USA</p>
73
+				<p>All who contribute in this way will be thanked in the
74
+				Special Thanks section seen above in the next public release,
75
+				so please indicate if you would like to be identified by your
76
+				name, your company name, or in some other way. Anonymous
77
+				funding can also be made through <a href="https://www.gittip.com/N3Roaster/">Gittip</a>.</p>
78
+				<script data-gittip-username="N3Roaster" src="http://www.gittip.com/assets/widgets/0002.js"></script>
79
+				<h3>License Information</h3>
80
+				<p>Permission is hereby granted, free of charge, to any person
81
+				obtaining a copy of this software and associated documentation
82
+				files (the "Software"), to deal in the Software without
83
+				restriction, including without limitation the rights to use,
84
+				copy, modify, merge, publish, distribute, sublicense, and/or
85
+				sell copies of the Software, and to permit persons to whom the
86
+				Software is furnished to do so, subject to the following
87
+				conditions:</p>
88
+				<p>The above copyright notice and this permission notice shall
89
+				be included in all copies or substantial portions of the
90
+				Software.</p>
91
+				<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
92
+				KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
93
+				WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
94
+				AND NONNIFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
95
+				HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
96
+				WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
97
+				FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
98
+				OTHER DEALINGS IN THE SOFTWARE.</p>
99
+				<p>Parts of Typica are from
100
+				<a href="http://code.google.com/p/qextserialport/">QextSerialPort</a>
101
+				which is used under the MIT license as follows:</p>
102
+				<p>Copyright &copy; 2000&ndash;2003 Wayne Roth</p>
103
+				<p>Copyright &copy; 2004&ndash;2007 Stefan Sander</p>
104
+				<p>Copyright &copy; 2007 Michal Policht</p>
105
+				<p>Copyright &copy; 2008 Brandon Fosdick</p>
106
+				<p>Copyright &copy; 2009-2010 Liam Staskawicz</p>
107
+				<p>Copyright &copy; 2011 Debao Zhang</p>
108
+				<p>Permission is hereby granted, free of charge, to any person
109
+				obtaining a copy of this software and associated documentation
110
+				files (the "Software"), to deal in the Software without
111
+				restriction, including without limitation the rights to use,
112
+				copy, modify, merge, publish, distribute, sublicense, and/or
113
+				sell copies of the Software, and to permit persons to whom the
114
+				Software is furnished to do so, subject to the following
115
+				conditions:</p>
116
+				<p>The above copyright notice and this permission notice shall
117
+				be included in all copies or substantial portions of the
118
+				Software.</p>
119
+				<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
120
+				KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
121
+				WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
122
+				AND NONNIFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
123
+				HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
124
+				WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
125
+				FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
126
+				OTHER DEALINGS IN THE SOFTWARE.</p>
127
+				<p>Typica also makes use of the <a href="typica://aboutqt">Qt</a>
128
+				framework.</p>
129
+			</div>
130
+		</div>
131
+	</body>
132
+</html>

+ 36
- 0
src/resources/html/style.css View File

@@ -0,0 +1,36 @@
1
+body {
2
+	background-color: rgb(235,239,249);
3
+}
4
+#page {
5
+	background-color: rgb(255,255,255);
6
+}
7
+h1 {
8
+	font-size: 24px;
9
+}
10
+#topbanner {
11
+	background-color: rgb(235,239,249);
12
+	height: 96px;
13
+	margin-bottom: 2px;
14
+}
15
+#topbanner img {
16
+	float: left;
17
+}
18
+#topbanner h1 {
19
+	padding-top: 20px;
20
+	padding-bottom: 0px;
21
+	margin-bottom: 0px;
22
+}
23
+h2 {
24
+	font-size: 20px;
25
+	padding-top: 0px;
26
+	padding-bottom: 0px;
27
+	margin-top: 0px;
28
+}
29
+#topmatter {
30
+	background-color: rgb(235,239,249);
31
+}
32
+#maintext {
33
+	margin-left: 10px;
34
+	margin-right: 10px;
35
+	padding-bottom: 10px;
36
+}

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


+ 45
- 8
src/typica.w View File

@@ -848,6 +848,13 @@ various Qt modules.
848 848
 #include <QtXmlPatterns>
849 849
 #include <QtWebKit>
850 850
 
851
+@ New code is being written in separate files in a long term effort to improve
852
+organization of the code. The result of this is that some additional headers
853
+are required here.
854
+
855
+@<Header files to include@>=
856
+#include "helpmenu.h"
857
+
851 858
 @** The Scripting Engine.
852 859
 
853 860
 \noindent The main enhancement of \pn{} version 1.1 is the introduction of a
@@ -3900,14 +3907,8 @@ if(element.hasChildNodes())
3900 3907
 {
3901 3908
 	@<Process window children@>@;
3902 3909
 }
3903
-if(window)
3904
-{
3905
-	window->show();
3906
-}
3907
-else
3908
-{
3909
-	qDebug() << "Error! Window invalidated";
3910
-}
3910
+@<Insert help menu@>@;
3911
+window->show();
3911 3912
 
3912 3913
 @ Three element types make sense as top level children of a {\tt <window>}
3913 3914
 element. An element representing a layout element can be used to apply that
@@ -4032,6 +4033,8 @@ while(j < menuItems.count())
4032 4033
 	j++;
4033 4034
 }
4034 4035
 
4036
+@i helpmenu.w
4037
+
4035 4038
 @ A layout can contain a number of different elements including a variety of
4036 4039
 widget types and other layouts. This function is responsible for applying any
4037 4040
 layout class to the widget currently being populated and processing children of
@@ -5649,6 +5652,8 @@ QScriptValue QComboBox_findText(QScriptContext *context, QScriptEngine *engine)
5649 5652
 	return QScriptValue(engine, self->findText(argument<QString>(0, context)));
5650 5653
 }
5651 5654
 
5655
+@i abouttypica.w
5656
+
5652 5657
 @** A representation of temperature measurements.
5653 5658
 
5654 5659
 \noindent Most of the information in a roast log will be temperature
@@ -8171,6 +8176,7 @@ The first measurement is always added to each model.
8171 8176
 @<ZoomLog Implementation@>=
8172 8177
 void ZoomLog::newMeasurement(Measurement measure, int tempcolumn)
8173 8178
 {
8179
+	@<Synthesize measurements for slow hardware@>@;
8174 8180
 	model_ms->newMeasurement(measure, tempcolumn);
8175 8181
 	if(lastMeasurement.contains(tempcolumn))
8176 8182
 	{
@@ -8221,6 +8227,37 @@ foreach(m, modelSet)
8221 8227
 	m->newMeasurement(measure, tempcolumn);
8222 8228
 }
8223 8229
 
8230
+@ Some measurement hardware in use cannot guarantee delivery of at least one
8231
+measurement per second. This causes problems for the current |ZoomLog|
8232
+implementation as, for example, if there is no measurement at a time where
8233
+the seconds are divisible by 5, there will be no entry in that view. This can
8234
+result in situations where the |ZoomLog| at its default view of one measurement
8235
+every 30 seconds might not display any data at all aside from the first
8236
+measurement, the last measurement, and any measurement that happens to have an
8237
+annotation associated with it. The solution in this case is to synthesize
8238
+measurements so that the |ZoomLog| thinks it gets at least one measurement
8239
+every second.
8240
+
8241
+The current approach simply replicates the last measurement every second until
8242
+the time for the most recent measurement is reached, however it would likely be
8243
+better to interpolate values between the two most recent real measurements as
8244
+this would match the graphic representation rather than altering it when later
8245
+reviewing the batch.
8246
+
8247
+@<Synthesize measurements for slow hardware@>=
8248
+if(lastMeasurement[tempcolumn].time() < measure.time())
8249
+{
8250
+	QList<QTime> timelist;
8251
+	for(QTime i = lastMeasurement[tempcolumn].time().addSecs(1); i < measure.time(); i = i.addSecs(1))
8252
+	{
8253
+		timelist.append(i);
8254
+	}
8255
+	for(int i = 0; i < timelist.size(); i++)
8256
+	{
8257
+		newMeasurement(Measurement(measure.temperature(), timelist[i], measure.scale()), tempcolumn);
8258
+	}
8259
+}
8260
+
8224 8261
 @ New to \pn{} 1.4 is the concept of a current column set. This was added to
8225 8262
 improve support for devices where measurements on different data series may not
8226 8263
 arrive at exactly the same time and for multi-device configurations where

Loading…
Cancel
Save