This commit is contained in:
crqiqi77 2026-03-19 09:44:17 +08:00
commit 0a7170a58f
35 changed files with 1147 additions and 274 deletions

View File

@ -83,7 +83,7 @@ signals:
void sig_AddLogface(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0, QStringList listOtherProperty={}); void sig_AddLogface(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0, QStringList listOtherProperty={});
//套管组件 //套管组件
void sig_AddTubingstring(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0); void sig_AddTubingstring(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0, QStringList listOtherProperty={});
//TDT //TDT
void sig_AddTDT(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0); void sig_AddTDT(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0);
@ -127,6 +127,10 @@ signals:
//绘制对称曲线 //绘制对称曲线
void sig_ChangeDrawSymmetry(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawSymmetry); void sig_ChangeDrawSymmetry(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawSymmetry);
//斜井三图一表
void sig_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
QString strGroup, QString strProperty, QVariant variant);
//岩性填充-不填充 //岩性填充-不填充
void sig_ClearFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName); void sig_ClearFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
//岩性填充-填充 //岩性填充-填充

View File

@ -689,7 +689,7 @@ void CDrawTvd::DrawTvd(QPainter* pDC,QRectF mrt)
TitleFontWidth=TitleFontHeight=fm4.height()/2.0; TitleFontWidth=TitleFontHeight=fm4.height()/2.0;
XCenter=mrt.left()+m_Left*100.+(mrt.width()-(m_Left+m_Right)*100.)/2.; XCenter=mrt.left()+m_Left*100.+(mrt.width()-(m_Left+m_Right)*100.)/2.;
if(0) { if(1) {
//if(m_pWellSceneManager->GetIsColorPrint()) { //if(m_pWellSceneManager->GetIsColorPrint()) {
m_GuiJiPen=QPen(m_GuijiColor,m_GuijiWidth*(int)(fbl/2.+0.5)); m_GuiJiPen=QPen(m_GuijiColor,m_GuijiWidth*(int)(fbl/2.+0.5));
m_FramePen=QPen(m_FrameColor,m_FrameWidth*(int)(fbl/2.+0.5));; m_FramePen=QPen(m_FrameColor,m_FrameWidth*(int)(fbl/2.+0.5));;

View File

@ -1,178 +0,0 @@
#include <cassert>
#include "ObjTubingstringResult.h"
#include "MemRdWt.h"
#include "geometryutils.h"
CObjTubingstringResult::CObjTubingstringResult()
{
if(zoneOrder.size()==0)
{
zoneOrder=GetZoneOrder(QString("TubTools.ini"));
}
cclimgpath=GetSymbolDir()+"\\管柱组件\\";
}
CObjTubingstringResult::~CObjTubingstringResult()
{
m_pResultList.clear();
}
bool CObjTubingstringResult::LoadFromSLF(QMyCustomPlot *widget, QString strSlfName, QString csCurve)
{
m_pResultList.clear();
// //隐藏刻度
// widget->xAxis->setTicks(false);
// widget->yAxis->setTicks(false);
// widget->xAxis2->setTicks(false);
// widget->yAxis2->setTicks(false);
Slf_JIEGUPOS *m_pResult=NULL;
CMemRdWt *logio=new CMemRdWt();
if(strSlfName==""||!logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead))
{
delete logio;
// QMessageBox::information(NULL,"提示","SLF文件打开失败请检查",QMessageBox::Yes);
return false;
}
int iIndex=logio->OpenTable(csCurve.toStdString().c_str());
if(iIndex>-1) {
int count=logio->GetTableRecordCount(iIndex);
//int fieldnum=logio->GetTableFieldCount(iIndex);
int len=logio->GetTableRecordLength(iIndex);
m_pResult=(Slf_JIEGUPOS *)new char[len+1];
char buf[200];
logio->IsChange=true;
bool bDrawGuanzhu = false;
for(int i=0;i<count;i++)
{
memset(m_pResult,0,sizeof(len));
logio->ReadTable(iIndex,i+1,m_pResult);
Slf_JIEGUPOS result;
result.Depth=m_pResult->Depth;
result.Order=m_pResult->Order;
result.Number=m_pResult->Number;
m_pResultList.append(result);
//
double depth=m_pResult->Depth;
int Order=m_pResult->Order;
int Number=m_pResult->Number;
if(bDrawGuanzhu == false)
{
//还没有画管柱
if(Number == zoneOrder.value("管底部").toInt()||
Number == zoneOrder.value("油管深").toInt()||
Number == zoneOrder.value("喇叭口").toInt()||
Number == zoneOrder.value("剌叭口").toInt())
{
bDrawGuanzhu = true;//画管柱
QString shotimgfile=GetSymbolDir()+"\\管柱组件\\管柱.png";
//QImage shotimg(shotimgfile);
//pPainter->drawImage(rect,shotimg);
double lY1 = widget->yAxis->range().lower;//+10
double lY2 = widget->yAxis->range().upper;
QCPItemPixmap *mPixmap;
mPixmap = new QCPItemPixmap(widget);
//mPixmap->setPixmap(QPixmap(":/image/file.png")); // 设置图片
mPixmap->setScaled(true, Qt::IgnoreAspectRatio); // 设置缩放方式
mPixmap->setLayer("overlay"); // 确保在最上层
//
float upper = widget->xAxis->range().upper;
mPixmap->topLeft->setCoords(upper, lY1 + (lY2-lY1-m_Oguan)/2.0);
mPixmap->bottomRight->setCoords(-depth, lY2 - (lY2-lY1-m_Oguan)/2.0);
mPixmap->setPixmap(QPixmap(shotimgfile)); // 设置图片
}
}
}
logio->CloseTable(iIndex);
delete m_pResult;
}
delete logio;
for(int i=0; i<m_pResultList.size(); i++)
{
Slf_JIEGUPOS result = m_pResultList[i];
//
drawOne(widget, result);
}
return true;
}
void CObjTubingstringResult::drawOne(QMyCustomPlot *widget, Slf_JIEGUPOS result)
{
double depth=result.Depth;
int Order=result.Order;
int Number=result.Number;
float h=20;
float in=m_Oind;
if(!m_bDrawCCL)
{
if(Number==1) {
in=m_Oind+1;
}
else if(Number==zoneOrder.value("套管接箍").toInt()){
h=10;
in=m_Oind;
}
else if(Number==zoneOrder.value("封隔器").toInt()||
Number==zoneOrder.value("水力猫").toInt()||
Number==zoneOrder.value("卡瓦").toInt()||
Number==zoneOrder.value("定封隔猫").toInt()
)
{
if(Number==zoneOrder.value("封隔器").toInt()) h=25;
in=m_Oind;
}
else {
in=m_Oind+1;
}
}
else
{
in=m_Oind+1;
}
QString name;
if(!m_bDrawCCL)
{
name=zoneOrder.key(QString::number(Number));
if(name.isEmpty()) name=zoneOrder.key(QString::number(1));
}
else
{
name=zoneOrder.key(QString::number(1));
}
QString cclimgfile=cclimgpath+name+".png";
float upper = widget->xAxis->coordToPixel(-depth)-h/2.0;
float lower = widget->xAxis->coordToPixel(-depth)+h/2.0;
float newUpper = widget->xAxis->pixelToCoord(upper);
float newLower = widget->xAxis->pixelToCoord(lower);
widget->addGuanToPlot(newLower, newUpper, cclimgfile, in);
// QString cclimgfile=cclimgpath+name+".png";
// double lY1 = widget->yAxis->range().lower;//+10
// double lY2 = widget->yAxis->range().upper;
// QCPItemPixmap *mPixmap;
// mPixmap = new QCPItemPixmap(widget);
// mPixmap->setScaled(true, Qt::IgnoreAspectRatio); // 设置缩放方式
// mPixmap->setLayer("overlay"); // 确保在最上层
// //
// float upper = widget->xAxis->coordToPixel(-depth)-h/2.0;
// float lower = widget->xAxis->coordToPixel(-depth)+h/2.0;
// float newUpper = widget->xAxis->pixelToCoord(upper);
// float newLower = widget->xAxis->pixelToCoord(lower);
// mPixmap->topLeft->setCoords(newUpper, lY1 + (lY2-lY1-in)/2.0);
// mPixmap->bottomRight->setCoords(newLower, lY2 - (lY2-lY1-in)/2.0);
// mPixmap->setPixmap(QPixmap(cclimgfile)); // 设置图片
}

View File

@ -1,32 +0,0 @@
#ifndef OBTubingstringResultITEM_H
#define OBTubingstringResultITEM_H
#include <QObject>
#include "qmycustomplot.h"
//套管
class CObjTubingstringResult :public QObject
{
Q_OBJECT
public:
CObjTubingstringResult();
virtual ~CObjTubingstringResult();
public:
bool LoadFromSLF(QMyCustomPlot *widget, QString strSlfName, QString csCurve);
void drawOne(QMyCustomPlot *widget, Slf_JIEGUPOS result);
public:
QMap<QString,QString> zoneOrder;
float m_Oguan = 63.5;
float m_Oind = 121.36;
bool m_bDrawCCL = false;
QString cclimgpath="";
QList<Slf_JIEGUPOS> m_pResultList;
private:
};
#endif

View File

@ -285,6 +285,14 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
{ {
if(m_strCurrentProperty == "") if(m_strCurrentProperty == "")
return; return;
if(m_strCurrentProperty == Tvd_Property)
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
ChangTvdProperty(pProperty, variant);
return;
}
if (m_strCurrentProperty == Table_Property)//解释结论 if (m_strCurrentProperty == Table_Property)//解释结论
{ {
bool bDraw = false; bool bDraw = false;
@ -1240,6 +1248,11 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
emit CallManage::getInstance()->sig_changeFacShow(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, m_propertyData[pProperty], bShow); emit CallManage::getInstance()->sig_changeFacShow(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, m_propertyData[pProperty], bShow);
} }
} }
else if (m_strCurrentProperty == Tubing_Property)//套管组件
{
//先处理通用属性
CommonPropertyChanged(pProperty, variant);
}
if("深度比例尺" == m_propertyData[pProperty]) if("深度比例尺" == m_propertyData[pProperty])
{ {
@ -1850,6 +1863,21 @@ void PropertyWidget::ChangHeadItemProperty()
} }
} }
void PropertyWidget::ChangTvdProperty( QtProperty *pProperty, const QVariant &variant )
{
// QSet<QtProperty *> pParentProperty= pProperty->getParentItem().begin();
QString strGroup = "";
if (1 == pProperty->getParentItem().count())
{
QtProperty * pParentProperty= *(pProperty->getParentItem().begin());
strGroup = pParentProperty->propertyName();
}
emit CallManage::getInstance()->sig_ChangeTvdProperty(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName,
strGroup,m_propertyData[pProperty], variant);
}
void PropertyWidget::ChangFillProperty() void PropertyWidget::ChangFillProperty()
{ {
QString newFillMode = "无填充"; QString newFillMode = "无填充";
@ -2428,6 +2456,15 @@ void PropertyWidget::initProperty(FormInfo *formInfo)
//沉积相 //沉积相
this->initFacProperty(formInfo); this->initFacProperty(formInfo);
} }
else if(formInfo->m_strType=="SantuyibiaoObject")
{
this->initTvdProperty(formInfo);
}
else if (formInfo->m_strType == "TubingstringObject")
{
//套管组件
this->initTubingProperty(formInfo);
}
} }
void PropertyWidget::initRoseProperty(FormInfo *formInfo) void PropertyWidget::initRoseProperty(FormInfo *formInfo)
@ -2892,6 +2929,124 @@ void PropertyWidget::initGeoLithProperty(FormInfo *formInfo)
m_strCurrentProperty = GeoLith_Property; m_strCurrentProperty = GeoLith_Property;
} }
// 斜井三图一表属性
void PropertyWidget::initTvdProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("通常", "选择井斜数据", m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("通常", "显示井名", formInfo->m_strWellName, QVariant::String);
_CreateVariantPropertyItem("绘制图形对象", "靶心", true, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "靶心参数表", true, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "井斜数据表", true, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "俯视图", true, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "侧视图深度在左边", false, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "侧视图(水平位移)", true, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "侧视图(向东)", true, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "侧视图(向北)", true, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "侧视图(侧视角)", false, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "立体轨迹图", true, QVariant::Bool);
_CreateVariantPropertyItem("绘制图形对象", "绘制标注信息", true, QVariant::Bool);
_CreateVariantPropertyItem("边框线型", "线宽", 3, QVariant::Int);
_CreateVariantPropertyItem("边框线型", "颜色", QColor(0, 0, 0), QVariant::Color);
_CreateVariantPropertyItem("格线线型", "线宽", 3, QVariant::Int);
_CreateVariantPropertyItem("格线线型", "颜色", QColor(127, 127, 127), QVariant::Color);
_CreateVariantPropertyItem("轨迹线型", "线宽", 3, QVariant::Int);
_CreateVariantPropertyItem("轨迹线型", "颜色", QColor(0, 0, 0), QVariant::Color);
_CreateVariantPropertyItem("靶心半径线型", "线宽", 3, QVariant::Int);
_CreateVariantPropertyItem("靶心半径线型", "颜色", QColor(255, 0, 0), QVariant::Color);
_CreateVariantPropertyItem("靶心连线线型", "线宽", 3, QVariant::Int);
_CreateVariantPropertyItem("靶心连线线型", "颜色", QColor(255, 0, 0), QVariant::Color);
_CreateVariantPropertyItem("字体", "道头字体", QFont(), QVariant::Font);
_CreateVariantPropertyItem("字体", "道头颜色", QColor(0, 0, 0), QVariant::Color);
_CreateVariantPropertyItem("字体", "标题字体", QFont(), QVariant::Font);
_CreateVariantPropertyItem("字体", "标题颜色", QColor(0, 0, 0), QVariant::Color);
_CreateVariantPropertyItem("字体", "数据表字体", QFont(), QVariant::Font);
_CreateVariantPropertyItem("字体", "数据表颜色", QColor(0, 0, 0), QVariant::Color);
_CreateVariantPropertyItem("字体", "刻度字体", QFont(), QVariant::Font);
_CreateVariantPropertyItem("字体", "刻度颜色", QColor(0, 0, 0), QVariant::Color);
_CreateVariantPropertyItem("字体", "注释字体", QFont(), QVariant::Font);
_CreateVariantPropertyItem("字体", "注释颜色", QColor(0, 0, 0), QVariant::Color);
_CreateVariantPropertyItem("井斜数据表参数", "标题名", "井连续井斜仪测量数据表", QVariant::String);
_CreateVariantPropertyItem("井斜数据表参数", "头记录高度(cm)", 1.6, QVariant::Double);
_CreateVariantPropertyItem("井斜数据表参数", "数据记录高度(cm)", 0.8, QVariant::Double);
_CreateVariantPropertyItem("俯视图参数", "标题名", "井井眼俯视图", QVariant::String);
_CreateVariantPropertyItem("俯视图参数", "东西位移最小刻度", -100, QVariant::Double);
_CreateVariantPropertyItem("俯视图参数", "东西位移最大刻度", 100, QVariant::Double);
_CreateVariantPropertyItem("俯视图参数", "南北位移最小刻度", -100, QVariant::Double);
_CreateVariantPropertyItem("俯视图参数", "南北位移最大刻度", 100, QVariant::Double);
_CreateVariantPropertyItem("俯视图参数", "是否绘制闭合线", false, QVariant::Bool);
_CreateVariantPropertyItem("侧视图参数", "标题名", "井井眼侧视图", QVariant::String);
_CreateVariantPropertyItem("侧视图参数", "高宽相同", false, QVariant::Bool);
_CreateVariantPropertyItem("侧视图(水平位移)", "最大侧视位移(m)", 100, QVariant::Double);
_CreateVariantPropertyItem("侧视图(水平位移)", "最小侧视位移(m)", -100, QVariant::Double);
_CreateVariantPropertyItem("侧视图(水平位移)", "最大垂深(m)", 10000, QVariant::Double);
_CreateVariantPropertyItem("侧视图(水平位移)", "最小垂深(m)", 0, QVariant::Double);
_CreateVariantPropertyItem("侧视图(向东)", "最大侧视位移(m)", 100, QVariant::Double);
_CreateVariantPropertyItem("侧视图(向东)", "最小侧视位移(m)", -100, QVariant::Double);
_CreateVariantPropertyItem("侧视图(向东)", "最大垂深(m)", 10000, QVariant::Double);
_CreateVariantPropertyItem("侧视图(向东)", "最小垂深(m)", 0, QVariant::Double);
_CreateVariantPropertyItem("侧视图(侧视角)", "最大侧视位移(m)", 100, QVariant::Double);
_CreateVariantPropertyItem("侧视图(侧视角)", "最小侧视位移(m)", -100, QVariant::Double);
_CreateVariantPropertyItem("侧视图(侧视角)", "最大垂深(m)", 10000, QVariant::Double);
_CreateVariantPropertyItem("侧视图(侧视角)", "最小垂深(m)", 0, QVariant::Double);
_CreateVariantPropertyItem("侧视图(侧视角)", "深度间隔(m)", 100, QVariant::Double);
_CreateVariantPropertyItem("侧视图(侧视角)", "等分个数(=0按深度间隔)", 0, QVariant::Double);
_CreateVariantPropertyItem("侧视图(侧视角)", "侧视角(度)", 90, QVariant::Double);
//
_CreateVariantPropertyItem("立体轨迹图参数", "标题名", "", QVariant::String);
_CreateVariantPropertyItem("立体轨迹图参数", "最大位移(m)", 100, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "起始垂深(m)", 0, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "垂深间隔(m)", 100, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "是否绘制立体框", formInfo->m_is3DFrame, QVariant::Bool);
_CreateVariantPropertyItem("立体轨迹图参数", "俯视角(度)", 10, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "侧视角(度)", 45, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "倾斜角(度)", 0, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "竖线间隔", 5, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "俯视南北间隔数", 20, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "俯视东西间隔数", 20, QVariant::Double);
QStringList listType;
listType.append("NONE");
listType.append("狗腿度");
listType.append("井经");
listType.append("成像");
_CreateEnumPropertyItem("立体轨迹图参数", "附加属性类型", listType.indexOf("NONE"), listType);
_CreateVariantPropertyItem("立体轨迹图参数", "选择井曲线1", "", QVariant::String);
_CreateVariantPropertyItem("立体轨迹图参数", "选择井曲线2", "", QVariant::String);
_CreateVariantPropertyItem("立体轨迹图参数", "调色板参数设置",0, QVariant::Int);
_CreateVariantPropertyItem("立体轨迹图参数", "直径放大系数", 1, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "波形基值", 0, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "波形最大值", 500, QVariant::Double);
_CreateVariantPropertyItem("立体轨迹图参数", "连续填充", false, QVariant::Bool);
_CreateVariantPropertyItem("立体闭合方位线型", "线宽", 1, QVariant::Int);
_CreateVariantPropertyItem("立体闭合方位线型", "颜色", QColor(255, 0, 0), QVariant::Color);
_CreateVariantPropertyItem("绘图参数", "最小深度间隔(m)", 5, QVariant::Double);
_CreateVariantPropertyItem("立体闭合方位线型", "线宽", 3, QVariant::Int);
_CreateVariantPropertyItem("立体闭合方位线型", "颜色", QColor(255, 0, 0), QVariant::Color);
//当前属性类型
m_strCurrentProperty = Tvd_Property;
}
void PropertyWidget::initGeoLithItemProperty(TransparentDraggableGeoLith* tdGeoLith, double lower, double upper, const QString myLith, const QString myOil, const QString myColor) void PropertyWidget::initGeoLithItemProperty(TransparentDraggableGeoLith* tdGeoLith, double lower, double upper, const QString myLith, const QString myOil, const QString myColor)
{ {
//初始化,清空 //初始化,清空
@ -3020,3 +3175,15 @@ void PropertyWidget::initFacProperty(FormInfo *formInfo)
m_strCurrentProperty = Fac_Property; m_strCurrentProperty = Fac_Property;
} }
//套管组件
void PropertyWidget::initTubingProperty(FormInfo *formInfo)
{
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
m_strCurrentProperty = Tubing_Property;
}

