cimforreduceloss/testHasttable/loadinfo.h

45 lines
978 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 get3PhP();
double get3PhQ();
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;
double ph3P;
double ph3Q;
QPair<double,double> getPQ(double current);
};
#endif // LOADINFO_H