41 lines
1.1 KiB
C
41 lines
1.1 KiB
C
|
|
#ifndef PEAKPOINT_H
|
||
|
|
#define PEAKPOINT_H
|
||
|
|
|
||
|
|
#include <QPointF>
|
||
|
|
|
||
|
|
#include "filemanager.h"
|
||
|
|
|
||
|
|
|
||
|
|
namespace PeakPoint{
|
||
|
|
void setExperimentData(const QVector<FileManager::ExperimentData>&);
|
||
|
|
void setRegionPointX(const double,const double);
|
||
|
|
double findClosestY(double targetX);
|
||
|
|
QPointF findPeakPoint();
|
||
|
|
QString textFormat(const double enthalpyValue,
|
||
|
|
const double peakValue,
|
||
|
|
const double startPoint,
|
||
|
|
const double endPoint);
|
||
|
|
|
||
|
|
|
||
|
|
//private
|
||
|
|
QPair<QPointF,QPointF> calculateMaxDiffPointLeft();
|
||
|
|
QPair<QPointF,QPointF> calculateMaxDiffPointRight();
|
||
|
|
enum MaxDiffPointDetailType{
|
||
|
|
Left,
|
||
|
|
Right
|
||
|
|
};
|
||
|
|
QPair<QPointF,QPointF> calculateMaxDiffPointDetail(const MaxDiffPointDetailType type);
|
||
|
|
|
||
|
|
QPointF calculateIntersection(const QPointF p1,const QPointF p2,
|
||
|
|
const QPointF p3, const QPointF p4);
|
||
|
|
double calculateArea(const std::vector<QPointF> &points);
|
||
|
|
QPointF findClosestPointByX(double target);
|
||
|
|
|
||
|
|
extern QVector<FileManager::ExperimentData> _dataVtr;
|
||
|
|
extern double _leftPointX,_rightPointX;
|
||
|
|
extern QPointF _peakPoint;
|
||
|
|
extern QPointF _leftSelectedPoint,_rightSelectedPoint;
|
||
|
|
}
|
||
|
|
|
||
|
|
#endif // PEAKPOINT_H
|