View File

@ -64,6 +64,11 @@
#define Fac_Property "Fac_Property" //沉积相 #define Fac_Property "Fac_Property" //沉积相
#define Tvd_Property "Tvd_Property" //斜井三图一表
#define Tubing_Property "Tubing_Property" //套管组件
#define TubingItem_Property "TubingItem_Property" //套管组件item
#pragma execution_character_set("utf-8") #pragma execution_character_set("utf-8")
/** /**
@ -203,6 +208,13 @@ public:
//沉积相 //沉积相
void initFacProperty(FormInfo *formInfo); void initFacProperty(FormInfo *formInfo);
// 斜井三图一表属性
void initTvdProperty(FormInfo *formInfo);
void ChangTvdProperty( QtProperty *pProperty, const QVariant &variant );
//套管组件
void initTubingProperty(FormInfo *formInfo);
void ChangFillProperty();//填充属性改变 void ChangFillProperty();//填充属性改变
void ChangHeadItemProperty();//图头项改变 void ChangHeadItemProperty();//图头项改变

View File

@ -83,7 +83,7 @@ void TransparentDraggableFac::deleteRect()
//mPlot->removeItem(mPixmap); //mPlot->removeItem(mPixmap);
mPlot->removeItem(mItemTitle); mPlot->removeItem(mItemTitle);
mPlot->replot(); //mPlot->replot();
this->deleteLater(); this->deleteLater();
// //

View File

@ -501,7 +501,7 @@ void TransparentDraggableGeoLith::deleteRect()
mPlot->removeItem(mPixmap_Color); mPlot->removeItem(mPixmap_Color);
mPlot->removeItem(mItemTitle); mPlot->removeItem(mItemTitle);
mPlot->replot(); //mPlot->replot();
this->deleteLater(); this->deleteLater();
// //
@ -611,6 +611,7 @@ void TransparentDraggableGeoLith::onDelRect()
//mDragMode = DragNone; //mDragMode = DragNone;
//删除框图 //删除框图
deleteRect(); deleteRect();
mPlot->replot();
//保存 //保存
mPlot->SaveToSLF_GeoLith(); mPlot->SaveToSLF_GeoLith();
//属性清空 //属性清空

View File

@ -230,7 +230,7 @@ void TransparentDraggableGujing::deleteRect()
mPlot->removeItem(mPixmap); mPlot->removeItem(mPixmap);
mPlot->removeItem(mItemTitle); mPlot->removeItem(mItemTitle);
mPlot->replot(); //mPlot->replot();
this->deleteLater(); this->deleteLater();
// //
@ -336,6 +336,7 @@ void TransparentDraggableGujing::onDelRect()
//mDragMode = DragNone; //mDragMode = DragNone;
//删除框图 //删除框图
deleteRect(); deleteRect();
mPlot->replot();
//保存 //保存
mPlot->SaveToSLF_Gujing(); mPlot->SaveToSLF_Gujing();
//属性清空 //属性清空

View File

@ -131,7 +131,7 @@ void TransparentDraggableJiegutext::deleteRect()
mPlot->removeItem(pLine[i]); mPlot->removeItem(pLine[i]);
} }
mPlot->replot(); //mPlot->replot();
this->deleteLater(); this->deleteLater();
// //
@ -227,6 +227,7 @@ void TransparentDraggableJiegutext::onDelRect()
{ {
//删除框图 //删除框图
deleteRect(); deleteRect();
mPlot->replot();
//保存 //保存
mPlot->SaveToSLF_Jiegutext(); mPlot->SaveToSLF_Jiegutext();
//属性清空 //属性清空

View File

@ -207,7 +207,7 @@ void TransparentDraggableLayer::deleteRect()
mPlot->removeItem(mPixmap); mPlot->removeItem(mPixmap);
mPlot->removeItem(mItemTitle); mPlot->removeItem(mItemTitle);
mPlot->replot(); //mPlot->replot();
this->deleteLater(); this->deleteLater();
} }
} }
@ -279,6 +279,7 @@ void TransparentDraggableLayer::onDelRect()
//mDragMode = DragNone; //mDragMode = DragNone;
//删除框图 //删除框图
deleteRect(); deleteRect();
mPlot->replot();
//保存 //保存
mPlot->SaveToSLF_Layer(); mPlot->SaveToSLF_Layer();
//属性清空 //属性清空

View File

@ -77,7 +77,7 @@ void TransparentDraggableLine::deleteRect()
mPlot->removeItem(qcpItemLine); mPlot->removeItem(qcpItemLine);
mPlot->replot(); //mPlot->replot();
this->deleteLater(); this->deleteLater();
} }
} }
@ -108,6 +108,7 @@ void TransparentDraggableLine::onDelRect()
//mDragMode = DragNone; //mDragMode = DragNone;
//删除框图 //删除框图
deleteRect(); deleteRect();
mPlot->replot();
} }

View File

@ -136,7 +136,7 @@ void TransparentDraggableMFac::deleteRect()
//mPlot->removeItem(mPixmap); //mPlot->removeItem(mPixmap);
mPlot->removeItem(mItemTitle); mPlot->removeItem(mItemTitle);
mPlot->replot(); //mPlot->replot();
this->deleteLater(); this->deleteLater();
// //
@ -250,6 +250,7 @@ void TransparentDraggableMFac::onDelRect()
//mDragMode = DragNone; //mDragMode = DragNone;
//删除框图 //删除框图
deleteRect(); deleteRect();
//mPlot->replot();
//保存 //保存
mPlot->SaveToSLF_Fac(); mPlot->SaveToSLF_Fac();
//刷新 bAdd不支持true,否则崩溃因为发消息的item本身会被删除无法继续后续处理 //刷新 bAdd不支持true,否则崩溃因为发消息的item本身会被删除无法继续后续处理

View File

@ -104,7 +104,7 @@ void TransparentDraggablePhase::deleteRect()
//mPlot->removeItem(mPixmap); //mPlot->removeItem(mPixmap);
mPlot->removeItem(mItemTitle); mPlot->removeItem(mItemTitle);
mPlot->replot(); //mPlot->replot();
this->deleteLater(); this->deleteLater();
// //

View File

@ -89,7 +89,7 @@ void TransparentDraggableRect::deleteRect()
mPlot->removeItem(mPixmap); mPlot->removeItem(mPixmap);
mPlot->removeItem(mItemTitle); mPlot->removeItem(mItemTitle);
mPlot->replot(); //mPlot->replot();
this->deleteLater(); this->deleteLater();
} }
} }
@ -161,6 +161,7 @@ void TransparentDraggableRect::onDelRect()
//mDragMode = DragNone; //mDragMode = DragNone;
//删除框图 //删除框图
deleteRect(); deleteRect();
mPlot->replot();
//保存 //保存
mPlot->SaveToSLF_Text(); mPlot->SaveToSLF_Text();
//属性清空 //属性清空

View File

@ -413,6 +413,7 @@ void TransparentDraggableResult::onDelRect()
//mDragMode = DragNone; //mDragMode = DragNone;
//删除框图 //删除框图
deleteRect(); deleteRect();
mPlot->replot();
} }
void TransparentDraggableResult::onMousePress(QMouseEvent *event) void TransparentDraggableResult::onMousePress(QMouseEvent *event)

View File

@ -351,7 +351,7 @@ void TransparentDraggableSwallCore::deleteRect()
mPlot->removeItem(m_qcpItemLine2); mPlot->removeItem(m_qcpItemLine2);
mPlot->removeItem(m_qcpItemLine3); mPlot->removeItem(m_qcpItemLine3);
mPlot->replot(); //mPlot->replot();
this->deleteLater(); this->deleteLater();
// //
@ -452,6 +452,7 @@ void TransparentDraggableSwallCore::onDelRect()
//mDragMode = DragNone; //mDragMode = DragNone;
//删除框图 //删除框图
deleteRect(); deleteRect();
mPlot->replot();
//保存 //保存
mPlot->SaveToSLF_SwallCore(); mPlot->SaveToSLF_SwallCore();
//属性清空 //属性清空

View File

@ -440,7 +440,7 @@ void TransparentGroupResult::deleteRect()
mPlot->removeItem(mItemTitle); mPlot->removeItem(mItemTitle);
mPlot->removeItem(mDragLine); mPlot->removeItem(mDragLine);
mPlot->replot(); //mPlot->replot();
this->deleteLater(); this->deleteLater();
} }
@ -698,6 +698,7 @@ void TransparentGroupResult::onDelRect()
//mDragMode = DragNone; //mDragMode = DragNone;
//删除框图 //删除框图
deleteRect(); deleteRect();
mPlot->replot();
} }
void TransparentGroupResult::onMousePress(QMouseEvent *event) void TransparentGroupResult::onMousePress(QMouseEvent *event)

View File

@ -10,7 +10,6 @@
#include <QtMath> #include <QtMath>
#include "Gradient.h" #include "Gradient.h"
#include "PickFrac.h" #include "PickFrac.h"
#include "ObjTubingstringResult.h"
#include "DrawNrad.h" #include "DrawNrad.h"
#include "formline.h" #include "formline.h"
@ -94,7 +93,7 @@ FormDraw::FormDraw(QWidget *parent, QString strWellName, QString strTrackName) :
connect(CallManage::getInstance(), SIGNAL(sig_AddMCals(QString, QString, QString, QString, QString, int)), this, SLOT(s_addMCals(QString, QString, QString, QString, QString,int))); connect(CallManage::getInstance(), SIGNAL(sig_AddMCals(QString, QString, QString, QString, QString, int)), this, SLOT(s_addMCals(QString, QString, QString, QString, QString,int)));
//套管组件 //套管组件
connect(CallManage::getInstance(), SIGNAL(sig_AddTubingstring(QString, QString, QString, QString, QString, int)), this, SLOT(s_addTubingstring(QString, QString, QString, QString, QString,int))); connect(CallManage::getInstance(), SIGNAL(sig_AddTubingstring(QString, QString, QString, QString, QString, int, QStringList)), this, SLOT(s_addTubingstring(QString, QString, QString, QString, QString,int, QStringList)));
//改变固井曲线名 //改变固井曲线名
connect(CallManage::getInstance(), SIGNAL(sig_changeGujingLine(QString, QString, QString, QString, QString, QString)), this, SLOT(s_changeGujingLine(QString, QString, QString, QString, QString, QString))); connect(CallManage::getInstance(), SIGNAL(sig_changeGujingLine(QString, QString, QString, QString, QString, QString)), this, SLOT(s_changeGujingLine(QString, QString, QString, QString, QString, QString)));
@ -318,6 +317,11 @@ void FormDraw::DisplayLines(QJsonArray linesArray)
//沉积相 //沉积相
DisplayFac_One(lineObjInfo); DisplayFac_One(lineObjInfo);
} }
else if (strType == "TubingstringObject")
{
//套管组件
DisplayTubing_One(lineObjInfo);
}
else else
{ {
DisplayType_One(lineObjInfo); DisplayType_One(lineObjInfo);
@ -762,6 +766,91 @@ void FormDraw::DisplayFac_One(QJsonObject lineObjInfo)
} }
} }
//套管組件
void FormDraw::DisplayTubing_One(QJsonObject lineObjInfo)
{
QString strSlfName = "";
QString strWellName = "";
QString strLineName = "";
QString strAliasName = "";//显示名称
QFont curveNameFont("微软雅黑", 10); // 名称字体
QColor lineColor = QColor(0, 0, 0);//颜色
if (lineObjInfo.contains("SlfName"))
{
QJsonValue value = lineObjInfo.value("SlfName");
if (value.isString()) {
strSlfName = value.toString();
//qDebug() << "SlfName:" << strSlfName;
//
QString slffilename = QString("");
int ind = strSlfName.lastIndexOf('\\');
int ind2 = strSlfName.lastIndexOf('/');
if (ind2 > ind) ind = ind2;
if (ind > -1) {
slffilename = strSlfName.mid(ind + 1);
strSlfName = slffilename;
}
}
}
if (lineObjInfo.contains("WellName"))
{
QJsonValue value = lineObjInfo.value("WellName");
if (value.isString()) {
strWellName = value.toString();
//qDebug() << "WellName:" << strWellName;
}
}
if (lineObjInfo.contains("LineName"))
{
QJsonValue value = lineObjInfo.value("LineName");
if (value.isString()) {
strLineName = value.toString();
//qDebug() << "LineName:" << strLineName;
}
}
if (lineObjInfo.contains("AliasName"))
{
QJsonValue value = lineObjInfo.value("AliasName");
if (value.isString()) {
strAliasName = value.toString();
//qDebug() << "strAliasName:" << strAliasName;
}
}
//字体
if (lineObjInfo.contains("curveNameFont"))
{
QJsonValue value = lineObjInfo.value("curveNameFont");
if (value.isString()) {
curveNameFont.fromString(value.toString());
//qDebug() << "strUnit:" << strUnit;
}
}
//
if (lineObjInfo.contains("lineColor"))
{
lineColor.setNamedColor(lineObjInfo.value("lineColor").toString());
}
QString folderPath = GetLogdataPath();
folderPath = folderPath + g_prjname;
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
if (strLineName != "")
{
QStringList listOtherProperty;
listOtherProperty.append(strAliasName);//别名
listOtherProperty.append(lineColor.name());//名称颜色
listOtherProperty.append(curveNameFont.toString());//名称字体
//套管組件
this->s_addTubingstring(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, 0, listOtherProperty); //
}
}
void FormDraw::DisplayLine_One(QJsonObject lineObjInfo) void FormDraw::DisplayLine_One(QJsonObject lineObjInfo)
{ {
QString strSlfName = ""; QString strSlfName = "";
@ -2847,7 +2936,7 @@ void FormDraw::s_addMCals(QString strUuid, QString strSlfName, QString strWellNa
} }
//套管组件 //套管组件
void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW) void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW, QStringList listOtherProperty)
{ {
//井名&道名不一致 //井名&道名不一致
if(strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName) if(strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName)
@ -2922,9 +3011,8 @@ void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString st
curv->yAxis2->setTicks(false); curv->yAxis2->setTicks(false);
//套管组件 //套管组件
QString strWaveName = "TUBTOOLS"; //QString strWaveName = "TUBTOOLS";
CObjTubingstringResult *objTubingstringResult = new CObjTubingstringResult(); curv->LoadFromSLF_Tubing(strSlfName, strLineName);
objTubingstringResult->LoadFromSLF(curv, strSlfName, strWaveName);
// //
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*))); connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
@ -2933,12 +3021,18 @@ void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString st
m_listTableName.push_back(strLineName); m_listTableName.push_back(strLineName);
QString strAliasName = "套管组件"; QString strAliasName = "套管组件";
QString strUnit = "";
QColor newlineColor=QColor(0,0,0); QColor newlineColor=QColor(0,0,0);
if(listOtherProperty.size()>=3)
{
strAliasName = listOtherProperty[0];
newlineColor.setNamedColor(listOtherProperty[1]);
}
QString strUnit = "";
double width=2; double width=2;
QString strScaleType = ""; QString strScaleType = "";
//道-对象 //道-对象
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strWaveName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "TubingstringObject"); m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "TubingstringObject", listOtherProperty);
} }
void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLineName, void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLineName,

View File

@ -69,6 +69,9 @@ public:
//沉积相 //沉积相
void DisplayFac_One(QJsonObject lineObjInfo); void DisplayFac_One(QJsonObject lineObjInfo);
//套管組件
void DisplayTubing_One(QJsonObject lineObjInfo);
// 跨道设置 // 跨道设置
void crossTrackSetting(); void crossTrackSetting();
@ -263,7 +266,7 @@ public slots:
void s_addMCals(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW); void s_addMCals(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
//套管组件 //套管组件
void s_addTubingstring(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW); void s_addTubingstring(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW, QStringList listOtherProperty);
//TDT //TDT
// void s_addTDT(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW); // void s_addTDT(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);

View File

@ -63,6 +63,10 @@ FormInfo::FormInfo(QWidget *parent, QString strSlfName, QString strWellName, QSt
//绘制对称曲线 //绘制对称曲线
connect(CallManage::getInstance(), SIGNAL(sig_ChangeDrawSymmetry(QString, QString, QString, QString, QString, bool)), this, SLOT(s_ChangeDrawSymmetry(QString, QString, QString, QString, QString, bool))); connect(CallManage::getInstance(), SIGNAL(sig_ChangeDrawSymmetry(QString, QString, QString, QString, QString, bool)), this, SLOT(s_ChangeDrawSymmetry(QString, QString, QString, QString, QString, bool)));
//斜井三图一表
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_ClearFillMode(QString, QString, QString, QString, QString)), this, SLOT(s_ClearFillMode(QString, QString, QString, QString, QString))); connect(CallManage::getInstance(), SIGNAL(sig_ClearFillMode(QString, QString, QString, QString, QString)), this, SLOT(s_ClearFillMode(QString, QString, QString, QString, QString)));
//岩性填充-填充 //岩性填充-填充
@ -177,6 +181,13 @@ QJsonObject FormInfo::makeJson()
//item属性写入slf文件不需要此次记录 //item属性写入slf文件不需要此次记录
return rootObj; return rootObj;
} }
else if (m_strType == "TubingstringObject")
{
//套管组件
//item属性写入slf文件不需要此次记录
return rootObj;
}
rootObj["Unit"] = m_strUnit; rootObj["Unit"] = m_strUnit;
rootObj["Width"] = m_dWidth; rootObj["Width"] = m_dWidth;
@ -950,6 +961,66 @@ void FormInfo::s_ChangeDrawSymmetry(QString strUuid, QString strSlfName, QString
m_bDrawSymmetry = bDrawSymmetry; m_bDrawSymmetry = bDrawSymmetry;
} }
void FormInfo::s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
QString strGroup, QString strProperty, QVariant variant)
{
if("井斜数据表参数" == strGroup)
{
if("标题名" == strProperty)
m_Title_table = variant.value<QString>();
else if("头记录高度(cm)" == strProperty)
m_Head_Height = variant.value<double>();
else if("数据记录高度(cm)" == strProperty)
m_Rec_Height = variant.value<double>();
}
else if("立体轨迹图参数" == strGroup)
{
if("标题名" == strProperty)
m_Title_ltgj = variant.value<QString>();
else if("最大位移(m)" == strProperty)
m_MaxWy1 = variant.value<double>();
else if("起始垂深(m)" == strProperty)
m_LTTTVD = variant.value<double>();
else if("垂深间隔(m)" == strProperty)
m_DepSpace1 = variant.value<double>();
else if("是否绘制立体框" == strProperty)
m_is3DFrame = variant.value<bool>();
else if("俯视角(度)" == strProperty)
m_LttAngle_X = variant.value<double>();
else if("侧视角(度)" == strProperty)
m_LttAngle = variant.value<double>();
else if("倾斜角(度)" == strProperty)
m_LttAngle_Z = variant.value<double>();
else if("竖线间隔" == strProperty)
m_LTTTVD = variant.value<double>();
else if("俯视南北间隔数" == strProperty)
m_YD = variant.value<double>();
else if("俯视东西间隔数" == strProperty)
m_XD = variant.value<double>();
else if("附加属性类型" == strProperty)
m_IsDrawProperty = variant.value<int>();
else if("选择井曲线1" == strProperty)
m_CurveName1 = variant.value<QString>();
else if("选择井曲线2" == strProperty)
m_CurveName2 = variant.value<QString>();
else if("调色板参数设置" == strProperty)
m_ColorTableIndex = variant.value<int>();
else if("直径放大系数" == strProperty)
m_calscale = variant.value<double>();
else if("波形基值" == strProperty)
m_baseval = variant.value<double>();
else if("波形最大值" == strProperty)
m_maxval = variant.value<double>();
else if("连续填充" == strProperty)
m_isBlock = variant.value<bool>();
}
else if("立体轨迹图参数" == strGroup)
{
if("最小深度间隔(m)" == strProperty)
m_Rlev = variant.value<bool>();
}
}
//岩性填充-不填充 //岩性填充-不填充
void FormInfo::s_ClearFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName) void FormInfo::s_ClearFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
{ {
@ -1025,6 +1096,14 @@ void FormInfo::contextMenuEvent(QContextMenuEvent *event)
menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable); menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable);
menu.exec(event->globalPos()); menu.exec(event->globalPos());
} }
else if(m_strType=="TubingstringObject")
{
//套管组件
QMenu menu(this);
menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowTable);
menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable);
menu.exec(event->globalPos());
}
} }
//曲线数据查看 //曲线数据查看

View File

@ -59,6 +59,10 @@ public slots:
//绘制对称曲线 //绘制对称曲线
void s_ChangeDrawSymmetry(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawSymmetry); void s_ChangeDrawSymmetry(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawSymmetry);
//斜井三图一表
void s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
QString strGroup, QString strProperty, QVariant variant);
//岩性填充-不填充 //岩性填充-不填充
void s_ClearFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName); void s_ClearFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
//岩性填充-填充 //岩性填充-填充
@ -175,6 +179,36 @@ public:
bool m_bDrawPhase = true; // 绘制亚相 bool m_bDrawPhase = true; // 绘制亚相
bool m_bDrawMFacName = true; // 微相名称 bool m_bDrawMFacName = true; // 微相名称
//tvd
//斜井三图一表(井斜数据表参数)
QString m_Title_table;
float m_Head_Height;
float m_Rec_Height;
//斜井三图一表(立体轨迹图参数)
QString m_Title_ltgj;
double m_MaxWy1;
double m_LTTTVD;
double m_DepSpace1;
double m_LttAngle;
double m_LttAngle_X;
double m_LttAngle_Z;
bool m_is3DFrame;
double m_LttxDela;
double m_XD;
double m_YD;
int m_IsDrawProperty;
QString m_CurveName1;
QString m_CurveName2;
int m_ColorTableIndex;
double m_calscale;
double m_baseval;
double m_maxval;
double m_Rlev;
bool m_isBlock;
//tvd
public: public:
void setLineWidth(double dWidth); void setLineWidth(double dWidth);
double getLineWidth(); double getLineWidth();

View File

@ -1,6 +1,7 @@
#include "formline.h" #include "formline.h"
#include "ui_formline.h" #include "ui_formline.h"
#include <QPainter> #include <QPainter>
#include "CallManage.h"
#include "DrawTvd.h" #include "DrawTvd.h"
//demo画线暂时不用 //demo画线暂时不用
@ -14,6 +15,11 @@ FormLine::FormLine(QWidget *parent, QString strSlfName, QString strWellName, QSt
m_strWellName = strWellName; m_strWellName = strWellName;
m_strTrackName = strTrackName; m_strTrackName = strTrackName;
m_strLineName = strLineName; m_strLineName = strLineName;
m_drawTvd = NULL;
//斜井三图一表
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)));
} }
void FormLine::DrawTvd() void FormLine::DrawTvd()
@ -42,9 +48,10 @@ void FormLine::paintEvent(QPaintEvent*)
//背景透明 //背景透明
painter.fillRect(rect.left(), rect.top(), rect.width(), rect.height(), QColor(0, 0, 0, 0)); //QColor(67, 67, 67, 100) painter.fillRect(rect.left(), rect.top(), rect.width(), rect.height(), QColor(0, 0, 0, 0)); //QColor(67, 67, 67, 100)
CDrawTvd *drawTvd = new CDrawTvd(); if (!m_drawTvd)
drawTvd->sFilePath = m_strSlfName; m_drawTvd = new CDrawTvd();
drawTvd->DrawTvd(&painter, rect); m_drawTvd->sFilePath = m_strSlfName;
m_drawTvd->DrawTvd(&painter, rect);
// QPainter painter(this); // QPainter painter(this);
// QRect rect = this->rect(); // QRect rect = this->rect();
@ -64,3 +71,241 @@ void FormLine::paintEvent(QPaintEvent*)
// painter.drawRoundRect(rectRound); // painter.drawRoundRect(rectRound);
} }
void FormLine::s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
QString strGroup, QString strProperty, QVariant variant)
{
if("通常" == strGroup)
{
// if("选择井斜数据" == strProperty)
// if("显示名称" == strProperty)
if("显示井名" == strProperty)
m_drawTvd->m_AliasWellName = variant.value<QString>();
}
if("绘制图形对象" == strGroup)
{
if("靶心" == strProperty)
m_drawTvd->objViewInfo->m_IsDrawBX = variant.value<bool>();
if("靶心参数表" == strProperty)
m_drawTvd->objViewInfo->m_IsDrawBxcs = variant.value<bool>();
if("井斜数据表" == strProperty)
m_drawTvd->objViewInfo->m_IsDrawTable = variant.value<bool>();
if("俯视图" == strProperty)
m_drawTvd->objViewInfo->m_IsDrawFst = variant.value<bool>();
if("侧视图深度在左边" == strProperty)
m_drawTvd->objViewInfo->m_DepthLeft = variant.value<bool>();
if("侧视图(水平位移)" == strProperty)
m_drawTvd->objViewInfo->m_IsDrawCst1 = variant.value<bool>();
if("侧视图(向东)" == strProperty)
m_drawTvd->objViewInfo->m_IsDrawCst2 = variant.value<bool>();
if("侧视图(向北)" == strProperty)
m_drawTvd->objViewInfo->m_IsDrawCst3 = variant.value<bool>();
if("侧视图(侧视角)" == strProperty)
m_drawTvd->objViewInfo->m_IsDrawCst = variant.value<bool>();
if("立体轨迹图" == strProperty)
m_drawTvd->objViewInfo->m_IsDrawLtgjt = variant.value<bool>();
if("绘制标注信息" == strProperty)
m_drawTvd->objViewInfo->m_isDrawNote = variant.value<bool>();
}
if("边框线型" == strGroup)
{
if("线宽" == strProperty)
m_drawTvd->m_FrameWidth = variant.value<int>();
else if("颜色" == strProperty)
m_drawTvd->m_FrameColor = variant.value<QColor>();
}
if("格线线型" == strGroup)
{
if("线宽" == strProperty)
m_drawTvd->m_GridWidth = variant.value<int>();
else if("颜色" == strProperty)
m_drawTvd->m_GridColor = variant.value<QColor>();
}
if("轨迹线型" == strGroup)
{
if("线宽" == strProperty)
m_drawTvd->m_GuijiWidth = variant.value<int>();
else if("颜色" == strProperty)
m_drawTvd->m_GuijiColor = variant.value<QColor>();
}
if("靶心半径线型" == strGroup)
{
if("线宽" == strProperty)
m_drawTvd->m_BxbjWidth = variant.value<int>();
else if("颜色" == strProperty)
m_drawTvd->m_BxbjColor = variant.value<QColor>();
}
if("靶心连线线型" == strGroup)
{
if("线宽" == strProperty)
m_drawTvd->m_BxlxWidth = variant.value<int>();
else if("颜色" == strProperty)
m_drawTvd->m_BxlxColor = variant.value<QColor>();
}
if("字体" == strGroup)
{
if("道头字体" == strProperty)
m_drawTvd->objViewInfo->m_HeadFont = variant.value<QFont>();
else if("道头颜色" == strProperty)
m_drawTvd->objViewInfo->m_HeadColor = variant.value<QColor>();
if("标题字体" == strProperty)
m_drawTvd->objViewInfo->m_TitleFont = variant.value<QFont>();
else if("标题颜色" == strProperty)
m_drawTvd->objViewInfo->m_TitleColor = variant.value<QColor>();
if("数据表字体" == strProperty)
m_drawTvd->objViewInfo->m_TableFont = variant.value<QFont>();
else if("数据表颜色" == strProperty)
m_drawTvd->objViewInfo->m_TableColor = variant.value<QColor>();
if("刻度字体" == strProperty)
m_drawTvd->objViewInfo->m_ScaleFont = variant.value<QFont>();
else if("刻度颜色" == strProperty)
m_drawTvd->objViewInfo->m_ScaleColor = variant.value<QColor>();
if("注释字体" == strProperty)
m_drawTvd->objViewInfo->m_NoteFont = variant.value<QFont>();
else if("注释颜色" == strProperty)
m_drawTvd->objViewInfo->m_NoteColor = variant.value<QColor>();
}
if("井斜数据表参数" == strGroup)
{
if("标题名" == strProperty)
m_drawTvd->m_Title_table = variant.value<QString>();
else if("头记录高度(cm)" == strProperty)
m_drawTvd->objViewInfo->m_Head_Height = variant.value<double>();
else if("数据记录高度(cm)" == strProperty)
m_drawTvd->objViewInfo->m_Rec_Height = variant.value<double>();
}
else if("俯视图参数" == strGroup)
{
if("标题名" == strProperty)
m_drawTvd->objViewInfo->m_Title_fst = variant.value<QString>();
else if("东西位移最小刻度" == strProperty)
m_drawTvd->objViewInfo->m_MinXe = variant.value<double>();
else if("东西位移最大刻度" == strProperty)
m_drawTvd->objViewInfo->m_MaxXe = variant.value<double>();
else if("南北位移最小刻度" == strProperty)
m_drawTvd->objViewInfo->m_MinYn = variant.value<double>();
else if("南北位移最大刻度" == strProperty)
m_drawTvd->objViewInfo->m_MaxYn = variant.value<double>();
else if("是否绘制闭合线" == strProperty)
m_drawTvd->objViewInfo->m_bPlotBhx = variant.value<bool>();
}
else if("立体轨迹图参数" == strGroup)
{
if("标题名" == strProperty)
m_drawTvd->objViewInfo->m_Title_ltgj = variant.value<QString>();
else if("最大位移(m)" == strProperty)
m_drawTvd->objViewInfo->m_MaxWy1 = variant.value<double>();
else if("起始垂深(m)" == strProperty)
m_drawTvd->objViewInfo->m_LTTTVD = variant.value<double>();
else if("垂深间隔(m)" == strProperty)
m_drawTvd->objViewInfo->m_DepSpace1 = variant.value<double>();
else if("是否绘制立体框" == strProperty)
m_drawTvd->objViewInfo->m_is3DFrame = variant.value<bool>();
else if("俯视角(度)" == strProperty)
m_drawTvd->objViewInfo->m_LttAngle_X = variant.value<double>();
else if("侧视角(度)" == strProperty)
m_drawTvd->objViewInfo->m_LttAngle = variant.value<double>();
else if("倾斜角(度)" == strProperty)
m_drawTvd->objViewInfo->m_LttAngle_Z = variant.value<double>();
else if("竖线间隔" == strProperty)
m_drawTvd->objViewInfo->m_LTTTVD = variant.value<double>();
else if("俯视南北间隔数" == strProperty)
m_drawTvd->objViewInfo->m_YD = variant.value<double>();
else if("俯视东西间隔数" == strProperty)
m_drawTvd->objViewInfo->m_XD = variant.value<double>();
else if("附加属性类型" == strProperty)
m_drawTvd->objViewInfo->m_IsDrawProperty = variant.value<int>();
else if("选择井曲线1" == strProperty)
m_drawTvd->objViewInfo->m_CurveName1 = variant.value<QString>();
else if("选择井曲线2" == strProperty)
m_drawTvd->objViewInfo->m_CurveName2 = variant.value<QString>();
else if("调色板参数设置" == strProperty)
m_drawTvd->objViewInfo->m_ColorTableIndex = variant.value<int>();
else if("直径放大系数" == strProperty)
m_drawTvd->objViewInfo->m_calscale = variant.value<double>();
else if("波形基值" == strProperty)
m_drawTvd->objViewInfo->m_baseval = variant.value<double>();
else if("波形最大值" == strProperty)
m_drawTvd->objViewInfo->m_maxval = variant.value<double>();
else if("连续填充" == strProperty)
m_drawTvd->objViewInfo->m_isBlock = variant.value<bool>();
}
else if("侧视图参数" == strGroup)
{
if("标题名" == strProperty)
m_drawTvd->objViewInfo->m_Title_cst = variant.value<QString>();
else if("高宽相同" == strProperty)
m_drawTvd->objViewInfo->m_heqw = variant.value<bool>();
}
else if("侧视图(水平位移)" == strGroup)
{
if("最大侧视位移(m)" == strProperty)
m_drawTvd->objViewInfo->m_MaxWy_HOFF = variant.value<double>();
else if("最小侧视位移(m)" == strProperty)
m_drawTvd->objViewInfo->m_MinWy_HOFF = variant.value<double>();
else if("最大垂深(m)" == strProperty)
m_drawTvd->objViewInfo->m_MaxTVD_HOFF = variant.value<double>();
else if("最小垂深(m)" == strProperty)
m_drawTvd->objViewInfo->m_MinTVD_HOFF = variant.value<double>();
}
else if("侧视图(向东)" == strGroup)
{
if("最大侧视位移(m)" == strProperty)
m_drawTvd->objViewInfo->m_MaxWy_XE = variant.value<double>();
else if("最小侧视位移(m)" == strProperty)
m_drawTvd->objViewInfo->m_MinWy_XE = variant.value<double>();
else if("最大垂深(m)" == strProperty)
m_drawTvd->objViewInfo->m_MaxTVD_XE = variant.value<double>();
else if("最小垂深(m)" == strProperty)
m_drawTvd->objViewInfo->m_MinTVD_XE = variant.value<double>();
}
else if("侧视图(向北)" == strGroup)
{
if("最大侧视位移(m)" == strProperty)
m_drawTvd->objViewInfo->m_MaxWy_YN = variant.value<double>();
else if("最小侧视位移(m)" == strProperty)
m_drawTvd->objViewInfo->m_MinWy_YN = variant.value<double>();
else if("最大垂深(m)" == strProperty)
m_drawTvd->objViewInfo->m_MaxTVD_YN = variant.value<double>();
else if("最小垂深(m)" == strProperty)
m_drawTvd->objViewInfo->m_MinTVD_YN = variant.value<double>();
}
else if("侧视图(侧视角)" == strGroup)
{
if("最大侧视位移(m)" == strProperty)
m_drawTvd->objViewInfo->m_MaxWy = variant.value<double>();
else if("最小侧视位移(m)" == strProperty)
m_drawTvd->objViewInfo->m_MinWy = variant.value<double>();
else if("最大垂深(m)" == strProperty)
m_drawTvd->objViewInfo->m_MaxTVD = variant.value<double>();
else if("最小垂深(m)" == strProperty)
m_drawTvd->objViewInfo->m_MinTVD = variant.value<double>();
else if("深度间隔(m)" == strProperty)
m_drawTvd->objViewInfo->m_DepSpace = variant.value<double>();
else if("等分个数(=0按深度间隔)" == strProperty)
m_drawTvd->objViewInfo->m_DepSpaceN = variant.value<double>();
else if("侧视角(度)" == strProperty)
m_drawTvd->objViewInfo->m_CsAngle = variant.value<double>();
}
// else if("立体闭合方位线型" == strGroup)
// {
// if("线宽" == strProperty)
// m_drawTvd->objViewInfo->m_DepSpaceN = variant.value<bool>();
// if("颜色" == strProperty)
// m_drawTvd->objViewInfo->m_Rlev = variant.value<bool>();
// }
else if("立体轨迹图参数" == strGroup)
{
if("最小深度间隔(m)" == strProperty)
m_drawTvd->objViewInfo->m_Rlev = variant.value<bool>();
}
// else if("立体井径线型" == strGroup)
// {
// if("线宽" == strProperty)
// m_drawTvd->objViewInfo->m_DepSpaceN = variant.value<bool>();
// if("颜色" == strProperty)
// m_drawTvd->objViewInfo->m_Rlev = variant.value<bool>();
// }
update();
}

View File

@ -2,12 +2,13 @@
#define FORMLINE_H #define FORMLINE_H
#include <QWidget> #include <QWidget>
#include <QVariant>
#pragma execution_character_set("utf-8") #pragma execution_character_set("utf-8")
namespace Ui { namespace Ui {
class FormLine; class FormLine;
} }
class CDrawTvd;
class FormLine : public QWidget class FormLine : public QWidget
{ {
Q_OBJECT Q_OBJECT
@ -28,10 +29,14 @@ public:
QString m_strWellName; QString m_strWellName;
QString m_strTrackName; QString m_strTrackName;
QString m_strLineName; QString m_strLineName;
CDrawTvd *m_drawTvd;
public: public:
void DrawTvd(); void DrawTvd();
public slots:
//斜井三图一表
void s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
QString strGroup, QString strProperty, QVariant variant);
}; };
#endif // FORMLINE_H #endif // FORMLINE_H

View File

@ -107,8 +107,8 @@ FormTrack::FormTrack(QWidget *parent, QString strWellName, QString strTrackName)
this, SLOT(s_addMCals(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString))); this, SLOT(s_addMCals(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)));
//套管组件 //套管组件
connect(this, SIGNAL(sig_AddTubingstring(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)), connect(this, SIGNAL(sig_AddTubingstring(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList)),
this, SLOT(s_addTubingstring(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString))); this, SLOT(s_addTubingstring(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString, QStringList)));
//曲线选中,置顶 //曲线选中,置顶
connect(CallManage::getInstance(), SIGNAL(sig_Raise(QString, QString, QString, QString, QString, int, QString)), this, SLOT(s_Raise(QString, QString, QString, QString, QString, int, QString))); connect(CallManage::getInstance(), SIGNAL(sig_Raise(QString, QString, QString, QString, QString, int, QString)), this, SLOT(s_Raise(QString, QString, QString, QString, QString, int, QString)));
@ -267,7 +267,7 @@ void FormTrack::Add(QString strSlfName, QString strWellName, QString strTrackNam
} }
else if(strType=="TubingstringObject") else if(strType=="TubingstringObject")
{ {
emit sig_AddTubingstring(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType); emit sig_AddTubingstring(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType, listOtherProperty);
} }
} }
@ -1078,7 +1078,7 @@ void FormTrack::s_addMCals(QString strSlfName, QString strWellName, QString strT
} }
//套管 //套管
void FormTrack::s_addTubingstring(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType) void FormTrack::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)
{ {
qDebug() << "FormTrack s_addTubingstring"; qDebug() << "FormTrack s_addTubingstring";
@ -1103,6 +1103,13 @@ void FormTrack::s_addTubingstring(QString strSlfName, QString strWellName, QStri
formInfo->setVMin(vmin); formInfo->setVMin(vmin);
formInfo->setFrontColor(QColor(0,0,0)); formInfo->setFrontColor(QColor(0,0,0));
formInfo->setBackColor(QColor(255,255,255)); formInfo->setBackColor(QColor(255,255,255));
//
if(listOtherProperty.size()>=3)
{
QFont curveNameFont("微软雅黑", 10); // 名称字体
curveNameFont.fromString(listOtherProperty[2]);
formInfo->m_curveNameFont = curveNameFont;
}
//设置高度 //设置高度
ui->tableWidget->setRowHeight(row, 100); ui->tableWidget->setRowHeight(row, 100);
//单元格委托 //单元格委托

View File

@ -94,7 +94,7 @@ signals:
void sig_AddJiegutext(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_AddJiegutext(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_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_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_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); 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={});
public slots: 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={}); 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={});
@ -116,7 +116,7 @@ public slots:
void s_addJiegutext(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_addJiegutext(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_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 s_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 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_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); 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_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_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int iTableType, QString strFormInfoType); void s_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int iTableType, QString strFormInfoType);

View File

@ -39,7 +39,6 @@ SOURCES += \
Gradient.cpp \ Gradient.cpp \
InDefTableDlg.cpp \ InDefTableDlg.cpp \
InterfaceWidget.cpp \ InterfaceWidget.cpp \
ObjTubingstringResult.cpp \
PickFrac.cpp \ PickFrac.cpp \
PropertyWidget.cpp \ PropertyWidget.cpp \
QCPSizeHandle.cpp \ QCPSizeHandle.cpp \
@ -103,7 +102,6 @@ HEADERS += \
Gradient.h \ Gradient.h \
InDefTableDlg.h \ InDefTableDlg.h \
InterfaceWidget.h \ InterfaceWidget.h \
ObjTubingstringResult.h \
PickFrac.h \ PickFrac.h \
PropertyWidget.h \ PropertyWidget.h \
QCPSizeHandle.h \ QCPSizeHandle.h \

View File

@ -3273,7 +3273,18 @@ void MainWindowCurve::s_NewMCals()
//套管组件 //套管组件
void MainWindowCurve::s_NewTubingstring() void MainWindowCurve::s_NewTubingstring()
{ {
QStringList sret = this->getSelectWell(); // QStringList sret = this->getSelectWell();
// if(sret.length() <= 0)
// return;
//选中道
if(m_SelectTableItem.m_iTableType==2) {
//新建表格曲线
emit CallManage::getInstance()->sig_AddTableLine(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "IMAGE_DATA");
return;
}
QStringList sret = this->getSelectWell_New();
if(sret.length() <= 0) if(sret.length() <= 0)
return; return;

View File

@ -68,6 +68,13 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
xAxis2->setTickLabels(false); xAxis2->setTickLabels(false);
yAxis2->setTickLabels(false); yAxis2->setTickLabels(false);
//套管组件
zoneOrder_Tubing.clear();
if(zoneOrder_Tubing.size()==0)
{
zoneOrder_Tubing=GetZoneOrder(QString("TubTools.ini"));
}
connect(this->selectionRect(), &QCPSelectionRect::accepted, this, &QMyCustomPlot::slotSelectionRectAccepted); connect(this->selectionRect(), &QCPSelectionRect::accepted, this, &QMyCustomPlot::slotSelectionRectAccepted);
// make bottom and left axes transfer their ranges to top and right axes: // make bottom and left axes transfer their ranges to top and right axes:
connect(xAxis, SIGNAL(rangeChanged(QCPRange)), xAxis2, SLOT(setRange(QCPRange))); connect(xAxis, SIGNAL(rangeChanged(QCPRange)), xAxis2, SLOT(setRange(QCPRange)));
@ -1299,6 +1306,26 @@ void QMyCustomPlot::contextMenuEvent(QContextMenuEvent *event)
//menu.addAction(QIcon(::GetImagePath() + "icon/Layer.png"), "沉积相自动描述", this, &QMyCustomPlot::ChangeDep); //menu.addAction(QIcon(::GetImagePath() + "icon/Layer.png"), "沉积相自动描述", this, &QMyCustomPlot::ChangeDep);
menu.exec(event->globalPos()); menu.exec(event->globalPos());
} }
else if (strType == "TubingstringObject")
{
QStringList strs=zoneOrder_Tubing.keys();
QStringList mstrs=QString("油管接箍,套管接箍,偏配,封隔器,筛管,喇叭口,水力猫,短接,管底部,油管深").split(",");
QMenu menu(this);
QMenu *pSubMenu = menu.addMenu("特殊工具");
//套管组件
for(int i=0;i<strs.size();i++) {
QString str;
str="添加"+strs.at(i);
if(mstrs.indexOf(strs.at(i))>-1) {
menu.addAction(QIcon(::GetImagePath() + "icon/OneSideWallCore.png"), str, this, &QMyCustomPlot::addItem_Tubing);
}
else {
pSubMenu->addAction(QIcon(::GetImagePath() + "icon/OneSideWallCore.png"), str, this, &QMyCustomPlot::addItem_Tubing);
}
}
//menu.addAction(QIcon(::GetImagePath() + "icon/OneSideWallCore.png"), "添加偏配", this, &QMyCustomPlot::addItem_Tubing);
menu.exec(event->globalPos());
}
} }
//右键--添加分段线 //右键--添加分段线
@ -7850,6 +7877,29 @@ bool QMyCustomPlot::LoadFromSLF_Fac(QString strSlfName, QString csCurve, bool bA
return true; return true;
} }
//添加套管组件
void QMyCustomPlot::addItem_Tubing()
{
double right_Hight = xAxis->pixelToCoord(m_event->pos().y());//x轴展示深度
QAction *pAct=dynamic_cast<QAction *>(sender());
if(pAct){
QString str=pAct->text();
str.remove("添加");
int i=zoneOrder_Tubing[str].toInt();
if(i>-1) {
Slf_JIEGUPOS result;
result.Depth=-right_Hight;
result.Order=0;
result.Number=i;
//
drawOne_Tubing(result);
//保存
SaveToSLF_Tubing();
}
}
}
//添加沉积相 //添加沉积相
void QMyCustomPlot::addItem_Fac() void QMyCustomPlot::addItem_Fac()
{ {
@ -8068,3 +8118,263 @@ void QMyCustomPlot::RefreshItems_Fac(bool bAdd)
//属性清空 //属性清空
//PropertyService()->InitCurrentViewInfo(); //PropertyService()->InitCurrentViewInfo();
} }
bool QMyCustomPlot::LoadFromSLF_Tubing(QString strSlfName, QString csCurve)
{
m_pResultList_Tubing.clear();
cclimgpath_Tubing=GetSymbolDir()+"\\管柱组件\\";
Slf_JIEGUPOS *m_pResult=NULL;
CMemRdWt *logio=new CMemRdWt();
if(strSlfName==""||!logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead))
{
delete logio;
// QMessageBox::information(NULL,"提示","SLF文件打开失败请检查",QMessageBox::Yes);
return false;
}
int iIndex=logio->OpenTable(csCurve.toStdString().c_str());
if(iIndex>-1) {
int count=logio->GetTableRecordCount(iIndex);
//int fieldnum=logio->GetTableFieldCount(iIndex);
int len=logio->GetTableRecordLength(iIndex);
m_pResult=(Slf_JIEGUPOS *)new char[len+1];
char buf[200];
logio->IsChange=true;
bool bDrawGuanzhu = false;
for(int i=0;i<count;i++)
{
memset(m_pResult,0,sizeof(len));
logio->ReadTable(iIndex,i+1,m_pResult);
Slf_JIEGUPOS result;
result.Depth=m_pResult->Depth;
result.Order=m_pResult->Order;
result.Number=m_pResult->Number;
m_pResultList_Tubing.append(result);
//
double depth=m_pResult->Depth;
int Order=m_pResult->Order;
int Number=m_pResult->Number;
if(bDrawGuanzhu == false)
{
//还没有画管柱
if(Number == zoneOrder_Tubing.value("管底部").toInt()||
Number == zoneOrder_Tubing.value("油管深").toInt()||
Number == zoneOrder_Tubing.value("喇叭口").toInt()||
Number == zoneOrder_Tubing.value("剌叭口").toInt())
{
bDrawGuanzhu = true;//画管柱
QString shotimgfile=GetSymbolDir()+"\\管柱组件\\管柱.png";
//QImage shotimg(shotimgfile);
//pPainter->drawImage(rect,shotimg);
double lY1 = this->yAxis->range().lower;//+10
double lY2 = this->yAxis->range().upper;
QCPItemPixmap *mPixmap;
mPixmap = new QCPItemPixmap(this);
//mPixmap->setPixmap(QPixmap(":/image/file.png")); // 设置图片
mPixmap->setScaled(true, Qt::IgnoreAspectRatio); // 设置缩放方式
mPixmap->setLayer("overlay"); // 确保在最上层
//
float upper = this->xAxis->range().upper;
mPixmap->topLeft->setCoords(upper, lY1 + (lY2-lY1-m_Oguan_Tubing)/2.0);
mPixmap->bottomRight->setCoords(-depth, lY2 - (lY2-lY1-m_Oguan_Tubing)/2.0);
mPixmap->setPixmap(QPixmap(shotimgfile)); // 设置图片
}
}
}
logio->CloseTable(iIndex);
delete m_pResult;
}
delete logio;
for(int i=0; i<m_pResultList_Tubing.size(); i++)
{
Slf_JIEGUPOS result = m_pResultList_Tubing[i];
//
drawOne_Tubing(result);
}
return true;
}
void QMyCustomPlot::drawOne_Tubing(Slf_JIEGUPOS result)
{
double depth=result.Depth;
//int Order=result.Order;
int Number=result.Number;
float h=20;
float in=m_Oind_Tubing;
if(!m_bDrawCCL_Tubing)
{
if(Number==1) {
in=m_Oind_Tubing+1;
}
else if(Number==zoneOrder_Tubing.value("套管接箍").toInt()){
h=10;
in=m_Oind_Tubing;
}
else if(Number==zoneOrder_Tubing.value("封隔器").toInt()||
Number==zoneOrder_Tubing.value("水力猫").toInt()||
Number==zoneOrder_Tubing.value("卡瓦").toInt()||
Number==zoneOrder_Tubing.value("定封隔猫").toInt()
)
{
if(Number==zoneOrder_Tubing.value("封隔器").toInt()) h=25;
in=m_Oind_Tubing;
}
else {
in=m_Oind_Tubing+1;
}
}
else
{
in=m_Oind_Tubing+1;
}
QString name;
if(!m_bDrawCCL_Tubing)
{
name=zoneOrder_Tubing.key(QString::number(Number));
if(name.isEmpty()) name=zoneOrder_Tubing.key(QString::number(1));
}
else
{
name=zoneOrder_Tubing.key(QString::number(1));
}
QString cclimgfile=cclimgpath_Tubing+name+".png";
float upper = this->xAxis->coordToPixel(-depth)-h/2.0;
float lower = this->xAxis->coordToPixel(-depth)+h/2.0;
float newUpper = this->xAxis->pixelToCoord(upper);
float newLower = this->xAxis->pixelToCoord(lower);
this->addGuanToPlot(newLower, newUpper, cclimgfile, in);
// QString cclimgfile=cclimgpath+name+".png";
// double lY1 = widget->yAxis->range().lower;//+10
// double lY2 = widget->yAxis->range().upper;
// QCPItemPixmap *mPixmap;
// mPixmap = new QCPItemPixmap(widget);
// mPixmap->setScaled(true, Qt::IgnoreAspectRatio); // 设置缩放方式
// mPixmap->setLayer("overlay"); // 确保在最上层
// //
// float upper = widget->xAxis->coordToPixel(-depth)-h/2.0;
// float lower = widget->xAxis->coordToPixel(-depth)+h/2.0;
// float newUpper = widget->xAxis->pixelToCoord(upper);
// float newLower = widget->xAxis->pixelToCoord(lower);
// mPixmap->topLeft->setCoords(newUpper, lY1 + (lY2-lY1-in)/2.0);
// mPixmap->bottomRight->setCoords(newLower, lY2 - (lY2-lY1-in)/2.0);
// mPixmap->setPixmap(QPixmap(cclimgfile)); // 设置图片
}
bool QMyCustomPlot::SaveToSLF_Tubing()
{
static int isrun=false;
if(isrun) return false;
QString ss=m_strSlfName;
if(ss=="") return false;
isrun=true;
Slf_JIEGUPOS m_Result;
CMemRdWt *logio=new CMemRdWt();
if(!logio->Open(ss.toStdString().c_str(),CSlfIO::modeReadWrite))
{
delete logio;
QMessageBox::information(NULL,"提示","SLF文件打开失败请检查",QMessageBox::Yes);
isrun=false;
return false;
}
bool isfirst=false;
int iIndex=logio->OpenTable(m_strLineName.toStdString().c_str());
if (iIndex < 0)
{
if(!m_mapDraggable_Guan.size()) {
delete logio;
isrun=false;
return false;
}
if(m_strLineName.indexOf("READCCL",0,Qt::CaseInsensitive)>-1) {
iIndex=logio->Open_Set_Table(m_strLineName.toStdString().c_str(),0,3,
"NO,DEPTH,NUMBER",
"4,4,4",//字段长度
"1,4,4",//字段类型
"0,0,0");//字段备注,1-枚举
}
else iIndex=logio->Open_Set_Table(m_strLineName.toStdString().c_str(),0,4,
"NO,DEPTH,NUMBER,DEST",
"4,4,4,64",//字段长度
"1,4,4,6",//字段类型
"0,0,8,0");//字段备注,1-枚举
isfirst=true;
}
logio->IsChange=true;
logio->SetTableRecordCount(iIndex,m_mapDraggable_Guan.size());
if(!m_mapDraggable_Guan.size()) {
delete logio;
if(isfirst)AddTableToWellRound();
isrun=false;
return false;
}
int len=logio->GetTableRecordLength(iIndex);
TransparentDraggableGuan *pDraggableRect =NULL;
//排序
QList<float> listSDepth;
for (QMap<QString,QObject *>::Iterator iter = m_mapDraggable_Guan.begin(); iter != m_mapDraggable_Guan.end(); iter++)
{
pDraggableRect = (TransparentDraggableGuan*)iter.value();
//
QCPRange tmpRange = pDraggableRect->getRange();
//
float fSDepth = -tmpRange.upper;
listSDepth.append(fSDepth);
}
qSort(listSDepth);
//
for(int i=0; i<listSDepth.size(); i++)
{
for (QMap<QString,QObject *>::Iterator iter = m_mapDraggable_Guan.begin(); iter != m_mapDraggable_Guan.end(); iter++)
{
pDraggableRect = (TransparentDraggableGuan*)iter.value();
//
QCPRange tmpRange = pDraggableRect->getRange();
float fSDepth = -tmpRange.upper;
float fEDepth = -tmpRange.lower;
if(fSDepth == listSDepth[i])//按顺序写入
{
memset(&m_Result,0,len);
m_Result.Order=i+1;
m_Result.Depth=(fSDepth+fEDepth)/2.0;
//
QString name,itemName;
pDraggableRect->m_Result.replace("\\","/");
int l=pDraggableRect->m_Result.lastIndexOf("/");
if(l>-1) name=pDraggableRect->m_Result.mid(l+1);
l=name.indexOf(".");
name=name.left(l);
itemName=name;
//
m_Result.Number=zoneOrder_Tubing.value(itemName).toInt();
if(len==sizeof(Slf_JIEGUPOS)) {
strncpy(m_Result.Dest,"",64);
m_Result.Dest[63]=0;
}
logio->WriteTable(iIndex,i+1,&m_Result);
}
}
}
logio->CloseTable(iIndex);
delete logio;
if(isfirst)AddTableToWellRound();
isrun=false;
return true;
}

View File

@ -270,6 +270,18 @@ public:
//保存 //保存
void SaveToSLF_Fac(); void SaveToSLF_Fac();
//套管組件
QMap<QString,QString> zoneOrder_Tubing;
float m_Oguan_Tubing = 63.5;
float m_Oind_Tubing = 121.36;
bool m_bDrawCCL_Tubing = false;
QString cclimgpath_Tubing="";
QList<Slf_JIEGUPOS> m_pResultList_Tubing;
QString m_strAddTubing="";
bool LoadFromSLF_Tubing(QString strSlfName, QString csCurve);
void drawOne_Tubing(Slf_JIEGUPOS result);
bool SaveToSLF_Tubing();
public slots: public slots:
void slot_time(); void slot_time();
@ -441,6 +453,10 @@ public slots:
void addItem_Fac(); //添加沉积相 void addItem_Fac(); //添加沉积相
void RefreshItems_Fac(bool bAdd=true); //刷新数据 void RefreshItems_Fac(bool bAdd=true); //刷新数据
//右键--套管组件
void addItem_Tubing(); //添加套管组件
//void RefreshItems_Tubing(); //刷新数据
//右键--解释结论 //右键--解释结论
void onOpenEditResult(); void onOpenEditResult();
void onCloseEditResult(); void onCloseEditResult();

View File

@ -1,5 +1,6 @@
#include "transparentdraggableGuan.h" #include "transparentdraggableGuan.h"
#include "PropertyWidget.h"
#include "CallManage.h"
extern double g_dPixelPerCm;//每厘米像素数 extern double g_dPixelPerCm;//每厘米像素数
//static GeoIndicatorGenerator m_drawGeo; //static GeoIndicatorGenerator m_drawGeo;
@ -236,20 +237,52 @@ void TransparentDraggableGuan::deleteRect()
mPlot->removeItem(mPixmap); mPlot->removeItem(mPixmap);
// mPlot->removeItem(mItemTitle); // mPlot->removeItem(mItemTitle);
mPlot->replot(); //mPlot->replot();
this->deleteLater(); this->deleteLater();
//
// //避免二次绘制框图
// mPlot->m_bDrawRect = false;
// mDragMode = DragNone;
// //取消选中框
// mPlot->selectionRect()->cancel();
// mPlot->replot();
// mPlot->selectionRect()->mActive=true;
} }
} }
//设置深度移动量
void TransparentDraggableGuan::setItemDepthOffset()
{
bool ok=0;
double depthshift=QInputDialog::getDouble(NULL,"深度移动","请输入移动的深度量(上移-,下移+)",0.0,-2147483647, 2147483647,4,&ok);
if(!ok) return;
QCPRange currentRange = getRange();
QCPRange newRange = currentRange;
newRange.lower = currentRange.lower-depthshift;
newRange.upper = currentRange.upper-depthshift;
//
double width = currentRange.size();
// //double center = mDragStartRange.center() + dx;
// double center = currentRange.center() - depthshift;
// newRange.lower = center - width/2;
// newRange.upper = center + width/2;
// 检查是否超出轴范围
if(newRange.lower < getMyLower()) {
return;
}
else if(newRange.upper > getMyUpper()) {
return;
}
//
setRange(newRange.lower, newRange.upper);
{
//保存
mPlot->SaveToSLF_Tubing();
//属性清空
PropertyService()->InitCurrentViewInfo();
//取消所有选中单元格
emit CallManage::getInstance()->sig_Raise(mPlot->m_strUuid, "", "", "", "", 0, "");
}
}
void TransparentDraggableGuan::initRect() void TransparentDraggableGuan::initRect()
{ {
@ -317,6 +350,11 @@ void TransparentDraggableGuan::onDelRect()
//mDragMode = DragNone; //mDragMode = DragNone;
//删除框图 //删除框图
deleteRect(); deleteRect();
mPlot->replot();
//保存
mPlot->SaveToSLF_Tubing();
//属性清空
PropertyService()->InitCurrentViewInfo();
} }
@ -343,19 +381,13 @@ void TransparentDraggableGuan::onMousePress(QMouseEvent *event)
//event->accept(); //event->accept();
// double low = mRect->topLeft->coords().x();
// double hight = mRect->bottomRight->coords().x();
// PropertyService()->initTubingItemProperty(this, low, hight, m_Result);
QMenu menu(nullptr); QMenu menu(nullptr);
QAction *delAction = menu.addAction("删除框图"); menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除选中对象", this, &TransparentDraggableGuan::onDelRect);
//delAction->installEventFilter(this); menu.addAction(QIcon(::GetImagePath() + "icon/Shift.png"), "设置深度移动量", this, &TransparentDraggableGuan::setItemDepthOffset);
connect(delAction, &QAction::triggered, this, &TransparentDraggableGuan::onDelRect);
// QAction* pItem = menu.exec(event->globalPos());
// if(pItem == delAction)
// {
// //event->accept();
// int ii=0;
// ii++;
// }
menu.exec(event->globalPos()); menu.exec(event->globalPos());
return; return;
@ -393,8 +425,32 @@ void TransparentDraggableGuan::onMousePress(QMouseEvent *event)
} }
int TransparentDraggableGuan::getCursor()
{
if (m_bMoveRect)
{
return 2;
}
if (m_bArrow)
{
return 1;
}
return 0;
}
void TransparentDraggableGuan::onMouseMove(QMouseEvent *event) void TransparentDraggableGuan::onMouseMove(QMouseEvent *event)
{ {
if (mDragMode == DragRect)
{
m_bMoveRect = true;
}
else
{
m_bArrow = false;
m_bMoveRect = false;
}
//--------------------
if(mDragMode == DragNone) return; if(mDragMode == DragNone) return;
event->accept(); event->accept();
@ -487,6 +543,12 @@ void TransparentDraggableGuan::onMouseMove(QMouseEvent *event)
} }
} }
//位置改变鼠标拖动item
if(newRange.lower!= mDragStartRange.lower || newRange.upper!= mDragStartRange.upper)
{
m_bChange = true;
}
setRange(newRange.lower, newRange.upper); setRange(newRange.lower, newRange.upper);
} }
@ -495,6 +557,21 @@ void TransparentDraggableGuan::onMouseRelease(QMouseEvent *event)
{ {
if(event->button() == Qt::LeftButton && mDragMode != DragNone) { if(event->button() == Qt::LeftButton && mDragMode != DragNone) {
event->accept(); event->accept();
//属性
{
// double low = mRect->topLeft->coords().x();
// double hight = mRect->bottomRight->coords().x();
// PropertyService()->initGujingItemProperty(this, low, hight, m_Result);
if(m_bChange)
{
//保存
mPlot->SaveToSLF_Tubing();
}
//取消所有选中单元格
emit CallManage::getInstance()->sig_Raise(mPlot->m_strUuid, "", "", "", "", 0, "");
}
//避免二次绘制框图 //避免二次绘制框图
mPlot->m_bDrawRect = false; mPlot->m_bDrawRect = false;
//emit rangeChanged(getRange()); //emit rangeChanged(getRange());

View File

@ -55,14 +55,15 @@ private:
void updateHandles() ; void updateHandles() ;
private slots: private slots:
void onDelRect(); void onDelRect(); //删除
void setItemDepthOffset(); //设置深度移动量
void onMousePress(QMouseEvent *event); void onMousePress(QMouseEvent *event);
void onMouseMove(QMouseEvent *event); void onMouseMove(QMouseEvent *event);
void onMouseRelease(QMouseEvent *event); void onMouseRelease(QMouseEvent *event);
double getMyLower(); double getMyLower();
double getMyUpper(); double getMyUpper();
private: public:
QMyCustomPlot *mPlot; QMyCustomPlot *mPlot;
QCPItemRect *mRect; QCPItemRect *mRect;
// QCPItemRect *mLeftHandle; // QCPItemRect *mLeftHandle;
@ -83,6 +84,13 @@ private:
// 添加最小宽度成员变量 // 添加最小宽度成员变量
double mMinWidth; double mMinWidth;
float mIn=123; float mIn=123;
//鼠标形状
bool m_bArrow = false;
bool m_bMoveRect = false;
int getCursor();
//鼠标是否拖动item
bool m_bChange = false;
}; };
#endif // TRANSPARENTDRAGGABLEGUAN_H #endif // TRANSPARENTDRAGGABLEGUAN_H

View File

@ -159,7 +159,7 @@ void TransparentDraggableRightList::deleteRect()
} }
mPlot->m_bPriviewRightList = false;//当前是否正在编辑曲线。 mPlot->m_bPriviewRightList = false;//当前是否正在编辑曲线。
mPlot->replot(); //mPlot->replot();
this->deleteLater(); this->deleteLater();
// //
@ -244,6 +244,7 @@ void TransparentDraggableRightList::onDelRect()
//mDragMode = DragNone; //mDragMode = DragNone;
//删除框图 //删除框图
deleteRect(); deleteRect();
mPlot->replot();
} }

View File

@ -171,7 +171,7 @@ void TransparentDraggableSelectRect::deleteRect()
} }
mPlot->m_bEditRect = false;//当前是否正在编辑曲线。 mPlot->m_bEditRect = false;//当前是否正在编辑曲线。
mPlot->replot(); //mPlot->replot();
this->deleteLater(); this->deleteLater();
// //
@ -276,6 +276,7 @@ void TransparentDraggableSelectRect::onDelRect()
//mDragMode = DragNone; //mDragMode = DragNone;
//删除框图 //删除框图
deleteRect(); deleteRect();
mPlot->replot();
} }

View File

@ -292,7 +292,7 @@ void TransparentDraggableImage::deleteRect()
mPlot->removeItem(mPixmap); mPlot->removeItem(mPixmap);
mPlot->removeItem(mItemTitle); mPlot->removeItem(mItemTitle);
mPlot->replot(); //mPlot->replot();
this->deleteLater(); this->deleteLater();
// //
@ -383,6 +383,7 @@ void TransparentDraggableImage::onDelRect()
//mDragMode = DragNone; //mDragMode = DragNone;
//删除框图 //删除框图
deleteRect(); deleteRect();
mPlot->replot();
} }