LogMud道的实现, 目前只是实现显示 一个图像,属性等未对接。
This commit is contained in:
parent
b2eb84c08e
commit
128a098a6e
|
|
@ -1074,6 +1074,14 @@ int GetLineWidth(QPainter * painter,int flWidth)
|
|||
return (int)temp;
|
||||
}
|
||||
|
||||
bool IsFiniteNumber(float v)
|
||||
{
|
||||
if (qIsFinite(v))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
QString GBKToUTF8(const QByteArray& gbkData) {
|
||||
QTextCodec* gbkCodec = QTextCodec::codecForName("GBK");
|
||||
if (!gbkCodec) {
|
||||
|
|
|
|||
|
|
@ -239,6 +239,7 @@ QString GetLithSymbolDir(QString cs=QDir::separator());
|
|||
QString GetGujingSymbolDir(QString cs=QDir::separator());
|
||||
QString GetImageSymbolDir(QString cs=QDir::separator());
|
||||
int GetLineWidth(QPainter * painter,int flWidth);
|
||||
bool IsFiniteNumber(float v);
|
||||
|
||||
QString GBKToUTF8(const QByteArray& gbkData);
|
||||
QByteArray UTF8ToGBK(const QString& utf8Str);
|
||||
|
|
|
|||
|
|
@ -101,6 +101,8 @@ signals:
|
|||
|
||||
//TDT
|
||||
void sig_AddTDT(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0);
|
||||
//LogMud
|
||||
void sig_AddLogMud(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0);
|
||||
|
||||
//新建波列
|
||||
void sig_AddWave(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strWaveName);
|
||||
|
|
|
|||
3092
logPlus/LogmudItemDrawer.cpp
Normal file
3092
logPlus/LogmudItemDrawer.cpp
Normal file
File diff suppressed because it is too large
Load Diff
176
logPlus/LogmudResultItem.cpp
Normal file
176
logPlus/LogmudResultItem.cpp
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
|
||||
#include "LogmudResultItem.h"
|
||||
#include <QtGlobal>
|
||||
|
||||
LogmudResultItem::LogmudResultItem()
|
||||
:Order(0)
|
||||
,depth(0)
|
||||
,Number(0)
|
||||
,type(1)
|
||||
,BH(0)
|
||||
,WH(0)
|
||||
,DH(0)
|
||||
,A(0)
|
||||
,B(0)
|
||||
,C(0)
|
||||
,D(0)
|
||||
,LABEL_X(0)
|
||||
,LABEL_Y(0)
|
||||
{
|
||||
m_BeginDotPos=-1,m_EndDotPos=-1;
|
||||
memset(&CoreValues,0,sizeof(CoreValues));
|
||||
memset(RATION_Y,0,sizeof(RATION_Y));
|
||||
for (int i=0;i<30;i++)
|
||||
{
|
||||
m_time[i]=-1;
|
||||
m_tVvalue[i]=-1;
|
||||
}
|
||||
}
|
||||
|
||||
void LogmudResultItem::SetOrder(int order)
|
||||
{
|
||||
Order=order;
|
||||
}
|
||||
int LogmudResultItem::GetOrder()
|
||||
{
|
||||
return Order;
|
||||
}
|
||||
|
||||
void LogmudResultItem::SetNumber(double dep)
|
||||
{
|
||||
Number=dep;
|
||||
// SetDepthRange(dep,dep);
|
||||
// if(m_discreteLog) m_discreteLog->SaveToSLF();
|
||||
}
|
||||
double LogmudResultItem::GetNumber()
|
||||
{
|
||||
return Number;
|
||||
}
|
||||
void LogmudResultItem::SetCoreValue(float v)
|
||||
{
|
||||
// CoreValue=v;
|
||||
}
|
||||
float LogmudResultItem::GetCoreValue()
|
||||
{
|
||||
return 0;//CoreValue;
|
||||
}
|
||||
|
||||
|
||||
LogmudResultItem::LogmudResultItem( double topDepth, double bottomDepth )
|
||||
:Order(0)
|
||||
,depth(0)
|
||||
,Number(topDepth)
|
||||
,type(1)
|
||||
,BH(0)
|
||||
,WH(0)
|
||||
,DH(0)
|
||||
,A(0)
|
||||
,B(0)
|
||||
,C(0)
|
||||
,D(0)
|
||||
,LABEL_X(0)
|
||||
,LABEL_Y(0)
|
||||
{
|
||||
m_topDepth=topDepth;
|
||||
m_bottomDepth=bottomDepth;
|
||||
m_BeginDotPos=-1,m_EndDotPos=-1;
|
||||
memset(&CoreValues,0,sizeof(CoreValues));
|
||||
memset(RATION_Y,0,sizeof(RATION_Y));
|
||||
for (int i=0;i<30;i++)
|
||||
{
|
||||
m_time[i]=-1;
|
||||
m_tVvalue[i]=-1;
|
||||
}
|
||||
}
|
||||
|
||||
LogmudResultItem::~LogmudResultItem()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
bool LogmudResultItem::ContainTextItem( double depth,double sideWidth,double boundingWidth)
|
||||
{
|
||||
return (depth >=m_topDepth-CoreHeight/2) && (m_bottomDepth+CoreHeight/2 )>= depth;
|
||||
}
|
||||
|
||||
bool LogmudResultItem::operator< (const LogmudResultItem& other)
|
||||
{
|
||||
float top = (int)(other.m_topDepth * 1000 + 0.5) / 1000.;
|
||||
float bottom = (int)(m_bottomDepth * 1000 + 0.5) / 1000.;
|
||||
float top0 = (int)(m_topDepth * 1000 + 0.5) / 1000.;
|
||||
return (top - m_bottomDepth) > 0.05 ||
|
||||
(qAbs(bottom - top) < 0.05 && (top - top0) > 0.05);
|
||||
}
|
||||
bool LogmudResultItem::operator> (const LogmudResultItem& other)
|
||||
{ //TODO check this
|
||||
float top = (int)(other.m_topDepth * 1000 + 0.5) / 1000.;
|
||||
float bottom = (int)(other.m_bottomDepth * 1000 + 0.5) / 1000.;
|
||||
float top1 = (int)(m_topDepth * 1000 + 0.5) / 1000.;
|
||||
float bottom1 = (int)(m_bottomDepth * 1000 + 0.5) / 1000.;
|
||||
return (top1 - top) > 0.05 ||
|
||||
(qAbs(top1 - bottom) < 0.05 && (top1 - top) > 0.05);
|
||||
}
|
||||
|
||||
bool LogmudResultItem::operator== (const LogmudResultItem& other)
|
||||
{
|
||||
return fabs(other.Number-Number)<1e-10;
|
||||
}
|
||||
|
||||
bool LogmudResultItem::Contains(double depth) const
|
||||
{
|
||||
depth = (int)(depth * 1000 + 0.5) / 1000.0;
|
||||
if (m_topDepth == m_bottomDepth)
|
||||
{
|
||||
return qAbs(m_topDepth - depth) < 0.001;
|
||||
}
|
||||
if (qAbs(m_topDepth - depth) < 0.05 || qAbs(m_bottomDepth - depth) < 0.05) return false;
|
||||
return depth > m_topDepth && m_bottomDepth > depth;
|
||||
}
|
||||
|
||||
void LogmudResultItem::SetDepth( double _depth )
|
||||
{
|
||||
depth=_depth;
|
||||
// if(m_discreteLog) m_discreteLog->SaveToSLF();
|
||||
// emit signalCorePropertyChanged();
|
||||
}
|
||||
|
||||
double LogmudResultItem::GetDepth()
|
||||
{
|
||||
return depth;
|
||||
}
|
||||
|
||||
int ViewInfoLogmud::GetLogarithmic()
|
||||
{
|
||||
return m_nLogarithmic;
|
||||
}
|
||||
|
||||
int ViewInfoLogmud::GetTLogarithmic()
|
||||
{
|
||||
return m_nTLogarithmic;
|
||||
}
|
||||
|
||||
int ViewInfoLogmud::GetxGrid()
|
||||
{
|
||||
return m_xGrid;
|
||||
}
|
||||
|
||||
int ViewInfoLogmud::GetyGrid()
|
||||
{
|
||||
return m_yGrid;
|
||||
}
|
||||
|
||||
QColor ViewInfoLogmud::GetColor()
|
||||
{
|
||||
return m_Color;
|
||||
}
|
||||
|
||||
void ViewInfoLogmud::SetLogarithmic(int nAxis)
|
||||
{
|
||||
m_nLogarithmic = nAxis;
|
||||
}
|
||||
|
||||
void ViewInfoLogmud::SetTLogarithmic(int nAxis)
|
||||
{
|
||||
m_nTLogarithmic = nAxis;
|
||||
}
|
||||
149
logPlus/LogmudResultItem.h
Normal file
149
logPlus/LogmudResultItem.h
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
/**
|
||||
* @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
|
||||
90
logPlus/LogmuditemDrawer.h
Normal file
90
logPlus/LogmuditemDrawer.h
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
|
||||
#ifndef LOGMUDITEMDRAWER_H_
|
||||
#define LOGMUDITEMDRAWER_H_
|
||||
|
||||
#include <QPainter>
|
||||
#include "LogmudResultItem.h"
|
||||
|
||||
class LogmudItemDrawer
|
||||
{
|
||||
public:
|
||||
LogmudItemDrawer();
|
||||
|
||||
enum AxisType
|
||||
{
|
||||
AXIS_LINEAR = 0,//线性坐标系
|
||||
AXIS_LOGARITHMIC = 1,//对数坐标系
|
||||
AXIS_DIP = 2, //倾角坐标系
|
||||
};
|
||||
/**
|
||||
* @brief 绘制每一个井壁取心分段的方法
|
||||
* @param painter 绘制设备
|
||||
* @param item 离散分段数据
|
||||
* @param state
|
||||
* @param itemBouding
|
||||
* @param reasonableRect
|
||||
* @param IsWellSectonHorizonLayout
|
||||
*/
|
||||
virtual QPointF DrawItem(QPainter* painter, LogmudResultItem* item,
|
||||
const QRectF& rt,
|
||||
bool IsWellSectonHorizonLayout) const;
|
||||
private:
|
||||
// LogmudItemDrawer.h 中添加的函数声明
|
||||
void DrawXAxisLogarithmicGrid(QPainter* painter, float timemin, float timemax,
|
||||
float dd, float w, float h, QRectF rt, QPointF pt,
|
||||
QFontMetrics& fm, float& lscalelen) const;
|
||||
|
||||
void DrawXAxisLinearGrid(QPainter* painter, float timemin, float timemax,
|
||||
float dd, float len, float h, QRectF rt, QPointF pt,
|
||||
QPointF pt1, QFontMetrics& fm, int fnum) const;
|
||||
|
||||
void DrawYAxisLogarithmicGrid(QPainter* painter, float minVal, float maxVal,
|
||||
float dd, float len, float h, QRectF rt, QPointF pt,
|
||||
QFontMetrics& fm, float& lscalelen) const;
|
||||
|
||||
void DrawYAxisLinearGrid(QPainter* painter, float minVal, float maxVal,
|
||||
float dd, float len, float h, QRectF rt, QPointF pt,
|
||||
QFontMetrics& fm, float& lscalelen, int fnum) const;
|
||||
|
||||
void DrawDepthAndAxisLabels(QPainter* painter, float depth, float dd, float w, float h,
|
||||
QRectF rt, QPointF pt, QFontMetrics& fm,
|
||||
float lscalelen,
|
||||
const QString& xAxisTitle = "", const QString& yAxisTitle = "") const;
|
||||
|
||||
void DrawDataPoint(QPainter* painter, float wh, float bh, float timemin, float timemax,
|
||||
float minVal, float maxVal, float dd, float len, float h,
|
||||
QRectF rt, QPointF pt1, int logarithmic) const;
|
||||
private:
|
||||
ViewInfoLogmud *m_pViewInfoLogmud;
|
||||
QString cclimgpath;
|
||||
QBrush SHOTImg;
|
||||
QMap<QString,QString> zoneOrder;
|
||||
|
||||
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();// 获取时间最大值
|
||||
int m_nLogarithmic = 0;
|
||||
float m_LeftVal = 0;
|
||||
float m_RightVal = 139.7f;
|
||||
|
||||
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;
|
||||
/**
|
||||
*@brief 岩性图片容器
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
@ -10,6 +10,7 @@
|
|||
#include <QtMath>
|
||||
#include "PickFrac.h"
|
||||
#include "formline.h"
|
||||
#include "formlogmud.h"
|
||||
#include "PropertyWidget.h"
|
||||
#include "DrawTvd.h"
|
||||
#include "DepthProgress.h"
|
||||
|
|
@ -98,6 +99,8 @@ FormDraw::FormDraw(QWidget *parent, QString strSlfName, QString strWellName, QSt
|
|||
//在选中道绘制(深度、玫瑰图等)
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_setDrawData(QString, QString, QString, QString, QStringList)), this, SLOT(s_setDrawData(QString, QString, QString, QString, QStringList)));
|
||||
|
||||
//LogMud
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_AddLogMud(QString, QString, QString, QString, QString, int)), this, SLOT(s_addLogMud(QString, QString, QString, QString, QString, int)));
|
||||
}
|
||||
|
||||
FormDraw::~FormDraw()
|
||||
|
|
@ -3749,6 +3752,21 @@ void FormDraw::setColWidth(float fNewWidth)
|
|||
}
|
||||
form->setGeometry(form->geometry().x(), form->geometry().y(), ntmpw, (int)dHight);
|
||||
}
|
||||
}
|
||||
else if(strObjName=="FormLogmud")
|
||||
{
|
||||
//
|
||||
FormLogmud *form = (FormLogmud*)childWidget;
|
||||
if(form)
|
||||
{
|
||||
int dHight = form->geometry().height();
|
||||
int ntmpw = m_nTrackW * g_dPixelPerCm;
|
||||
if(ntmpw==0)
|
||||
{
|
||||
ntmpw = (g_iOneWidth*4)* g_dPixelPerCm;
|
||||
}
|
||||
form->setGeometry(form->geometry().x(), form->geometry().y(), ntmpw, (int)dHight);
|
||||
}
|
||||
}
|
||||
}
|
||||
i++;
|
||||
|
|
@ -4908,6 +4926,66 @@ void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString st
|
|||
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "TubingstringObject", listOtherProperty);
|
||||
}
|
||||
|
||||
void FormDraw::s_addLogMud(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW)
|
||||
{
|
||||
//井名&道名不一致
|
||||
if (strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_listLineName.contains(strLineName))
|
||||
{
|
||||
qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
||||
return;
|
||||
}
|
||||
//
|
||||
FormLogmud *curv = new FormLogmud(this, strSlfName, strWellName, strTrackName, strLineName);
|
||||
curv->m_strUuid = m_strUuid;
|
||||
|
||||
double dHight = 0;
|
||||
dHight = (m_iY2 - m_iY1)*100.0 / (double)m_iScale * g_dPixelPerCm;
|
||||
if (g_iShow == 1)
|
||||
{
|
||||
//显示刻度
|
||||
dHight = dHight + 30;
|
||||
}
|
||||
qDebug() << "FormDraw dHight=" << QString::number((int)dHight);
|
||||
if (dHight > 32767)
|
||||
{
|
||||
dHight = 32767;
|
||||
}
|
||||
int ntmpw = m_nTrackW * g_dPixelPerCm;
|
||||
if (ntmpw == 0)
|
||||
{
|
||||
ntmpw = (g_iOneWidth * 4)* g_dPixelPerCm;
|
||||
}
|
||||
curv->setGeometry(curv->geometry().x(), curv->geometry().y(), ntmpw - 2, (int)dHight);
|
||||
curv->show();
|
||||
|
||||
//QString strWaveName = "";
|
||||
int _nSamples = 0;
|
||||
//curv->DrawTvd();
|
||||
m_listLineName.push_back(strLineName);
|
||||
|
||||
QString strAliasName = "LogMud";
|
||||
QString strUnit = "";
|
||||
QColor newlineColor = QColor(0, 0, 0);
|
||||
double width = 2;
|
||||
QString strScaleType = "";
|
||||
//道-对象
|
||||
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, _nSamples, 0, strScaleType, "SantuyibiaoObject");
|
||||
// emit CallManage::getInstance()->sig_ChangeTvdProperty(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, "Q",
|
||||
// (QObject *)(curv->m_drawTvd));
|
||||
|
||||
//修改滚动条,针对新建的
|
||||
emit CallManage::getInstance()->sig_changeScrollBar(m_strUuid);
|
||||
|
||||
}
|
||||
|
||||
void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLineName,
|
||||
double newLeftScale, double newRightScale, QString strScaleType, QColor lineColor, double width, Qt::PenStyle lineStyle, QStringList listOtherProperty)
|
||||
{
|
||||
|
|
@ -7348,6 +7426,11 @@ void FormDraw::dropEvent(QDropEvent* event)
|
|||
//套管组件
|
||||
emit CallManage::getInstance()->sig_AddTubingstring(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||
}
|
||||
else if (strType == "LogMudObject")
|
||||
{
|
||||
//斜井三图一表
|
||||
emit CallManage::getInstance()->sig_AddLogMud(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||
}
|
||||
|
||||
// 接受拖拽事件
|
||||
event->setDropAction(Qt::MoveAction);
|
||||
|
|
|
|||
|
|
@ -302,6 +302,8 @@ public slots:
|
|||
|
||||
//TDT
|
||||
// void s_addTDT(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
||||
//LogMud
|
||||
void s_addLogMud(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
||||
|
||||
//
|
||||
void s_addWave(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strWaveName);
|
||||
|
|
|
|||
305
logPlus/formlogmud.cpp
Normal file
305
logPlus/formlogmud.cpp
Normal file
|
|
@ -0,0 +1,305 @@
|
|||
#include "FormLogmud.h"
|
||||
#include "ui_FormLogmud.h"
|
||||
#include <QPainter>
|
||||
#include "CallManage.h"
|
||||
#include "MemRdWt.h"
|
||||
|
||||
FormLogmud::FormLogmud(QWidget *parent, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::FormLogmud)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
m_strSlfName = strSlfName;
|
||||
m_strWellName = strWellName;
|
||||
m_strTrackName = strTrackName;
|
||||
m_strLineName = strLineName;
|
||||
|
||||
m_pLogMud = new LogmudItemDrawer();
|
||||
|
||||
LoadFromSLF_LogMud();
|
||||
|
||||
|
||||
m_parent = parent;
|
||||
//斜井三图一表
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeTvdProperty(QString, QString, QString, QString, QString, QString, QString, QVariant)),
|
||||
this, SLOT(s_ChangeTvdProperty(QString, QString, QString, QString, QString, QString, QString, QVariant)));
|
||||
//自定义滚动条
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_santuyibiao(QString, double, double, double)), this, SLOT(vertScrollBarChanged(QString, double, double, double)));
|
||||
//打印
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_vertScrollBarChanged_santu_Print(QString, int, int)), this, SLOT(vertScrollBarChanged_Print(QString, int, int)));
|
||||
|
||||
}
|
||||
|
||||
void FormLogmud::DrawTvd()
|
||||
{
|
||||
// //
|
||||
// QPainter painter(this);
|
||||
// QRect rect = this->rect();
|
||||
// //背景透明
|
||||
// painter.fillRect(rect.left(), rect.top(), rect.width(), rect.height(), QColor(0, 0, 0, 0)); //QColor(67, 67, 67, 100)
|
||||
|
||||
// CDrawTvd *drawTvd = new CDrawTvd();
|
||||
// drawTvd->sFilePath = m_strSlfName;
|
||||
// drawTvd->DrawTvd(&painter, rect);
|
||||
}
|
||||
|
||||
FormLogmud::~FormLogmud()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
bool FormLogmud::LoadFromSLF_LogMud()
|
||||
{
|
||||
this->m_childrenItems.clear();
|
||||
|
||||
CMemRdWt *logio = new CMemRdWt();
|
||||
if (!logio->Open(m_strSlfName.toStdString().c_str(), CSlfIO::modeRead))
|
||||
{
|
||||
delete logio;
|
||||
return false;
|
||||
}
|
||||
|
||||
int iIndex = logio->OpenTable(m_strLineName.toStdString().c_str());
|
||||
if (iIndex < 0)
|
||||
return false;
|
||||
|
||||
int count1 = logio->GetTableRecordCount(iIndex);
|
||||
int len = logio->GetTableRecordLength(iIndex);
|
||||
if (m_LogMun)
|
||||
delete m_LogMun;
|
||||
m_LogMun = new struct logmud_stru[count1];
|
||||
for (int i = 0; i < count1; i++)
|
||||
{
|
||||
logio->ReadTable(iIndex, i + 1, &m_LogMun[i]);
|
||||
}
|
||||
iIndex = logio->OpenTable("LOGMUD_DATA");
|
||||
if (iIndex > -1) {
|
||||
int count = logio->GetTableRecordCount(iIndex);
|
||||
int len = logio->GetTableRecordLength(iIndex);
|
||||
logio->IsChange = true;
|
||||
logmud_result_stru pLogmud;
|
||||
int n = 0;
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
logio->ReadTable(iIndex, i + 1, &pLogmud);
|
||||
double top = pLogmud.depth;
|
||||
double bottom = pLogmud.depth;
|
||||
LogmudResultItem* pResult = AddItem(top, bottom);
|
||||
if (pResult) {
|
||||
pResult->Order = i;
|
||||
pResult->depth = pLogmud.dep;
|
||||
pResult->Number = pLogmud.depth;
|
||||
pResult->type = pLogmud.type;
|
||||
// pResult->BH=valy;
|
||||
// pResult->WH=valx;
|
||||
bool matchedLogmud = false;
|
||||
for (int j = 0; j < count1; j++) {
|
||||
if (qAbs(m_LogMun[j].DEPTH - pResult->depth) < 1e-4f)
|
||||
{
|
||||
pResult->CoreValues = m_LogMun[j];
|
||||
matchedLogmud = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// 对数图版(type=2)的WH/BH不落盘,加载时重算并进行安全截断,避免极值导致绘制卡死。
|
||||
if (matchedLogmud&&qAbs(pResult->type - 2.0f) < 0.5f)
|
||||
{
|
||||
float safeC1 = qAbs(pResult->CoreValues.C1);
|
||||
if (!IsFiniteNumber(safeC1) || safeC1 < 1e-6f) safeC1 = 1e-6f;
|
||||
float valx = (pResult->CoreValues.C2 / safeC1)*1000.0f;
|
||||
float valy = (pResult->CoreValues.C3 / safeC1)*1000.0f;
|
||||
if (!IsFiniteNumber(valx) || valx <= 0.0f) valx = 1.0f;
|
||||
if (!IsFiniteNumber(valy) || valy <= 0.0f) valy = 1.0f;
|
||||
if (valx > 1000000.0f) valx = 1000000.0f;
|
||||
if (valy > 1000000.0f) valy = 1000000.0f;
|
||||
pResult->WH = valx;
|
||||
pResult->BH = valy;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
delete logio;
|
||||
return true;
|
||||
}
|
||||
|
||||
LogmudResultItem* FormLogmud::AddItem(double topDepth, double bottomDepth)
|
||||
{
|
||||
int insertPos = GetInsertIndex(topDepth, bottomDepth);
|
||||
if (insertPos != -1)
|
||||
{
|
||||
return this->AddItem(topDepth, bottomDepth, insertPos);
|
||||
}
|
||||
else
|
||||
{
|
||||
//OutputErrorInfo();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
LogmudResultItem *FormLogmud::AddItem(double topDepth, double bottomDepth, int insertPos)
|
||||
{
|
||||
if (topDepth == -9999 || bottomDepth == -9999.0) return NULL;
|
||||
|
||||
LogmudResultItem* newItem = new LogmudResultItem();
|
||||
if (newItem != NULL)
|
||||
{
|
||||
newItem->SetTopDepth(topDepth);
|
||||
newItem->SetBottomDepth(bottomDepth);
|
||||
m_childrenItems.insert(insertPos, newItem);
|
||||
return newItem;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int FormLogmud::GetInsertIndex(double topDepth, double bottomDepth) const
|
||||
{
|
||||
LogmudResultItem curItem(topDepth, bottomDepth);
|
||||
int topIndex = 0;
|
||||
int bottomIndex = m_childrenItems.size();
|
||||
if (bottomIndex == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
int mid = (bottomIndex + topIndex) / 2;
|
||||
|
||||
while (topIndex <= bottomIndex && mid < m_childrenItems.size())
|
||||
{
|
||||
if (m_childrenItems[mid]->Contains(topDepth)) {
|
||||
return -1;
|
||||
}
|
||||
if (m_childrenItems[mid]->Contains(bottomDepth))
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
if (*m_childrenItems[mid] < curItem)
|
||||
{
|
||||
topIndex = mid + 1;
|
||||
}
|
||||
else if (*m_childrenItems[mid] > curItem)
|
||||
{
|
||||
bottomIndex = mid - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (*m_childrenItems[mid] == curItem)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
//相交了,非法输入
|
||||
if ((bottomDepth - topDepth) / 2 + topDepth > (*m_childrenItems[mid]).GetTopDepth() &&
|
||||
(bottomDepth - topDepth) / 2 + topDepth < (*m_childrenItems[mid]).GetBottomDepth())
|
||||
return -1;
|
||||
else return mid + 1;
|
||||
}
|
||||
mid = (bottomIndex + topIndex) / 2;
|
||||
}
|
||||
if (mid < m_childrenItems.size() && *m_childrenItems[mid] < curItem)
|
||||
{
|
||||
return mid + 1;//目前算法有漏洞,临时修改一下
|
||||
}
|
||||
return mid;
|
||||
}
|
||||
|
||||
void FormLogmud::paintEvent(QPaintEvent*)
|
||||
{
|
||||
//
|
||||
QPainter painter(this);
|
||||
QRect rect = this->rect();
|
||||
// QRect rect = m_parent->rect();
|
||||
//背景透明
|
||||
painter.fillRect(rect.left(), rect.top(), rect.width(), rect.height(), QColor(0, 0, 0, 0)); //QColor(67, 67, 67, 100)
|
||||
|
||||
for (int i = 0; i < m_childrenItems.size(); i++)
|
||||
{
|
||||
LogmudResultItem* pItem = m_childrenItems.at(i);
|
||||
if (pItem->type == 1)
|
||||
{
|
||||
float top = pItem->GetTopDepth();
|
||||
float bottom = pItem->GetBottomDepth();
|
||||
|
||||
if (bottom < m_dTopDepth - 1) continue;
|
||||
|
||||
double ddep = m_wellTop - m_dTopDepth;
|
||||
QRectF itemBoundingRect(0, top + ddep/*+Rlev*/, rect.width(), bottom - top);
|
||||
|
||||
m_pLogMud->DrawItem(&painter, pItem, itemBoundingRect, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void FormLogmud::s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||
QString strGroup, QString strProperty, QVariant variant)
|
||||
{
|
||||
if(m_strUuid != strUuid ||
|
||||
m_strSlfName != strSlfName ||
|
||||
m_strWellName != strWellName ||
|
||||
m_strTrackName != strTrackName ||
|
||||
m_strLineName != strLineName)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if("通常" == strGroup)
|
||||
{
|
||||
|
||||
}
|
||||
if("绘制图形对象" == strGroup)
|
||||
{
|
||||
|
||||
}
|
||||
if("边框线型" == strGroup)
|
||||
{
|
||||
if ("线宽" == strProperty)
|
||||
;
|
||||
else if ("颜色" == strProperty)
|
||||
;
|
||||
}
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
//自定义滚动条
|
||||
void FormLogmud::vertScrollBarChanged(QString strUuid, double value, double low, double upper)
|
||||
{
|
||||
if(m_strUuid==strUuid)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
m_dTopDepth = value;
|
||||
//上移或下移
|
||||
QRect geoRect = geometry();
|
||||
//
|
||||
double dDelta = value - upper;
|
||||
double dPercent = dDelta / (low-upper);
|
||||
|
||||
setGeometry(0, -(dPercent*geoRect.height()), geoRect.width(), geoRect.height());
|
||||
}
|
||||
|
||||
//打印
|
||||
void FormLogmud::vertScrollBarChanged_Print(QString strUuid, int iNum, int iHeightOfScreen)
|
||||
{
|
||||
if(m_strUuid==strUuid)
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
//上移或下移
|
||||
QRect geoRect = geometry();
|
||||
//
|
||||
double dDelta = iHeightOfScreen*(iNum-1);
|
||||
setGeometry(0, -dDelta, geoRect.width(), geoRect.height());
|
||||
}
|
||||
|
||||
void FormLogmud::wheelEvent(QWheelEvent *event) // 滚轮事件
|
||||
{
|
||||
emit CallManage::getInstance()->sig_mouseWheel(event);
|
||||
}
|
||||
71
logPlus/formlogmud.h
Normal file
71
logPlus/formlogmud.h
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
#ifndef FORMLOGMUD_H
|
||||
#define FORMLOGMUD_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QVariant>
|
||||
#include "LogmudResultItem.h"
|
||||
#include "LogmuditemDrawer.h"
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
namespace Ui {
|
||||
class FormLogmud;
|
||||
}
|
||||
class CDrawTvd;
|
||||
class FormLogmud : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FormLogmud(QWidget *parent = nullptr, QString strSlfName="", QString strWellName="", QString strTrackName="", QString strLineName="");
|
||||
~FormLogmud();
|
||||
|
||||
bool LoadFromSLF_LogMud();
|
||||
bool SaveToSLF_LogMud();
|
||||
|
||||
LogmudResultItem* AddItem(double topDepth, double bottomDepth);
|
||||
LogmudResultItem *AddItem(double topDepth, double bottomDepth, int insertPos);
|
||||
int GetInsertIndex(double topDepth, double bottomDepth) const;
|
||||
|
||||
private:
|
||||
Ui::FormLogmud *ui;
|
||||
|
||||
protected:
|
||||
void paintEvent(QPaintEvent *event);
|
||||
virtual void wheelEvent(QWheelEvent *event);
|
||||
|
||||
bool IsFiniteNumber(float v)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
return _finite(v) != 0;
|
||||
#else
|
||||
return (v == v) && (v <= FLT_MAX) && (v >= -FLT_MAX);
|
||||
#endif
|
||||
}
|
||||
|
||||
public:
|
||||
QString m_strUuid;
|
||||
QString m_strSlfName;
|
||||
QString m_strWellName;
|
||||
QString m_strTrackName;
|
||||
QString m_strLineName;
|
||||
LogmudItemDrawer* m_pLogMud = NULL;
|
||||
QWidget *m_parent;
|
||||
|
||||
double m_wellTop = 0.0;
|
||||
double m_dTopDepth = 0.0;
|
||||
|
||||
struct logmud_stru *m_LogMun = NULL;
|
||||
QList<LogmudResultItem*> m_childrenItems;//所有小分段
|
||||
public:
|
||||
void DrawTvd();
|
||||
public slots:
|
||||
//斜井三图一表
|
||||
void s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||
QString strGroup, QString strProperty, QVariant variant);
|
||||
|
||||
//滚动条
|
||||
void vertScrollBarChanged(QString strUuid, double value, double low, double upper);
|
||||
void vertScrollBarChanged_Print(QString strUuid, int iNum, int iHeightOfScreen);
|
||||
};
|
||||
|
||||
#endif // FORMLOGMUD_H
|
||||
33
logPlus/formlogmud.ui
Normal file
33
logPlus/formlogmud.ui
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FormLogmud</class>
|
||||
<widget class="QWidget" name="FormLogmud">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
@ -111,6 +111,10 @@ FormTrack::FormTrack(QWidget *parent, QString strSlfName, QString strWellName, Q
|
|||
//曲线选中,置顶
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_Raise(QString, QString, QString, QString, QString, int, QString)), this, SLOT(s_Raise(QString, QString, QString, QString, QString, int, QString)));
|
||||
|
||||
//LogMud
|
||||
connect(this, SIGNAL(sig_AddLogMud(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)),
|
||||
this, SLOT(s_addLogMud(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)));
|
||||
|
||||
}
|
||||
|
||||
void FormTrack::s_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int iTableType, QString strFormInfoType)
|
||||
|
|
@ -296,6 +300,10 @@ void FormTrack::Add(QString strSlfName, QString strWellName, QString strTrackNam
|
|||
{
|
||||
emit sig_AddTubingstring(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType, listOtherProperty);
|
||||
}
|
||||
else if (strType == "LogMudObject")
|
||||
{
|
||||
emit sig_AddLogMud(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType);
|
||||
}
|
||||
}
|
||||
|
||||
FormInfo* FormTrack::AddKedouAndOthers(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QString strType, QJsonObject listOtherProperty)
|
||||
|
|
@ -1454,6 +1462,37 @@ void FormTrack::s_addTDT(QString strSlfName, QString strWellName, QString strTra
|
|||
ui->tableWidget->setCellWidget(row, 0, formInfo);
|
||||
}
|
||||
|
||||
void FormTrack::s_addLogMud(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType)
|
||||
{
|
||||
qDebug() << "FormTrack s_addLogMud";
|
||||
|
||||
ui->tableWidget->m_strUuid = m_strUuid;
|
||||
int row = ui->tableWidget->rowCount();
|
||||
ui->tableWidget->setRowCount(row + 1);
|
||||
|
||||
//避免出现小滚动条
|
||||
//ui->tableWidget->resize(g_iOneWidth, 100*(row + 1)+10);
|
||||
//this->resize(g_iOneWidth, 100*(row + 1)+30);
|
||||
|
||||
//曲线信息栏
|
||||
FormInfo *formInfo = new FormInfo(this, strSlfName, strWellName, strTrackName, strLineName, lineColor);
|
||||
formInfo->m_strUuid = m_strUuid;
|
||||
formInfo->m_strAliasName = strAliasName;
|
||||
formInfo->m_strUnit = strUnit;
|
||||
formInfo->m_strScaleType = strScaleType;
|
||||
formInfo->m_strType = "LogMudObject";
|
||||
formInfo->m_nJg = 2;
|
||||
formInfo->setLineWidth(dWidth);
|
||||
formInfo->setVMax(vmax);
|
||||
formInfo->setVMin(vmin);
|
||||
formInfo->setFrontColor(QColor(0, 0, 0));
|
||||
formInfo->setBackColor(QColor(255, 255, 255));
|
||||
//设置高度
|
||||
ui->tableWidget->setRowHeight(row, 100);
|
||||
//
|
||||
ui->tableWidget->setCellWidget(row, 0, formInfo);
|
||||
}
|
||||
|
||||
QJsonObject FormTrack::makeJson()
|
||||
{
|
||||
// 创建根对象
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@ signals:
|
|||
void sig_AddLogface(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={});
|
||||
void sig_AddMCals(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||
void sig_AddTubingstring(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={});
|
||||
void sig_AddLogMud(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||
|
||||
public slots:
|
||||
void s_addLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={});
|
||||
|
|
@ -94,6 +95,7 @@ public slots:
|
|||
void s_addMCals(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||
void s_addTubingstring(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType, QStringList listOtherProperty={});
|
||||
void s_addTDT(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||
void s_addLogMud(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||
|
||||
void s_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int iTableType, QString strFormInfoType);
|
||||
|
||||
|
|
|
|||
|
|
@ -258,6 +258,12 @@ void FormTrackTop::dropEvent(QDropEvent* event)
|
|||
//套管组件
|
||||
emit CallManage::getInstance()->sig_AddTubingstring(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||
}
|
||||
else if (strType == "LogMudObject")
|
||||
{
|
||||
//LogMud
|
||||
emit CallManage::getInstance()->sig_AddLogMud(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||
}
|
||||
|
||||
// 接受拖拽事件
|
||||
event->setDropAction(Qt::MoveAction);
|
||||
event->accept();
|
||||
|
|
|
|||
|
|
@ -172,7 +172,9 @@ QVector<QWidget *> FormWell::new_track(QStringList listdt, QString strTrackName)
|
|||
else if(strType == "dcaObject")
|
||||
strTrackName = "DCA检测";
|
||||
else if(strType == "tdtObject")
|
||||
strTrackName = "TDT";
|
||||
strTrackName = "TDT";
|
||||
else if (strType == "LogMudObject")
|
||||
strTrackName = "LogMud";
|
||||
else if(strType == "plObject")
|
||||
strTrackName = "频率统计图" + QString::number(columnCount+1);
|
||||
else{
|
||||
|
|
@ -534,6 +536,11 @@ void FormWell::s_NewTrack(QString strUuid, QString strWellName, QString strSlfNa
|
|||
//套管组件
|
||||
emit CallManage::getInstance()->sig_AddTubingstring(m_strUuid, strSlfName, strWellName, strTrackName, strLineName);
|
||||
}
|
||||
else if (strType == "LogMudObject")
|
||||
{
|
||||
//斜井三图一表
|
||||
emit CallManage::getInstance()->sig_AddLogMud(m_strUuid, strSlfName, strWellName, strTrackName, strLineName);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ SOURCES += \
|
|||
GeoIndicatorGenerator.cpp \
|
||||
InDefTableDlg.cpp \
|
||||
InterfaceWidget.cpp \
|
||||
LogmudItemDrawer.cpp \
|
||||
LogmudResultItem.cpp \
|
||||
PickFrac.cpp \
|
||||
PropertyWidget.cpp \
|
||||
QCPSizeHandle.cpp \
|
||||
|
|
@ -67,6 +69,7 @@ SOURCES += \
|
|||
formhead.cpp \
|
||||
forminfo.cpp \
|
||||
formline.cpp \
|
||||
formlogmud.cpp \
|
||||
formmultiheads.cpp \
|
||||
formtrack.cpp \
|
||||
formtracktop.cpp \
|
||||
|
|
@ -108,6 +111,8 @@ HEADERS += \
|
|||
GeoIndicatorGenerator.h \
|
||||
InDefTableDlg.h \
|
||||
InterfaceWidget.h \
|
||||
LogmudResultItem.h \
|
||||
LogmuditemDrawer.h \
|
||||
PickFrac.h \
|
||||
PropertyWidget.h \
|
||||
QCPSizeHandle.h \
|
||||
|
|
@ -136,6 +141,7 @@ HEADERS += \
|
|||
formhead.h \
|
||||
forminfo.h \
|
||||
formline.h \
|
||||
formlogmud.h \
|
||||
formmultiheads.h \
|
||||
formtrack.h \
|
||||
formtracktop.h \
|
||||
|
|
@ -168,6 +174,7 @@ FORMS += \
|
|||
formhead.ui \
|
||||
forminfo.ui \
|
||||
formline.ui \
|
||||
formlogmud.ui \
|
||||
formmultiheads.ui \
|
||||
formtrack.ui \
|
||||
formtracktop.ui \
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="LogmuditemDrawer.h" />
|
||||
<QtMoc Include="LogmudResultItem.h" />
|
||||
<QtMoc Include="selectlinedialog.h" />
|
||||
<QtMoc Include="TransparentDraggableLine_Master.h" />
|
||||
<QtMoc Include="wellheader.h" />
|
||||
|
|
@ -21,7 +23,6 @@
|
|||
<QtMoc Include="TransparentGroupResult.h" />
|
||||
<QtMoc Include="transparentdraggableRightList.h" />
|
||||
<QtMoc Include="transparentdraggableSelectRect.h" />
|
||||
<QtMoc Include="..\common\dropdownbutton.h" />
|
||||
<ClInclude Include="..\common\common.h" />
|
||||
<ClInclude Include="..\common\geometryutils.h" />
|
||||
<ClInclude Include="3rd_qcustomplot\smoothcurve.h" />
|
||||
|
|
@ -52,10 +53,10 @@
|
|||
<QtMoc Include="formmultiheads.h" />
|
||||
<QtMoc Include="fracsel.h" />
|
||||
<QtMoc Include="FormBase.h" />
|
||||
<QtMoc Include="formlogmud.h" />
|
||||
<ClInclude Include="GeoIndicatorGenerator.h" />
|
||||
<QtMoc Include="mainwindowsplitter.h" />
|
||||
<ClInclude Include="ItemBorderDelegate.h" />
|
||||
<ClInclude Include="ObjectArchive.h" />
|
||||
<QtMoc Include="ViewInfo.h" />
|
||||
<QtMoc Include="variantmanager.h" />
|
||||
<QtMoc Include="variantfactory.h" />
|
||||
|
|
@ -105,7 +106,6 @@
|
|||
<QtMoc Include="ConsoleOutputWidget.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\common\dropdownbutton.cpp" />
|
||||
<ClCompile Include="..\common\geometryutils.cpp" />
|
||||
<ClCompile Include="3rd_qcustomplot\smoothcurve.cpp" />
|
||||
<ClCompile Include="3rd_qcustomplot\v2_1\qcustomplot.cpp" />
|
||||
|
|
@ -168,6 +168,7 @@
|
|||
<ClCompile Include="formhead.cpp" />
|
||||
<ClCompile Include="forminfo.cpp" />
|
||||
<ClCompile Include="formline.cpp" />
|
||||
<ClCompile Include="formlogmud.cpp" />
|
||||
<ClCompile Include="formmultiheads.cpp" />
|
||||
<ClCompile Include="formtitle.cpp" />
|
||||
<ClCompile Include="formtrack.cpp" />
|
||||
|
|
@ -177,13 +178,14 @@
|
|||
<ClCompile Include="GeoIndicatorGenerator.cpp" />
|
||||
<ClCompile Include="InDefTableDlg.cpp" />
|
||||
<ClCompile Include="InterfaceWidget.cpp" />
|
||||
<ClCompile Include="LogmudItemDrawer.cpp" />
|
||||
<ClCompile Include="LogmudResultItem.cpp" />
|
||||
<ClCompile Include="main.cpp" />
|
||||
<ClCompile Include="mainwindow.cpp" />
|
||||
<ClCompile Include="mainwindowcurve.cpp" />
|
||||
<ClCompile Include="mainwindowsplitter.cpp" />
|
||||
<ClCompile Include="mycustomplot.cpp" />
|
||||
<ClCompile Include="newheaddialog.cpp" />
|
||||
<ClCompile Include="ObjectArchive.cpp" />
|
||||
<ClCompile Include="PickFrac.cpp" />
|
||||
<ClCompile Include="preqtablewidget.cpp" />
|
||||
<ClCompile Include="PropertyWidget.cpp" />
|
||||
|
|
@ -230,6 +232,7 @@
|
|||
<QtUic Include="formhead.ui" />
|
||||
<QtUic Include="forminfo.ui" />
|
||||
<QtUic Include="formline.ui" />
|
||||
<QtUic Include="formlogmud.ui" />
|
||||
<QtUic Include="formmultiheads.ui" />
|
||||
<QtUic Include="formtitle.ui" />
|
||||
<QtUic Include="formtrack.ui" />
|
||||
|
|
|
|||
|
|
@ -62,9 +62,6 @@
|
|||
<ClInclude Include="GeoIndicatorGenerator.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="ObjectArchive.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="3rd_qcustomplot\smoothcurve.h">
|
||||
<Filter>3rd_qcustomplot</Filter>
|
||||
</ClInclude>
|
||||
|
|
@ -122,6 +119,9 @@
|
|||
<ClInclude Include="3rd_tiff\libtiff\libtiff\uvcode.h">
|
||||
<Filter>libtiff\libtiff</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="LogmuditemDrawer.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtMoc Include="ConsoleOutputWidget.h">
|
||||
|
|
@ -292,9 +292,6 @@
|
|||
<QtMoc Include="fracsel.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="..\common\dropdownbutton.h">
|
||||
<Filter>common</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="mainwindowsplitter.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
|
|
@ -319,6 +316,12 @@
|
|||
<QtMoc Include="selectlinedialog.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="formlogmud.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
<QtMoc Include="LogmudResultItem.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</QtMoc>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="backgrounddelegate.cpp">
|
||||
|
|
@ -399,9 +402,6 @@
|
|||
<ClCompile Include="newheaddialog.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="ObjectArchive.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="PickFrac.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -516,9 +516,6 @@
|
|||
<ClCompile Include="fracsel.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\common\dropdownbutton.cpp">
|
||||
<Filter>common</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="mainwindowsplitter.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -669,6 +666,15 @@
|
|||
<ClCompile Include="selectlinedialog.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="formlogmud.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="LogmudResultItem.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="LogmudItemDrawer.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<QtRcc Include="logplus.qrc">
|
||||
|
|
@ -739,5 +745,8 @@
|
|||
<QtUic Include="selectlinedialog.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
<QtUic Include="formlogmud.ui">
|
||||
<Filter>Form Files</Filter>
|
||||
</QtUic>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
@ -537,7 +537,7 @@ void MainWindowCurve::initToolBar()
|
|||
ui->toolBar->addAction(m_logfaceAc);
|
||||
ui->toolBar->addAction(m_TubingstringAc);
|
||||
ui->toolBar->addAction(m_TDTAc);
|
||||
//ui->toolBar->addAction(m_LogMudAc);
|
||||
ui->toolBar->addAction(m_LogMudAc);
|
||||
|
||||
connect(m_blankTrackAc, &QAction::triggered, this, &MainWindowCurve::s_NewTrack);
|
||||
connect(m_depthAc, &QAction::triggered, this, &MainWindowCurve::s_NewDepth);//深度
|
||||
|
|
@ -566,7 +566,7 @@ void MainWindowCurve::initToolBar()
|
|||
connect(m_logfaceAc, &QAction::triggered, this, &MainWindowCurve::s_NewLogface);//沉积相
|
||||
connect(m_TubingstringAc, &QAction::triggered, this, &MainWindowCurve::s_NewTubingstring);//套管组件
|
||||
connect(m_TDTAc, &QAction::triggered, this, &MainWindowCurve::s_NewTDT);//TDT
|
||||
|
||||
connect(m_LogMudAc, &QAction::triggered, this, &MainWindowCurve::s_NewLogMud);//TDT
|
||||
}
|
||||
|
||||
//初始化工具栏
|
||||
|
|
@ -4289,6 +4289,23 @@ void MainWindowCurve::s_NewTDT()
|
|||
emit CallManage::getInstance()->sig_NewCol(dt);
|
||||
}
|
||||
|
||||
void MainWindowCurve::s_NewLogMud()
|
||||
{
|
||||
//选中道
|
||||
if (m_SelectTableItem.m_iTableType == 2) {
|
||||
//斜井三图一表
|
||||
emit CallManage::getInstance()->sig_AddLogMud(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "Q");
|
||||
return;
|
||||
}
|
||||
|
||||
QStringList sret = this->getSelectWell_New();
|
||||
if (sret.length() <= 0)
|
||||
return;
|
||||
|
||||
//新建井+道+曲线(首条)
|
||||
NewWellAndTrack(sret.at(0), sret.at(1), "Q", "LogMudObject");
|
||||
}
|
||||
|
||||
void MainWindowCurve::s_NewTrackChangeWidth(QString strWellName, double nW)
|
||||
{
|
||||
qDebug() << "MainWindowCurve s_NewTrackChangeWidth";
|
||||
|
|
|
|||
|
|
@ -220,6 +220,7 @@ public slots:
|
|||
void s_NewMCals(); // 多臂井径
|
||||
void s_NewTubingstring(); // 套管组件
|
||||
void s_NewTDT(); // TDT
|
||||
void s_NewLogMud(); // LogMud
|
||||
|
||||
//校深
|
||||
void ApplyShiftDepth(QString strSlfName, QString strLineName, double DepthOffset);
|
||||
|
|
|
|||
|
|
@ -196,6 +196,11 @@ void PreQTableWidget::dropEvent(QDropEvent *event)
|
|||
//套管组件
|
||||
emit CallManage::getInstance()->sig_AddTubingstring(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||
}
|
||||
else if (strType == "LogMudObject")
|
||||
{
|
||||
//LogMud
|
||||
emit CallManage::getInstance()->sig_AddLogMud(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||
}
|
||||
|
||||
// 接受拖拽事件
|
||||
event->setDropAction(Qt::MoveAction);
|
||||
|
|
@ -319,6 +324,12 @@ void PreQTableWidget::dropEvent(QDropEvent *event)
|
|||
//套管组件
|
||||
emit CallManage::getInstance()->sig_AddTubingstring(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||
}
|
||||
else if (strType == "LogMudObject")
|
||||
{
|
||||
//斜井三图一表
|
||||
emit CallManage::getInstance()->sig_AddLogMud(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||
}
|
||||
|
||||
//
|
||||
//m_listLineName.push_back(strLineName);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user