cimforreduceloss/testHasttable/loadinfo.h

40 lines
899 B
C++

#ifndef LOADINFO_H
#define LOADINFO_H
#include <QString>
#include <QTime>
#include <QFile>
#include <QTextStream>
#include <QRegExp>
#include <cmath>
#include <QPair>
class LoadInfo
{
public:
explicit LoadInfo(double powerFactor=0.95);
~LoadInfo();
QString getLoadName();
QString getLoadPath();
void setLoadName(const QString &name);
void setLoadPath(const QString &path);
bool updateByTime(const QTime& time);
double getPA();
double getPB();
double getPC();
double getQA();
double getQB();
double getQC();
private:
bool isStartWithTime(const QString& str);
QString trimDoubleQuotation(const QString& str);
QString loadName;
QString loadPath;
double powerFactor;
QPair<double,double> pqA;
QPair<double,double> pqB;
QPair<double,double> pqC;
QPair<double,double> getPQ(double current);
};
#endif // LOADINFO_H