logplus/logPlus/LogmudResultItem.h

149 lines
3.1 KiB
C++

/**
* @file LogmudResultItem.h
*/
#ifndef LOGMUDRESULTITEM_H
#define LOGMUDRESULTITEM_H
#include <QObject>
#include <QColor>
struct logmud_stru
{
float DEPTH;
float DRILLTIME, TG, C1, C2, C3, IC4, nC4, IC5, NC5;//Na,Mg,Al,Si,P, S, K, Ca, Ti
float Na, Mg, Al, Si, P, S, K, Ca, Ti, V, Cr, Mn, Fe, Cl, Co, Ni, Cu, Zn, As, Rb, Sr, Y, Zr, Nb, Mo, Ag, Cd, In, Sn, W, Pb, Th, U, Ba;
};
struct logmud_result_stru
{
int No;
float dep;
float depth;
float type;
float k;
char Result1[32];
char Result2[32];
char Result3[32];
char Result4[32];
char Result[32];
};
#define CoreWidth 0.5
#define CoreHeight 0.05
class ViewInfoLogmud
{
public:
ViewInfoLogmud() {}
~ViewInfoLogmud() {}
int GetLogarithmic();
int GetTLogarithmic();
int GetxGrid();
int GetyGrid();
QColor GetColor();
void SetLogarithmic(int nAxis); // 设置Y轴为对数坐标系
void SetTLogarithmic(int nAxis); // 设置X轴为对数坐标系
private:
bool m_bisHi = true;
bool m_isOneScale = true;
float m_fHei = 4;// m_pViewInfoLogmud->GetrHeight();
float m_fTimemin = 0;// m_pViewInfoLogmud->GetTimeMin();// 获取时间最小值
float m_fTimemax = 120;// m_pViewInfoLogmud->GetTimeMax();// 获取时间最大值
float m_LeftVal = 0;
float m_RightVal = 139.7f;
int m_nLogarithmic = 0;
int m_nTLogarithmic = 0;
int m_xGrid = 5;
int m_yGrid = 5;
int m_isBottom = 1;
QString m_CurveName = "伽马(API)";
QString m_TimeName = "时间(μs)";
QColor m_Color = Qt::black;
QColor m_CGrid = Qt::black;
};
class LogmudResultItem : public QObject
{
Q_OBJECT
Q_PROPERTY(int Order READ GetOrder WRITE SetOrder);
Q_PROPERTY(double depth READ GetDepth WRITE SetDepth NOTIFY signalCorePropertyChanged);
Q_PROPERTY(double Number READ GetNumber WRITE SetNumber NOTIFY signalCorePropertyChanged);
Q_PROPERTY(double CoreValue READ GetCoreValue WRITE SetCoreValue NOTIFY signalCorePropertyChanged);
public:
LogmudResultItem();
LogmudResultItem(double topDepth, double bottomDepth);
~LogmudResultItem();
bool operator< (const LogmudResultItem& other);
bool operator> (const LogmudResultItem& other);
bool operator== (const LogmudResultItem& other);
public:
bool Contains(double depth) const;
void SetDepth(double _depth);
double GetDepth();
void SetTopDepth(float dep)
{
this->m_topDepth = dep;
}
void SetBottomDepth(float dep)
{
this->m_bottomDepth = dep;
}
float GetTopDepth()
{
return m_topDepth;
}
float GetBottomDepth()
{
return m_bottomDepth;
}
void SetOrder(int i);
int GetOrder();
void SetNumber(double dep);
double GetNumber();
void SetCoreValue(float value);
float GetCoreValue();
signals:
/**
* @brief property变化信号
*/
void signalCorePropertyChanged();
public:
double m_topDepth;//顶深
double m_bottomDepth;//底深
int Order;
float depth;
float Number;
struct logmud_stru CoreValues;
QVector<QVector<float>> ValueTypes;
bool ContainTextItem(double depth, double sideWidth, double boundingWidth);
QString CurveName;
int m_BeginDotPos, m_EndDotPos;
float m_time[30], m_tVvalue[30];
float type;
float BH, WH, DH, A, B, C, D;
float LABEL_X, LABEL_Y;
float RATION_Y[4];
};
#endif // LOGMUDRESULTITEM_H