1 #include "ChecklistGuidePage.h"
2 #include "ChecklistGuidePageConclusion.h"
3 #include "ChecklistGuidePageCurves.h"
4 #include "ChecklistGuidePageIntro.h"
5 #include "ChecklistGuideWizard.h"
6 #include "ChecklistTemplate.h"
7 #include "ColorFilterSettings.h"
9 #include "MainWindow.h"
10 #include <QGridLayout>
11 #include <QHeaderView>
12 #include <QPushButton>
13 #include <QRadioButton>
14 #include <QTextStream>
15 #include <QVBoxLayout>
18 m_mainWindow (mainWindow),
19 m_dialogName (
"ChecklistGuide")
21 setWindowTitle (tr (
"Checklist Guide Wizard"));
23 QPixmap splash (
":/engauge/img/SpreadsheetsForDoc.png");
24 setPixmap (QWizard::WatermarkPixmap, splash);
25 setPixmap (QWizard::BackgroundPixmap, splash);
32 addPage(m_pageCurves);
33 addPage(m_pageConclusion);
43 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuideWizard::populateCurvesGraphs";
46 QStringList::const_iterator itr;
47 for (itr = curveNames.begin(); itr != curveNames.end(); itr++) {
49 QString curveName = *itr;
60 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuideWizard::templateHtml";
63 bool withLines = m_pageCurves->
withLines();
66 QTextStream str (&html);
69 str <<
"<style type='text/css'>li { margin-top: 10px 0; }</style>";
71 str <<
"<p>The coordinates are defined by creating axis points:</p>\n";
72 str <<
"<p>" << TAG_ANCHOR_AXIS_1 <<
" Add first of three axis points. " << TAG_AHREF_AXIS_1 <<
"</p>\n";
73 str << TAG_DIV_AXIS_START_1;
75 str <<
"<li>Click on <img src="":/engauge/img/16-DigitAxis""> for <b>Axis Points</b> mode</li>\n";
76 str <<
"<li>Click on an axis tick mark, or intersection of two grid lines, with labeled coordinates</li>\n";
77 str <<
"<li>Enter the coordinates of the axis point</li>\n";
78 str <<
"<li>Click on Ok</li>\n";
80 str << TAG_DIV_AXIS_END_1;
81 str <<
"<p>" << TAG_ANCHOR_AXIS_2 <<
" Add second of three axis points. " << TAG_AHREF_AXIS_2 <<
"</p>\n";
82 str << TAG_DIV_AXIS_START_2;
84 str <<
"<li>Click on <img src="":/engauge/img/16-DigitAxis""> for <b>Axis Points</b> mode</li>\n";
85 str <<
"<li>Click on an axis tick mark, or intersection of two grid lines, with labeled coordinates, away from the other axis point</li>\n";
86 str <<
"<li>Enter the coordinates of the axis point</li>\n";
87 str <<
"<li>Click on Ok</li>\n";
89 str << TAG_DIV_AXIS_END_2;
90 str <<
"<p>" << TAG_ANCHOR_AXIS_3 <<
" Add third of three axis points. " << TAG_AHREF_AXIS_3 <<
"</p>\n";
91 str << TAG_DIV_AXIS_START_3;
93 str <<
"<li>Click on <img src="":/engauge/img/16-DigitAxis""> for <b>Axis Points</b> mode</li>\n";
94 str <<
"<li>Click on an axis tick mark, or intersection of two grid lines, with labeled coordinates, away from the other axis points</li>\n";
95 str <<
"<li>Enter the coordinates of the axis point</li>\n";
96 str <<
"<li>Click on Ok</li>\n";
98 str << TAG_DIV_AXIS_END_3;
100 str <<
"<p> </p>\n";
101 str <<
"<p>Points are digitized along each curve:</p>\n";
102 QStringList::const_iterator itr;
103 for (itr = curveNames.begin(); itr != curveNames.end(); itr++) {
105 QString curveName = *itr;
107 QString tagACurve = QString (
"%1%2%3")
108 .arg (TAG_AHREF_DELIMITER_START)
110 .arg (TAG_AHREF_DELIMITER_END);
112 str <<
"<p>" << TAG_ANCHOR_DELIMITER_START << curveName << TAG_ANCHOR_DELIMITER_END
113 <<
" Add points for curve <b>" << curveName <<
"</b>. " << tagACurve <<
"</p>\n";
114 str << TAG_DIV_DELIMITER_START << curveName << TAG_DIV_DELIMITER_END;
119 str <<
"<li>Click on <img src="":/engauge/img/16-DigitSegment""> for <b>Segment Fill</b> mode</li>\n";
120 str <<
"<li>Select curve <b>" << curveName <<
"</b> in the drop-down list</li>\n";
121 str <<
"<li>Move the cursor over the curve. If a line does not appear then adjust the <b>Color Filter</b> settings for this curve:\n";
122 str << templateHtmlToAdjustColorFilterSettings () <<
"</li>\n";
123 str <<
"<li>Move the cursor over the curve again. When the <b>Segment Fill</b> line appears, click on it to generate points</li>\n";
128 str <<
"<li>Click on <img src="":/engauge/img/16-DigitPointMatch""> for <b>Point Match</b> mode</li>\n";
129 str <<
"<li>Select curve <b>" << curveName <<
"</b> in the drop-down list</li>\n";
130 str <<
"<li>Move the cursor over a typical point in the curve. If the cursor circle does not change color then adjust";
131 str <<
" the <b>Color Filter</b> settings for this curve:\n";
132 str << templateHtmlToAdjustColorFilterSettings () <<
"</li>\n";
133 str <<
"<li>Move the cursor over a typical point in the curve again. Click on the point to start point matching</li>\n";
134 str <<
"<li>Engauge will display a candidate point. To accept that candidate point, press the right arrow key</li>\n";
135 str <<
"<li>The previous step repeats until you select a different mode</li>\n";
139 str << TAG_DIV_DELIMITER_START_SLASH << curveName << TAG_DIV_DELIMITER_END;
142 str <<
"<p> </p>\n";
143 str <<
"<p>The digitized points can be exported:</p>\n";
144 str <<
"<p>" << TAG_ANCHOR_EXPORT <<
" Export the points to a file. " << TAG_AHREF_EXPORT <<
"</p>\n";
145 str << TAG_DIV_EXPORT_START;
147 str <<
"<li>Select menu option <b>File / Export</b></li>\n";
148 str <<
"<li>Enter the file name</li>\n";
149 str <<
"<li>Click on Ok</li>\n";
150 str <<
"<li>Congratulations!</li>\n";
152 str << TAG_DIV_EXPORT_END;
154 str <<
"<p> </p>\n";
155 str <<
"<p>Hint - The background image can be switched between the original image and filtered image. " << TAG_AHREF_BACKGROUND <<
"</p>\n";
156 str << TAG_DIV_BACKGROUND_START;
158 str <<
"<li>Select menu option <b>View / Background / Show Original Image</b> to see the original image</li>\n";
159 str <<
"<li>Select menu option <b>View / Background / Show Filtered Image</b> to see the image from <b>Color Filter</b></li>\n";
161 str << TAG_DIV_BACKGROUND_END;
166 QString ChecklistGuideWizard::templateHtmlToAdjustColorFilterSettings ()
const
168 LOG4CPP_INFO_S ((*mainCat)) <<
"ChecklistGuideWizard::templateHtmlToAdjustColorFilterSettings";
171 QTextStream str (&html);
174 str <<
" <li>Select menu option <b>Settings / Color Filter</b><li>\n";
175 str <<
" <li>Select the method for filtering. Hue is best if the curves have different colors</li>\n";
176 str <<
" <li>Slide the green buttons back and forth until the curve is easily visible in the preview window</li>\n";
177 str <<
" <li>Click on Ok</li>\n";
ChecklistGuideWizard(MainWindow &mainWindow)
Single constructor.
static LineStyle defaultGraphCurve(int index)
Initial default for index'th graph curve.
QString templateHtml() const
Template html comprising the checklist for display.
int numCurves() const
Current number of graphs curves.
void addGraphCurveAtEnd(Curve curve)
Append new graph Curve to end of Curve list.
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.
QStringList curveNames() const
Curve names to be placed into Document.
bool withLines() const
Drawn with lines, else points.
void populateCurvesGraphs(CurvesGraphs &curvesGraphs)
Create entries in CurvesGraphs for each curve name that user provided.
QStringList curveNames() const
Wizard selection for curve names.
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.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...