Engauge Digitizer 2
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#include "ColorFilterMode.h"
8#include "Compatibility.h"
11#include "Logger.h"
12#include "MainWindow.h"
13#include "MainWindowMsg.h"
14#include <QApplication>
15#include <QCoreApplication>
16#include <QDebug>
17#include <QDir>
18#include <QFileInfo>
19#include <QMessageBox>
20#include <QObject>
21#include <QProcessEnvironment>
22#include <QStyleFactory>
23#include "TranslatorContainer.h"
24#include "ZoomFactor.h"
25
26using namespace std;
27
28const QString CMD_DEBUG ("debug");
29const QString CMD_DROP_REGRESSION ("dropregression");
30const QString CMD_ERROR_REPORT ("errorreport");
31const QString CMD_EXPORT_ONLY ("exportonly");
32const QString CMD_EXTRACT_IMAGE_ONLY ("extractimageonly");
33const QString CMD_FILE_CMD_SCRIPT ("filecmdscript");
34const QString CMD_GNUPLOT ("gnuplot");
35const QString CMD_HELP ("help");
36const QString CMD_REGRESSION ("regression");
37const QString CMD_RESET ("reset");
38const QString CMD_STYLE ("style"); // Qt handles this
39const QString CMD_STYLES ("styles"); // Not to be confused with -style option that qt handles
40const QString CMD_UPGRADE ("upgrade");
41const QString DASH ("-");
42const QString DASH_DEBUG ("-" + CMD_DEBUG);
44const QString DASH_ERROR_REPORT ("-" + CMD_ERROR_REPORT);
46const QString DASH_EXPORT_ONLY ("-" + CMD_EXPORT_ONLY);
48const QString DASH_GNUPLOT ("-" + CMD_GNUPLOT);
49const QString DASH_HELP ("-" + CMD_HELP);
50const QString DASH_REGRESSION ("-" + CMD_REGRESSION);
51const QString DASH_RESET ("-" + CMD_RESET);
52const QString DASH_STYLE ("-" + CMD_STYLE);
53const QString DASH_STYLES ("-" + CMD_STYLES);
54const QString DASH_UPGRADE ("-" + CMD_UPGRADE);
55const QString ENGAUGE_LOG_FILE (".engauge.log");
56
57// Prototypes
58bool checkFileExists (const QString &file);
59QString engaugeLogFilename ();
60bool engaugeLogFilenameAttempt (const QString &path,
61 QString &pathAndFile);
62void parseCmdLine (int argc,
63 char **argv,
64 bool &isDebug,
65 bool &isDropRegression,
66 bool &isReset,
67 QString &errorReportFile,
68 QString &fileCmdScriptFile,
69 bool &isErrorReportRegressionTest,
70 bool &isGnuplot,
71 bool &isExportOnly,
72 bool &isExtractImageOnly,
73 QString &extractImageOnlyExtension,
74 bool &isUpgrade,
75 QStringList &loadStartupFiles,
76 QStringList &commandLineWithoutLoadStartupFiles);
77void sanityCheckLoadStartupFiles (bool isRepeatingFlag,
78 const QString &dashForRepeatingFlag,
79 const QString &errorReportFile,
80 const QString &fileCmdScriptFile,
81 const QStringList &loadStartupFiles);
82void sanityCheckValue (bool requiredCondition,
83 const QString &arg,
84 const QString &msgUnadorned);
85void showMessageAndQuit (const QString &msg);
86void showStylesAndQuit ();
87void showUsageAndQuit ();
88void upgradeFiles (const QStringList &loadStartupFiles);
89
90// Functions
91bool checkFileExists (const QString &file)
92{
93 QFileInfo check (file);
94 return check.exists() && check.isFile();
95}
96
98{
99 QString pathAndFile; // Return empty value in OSX which is unused
100
101#if !defined(OSX_RELEASE) && !defined(WIN_RELEASE) && !defined(APPIMAGE_RELEASE)
102 QProcessEnvironment env;
103
104 // Make multiple attempts until a directory is found where the log file can be written
105 if (!engaugeLogFilenameAttempt (QCoreApplication::applicationDirPath(), pathAndFile)) {
106 if (!engaugeLogFilenameAttempt (env.value ("HOME"), pathAndFile)) {
107 if (!engaugeLogFilenameAttempt (env.value ("TEMP"), pathAndFile)) {
108 pathAndFile = ENGAUGE_LOG_FILE; // Current directory will have to do
109 }
110 }
111 }
112#endif
113
114 return pathAndFile;
115}
116
117bool engaugeLogFilenameAttempt (const QString &path,
118 QString &pathAndFile)
119{
120 bool success = false;
121
122 // Test if file can be opened. Checking permissions on directory is unreliable in Windows/OSX
123 pathAndFile = QString ("%1%2%3")
124 .arg (path)
125 .arg (QDir::separator())
126 .arg (ENGAUGE_LOG_FILE);
127 QFile file (pathAndFile);
128 if (file.open(QIODevice::WriteOnly | QIODevice::Text)) {
129 // Success
130 file.close();
131 file.remove(); // Cleanup
132 success = true;
133 }
134
135 return success;
136}
137
138int main(int argc, char *argv[])
139{
140 qRegisterMetaType<ColorFilterMode> ("ColorFilterMode");
141 qRegisterMetaType<FittingCurveCoefficients> ("FilterCurveCoefficients");
142 qRegisterMetaType<ZoomFactor> ("ZoomFactor");
143
144 QApplication app(argc, argv);
145
146 // Translations
147 TranslatorContainer translatorContainer (app); // Must exist until execution terminates
148
149 // Command line
150 bool isDebug, isDropRegression, isReset, isGnuplot, isErrorReportRegressionTest, isExportOnly, isExtractImageOnly, isUpgrade;
151 QString errorReportFile, extractImageOnlyExtension, fileCmdScriptFile;
152 QStringList loadStartupFiles, commandLineWithoutLoadStartupFiles;
153 parseCmdLine (argc,
154 argv,
155 isDebug,
156 isDropRegression,
157 isReset,
158 errorReportFile,
159 fileCmdScriptFile,
160 isErrorReportRegressionTest,
161 isGnuplot,
162 isExportOnly,
163 isExtractImageOnly,
164 extractImageOnlyExtension,
165 isUpgrade,
166 loadStartupFiles,
167 commandLineWithoutLoadStartupFiles);
168
169 // Logging
170 initializeLogging ("engauge",
172 isDebug);
173 LOG4CPP_INFO_S ((*mainCat)) << "main args=" << QApplication::arguments().join (" ").toLatin1().data();
174
175 // Upgrade or run normally
176 int rtn = 0;
177 if (isUpgrade) {
178 upgradeFiles (loadStartupFiles);
179 } else {
180 // Create and show main window
181 MainWindow w (errorReportFile,
182 fileCmdScriptFile,
183 isDropRegression,
184 isErrorReportRegressionTest,
185 isGnuplot,
186 isReset,
187 isExportOnly,
188 isExtractImageOnly,
189 extractImageOnlyExtension,
190 loadStartupFiles,
191 commandLineWithoutLoadStartupFiles);
192 w.show();
193
194 // Event loop
195 rtn = app.exec();
196 }
197
198 return rtn;
199}
200
201void parseCmdLine (int argc,
202 char **argv,
203 bool &isDebug,
204 bool &isDropRegression,
205 bool &isReset,
206 QString &errorReportFile,
207 QString &fileCmdScriptFile,
208 bool &isErrorReportRegressionTest,
209 bool &isGnuplot,
210 bool &isExportOnly,
211 bool &isExtractImageOnly,
212 QString &extractImageOnlyExtension,
213 bool &isUpgrade,
214 QStringList &loadStartupFiles,
215 QStringList &commandLineWithoutLoadStartupFiles)
216{
217 bool showUsage = false;
218
219 ImportImageExtensions importImageExtensions;
220
221 // State
222 bool nextIsErrorReportFile = false;
223 bool nextIsExtractImageOnly = false;
224 bool nextIsFileCmdScript = false;
225
226 // Defaults
227 isDebug = false;
228 isDropRegression = false;
229 isReset = false;
230 errorReportFile = "";
231 fileCmdScriptFile = "";
232 isErrorReportRegressionTest = false;
233 isGnuplot = false;
234 isExportOnly = false;
235 isExtractImageOnly = false;
236 extractImageOnlyExtension = "";
237 isUpgrade = false;
238
239 for (int i = 1; i < argc; i++) {
240
241 bool isLoadStartupFile = false;
242
243 if (nextIsErrorReportFile) {
245 argv [i],
246 QObject::tr ("is not a valid file name"));
247 errorReportFile = argv [i];
248 nextIsErrorReportFile = false;
249 } else if (nextIsExtractImageOnly) {
250 sanityCheckValue (importImageExtensions.offers (argv [i]),
251 argv [i],
252 QObject::tr ("is not a valid image file extension"));
253 extractImageOnlyExtension = argv [i];
254 nextIsExtractImageOnly = false;
255 } else if (nextIsFileCmdScript) {
257 argv [i],
258 QObject::tr ("is not a valid file name"));
259 fileCmdScriptFile = argv [i];
260 nextIsFileCmdScript = false;
261 } else if (strcmp (argv [i], DASH_DEBUG.toLatin1().data()) == 0) {
262 isDebug = true;
263 } else if (strcmp (argv [i], DASH_DROP_REGRESSION.toLatin1().data()) == 0) {
264 isDropRegression = true;
265 } else if (strcmp (argv [i], DASH_ERROR_REPORT.toLatin1().data()) == 0) {
266 nextIsErrorReportFile = true;
267 } else if (strcmp (argv [i], DASH_EXPORT_ONLY.toLatin1().data()) == 0) {
268 isExportOnly = true;
269 } else if (strcmp (argv [i], DASH_EXTRACT_IMAGE_ONLY.toLatin1().data()) == 0) {
270 isExtractImageOnly = true;
271 nextIsExtractImageOnly = true;
272 } else if (strcmp (argv [i], DASH_FILE_CMD_SCRIPT.toLatin1().data()) == 0) {
273 nextIsFileCmdScript = true;
274 } else if (strcmp (argv [i], DASH_GNUPLOT.toLatin1().data()) == 0) {
275 isGnuplot = true;
276 } else if (strcmp (argv [i], DASH_HELP.toLatin1().data()) == 0) {
277 showUsage = true; // User requested help
278 } else if (strcmp (argv [i], DASH_REGRESSION.toLatin1().data()) == 0) {
279 isErrorReportRegressionTest = true;
280 } else if (strcmp (argv [i], DASH_RESET.toLatin1().data()) == 0) {
281 isReset = true;
282 } else if (strcmp (argv [i], DASH_STYLE.toLatin1().data()) == 0) {
283 // This branch never executes because Qt strips out '-style <style>' and processes it.
284 // This comment is here just to document that special handling
285 } else if (strcmp (argv [i], DASH_STYLES.toLatin1().data()) == 0) {
287 } else if (strcmp (argv [i], DASH_UPGRADE.toLatin1().data()) == 0) {
288 isUpgrade = true;
289 } else if (strncmp (argv [i], DASH.toLatin1().data(), 1) == 0) {
290 showUsage = true; // User entered an unrecognized token
291 } else {
292 // MainWindow will change current directory (which is often some obscure application directory),
293 // so relative paths must be changed in advance to absolute so the files can still be found
294 QString fileName = argv [i];
295 QFileInfo fInfo (fileName);
296 if (fInfo.isRelative() && !fileName.startsWith ("http")) {
297 fileName = fInfo.absoluteFilePath();
298 }
299
300 isLoadStartupFile = true;
301 loadStartupFiles << fileName; // Save file name
302 }
303
304 // keep command line arguments
305 if (!isLoadStartupFile) {
306 commandLineWithoutLoadStartupFiles << argv [i];
307 }
308 }
309
310 // Sanity checks
311 sanityCheckLoadStartupFiles (isExportOnly,
313 errorReportFile,
314 fileCmdScriptFile,
315 loadStartupFiles);
316 sanityCheckLoadStartupFiles (isExtractImageOnly,
318 errorReportFile,
319 fileCmdScriptFile,
320 loadStartupFiles);
321
322 // Usage
323 if (showUsage || nextIsErrorReportFile || nextIsExtractImageOnly || nextIsFileCmdScript) {
324
326
327 }
328}
329
330void sanityCheckLoadStartupFiles (bool isRepeatingFlag,
331 const QString &dashForRepeatingFlag,
332 const QString &errorReportFile,
333 const QString &fileCmdScriptFile,
334 const QStringList &loadStartupFiles)
335{
336 if (isRepeatingFlag && (!errorReportFile.isEmpty() ||
337 !fileCmdScriptFile.isEmpty() ||
338 loadStartupFiles.size() == 0)) {
339
340 // Condition that at only load files are specified, and there is at least one of them, is not satisfied so
341 // show more specific error message than showUsageAndQuit, and then quit
342 QString msg;
343 QTextStream str (&msg);
344 str << dashForRepeatingFlag.toLatin1().data() << " " << QObject::tr ("is used only with one or more load files");
345 showMessageAndQuit (msg);
346 }
347}
348
349void sanityCheckValue (bool requiredCondition,
350 const QString &arg,
351 const QString &msgUnadorned)
352{
353 if (!requiredCondition) {
354
355 // Required condition is not satisfied. Show a more specific error message than showUsageAndQuit and then quit
356 QString msg = QString ("%1 %2")
357 .arg (arg)
358 .arg (msgUnadorned);
359 showMessageAndQuit (msg);
360 }
361}
362
363void showMessageAndQuit (const QString &msg)
364{
365 MainWindowMsg w (msg);
366 w.show ();
367
368 qApp->exec();
369
370 // Execution never reaches this point since MainWindowMsg shuts everything down
371}
372
374{
375 QString msg;
376 QTextStream str (&msg);
377 str << QObject::tr ("Available styles") << ": " << QStyleFactory::keys ().join (", ");
378 showMessageAndQuit (msg);
379}
380
382{
383 QString msg;
384 QTextStream str (&msg);
385 str << "<html>Usage: engauge "
386 << "[" << DASH_DEBUG.toLatin1().data() << "] "
387 << "[" << DASH_DROP_REGRESSION.toLatin1().data() << "] "
388 << "[" << DASH_ERROR_REPORT.toLatin1().data() << " &lt;file&gt;] "
389 << "[" << DASH_EXPORT_ONLY.toLatin1().data() << "] "
390 << "[" << DASH_EXTRACT_IMAGE_ONLY.toLatin1().data() << " &lt;extension&gt;] "
391 << "[" << DASH_FILE_CMD_SCRIPT.toLatin1().data() << " &lt;file&gt; "
392 << "[" << DASH_GNUPLOT.toLatin1().data() << "] "
393 << "[" << DASH_HELP.toLatin1().data() << "] "
394 << "[" << DASH_REGRESSION.toLatin1().data() << "] "
395 << "[" << DASH_RESET.toLatin1().data () << "] "
396 << "[" << DASH_STYLE.toLatin1().data () << " &lt;style&gt;] "
397 << "[" << DASH_STYLES.toLatin1().data () << "] "
398 << "[&lt;load_file1&gt;] [&lt;load_file2&gt;] ..." << "\n"
399 << "<table>"
400 << "<tr>"
401 << "<td>" << QObject::tr ("where") << "</td>"
402 << "<td>&nbsp;</td>"
403 << "</tr>"
404 << "<tr>"
405 << "<td>" << DASH_DEBUG.toLatin1().data() << "</td>"
406 << "<td>"
407 << QObject::tr ("Enables extra debug information. Used for debugging").toLatin1().data()
408 << "</td>"
409 << "</tr>"
410 << "<tr>"
411 << "<td>" << DASH_DROP_REGRESSION.toLatin1().data() << "</td>"
412 << "<td>"
413 << QObject::tr ("Indicates files opened at startup are for testing drag and drop. Used for regression testing").toLatin1().data()
414 << "</td>"
415 << "</tr>"
416 << "<tr>"
417 << "<td>" << DASH_ERROR_REPORT.toLatin1().data() << "</td>"
418 << "<td>"
419 << QObject::tr ("Specifies an error report file as input. Used for debugging and regression testing").toLatin1().data()
420 << "</td>"
421 << "</tr>"
422 << "<tr>"
423 << "<td>" << DASH_EXPORT_ONLY.toLatin1().data() << "</td>"
424 << "<td>"
425 << QObject::tr ("Export each loaded startup file, which must have all axis points defined, then stop").toLatin1().data()
426 << "</td>"
427 << "</tr>"
428 << "<tr>"
429 << "<td>" << DASH_EXTRACT_IMAGE_ONLY.toLatin1().data() << "</td>"
430 << "<td>"
431 << QObject::tr ("Extract image in each loaded startup file to a file with the specified extension, then stop").toLatin1().data()
432 << "</td>"
433 << "</tr>"
434 << "<tr>"
435 << "<td>" << DASH_FILE_CMD_SCRIPT.toLatin1().data() << "</td>"
436 << "<td>"
437 << QObject::tr ("Specifies a file command script file as input. Used for debugging and testing").toLatin1().data()
438 << "</td>"
439 << "</tr>"
440 << "<tr>"
441 << "<td>" << DASH_GNUPLOT.toLatin1().data() << "</td>"
442 << "<td>"
443 << QObject::tr ("Output diagnostic gnuplot input files. Used for debugging").toLatin1().data()
444 << "</td>"
445 << "</tr>"
446 << "<tr>"
447 << "<td>" << DASH_HELP.toLatin1().data() << "</td>"
448 << "<td>"
449 << QObject::tr ("Show this help information").toLatin1().data()
450 << "</td>"
451 << "</tr>"
452 << "<tr>"
453 << "<td>" << DASH_REGRESSION.toLatin1().data() << "</td>"
454 << "<td>"
455 << QObject::tr ("Executes the error report file or file command script. Used for regression testing").toLatin1().data()
456 << "</td>"
457 << "</tr>"
458 << "<tr>"
459 << "<td>" << DASH_RESET.toLatin1().data() << "</td>"
460 << "<td>"
461 << QObject::tr ("Removes all stored settings, including window positions. Used when windows start up offscreen").toLatin1().data()
462 << "</td>"
463 << "</tr>"
464 << "<tr>"
465 << "<td>" << DASH_STYLE.toLatin1().data() << "</td>"
466 << "<td>"
467 << QString ("%1 %2")
468 .arg (QObject::tr ("Set the window style to one of the styles listed by the command line option"))
469 .arg (DASH_STYLES).toLatin1().data()
470 << "</td>"
471 << "</tr>"
472 << "<tr>"
473 << "<td>" << DASH_STYLES.toLatin1().data() << "</td>"
474 << "<td>"
475 << QString ("%1 %2")
476 .arg (QObject::tr ("Show a list of available styles that can be used with the command line option"))
477 .arg (DASH_STYLE).toLatin1().data()
478 << "</td>"
479 << "</tr>"
480 << "<tr>"
481 << "<td>" << DASH_UPGRADE.toLatin1().data() << "</td>"
482 << "<td>"
483 << QObject::tr ("Upgrade files opened at startup to the most recent version").toLatin1().data()
484 << "</td>"
485 << "</tr>"
486 << "<tr>"
487 << "<td>" << QString ("&lt;load file&gt; ").toLatin1().data() << "</td>"
488 << "<td>"
489 << QObject::tr ("File(s) to be imported or opened at startup").toLatin1().data()
490 << "</td>"
491 << "</tr>"
492 << "<tr>"
493 << "<td>&nbsp;</td>"
494 << "<td>&nbsp;</td>"
495 << "</tr>"
496 << "<tr>"
497 << "<td>" << QObject::tr ("Useful environment variables:") << "</td>"
498 << "<td>&nbsp;</td>"
499 << "</tr>"
500 << "<tr>"
501 << "<td>TZ</td>" // Do not translate
502 << "<td>" << QObject::tr ("Set timezone to add or subtract hours in time values. Timezone values are listed as TZ Database Names in Wikipedia").toLatin1().data() << "</td>"
503 << "</tr>"
504 << "</table></html>";
505
506 showMessageAndQuit (msg);
507}
508
509void upgradeFiles (const QStringList &loadStartupFiles)
510{
511 QString FILE_SUFFIX (".dig");
512 QString UPGRADE_TOKEN ("_upgrade");
513
514 QString msg;
515
516 QStringList::const_iterator itr;
517 for (itr = loadStartupFiles.begin(); itr != loadStartupFiles.end(); itr++) {
518
519 QString filenameOld = *itr;
520 QString filenameNew;
521
522 // First try to insert upgrade token before file prefix if it is recognized
523 if (filenameOld.endsWith (FILE_SUFFIX,
524 Qt::CaseInsensitive)) {
525 QString withoutSuffix = filenameOld.left (filenameOld.size () - FILE_SUFFIX.size ());
526 filenameNew = QString ("%1%2%3")
527 .arg (withoutSuffix)
528 .arg (UPGRADE_TOKEN)
529 .arg (FILE_SUFFIX);
530 } else {
531
532 // Otherwise append upgrade token
533 filenameNew = QString ("%1%2")
534 .arg (filenameOld)
535 .arg (UPGRADE_TOKEN);
536 }
537
538 // Get old file
539 Document document (filenameOld);
540
541 // Make new file
542 QFile file (filenameNew);
543 if (!file.open (QFile::WriteOnly)) {
544
545 msg += QString ("%1 %2")
546 .arg (QObject::tr ("Could not write to"))
547 .arg (filenameNew);
548
549 } else {
550
551 QXmlStreamWriter writer (&file);
552 writer.setAutoFormatting (true);
553 writer.writeStartDocument();
554 writer.writeDTD ("<!DOCTYPE engauge>");
555 document.saveXml (writer);
556 writer.writeEndDocument ();
557
558 msg += QString ("%1 %2 %3 %4")
559 .arg (QObject::tr ("Upgraded"))
560 .arg (filenameOld)
561 .arg (QObject::tr ("to"))
562 .arg (filenameNew);
563 }
564 }
565
566 // Do not show a message using QMessageBox since upgrade mode may be called hundreds
567 // of times successively by python scripts. Logging is used instead
568 LOG4CPP_INFO_S ((*mainCat)) << "Upgrade results: " << msg.toLatin1().data ();
569
570 exit (0);
571}
log4cpp::Category * mainCat
Definition Logger.cpp:14
void initializeLogging(const QString &name, const QString &filename, bool isDebug)
Definition Logger.cpp:21
Storage of one imported image and the data attached to that image.
Definition Document.h:44
void saveXml(QXmlStreamWriter &writer) const
Save document to xml.
Definition Document.cpp:910
Provides list of file extensions for import.
bool offers(const QString &fileExtension) const
Return true if specified file extension is supported.
Main window for momentary message dialog.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
Definition MainWindow.h:95
Class that stores QTranslator objects for the duration of application execution.
#define LOG4CPP_INFO_S(logger)
Definition convenience.h:18
int main(int argc, char *argv[])
Definition main.cpp:138
void sanityCheckLoadStartupFiles(bool isRepeatingFlag, const QString &dashForRepeatingFlag, const QString &errorReportFile, const QString &fileCmdScriptFile, const QStringList &loadStartupFiles)
Definition main.cpp:330
const QString CMD_EXPORT_ONLY("exportonly")
const QString DASH_ERROR_REPORT("-"+CMD_ERROR_REPORT)
const QString CMD_STYLE("style")
const QString CMD_ERROR_REPORT("errorreport")
const QString CMD_RESET("reset")
bool engaugeLogFilenameAttempt(const QString &path, QString &pathAndFile)
Definition main.cpp:117
const QString CMD_STYLES("styles")
const QString ENGAUGE_LOG_FILE(".engauge.log")
const QString CMD_DROP_REGRESSION("dropregression")
const QString CMD_REGRESSION("regression")
const QString DASH_GNUPLOT("-"+CMD_GNUPLOT)
const QString DASH_EXTRACT_IMAGE_ONLY("-"+CMD_EXTRACT_IMAGE_ONLY)
void parseCmdLine(int argc, char **argv, bool &isDebug, bool &isDropRegression, bool &isReset, QString &errorReportFile, QString &fileCmdScriptFile, bool &isErrorReportRegressionTest, bool &isGnuplot, bool &isExportOnly, bool &isExtractImageOnly, QString &extractImageOnlyExtension, bool &isUpgrade, QStringList &loadStartupFiles, QStringList &commandLineWithoutLoadStartupFiles)
Definition main.cpp:201
void showUsageAndQuit()
Definition main.cpp:381
void sanityCheckValue(bool requiredCondition, const QString &arg, const QString &msgUnadorned)
Definition main.cpp:349
const QString CMD_GNUPLOT("gnuplot")
QString engaugeLogFilename()
Definition main.cpp:97
const QString DASH_HELP("-"+CMD_HELP)
const QString DASH_UPGRADE("-"+CMD_UPGRADE)
const QString CMD_EXTRACT_IMAGE_ONLY("extractimageonly")
const QString DASH_RESET("-"+CMD_RESET)
const QString CMD_HELP("help")
const QString CMD_UPGRADE("upgrade")
void showMessageAndQuit(const QString &msg)
Definition main.cpp:363
const QString DASH_STYLES("-"+CMD_STYLES)
const QString DASH_REGRESSION("-"+CMD_REGRESSION)
const QString CMD_FILE_CMD_SCRIPT("filecmdscript")
const QString DASH_EXPORT_ONLY("-"+CMD_EXPORT_ONLY)
const QString DASH_DROP_REGRESSION("-"+CMD_DROP_REGRESSION)
const QString DASH_DEBUG("-"+CMD_DEBUG)
const QString DASH_STYLE("-"+CMD_STYLE)
bool checkFileExists(const QString &file)
Definition main.cpp:91
void upgradeFiles(const QStringList &loadStartupFiles)
Definition main.cpp:509
const QString CMD_DEBUG("debug")
void showStylesAndQuit()
Definition main.cpp:373
const QString DASH("-")
const QString DASH_FILE_CMD_SCRIPT("-"+CMD_FILE_CMD_SCRIPT)