You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
#include "iWxPvtBase.h"
|
|
|
|
|
#include "mToolPvt_global.h"
|
|
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
class iWxPvtSubHeader;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class M_TOOL_PVT_EXPORT iWxPvtSubHeader : public iWxPvtBase
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
explicit iWxPvtSubHeader(QString sType, QWidget *parent = 0);
|
|
|
|
|
~iWxPvtSubHeader();
|
|
|
|
|
|
|
|
|
|
// 初始化
|
|
|
|
|
virtual void initUI();
|
|
|
|
|
|
|
|
|
|
// 返回数据
|
|
|
|
|
float getTempBase();
|
|
|
|
|
float getPressureBase();
|
|
|
|
|
float getGorBase();
|
|
|
|
|
VecFloat* getPtrOfValueP();
|
|
|
|
|
VecFloat* getPtrOfValueT();
|
|
|
|
|
|
|
|
|
|
// 文件标识
|
|
|
|
|
virtual QString getFilePvtTag();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
|
|
// 默认值填入
|
|
|
|
|
void initDefault();
|
|
|
|
|
// signal
|
|
|
|
|
void buildSignals();
|
|
|
|
|
|
|
|
|
|
// 填入最大最小的单位
|
|
|
|
|
void fillUnitOfMaxMin();
|
|
|
|
|
|
|
|
|
|
// 刷新
|
|
|
|
|
void refresh();
|
|
|
|
|
|
|
|
|
|
// 计算压力温度点
|
|
|
|
|
void calPressAndTemp();
|
|
|
|
|
bool _calIncrement(float& f,
|
|
|
|
|
float fMax, float fMin);
|
|
|
|
|
bool _calVecOfIncrements(VecFloat& vec,
|
|
|
|
|
float fIncrement,
|
|
|
|
|
float fMax, float fMin);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
virtual void paintEvent(QPaintEvent*);
|
|
|
|
|
virtual void resizeEvent(QResizeEvent*);
|
|
|
|
|
|
|
|
|
|
virtual bool eventFilter(QObject* object, QEvent* event);
|
|
|
|
|
|
|
|
|
|
virtual void onSerialize(ZxSerializer* ser);
|
|
|
|
|
virtual void onDeserialize(ZxSerializer* ser);
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
|
|
|
|
void slotChangeIncrements();
|
|
|
|
|
void slotMaxMinChanged(QString);
|
|
|
|
|
void slotMaxMinStrChanged();
|
|
|
|
|
|
|
|
|
|
void slotCbxUnitMaxMinChanged(const QString s);
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
void sigOptionChanged();
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Ui::iWxPvtSubHeader *ui;
|
|
|
|
|
|
|
|
|
|
// FluidType
|
|
|
|
|
QString m_sFluidType;
|
|
|
|
|
|
|
|
|
|
// 压力数据数组
|
|
|
|
|
VecFloat m_vecValueP;
|
|
|
|
|
// 温度数据数组,温度是后台计算的。
|
|
|
|
|
VecFloat m_vecValueT;
|
|
|
|
|
float m_fMaxT; //温度范围,固定:20-400℃ 摄氏度
|
|
|
|
|
float m_fMinT;
|
|
|
|
|
|
|
|
|
|
QString m_sLastUnitMaxMin;
|
|
|
|
|
};
|