套管组件,追加属性
This commit is contained in:
parent
b146ad5857
commit
e8a0ee7869
|
|
@ -1005,6 +1005,10 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
|||
{
|
||||
return;
|
||||
}
|
||||
if("" == strLineName)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
m_formInfo->m_strLineName = strLineName;
|
||||
|
|
@ -1178,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
|
||||
|
|
@ -1188,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
|
||||
{
|
||||
|
|
@ -1201,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
|
||||
{
|
||||
|
|
@ -1215,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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1252,14 +1264,32 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
|||
{
|
||||
//先处理通用属性
|
||||
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) // 深度
|
||||
else if (m_strCurrentProperty == Depth_Property) // 深度
|
||||
{
|
||||
//先处理通用属性
|
||||
CommonPropertyChanged(pProperty, variant);
|
||||
changedDepthProperty(pProperty, variant);
|
||||
}
|
||||
|
||||
|
||||
if("深度比例尺" == m_propertyData[pProperty])
|
||||
{
|
||||
//qDebug() << "深度比例尺->改变";
|
||||
|
|
@ -3214,6 +3244,10 @@ void PropertyWidget::initTubingProperty(FormInfo *formInfo)
|
|||
_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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2979,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;
|
||||
|
|
@ -3028,7 +3032,12 @@ void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString st
|
|||
newlineColor.setNamedColor(listOtherProperty[1]);
|
||||
}
|
||||
|
||||
QString strUnit = "";
|
||||
QString strUnit = "mm";
|
||||
if(listOtherProperty.size()>=6)
|
||||
{
|
||||
strUnit = listOtherProperty[3];
|
||||
}
|
||||
|
||||
double width=2;
|
||||
QString strScaleType = "";
|
||||
//道-对象
|
||||
|
|
|
|||
|
|
@ -6567,6 +6567,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);
|
||||
|
|
@ -6648,7 +6652,7 @@ bool QMyCustomPlot::LoadFromSLF_Jiegutext(QString strSlfName, QString csCurve, Q
|
|||
pInfo->update();
|
||||
|
||||
//属性清空
|
||||
PropertyService()->InitCurrentViewInfo();
|
||||
//PropertyService()->InitCurrentViewInfo();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
@ -7840,10 +7844,12 @@ 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;
|
||||
}
|
||||
|
||||
int iMyWidth = this->axisRect(0)->width();
|
||||
|
|
@ -8131,12 +8137,16 @@ bool QMyCustomPlot::LoadFromSLF_Tubing(QString strSlfName, QString csCurve)
|
|||
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<0)
|
||||
{
|
||||
delete logio;
|
||||
return false;
|
||||
}
|
||||
//
|
||||
if(iIndex>-1) {
|
||||
int count=logio->GetTableRecordCount(iIndex);
|
||||
//int fieldnum=logio->GetTableFieldCount(iIndex);
|
||||
|
|
@ -8191,6 +8201,40 @@ bool QMyCustomPlot::LoadFromSLF_Tubing(QString strSlfName, QString csCurve)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
//先删除
|
||||
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;
|
||||
}
|
||||
|
|
@ -8212,15 +8256,15 @@ void QMyCustomPlot::drawOne_Tubing(Slf_JIEGUPOS result)
|
|||
int Number=result.Number;
|
||||
|
||||
float h=20;
|
||||
float in=m_Oind_Tubing;
|
||||
float in=m_Oguan_Tubing;
|
||||
if(!m_bDrawCCL_Tubing)
|
||||
{
|
||||
if(Number==1) {
|
||||
in=m_Oind_Tubing+1;
|
||||
in=m_Oguan_Tubing+1;
|
||||
}
|
||||
else if(Number==zoneOrder_Tubing.value("套管接箍").toInt()){
|
||||
h=10;
|
||||
in=m_Oind_Tubing;
|
||||
in=m_Oguan_Tubing;
|
||||
}
|
||||
else if(Number==zoneOrder_Tubing.value("封隔器").toInt()||
|
||||
Number==zoneOrder_Tubing.value("水力猫").toInt()||
|
||||
|
|
@ -8229,15 +8273,15 @@ void QMyCustomPlot::drawOne_Tubing(Slf_JIEGUPOS result)
|
|||
)
|
||||
{
|
||||
if(Number==zoneOrder_Tubing.value("封隔器").toInt()) h=25;
|
||||
in=m_Oind_Tubing;
|
||||
in=m_Oguan_Tubing;
|
||||
}
|
||||
else {
|
||||
in=m_Oind_Tubing+1;
|
||||
in=m_Oguan_Tubing+1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
in=m_Oind_Tubing+1;
|
||||
in=m_Oguan_Tubing+1;
|
||||
}
|
||||
|
||||
QString name;
|
||||
|
|
@ -8257,22 +8301,6 @@ void QMyCustomPlot::drawOne_Tubing(Slf_JIEGUPOS result)
|
|||
float newUpper = this->xAxis->pixelToCoord(upper);
|
||||
float newLower = this->xAxis->pixelToCoord(lower);
|
||||
this->addGuanToPlot(newLower, newUpper, cclimgfile, in);
|
||||
|
||||
// QString cclimgfile=cclimgpath+name+".png";
|
||||
// double lY1 = widget->yAxis->range().lower;//+10
|
||||
// double lY2 = widget->yAxis->range().upper;
|
||||
// QCPItemPixmap *mPixmap;
|
||||
// mPixmap = new QCPItemPixmap(widget);
|
||||
// mPixmap->setScaled(true, Qt::IgnoreAspectRatio); // 设置缩放方式
|
||||
// mPixmap->setLayer("overlay"); // 确保在最上层
|
||||
// //
|
||||
// float upper = widget->xAxis->coordToPixel(-depth)-h/2.0;
|
||||
// float lower = widget->xAxis->coordToPixel(-depth)+h/2.0;
|
||||
// float newUpper = widget->xAxis->pixelToCoord(upper);
|
||||
// float newLower = widget->xAxis->pixelToCoord(lower);
|
||||
// mPixmap->topLeft->setCoords(newUpper, lY1 + (lY2-lY1-in)/2.0);
|
||||
// mPixmap->bottomRight->setCoords(newLower, lY2 - (lY2-lY1-in)/2.0);
|
||||
// mPixmap->setPixmap(QPixmap(cclimgfile)); // 设置图片
|
||||
}
|
||||
|
||||
bool QMyCustomPlot::SaveToSLF_Tubing()
|
||||
|
|
|
|||
|
|
@ -272,12 +272,15 @@ public:
|
|||
|
||||
//套管組件
|
||||
QMap<QString,QString> zoneOrder_Tubing;
|
||||
float m_Oguan_Tubing = 63.5;
|
||||
float m_Oind_Tubing = 121.36;
|
||||
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="";
|
||||
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();
|
||||
|
|
|
|||
|
|
@ -70,8 +70,6 @@ void TransparentDraggableGuan::DrawSVGTiled(QPainter* painter,QString svgFileNam
|
|||
painter->restore();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//设置最小宽度
|
||||
void TransparentDraggableGuan::setMinWidth(double minWidth)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user