Merge branch 'main' of http://git.hivekion.com:3000/jiayulong/logplus
This commit is contained in:
commit
c981553536
|
|
@ -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_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
|
||||
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_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);
|
||||
//岩性填充-填充
|
||||
|
|
@ -167,6 +171,9 @@ signals:
|
|||
//改变Draw属性
|
||||
void sig_changeDrawProperty(QVariantList vlist);
|
||||
|
||||
//改变深度属性
|
||||
void sig_changeDepthProperty(QVariantList vlist);
|
||||
|
||||
//右键--添加分段线
|
||||
void sig_AddShiftLine(QString strUuid, double left_Low, double right_Hight);
|
||||
//校深线段
|
||||
|
|
@ -217,6 +224,9 @@ signals:
|
|||
//是否显示
|
||||
void sig_changeGeoLithShow(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString propertyData, bool bShow);
|
||||
|
||||
//改变沉积相属性,是否显示
|
||||
void sig_changeFacShow(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString propertyData, bool bShow);
|
||||
|
||||
//
|
||||
//void sig_addImageToPlot(QMyCustomPlot* customPlot, double left_Low, double right_Hight, QString imagePath);
|
||||
|
||||
|
|
|
|||
|
|
@ -689,7 +689,7 @@ void CDrawTvd::DrawTvd(QPainter* pDC,QRectF mrt)
|
|||
TitleFontWidth=TitleFontHeight=fm4.height()/2.0;
|
||||
|
||||
XCenter=mrt.left()+m_Left*100.+(mrt.width()-(m_Left+m_Right)*100.)/2.;
|
||||
if(0) {
|
||||
if(1) {
|
||||
//if(m_pWellSceneManager->GetIsColorPrint()) {
|
||||
m_GuiJiPen=QPen(m_GuijiColor,m_GuijiWidth*(int)(fbl/2.+0.5));
|
||||
m_FramePen=QPen(m_FrameColor,m_FrameWidth*(int)(fbl/2.+0.5));;
|
||||
|
|
|
|||
|
|
@ -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)); // 设置图片
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
@ -195,18 +195,20 @@ void PropertyWidget::changedYxzpItemProperty(QtProperty *qtProperty, const QVari
|
|||
{
|
||||
if(m_tdImage)
|
||||
{
|
||||
QString pictureFile = qVariant.value<QString>();
|
||||
qDebug()<<pictureFile<<"-------------";
|
||||
// m_tdImage->setLower(-lower);
|
||||
QString imagePath = qVariant.toString();
|
||||
m_tdImage->setResult(imagePath);
|
||||
m_tdImage->mPlot->SaveToSLFImage();
|
||||
m_tdImage->setRange(m_tdImage->getRange().lower, m_tdImage->getRange().upper);
|
||||
}
|
||||
}
|
||||
else if("左边距%" == m_propertyData[qtProperty])
|
||||
{
|
||||
if(m_tdImage)
|
||||
{
|
||||
// int lower = qVariant.value<int>();
|
||||
// m_tdImage->setLower(-lower);
|
||||
// 左边距
|
||||
double yxzpLeftMargin = qVariant.toDouble();
|
||||
m_tdImage->setLeft(yxzpLeftMargin);
|
||||
m_tdImage->setRange(m_tdImage->getRange().lower, m_tdImage->getRange().upper,yxzpLeftMargin, m_tdImage->getWidth());
|
||||
m_tdImage->mPlot->SaveToSLFImage();
|
||||
}
|
||||
}
|
||||
|
|
@ -214,8 +216,9 @@ void PropertyWidget::changedYxzpItemProperty(QtProperty *qtProperty, const QVari
|
|||
{
|
||||
if(m_tdImage)
|
||||
{
|
||||
// double lower = qVariant.value<double>();
|
||||
// m_tdImage->setLower(-lower);
|
||||
double yxzpLineWidth = qVariant.toDouble();
|
||||
m_tdImage->setWidth(yxzpLineWidth);
|
||||
m_tdImage->setRange(m_tdImage->getRange().lower, m_tdImage->getRange().upper, m_tdImage->getLeft(), yxzpLineWidth);
|
||||
m_tdImage->mPlot->SaveToSLFImage();
|
||||
}
|
||||
}
|
||||
|
|
@ -223,27 +226,57 @@ void PropertyWidget::changedYxzpItemProperty(QtProperty *qtProperty, const QVari
|
|||
{
|
||||
if(m_tdImage)
|
||||
{
|
||||
// double lower = qVariant.value<double>();
|
||||
// m_tdImage->setLower(-lower);
|
||||
m_tdImage->mPlot->SaveToSLFImage();
|
||||
int borderWidth = qVariant.toInt();
|
||||
m_tdImage->setBorderWidth(borderWidth);
|
||||
m_tdImage->setRange(m_tdImage->getRange().lower, m_tdImage->getRange().upper);
|
||||
}
|
||||
}
|
||||
else if("颜色" == m_propertyData[qtProperty])
|
||||
{
|
||||
if(m_tdImage)
|
||||
{
|
||||
// double lower = qVariant.value<double>();
|
||||
// m_tdImage->setLower(-lower);
|
||||
m_tdImage->mPlot->SaveToSLFImage();
|
||||
QColor newColor = qVariant.value<QColor>();
|
||||
m_tdImage->setBorderColor(newColor);
|
||||
m_tdImage->setRange(m_tdImage->getRange().lower, m_tdImage->getRange().upper);
|
||||
}
|
||||
}
|
||||
else if("线型" == m_propertyData[qtProperty])
|
||||
{
|
||||
if(m_tdImage)
|
||||
{
|
||||
// double lower = qVariant.value<double>();
|
||||
// m_tdImage->setLower(-lower);
|
||||
m_tdImage->mPlot->SaveToSLFImage();
|
||||
Qt::PenStyle newStyle = Qt::SolidLine;
|
||||
int iStyle = qVariant.value<int>();
|
||||
switch(iStyle)
|
||||
{
|
||||
case 0:
|
||||
//无
|
||||
newStyle = Qt::NoPen;
|
||||
break;
|
||||
case 1:
|
||||
//实线
|
||||
newStyle = Qt::SolidLine;
|
||||
break;
|
||||
case 2:
|
||||
//虚线
|
||||
newStyle = Qt::DashLine;
|
||||
break;
|
||||
case 3:
|
||||
//点线
|
||||
newStyle = Qt::DotLine;
|
||||
break;
|
||||
case 4:
|
||||
//虚点线
|
||||
newStyle = Qt::DashDotLine;
|
||||
break;
|
||||
case 5:
|
||||
//虚点点线
|
||||
newStyle = Qt::DashDotDotLine;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
m_tdImage->setBorderStyle(newStyle);
|
||||
m_tdImage->setRange(m_tdImage->getRange().lower, m_tdImage->getRange().upper);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -252,6 +285,14 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
|||
{
|
||||
if(m_strCurrentProperty == "")
|
||||
return;
|
||||
if(m_strCurrentProperty == Tvd_Property)
|
||||
{
|
||||
//先处理通用属性
|
||||
CommonPropertyChanged(pProperty, variant);
|
||||
ChangTvdProperty(pProperty, variant);
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_strCurrentProperty == Table_Property)//解释结论
|
||||
{
|
||||
bool bDraw = false;
|
||||
|
|
@ -964,6 +1005,10 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
|||
{
|
||||
return;
|
||||
}
|
||||
if("" == strLineName)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
m_formInfo->m_strLineName = strLineName;
|
||||
|
|
@ -1137,6 +1182,8 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
|||
m_formInfo->m_strAliasName = strAliasName;
|
||||
//改变曲线Title
|
||||
emit CallManage::getInstance()->sig_changeJiegutextTitle(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, strAliasName);
|
||||
//刷新
|
||||
InitCurrentViewInfo();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1147,6 +1194,8 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
|||
m_formInfo->m_strAliasName = strAliasName;
|
||||
//改变曲线Title
|
||||
emit CallManage::getInstance()->sig_changeJiegutextTitle(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, strAliasName);
|
||||
//刷新
|
||||
InitCurrentViewInfo();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1160,6 +1209,8 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
|||
strAliasName == "气测-FMT-射孔-文本";
|
||||
//改变曲线Title
|
||||
emit CallManage::getInstance()->sig_changeJiegutextTitle(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, strAliasName);
|
||||
//刷新
|
||||
InitCurrentViewInfo();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1174,6 +1225,8 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
|||
}
|
||||
//改变曲线Title
|
||||
emit CallManage::getInstance()->sig_changeJiegutextTitle(m_formInfo->m_strUuid, m_formInfo->m_strSlfName, m_formInfo->m_strWellName, m_formInfo->m_strTrackName, m_formInfo->m_strLineName, strAliasName);
|
||||
//刷新
|
||||
InitCurrentViewInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1184,8 +1237,69 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
|||
{
|
||||
//先处理通用属性
|
||||
CommonPropertyChanged(pProperty, variant);
|
||||
}
|
||||
|
||||
if("绘制相" == m_propertyData[pProperty] ||
|
||||
"绘制亚相" == m_propertyData[pProperty] ||
|
||||
"微相名称" == m_propertyData[pProperty])
|
||||
{
|
||||
bool bShow = variant.value<bool>();
|
||||
if(m_propertyData[pProperty] == "绘制相")
|
||||
{
|
||||
m_formInfo->m_bDrawFac = bShow;
|
||||
}
|
||||
else if(m_propertyData[pProperty] == "绘制亚相")
|
||||
{
|
||||
m_formInfo->m_bDrawPhase = bShow;
|
||||
}
|
||||
else if(m_propertyData[pProperty] == "微相名称")
|
||||
{
|
||||
m_formInfo->m_bDrawMFacName = 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])
|
||||
{
|
||||
QString newUnit = variant.value<QString>();
|
||||
m_formInfo->m_strUnit = newUnit;
|
||||
m_formInfo->update();
|
||||
}
|
||||
else if("左刻度" == m_propertyData[pProperty])
|
||||
{
|
||||
double newLeftScale = variant.value<double>();
|
||||
m_formInfo->m_vmin = newLeftScale;
|
||||
emit CallManage::getInstance()->sig_ChangeLeftScale(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newLeftScale);
|
||||
}
|
||||
else if("右刻度" == m_propertyData[pProperty])
|
||||
{
|
||||
double newRightScale = variant.value<double>();
|
||||
m_formInfo->m_vmax = newRightScale;
|
||||
emit CallManage::getInstance()->sig_ChangeRightScale(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newRightScale);
|
||||
}
|
||||
}
|
||||
else if (m_strCurrentProperty == Depth_Property) // 深度
|
||||
{
|
||||
//先处理通用属性
|
||||
CommonPropertyChanged(pProperty, variant);
|
||||
// changedDepthProperty(pProperty, variant);
|
||||
|
||||
QVariantList listCond;
|
||||
listCond << m_strUuid;
|
||||
listCond << m_strSlfName;
|
||||
listCond << m_strWellName;
|
||||
listCond << m_strTrackName;
|
||||
listCond << m_strLineName;
|
||||
listCond << m_propertyData[pProperty];
|
||||
listCond << variant;
|
||||
emit CallManage::getInstance()->sig_changeDepthProperty(listCond);
|
||||
}
|
||||
|
||||
if("深度比例尺" == m_propertyData[pProperty])
|
||||
{
|
||||
//qDebug() << "深度比例尺->改变";
|
||||
|
|
@ -1795,6 +1909,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()
|
||||
{
|
||||
QString newFillMode = "无填充";
|
||||
|
|
@ -2289,12 +2418,35 @@ void PropertyWidget::initTableProperty(FormInfo *formInfo)
|
|||
|
||||
void PropertyWidget::initDepthProperty(FormInfo *formInfo)
|
||||
{
|
||||
//
|
||||
_CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String);
|
||||
//
|
||||
_CreateVariantPropertyItem("深度标注", "间隔", formInfo->m_nJg, QVariant::String);
|
||||
_CreateVariantPropertyItem("通常", "头部高度(cm)", formInfo->m_bVerticaDrawing, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("通常", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("通常", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
|
||||
_CreateVariantPropertyItem("通常", "显示单位", formInfo->m_nJg, QVariant::String);
|
||||
_CreateVariantPropertyItem("通常", "标尺颜色", formInfo->m_lineColor, QVariant::Color);
|
||||
|
||||
_CreateVariantPropertyItem("字体", "字体", formInfo->m_curveNameFont, QVariant::Font);//名称
|
||||
_CreateVariantPropertyItem("字体", "单位", formInfo->m_nJg, QVariant::String);
|
||||
|
||||
_CreateVariantPropertyItem("深度标注", "间隔", formInfo->m_nJg, QVariant::Double);
|
||||
_CreateVariantPropertyItem("深度标注", "标注字体", formInfo->m_curveNameFont, QVariant::Font);
|
||||
_CreateVariantPropertyItem("深度标注", "旋转(°)", formInfo->m_nJg, QVariant::Double);
|
||||
_CreateVariantPropertyItem("深度标注", "绘制起点深度", formInfo->m_nJg, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("深度标注", "绘制终点深度", formInfo->m_nJg, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("深度标注", "斜深", formInfo->m_nJg, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("深度标注", "海拔垂深", formInfo->m_nJg, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("深度标注", "垂深", formInfo->m_strAliasName, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("深度标注", "斜深位置", formInfo->m_nJg, QVariant::String);
|
||||
_CreateVariantPropertyItem("深度标注", "垂深位置", formInfo->m_nJg, QVariant::String);
|
||||
_CreateVariantPropertyItem("深度标注", "海拔垂深位置", formInfo->m_nJg, QVariant::String);
|
||||
|
||||
_CreateVariantPropertyItem("主刻度线", "主刻度线长度", formInfo->m_nJg, QVariant::Double);
|
||||
_CreateVariantPropertyItem("主刻度线", "主刻度线宽度", formInfo->m_nJg, QVariant::Double);
|
||||
|
||||
_CreateVariantPropertyItem("次刻度线", "次刻度线长度", formInfo->m_nJg, QVariant::Double);
|
||||
_CreateVariantPropertyItem("次刻度线", "次刻度线宽度", formInfo->m_nJg, QVariant::Double);
|
||||
|
||||
m_strCurrentProperty = Depth_Property;
|
||||
}
|
||||
|
||||
void PropertyWidget::initProperty(FormInfo *formInfo)
|
||||
|
|
@ -2373,6 +2525,15 @@ void PropertyWidget::initProperty(FormInfo *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)
|
||||
|
|
@ -2760,7 +2921,8 @@ void PropertyWidget::initImageProperty(FormInfo *formInfo)
|
|||
|
||||
m_strCurrentProperty = Image_Property;
|
||||
}
|
||||
void PropertyWidget::initImageItemProperty(TransparentDraggableImage* tdImage, double lower, double upper, QString pictureFile)
|
||||
void PropertyWidget::initImageItemProperty(TransparentDraggableImage* tdImage, double lower, double upper, QString pictureFile,
|
||||
double left, double width, QColor borderColor, Qt::PenStyle borderStyle, int borderWidth)
|
||||
{
|
||||
//初始化,清空
|
||||
InitCurrentViewInfo();
|
||||
|
|
@ -2792,13 +2954,21 @@ void PropertyWidget::initImageItemProperty(TransparentDraggableImage* tdImage, d
|
|||
_CreateVariantPropertyItem("当前项", "绘制颜色", formInfo->m_yxzpDrawColor, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("当前项", "顶深(m)", -upper, QVariant::Double);
|
||||
_CreateVariantPropertyItem("当前项", "底深(m)", -lower, QVariant::Double);
|
||||
_CreateVariantPropertyItem("当前项", "图片文件", formInfo->m_yxzpPictureFile, VariantManager::filePathTypeId());
|
||||
_CreateVariantPropertyItem("当前项", "左边距%", formInfo->m_yxzpLeftMargin, QVariant::Int);
|
||||
_CreateVariantPropertyItem("当前项", "宽度%", formInfo->m_yxzpWidth, QVariant::Int);
|
||||
_CreateVariantPropertyItem("当前项", "图片文件", pictureFile, VariantManager::filePathTypeId());
|
||||
_CreateVariantPropertyItem("当前项", "左边距%", left, QVariant::Int);
|
||||
_CreateVariantPropertyItem("当前项", "宽度%", width, QVariant::Int);
|
||||
|
||||
_CreateVariantPropertyItem("边框属性", "线宽", formInfo->m_yxzpLineWidth, QVariant::Int);
|
||||
_CreateVariantPropertyItem("边框属性", "颜色", formInfo->m_yxzpColor, QVariant::Color);
|
||||
_CreateVariantPropertyItem("边框属性", "线型", formInfo->m_yxzpLineshape, QVariant::String);
|
||||
_CreateVariantPropertyItem("边框属性", "线宽", borderWidth, QVariant::Int);
|
||||
_CreateVariantPropertyItem("边框属性", "颜色", borderColor, QVariant::Color);
|
||||
// _CreateVariantPropertyItem("边框属性", "线型", borderStyle, QVariant::String);
|
||||
QStringList listStyle;
|
||||
listStyle.append("无");
|
||||
listStyle.append("实线");
|
||||
listStyle.append("虚线");
|
||||
listStyle.append("点线");
|
||||
listStyle.append("虚点线");
|
||||
listStyle.append("虚点点线");
|
||||
_CreateEnumPropertyItem("边框属性", "线型", (int)borderStyle, listStyle);
|
||||
}
|
||||
|
||||
//当前属性类型
|
||||
|
|
@ -2828,6 +2998,124 @@ void PropertyWidget::initGeoLithProperty(FormInfo *formInfo)
|
|||
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)
|
||||
{
|
||||
//初始化,清空
|
||||
|
|
@ -2949,6 +3237,42 @@ void PropertyWidget::initFacProperty(FormInfo *formInfo)
|
|||
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
|
||||
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
|
||||
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
|
||||
//显示
|
||||
_CreateVariantPropertyItem("数据", "绘制相", formInfo->m_bDrawFac, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("数据", "绘制亚相", formInfo->m_bDrawPhase, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("数据", "微相名称", formInfo->m_bDrawMFacName, QVariant::Bool);
|
||||
|
||||
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);
|
||||
|
||||
_CreateVariantPropertyItem("显示设置", "显示单位", formInfo->m_strUnit, QVariant::String);
|
||||
_CreateVariantPropertyItem("显示设置", "左刻度", formInfo->m_vmin, QVariant::Double);
|
||||
_CreateVariantPropertyItem("显示设置", "右刻度", formInfo->m_vmax, QVariant::Double);
|
||||
|
||||
m_strCurrentProperty = Tubing_Property;
|
||||
}
|
||||
|
||||
void PropertyWidget::changedDepthProperty(QtProperty *pProperty, const QVariant &variant)
|
||||
{
|
||||
if("长度" == m_propertyData[pProperty])
|
||||
{
|
||||
int height = variant.toInt();
|
||||
|
||||
m_formInfo->update();
|
||||
}
|
||||
else if("长度" == m_propertyData[pProperty])
|
||||
{
|
||||
int height = variant.toInt();
|
||||
|
||||
m_formInfo->update();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@
|
|||
#define Image_Property "Image_Property" // 岩心图片
|
||||
#define ImageItem_Property "ImageItem_Property" // 岩心图片item
|
||||
|
||||
#define Depth_Property "Depth_Property" // 深度
|
||||
|
||||
#define SwallCore_Property "SwallCore_Property" //井壁取心
|
||||
#define SwallCoreItem_Property "SwallCoreItem_Property" //井壁取心item
|
||||
|
||||
|
|
@ -64,6 +66,11 @@
|
|||
|
||||
#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")
|
||||
|
||||
/**
|
||||
|
|
@ -75,10 +82,11 @@
|
|||
class PropertyWidget:public QDockWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PropertyWidget(const QString &title, QWidget *parent = 0, Qt::WindowFlags flags = 0);
|
||||
~PropertyWidget();
|
||||
|
||||
|
||||
private:
|
||||
QtTreePropertyBrowser *m_pPropertyBrowser;
|
||||
QtVariantPropertyManager *m_pVariantManager;
|
||||
|
|
@ -137,6 +145,7 @@ public:
|
|||
TransparentDraggableRect* m_tdText;
|
||||
TransparentDraggableLayer* m_tdLayer;
|
||||
TransparentDraggableJiegutext* m_tdJiegutext;
|
||||
QMyCustomPlot m_depthMyCustomPlot;
|
||||
|
||||
public:
|
||||
QWidget* GetPropertyWidget();
|
||||
|
|
@ -159,7 +168,7 @@ public:
|
|||
void initHeadProperty(FormHead *formHead, QTableWidget *tableWidget, QTableWidgetItem* item, int row, int col);
|
||||
|
||||
void initTableProperty(FormInfo *formInfo);
|
||||
|
||||
// 深度
|
||||
void initDepthProperty(FormInfo *formInfo);
|
||||
|
||||
void initProperty(FormInfo *formInfo);
|
||||
|
|
@ -177,7 +186,7 @@ public:
|
|||
|
||||
// 岩心照片属性
|
||||
void initImageProperty(FormInfo *formInfo);
|
||||
void initImageItemProperty(TransparentDraggableImage* tdImage, double lower, double upper, QString strResult);
|
||||
void initImageItemProperty(TransparentDraggableImage* tdImage, double lower, double upper, QString strResult, double left, double width, QColor borderColor, Qt::PenStyle borderStyle, int borderWidth);
|
||||
|
||||
// 井壁取心属性
|
||||
void initSwallCoreProperty(FormInfo *formInfo);
|
||||
|
|
@ -202,15 +211,26 @@ public:
|
|||
//沉积相
|
||||
void initFacProperty(FormInfo *formInfo);
|
||||
|
||||
// 斜井三图一表属性
|
||||
void initTvdProperty(FormInfo *formInfo);
|
||||
void ChangTvdProperty( QtProperty *pProperty, const QVariant &variant );
|
||||
|
||||
//套管组件
|
||||
void initTubingProperty(FormInfo *formInfo);
|
||||
|
||||
void ChangFillProperty();//填充属性改变
|
||||
void ChangHeadItemProperty();//图头项改变
|
||||
|
||||
//处理通用属性
|
||||
void CommonPropertyChanged(QtProperty *pProperty, const QVariant &variant);
|
||||
|
||||
// 岩心照片
|
||||
void changedYxzpProperty(QtProperty *pProperty, const QVariant &variant);
|
||||
void changedYxzpItemProperty(QtProperty *pProperty, const QVariant &variant);
|
||||
|
||||
// 深度
|
||||
void changedDepthProperty(QtProperty *pProperty, const QVariant &variant);
|
||||
|
||||
public slots:
|
||||
void SlotPropertyChanged(QtProperty *property, const QVariant &variant);
|
||||
void SlotPropertyChanged(QtProperty *property, const int &val, bool islinestyle);
|
||||
|
|
|
|||
|
|
@ -44,23 +44,9 @@ void TransparentDraggableFac::setRange(double left_Low, double right_Hight)
|
|||
mRect->topLeft->setCoords(left_Low, 3*(lY1+lY2)/4.0);
|
||||
mRect->bottomRight->setCoords(right_Hight, lY2);
|
||||
|
||||
//位置与rect不一样,否则图像反转
|
||||
// mPixmap->topLeft->setCoords(right_Hight, lY1);
|
||||
// mPixmap->bottomRight->setCoords(left_Low, (lY1+lY2)/2.0);
|
||||
|
||||
//mItemTitle->position->setCoords(0.5, 0.5);
|
||||
// 设置父锚点,定位点
|
||||
//mItemTitle->position->setParentAnchor(mRect->bottom);
|
||||
// mItemTitle->position->setCoords((mRect->topLeft->coords().x() + mRect->bottomRight->coords().x())/2,
|
||||
// (mRect->topLeft->coords().y() + mRect->bottomRight->coords().y())/2); // 设置文本在矩形中心位置
|
||||
|
||||
float flNewPos = mPlot->xAxis->coordToPixel((left_Low + right_Hight)/2.0) - 15;
|
||||
mItemTitle->position->setCoords(mPlot->xAxis->pixelToCoord(flNewPos),
|
||||
7*(lY1 + lY2)/8.0); // 设置文本在矩形中心位置
|
||||
|
||||
//mRect->topLeft->setCoords(left, mPlot->yAxis->range().upper);
|
||||
//mRect->bottomRight->setCoords(right, mPlot->yAxis->range().lower);
|
||||
|
||||
updateHandles();
|
||||
mPlot->replot();
|
||||
}
|
||||
|
|
@ -97,7 +83,7 @@ void TransparentDraggableFac::deleteRect()
|
|||
//mPlot->removeItem(mPixmap);
|
||||
mPlot->removeItem(mItemTitle);
|
||||
|
||||
mPlot->replot();
|
||||
//mPlot->replot();
|
||||
this->deleteLater();
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -501,7 +501,7 @@ void TransparentDraggableGeoLith::deleteRect()
|
|||
mPlot->removeItem(mPixmap_Color);
|
||||
mPlot->removeItem(mItemTitle);
|
||||
|
||||
mPlot->replot();
|
||||
//mPlot->replot();
|
||||
this->deleteLater();
|
||||
|
||||
//
|
||||
|
|
@ -611,6 +611,7 @@ void TransparentDraggableGeoLith::onDelRect()
|
|||
//mDragMode = DragNone;
|
||||
//删除框图
|
||||
deleteRect();
|
||||
mPlot->replot();
|
||||
//保存
|
||||
mPlot->SaveToSLF_GeoLith();
|
||||
//属性清空
|
||||
|
|
|
|||
|
|
@ -230,7 +230,7 @@ void TransparentDraggableGujing::deleteRect()
|
|||
mPlot->removeItem(mPixmap);
|
||||
mPlot->removeItem(mItemTitle);
|
||||
|
||||
mPlot->replot();
|
||||
//mPlot->replot();
|
||||
this->deleteLater();
|
||||
|
||||
//
|
||||
|
|
@ -336,6 +336,7 @@ void TransparentDraggableGujing::onDelRect()
|
|||
//mDragMode = DragNone;
|
||||
//删除框图
|
||||
deleteRect();
|
||||
mPlot->replot();
|
||||
//保存
|
||||
mPlot->SaveToSLF_Gujing();
|
||||
//属性清空
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ void TransparentDraggableJiegutext::deleteRect()
|
|||
mPlot->removeItem(pLine[i]);
|
||||
}
|
||||
|
||||
mPlot->replot();
|
||||
//mPlot->replot();
|
||||
this->deleteLater();
|
||||
|
||||
//
|
||||
|
|
@ -227,6 +227,7 @@ void TransparentDraggableJiegutext::onDelRect()
|
|||
{
|
||||
//删除框图
|
||||
deleteRect();
|
||||
mPlot->replot();
|
||||
//保存
|
||||
mPlot->SaveToSLF_Jiegutext();
|
||||
//属性清空
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ void TransparentDraggableLayer::deleteRect()
|
|||
mPlot->removeItem(mPixmap);
|
||||
mPlot->removeItem(mItemTitle);
|
||||
|
||||
mPlot->replot();
|
||||
//mPlot->replot();
|
||||
this->deleteLater();
|
||||
}
|
||||
}
|
||||
|
|
@ -279,6 +279,7 @@ void TransparentDraggableLayer::onDelRect()
|
|||
//mDragMode = DragNone;
|
||||
//删除框图
|
||||
deleteRect();
|
||||
mPlot->replot();
|
||||
//保存
|
||||
mPlot->SaveToSLF_Layer();
|
||||
//属性清空
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ void TransparentDraggableLine::deleteRect()
|
|||
|
||||
mPlot->removeItem(qcpItemLine);
|
||||
|
||||
mPlot->replot();
|
||||
//mPlot->replot();
|
||||
this->deleteLater();
|
||||
}
|
||||
}
|
||||
|
|
@ -108,6 +108,7 @@ void TransparentDraggableLine::onDelRect()
|
|||
//mDragMode = DragNone;
|
||||
//删除框图
|
||||
deleteRect();
|
||||
mPlot->replot();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,15 @@ void TransparentDraggableMFac::setMinWidth(double minWidth)
|
|||
void TransparentDraggableMFac::setTitle(QString strTitle)
|
||||
{
|
||||
mstrTitle = strTitle;
|
||||
mItemTitle->setText(mstrTitle);
|
||||
//mItemTitle->setText(mstrTitle);
|
||||
//
|
||||
if(mPlot->m_bDrawMFacName)// 微相名称
|
||||
{
|
||||
mItemTitle->setText(mstrTitle);
|
||||
}
|
||||
else{
|
||||
mItemTitle->setText("");
|
||||
}
|
||||
//mPlot->replot();
|
||||
}
|
||||
|
||||
|
|
@ -49,24 +57,48 @@ void TransparentDraggableMFac::setRange(double left_Low, double right_Hight)
|
|||
double lY1 = mPlot->yAxis->range().lower;//+10
|
||||
double lY2 = mPlot->yAxis->range().upper;
|
||||
mRect->topLeft->setCoords(left_Low, lY1);
|
||||
mRect->bottomRight->setCoords(right_Hight, (lY1+lY2)/2.0);
|
||||
if(mPlot->m_bDrawFac && mPlot->m_bDrawPhase)
|
||||
{
|
||||
//画2条竖线
|
||||
mRect->bottomRight->setCoords(right_Hight, (lY1+lY2)/2.0);
|
||||
}
|
||||
else if(mPlot->m_bDrawFac || mPlot->m_bDrawPhase)
|
||||
{
|
||||
//画1条竖线
|
||||
mRect->bottomRight->setCoords(right_Hight, 3*(lY1+lY2)/4.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
mRect->bottomRight->setCoords(right_Hight, lY2);
|
||||
}
|
||||
|
||||
//位置与rect不一样,否则图像反转
|
||||
// mPixmap->topLeft->setCoords(right_Hight, lY1);
|
||||
// mPixmap->bottomRight->setCoords(left_Low, (lY1+lY2)/2.0);
|
||||
|
||||
//mItemTitle->position->setCoords(0.5, 0.5);
|
||||
// 设置父锚点,定位点
|
||||
//mItemTitle->position->setParentAnchor(mRect->bottom);
|
||||
// mItemTitle->position->setCoords((mRect->topLeft->coords().x() + mRect->bottomRight->coords().x())/2,
|
||||
// (mRect->topLeft->coords().y() + mRect->bottomRight->coords().y())/2); // 设置文本在矩形中心位置
|
||||
//
|
||||
if(mPlot->m_bDrawMFacName)// 微相名称
|
||||
{
|
||||
mItemTitle->setText(mstrTitle);
|
||||
}
|
||||
else{
|
||||
mItemTitle->setText("");
|
||||
}
|
||||
|
||||
float flNewPos = mPlot->xAxis->coordToPixel((left_Low + right_Hight)/2.0) - 15;
|
||||
mItemTitle->position->setCoords(mPlot->xAxis->pixelToCoord(flNewPos),
|
||||
(lY1 + lY2)/4.0); // 设置文本在矩形中心位置
|
||||
|
||||
//mRect->topLeft->setCoords(left, mPlot->yAxis->range().upper);
|
||||
//mRect->bottomRight->setCoords(right, mPlot->yAxis->range().lower);
|
||||
if(mPlot->m_bDrawFac && mPlot->m_bDrawPhase)
|
||||
{
|
||||
//画2条竖线
|
||||
mItemTitle->position->setCoords(mPlot->xAxis->pixelToCoord(flNewPos),
|
||||
(lY1 + lY2)/4.0); // 设置文本在矩形中心位置
|
||||
}
|
||||
else if(mPlot->m_bDrawFac || mPlot->m_bDrawPhase)
|
||||
{
|
||||
//画1条竖线
|
||||
mItemTitle->position->setCoords(mPlot->xAxis->pixelToCoord(flNewPos),
|
||||
3*(lY1 + lY2)/8.0); // 设置文本在矩形中心位置
|
||||
}
|
||||
else
|
||||
{
|
||||
mItemTitle->position->setCoords(mPlot->xAxis->pixelToCoord(flNewPos),
|
||||
(lY1 + lY2)/2.0); // 设置文本在矩形中心位置
|
||||
}
|
||||
|
||||
updateHandles();
|
||||
mPlot->replot();
|
||||
|
|
@ -104,7 +136,7 @@ void TransparentDraggableMFac::deleteRect()
|
|||
//mPlot->removeItem(mPixmap);
|
||||
mPlot->removeItem(mItemTitle);
|
||||
|
||||
mPlot->replot();
|
||||
//mPlot->replot();
|
||||
this->deleteLater();
|
||||
|
||||
//
|
||||
|
|
@ -218,6 +250,7 @@ void TransparentDraggableMFac::onDelRect()
|
|||
//mDragMode = DragNone;
|
||||
//删除框图
|
||||
deleteRect();
|
||||
//mPlot->replot();
|
||||
//保存
|
||||
mPlot->SaveToSLF_Fac();
|
||||
//刷新 bAdd不支持true,否则崩溃,因为发消息的item本身会被删除,无法继续后续处理
|
||||
|
|
|
|||
|
|
@ -41,25 +41,32 @@ void TransparentDraggablePhase::setRange(double left_Low, double right_Hight)
|
|||
|
||||
double lY1 = mPlot->yAxis->range().lower;//+10
|
||||
double lY2 = mPlot->yAxis->range().upper;
|
||||
mRect->topLeft->setCoords(left_Low, (lY1+lY2)/2.0);
|
||||
mRect->bottomRight->setCoords(right_Hight, 3*(lY1+lY2)/4.0);
|
||||
|
||||
//位置与rect不一样,否则图像反转
|
||||
// mPixmap->topLeft->setCoords(right_Hight, lY1);
|
||||
// mPixmap->bottomRight->setCoords(left_Low, (lY1+lY2)/2.0);
|
||||
|
||||
//mItemTitle->position->setCoords(0.5, 0.5);
|
||||
// 设置父锚点,定位点
|
||||
//mItemTitle->position->setParentAnchor(mRect->bottom);
|
||||
// mItemTitle->position->setCoords((mRect->topLeft->coords().x() + mRect->bottomRight->coords().x())/2,
|
||||
// (mRect->topLeft->coords().y() + mRect->bottomRight->coords().y())/2); // 设置文本在矩形中心位置
|
||||
if(mPlot->m_bDrawFac)
|
||||
{
|
||||
//绘制相
|
||||
mRect->topLeft->setCoords(left_Low, (lY1+lY2)/2.0);
|
||||
mRect->bottomRight->setCoords(right_Hight, 3*(lY1+lY2)/4.0);
|
||||
}
|
||||
else
|
||||
{
|
||||
//不绘制相
|
||||
mRect->topLeft->setCoords(left_Low, 3*(lY1+lY2)/4.0);
|
||||
mRect->bottomRight->setCoords(right_Hight, lY2);
|
||||
}
|
||||
|
||||
float flNewPos = mPlot->xAxis->coordToPixel((left_Low + right_Hight)/2.0) - 15;
|
||||
mItemTitle->position->setCoords(mPlot->xAxis->pixelToCoord(flNewPos),
|
||||
5*(lY1 + lY2)/8.0); // 设置文本在矩形中心位置
|
||||
|
||||
//mRect->topLeft->setCoords(left, mPlot->yAxis->range().upper);
|
||||
//mRect->bottomRight->setCoords(right, mPlot->yAxis->range().lower);
|
||||
if(mPlot->m_bDrawFac)
|
||||
{
|
||||
//绘制相
|
||||
mItemTitle->position->setCoords(mPlot->xAxis->pixelToCoord(flNewPos),
|
||||
5*(lY1 + lY2)/8.0); // 设置文本在矩形中心位置
|
||||
}
|
||||
else
|
||||
{
|
||||
//不绘制相
|
||||
mItemTitle->position->setCoords(mPlot->xAxis->pixelToCoord(flNewPos),
|
||||
7*(lY1 + lY2)/8.0); // 设置文本在矩形中心位置
|
||||
}
|
||||
|
||||
updateHandles();
|
||||
mPlot->replot();
|
||||
|
|
@ -97,7 +104,7 @@ void TransparentDraggablePhase::deleteRect()
|
|||
//mPlot->removeItem(mPixmap);
|
||||
mPlot->removeItem(mItemTitle);
|
||||
|
||||
mPlot->replot();
|
||||
//mPlot->replot();
|
||||
this->deleteLater();
|
||||
|
||||
//
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ void TransparentDraggableRect::deleteRect()
|
|||
mPlot->removeItem(mPixmap);
|
||||
mPlot->removeItem(mItemTitle);
|
||||
|
||||
mPlot->replot();
|
||||
//mPlot->replot();
|
||||
this->deleteLater();
|
||||
}
|
||||
}
|
||||
|
|
@ -161,6 +161,7 @@ void TransparentDraggableRect::onDelRect()
|
|||
//mDragMode = DragNone;
|
||||
//删除框图
|
||||
deleteRect();
|
||||
mPlot->replot();
|
||||
//保存
|
||||
mPlot->SaveToSLF_Text();
|
||||
//属性清空
|
||||
|
|
|
|||
|
|
@ -413,6 +413,7 @@ void TransparentDraggableResult::onDelRect()
|
|||
//mDragMode = DragNone;
|
||||
//删除框图
|
||||
deleteRect();
|
||||
mPlot->replot();
|
||||
}
|
||||
|
||||
void TransparentDraggableResult::onMousePress(QMouseEvent *event)
|
||||
|
|
|
|||
|
|
@ -351,7 +351,7 @@ void TransparentDraggableSwallCore::deleteRect()
|
|||
mPlot->removeItem(m_qcpItemLine2);
|
||||
mPlot->removeItem(m_qcpItemLine3);
|
||||
|
||||
mPlot->replot();
|
||||
//mPlot->replot();
|
||||
this->deleteLater();
|
||||
|
||||
//
|
||||
|
|
@ -452,6 +452,7 @@ void TransparentDraggableSwallCore::onDelRect()
|
|||
//mDragMode = DragNone;
|
||||
//删除框图
|
||||
deleteRect();
|
||||
mPlot->replot();
|
||||
//保存
|
||||
mPlot->SaveToSLF_SwallCore();
|
||||
//属性清空
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ void TransparentGroupResult::deleteRect()
|
|||
mPlot->removeItem(mItemTitle);
|
||||
mPlot->removeItem(mDragLine);
|
||||
|
||||
mPlot->replot();
|
||||
//mPlot->replot();
|
||||
this->deleteLater();
|
||||
|
||||
}
|
||||
|
|
@ -698,6 +698,7 @@ void TransparentGroupResult::onDelRect()
|
|||
//mDragMode = DragNone;
|
||||
//删除框图
|
||||
deleteRect();
|
||||
mPlot->replot();
|
||||
}
|
||||
|
||||
void TransparentGroupResult::onMousePress(QMouseEvent *event)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#include <QtMath>
|
||||
#include "Gradient.h"
|
||||
#include "PickFrac.h"
|
||||
#include "ObjTubingstringResult.h"
|
||||
#include "DrawNrad.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_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)));
|
||||
|
|
@ -318,6 +317,11 @@ void FormDraw::DisplayLines(QJsonArray linesArray)
|
|||
//沉积相
|
||||
DisplayFac_One(lineObjInfo);
|
||||
}
|
||||
else if (strType == "TubingstringObject")
|
||||
{
|
||||
//套管组件
|
||||
DisplayTubing_One(lineObjInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
DisplayType_One(lineObjInfo);
|
||||
|
|
@ -470,6 +474,7 @@ void FormDraw::DisplayTable_One(QJsonObject lineObjInfo)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
QString folderPath = GetLogdataPath();
|
||||
folderPath = folderPath + g_prjname;
|
||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||
|
|
@ -540,6 +545,7 @@ void FormDraw::DisplayTable_One(QJsonObject lineObjInfo)
|
|||
else{
|
||||
listOtherProperty.append("0");
|
||||
}
|
||||
|
||||
//结论
|
||||
this->addTableLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, listOtherProperty);
|
||||
}
|
||||
|
|
@ -694,6 +700,32 @@ void FormDraw::DisplayFac_One(QJsonObject lineObjInfo)
|
|||
lineColor.setNamedColor(lineObjInfo.value("lineColor").toString());
|
||||
}
|
||||
|
||||
//沉积相
|
||||
bool bDrawFac = true; // 绘制相
|
||||
bool bDrawPhase = true; // 绘制亚相
|
||||
bool bDrawMFacName = true; // 微相名称
|
||||
if (lineObjInfo.contains("DrawFac"))
|
||||
{
|
||||
QJsonValue value = lineObjInfo.value("DrawFac");
|
||||
if (value.isBool()) {
|
||||
bDrawFac = value.toBool();
|
||||
}
|
||||
}
|
||||
if (lineObjInfo.contains("DrawPhase"))
|
||||
{
|
||||
QJsonValue value = lineObjInfo.value("DrawPhase");
|
||||
if (value.isBool()) {
|
||||
bDrawPhase = value.toBool();
|
||||
}
|
||||
}
|
||||
if (lineObjInfo.contains("DrawMFacName"))
|
||||
{
|
||||
QJsonValue value = lineObjInfo.value("DrawMFacName");
|
||||
if (value.isBool()) {
|
||||
bDrawMFacName = value.toBool();
|
||||
}
|
||||
}
|
||||
|
||||
QString folderPath = GetLogdataPath();
|
||||
folderPath = folderPath + g_prjname;
|
||||
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||
|
|
@ -704,11 +736,121 @@ void FormDraw::DisplayFac_One(QJsonObject lineObjInfo)
|
|||
listOtherProperty.append(strAliasName);//别名
|
||||
listOtherProperty.append(lineColor.name());//名称颜色
|
||||
listOtherProperty.append(curveNameFont.toString());//名称字体
|
||||
|
||||
//沉积相
|
||||
if(bDrawFac)
|
||||
{
|
||||
listOtherProperty.append("DrawFac");
|
||||
}
|
||||
else{
|
||||
listOtherProperty.append("0");
|
||||
}
|
||||
//
|
||||
if(bDrawPhase)
|
||||
{
|
||||
listOtherProperty.append("DrawPhase");
|
||||
}
|
||||
else{
|
||||
listOtherProperty.append("0");
|
||||
}
|
||||
//
|
||||
if(bDrawMFacName)
|
||||
{
|
||||
listOtherProperty.append("DrawMFacName");
|
||||
}
|
||||
else{
|
||||
listOtherProperty.append("0");
|
||||
}
|
||||
//沉积相
|
||||
this->s_addLogface(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, 0, listOtherProperty); //
|
||||
}
|
||||
}
|
||||
|
||||
//套管組件
|
||||
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)
|
||||
{
|
||||
QString strSlfName = "";
|
||||
|
|
@ -2649,6 +2791,37 @@ void FormDraw::s_addLogface(QString strUuid, QString strSlfName, QString strWell
|
|||
curv->xAxis = yAxis;
|
||||
curv->yAxis = xAxis;
|
||||
|
||||
if(listOtherProperty.size()>=6)
|
||||
{
|
||||
//
|
||||
if(listOtherProperty[3]=="DrawFac")
|
||||
{
|
||||
curv->m_bDrawFac = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
curv->m_bDrawFac = false;
|
||||
}
|
||||
//
|
||||
if(listOtherProperty[4]=="DrawPhase")
|
||||
{
|
||||
curv->m_bDrawPhase = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
curv->m_bDrawPhase = false;
|
||||
}
|
||||
//
|
||||
if(listOtherProperty[5]=="DrawMFacName")
|
||||
{
|
||||
curv->m_bDrawMFacName = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
curv->m_bDrawMFacName = false;
|
||||
}
|
||||
}
|
||||
|
||||
//沉积相
|
||||
//QString strWaveName = "LITHA";
|
||||
curv->LoadFromSLF_Fac(strSlfName, strLineName);
|
||||
|
|
@ -2763,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)
|
||||
|
|
@ -2806,7 +2979,11 @@ void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString st
|
|||
curv->show();
|
||||
|
||||
//-------------------
|
||||
int iMyWidth = curv->axisRect(0)->width();
|
||||
int iMyWidth = curv->m_OutD_Tubing; //暂时按照套管外径 //curv->axisRect(0)->width();
|
||||
if(listOtherProperty.size()>=6)
|
||||
{
|
||||
iMyWidth = listOtherProperty[5].toDouble();
|
||||
}
|
||||
|
||||
m_LeftVal = 0;
|
||||
m_RightVal = iMyWidth;
|
||||
|
|
@ -2838,9 +3015,8 @@ void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString st
|
|||
curv->yAxis2->setTicks(false);
|
||||
|
||||
//套管组件
|
||||
QString strWaveName = "TUBTOOLS";
|
||||
CObjTubingstringResult *objTubingstringResult = new CObjTubingstringResult();
|
||||
objTubingstringResult->LoadFromSLF(curv, strSlfName, strWaveName);
|
||||
//QString strWaveName = "TUBTOOLS";
|
||||
curv->LoadFromSLF_Tubing(strSlfName, strLineName);
|
||||
|
||||
//
|
||||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||
|
|
@ -2849,12 +3025,23 @@ void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString st
|
|||
m_listTableName.push_back(strLineName);
|
||||
|
||||
QString strAliasName = "套管组件";
|
||||
QString strUnit = "";
|
||||
QColor newlineColor=QColor(0,0,0);
|
||||
if(listOtherProperty.size()>=3)
|
||||
{
|
||||
strAliasName = listOtherProperty[0];
|
||||
newlineColor.setNamedColor(listOtherProperty[1]);
|
||||
}
|
||||
|
||||
QString strUnit = "mm";
|
||||
if(listOtherProperty.size()>=6)
|
||||
{
|
||||
strUnit = listOtherProperty[3];
|
||||
}
|
||||
|
||||
double width=2;
|
||||
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,
|
||||
|
|
@ -3876,7 +4063,7 @@ bool FormDraw::LoadFromIMAGE_SLF(QMyCustomPlot *widget, QString strSlfName, QStr
|
|||
filename="";
|
||||
}
|
||||
}
|
||||
widget->addImageToPlot(-m_Result->EndDepth, -m_Result->StartDepth, filename );
|
||||
widget->addImageToPlot(-m_Result->EndDepth, -m_Result->StartDepth, filename, static_cast<double>(m_Result->Left), static_cast<double>(m_Result->Width));
|
||||
}
|
||||
logio->CloseTable(iIndex);
|
||||
delete buf;
|
||||
|
|
@ -4191,25 +4378,54 @@ void FormDraw::initGujing(QMyCustomPlot *widget, QString strSlfName, QString str
|
|||
|
||||
void FormDraw::initDepth(QMyCustomPlot *curv)
|
||||
{
|
||||
curv->xAxis->setTicks(false);
|
||||
curv->xAxis->setSubTicks(false);
|
||||
curv->xAxis->setTickLabels(false);
|
||||
|
||||
curv->yAxis->setTickLabels(true);
|
||||
curv->yAxis->setTickLabelSide(QCPAxis::lsInside);
|
||||
QFont font1("微软雅黑", 16); //fontSize 10
|
||||
QFont font1("微软雅黑", 16); //fontSize 16
|
||||
curv->yAxis->setTickLabelFont(font1);
|
||||
|
||||
curv->yAxis->setRange(m_iY1, m_iY2);
|
||||
curv->axisRect()->setupFullAxesBox();
|
||||
//
|
||||
// curv->xAxis->ticker()->setTickCount(10);//x个主刻度
|
||||
// curv->yAxis->ticker()->setTickCount(60);//y个主刻度
|
||||
curv->yAxis->ticker()->setTickCount(60);//y个主刻度
|
||||
curv->m_bX2Y = false;
|
||||
|
||||
|
||||
//对调XY轴,在最前面设置
|
||||
QCPAxis *yAxis = curv->yAxis;
|
||||
QCPAxis *xAxis = curv->xAxis;
|
||||
curv->xAxis = yAxis;
|
||||
curv->yAxis = xAxis;
|
||||
|
||||
// QCPAxis *yAxis = curv->yAxis;
|
||||
// QCPAxis *xAxis = curv->xAxis;
|
||||
// curv->xAxis = yAxis;
|
||||
// curv->yAxis = xAxis;
|
||||
}
|
||||
|
||||
//void FormDraw::initDepth(QMyCustomPlot *curv)
|
||||
//{
|
||||
// curv->xAxis->setTicks(true); // 显示X轴主刻度(默认true)
|
||||
// curv->yAxis->setTicks(false); // 隐藏Y轴主刻度
|
||||
// curv->xAxis->setSubTicks(true); // 显示X轴副刻度
|
||||
// curv->yAxis->setSubTicks(false); // 隐藏Y轴副刻度
|
||||
// curv->xAxis->setTickLabels(true);
|
||||
// curv->yAxis->setTickLabels(false);
|
||||
// curv->xAxis->setTickLabelSide(QCPAxis::lsInside);
|
||||
//// curv->yAxis->setTickLabelSide(QCPAxis::lsInside);
|
||||
// curv->xAxis->setTickLength(25, 0); // X轴主刻度:内侧15px,外侧0px(隐藏)
|
||||
//// curv->yAxis->setTickLength(25, 0);
|
||||
// QPen tickPen;
|
||||
// tickPen.setColor(Qt::red); // 主刻度颜色(红色)
|
||||
// tickPen.setWidth(2); // 主刻度线宽(2像素)
|
||||
// tickPen.setStyle(Qt::SolidLine); // 刻度线样式(实线,可选虚线Qt::DashLine)
|
||||
// curv->xAxis->setTickPen(tickPen); // 应用到X轴主刻度
|
||||
// //对调XY轴,在最前面设置
|
||||
// QCPAxis *yAxis = curv->yAxis;
|
||||
// QCPAxis *xAxis = curv->xAxis;
|
||||
// curv->xAxis = yAxis;
|
||||
// curv->yAxis = xAxis;
|
||||
//}
|
||||
|
||||
void FormDraw::initFgrq(QMyCustomPlot *widget)
|
||||
{
|
||||
widget->m_iX1 = 0;
|
||||
|
|
|
|||
|
|
@ -69,6 +69,9 @@ public:
|
|||
//沉积相
|
||||
void DisplayFac_One(QJsonObject lineObjInfo);
|
||||
|
||||
//套管組件
|
||||
void DisplayTubing_One(QJsonObject lineObjInfo);
|
||||
|
||||
// 跨道设置
|
||||
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_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
|
||||
// void s_addTDT(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
||||
|
|
|
|||
|
|
@ -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_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)));
|
||||
//岩性填充-填充
|
||||
|
|
@ -171,6 +175,15 @@ QJsonObject FormInfo::makeJson()
|
|||
else if (m_strType == "LogfaceObject")
|
||||
{
|
||||
//沉积相
|
||||
rootObj["DrawFac"] = m_bDrawFac;
|
||||
rootObj["DrawPhase"] = m_bDrawPhase;
|
||||
rootObj["DrawMFacName"] = m_bDrawMFacName;
|
||||
//item属性写入slf文件,不需要此次记录
|
||||
return rootObj;
|
||||
}
|
||||
else if (m_strType == "TubingstringObject")
|
||||
{
|
||||
//套管组件
|
||||
|
||||
//item属性写入slf文件,不需要此次记录
|
||||
return rootObj;
|
||||
|
|
@ -948,6 +961,66 @@ void FormInfo::s_ChangeDrawSymmetry(QString strUuid, QString strSlfName, QString
|
|||
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)
|
||||
{
|
||||
|
|
@ -1023,6 +1096,14 @@ void FormInfo::contextMenuEvent(QContextMenuEvent *event)
|
|||
menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable);
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
//曲线数据查看
|
||||
|
|
|
|||
|
|
@ -59,6 +59,10 @@ public slots:
|
|||
//绘制对称曲线
|
||||
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);
|
||||
//岩性填充-填充
|
||||
|
|
@ -165,22 +169,46 @@ public:
|
|||
bool m_yxzpTwoEndDrawing;
|
||||
// 绘制颜色
|
||||
bool m_yxzpDrawColor;
|
||||
// 图片文件
|
||||
QString m_yxzpPictureFile;
|
||||
// 左边距
|
||||
QString m_yxzpLeftMargin;
|
||||
// 宽度
|
||||
QString m_yxzpWidth;
|
||||
// 线宽
|
||||
QString m_yxzpLineWidth;
|
||||
// 颜色
|
||||
QString m_yxzpColor;
|
||||
// 线型
|
||||
QString m_yxzpLineshape;
|
||||
|
||||
|
||||
//气测/FMT/射孔/文本
|
||||
QStringList m_FieldNameList;
|
||||
|
||||
//沉积相
|
||||
bool m_bDrawFac = true; // 绘制相
|
||||
bool m_bDrawPhase = 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:
|
||||
void setLineWidth(double dWidth);
|
||||
double getLineWidth();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#include "formline.h"
|
||||
#include "ui_formline.h"
|
||||
#include <QPainter>
|
||||
#include "CallManage.h"
|
||||
#include "DrawTvd.h"
|
||||
|
||||
//demo画线,暂时不用
|
||||
|
|
@ -14,6 +15,11 @@ FormLine::FormLine(QWidget *parent, QString strSlfName, QString strWellName, QSt
|
|||
m_strWellName = strWellName;
|
||||
m_strTrackName = strTrackName;
|
||||
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()
|
||||
|
|
@ -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)
|
||||
|
||||
CDrawTvd *drawTvd = new CDrawTvd();
|
||||
drawTvd->sFilePath = m_strSlfName;
|
||||
drawTvd->DrawTvd(&painter, rect);
|
||||
if (!m_drawTvd)
|
||||
m_drawTvd = new CDrawTvd();
|
||||
m_drawTvd->sFilePath = m_strSlfName;
|
||||
m_drawTvd->DrawTvd(&painter, rect);
|
||||
|
||||
// QPainter painter(this);
|
||||
// QRect rect = this->rect();
|
||||
|
|
@ -64,3 +71,241 @@ void FormLine::paintEvent(QPaintEvent*)
|
|||
// 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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,12 +2,13 @@
|
|||
#define FORMLINE_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QVariant>
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
namespace Ui {
|
||||
class FormLine;
|
||||
}
|
||||
|
||||
class CDrawTvd;
|
||||
class FormLine : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
@ -28,10 +29,14 @@ public:
|
|||
QString m_strWellName;
|
||||
QString m_strTrackName;
|
||||
QString m_strLineName;
|
||||
CDrawTvd *m_drawTvd;
|
||||
|
||||
public:
|
||||
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
|
||||
|
|
|
|||
|
|
@ -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)));
|
||||
|
||||
//套管组件
|
||||
connect(this, SIGNAL(sig_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)));
|
||||
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, 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)));
|
||||
|
|
@ -267,7 +267,7 @@ void FormTrack::Add(QString strSlfName, QString strWellName, QString strTrackNam
|
|||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -292,7 +292,7 @@ FormInfo* FormTrack::setDrawDt(QStringList listdt, QJsonObject obj)
|
|||
{
|
||||
if ("depthObject" == strType)
|
||||
{
|
||||
strAliasName = "深度";
|
||||
strAliasName = "深度22";
|
||||
}
|
||||
else if ("plObject" == strType)
|
||||
{
|
||||
|
|
@ -1005,6 +1005,36 @@ void FormTrack::s_addLogface(QString strSlfName, QString strWellName, QString st
|
|||
curveNameFont.fromString(listOtherProperty[2]);
|
||||
formInfo->m_curveNameFont = curveNameFont;
|
||||
}
|
||||
if(listOtherProperty.size()>=6)
|
||||
{
|
||||
//
|
||||
if(listOtherProperty[3]=="DrawFac")
|
||||
{
|
||||
formInfo->m_bDrawFac = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
formInfo->m_bDrawFac = false;
|
||||
}
|
||||
//
|
||||
if(listOtherProperty[4]=="DrawPhase")
|
||||
{
|
||||
formInfo->m_bDrawPhase = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
formInfo->m_bDrawPhase = false;
|
||||
}
|
||||
//
|
||||
if(listOtherProperty[5]=="DrawMFacName")
|
||||
{
|
||||
formInfo->m_bDrawMFacName = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
formInfo->m_bDrawMFacName = false;
|
||||
}
|
||||
}
|
||||
//设置高度
|
||||
ui->tableWidget->setRowHeight(row, 100);
|
||||
//单元格委托
|
||||
|
|
@ -1048,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";
|
||||
|
||||
|
|
@ -1073,6 +1103,13 @@ void FormTrack::s_addTubingstring(QString strSlfName, QString strWellName, QStri
|
|||
formInfo->setVMin(vmin);
|
||||
formInfo->setFrontColor(QColor(0,0,0));
|
||||
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);
|
||||
//单元格委托
|
||||
|
|
|
|||
|
|
@ -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_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);
|
||||
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:
|
||||
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_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_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_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int iTableType, QString strFormInfoType);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@ SOURCES += \
|
|||
Gradient.cpp \
|
||||
InDefTableDlg.cpp \
|
||||
InterfaceWidget.cpp \
|
||||
ObjTubingstringResult.cpp \
|
||||
PickFrac.cpp \
|
||||
PropertyWidget.cpp \
|
||||
QCPSizeHandle.cpp \
|
||||
|
|
@ -104,7 +103,6 @@ HEADERS += \
|
|||
Gradient.h \
|
||||
InDefTableDlg.h \
|
||||
InterfaceWidget.h \
|
||||
ObjTubingstringResult.h \
|
||||
PickFrac.h \
|
||||
PropertyWidget.h \
|
||||
QCPSizeHandle.h \
|
||||
|
|
|
|||
|
|
@ -2405,7 +2405,8 @@ void MainWindowCurve::s_NewWell(QString strWellName, QString strSlfName)
|
|||
//增加1列
|
||||
ui->tableWidget_2->setColumnCount(columnCount+1);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
//增加1列(空白)
|
||||
ui->tableWidget_2->setColumnCount(columnCount+1);
|
||||
//设置列宽
|
||||
|
|
@ -3249,7 +3250,18 @@ void MainWindowCurve::s_NewMCals()
|
|||
//套管组件
|
||||
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)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,13 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
|
|||
xAxis2->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);
|
||||
// make bottom and left axes transfer their ranges to top and right axes:
|
||||
connect(xAxis, SIGNAL(rangeChanged(QCPRange)), xAxis2, SLOT(setRange(QCPRange)));
|
||||
|
|
@ -128,6 +135,7 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
|
|||
//Plot重新加载数据
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_ReloadPlot(QString, QString, QString)), this, SLOT(s_ReloadPlot(QString, QString, QString)));
|
||||
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_changeDepthProperty(QVariantList)), this, SLOT(s_changeDepthProperty(QVariantList)));
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_changeDrawProperty(QVariantList)), this, SLOT(s_changeDrawProperty(QVariantList)));
|
||||
//改变固井曲线名
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_changeGujingLine(QString, QString, QString, QString, QString, QString)), this, SLOT(s_changeGujingLine(QString, QString, QString, QString, QString, QString)));
|
||||
|
|
@ -139,6 +147,8 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
|
|||
connect(CallManage::getInstance(), SIGNAL(sig_changeGeoLithLine(QString, QString, QString, QString, QString, double)), this, SLOT(s_changeGeoLithLine(QString, QString, QString, QString, QString, double)));
|
||||
//是否显示
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_changeGeoLithShow(QString, QString, QString, QString, QString, QString, bool)), this, SLOT(s_changeGeoLithShow(QString, QString, QString, QString, QString, QString, bool)));
|
||||
//改变沉积相属性,是否显示
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_changeFacShow(QString, QString, QString, QString, QString, QString, bool)), this, SLOT(s_changeFacShow(QString, QString, QString, QString, QString, QString, bool)));
|
||||
}
|
||||
|
||||
void QMyCustomPlot::initGeometry(QString strUuid, int nscale, int nW)
|
||||
|
|
@ -1297,6 +1307,26 @@ void QMyCustomPlot::contextMenuEvent(QContextMenuEvent *event)
|
|||
//menu.addAction(QIcon(::GetImagePath() + "icon/Layer.png"), "沉积相自动描述", this, &QMyCustomPlot::ChangeDep);
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
//右键--添加分段线
|
||||
|
|
@ -1724,8 +1754,8 @@ void QMyCustomPlot::onEditImage()
|
|||
imagePath = dlg.getImagePath();
|
||||
}
|
||||
|
||||
//添加固井结论
|
||||
this->addImageToPlot(left_Low, right_Hight, imagePath);
|
||||
// 添加岩心图片
|
||||
this->addImageToPlot(left_Low, right_Hight, imagePath, 0, 100);
|
||||
|
||||
//保存
|
||||
this->SaveToSLFImage();
|
||||
|
|
@ -2720,8 +2750,6 @@ bool QMyCustomPlot::SaveToSLFImage()
|
|||
for (QMap<QString,QObject *>::Iterator iter = m_mapDraggable_Image.begin(); iter != m_mapDraggable_Image.end(); iter++)
|
||||
{
|
||||
pDraggableRect = (TransparentDraggableImage*)iter.value();
|
||||
QString aaa = pDraggableRect->getMResult();
|
||||
//
|
||||
QCPRange tmpRange = pDraggableRect->getRange();
|
||||
float fSDepth = -tmpRange.upper;
|
||||
if(fSDepth == listSDepth[i])//按顺序写入
|
||||
|
|
@ -2730,16 +2758,12 @@ bool QMyCustomPlot::SaveToSLFImage()
|
|||
m_Result.StartDepth = -tmpRange.upper;
|
||||
m_Result.EndDepth = -tmpRange.lower;
|
||||
m_Result.Order=i+1;
|
||||
// m_Result.Image = imagePath;
|
||||
// 拷贝字符串到数组,长度为数组长度-1(留1位存'\0'结束符)
|
||||
strncpy(m_Result.Image, pDraggableRect->getMResult().toLocal8Bit().constData(), sizeof(m_Result.Image) - 1);
|
||||
// 手动添加结束符(确保字符串合法)
|
||||
m_Result.Image[sizeof(m_Result.Image) - 1] = '\0';
|
||||
//m_Result.RESULT=0;
|
||||
//QString innerresult=GetIntResult_Gujing(pDraggableRect->m_Result);
|
||||
// if(innerresult!="")
|
||||
// m_Result.RESULT=innerresult.toInt();
|
||||
// if(m_Result.RESULT<0) m_Result.RESULT=0;
|
||||
m_Result.Left = static_cast<float>(pDraggableRect->getLeft());
|
||||
m_Result.Width = static_cast<float>(pDraggableRect->getWidth());
|
||||
//写入
|
||||
logio->WriteTable(iIndex,i+1,&m_Result);
|
||||
break;
|
||||
|
|
@ -3978,6 +4002,54 @@ void QMyCustomPlot::addImageToPlot(double left_Low, double right_Hight, const QS
|
|||
m_mapDraggable_Image[strUuid] = dragRect;
|
||||
}
|
||||
|
||||
void QMyCustomPlot::addImageToPlot(double left_Low, double right_Hight, const QString imagePath,
|
||||
double left, double width)
|
||||
{
|
||||
QtCommonClass *qtCommon = new QtCommonClass(this);
|
||||
QString strUuid = qtCommon->getUUid();
|
||||
|
||||
// 在初始化代码中
|
||||
TransparentDraggableImage *dragRect = new TransparentDraggableImage(this, strUuid);
|
||||
//图片,提前设值,后面setRange改变
|
||||
dragRect->setResult(imagePath);
|
||||
|
||||
// 可选:设置颜色
|
||||
dragRect->setColor(QColor(255, 255, 255, 80)); // 半透明红色
|
||||
//最小宽度
|
||||
dragRect->setMinWidth(0.1);
|
||||
//dragRect->setTitle(strText);
|
||||
dragRect->setLeft(left);
|
||||
dragRect->setWidth(width);
|
||||
|
||||
// 设置初始范围
|
||||
dragRect->setRange(left_Low, right_Hight,left,width);
|
||||
|
||||
m_mapDraggable_Image[strUuid] = dragRect;
|
||||
}
|
||||
|
||||
void QMyCustomPlot::addImageToPlot(double left_Low, double right_Hight, const QString imagePath,
|
||||
double left, double width, QColor borderColor, Qt::PenStyle borderStyle, int borderWidth)
|
||||
{
|
||||
QtCommonClass *qtCommon = new QtCommonClass(this);
|
||||
QString strUuid = qtCommon->getUUid();
|
||||
|
||||
// 在初始化代码中
|
||||
TransparentDraggableImage *dragRect = new TransparentDraggableImage(this, strUuid);
|
||||
//图片,提前设值,后面setRange改变
|
||||
dragRect->setResult(imagePath);
|
||||
// 设置初始范围
|
||||
dragRect->setRange(left_Low, right_Hight,left,width);
|
||||
// 可选:设置颜色
|
||||
dragRect->setColor(QColor(255, 255, 255, 80)); // 半透明红色
|
||||
//最小宽度
|
||||
dragRect->setMinWidth(0.1);
|
||||
//dragRect->setTitle(strText);
|
||||
dragRect->setLeft(left);
|
||||
dragRect->setWidth(width);
|
||||
|
||||
m_mapDraggable_Image[strUuid] = dragRect;
|
||||
}
|
||||
|
||||
void QMyCustomPlot::addSelectRectToPlot(double left_Low, double right_Hight, int left_Low_Number, int right_Hight_Number)
|
||||
{
|
||||
//qDebug() << "QMyCustomPlot addSelectRectToPlot";
|
||||
|
|
@ -4430,6 +4502,98 @@ void QMyCustomPlot::s_changeDrawProperty(QVariantList vlist)
|
|||
}
|
||||
}
|
||||
|
||||
void QMyCustomPlot::s_changeDepthProperty(QVariantList vlist)
|
||||
{
|
||||
|
||||
|
||||
QString strUuid = vlist.at(0).toString();
|
||||
QString strSlfName = vlist.at(1).toString();
|
||||
QString strWellName = vlist.at(2).toString();
|
||||
QString strTrackName = vlist.at(3).toString();
|
||||
QString strLineName = vlist.at(4).toString();
|
||||
|
||||
if (m_strUuid == strUuid &&
|
||||
m_strSlfName == strSlfName &&
|
||||
m_strWellName == strWellName &&
|
||||
m_strTrackName == strTrackName &&
|
||||
m_strLineName == strLineName)
|
||||
{
|
||||
QString strProperty = vlist.at(5).toString();
|
||||
QVariant varVal = vlist.at(6).toString();
|
||||
if ("主刻度线长度" == strProperty)
|
||||
{
|
||||
double height = varVal.toDouble();
|
||||
this->yAxis->setTickLength(height, 0);
|
||||
|
||||
// QPen tickPen;
|
||||
// tickPen.setColor(Qt::green); // 主刻度颜色(红色)
|
||||
// tickPen.setWidth(2); // 主刻度线宽(2像素)
|
||||
// tickPen.setStyle(Qt::SolidLine); // 刻度线样式(实线,可选虚线Qt::DashLine)
|
||||
// this->xAxis->setTickPen(tickPen); // 应用到X轴主刻度
|
||||
}
|
||||
else if ("主刻度线宽度" == strProperty)
|
||||
{
|
||||
double temp = varVal.toDouble();
|
||||
QPen tickPen = this->yAxis->tickPen();
|
||||
// 4. 仅修改画笔宽度(核心:不改动其他属性)
|
||||
tickPen.setWidth(temp);
|
||||
// 5. 重新应用画笔到主刻度(仅影响主刻度)
|
||||
this->yAxis->setTickPen(tickPen);
|
||||
}
|
||||
else if ("次刻度线长度" == strProperty)
|
||||
{
|
||||
double temp = varVal.toDouble();
|
||||
this->yAxis->setSubTickLength(temp, 0);
|
||||
}
|
||||
else if ("次刻度线宽度" == strProperty)
|
||||
{
|
||||
double temp = varVal.toDouble();
|
||||
QPen tickPen = this->yAxis->subTickPen();
|
||||
// 4. 仅修改画笔宽度(核心:不改动其他属性)
|
||||
tickPen.setWidth(temp);
|
||||
// 5. 重新应用画笔到主刻度(仅影响主刻度)
|
||||
this->yAxis->setSubTickPen(tickPen);
|
||||
}
|
||||
else if ("标尺颜色" == strProperty)
|
||||
{
|
||||
QColor newColor = varVal.value<QColor>();
|
||||
this->yAxis->setTickLabelColor(newColor);
|
||||
}
|
||||
else if ("间隔" == strProperty)
|
||||
{
|
||||
double temp = varVal.toDouble();
|
||||
// 创建固定间隔刻度器
|
||||
QSharedPointer<QCPAxisTickerFixed> fixedTicker(new QCPAxisTickerFixed);
|
||||
// 设置刻度间隔为50
|
||||
fixedTicker->setTickStep(temp);
|
||||
// 设置刻度步长策略为固定值
|
||||
fixedTicker->setScaleStrategy(QCPAxisTickerFixed::ssNone);
|
||||
// 应用到Y轴
|
||||
this->yAxis->setTicker(fixedTicker);
|
||||
}
|
||||
else if ("标注字体" == strProperty)
|
||||
{
|
||||
QFont newFont = varVal.value<QFont>();
|
||||
this->yAxis->setTickLabelFont(newFont);
|
||||
}
|
||||
else if ("旋转(°)" == strProperty)
|
||||
{
|
||||
double temp = varVal.toDouble();
|
||||
this->yAxis->setTickLabelRotation(temp);
|
||||
}
|
||||
else if ("斜深" == strProperty)
|
||||
{
|
||||
bool temp = varVal.toBool();
|
||||
this->yAxis->setTickLabels(temp);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
this->replot();
|
||||
}
|
||||
}
|
||||
void QMyCustomPlot::addLineToPlot(double left_Low, double right_Hight, const QString strText, QColor crColor)
|
||||
{
|
||||
QtCommonClass *qtCommon = new QtCommonClass(this);
|
||||
|
|
@ -6088,6 +6252,83 @@ void QMyCustomPlot::s_changeGeoLithShow(QString strUuid, QString strSlfName, QSt
|
|||
//不清空属性窗口
|
||||
}
|
||||
|
||||
//改变沉积相属性,是否显示
|
||||
void QMyCustomPlot::s_changeFacShow(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString propertyData, bool bShow)
|
||||
{
|
||||
if(m_strUuid == strUuid &&
|
||||
m_strSlfName == strSlfName &&
|
||||
m_strWellName == strWellName &&
|
||||
m_strTrackName == strTrackName &&
|
||||
m_strLineName == strLineName)
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if(propertyData == "绘制相")
|
||||
{
|
||||
m_bDrawFac = bShow;
|
||||
RefreshItems_Fac(false); //刷新数据
|
||||
{
|
||||
//微相
|
||||
TransparentDraggableMFac *pDraggableRect =NULL;
|
||||
QMap<QString,QObject *>::Iterator it = m_mapDraggable_MFac.begin();
|
||||
while( it != m_mapDraggable_MFac.end() )
|
||||
{
|
||||
pDraggableRect = (TransparentDraggableMFac*)it.value();
|
||||
it++;
|
||||
//刷新
|
||||
QCPRange tmpRange = pDraggableRect->getRange();
|
||||
pDraggableRect->setRange(tmpRange.lower, tmpRange.upper);
|
||||
//pDraggableRect->setTitle(pDraggableRect->mstrTitle);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(propertyData == "绘制亚相")
|
||||
{
|
||||
m_bDrawPhase = bShow;
|
||||
RefreshItems_Fac(false); //刷新数据
|
||||
{
|
||||
//微相
|
||||
TransparentDraggableMFac *pDraggableRect =NULL;
|
||||
QMap<QString,QObject *>::Iterator it = m_mapDraggable_MFac.begin();
|
||||
while( it != m_mapDraggable_MFac.end() )
|
||||
{
|
||||
pDraggableRect = (TransparentDraggableMFac*)it.value();
|
||||
it++;
|
||||
//刷新
|
||||
QCPRange tmpRange = pDraggableRect->getRange();
|
||||
pDraggableRect->setRange(tmpRange.lower, tmpRange.upper);
|
||||
//pDraggableRect->setTitle(pDraggableRect->mstrTitle);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if(propertyData == "微相名称")
|
||||
{
|
||||
m_bDrawMFacName = bShow;
|
||||
{
|
||||
//微相
|
||||
TransparentDraggableMFac *pDraggableRect =NULL;
|
||||
QMap<QString,QObject *>::Iterator it = m_mapDraggable_MFac.begin();
|
||||
while( it != m_mapDraggable_MFac.end() )
|
||||
{
|
||||
pDraggableRect = (TransparentDraggableMFac*)it.value();
|
||||
it++;
|
||||
//刷新
|
||||
QCPRange tmpRange = pDraggableRect->getRange();
|
||||
pDraggableRect->setRange(tmpRange.lower, tmpRange.upper);
|
||||
//pDraggableRect->setTitle(pDraggableRect->mstrTitle);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//不清空属性窗口
|
||||
}
|
||||
|
||||
bool QMyCustomPlot::LoadFromSLF_Layer(QString strSlfName, QString strLineName)
|
||||
{
|
||||
LAYER_DATA m_Result;
|
||||
|
|
@ -6419,6 +6660,10 @@ bool QMyCustomPlot::LoadFromSLF_Jiegutext(QString strSlfName, QString csCurve, Q
|
|||
}
|
||||
|
||||
int iIndex=logio->OpenTable(csCurve.toStdString().c_str());
|
||||
if(iIndex<0) {
|
||||
delete logio;
|
||||
return false;
|
||||
}
|
||||
if(iIndex>-1) {
|
||||
int count = logio->GetTableRecordCount(iIndex);
|
||||
int fieldnum = logio->GetTableFieldCount(iIndex);
|
||||
|
|
@ -6500,7 +6745,7 @@ bool QMyCustomPlot::LoadFromSLF_Jiegutext(QString strSlfName, QString csCurve, Q
|
|||
pInfo->update();
|
||||
|
||||
//属性清空
|
||||
PropertyService()->InitCurrentViewInfo();
|
||||
//PropertyService()->InitCurrentViewInfo();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -7554,6 +7799,21 @@ void QMyCustomPlot::ReadData_Fac(QString strSlfName, QString csCurve, bool bAdd)
|
|||
|
||||
void QMyCustomPlot::DrawFac(int iType)
|
||||
{
|
||||
//判读是否绘制 相/亚相
|
||||
if(m_bDrawFac && iType==1)
|
||||
{
|
||||
//相
|
||||
}
|
||||
else if(m_bDrawPhase && iType==2)
|
||||
{
|
||||
//亚相
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
int j;
|
||||
float dep1,dep2;
|
||||
float top,bottom;
|
||||
|
|
@ -7677,22 +7937,34 @@ bool QMyCustomPlot::LoadFromSLF_Fac(QString strSlfName, QString csCurve, bool bA
|
|||
if(m_qcpItemLine)
|
||||
{
|
||||
removeItem(m_qcpItemLine);
|
||||
m_qcpItemLine = nullptr;
|
||||
}
|
||||
if(m_qcpItemLine2)
|
||||
{
|
||||
removeItem(m_qcpItemLine2);
|
||||
m_qcpItemLine2 = nullptr;
|
||||
}
|
||||
|
||||
//画2条竖线
|
||||
int iMyWidth = this->axisRect(0)->width();
|
||||
m_qcpItemLine = new QCPItemStraightLine(this);
|
||||
m_qcpItemLine->point1->setCoords(-1, iMyWidth/2);//位置
|
||||
m_qcpItemLine->point2->setCoords(-2, iMyWidth/2);//位置
|
||||
//qcpItemLine->setPen(pPenStraightLine);
|
||||
if(m_bDrawFac && m_bDrawPhase)
|
||||
{
|
||||
//画2条竖线
|
||||
m_qcpItemLine = new QCPItemStraightLine(this);
|
||||
m_qcpItemLine->point1->setCoords(-1, iMyWidth/2);//位置
|
||||
m_qcpItemLine->point2->setCoords(-2, iMyWidth/2);//位置
|
||||
//qcpItemLine->setPen(pPenStraightLine);
|
||||
|
||||
m_qcpItemLine2 = new QCPItemStraightLine(this);
|
||||
m_qcpItemLine2->point1->setCoords(-1, 3*iMyWidth/4);//位置
|
||||
m_qcpItemLine2->point2->setCoords(-2, 3*iMyWidth/4);//位置
|
||||
m_qcpItemLine2 = new QCPItemStraightLine(this);
|
||||
m_qcpItemLine2->point1->setCoords(-1, 3*iMyWidth/4);//位置
|
||||
m_qcpItemLine2->point2->setCoords(-2, 3*iMyWidth/4);//位置
|
||||
}
|
||||
else if(m_bDrawFac || m_bDrawPhase)
|
||||
{
|
||||
//画1条竖线
|
||||
m_qcpItemLine2 = new QCPItemStraightLine(this);
|
||||
m_qcpItemLine2->point1->setCoords(-1, 3*iMyWidth/4);//位置
|
||||
m_qcpItemLine2->point2->setCoords(-2, 3*iMyWidth/4);//位置
|
||||
}
|
||||
|
||||
ReadFracDef();
|
||||
|
||||
|
|
@ -7704,6 +7976,29 @@ bool QMyCustomPlot::LoadFromSLF_Fac(QString strSlfName, QString csCurve, bool bA
|
|||
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()
|
||||
{
|
||||
|
|
@ -7917,8 +8212,290 @@ void QMyCustomPlot::RefreshItems_Fac(bool bAdd)
|
|||
}
|
||||
|
||||
//重新加载
|
||||
LoadFromSLF_Fac(m_strSlfName, m_strLineName, bAdd);
|
||||
LoadFromSLF_Fac(m_strSlfName, m_strLineName, 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;
|
||||
return false;
|
||||
}
|
||||
|
||||
int iIndex=logio->OpenTable(csCurve.toStdString().c_str());
|
||||
if(iIndex<0)
|
||||
{
|
||||
delete logio;
|
||||
return false;
|
||||
}
|
||||
//
|
||||
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)); // 设置图片
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//先删除
|
||||
if(mRect_Tubing)
|
||||
{
|
||||
removeItem(mRect_Tubing);
|
||||
mRect_Tubing = nullptr;
|
||||
}
|
||||
if(mRect2_Tubing)
|
||||
{
|
||||
removeItem(mRect2_Tubing);
|
||||
mRect2_Tubing = nullptr;
|
||||
}
|
||||
//绘制套管
|
||||
float upper = this->xAxis->range().upper;
|
||||
float lower = this->xAxis->range().lower;
|
||||
double lY1 = this->yAxis->range().lower;
|
||||
double lY2 = this->yAxis->range().upper;
|
||||
// 创建矩形
|
||||
mRect_Tubing = new QCPItemRect(this);
|
||||
mRect_Tubing->setLayer("overlay"); // 确保在最上层
|
||||
mRect_Tubing->setBrush(QBrush(QColor(0, 0, 0, 255)));
|
||||
mRect_Tubing->setPen(QPen(QColor(0, 0, 0, 255)));
|
||||
mRect_Tubing->topLeft->setCoords(lower, lY1 + (lY2-lY1-m_OutD_Tubing)/2.0);
|
||||
mRect_Tubing->bottomRight->setCoords(upper, lY1 + (lY2-lY1-m_Oind_Tubing)/2.0);
|
||||
|
||||
// 创建矩形
|
||||
mRect2_Tubing = new QCPItemRect(this);
|
||||
mRect2_Tubing->setLayer("overlay"); // 确保在最上层
|
||||
mRect2_Tubing->setBrush(QBrush(QColor(0, 0, 0, 255)));
|
||||
mRect2_Tubing->setPen(QPen(QColor(0, 0, 0, 255)));
|
||||
mRect2_Tubing->topLeft->setCoords(lower, lY2 - (lY2-lY1-m_OutD_Tubing)/2.0);
|
||||
mRect2_Tubing->bottomRight->setCoords(upper, lY2 - (lY2-lY1-m_Oind_Tubing)/2.0);
|
||||
|
||||
//
|
||||
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_Oguan_Tubing;
|
||||
if(!m_bDrawCCL_Tubing)
|
||||
{
|
||||
if(Number==1) {
|
||||
in=m_Oguan_Tubing+1;
|
||||
}
|
||||
else if(Number==zoneOrder_Tubing.value("套管接箍").toInt()){
|
||||
h=10;
|
||||
in=m_Oguan_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_Oguan_Tubing;
|
||||
}
|
||||
else {
|
||||
in=m_Oguan_Tubing+1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
in=m_Oguan_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);
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -184,7 +184,7 @@ public:
|
|||
QMap<QString, QObject*> m_mapDraggable_GeoLith; //录井剖面
|
||||
QMap<QString, QObject*> m_mapDraggable_SwallCore; //井壁取心
|
||||
QMap<QString, QObject*> m_mapDraggable_Gujing; //固井
|
||||
QMap<QString, QObject*> m_mapDraggable_Image;
|
||||
QMap<QString, QObject*> m_mapDraggable_Image; // 岩心照片
|
||||
QMap<QString, QObject*> m_mapDraggable_MFac; //微相
|
||||
QMap<QString, QObject*> m_mapDraggable_Phase; //亚相
|
||||
QMap<QString, QObject*> m_mapDraggable_Fac; //相
|
||||
|
|
@ -259,6 +259,10 @@ public:
|
|||
QList <FAC_TABLE> m_ObjList_Fac;
|
||||
QCPItemStraightLine *m_qcpItemLine=nullptr;
|
||||
QCPItemStraightLine *m_qcpItemLine2=nullptr;
|
||||
//沉积相
|
||||
bool m_bDrawFac = true; // 绘制相
|
||||
bool m_bDrawPhase = true; // 绘制亚相
|
||||
bool m_bDrawMFacName = true; // 微相名称
|
||||
void ReadFracDef();
|
||||
void ReadData_Fac(QString strSlfName, QString csCurve, bool bAdd=true);
|
||||
void DrawFac(int iType);
|
||||
|
|
@ -266,6 +270,21 @@ public:
|
|||
//保存
|
||||
void SaveToSLF_Fac();
|
||||
|
||||
//套管組件
|
||||
QMap<QString,QString> zoneOrder_Tubing;
|
||||
float m_Oguan_Tubing = 63.5;//油管外径
|
||||
float m_Oind_Tubing = 121.36;//套管内径
|
||||
float m_OutD_Tubing = 139.7; //套管外径
|
||||
bool m_bDrawCCL_Tubing = false;
|
||||
QString cclimgpath_Tubing="";
|
||||
QList<Slf_JIEGUPOS> m_pResultList_Tubing;
|
||||
QString m_strAddTubing="";
|
||||
QCPItemRect *mRect_Tubing=nullptr;
|
||||
QCPItemRect *mRect2_Tubing=nullptr;
|
||||
bool LoadFromSLF_Tubing(QString strSlfName, QString csCurve);
|
||||
void drawOne_Tubing(Slf_JIEGUPOS result);
|
||||
bool SaveToSLF_Tubing();
|
||||
|
||||
public slots:
|
||||
void slot_time();
|
||||
|
||||
|
|
@ -274,6 +293,9 @@ public:
|
|||
|
||||
//岩心照片
|
||||
void addImageToPlot(double left_Low, double right_Hight, const QString imagePath);
|
||||
void addImageToPlot(double left_Low, double right_Hight, const QString imagePath, double left, double width);
|
||||
// left_Low底, right_Hight高 imagePath图片 left左边距 width宽 mBorderColor边框颜色、 mBorderStyle边框样式 mBorderWidth边框宽
|
||||
void addImageToPlot(double left_Low, double right_Hight, const QString imagePath, double left, double width, QColor mBorderColor, Qt::PenStyle mBorderStyle, int mBorderWidth);
|
||||
|
||||
//曲线
|
||||
void addRandomGraph(QVector<double> x, QVector<double> y, QString strSlfName, QString strLineName, QString strAliasName, QString strUnit,
|
||||
|
|
@ -434,6 +456,10 @@ public slots:
|
|||
void addItem_Fac(); //添加沉积相
|
||||
void RefreshItems_Fac(bool bAdd=true); //刷新数据
|
||||
|
||||
//右键--套管组件
|
||||
void addItem_Tubing(); //添加套管组件
|
||||
//void RefreshItems_Tubing(); //刷新数据
|
||||
|
||||
//右键--解释结论
|
||||
void onOpenEditResult();
|
||||
void onCloseEditResult();
|
||||
|
|
@ -470,6 +496,8 @@ public slots:
|
|||
void s_ReloadPlot(QString strUuid, QString strSlfName, QString strLineName);
|
||||
|
||||
void s_changeDrawProperty(QVariantList vlist);
|
||||
// 深度
|
||||
void s_changeDepthProperty(QVariantList vlist);
|
||||
|
||||
void onAddRect();
|
||||
|
||||
|
|
@ -489,6 +517,9 @@ public slots:
|
|||
//是否显示
|
||||
void s_changeGeoLithShow(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString propertyData, bool bShow);
|
||||
|
||||
//改变沉积相属性,是否显示
|
||||
void s_changeFacShow(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString propertyData, bool bShow);
|
||||
|
||||
public:
|
||||
//蝌蚪图重绘网格线
|
||||
bool mKedou = false;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
#include "transparentdraggableGuan.h"
|
||||
|
||||
#include "PropertyWidget.h"
|
||||
#include "CallManage.h"
|
||||
|
||||
extern double g_dPixelPerCm;//每厘米像素数
|
||||
//static GeoIndicatorGenerator m_drawGeo;
|
||||
|
|
@ -69,8 +70,6 @@ void TransparentDraggableGuan::DrawSVGTiled(QPainter* painter,QString svgFileNam
|
|||
painter->restore();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//设置最小宽度
|
||||
void TransparentDraggableGuan::setMinWidth(double minWidth)
|
||||
{
|
||||
|
|
@ -236,20 +235,52 @@ void TransparentDraggableGuan::deleteRect()
|
|||
mPlot->removeItem(mPixmap);
|
||||
// mPlot->removeItem(mItemTitle);
|
||||
|
||||
mPlot->replot();
|
||||
//mPlot->replot();
|
||||
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()
|
||||
{
|
||||
|
|
@ -317,6 +348,11 @@ void TransparentDraggableGuan::onDelRect()
|
|||
//mDragMode = DragNone;
|
||||
//删除框图
|
||||
deleteRect();
|
||||
mPlot->replot();
|
||||
//保存
|
||||
mPlot->SaveToSLF_Tubing();
|
||||
//属性清空
|
||||
PropertyService()->InitCurrentViewInfo();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -343,19 +379,13 @@ void TransparentDraggableGuan::onMousePress(QMouseEvent *event)
|
|||
|
||||
//event->accept();
|
||||
|
||||
// double low = mRect->topLeft->coords().x();
|
||||
// double hight = mRect->bottomRight->coords().x();
|
||||
// PropertyService()->initTubingItemProperty(this, low, hight, m_Result);
|
||||
|
||||
QMenu menu(nullptr);
|
||||
QAction *delAction = menu.addAction("删除框图");
|
||||
//delAction->installEventFilter(this);
|
||||
connect(delAction, &QAction::triggered, this, &TransparentDraggableGuan::onDelRect);
|
||||
|
||||
// QAction* pItem = menu.exec(event->globalPos());
|
||||
// if(pItem == delAction)
|
||||
// {
|
||||
// //event->accept();
|
||||
|
||||
// int ii=0;
|
||||
// ii++;
|
||||
// }
|
||||
menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除选中对象", this, &TransparentDraggableGuan::onDelRect);
|
||||
menu.addAction(QIcon(::GetImagePath() + "icon/Shift.png"), "设置深度移动量", this, &TransparentDraggableGuan::setItemDepthOffset);
|
||||
menu.exec(event->globalPos());
|
||||
|
||||
return;
|
||||
|
|
@ -393,8 +423,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)
|
||||
{
|
||||
if (mDragMode == DragRect)
|
||||
{
|
||||
m_bMoveRect = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_bArrow = false;
|
||||
m_bMoveRect = false;
|
||||
}
|
||||
|
||||
//--------------------
|
||||
if(mDragMode == DragNone) return;
|
||||
|
||||
event->accept();
|
||||
|
|
@ -487,6 +541,12 @@ void TransparentDraggableGuan::onMouseMove(QMouseEvent *event)
|
|||
}
|
||||
}
|
||||
|
||||
//位置改变,鼠标拖动item
|
||||
if(newRange.lower!= mDragStartRange.lower || newRange.upper!= mDragStartRange.upper)
|
||||
{
|
||||
m_bChange = true;
|
||||
}
|
||||
|
||||
setRange(newRange.lower, newRange.upper);
|
||||
|
||||
}
|
||||
|
|
@ -495,6 +555,21 @@ void TransparentDraggableGuan::onMouseRelease(QMouseEvent *event)
|
|||
{
|
||||
if(event->button() == Qt::LeftButton && mDragMode != DragNone) {
|
||||
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;
|
||||
//emit rangeChanged(getRange());
|
||||
|
|
|
|||
|
|
@ -55,14 +55,15 @@ private:
|
|||
void updateHandles() ;
|
||||
|
||||
private slots:
|
||||
void onDelRect();
|
||||
void onDelRect(); //删除
|
||||
void setItemDepthOffset(); //设置深度移动量
|
||||
void onMousePress(QMouseEvent *event);
|
||||
void onMouseMove(QMouseEvent *event);
|
||||
void onMouseRelease(QMouseEvent *event);
|
||||
double getMyLower();
|
||||
double getMyUpper();
|
||||
|
||||
private:
|
||||
public:
|
||||
QMyCustomPlot *mPlot;
|
||||
QCPItemRect *mRect;
|
||||
// QCPItemRect *mLeftHandle;
|
||||
|
|
@ -83,6 +84,13 @@ private:
|
|||
// 添加最小宽度成员变量
|
||||
double mMinWidth;
|
||||
float mIn=123;
|
||||
|
||||
//鼠标形状
|
||||
bool m_bArrow = false;
|
||||
bool m_bMoveRect = false;
|
||||
int getCursor();
|
||||
//鼠标是否拖动item
|
||||
bool m_bChange = false;
|
||||
};
|
||||
|
||||
#endif // TRANSPARENTDRAGGABLEGUAN_H
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ void TransparentDraggableRightList::deleteRect()
|
|||
}
|
||||
mPlot->m_bPriviewRightList = false;//当前是否正在编辑曲线。
|
||||
|
||||
mPlot->replot();
|
||||
//mPlot->replot();
|
||||
this->deleteLater();
|
||||
|
||||
//
|
||||
|
|
@ -244,6 +244,7 @@ void TransparentDraggableRightList::onDelRect()
|
|||
//mDragMode = DragNone;
|
||||
//删除框图
|
||||
deleteRect();
|
||||
mPlot->replot();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ void TransparentDraggableSelectRect::deleteRect()
|
|||
}
|
||||
mPlot->m_bEditRect = false;//当前是否正在编辑曲线。
|
||||
|
||||
mPlot->replot();
|
||||
//mPlot->replot();
|
||||
this->deleteLater();
|
||||
|
||||
//
|
||||
|
|
@ -276,6 +276,7 @@ void TransparentDraggableSelectRect::onDelRect()
|
|||
//mDragMode = DragNone;
|
||||
//删除框图
|
||||
deleteRect();
|
||||
mPlot->replot();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -175,8 +175,13 @@ void TransparentDraggableImage::setRange(double left_Low, double right_Hight)
|
|||
{
|
||||
if(left_Low >= right_Hight) return;
|
||||
|
||||
double lY1 = mPlot->yAxis->range().lower;//+10
|
||||
double lY2 = mPlot->yAxis->range().upper;
|
||||
double left;
|
||||
double width;
|
||||
left = (getLeft()/100) * mPlot->yAxis->range().upper;
|
||||
width = (getWidth()/100) * mPlot->yAxis->range().upper;
|
||||
|
||||
double lY1 = mPlot->yAxis->range().lower+left;
|
||||
double lY2 = width+left;
|
||||
mRect->topLeft->setCoords(left_Low, lY1);
|
||||
mRect->bottomRight->setCoords(right_Hight, lY2);
|
||||
|
||||
|
|
@ -194,6 +199,59 @@ void TransparentDraggableImage::setRange(double left_Low, double right_Hight)
|
|||
//mRect->topLeft->setCoords(left, mPlot->yAxis->range().upper);
|
||||
//mRect->bottomRight->setCoords(right, mPlot->yAxis->range().lower);
|
||||
|
||||
if(m_BorderColor == nullptr){
|
||||
this->m_BorderColor = QColor(0, 0, 0, 200); // 边框颜色
|
||||
this->m_BorderStyle = Qt::SolidLine; // 边框线型
|
||||
this->m_BorderWidth = 1; // 边框线宽(像素)
|
||||
}
|
||||
// 应用边框样式到主矩形
|
||||
mRect->setPen(QPen(m_BorderColor, m_BorderWidth, m_BorderStyle));
|
||||
updateHandles();
|
||||
mPlot->replot();
|
||||
}
|
||||
|
||||
// 设置矩形范围
|
||||
void TransparentDraggableImage::setRange(double left_Low, double right_Hight,double leftPercentage, double widthPercentage, int flag)
|
||||
{
|
||||
if(left_Low >= right_Hight) return;
|
||||
// qDebug() << "left_Low" << left_Low <<
|
||||
// "right_Hight" << right_Hight <<
|
||||
// "marginLeft" << left <<
|
||||
// "graphHeight" << width;
|
||||
// 百分比转换实际距离
|
||||
double left;
|
||||
double width;
|
||||
// todo 现在大小判断有问题 这里只是绘图的判断 应该在上一层保存的时候做判断
|
||||
// if(flag == 0)
|
||||
// {
|
||||
// if(leftPercentage + widthPercentage > 100){
|
||||
// leftPercentage = 100 - widthPercentage;
|
||||
// }
|
||||
// }
|
||||
// else if(flag == 1)
|
||||
// {
|
||||
// }
|
||||
|
||||
left = (leftPercentage/100) * mPlot->yAxis->range().upper;
|
||||
width = (widthPercentage/100) * mPlot->yAxis->range().upper;
|
||||
|
||||
double lY1 = mPlot->yAxis->range().lower+left;
|
||||
double lY2 = width+left;
|
||||
mRect->topLeft->setCoords(left_Low, lY1);
|
||||
mRect->bottomRight->setCoords(right_Hight, lY2);
|
||||
|
||||
//位置与rect不一样,否则图像反转
|
||||
mPixmap->topLeft->setCoords(right_Hight, lY1);
|
||||
mPixmap->bottomRight->setCoords(left_Low, lY2);
|
||||
drawResult(left_Low, right_Hight, lY1, lY2);
|
||||
|
||||
//mItemTitle->position->setCoords(0.5, 0.5);
|
||||
// 设置父锚点,定位点
|
||||
//mItemTitle->position->setParentAnchor(mRect->bottom);
|
||||
mItemTitle->position->setCoords((mRect->topLeft->coords().x() + mRect->bottomRight->coords().x())/2,
|
||||
(mRect->topLeft->coords().y() + mRect->bottomRight->coords().y())/2); // 设置文本在矩形中心位置
|
||||
|
||||
mRect->setPen(QPen(m_BorderColor, m_BorderWidth, m_BorderStyle));
|
||||
updateHandles();
|
||||
mPlot->replot();
|
||||
}
|
||||
|
|
@ -234,7 +292,7 @@ void TransparentDraggableImage::deleteRect()
|
|||
mPlot->removeItem(mPixmap);
|
||||
mPlot->removeItem(mItemTitle);
|
||||
|
||||
mPlot->replot();
|
||||
//mPlot->replot();
|
||||
this->deleteLater();
|
||||
|
||||
//
|
||||
|
|
@ -255,7 +313,17 @@ void TransparentDraggableImage::initRect()
|
|||
mRect = new QCPItemRect(mPlot);
|
||||
mRect->setLayer("overlay"); // 确保在最上层
|
||||
mRect->setBrush(QBrush(QColor(255, 255, 255, 50))); // 半透明蓝色
|
||||
mRect->setPen(QPen(QColor(70, 70, 255, 200)));
|
||||
// mRect->setPen(QPen(QColor(70, 70, 255, 200)));
|
||||
|
||||
// 左边距 宽度 都是百分比
|
||||
this->m_left = 0;
|
||||
this->m_width = 100;
|
||||
// ========== 新增:边框样式成员变量 ==========
|
||||
this->m_BorderColor = QColor(0, 0, 0, 200); // 边框颜色
|
||||
this->m_BorderStyle = Qt::SolidLine; // 边框线型
|
||||
this->m_BorderWidth = 1; // 边框线宽(像素)
|
||||
// 应用边框样式到主矩形
|
||||
mRect->setPen(QPen(this->m_BorderColor, this->m_BorderWidth, this->m_BorderStyle));
|
||||
|
||||
// 创建左右边界控制点
|
||||
mLeftHandle = new QCPItemRect(mPlot);
|
||||
|
|
@ -315,6 +383,7 @@ void TransparentDraggableImage::onDelRect()
|
|||
//mDragMode = DragNone;
|
||||
//删除框图
|
||||
deleteRect();
|
||||
mPlot->replot();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -343,7 +412,12 @@ void TransparentDraggableImage::onMousePress(QMouseEvent *event)
|
|||
// 显示属性
|
||||
double low = mRect->topLeft->coords().x();
|
||||
double hight = mRect->bottomRight->coords().x();
|
||||
PropertyService()->initImageItemProperty(this, low, hight, m_Result);
|
||||
double left = getLeft();
|
||||
double width = getWidth();
|
||||
QColor borderColor = this->m_BorderColor; // 边框颜色
|
||||
Qt::PenStyle borderStyle = this->m_BorderStyle; // 边框线型
|
||||
int borderWidth = this->m_BorderWidth; // 边框线宽(像素)
|
||||
PropertyService()->initImageItemProperty(this, low, hight, m_Result, left, width,borderColor,borderStyle,borderWidth);
|
||||
|
||||
QMenu menu(nullptr);
|
||||
QAction *delAction = menu.addAction("删除框图");
|
||||
|
|
@ -445,7 +519,6 @@ void TransparentDraggableImage::onMouseMove(QMouseEvent *event)
|
|||
newRange.upper = getMyUpper();
|
||||
newRange.lower = newRange.upper - width;
|
||||
}
|
||||
|
||||
// QCPRange axisRange = mPlot->xAxis->range();
|
||||
// if(newRange.lower < axisRange.lower) {
|
||||
// newRange.lower = axisRange.lower;
|
||||
|
|
@ -487,7 +560,6 @@ void TransparentDraggableImage::onMouseMove(QMouseEvent *event)
|
|||
}
|
||||
|
||||
setRange(newRange.lower, newRange.upper);
|
||||
|
||||
}
|
||||
|
||||
void TransparentDraggableImage::onMouseRelease(QMouseEvent *event)
|
||||
|
|
@ -497,7 +569,12 @@ void TransparentDraggableImage::onMouseRelease(QMouseEvent *event)
|
|||
// 显示属性
|
||||
double low = mRect->topLeft->coords().x();
|
||||
double hight = mRect->bottomRight->coords().x();
|
||||
PropertyService()->initImageItemProperty(this, low, hight, m_Result);
|
||||
double left = this->getLeft();
|
||||
double width = this->getWidth();
|
||||
QColor borderColor = this->m_BorderColor; // 边框颜色
|
||||
Qt::PenStyle borderStyle = this->m_BorderStyle; // 边框线型
|
||||
int borderWidth = this->m_BorderWidth; // 边框线宽(像素)
|
||||
PropertyService()->initImageItemProperty(this, low, hight, m_Result, left, width, borderColor, borderStyle, borderWidth);
|
||||
|
||||
|
||||
//避免二次绘制框图
|
||||
|
|
@ -616,3 +693,56 @@ void TransparentDraggableImage::setLower(double lower)
|
|||
|
||||
setRange(newRange.lower, newRange.upper);
|
||||
}
|
||||
|
||||
void TransparentDraggableImage::setMMinWidth(double mMinWidth)
|
||||
{
|
||||
this->mMinWidth = mMinWidth;
|
||||
}
|
||||
|
||||
void TransparentDraggableImage::setLeft(double left)
|
||||
{
|
||||
this->m_left = left;
|
||||
}
|
||||
double TransparentDraggableImage::getLeft()
|
||||
{
|
||||
return this->m_left;
|
||||
}
|
||||
void TransparentDraggableImage::setWidth(double width)
|
||||
{
|
||||
this->m_width = width;
|
||||
}
|
||||
double TransparentDraggableImage::getWidth()
|
||||
{
|
||||
return this->m_width;
|
||||
}
|
||||
// 设置边框颜色
|
||||
void TransparentDraggableImage::setBorderColor(const QColor &color)
|
||||
{
|
||||
this->m_BorderColor = color;
|
||||
}
|
||||
|
||||
// 设置边框线型
|
||||
void TransparentDraggableImage::setBorderStyle(Qt::PenStyle style)
|
||||
{
|
||||
this->m_BorderStyle = style;
|
||||
}
|
||||
|
||||
// 设置边框线宽
|
||||
void TransparentDraggableImage::setBorderWidth(int width)
|
||||
{
|
||||
// 线宽不能小于1像素,避免无效值
|
||||
if (width < 1) width = 1;
|
||||
this->m_BorderWidth = width;
|
||||
}
|
||||
QColor TransparentDraggableImage::geBorderColor()
|
||||
{
|
||||
return this->m_BorderColor;
|
||||
}
|
||||
Qt::PenStyle TransparentDraggableImage::getBorderStyle()
|
||||
{
|
||||
return this->m_BorderStyle;
|
||||
}
|
||||
int TransparentDraggableImage::getBorderWidth()
|
||||
{
|
||||
return this->m_BorderWidth;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ public:
|
|||
|
||||
// 设置矩形范围
|
||||
void setRange(double left_Low, double right_Hight);
|
||||
// flag=0边距修改 1宽度修改
|
||||
void setRange(double left_Low, double right_Hight,double left, double width, int flag = 0);
|
||||
// 获取当前范围
|
||||
QCPRange getRange();
|
||||
QString getMResult();
|
||||
|
|
@ -50,6 +52,22 @@ public:
|
|||
|
||||
void setUpper(double upper);
|
||||
void setLower(double lower);
|
||||
void setMMinWidth(double mMinWidth);
|
||||
void setLeft(double left);
|
||||
double getLeft();
|
||||
void setWidth(double width);
|
||||
double getWidth();
|
||||
|
||||
|
||||
// 设置边框颜色
|
||||
void setBorderColor(const QColor &color);
|
||||
// 设置边框线型(实线、虚线、点线等)
|
||||
void setBorderStyle(Qt::PenStyle style);
|
||||
// 设置边框线宽
|
||||
void setBorderWidth(int width);
|
||||
QColor geBorderColor();
|
||||
Qt::PenStyle getBorderStyle();
|
||||
int getBorderWidth();
|
||||
|
||||
signals:
|
||||
void rangeChanged(QCPRange newRange);
|
||||
|
|
@ -86,6 +104,13 @@ private:
|
|||
|
||||
// 添加最小宽度成员变量
|
||||
double mMinWidth;
|
||||
// 左边距 宽度 都是百分比
|
||||
double m_left = 0, m_width = 100;
|
||||
|
||||
// ========== 新增:边框样式成员变量 ==========
|
||||
QColor m_BorderColor; // 边框颜色
|
||||
Qt::PenStyle m_BorderStyle; // 边框线型
|
||||
int m_BorderWidth; // 边框线宽(像素)
|
||||
};
|
||||
|
||||
#endif // TRANSPARENTDRAGGABLEIMAGE_H
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user