Engauge Digitizer 2
Loading...
Searching...
No Matches
ExportXThetaValuesMergedFunctions Class Reference

Creates the set of merged x/theta values for exporting functions, using interpolation. More...

#include <ExportXThetaValuesMergedFunctions.h>

Collaboration diagram for ExportXThetaValuesMergedFunctions:
Collaboration graph

Public Member Functions

 ExportXThetaValuesMergedFunctions (const DocumentModelExportFormat &modelExport, const MainWindowModel &modelMainWindow, const ValuesVectorXOrY &xThetaValuesRaw, const Transformation &transformation)
 Single constructor.
ExportValuesXOrY xThetaValues (bool &isOverrun) const
 Resulting x/theta values for all included functions.

Detailed Description

Creates the set of merged x/theta values for exporting functions, using interpolation.

Definition at line 20 of file ExportXThetaValuesMergedFunctions.h.

Constructor & Destructor Documentation

◆ ExportXThetaValuesMergedFunctions()

ExportXThetaValuesMergedFunctions::ExportXThetaValuesMergedFunctions ( const DocumentModelExportFormat & modelExport,
const MainWindowModel & modelMainWindow,
const ValuesVectorXOrY & xThetaValuesRaw,
const Transformation & transformation )

Single constructor.

Definition at line 19 of file ExportXThetaValuesMergedFunctions.cpp.

22 :
23 m_modelExport (modelExport),
24 m_modelMainWindow (modelMainWindow),
25 m_xThetaValuesRaw (xThetaValuesRaw),
26 m_transformation (transformation)
27{
28}

Member Function Documentation

◆ xThetaValues()

ExportValuesXOrY ExportXThetaValuesMergedFunctions::xThetaValues ( bool & isOverrun) const

Resulting x/theta values for all included functions.

Definition at line 303 of file ExportXThetaValuesMergedFunctions.cpp.

304{
305 LOG4CPP_INFO_S ((*mainCat)) << "ExportXThetaValuesMergedFunctions::xThetaValues";
306
307 if (m_modelExport.pointsSelectionFunctions() == EXPORT_POINTS_SELECTION_FUNCTIONS_INTERPOLATE_PERIODIC) {
308
309 ExportValuesXOrY values;
310
311 // Special case that occurs when there are no points
312 if (qAbs (m_modelExport.pointsIntervalFunctions()) <= 0) {
313
314 // Return empty array
315
316 } else {
317
318 bool isLinear = (m_transformation.modelCoords().coordScaleXTheta() == COORD_SCALE_LINEAR);
319
320 if (isLinear) {
321 values = periodicLinear (isOverrun);
322 } else {
323 values = periodicLog (isOverrun);
324 }
325
326 if (isOverrun) {
327
328 // Empty out the array since it is, in the case of overrun, incomplete and therefore confusing at best
329 values.clear();
330
331 }
332 }
333
334 return values;
335
336 } else {
337
338 // Return the gathered values
339 return m_xThetaValuesRaw.keys();
340
341 }
342}
@ COORD_SCALE_LINEAR
Definition CoordScale.h:13
@ EXPORT_POINTS_SELECTION_FUNCTIONS_INTERPOLATE_PERIODIC
QList< double > ExportValuesXOrY
log4cpp::Category * mainCat
Definition Logger.cpp:14
#define LOG4CPP_INFO_S(logger)
Definition convenience.h:18

The documentation for this class was generated from the following files: