7 #include "CallbackBoundingRects.h" 8 #include "CmdMediator.h" 9 #include "CmdSettingsExportFormat.h" 10 #include "DocumentModelExportFormat.h" 11 #include "DlgSettingsExportFormat.h" 12 #include "ExportFileFunctions.h" 13 #include "ExportFileRelations.h" 15 #include "MainWindow.h" 16 #include "MainWindowModel.h" 19 #include <QDoubleValidator> 20 #include <QGridLayout> 22 #include <QHBoxLayout> 25 #include <QListWidget> 26 #include <QPushButton> 27 #include <QRadioButton> 32 #include <QTextStream> 33 #include <QVBoxLayout> 35 #include "Transformation.h" 38 const QString COLOR_FUNCTIONS = (
"#DDDDFF");
39 const QString COLOR_RELATIONS = (
"#DDFFDD");
41 const int MIN_INDENT_COLUMN_WIDTH = 20;
42 const int MIN_HEADER_EMPTY_COLUMN_WIDTH = 10;
43 const int MIN_EDIT_WIDTH = 110;
44 const int MAX_EDIT_WIDTH = 180;
46 const int TAB_WIDGET_INDEX_FUNCTIONS = 0;
47 const int TAB_WIDGET_INDEX_RELATIONS = 1;
49 const QString EMPTY_PREVIEW;
51 const int MINIMUM_DIALOG_WIDTH_EXPORT_FORMAT = 650;
52 const int MINIMUM_HEIGHT = 780;
56 "DlgSettingsExportFormat",
58 m_modelExportBefore (0),
59 m_modelExportAfter (0),
60 m_haveFunction (false),
61 m_haveRelation (false)
63 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::DlgSettingsExportFormat";
67 MINIMUM_DIALOG_WIDTH_EXPORT_FORMAT);
70 DlgSettingsExportFormat::~DlgSettingsExportFormat()
72 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::~DlgSettingsExportFormat";
75 void DlgSettingsExportFormat::createCurveSelection (QGridLayout *layout,
int &row)
77 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::createCurveSelection";
79 QLabel *labelIncluded =
new QLabel (tr (
"Included"));
80 layout->addWidget (labelIncluded, row, 0);
82 QLabel *labelExcluded =
new QLabel (tr (
"Not included"));
83 layout->addWidget (labelExcluded, row++, 2);
85 m_listIncluded =
new QListWidget;
86 m_listIncluded->setSortingEnabled (
false);
87 m_listIncluded->setWhatsThis (tr (
"List of curves to be included in the exported file.\n\n" 88 "The order of the curves here does not affect the order in the exported file. That " 89 "order is determined by the Curves settings."));
90 m_listIncluded->setSelectionMode (QAbstractItemView::MultiSelection);
91 layout->addWidget (m_listIncluded, row, 0, 4, 1);
92 connect (m_listIncluded, SIGNAL (itemSelectionChanged ()),
this, SLOT (slotListIncluded()));
94 m_listExcluded =
new QListWidget;
95 m_listExcluded->setSortingEnabled (
false);
96 m_listExcluded->setWhatsThis (tr (
"List of curves to be excluded from the exported file"));
97 m_listExcluded->setSelectionMode (QAbstractItemView::MultiSelection);
98 layout->addWidget (m_listExcluded, row++, 2, 4, 1);
99 connect (m_listExcluded, SIGNAL (itemSelectionChanged ()),
this, SLOT (slotListExcluded()));
101 m_btnInclude =
new QPushButton (tr (
"<<Include"));
102 m_btnInclude->setEnabled (
false);
103 m_btnInclude->setWhatsThis (tr (
"Move the currently selected curve(s) from the excluded list"));
104 layout->addWidget (m_btnInclude, row++, 1);
105 connect (m_btnInclude, SIGNAL (released ()),
this, SLOT (slotInclude()));
107 m_btnExclude =
new QPushButton (tr (
"Exclude>>"));
108 m_btnExclude->setEnabled (
false);
109 m_btnExclude->setWhatsThis (tr (
"Move the currently selected curve(s) from the included list"));
110 layout->addWidget (m_btnExclude, row++, 1);
111 connect (m_btnExclude, SIGNAL (released ()),
this, SLOT (slotExclude()));
116 void DlgSettingsExportFormat::createDelimiters (QHBoxLayout *layoutMisc)
118 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::createDelimiters";
120 QGroupBox *groupDelimiters =
new QGroupBox (tr (
"Delimiters"));
121 layoutMisc->addWidget (groupDelimiters, 1);
123 QVBoxLayout *layoutDelimiters =
new QVBoxLayout;
124 groupDelimiters->setLayout (layoutDelimiters);
126 m_btnDelimitersCommas =
new QRadioButton (exportDelimiterToString (EXPORT_DELIMITER_COMMA));
127 m_btnDelimitersCommas->setWhatsThis (tr (
"Exported file will have commas between adjacent values, unless overridden by tabs in TSV files."));
128 layoutDelimiters->addWidget (m_btnDelimitersCommas);
129 connect (m_btnDelimitersCommas, SIGNAL (released ()),
this, SLOT (slotDelimitersCommas()));
131 m_btnDelimitersSpaces =
new QRadioButton (exportDelimiterToString (EXPORT_DELIMITER_SPACE));
132 m_btnDelimitersSpaces->setWhatsThis (tr (
"Exported file will have spaces between adjacent values, unless overridden by commas in CSV files, " 133 "or tabs in TSV files."));
134 layoutDelimiters->addWidget (m_btnDelimitersSpaces);
135 connect (m_btnDelimitersSpaces, SIGNAL (released ()),
this, SLOT (slotDelimitersSpaces()));
137 m_btnDelimitersTabs =
new QRadioButton (exportDelimiterToString (EXPORT_DELIMITER_TAB));
138 m_btnDelimitersTabs->setWhatsThis (tr (
"Exported file will have tabs between adjacent values, unless overridden by commas in CSV files."));
139 layoutDelimiters->addWidget (m_btnDelimitersTabs);
140 connect (m_btnDelimitersTabs, SIGNAL (released ()),
this, SLOT (slotDelimitersTabs()));
142 m_btnDelimitersSemicolons =
new QRadioButton (exportDelimiterToString (EXPORT_DELIMITER_SEMICOLON));
143 m_btnDelimitersSemicolons->setWhatsThis (tr (
"Exported file will have semicolons between adjacent values, unless overridden by commas in CSV files."));
144 layoutDelimiters->addWidget (m_btnDelimitersSemicolons);
145 connect (m_btnDelimitersSemicolons, SIGNAL (released ()),
this, SLOT (slotDelimitersSemicolons()));
147 m_chkOverrideCsvTsv =
new QCheckBox (tr (
"Override in CSV/TSV files"));
148 m_chkOverrideCsvTsv->setWhatsThis (tr (
"Comma-separated value (CSV) files and tab-separated value (TSV) files will use commas and tabs " 149 "respectively, unless this setting is selected. Selecting this setting will apply the delimiter setting " 151 connect (m_chkOverrideCsvTsv, SIGNAL (stateChanged (
int)),
this, SLOT (slotOverrideCsvTsv(
int)));
152 layoutDelimiters->addWidget (m_chkOverrideCsvTsv);
155 void DlgSettingsExportFormat::createFileLayout (QHBoxLayout *layoutMisc)
157 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::createFileLayout";
159 QGroupBox *groupLayout =
new QGroupBox (tr (
"Layout"));
160 layoutMisc->addWidget (groupLayout, 1);
162 QVBoxLayout *layoutLayout =
new QVBoxLayout;
163 groupLayout->setLayout (layoutLayout);
165 m_btnCurvesLayoutAllCurves =
new QRadioButton (tr (
"All curves on each line"));
166 m_btnCurvesLayoutAllCurves->setWhatsThis (tr (
"Exported file will have, on each line, " 167 "an X value, the Y value for the first curve, the Y value for the second curve,..."));
168 layoutLayout->addWidget (m_btnCurvesLayoutAllCurves);
169 connect (m_btnCurvesLayoutAllCurves, SIGNAL (released()),
this, SLOT (slotFunctionsLayoutAllCurves ()));
171 m_btnCurvesLayoutOneCurve =
new QRadioButton (tr (
"One curve on each line"));
172 m_btnCurvesLayoutOneCurve->setWhatsThis (tr (
"Exported file will have all the points for " 173 "the first curve, with one X-Y pair on each line, then the points for the second curve,..."));
174 layoutLayout->addWidget (m_btnCurvesLayoutOneCurve);
175 connect (m_btnCurvesLayoutOneCurve, SIGNAL (released()),
this, SLOT (slotFunctionsLayoutOneCurve ()));
178 void DlgSettingsExportFormat::createFunctionsPointsSelection (QHBoxLayout *layoutFunctions)
180 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::createFunctionsPointsSelection";
182 QGroupBox *groupPointsSelection =
new QGroupBox (tr (
"Function Points Selection"));
183 layoutFunctions->addWidget (groupPointsSelection, 1);
185 QGridLayout *layoutPointsSelections =
new QGridLayout;
186 groupPointsSelection->setLayout (layoutPointsSelections);
188 layoutPointsSelections->setColumnMinimumWidth(0, MIN_INDENT_COLUMN_WIDTH);
189 layoutPointsSelections->setColumnStretch (0, 0);
190 layoutPointsSelections->setColumnStretch (1, 0);
191 layoutPointsSelections->setColumnStretch (2, 0);
192 layoutPointsSelections->setColumnStretch (3, 1);
196 m_btnFunctionsPointsAllCurves =
new QRadioButton (tr (
"Interpolate Ys at Xs from all curves"));
197 m_btnFunctionsPointsAllCurves->setWhatsThis (tr (
"Exported file will have values at every unique X " 198 "value from every curve. Y values will be linearly interpolated if necessary"));
199 layoutPointsSelections->addWidget (m_btnFunctionsPointsAllCurves, row++, 0, 1, 4);
200 connect (m_btnFunctionsPointsAllCurves, SIGNAL (released()),
this, SLOT (slotFunctionsPointsAllCurves()));
202 m_btnFunctionsPointsFirstCurve =
new QRadioButton (tr (
"Interpolate Ys at Xs from first curve"));
203 m_btnFunctionsPointsFirstCurve->setWhatsThis (tr (
"Exported file will have values at every unique X " 204 "value from the first curve. Y values will be linearly interpolated if necessary"));
205 layoutPointsSelections->addWidget (m_btnFunctionsPointsFirstCurve, row++, 0, 1, 4);
206 connect (m_btnFunctionsPointsFirstCurve, SIGNAL (released()),
this, SLOT (slotFunctionsPointsFirstCurve()));
208 m_btnFunctionsPointsEvenlySpaced =
new QRadioButton (tr (
"Interpolate Ys at evenly spaced X values."));
209 m_btnFunctionsPointsEvenlySpaced->setWhatsThis (tr (
"Exported file will have values at evenly spaced X values, separated by the interval selected below."));
210 layoutPointsSelections->addWidget (m_btnFunctionsPointsEvenlySpaced, row++, 0, 1, 4);
211 connect (m_btnFunctionsPointsEvenlySpaced, SIGNAL (released()),
this, SLOT (slotFunctionsPointsEvenlySpaced()));
213 QLabel *labelInterval =
new QLabel (tr (
"Interval:"));
214 layoutPointsSelections->addWidget (labelInterval, row, 1, 1, 1, Qt::AlignRight);
216 m_editFunctionsPointsEvenlySpacing =
new QLineEdit;
217 m_validatorFunctionsPointsEvenlySpacing =
new QDoubleValidator;
218 m_editFunctionsPointsEvenlySpacing->setValidator (m_validatorFunctionsPointsEvenlySpacing);
219 m_editFunctionsPointsEvenlySpacing->setMinimumWidth (MIN_EDIT_WIDTH);
220 m_editFunctionsPointsEvenlySpacing->setMaximumWidth (MAX_EDIT_WIDTH);
221 m_editFunctionsPointsEvenlySpacing->setWhatsThis (tr (
"Interval, in the units of X, between successive points in the X direction.\n\n" 222 "If the scale is linear, then this interval is added to successive X values. If the scale is " 223 "logarithmic, then this interval is multiplied to successive X values.\n\n" 224 "The X values will be automatically aligned along simple numbers. If the first and/or last " 225 "points are not along the aligned X values, then one or two additional points are added " 227 layoutPointsSelections->addWidget (m_editFunctionsPointsEvenlySpacing, row, 2, 1, 1, Qt::AlignLeft);
228 connect (m_editFunctionsPointsEvenlySpacing, SIGNAL (textChanged(
const QString &)),
this, SLOT (slotFunctionsPointsEvenlySpacedInterval(
const QString &)));
230 m_cmbFunctionsPointsEvenlySpacingUnits =
new QComboBox;
231 m_cmbFunctionsPointsEvenlySpacingUnits->setWhatsThis (tr (
"Units for spacing interval.\n\n" 232 "Pixel units are preferred when the spacing is to be independent of the X scale. The spacing will be " 233 "consistent across the graph, even if the X scale is logarithmic.\n\n" 234 "Graph units are preferred when the spacing is to depend on the X scale."));
235 m_cmbFunctionsPointsEvenlySpacingUnits->addItem(exportPointsIntervalUnitsToString (EXPORT_POINTS_INTERVAL_UNITS_GRAPH),
236 QVariant (EXPORT_POINTS_INTERVAL_UNITS_GRAPH));
237 m_cmbFunctionsPointsEvenlySpacingUnits->addItem(exportPointsIntervalUnitsToString (EXPORT_POINTS_INTERVAL_UNITS_SCREEN),
238 QVariant (EXPORT_POINTS_INTERVAL_UNITS_SCREEN));
239 connect (m_cmbFunctionsPointsEvenlySpacingUnits, SIGNAL (activated (
const QString &)),
240 this, SLOT (slotFunctionsPointsEvenlySpacedIntervalUnits (
const QString &)));
241 layoutPointsSelections->addWidget (m_cmbFunctionsPointsEvenlySpacingUnits, row++, 3, 1, 1, Qt::AlignLeft);
243 m_btnFunctionsPointsRaw =
new QRadioButton (tr (
"Raw Xs and Ys"));
244 m_btnFunctionsPointsRaw->setWhatsThis (tr (
"Exported file will have only original X and Y values"));
245 layoutPointsSelections->addWidget (m_btnFunctionsPointsRaw, row++, 0, 1, 4);
246 connect (m_btnFunctionsPointsRaw, SIGNAL (released()),
this, SLOT (slotFunctionsPointsRaw()));
249 void DlgSettingsExportFormat::createHeader (QHBoxLayout *layoutMisc)
251 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::createHeader";
253 const int COLUMN_RADIO_BUTTONS = 0, COLUMN_EMPTY = 1, COLUMN_LABEL = 2;
255 QGroupBox *groupHeader =
new QGroupBox (tr (
"Header"));
256 layoutMisc->addWidget (groupHeader, 1);
258 QGridLayout *layoutHeader =
new QGridLayout;
259 layoutHeader->setColumnMinimumWidth(COLUMN_EMPTY,
260 MIN_HEADER_EMPTY_COLUMN_WIDTH);
261 groupHeader->setLayout (layoutHeader);
264 m_btnHeaderNone =
new QRadioButton (exportHeaderToString (EXPORT_HEADER_NONE));
265 m_btnHeaderNone->setWhatsThis (tr (
"Exported file will have no header line"));
266 layoutHeader->addWidget (m_btnHeaderNone, row++, COLUMN_RADIO_BUTTONS, 1, 1);
267 connect (m_btnHeaderNone, SIGNAL (released ()),
this, SLOT (slotHeaderNone()));
269 m_btnHeaderSimple =
new QRadioButton (exportHeaderToString (EXPORT_HEADER_SIMPLE));
270 m_btnHeaderSimple->setWhatsThis (tr (
"Exported file will have simple header line"));
271 layoutHeader->addWidget (m_btnHeaderSimple, row++, COLUMN_RADIO_BUTTONS, 1, 1);
272 connect (m_btnHeaderSimple, SIGNAL (released ()),
this, SLOT (slotHeaderSimple()));
274 m_btnHeaderGnuplot =
new QRadioButton (exportHeaderToString (EXPORT_HEADER_GNUPLOT));
275 m_btnHeaderGnuplot->setWhatsThis (tr (
"Exported file will have gnuplot header line"));
276 layoutHeader->addWidget (m_btnHeaderGnuplot, row++, COLUMN_RADIO_BUTTONS, 1, 1);
277 connect (m_btnHeaderGnuplot, SIGNAL (released()),
this, SLOT (slotHeaderGnuplot()));
279 createXLabel (layoutHeader,
285 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::createOptionalSaveDefault";
287 m_btnSaveDefault =
new QPushButton (tr (
"Save As Default"));
288 m_btnSaveDefault->setWhatsThis (tr (
"Save the settings for use as future defaults."));
289 connect (m_btnSaveDefault, SIGNAL (released ()),
this, SLOT (slotSaveDefault ()));
290 layout->addWidget (m_btnSaveDefault, 0, Qt::AlignLeft);
293 void DlgSettingsExportFormat::createPreview(QGridLayout *layout,
int &row)
295 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::createPreview";
297 QLabel *label =
new QLabel (tr (
"Preview"));
298 layout->addWidget (label, row, 0, 1, 3);
301 QLabel *labelLegend =
new QLabel;
302 labelLegend->setTextFormat (Qt::RichText);
303 QString legendHtml = QString (
"<span style=\"background-color: %1\"> Functions </span>" 305 "<span style=\"background-color: %2\"> Relations </span>")
306 .arg (COLOR_FUNCTIONS)
307 .arg (COLOR_RELATIONS);
308 labelLegend->setText (legendHtml);
309 layout->addWidget (labelLegend, row++, 1, 1, 2, Qt::AlignRight);
311 m_editPreview =
new QTextEdit;
312 m_editPreview->setReadOnly (
true);
313 m_editPreview->setWhatsThis (tr (
"Preview window shows how current settings affect the exported file.\n\n" 314 "Functions (shown here in blue) are output first, followed by relations " 315 "(shown here in green) if any exist."));
317 m_editPreview->document()->setDefaultStyleSheet(
"div { padding-left: 20px; }");
318 QPalette p = m_editPreview->palette();
319 p.setColor (QPalette::Base, QColor (240, 240, 240));
320 m_editPreview->setPalette (p);
322 layout->addWidget (m_editPreview, row++, 0, 1, 3);
325 void DlgSettingsExportFormat::createRelationsPointsSelection (QHBoxLayout *layoutRelations)
327 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::createRelationsPointsSelection";
329 QGroupBox *groupPointsSelection =
new QGroupBox (tr (
"Relation Points Selection"));
330 layoutRelations->addWidget (groupPointsSelection);
332 QGridLayout *layoutPointsSelections =
new QGridLayout;
333 groupPointsSelection->setLayout (layoutPointsSelections);
335 layoutPointsSelections->setColumnMinimumWidth(0, MIN_INDENT_COLUMN_WIDTH);
336 layoutPointsSelections->setColumnStretch (0, 0);
337 layoutPointsSelections->setColumnStretch (1, 0);
338 layoutPointsSelections->setColumnStretch (2, 0);
339 layoutPointsSelections->setColumnStretch (3, 1);
343 m_btnRelationsPointsEvenlySpaced =
new QRadioButton (tr (
"Interpolate Xs and Ys at evenly spaced intervals."));
344 m_btnRelationsPointsEvenlySpaced->setWhatsThis (tr (
"Exported file will have points evenly spaced along each relation, separated by the interval " 345 "selected below. If the last interval does not end at the last point, then a shorter last interval " 346 "is added that ends on the last point."));
347 layoutPointsSelections->addWidget (m_btnRelationsPointsEvenlySpaced, row++, 0, 1, 4);
348 connect (m_btnRelationsPointsEvenlySpaced, SIGNAL (released()),
this, SLOT (slotRelationsPointsEvenlySpaced()));
350 QLabel *labelInterval =
new QLabel (tr (
"Interval:"));
351 layoutPointsSelections->addWidget (labelInterval, row, 1, 1, 1, Qt::AlignRight);
353 m_editRelationsPointsEvenlySpacing =
new QLineEdit;
354 m_validatorRelationsPointsEvenlySpacing =
new QDoubleValidator;
355 m_editRelationsPointsEvenlySpacing->setValidator (m_validatorRelationsPointsEvenlySpacing);
356 m_editRelationsPointsEvenlySpacing->setMinimumWidth (MIN_EDIT_WIDTH);
357 m_editRelationsPointsEvenlySpacing->setMaximumWidth (MAX_EDIT_WIDTH);
358 m_editRelationsPointsEvenlySpacing->setWhatsThis (tr (
"Interval between successive points when " 359 "exporting at evenly spaced (X,Y) coordinates."));
360 layoutPointsSelections->addWidget (m_editRelationsPointsEvenlySpacing, row, 2, 1, 1, Qt::AlignLeft);
361 connect (m_editRelationsPointsEvenlySpacing, SIGNAL (textChanged(
const QString &)),
this, SLOT (slotRelationsPointsEvenlySpacedInterval(
const QString &)));
363 m_cmbRelationsPointsEvenlySpacingUnits =
new QComboBox;
364 m_cmbRelationsPointsEvenlySpacingUnits->setWhatsThis (tr (
"Units for spacing interval.\n\n" 365 "Pixel units are preferred when the spacing is to be independent of the X and Y scales. The spacing will be " 366 "consistent across the graph, even if a scale is logarithmic or the X and Y scales are different.\n\n" 367 "Graph units are usually preferred when the X and Y scales are identical."));
368 m_cmbRelationsPointsEvenlySpacingUnits->addItem(exportPointsIntervalUnitsToString (EXPORT_POINTS_INTERVAL_UNITS_GRAPH),
369 QVariant (EXPORT_POINTS_INTERVAL_UNITS_GRAPH));
370 m_cmbRelationsPointsEvenlySpacingUnits->addItem(exportPointsIntervalUnitsToString (EXPORT_POINTS_INTERVAL_UNITS_SCREEN),
371 QVariant (EXPORT_POINTS_INTERVAL_UNITS_SCREEN));
372 connect (m_cmbRelationsPointsEvenlySpacingUnits, SIGNAL (activated (
const QString &)),
373 this, SLOT (slotRelationsPointsEvenlySpacedIntervalUnits (
const QString &)));
374 layoutPointsSelections->addWidget (m_cmbRelationsPointsEvenlySpacingUnits, row++, 3, 1, 1, Qt::AlignLeft);
376 m_btnRelationsPointsRaw =
new QRadioButton (tr (
"Raw Xs and Ys"));
377 m_btnRelationsPointsRaw->setWhatsThis (tr (
"Exported file will have only original X and Y values"));
378 layoutPointsSelections->addWidget (m_btnRelationsPointsRaw, row++, 0, 1, 4);
379 connect (m_btnRelationsPointsRaw, SIGNAL (released()),
this, SLOT (slotRelationsPointsRaw()));
384 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::createSubPanel";
386 QWidget *subPanel =
new QWidget ();
387 QGridLayout *layout =
new QGridLayout (subPanel);
388 subPanel->setLayout (layout);
391 createCurveSelection (layout, row);
393 createTabWidget (layout,
396 QWidget *widgetMisc =
new QWidget;
397 layout->addWidget (widgetMisc, row++, 0, 1, 3);
398 QHBoxLayout *layoutMisc =
new QHBoxLayout;
399 widgetMisc->setLayout (layoutMisc);
401 createDelimiters (layoutMisc);
402 createHeader (layoutMisc);
403 createFileLayout (layoutMisc);
405 createPreview (layout, row);
410 void DlgSettingsExportFormat::createTabWidget (QGridLayout *layout,
413 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::createTabWidget";
415 m_tabWidget =
new QTabWidget;
417 layout->addWidget (m_tabWidget, row++, 0, 1, 3);
419 QWidget *widgetFunctions =
new QWidget;
420 int indexFunctions = m_tabWidget->addTab (widgetFunctions, tr (
"Functions"));
421 QWidget *tabFunctions = m_tabWidget->widget (indexFunctions);
422 tabFunctions->setWhatsThis (tr (
"Functions Tab\n\n" 423 "Controls for specifying the format of functions during export"));
424 QHBoxLayout *layoutFunctions =
new QHBoxLayout;
425 widgetFunctions->setLayout (layoutFunctions);
427 QWidget *widgetRelations =
new QWidget;
428 int indexRelations = m_tabWidget->addTab (widgetRelations, tr (
"Relations"));
429 QWidget *tabRelations = m_tabWidget->widget (indexRelations);
430 tabRelations->setWhatsThis (tr (
"Relations Tab\n\n" 431 "Controls for specifying the format of relations during export"));
432 QHBoxLayout *layoutRelations =
new QHBoxLayout;
433 widgetRelations->setLayout (layoutRelations);
436 connect (m_tabWidget, SIGNAL (currentChanged (
int)),
this, SLOT (slotTabChanged (
int)));
438 createFunctionsPointsSelection (layoutFunctions);
439 createRelationsPointsSelection (layoutRelations);
442 void DlgSettingsExportFormat::createXLabel (QGridLayout *layoutHeader,
445 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::createXLabel";
451 title =
new QLabel (tr (
"X Label:"));
453 title =
new QLabel (tr (
"Theta Label:"));
455 layoutHeader->addWidget (title, row++, colLabel, 1, 1);
457 m_editXLabel =
new QLineEdit;
459 m_editXLabel->setWhatsThis (tr (
"Label in the header for x values"));
461 m_editXLabel->setWhatsThis (tr (
"Label in the header for theta values"));
463 layoutHeader->addWidget (m_editXLabel, row++, colLabel, 1, 1);
464 connect (m_editXLabel, SIGNAL (textChanged (
const QString &)),
this, SLOT (slotXLabel(
const QString &)));
467 QString DlgSettingsExportFormat::exportedTextToExportedHtml (
const QString &text,
468 const QString &color)
const 470 QRegExp re (
"<br>$");
472 QString textCopy (text);
473 QString replaced = textCopy
474 .replace (
"\n",
"<br>")
475 .replace (
" ",
" ")
477 .replace (
"\t",
" ");
479 QString html = QString (
"<div style=\"display: inline; background-color: %1\">%2</div>")
486 bool DlgSettingsExportFormat::goodIntervalFunctions()
const 490 QString textFunctions = m_editFunctionsPointsEvenlySpacing->text();
493 bool isGood = (m_validatorFunctionsPointsEvenlySpacing->validate (textFunctions, posFunctions) == QValidator::Acceptable);
495 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::goodIntervalFunctions" 496 <<
" text=" << textFunctions.toLatin1().data()
497 <<
" good=" << (isGood ?
"true" :
"false")
498 <<
" bottom=" << m_validatorFunctionsPointsEvenlySpacing->bottom()
499 <<
" top=" << m_validatorFunctionsPointsEvenlySpacing->top();
504 bool DlgSettingsExportFormat::goodIntervalRelations()
const 508 QString textRelations = m_editRelationsPointsEvenlySpacing->text();
511 bool isGood = (m_validatorRelationsPointsEvenlySpacing->validate (textRelations, posRelations) == QValidator::Acceptable);
513 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::goodIntervalRelations" 514 <<
" text=" << textRelations.toLatin1().data()
515 <<
" good=" << (isGood ?
"true" :
"false")
516 <<
" bottom=" << m_validatorRelationsPointsEvenlySpacing->bottom()
517 <<
" top=" << m_validatorRelationsPointsEvenlySpacing->top();
524 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::handleOk";
528 *m_modelExportBefore,
529 *m_modelExportAfter);
535 void DlgSettingsExportFormat::initializeIntervalConstraints ()
537 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::initializeIntervalConstraints";
539 const int MAX_POINTS_ACROSS_RANGE = 5000;
544 Functor2wRet<const QString &, const Point &, CallbackSearchReturn> ftorWithCallback = functor_ret (ftor,
554 m_minIntervalGraph = maxSizeGraph / MAX_POINTS_ACROSS_RANGE;
555 m_minIntervalScreen = maxSizeScreen / MAX_POINTS_ACROSS_RANGE;
560 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::load";
565 if (m_modelExportBefore != 0) {
566 delete m_modelExportBefore;
568 if (m_modelExportAfter != 0) {
569 delete m_modelExportAfter;
577 m_listExcluded->clear();
579 QStringList::const_iterator itr;
580 for (itr = curveNamesExcluded.begin (); itr != curveNamesExcluded.end(); ++itr) {
581 QString curveNameNotExported = *itr;
582 m_listExcluded->addItem (curveNameNotExported);
586 m_listIncluded->clear();
588 for (itr = curveNamesAll.begin (); itr != curveNamesAll.end(); itr++) {
589 QString curveName = *itr;
590 if (!curveNamesExcluded.contains (curveName)) {
591 m_listIncluded->addItem (curveName);
596 m_btnFunctionsPointsAllCurves->setChecked (pointsSelectionFunctions == EXPORT_POINTS_SELECTION_FUNCTIONS_INTERPOLATE_ALL_CURVES);
597 m_btnFunctionsPointsFirstCurve->setChecked (pointsSelectionFunctions == EXPORT_POINTS_SELECTION_FUNCTIONS_INTERPOLATE_FIRST_CURVE);
598 m_btnFunctionsPointsEvenlySpaced->setChecked (pointsSelectionFunctions == EXPORT_POINTS_SELECTION_FUNCTIONS_INTERPOLATE_PERIODIC);
599 m_btnFunctionsPointsRaw->setChecked (pointsSelectionFunctions == EXPORT_POINTS_SELECTION_FUNCTIONS_RAW);
601 ExportLayoutFunctions layoutFunctions = m_modelExportAfter->
layoutFunctions ();
602 m_btnCurvesLayoutAllCurves->setChecked (layoutFunctions == EXPORT_LAYOUT_ALL_PER_LINE);
603 m_btnCurvesLayoutOneCurve->setChecked (layoutFunctions == EXPORT_LAYOUT_ONE_PER_LINE);
606 m_btnRelationsPointsEvenlySpaced->setChecked (pointsSelectionRelations == EXPORT_POINTS_SELECTION_RELATIONS_INTERPOLATE);
607 m_btnRelationsPointsRaw->setChecked (pointsSelectionRelations == EXPORT_POINTS_SELECTION_RELATIONS_RAW);
609 ExportDelimiter delimiter = m_modelExportAfter->
delimiter ();
610 m_btnDelimitersCommas->setChecked (delimiter == EXPORT_DELIMITER_COMMA);
611 m_btnDelimitersSpaces->setChecked (delimiter == EXPORT_DELIMITER_SPACE);
612 m_btnDelimitersTabs->setChecked (delimiter == EXPORT_DELIMITER_TAB);
613 m_btnDelimitersSemicolons->setChecked (delimiter == EXPORT_DELIMITER_SEMICOLON);
615 m_chkOverrideCsvTsv->setChecked (m_modelExportAfter->
overrideCsvTsv());
617 ExportHeader header = m_modelExportAfter->
header ();
618 m_btnHeaderNone->setChecked (header == EXPORT_HEADER_NONE);
619 m_btnHeaderSimple->setChecked (header == EXPORT_HEADER_SIMPLE);
620 m_btnHeaderGnuplot->setChecked (header == EXPORT_HEADER_GNUPLOT);
622 m_editXLabel->setText (m_modelExportAfter->
xLabel());
629 int indexFunctions = m_cmbFunctionsPointsEvenlySpacingUnits->findData (QVariant (pointsIntervalUnitsFunctions));
630 int indexRelations = m_cmbRelationsPointsEvenlySpacingUnits->findData (QVariant (pointsIntervalUnitsRelations));
631 m_cmbFunctionsPointsEvenlySpacingUnits->setCurrentIndex (indexFunctions);
632 m_cmbRelationsPointsEvenlySpacingUnits->setCurrentIndex (indexRelations);
634 initializeIntervalConstraints ();
636 updateControlsUponLoad ();
638 updateIntervalConstraints();
646 setMinimumHeight (MINIMUM_HEIGHT);
650 void DlgSettingsExportFormat::slotDelimitersCommas()
652 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotDelimitersCommas";
654 m_modelExportAfter->
setDelimiter(EXPORT_DELIMITER_COMMA);
659 void DlgSettingsExportFormat::slotDelimitersSemicolons()
661 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotDelimitersSemicolons";
663 m_modelExportAfter->
setDelimiter(EXPORT_DELIMITER_SEMICOLON);
668 void DlgSettingsExportFormat::slotDelimitersSpaces()
670 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotDelimitersSpaces";
672 m_modelExportAfter->
setDelimiter(EXPORT_DELIMITER_SPACE);
677 void DlgSettingsExportFormat::slotDelimitersTabs()
679 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotDelimitersTabs";
686 void DlgSettingsExportFormat::slotExclude ()
688 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotExclude";
692 QStringList excluded;
693 for (i = 0; i < m_listIncluded->count(); i++) {
694 if (m_listIncluded->item(i)->isSelected()) {
695 excluded += m_listIncluded->item(i)->text();
700 for (i = 0; i < excluded.count(); i++) {
701 QString curveName = excluded.at (i);
702 m_listExcluded->addItem (curveName);
706 for (i = m_listIncluded->count() - 1; i>= 0; i--) {
707 QString curveName = m_listIncluded->item(i)->text();
708 if (excluded.contains (curveName)) {
709 QListWidgetItem *item = m_listIncluded->item (i);
710 m_listIncluded->removeItemWidget (item);
720 void DlgSettingsExportFormat::slotFunctionsLayoutAllCurves()
722 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotFunctionsLayoutAllCurves";
729 void DlgSettingsExportFormat::slotFunctionsLayoutOneCurve()
731 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotFunctionsLayoutOneCurve";
738 void DlgSettingsExportFormat::slotFunctionsPointsAllCurves()
740 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotFunctionsPointsAllCurves";
747 void DlgSettingsExportFormat::slotFunctionsPointsEvenlySpaced()
749 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotFunctionsPointsEvenlySpaced";
756 void DlgSettingsExportFormat::slotFunctionsPointsEvenlySpacedInterval(
const QString &)
758 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotFunctionsPointsEvenlySpacedInterval";
761 if (goodIntervalFunctions()) {
766 m_editPreview->setText(EMPTY_PREVIEW);
770 void DlgSettingsExportFormat::slotFunctionsPointsEvenlySpacedIntervalUnits(
const QString &)
772 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotFunctionsPointsEvenlySpacedIntervalUnits";
774 int index = m_cmbFunctionsPointsEvenlySpacingUnits->currentIndex();
775 ExportPointsIntervalUnits units = (ExportPointsIntervalUnits) m_cmbFunctionsPointsEvenlySpacingUnits->itemData (index).toInt();
778 updateIntervalConstraints();
783 void DlgSettingsExportFormat::slotFunctionsPointsFirstCurve()
785 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotFunctionsPointsFirstCurve";
792 void DlgSettingsExportFormat::slotFunctionsPointsRaw()
794 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotFunctionsPointsRaw";
801 void DlgSettingsExportFormat::slotHeaderGnuplot()
803 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotHeaderGnuplot";
805 m_modelExportAfter->
setHeader(EXPORT_HEADER_GNUPLOT);
810 void DlgSettingsExportFormat::slotHeaderNone()
812 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotHeaderNone";
814 m_modelExportAfter->
setHeader(EXPORT_HEADER_NONE);
819 void DlgSettingsExportFormat::slotHeaderSimple()
821 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotHeaderSimple";
823 m_modelExportAfter->
setHeader(EXPORT_HEADER_SIMPLE);
828 void DlgSettingsExportFormat::slotInclude ()
830 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotInclude";
834 QStringList included;
835 for (i = 0; i < m_listExcluded->count(); i++) {
836 if (m_listExcluded->item(i)->isSelected()) {
837 included += m_listExcluded->item(i)->text();
842 for (i = 0; i < included.count(); i++) {
843 QString curveName = included.at (i);
844 m_listIncluded->addItem (curveName);
848 QStringList excluded;
849 for (i = m_listExcluded->count() - 1; i>= 0; i--) {
850 QString curveName = m_listExcluded->item(i)->text();
851 QListWidgetItem *item = m_listExcluded->item (i);
852 if (included.contains (curveName)) {
853 m_listExcluded->removeItemWidget (item);
856 excluded += item->text();
865 void DlgSettingsExportFormat::slotListExcluded()
867 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotListExcluded";
873 void DlgSettingsExportFormat::slotListIncluded()
875 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotListIncluded";
881 void DlgSettingsExportFormat::slotOverrideCsvTsv(
int)
883 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotOverrideCsvTsv";
890 void DlgSettingsExportFormat::slotRelationsPointsEvenlySpaced()
892 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotRelationsPointsEvenlySpaced";
899 void DlgSettingsExportFormat::slotRelationsPointsEvenlySpacedInterval(
const QString &)
901 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotRelationsPointsEvenlySpacedInterval";
908 void DlgSettingsExportFormat::slotRelationsPointsEvenlySpacedIntervalUnits(
const QString &)
910 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotRelationsPointsEvenlySpacedIntervalUnits";
912 int index = m_cmbRelationsPointsEvenlySpacingUnits->currentIndex();
913 ExportPointsIntervalUnits units = (ExportPointsIntervalUnits) m_cmbRelationsPointsEvenlySpacingUnits->itemData (index).toInt();
916 updateIntervalConstraints();
921 void DlgSettingsExportFormat::slotRelationsPointsRaw()
923 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotRelationsPointsRaw";
930 void DlgSettingsExportFormat::slotSaveDefault()
932 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotSaveDefault";
934 QSettings settings (SETTINGS_ENGAUGE, SETTINGS_DIGITIZER);
935 settings.beginGroup (SETTINGS_GROUP_EXPORT);
937 settings.setValue (SETTINGS_EXPORT_DELIMITER,
938 QVariant (m_modelExportAfter->
delimiter()));
939 settings.setValue (SETTINGS_EXPORT_HEADER,
940 QVariant (m_modelExportAfter->
header()));
941 settings.setValue (SETTINGS_EXPORT_LAYOUT_FUNCTIONS,
943 settings.setValue (SETTINGS_EXPORT_POINTS_INTERVAL_FUNCTIONS,
945 settings.setValue (SETTINGS_EXPORT_POINTS_INTERVAL_RELATIONS,
947 settings.setValue (SETTINGS_EXPORT_POINTS_INTERVAL_UNITS_FUNCTIONS,
949 settings.setValue (SETTINGS_EXPORT_POINTS_INTERVAL_UNITS_RELATIONS,
951 settings.setValue (SETTINGS_EXPORT_POINTS_SELECTION_FUNCTIONS,
953 settings.setValue (SETTINGS_EXPORT_POINTS_SELECTION_RELATIONS,
955 settings.setValue (SETTINGS_EXPORT_X_LABEL,
956 QVariant (m_modelExportAfter->
xLabel()));
958 settings.endGroup ();
961 void DlgSettingsExportFormat::slotTabChanged (
int)
963 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotTabChanged";
968 void DlgSettingsExportFormat::slotXLabel(
const QString &)
970 LOG4CPP_INFO_S ((*mainCat)) <<
"DlgSettingsExportFormat::slotXLabel";
972 m_modelExportAfter->
setXLabel (m_editXLabel->text());
977 void DlgSettingsExportFormat::updateControls ()
979 bool isGoodState = goodIntervalFunctions() &&
980 goodIntervalRelations();
983 int selectedForInclude = m_listExcluded->selectedItems().count();
984 int selectedForExclude = m_listIncluded->selectedItems().count();
985 int inInclude = m_listIncluded->count();
987 m_btnInclude->setEnabled (selectedForInclude > 0);
988 m_btnExclude->setEnabled ((selectedForExclude > 0) && (inInclude - selectedForExclude > 0));
990 m_editFunctionsPointsEvenlySpacing->setEnabled (m_haveFunction && m_btnFunctionsPointsEvenlySpaced->isChecked ());
991 m_editRelationsPointsEvenlySpacing->setEnabled (m_haveRelation && m_btnRelationsPointsEvenlySpaced->isChecked ());
993 m_editXLabel->setEnabled (!m_btnHeaderNone->isChecked());
996 void DlgSettingsExportFormat::updateControlsUponLoad ()
1000 m_haveFunction =
false;
1001 m_haveRelation =
false;
1003 QStringList curveNames = curveStyles.
curveNames();
1005 QStringList::const_iterator itr;
1006 for (itr = curveNames.begin(); itr != curveNames.end (); itr++) {
1007 QString curveName = *itr;
1010 if (curveConnectAs == CONNECT_AS_FUNCTION_SMOOTH || curveConnectAs == CONNECT_AS_FUNCTION_STRAIGHT) {
1011 m_haveFunction =
true;
1012 }
else if (curveConnectAs == CONNECT_AS_RELATION_SMOOTH || curveConnectAs == CONNECT_AS_RELATION_STRAIGHT) {
1013 m_haveRelation =
true;
1018 m_btnFunctionsPointsAllCurves->setEnabled (m_haveFunction);
1019 m_btnFunctionsPointsFirstCurve->setEnabled (m_haveFunction);
1020 m_btnFunctionsPointsEvenlySpaced->setEnabled (m_haveFunction);
1021 m_editFunctionsPointsEvenlySpacing->setEnabled (m_haveFunction);
1022 m_cmbFunctionsPointsEvenlySpacingUnits->setEnabled (m_haveFunction);
1023 m_btnFunctionsPointsRaw->setEnabled (m_haveFunction);
1026 m_btnRelationsPointsEvenlySpaced->setEnabled (m_haveRelation);
1027 m_editRelationsPointsEvenlySpacing->setEnabled (m_haveRelation);
1028 m_cmbRelationsPointsEvenlySpacingUnits->setEnabled (m_haveRelation);
1029 m_btnRelationsPointsRaw->setEnabled (m_haveRelation);
1032 if (!m_haveRelation) {
1033 m_tabWidget->setCurrentIndex (TAB_WIDGET_INDEX_FUNCTIONS);
1034 }
else if (!m_haveFunction) {
1035 m_tabWidget->setCurrentIndex (TAB_WIDGET_INDEX_RELATIONS);
1039 void DlgSettingsExportFormat::updateIntervalConstraints ()
1042 m_minIntervalGraph :
1043 m_minIntervalScreen);
1045 m_minIntervalGraph :
1046 m_minIntervalScreen);
1048 if (m_tabWidget->currentIndex() == TAB_WIDGET_INDEX_FUNCTIONS) {
1052 m_editFunctionsPointsEvenlySpacing->setText (QString::number (functionsMin));
1056 m_validatorFunctionsPointsEvenlySpacing->setBottom (functionsMin);
1062 m_editRelationsPointsEvenlySpacing->setText (QString::number (relationsMin));
1066 m_validatorRelationsPointsEvenlySpacing->setBottom (relationsMin);
1070 void DlgSettingsExportFormat::updatePreview()
1073 int scrollPosition = m_editPreview->verticalScrollBar()->value();
1075 QString exportedTextFunctions, exportedTextRelations, exportedHtml;
1076 QTextStream strFunctions (&exportedTextFunctions);
1077 QTextStream strRelations (&exportedTextRelations);
1079 if (
mainWindow().transformation().transformIsDefined()) {
1081 unsigned int numWritesSoFar = 0;
1084 exportStrategyFunctions.
exportToFile (*m_modelExportAfter,
1092 exportStrategyRelations.
exportToFile (*m_modelExportAfter,
1103 QString exportedHtmlFunctions, exportedHtmlRelations;
1104 if (! exportedTextFunctions.isEmpty ()) {
1106 exportedHtmlFunctions = exportedTextToExportedHtml (exportedTextFunctions, COLOR_FUNCTIONS);
1108 if (! exportedTextRelations.isEmpty ()) {
1110 exportedHtmlRelations = exportedTextToExportedHtml (exportedTextRelations, COLOR_RELATIONS);
1113 exportedHtml = exportedHtmlFunctions + exportedHtmlRelations;
1117 exportedHtml = tr (
"Preview is unavailable until axis points are defined.");
1120 m_editPreview->setHtml (exportedHtml);
1123 m_editPreview->verticalScrollBar()->setValue (scrollPosition);
CurveStyle curveStyle(const QString &curveName) const
CurveStyle in specified curve.
CurveConnectAs curveConnectAs() const
Get method for connect type.
CallbackSearchReturn callback(const QString &curveName, const Point &point)
Callback method.
QStringList curveNames() const
List of all curve names.
Model for DlgSettingsCurveProperties and CmdSettingsCurveProperties.
void setCmdMediator(CmdMediator &cmdMediator)
Store CmdMediator for easy access by the leaf class.
QRectF boundingRectScreen(bool &isEmpty) const
Screen coordinate bounding rectangle.
void finishPanel(QWidget *subPanel, int minimumWidth=MINIMUM_DIALOG_WIDTH, int minimumHeightOrZero=0)
Add Ok and Cancel buttons to subpanel to get the whole dialog.
Strategy class for exporting to a file. This strategy is external to the Document class so that class...
LineStyle lineStyle() const
Get method for LineStyle.
void exportToFile(const DocumentModelExportFormat &modelExportOverride, const Document &document, const MainWindowModel &modelMainWindow, const Transformation &transformation, QTextStream &str, unsigned int &numWritesSoFar) const
Export Document points according to the settings.
Container for LineStyle and PointStyle for one Curve.
static int MINIMUM_PREVIEW_HEIGHT
Dialog layout constant that guarantees preview has sufficent room.
void enableOk(bool enable)
Let leaf subclass control the Ok button.
QRectF boundingRectGraph(bool &isEmpty) const
Graph coordinate bounding rectangle.
Strategy class for exporting to a file. This strategy is external to the Document class so that class...
Abstract base class for all Settings dialogs.
CurveStyles modelCurveStyles() const
Get method for CurveStyles.
Callback for computing the bounding rectangles of the screen and graph coordinates of the points in t...
MainWindow & mainWindow()
Get method for MainWindow.
QStringList curvesGraphsNames() const
See CurvesGraphs::curvesGraphsNames.
Main window consisting of menu, graphics scene, status bar and optional toolbars as a Single Document...
CmdMediator & cmdMediator()
Provide access to Document information wrapped inside CmdMediator.
void exportToFile(const DocumentModelExportFormat &modelExportOverride, const Document &document, const MainWindowModel &modelMainWindow, const Transformation &transformation, QTextStream &str, unsigned int &numWritesSoFar) const
Export Document points according to the settings.