Merge branch 'main' of http://git.hivekion.com:3000/jiayulong/logplus
This commit is contained in:
commit
b464eb94e9
|
|
@ -1005,6 +1005,10 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if("" == strLineName)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
m_formInfo->m_strLineName = strLineName;
|
m_formInfo->m_strLineName = strLineName;
|
||||||
|
|
@ -1178,6 +1182,8 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
m_formInfo->m_strAliasName = strAliasName;
|
m_formInfo->m_strAliasName = strAliasName;
|
||||||
//改变曲线Title
|
//改变曲线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);
|
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
|
else
|
||||||
|
|
@ -1188,6 +1194,8 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
m_formInfo->m_strAliasName = strAliasName;
|
m_formInfo->m_strAliasName = strAliasName;
|
||||||
//改变曲线Title
|
//改变曲线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);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1201,6 +1209,8 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
strAliasName == "气测-FMT-射孔-文本";
|
strAliasName == "气测-FMT-射孔-文本";
|
||||||
//改变曲线Title
|
//改变曲线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);
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1215,6 +1225,8 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
}
|
}
|
||||||
//改变曲线Title
|
//改变曲线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);
|
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,8 +1264,26 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
{
|
{
|
||||||
//先处理通用属性
|
//先处理通用属性
|
||||||
CommonPropertyChanged(pProperty, variant);
|
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);
|
CommonPropertyChanged(pProperty, variant);
|
||||||
|
|
@ -1269,7 +1299,7 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
listCond << variant;
|
listCond << variant;
|
||||||
emit CallManage::getInstance()->sig_changeDepthProperty(listCond);
|
emit CallManage::getInstance()->sig_changeDepthProperty(listCond);
|
||||||
}
|
}
|
||||||
|
|
||||||
if("深度比例尺" == m_propertyData[pProperty])
|
if("深度比例尺" == m_propertyData[pProperty])
|
||||||
{
|
{
|
||||||
//qDebug() << "深度比例尺->改变";
|
//qDebug() << "深度比例尺->改变";
|
||||||
|
|
@ -3224,6 +3254,10 @@ void PropertyWidget::initTubingProperty(FormInfo *formInfo)
|
||||||
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
|
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
|
||||||
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
|
_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;
|
m_strCurrentProperty = Tubing_Property;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2979,7 +2979,11 @@ void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString st
|
||||||
curv->show();
|
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_LeftVal = 0;
|
||||||
m_RightVal = iMyWidth;
|
m_RightVal = iMyWidth;
|
||||||
|
|
@ -3028,7 +3032,12 @@ void FormDraw::s_addTubingstring(QString strUuid, QString strSlfName, QString st
|
||||||
newlineColor.setNamedColor(listOtherProperty[1]);
|
newlineColor.setNamedColor(listOtherProperty[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString strUnit = "";
|
QString strUnit = "mm";
|
||||||
|
if(listOtherProperty.size()>=6)
|
||||||
|
{
|
||||||
|
strUnit = listOtherProperty[3];
|
||||||
|
}
|
||||||
|
|
||||||
double width=2;
|
double width=2;
|
||||||
QString strScaleType = "";
|
QString strScaleType = "";
|
||||||
//道-对象
|
//道-对象
|
||||||
|
|
|
||||||
|
|
@ -6660,6 +6660,10 @@ bool QMyCustomPlot::LoadFromSLF_Jiegutext(QString strSlfName, QString csCurve, Q
|
||||||
}
|
}
|
||||||
|
|
||||||
int iIndex=logio->OpenTable(csCurve.toStdString().c_str());
|
int iIndex=logio->OpenTable(csCurve.toStdString().c_str());
|
||||||
|
if(iIndex<0) {
|
||||||
|
delete logio;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if(iIndex>-1) {
|
if(iIndex>-1) {
|
||||||
int count = logio->GetTableRecordCount(iIndex);
|
int count = logio->GetTableRecordCount(iIndex);
|
||||||
int fieldnum = logio->GetTableFieldCount(iIndex);
|
int fieldnum = logio->GetTableFieldCount(iIndex);
|
||||||
|
|
@ -6741,7 +6745,7 @@ bool QMyCustomPlot::LoadFromSLF_Jiegutext(QString strSlfName, QString csCurve, Q
|
||||||
pInfo->update();
|
pInfo->update();
|
||||||
|
|
||||||
//属性清空
|
//属性清空
|
||||||
PropertyService()->InitCurrentViewInfo();
|
//PropertyService()->InitCurrentViewInfo();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -7933,10 +7937,12 @@ bool QMyCustomPlot::LoadFromSLF_Fac(QString strSlfName, QString csCurve, bool bA
|
||||||
if(m_qcpItemLine)
|
if(m_qcpItemLine)
|
||||||
{
|
{
|
||||||
removeItem(m_qcpItemLine);
|
removeItem(m_qcpItemLine);
|
||||||
|
m_qcpItemLine = nullptr;
|
||||||
}
|
}
|
||||||
if(m_qcpItemLine2)
|
if(m_qcpItemLine2)
|
||||||
{
|
{
|
||||||
removeItem(m_qcpItemLine2);
|
removeItem(m_qcpItemLine2);
|
||||||
|
m_qcpItemLine2 = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
int iMyWidth = this->axisRect(0)->width();
|
int iMyWidth = this->axisRect(0)->width();
|
||||||
|
|
@ -8224,12 +8230,16 @@ bool QMyCustomPlot::LoadFromSLF_Tubing(QString strSlfName, QString csCurve)
|
||||||
if(strSlfName==""||!logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead))
|
if(strSlfName==""||!logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead))
|
||||||
{
|
{
|
||||||
delete logio;
|
delete logio;
|
||||||
// QMessageBox::information(NULL,"提示","SLF文件打开失败,请检查!!",QMessageBox::Yes);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int iIndex=logio->OpenTable(csCurve.toStdString().c_str());
|
int iIndex=logio->OpenTable(csCurve.toStdString().c_str());
|
||||||
|
if(iIndex<0)
|
||||||
|
{
|
||||||
|
delete logio;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//
|
||||||
if(iIndex>-1) {
|
if(iIndex>-1) {
|
||||||
int count=logio->GetTableRecordCount(iIndex);
|
int count=logio->GetTableRecordCount(iIndex);
|
||||||
//int fieldnum=logio->GetTableFieldCount(iIndex);
|
//int fieldnum=logio->GetTableFieldCount(iIndex);
|
||||||
|
|
@ -8284,6 +8294,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);
|
logio->CloseTable(iIndex);
|
||||||
delete m_pResult;
|
delete m_pResult;
|
||||||
}
|
}
|
||||||
|
|
@ -8305,15 +8349,15 @@ void QMyCustomPlot::drawOne_Tubing(Slf_JIEGUPOS result)
|
||||||
int Number=result.Number;
|
int Number=result.Number;
|
||||||
|
|
||||||
float h=20;
|
float h=20;
|
||||||
float in=m_Oind_Tubing;
|
float in=m_Oguan_Tubing;
|
||||||
if(!m_bDrawCCL_Tubing)
|
if(!m_bDrawCCL_Tubing)
|
||||||
{
|
{
|
||||||
if(Number==1) {
|
if(Number==1) {
|
||||||
in=m_Oind_Tubing+1;
|
in=m_Oguan_Tubing+1;
|
||||||
}
|
}
|
||||||
else if(Number==zoneOrder_Tubing.value("套管接箍").toInt()){
|
else if(Number==zoneOrder_Tubing.value("套管接箍").toInt()){
|
||||||
h=10;
|
h=10;
|
||||||
in=m_Oind_Tubing;
|
in=m_Oguan_Tubing;
|
||||||
}
|
}
|
||||||
else if(Number==zoneOrder_Tubing.value("封隔器").toInt()||
|
else if(Number==zoneOrder_Tubing.value("封隔器").toInt()||
|
||||||
Number==zoneOrder_Tubing.value("水力猫").toInt()||
|
Number==zoneOrder_Tubing.value("水力猫").toInt()||
|
||||||
|
|
@ -8322,15 +8366,15 @@ void QMyCustomPlot::drawOne_Tubing(Slf_JIEGUPOS result)
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if(Number==zoneOrder_Tubing.value("封隔器").toInt()) h=25;
|
if(Number==zoneOrder_Tubing.value("封隔器").toInt()) h=25;
|
||||||
in=m_Oind_Tubing;
|
in=m_Oguan_Tubing;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
in=m_Oind_Tubing+1;
|
in=m_Oguan_Tubing+1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
in=m_Oind_Tubing+1;
|
in=m_Oguan_Tubing+1;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString name;
|
QString name;
|
||||||
|
|
@ -8350,22 +8394,6 @@ void QMyCustomPlot::drawOne_Tubing(Slf_JIEGUPOS result)
|
||||||
float newUpper = this->xAxis->pixelToCoord(upper);
|
float newUpper = this->xAxis->pixelToCoord(upper);
|
||||||
float newLower = this->xAxis->pixelToCoord(lower);
|
float newLower = this->xAxis->pixelToCoord(lower);
|
||||||
this->addGuanToPlot(newLower, newUpper, cclimgfile, in);
|
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()
|
bool QMyCustomPlot::SaveToSLF_Tubing()
|
||||||
|
|
|
||||||
|
|
@ -272,12 +272,15 @@ public:
|
||||||
|
|
||||||
//套管組件
|
//套管組件
|
||||||
QMap<QString,QString> zoneOrder_Tubing;
|
QMap<QString,QString> zoneOrder_Tubing;
|
||||||
float m_Oguan_Tubing = 63.5;
|
float m_Oguan_Tubing = 63.5;//油管外径
|
||||||
float m_Oind_Tubing = 121.36;
|
float m_Oind_Tubing = 121.36;//套管内径
|
||||||
|
float m_OutD_Tubing = 139.7; //套管外径
|
||||||
bool m_bDrawCCL_Tubing = false;
|
bool m_bDrawCCL_Tubing = false;
|
||||||
QString cclimgpath_Tubing="";
|
QString cclimgpath_Tubing="";
|
||||||
QList<Slf_JIEGUPOS> m_pResultList_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);
|
bool LoadFromSLF_Tubing(QString strSlfName, QString csCurve);
|
||||||
void drawOne_Tubing(Slf_JIEGUPOS result);
|
void drawOne_Tubing(Slf_JIEGUPOS result);
|
||||||
bool SaveToSLF_Tubing();
|
bool SaveToSLF_Tubing();
|
||||||
|
|
|
||||||
|
|
@ -70,8 +70,6 @@ void TransparentDraggableGuan::DrawSVGTiled(QPainter* painter,QString svgFileNam
|
||||||
painter->restore();
|
painter->restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//设置最小宽度
|
//设置最小宽度
|
||||||
void TransparentDraggableGuan::setMinWidth(double minWidth)
|
void TransparentDraggableGuan::setMinWidth(double minWidth)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user