7 #include "ChecklistGuidePage.h"
8 #include "ChecklistGuidePageConclusion.h"
9 #include "ChecklistGuidePageCurves.h"
10 #include "ChecklistGuidePageIntro.h"
11 #include "ChecklistGuideWizard.h"
12 #include "ChecklistTemplate.h"
13 #include "ColorFilterSettings.h"
14 #include "EngaugeAssert.h"
16 #include "MainWindow.h"
17 #include <QGridLayout>
18 #include <QHeaderView>
19 #include <QPushButton>
20 #include <QRadioButton>
21 #include <QTextStream>
22 #include <QVBoxLayout>
25 unsigned int numberCoordSystem) :
26 m_mainWindow (mainWindow),
27 m_dialogName (
"ChecklistGuide")
29 setWindowTitle (tr (
"Checklist Guide Wizard"));
31 QPixmap splash (
":/engauge/img/SpreadsheetsForDoc.png");
32 setPixmap (QWizard::WatermarkPixmap, splash);
33 setPixmap (QWizard::BackgroundPixmap, splash);
38 for (CoordSystemIndex coordSystemIndex = 0; coordSystemIndex < numberCoordSystem; coordSystemIndex++) {
40 addPage(m_pageCurves.last());
44 addPage(m_pageConclusion);
49 return m_pageCurves [coordSystemIndex]->curveNames();
52 QString ChecklistGuideWizard::pageCurvesTitle (CoordSystemIndex coordSystemIndex,
53 unsigned int numberCoordSystem)
const
55 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuideWizard::pageCurvesTitle";
57 ENGAUGE_ASSERT (coordSystemIndex < numberCoordSystem);
59 if (numberCoordSystem == 1) {
67 unsigned int indexOneBased = coordSystemIndex + 1;
68 return QString (
"%1 %2")
69 .arg (QObject::tr (
"Curves for coordinate system"))
78 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuideWizard::populateCurvesGraphs";
80 QStringList
curveNames = m_pageCurves [coordSystemIndex]->curveNames();
81 QStringList::const_iterator itr;
82 for (itr = curveNames.begin(); itr != curveNames.end(); itr++) {
84 QString curveName = *itr;
95 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuideWizard::templateHtml";
97 QStringList
curveNames = m_pageCurves [coordSystemIndex]->curveNames();
98 bool withLines = m_pageCurves [coordSystemIndex]->withLines();
101 QTextStream str (&html);
104 str <<
"<style type='text/css'>li { margin-top: 10px 0; }</style>";
106 str <<
"<p>" << tr (
"The coordinates are defined by creating axis points:") <<
"</p>\n";
107 str <<
"<p>" << TAG_ANCHOR_AXIS_1 <<
" " << tr (
"Add first of three axis points.") <<
" " << TAG_AHREF_AXIS_1 <<
"</p>\n";
108 str << TAG_DIV_AXIS_START_1;
110 str <<
"<li>" << tr (
"Click on") <<
" <img src="":/engauge/img/16-DigitAxis""> " << tr (
"for <b>Axis Points</b> mode") <<
"</li>\n";
111 str <<
"<li>" << tr (
"Click on an axis tick mark, or intersection of two grid lines, with labeled coordinates") <<
"</li>\n";
112 str <<
"<li>" << tr (
"Enter the coordinates of the axis point") <<
"</li>\n";
113 str <<
"<li>" << tr (
"Click on Ok") <<
"</li>\n";
115 str << TAG_DIV_AXIS_END_1;
116 str <<
"<p>" << TAG_ANCHOR_AXIS_2 <<
" " << tr (
"Add second of three axis points.") <<
" " << TAG_AHREF_AXIS_2 <<
"</p>\n";
117 str << TAG_DIV_AXIS_START_2;
119 str <<
"<li>" << tr (
"Click on") <<
" <img src="":/engauge/img/16-DigitAxis""> " << tr (
"for <b>Axis Points</b> mode") <<
"</li>\n";
120 str <<
"<li>" << tr (
"Click on an axis tick mark, or intersection of two grid lines, with labeled coordinates, away from the other axis point") <<
"</li>\n";
121 str <<
"<li>" << tr (
"Enter the coordinates of the axis point") <<
"</li>\n";
122 str <<
"<li>" << tr (
"Click on Ok") <<
"</li>\n";
124 str << TAG_DIV_AXIS_END_2;
125 str <<
"<p>" << TAG_ANCHOR_AXIS_3 <<
" " << tr (
"Add third of three axis points.") <<
" " << TAG_AHREF_AXIS_3 <<
"</p>\n";
126 str << TAG_DIV_AXIS_START_3;
128 str <<
"<li>" << tr (
"Click on") <<
" <img src="":/engauge/img/16-DigitAxis""> " << tr (
"for <b>Axis Points</b> mode") <<
"</li>\n";
129 str <<
"<li>" << tr (
"Click on an axis tick mark, or intersection of two grid lines, with labeled coordinates, away from the other axis points") <<
"</li>\n";
130 str <<
"<li>" << tr (
"Enter the coordinates of the axis point") <<
"</li>\n";
131 str <<
"<li>" << tr (
"Click on Ok") <<
"</li>\n";
133 str << TAG_DIV_AXIS_END_3;
135 str <<
"<p> </p>\n";
136 str <<
"<p>" << tr (
"Points are digitized along each curve:") <<
"</p>\n";
137 QStringList::const_iterator itr;
138 for (itr = curveNames.begin(); itr != curveNames.end(); itr++) {
140 QString curveName = *itr;
142 QString tagACurve = QString (
"%1%2%3")
143 .arg (TAG_AHREF_DELIMITER_START)
145 .arg (TAG_AHREF_DELIMITER_END);
147 str <<
"<p>" << TAG_ANCHOR_DELIMITER_START << curveName << TAG_ANCHOR_DELIMITER_END
148 <<
" " << tr (
"Add points for curve") <<
" <b>" << curveName <<
"</b>. " << tagACurve <<
"</p>\n";
149 str << TAG_DIV_DELIMITER_START << curveName << TAG_DIV_DELIMITER_END;
154 str <<
"<li>" << tr (
"Click on") <<
" <img src="":/engauge/img/16-DigitSegment""> " << tr (
"for <b>Segment Fill</b> mode") <<
"</li>\n";
155 str <<
"<li>" << tr (
"Select curve") <<
" <b>" << curveName <<
"</b> " << tr (
"in the drop-down list") <<
"</li>\n";
156 str <<
"<li>" << tr (
"Move the cursor over the curve. If a line does not appear then adjust the <b>Color Filter</b> settings for this curve") <<
":\n";
157 str << templateHtmlToAdjustColorFilterSettings () <<
"</li>\n";
158 str <<
"<li>" << tr (
"Move the cursor over the curve again. When the <b>Segment Fill</b> line appears, click on it to generate points") <<
"</li>\n";
163 str <<
"<li>" << tr (
"Click on") <<
" <img src="":/engauge/img/16-DigitPointMatch""> " << tr (
"for <b>Point Match</b> mode") <<
"</li>\n";
164 str <<
"<li>" << tr (
"Select curve") <<
" <b>" << curveName <<
"</b> " << tr (
"in the drop-down list") <<
"</li>\n";
165 str <<
"<li>" << tr (
"Move the cursor over a typical point in the curve. If the cursor circle does not change color then adjust "
166 "the <b>Color Filter</b> settings for this curve") <<
":\n";
167 str << templateHtmlToAdjustColorFilterSettings () <<
"</li>\n";
168 str <<
"<li>" << tr (
"Move the cursor over a typical point in the curve again. Click on the point to start point matching") <<
"</li>\n";
169 str <<
"<li>" << tr (
"Engauge will display a candidate point. To accept that candidate point, press the right arrow key") <<
"</li>\n";
170 str <<
"<li>" << tr (
"The previous step repeats until you select a different mode") <<
"</li>\n";
174 str << TAG_DIV_DELIMITER_START_SLASH << curveName << TAG_DIV_DELIMITER_END;
177 str <<
"<p> </p>\n";
178 str <<
"<p>" << tr (
"The digitized points can be exported") <<
":</p>\n";
179 str <<
"<p>" << TAG_ANCHOR_EXPORT <<
" " << tr (
"Export the points to a file") <<
". " << TAG_AHREF_EXPORT <<
"</p>\n";
180 str << TAG_DIV_EXPORT_START;
182 str <<
"<li>" << tr (
"Select menu option <b>File / Export</b>") <<
"</li>\n";
183 str <<
"<li>" << tr (
"Enter the file name") <<
"</li>\n";
184 str <<
"<li>" << tr (
"Click on Ok") <<
"</li>\n";
185 str <<
"<li>" << tr (
"Congratulations!") <<
"</li>\n";
187 str << TAG_DIV_EXPORT_END;
189 str <<
"<p> </p>\n";
190 str <<
"<p>" << tr (
"Hint - The background image can be switched between the original image and filtered image.") <<
" " << TAG_AHREF_BACKGROUND <<
"</p>\n";
191 str << TAG_DIV_BACKGROUND_START;
193 str <<
"<li>" << tr (
"Select menu option <b>View / Background / Show Original Image</b> to see the original image") <<
"</li>\n";
194 str <<
"<li>" << tr (
"Select menu option <b>View / Background / Show Filtered Image</b> to see the image from <b>Color Filter</b>") <<
"</li>\n";
196 str << TAG_DIV_BACKGROUND_END;
201 QString ChecklistGuideWizard::templateHtmlToAdjustColorFilterSettings ()
const
203 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuideWizard::templateHtmlToAdjustColorFilterSettings";
206 QTextStream str (&html);
209 str <<
" <li>" << tr (
"Select menu option <b>Settings / Color Filter</b>") <<
"<li>\n";
210 str <<
" <li>" << tr (
"Select the method for filtering. Hue is best if the curves have different colors") <<
"</li>\n";
211 str <<
" <li>" << tr (
"Slide the green buttons back and forth until the curve is easily visible in the preview window") <<
"</li>\n";
212 str <<
" <li>" << tr (
"Click on Ok") <<
"</li>\n";
static LineStyle defaultGraphCurve(int index)
Initial default for index'th graph curve.
int numCurves() const
Current number of graphs curves.
void addGraphCurveAtEnd(Curve curve)
Append new graph Curve to end of Curve list.
ChecklistGuideWizard(MainWindow &mainWindow, unsigned int numberCoordSystem)
Single constructor.
static ColorFilterSettings defaultFilter()
Initial default for any Curve.
Container for all graph curves. The axes point curve is external to this class.
Container for LineStyle and PointStyle for one Curve.
Container for one set of digitized Points.
This class sets up the introduction page.
This class adds validation to the Curves page.
This class uses the validation method of the Conclusion page to perform final processing for Checklis...
static PointStyle defaultGraphCurve(int index)
Initial default for index'th graph curve.
void populateCurvesGraphs(CoordSystemIndex coordSystemIndex, CurvesGraphs &curvesGraphs)
Create entries in CurvesGraphs for each curve name that user provided.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
QString templateHtml(CoordSystemIndex coordSystemIndex) const
Template html comprising the checklist for display.
QStringList curveNames(CoordSystemIndex coordSystemIndex) const
Curve names to be placed into Document.