追加可视解释视图id判断;优化模板加载提速
This commit is contained in:
parent
d9afdd2a05
commit
c9f5d66c2b
|
|
@ -6,7 +6,7 @@
|
||||||
#include <QList>
|
#include <QList>
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
#include "qmycustomplot.h"
|
//#include "qmycustomplot.h"
|
||||||
|
|
||||||
class Q_DECL_EXPORT CallManage : public QObject
|
class Q_DECL_EXPORT CallManage : public QObject
|
||||||
{
|
{
|
||||||
|
|
@ -38,43 +38,43 @@ signals:
|
||||||
|
|
||||||
void sig_ShowCurve(QString strSlfName, QString strName);//曲线数据查看
|
void sig_ShowCurve(QString strSlfName, QString strName);//曲线数据查看
|
||||||
|
|
||||||
void sig_NewTrack(QString strWellName, QString strSlfName, QString strLineName);//新建道
|
void sig_NewTrack(QString strUuid, QString strWellName, QString strSlfName, QString strLineName);//新建道
|
||||||
void sig_NewTrack_No_Line(QString strWellName, QString strTrackName);//新建空白道,没有曲线
|
void sig_NewTrack_No_Line(QString strUuid, QString strWellName, QString strTrackName);//新建空白道,没有曲线
|
||||||
void sig_AddLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);//新建曲线
|
void sig_AddLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);//新建曲线
|
||||||
void sig_AddLine_Property(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
void sig_AddLine_Property(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||||
double newLeftScale, double newRightScale, QColor lineColor, double width, Qt::PenStyle lineStyle);//新建曲线,带属性
|
double newLeftScale, double newRightScale, QColor lineColor, double width, Qt::PenStyle lineStyle);//新建曲线,带属性
|
||||||
void sig_delLine(QString strWellName, QString strTrackName, QString strLineName);//删除曲线
|
void sig_delLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName);//删除曲线
|
||||||
//属性
|
//属性
|
||||||
//左刻度
|
//左刻度
|
||||||
void sig_ChangeLeftScale(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newLeftScale);
|
void sig_ChangeLeftScale(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newLeftScale);
|
||||||
//右刻度
|
//右刻度
|
||||||
void sig_ChangeRightScale(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newRightScale);
|
void sig_ChangeRightScale(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newRightScale);
|
||||||
//刻度类型
|
//刻度类型
|
||||||
void sig_ChangeScaleType(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strScaleType);
|
void sig_ChangeScaleType(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strScaleType);
|
||||||
|
|
||||||
//线颜色
|
//线颜色
|
||||||
void sig_ChangeLineColor(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor);
|
void sig_ChangeLineColor(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor);
|
||||||
//线宽
|
//线宽
|
||||||
void sig_ChangeLineWidth(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double width);
|
void sig_ChangeLineWidth(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double width);
|
||||||
//线型
|
//线型
|
||||||
void sig_ChangeLineStyle(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, Qt::PenStyle lineStyle);
|
void sig_ChangeLineStyle(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, Qt::PenStyle lineStyle);
|
||||||
//岩性填充-不填充
|
//岩性填充-不填充
|
||||||
void sig_ClearFillMode(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
void sig_ClearFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||||
//岩性填充-填充
|
//岩性填充-填充
|
||||||
void sig_ChangeFillMode(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
void sig_ChangeFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||||
QString newFillType, QString newTargetLine, QColor newColor, QString newLithosImage, QString newHeadFill,
|
QString newFillType, QString newTargetLine, QColor newColor, QString newLithosImage, QString newHeadFill,
|
||||||
float vMin, float vMax, QColor frontColor, QColor backColor, QString newFillMode);
|
float vMin, float vMax, QColor frontColor, QColor backColor, QString newFillMode);
|
||||||
//置顶层
|
//置顶层
|
||||||
void sig_Raise(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
void sig_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||||
|
|
||||||
//插件测试
|
//插件测试
|
||||||
void sig_testPlugin(QString strInfo);
|
void sig_testPlugin(QString strInfo);
|
||||||
|
|
||||||
//鼠标移动,通知状态栏显示深度信息
|
//鼠标移动,通知状态栏显示深度信息
|
||||||
void sig_MouseMove(QString strWellName, QString strTrackName, float dep);
|
void sig_MouseMove(QString strUuid, QString strWellName, QString strTrackName, float dep);
|
||||||
|
|
||||||
//
|
//
|
||||||
void sig_addImageToPlot(QMyCustomPlot* customPlot, double left_Low, double right_Hight, QString imagePath);
|
//void sig_addImageToPlot(QMyCustomPlot* customPlot, double left_Low, double right_Hight, QString imagePath);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Q_DISABLE_COPY(CallManage);
|
Q_DISABLE_COPY(CallManage);
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ void ConsoleOutputWidget::AppendConsole(QColor c, const QString &output)
|
||||||
{
|
{
|
||||||
Console->setTextColor(c);
|
Console->setTextColor(c);
|
||||||
Console->verticalScrollBar()->setValue(Console->verticalScrollBar()->maximum());
|
Console->verticalScrollBar()->setValue(Console->verticalScrollBar()->maximum());
|
||||||
Console->insertPlainText("["+QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss")+"]"+output);
|
Console->insertPlainText("["+QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss.zzz")+"]"+output);
|
||||||
Console->insertPlainText("\n");
|
Console->insertPlainText("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
if(m_strCurrentProperty == Curve_Property)
|
if(m_strCurrentProperty == Curve_Property)
|
||||||
{
|
{
|
||||||
double newLeftScale = variant.value<double>();
|
double newLeftScale = variant.value<double>();
|
||||||
emit CallManage::getInstance()->sig_ChangeLeftScale(m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newLeftScale);
|
emit CallManage::getInstance()->sig_ChangeLeftScale(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newLeftScale);
|
||||||
//更新填充
|
//更新填充
|
||||||
ChangFillProperty();
|
ChangFillProperty();
|
||||||
}
|
}
|
||||||
|
|
@ -116,7 +116,7 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
if(m_strCurrentProperty == Curve_Property)
|
if(m_strCurrentProperty == Curve_Property)
|
||||||
{
|
{
|
||||||
double newRightScale = variant.value<double>();
|
double newRightScale = variant.value<double>();
|
||||||
emit CallManage::getInstance()->sig_ChangeRightScale(m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newRightScale);
|
emit CallManage::getInstance()->sig_ChangeRightScale(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newRightScale);
|
||||||
//更新填充
|
//更新填充
|
||||||
ChangFillProperty();
|
ChangFillProperty();
|
||||||
}
|
}
|
||||||
|
|
@ -128,7 +128,7 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
if(m_strCurrentProperty == Curve_Property)
|
if(m_strCurrentProperty == Curve_Property)
|
||||||
{
|
{
|
||||||
QString newScaleType = pProperty->valueText();
|
QString newScaleType = pProperty->valueText();
|
||||||
emit CallManage::getInstance()->sig_ChangeScaleType(m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newScaleType);
|
emit CallManage::getInstance()->sig_ChangeScaleType(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newScaleType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if("颜色" == m_propertyData[pProperty])
|
else if("颜色" == m_propertyData[pProperty])
|
||||||
|
|
@ -140,7 +140,7 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
//曲线颜色
|
//曲线颜色
|
||||||
// 假设variant已经被设置为包含QColor
|
// 假设variant已经被设置为包含QColor
|
||||||
QColor newColor = variant.value<QColor>();
|
QColor newColor = variant.value<QColor>();
|
||||||
emit CallManage::getInstance()->sig_ChangeLineColor(m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newColor);
|
emit CallManage::getInstance()->sig_ChangeLineColor(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if("线宽" == m_propertyData[pProperty])
|
else if("线宽" == m_propertyData[pProperty])
|
||||||
|
|
@ -150,7 +150,7 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
if(m_strCurrentProperty == Curve_Property)
|
if(m_strCurrentProperty == Curve_Property)
|
||||||
{
|
{
|
||||||
double newWidth = variant.value<double>();
|
double newWidth = variant.value<double>();
|
||||||
emit CallManage::getInstance()->sig_ChangeLineWidth(m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newWidth);
|
emit CallManage::getInstance()->sig_ChangeLineWidth(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newWidth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if("线型" == m_propertyData[pProperty])
|
else if("线型" == m_propertyData[pProperty])
|
||||||
|
|
@ -187,7 +187,7 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
emit CallManage::getInstance()->sig_ChangeLineStyle(m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newStyle);
|
emit CallManage::getInstance()->sig_ChangeLineStyle(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName, newStyle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if("填充模式" == m_propertyData[pProperty])
|
else if("填充模式" == m_propertyData[pProperty])
|
||||||
|
|
@ -373,11 +373,11 @@ void PropertyWidget::ChangFillProperty()
|
||||||
//
|
//
|
||||||
if(newFillMode=="无填充")
|
if(newFillMode=="无填充")
|
||||||
{
|
{
|
||||||
emit CallManage::getInstance()->sig_ClearFillMode(m_strSlfName, m_strWellName, m_strTrackName, m_strLineName);
|
emit CallManage::getInstance()->sig_ClearFillMode(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName);
|
||||||
}
|
}
|
||||||
else //if(newFillMode=="填充")
|
else //if(newFillMode=="填充")
|
||||||
{
|
{
|
||||||
emit CallManage::getInstance()->sig_ChangeFillMode(m_strSlfName, m_strWellName, m_strTrackName, m_strLineName,
|
emit CallManage::getInstance()->sig_ChangeFillMode(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName,
|
||||||
newFillType, newTargetLine, newColor, newLithosImage, newHeadFill,
|
newFillType, newTargetLine, newColor, newLithosImage, newHeadFill,
|
||||||
vMin, vMax, frontColor, backColor, newFillMode);
|
vMin, vMax, frontColor, backColor, newFillMode);
|
||||||
}
|
}
|
||||||
|
|
@ -481,6 +481,7 @@ void PropertyWidget::initCurveProperty(FormInfo *formInfo, QStringList strListOt
|
||||||
{
|
{
|
||||||
//初始化,清空
|
//初始化,清空
|
||||||
InitCurrentViewInfo();
|
InitCurrentViewInfo();
|
||||||
|
m_strUuid = formInfo->m_strUuid;
|
||||||
|
|
||||||
QString strSlfName = formInfo->m_strSlfName;
|
QString strSlfName = formInfo->m_strSlfName;
|
||||||
QString strWellName = formInfo->m_strWellName;
|
QString strWellName = formInfo->m_strWellName;
|
||||||
|
|
|
||||||
|
|
@ -44,15 +44,11 @@ FormDraw::FormDraw(QWidget *parent, QString strWellName, QString strTrackName) :
|
||||||
m_strTrackName = strTrackName;
|
m_strTrackName = strTrackName;
|
||||||
|
|
||||||
|
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_AddLine(QString, QString, QString, QString)), this, SLOT(s_addLine(QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_AddLine(QString, QString, QString, QString, QString)), this, SLOT(s_addLine(QString, QString, QString, QString, QString)));
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_AddLine_Property(QString, QString, QString, QString, double, double, QColor, double, Qt::PenStyle)),
|
connect(CallManage::getInstance(), SIGNAL(sig_AddLine_Property(QString, QString, QString, QString, QString, double, double, QColor, double, Qt::PenStyle)),
|
||||||
this, SLOT(s_AddLine_Property(QString, QString, QString, QString, double, double, QColor, double, Qt::PenStyle)));
|
this, SLOT(s_AddLine_Property(QString, QString, QString, QString, QString, double, double, QColor, double, Qt::PenStyle)));
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_delLine(QString, QString, QString)), this, SLOT(s_delLine(QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_delLine(QString, QString, QString, QString)), this, SLOT(s_delLine(QString, QString, QString, QString)));
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_MouseMove(QString, QString, float)), this, SLOT(s_MouseMove(QString, QString, float)));
|
connect(CallManage::getInstance(), SIGNAL(sig_MouseMove(QString, QString, QString, float)), this, SLOT(s_MouseMove(QString, QString, QString, float)));
|
||||||
//connect(CallManage::getInstance(), SIGNAL(sig_addImageToPlot(QMyCustomPlot*, double, double, QString)), this, SLOT(s_addImageToPlot(QMyCustomPlot*, double, double, QString)));
|
|
||||||
|
|
||||||
//s_addLine(1);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FormDraw::~FormDraw()
|
FormDraw::~FormDraw()
|
||||||
|
|
@ -83,18 +79,17 @@ void FormDraw::paintEvent(QPaintEvent*)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void FormDraw::s_addLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
void FormDraw::s_addLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
||||||
{
|
{
|
||||||
qDebug() << "FormDraw s_addLine";
|
|
||||||
|
|
||||||
//井名&道名不一致
|
//井名&道名不一致
|
||||||
if(m_strWellName == strWellName && m_strTrackName == strTrackName)
|
if(strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
AppendConsole(PAI_INFO, "FormDraw s_addLine");
|
||||||
|
|
||||||
if(m_listLineName.contains(strLineName))
|
if(m_listLineName.contains(strLineName))
|
||||||
{
|
{
|
||||||
|
|
@ -104,6 +99,7 @@ void FormDraw::s_addLine(QString strSlfName, QString strWellName, QString strTra
|
||||||
|
|
||||||
//
|
//
|
||||||
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName);
|
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName);
|
||||||
|
curv->m_strUuid = m_strUuid;
|
||||||
//背景设置成透明色
|
//背景设置成透明色
|
||||||
curv->setBackground(Qt::transparent);
|
curv->setBackground(Qt::transparent);
|
||||||
curv->setStyleSheet("background: transparent;");
|
curv->setStyleSheet("background: transparent;");
|
||||||
|
|
@ -136,13 +132,12 @@ void FormDraw::s_addLine(QString strSlfName, QString strWellName, QString strTra
|
||||||
m_listLineName.push_back(strLineName);
|
m_listLineName.push_back(strLineName);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormDraw::s_AddLine_Property(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
void FormDraw::s_AddLine_Property(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||||
double newLeftScale, double newRightScale, QColor lineColor, double width, Qt::PenStyle lineStyle)
|
double newLeftScale, double newRightScale, QColor lineColor, double width, Qt::PenStyle lineStyle)
|
||||||
{
|
{
|
||||||
qDebug() << "FormDraw s_addLine";
|
|
||||||
|
|
||||||
//井名&道名不一致
|
//井名&道名不一致
|
||||||
if(m_strWellName == strWellName && m_strTrackName == strTrackName)
|
if(strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -150,6 +145,9 @@ void FormDraw::s_AddLine_Property(QString strSlfName, QString strWellName, QStri
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
qDebug() << "FormDraw s_AddLine_Property";
|
||||||
|
AppendConsole(PAI_INFO, "FormDraw s_AddLine_Property");
|
||||||
|
|
||||||
if(m_listLineName.contains(strLineName))
|
if(m_listLineName.contains(strLineName))
|
||||||
{
|
{
|
||||||
qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
||||||
|
|
@ -158,6 +156,7 @@ void FormDraw::s_AddLine_Property(QString strSlfName, QString strWellName, QStri
|
||||||
|
|
||||||
//
|
//
|
||||||
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName);
|
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName);
|
||||||
|
curv->m_strUuid = m_strUuid;
|
||||||
//背景设置成透明色
|
//背景设置成透明色
|
||||||
curv->setBackground(Qt::transparent);
|
curv->setBackground(Qt::transparent);
|
||||||
curv->setStyleSheet("background: transparent;");
|
curv->setStyleSheet("background: transparent;");
|
||||||
|
|
@ -183,27 +182,31 @@ void FormDraw::s_AddLine_Property(QString strSlfName, QString strWellName, QStri
|
||||||
// QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
// QSizePolicy policy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
// curv->setSizePolicy(policy);
|
// curv->setSizePolicy(policy);
|
||||||
|
|
||||||
|
AppendConsole(PAI_INFO, "FormDraw s_AddLine_Property 1");
|
||||||
|
curv->show();
|
||||||
|
AppendConsole(PAI_INFO, "FormDraw s_AddLine_Property 2");
|
||||||
|
|
||||||
initForm(curv, strSlfName, strLineName,
|
initForm(curv, strSlfName, strLineName,
|
||||||
newLeftScale, newRightScale, lineColor, width, lineStyle);
|
newLeftScale, newRightScale, lineColor, width, lineStyle);
|
||||||
curv->show();
|
|
||||||
|
|
||||||
//
|
//
|
||||||
m_listLineName.push_back(strLineName);
|
m_listLineName.push_back(strLineName);
|
||||||
|
|
||||||
|
AppendConsole(PAI_INFO, "FormDraw s_AddLine_Property end");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void FormDraw::s_delLine(QString strWellName, QString strTrackName, QString strLineName)
|
void FormDraw::s_delLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName)
|
||||||
{
|
{
|
||||||
qDebug() << "FormDraw s_delLine";
|
|
||||||
|
|
||||||
//井名&道名不一致
|
//井名&道名不一致
|
||||||
if(m_strWellName == strWellName && m_strTrackName == strTrackName)
|
if(strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
qDebug() << "FormDraw s_delLine";
|
||||||
|
|
||||||
if(m_listLineName.contains(strLineName))
|
if(m_listLineName.contains(strLineName))
|
||||||
{
|
{
|
||||||
|
|
@ -238,18 +241,17 @@ void FormDraw::s_delLine(QString strWellName, QString strTrackName, QString strL
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormDraw::s_MouseMove(QString strWellName, QString strTrackName, float dep)
|
void FormDraw::s_MouseMove(QString strUuid, QString strWellName, QString strTrackName, float dep)
|
||||||
{
|
{
|
||||||
qDebug() << "FormDraw s_MouseMove";
|
|
||||||
|
|
||||||
//井名&道名不一致
|
//井名&道名不一致
|
||||||
if(m_strWellName == strWellName && m_strTrackName == strTrackName)
|
if(strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
qDebug() << "FormDraw s_MouseMove";
|
||||||
|
|
||||||
//
|
//
|
||||||
QString sss=" depth:"+QString::number(dep);
|
QString sss=" depth:"+QString::number(dep);
|
||||||
|
|
@ -291,85 +293,6 @@ void FormDraw::s_MouseMove(QString strWellName, QString strTrackName, float dep)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormDraw::s_addImageToPlot(QMyCustomPlot* customPlot, double left_Low, double right_Hight, const QString imagePath)
|
|
||||||
{
|
|
||||||
//井名&道名不一致
|
|
||||||
if(this->isActiveWindow() //当前活动窗口
|
|
||||||
&& m_strWellName == customPlot->m_strWellName
|
|
||||||
&& m_strTrackName == customPlot->m_strTrackName
|
|
||||||
&& m_listLineName.contains(customPlot->m_strLineName))
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 在初始化代码中
|
|
||||||
TransparentDraggableRect *dragRect = new TransparentDraggableRect(customPlot);
|
|
||||||
|
|
||||||
// 设置初始范围
|
|
||||||
//bool bFoundRange = false;
|
|
||||||
//QCPRange keyrange = customPlot->graph(0)->getKeyRange(bFoundRange);
|
|
||||||
//dragRect->setRange((keyrange.lower+keyrange.upper)*1/4.0, (keyrange.lower+keyrange.upper)*3/4.0);
|
|
||||||
dragRect->setRange(left_Low, right_Hight);
|
|
||||||
|
|
||||||
// 可选:设置颜色
|
|
||||||
dragRect->setColor(QColor(255, 100, 100, 80)); // 半透明红色
|
|
||||||
//最小宽度
|
|
||||||
dragRect->setMinWidth(5);
|
|
||||||
// 可选:设置标题
|
|
||||||
//dragRect->setTitle("标题111");
|
|
||||||
// 连接范围变化信号
|
|
||||||
// connect(dragRect, &TransparentDraggableRect::rangeChanged,
|
|
||||||
// this, &FormDraw::s_handleRectRangeChange);
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------
|
|
||||||
/*// 初始化坐标轴范围
|
|
||||||
customPlot->xAxis->setRange(-180, 180);
|
|
||||||
customPlot->yAxis->setRange(-90, 90);
|
|
||||||
|
|
||||||
// 创建图片项
|
|
||||||
DraggablePixmap *imageItem = new DraggablePixmap(customPlot);
|
|
||||||
//QCPItemPixmap *imageItem = new QCPItemPixmap(customPlot);
|
|
||||||
imageItem->setPixmap(QPixmap(imagePath));
|
|
||||||
imageItem->setScaled(true, Qt::KeepAspectRatio);
|
|
||||||
|
|
||||||
// 设置锚点为中心,并定位到经纬度 (116.4, 39.9)
|
|
||||||
double lon = 116.4, lat = 39.9;
|
|
||||||
double imageWidth = 20.0; // 图片覆盖的经度范围(单位与坐标轴一致)
|
|
||||||
double imageHeight = 20.0; // 图片覆盖的纬度范围
|
|
||||||
|
|
||||||
imageItem->topLeft->setCoords(lon - imageWidth/2, lat + imageHeight/2);
|
|
||||||
imageItem->bottomRight->setCoords(lon + imageWidth/2, lat - imageHeight/2);
|
|
||||||
*/
|
|
||||||
|
|
||||||
//-------------------------------
|
|
||||||
|
|
||||||
/*QCPItemPixmap *pixmapItem = new QCPItemPixmap(customPlot); // 创建可拖拽的项
|
|
||||||
pixmapItem->setPixmap(QPixmap(imagePath)); // 设置图片
|
|
||||||
pixmapItem->setScaled(true, Qt::KeepAspectRatioByExpanding); // 设置缩放方式
|
|
||||||
//customPlot->addItem(pixmapItem); // 将项添加到plot中
|
|
||||||
|
|
||||||
pixmapItem->topLeft->setCoords(-409.5, 304.554);
|
|
||||||
//pixmapItem->bottomRight->setCoords(100, 200);*/
|
|
||||||
|
|
||||||
// // 创建一个新的 pixmap 对象并加载指定路径的图片
|
|
||||||
// QPixmap pixmap(imagePath);
|
|
||||||
// // 添加一个自定义的 pixmap 到 plot 上
|
|
||||||
// QCPItemPixmap *itemPixmap = new QCPItemPixmap(customPlot);
|
|
||||||
// // 设置 pixmap 属性
|
|
||||||
// itemPixmap->setPixmap(pixmap); // 加载图片
|
|
||||||
// itemPixmap->position("")->setTypeX(QCPItemPosition::ptAxisRectRatio); // X 坐标基于轴比例设置
|
|
||||||
// itemPixmap->position("")->setTypeY(QCPItemPosition::ptAxisRectRatio); // Y 坐标基于轴比例设置
|
|
||||||
|
|
||||||
// // 定义图片的位置 (左下角为原点)
|
|
||||||
// itemPixmap->position("")->setValueType(QCPItemPosition::vtAbsolute);
|
|
||||||
// itemPixmap->position("")->setCoords(0, 0); // 放置在坐标系的左下角
|
|
||||||
}
|
|
||||||
|
|
||||||
void FormDraw::s_handleRectRangeChange(QCPRange newRange)
|
void FormDraw::s_handleRectRangeChange(QCPRange newRange)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -531,6 +454,8 @@ void FormDraw::s_selectionRectAccepted(const QRect &rect, QMouseEvent *event)
|
||||||
void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLineName,
|
void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLineName,
|
||||||
double newLeftScale, double newRightScale, QColor lineColor, double width, Qt::PenStyle lineStyle)
|
double newLeftScale, double newRightScale, QColor lineColor, double width, Qt::PenStyle lineStyle)
|
||||||
{
|
{
|
||||||
|
AppendConsole(PAI_INFO, "FormDraw initForm");
|
||||||
|
|
||||||
CLogIO *logio=new CLogIO();
|
CLogIO *logio=new CLogIO();
|
||||||
logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead);
|
logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead);
|
||||||
int index=logio->OpenCurve(strLineName.toStdString().c_str());
|
int index=logio->OpenCurve(strLineName.toStdString().c_str());
|
||||||
|
|
@ -585,6 +510,7 @@ void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLi
|
||||||
//赋值
|
//赋值
|
||||||
m_vmax = vmax;
|
m_vmax = vmax;
|
||||||
m_vmin = vmin;
|
m_vmin = vmin;
|
||||||
|
AppendConsole(PAI_INFO, "FormDraw initForm ReadCurve end");
|
||||||
|
|
||||||
widget->setInteractions(QCP::iSelectLegend | QCP::iSelectPlottables);
|
widget->setInteractions(QCP::iSelectLegend | QCP::iSelectPlottables);
|
||||||
|
|
||||||
|
|
@ -651,15 +577,19 @@ void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLi
|
||||||
}
|
}
|
||||||
|
|
||||||
//支持框选
|
//支持框选
|
||||||
setupSelectionDemo(widget);
|
//setupSelectionDemo(widget);
|
||||||
|
AppendConsole(PAI_INFO, "FormDraw setupSelectionDemo end");
|
||||||
|
|
||||||
//widget->rescaleAxes();
|
//widget->rescaleAxes();
|
||||||
widget->replot();
|
//widget->replot();//屏蔽,缩减时间
|
||||||
|
AppendConsole(PAI_INFO, "FormDraw initForm end");
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormDraw::addRandomGraph(QMyCustomPlot *widget, QVector<double> x, QVector<double> y, QString strSlfName, QString strLineName,
|
void FormDraw::addRandomGraph(QMyCustomPlot *widget, QVector<double> x, QVector<double> y, QString strSlfName, QString strLineName,
|
||||||
double newLeftScale, double newRightScale, QColor newlineColor, double width, Qt::PenStyle lineStyle)
|
double newLeftScale, double newRightScale, QColor newlineColor, double width, Qt::PenStyle lineStyle)
|
||||||
{
|
{
|
||||||
|
AppendConsole(PAI_INFO, "FormDraw addRandomGraph");
|
||||||
|
|
||||||
widget->addGraph();
|
widget->addGraph();
|
||||||
if(strLineName=="")
|
if(strLineName=="")
|
||||||
{
|
{
|
||||||
|
|
@ -707,7 +637,7 @@ void FormDraw::addRandomGraph(QMyCustomPlot *widget, QVector<double> x, QVector<
|
||||||
}
|
}
|
||||||
//道-对象
|
//道-对象
|
||||||
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, newlineColor, width, m_vmax, m_vmin);
|
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, newlineColor, width, m_vmax, m_vmin);
|
||||||
|
AppendConsole(PAI_INFO, "FormDraw addRandomGraph end");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -760,7 +690,7 @@ void FormDraw::dropEvent(QDropEvent* event)
|
||||||
if(m_strWellName == strWellName)
|
if(m_strWellName == strWellName)
|
||||||
{
|
{
|
||||||
//新建曲线
|
//新建曲线
|
||||||
emit CallManage::getInstance()->sig_AddLine(strSlfName, strWellName, m_strTrackName, strLineName);
|
emit CallManage::getInstance()->sig_AddLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||||
|
|
||||||
// 接受拖拽事件
|
// 接受拖拽事件
|
||||||
event->setDropAction(Qt::MoveAction);
|
event->setDropAction(Qt::MoveAction);
|
||||||
|
|
|
||||||
|
|
@ -60,16 +60,14 @@ signals:
|
||||||
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void s_addLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
void s_addLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||||
void s_AddLine_Property(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
void s_AddLine_Property(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||||
double newLeftScale, double newRightScale, QColor lineColor, double width, Qt::PenStyle lineStyle);//新建曲线,带属性
|
double newLeftScale, double newRightScale, QColor lineColor, double width, Qt::PenStyle lineStyle);//新建曲线,带属性
|
||||||
|
|
||||||
void s_delLine(QString strWellName, QString strTrackName, QString strLineName);
|
void s_delLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName);
|
||||||
void s_MouseMove(QString strWellName, QString strTrackName, float dep);
|
void s_MouseMove(QString strUuid, QString strWellName, QString strTrackName, float dep);
|
||||||
void s_handleRectRangeChange(QCPRange newRange);
|
void s_handleRectRangeChange(QCPRange newRange);
|
||||||
void s_selectionRectAccepted(const QRect &rect, QMouseEvent *event);
|
void s_selectionRectAccepted(const QRect &rect, QMouseEvent *event);
|
||||||
//
|
|
||||||
void s_addImageToPlot(QMyCustomPlot* customPlot, double left_Low, double right_Hight, QString imagePath);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FORMDRAW_H
|
#endif // FORMDRAW_H
|
||||||
|
|
|
||||||
|
|
@ -36,23 +36,23 @@ FormInfo::FormInfo(QWidget *parent, QString strSlfName, QString strWellName, QSt
|
||||||
// setAttribute(Qt::WA_TranslucentBackground);
|
// setAttribute(Qt::WA_TranslucentBackground);
|
||||||
|
|
||||||
//左刻度
|
//左刻度
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLeftScale(QString, QString, QString, QString, double)), this, SLOT(s_ChangeLeftScale(QString, QString, QString, QString, double)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLeftScale(QString, QString, QString, QString, QString, double)), this, SLOT(s_ChangeLeftScale(QString, QString, QString, QString, QString, double)));
|
||||||
//右刻度
|
//右刻度
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeRightScale(QString, QString, QString, QString, double)), this, SLOT(s_ChangeRightScale(QString, QString, QString, QString, double)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeRightScale(QString, QString, QString, QString, QString, double)), this, SLOT(s_ChangeRightScale(QString, QString, QString, QString, QString, double)));
|
||||||
//刻度类型
|
//刻度类型
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeScaleType(QString, QString, QString, QString, QString)), this, SLOT(s_ChangeScaleType(QString, QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeScaleType(QString, QString, QString, QString, QString, QString)), this, SLOT(s_ChangeScaleType(QString, QString, QString, QString, QString, QString)));
|
||||||
|
|
||||||
//颜色
|
//颜色
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineColor(QString, QString, QString, QString, QColor)), this, SLOT(s_ChangeLineColor(QString, QString, QString, QString, QColor)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineColor(QString, QString, QString, QString, QString, QColor)), this, SLOT(s_ChangeLineColor(QString, QString, QString, QString, QString, QColor)));
|
||||||
//线宽
|
//线宽
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineWidth(QString, QString, QString, QString, double)), this, SLOT(s_ChangeLineWidth(QString, QString, QString, QString, double)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineWidth(QString, QString, QString, QString, QString, double)), this, SLOT(s_ChangeLineWidth(QString, QString, QString, QString, QString, double)));
|
||||||
//线型
|
//线型
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineStyle(QString, QString, QString, QString, Qt::PenStyle)), this, SLOT(s_ChangeLineStyle(QString, QString, QString, QString, Qt::PenStyle)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineStyle(QString, QString, QString, QString, QString, Qt::PenStyle)), this, SLOT(s_ChangeLineStyle(QString, QString, QString, QString, QString, Qt::PenStyle)));
|
||||||
//岩性填充-不填充
|
//岩性填充-不填充
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ClearFillMode(QString, QString, QString, QString)), this, SLOT(s_ClearFillMode(QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ClearFillMode(QString, QString, QString, QString, QString)), this, SLOT(s_ClearFillMode(QString, QString, QString, QString, QString)));
|
||||||
//岩性填充-填充
|
//岩性填充-填充
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeFillMode(QString, QString, QString, QString, QString, QString, QColor, QString, QString, float, float, QColor, QColor, QString)),
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeFillMode(QString, QString, QString, QString, QString, QString, QString, QColor, QString, QString, float, float, QColor, QColor, QString)),
|
||||||
this, SLOT(s_ChangeFillMode(QString, QString, QString, QString, QString, QString, QColor, QString, QString, float, float, QColor, QColor, QString)));
|
this, SLOT(s_ChangeFillMode(QString, QString, QString, QString, QString, QString, QString, QColor, QString, QString, float, float, QColor, QColor, QString)));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -205,7 +205,7 @@ void FormInfo::dropEvent(QDropEvent* event)
|
||||||
if(m_strWellName == strWellName)
|
if(m_strWellName == strWellName)
|
||||||
{
|
{
|
||||||
//新建曲线
|
//新建曲线
|
||||||
emit CallManage::getInstance()->sig_AddLine(strSlfName, strWellName, m_strTrackName, strLineName);
|
emit CallManage::getInstance()->sig_AddLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||||
|
|
||||||
// 接受拖拽事件
|
// 接受拖拽事件
|
||||||
event->setDropAction(Qt::MoveAction);
|
event->setDropAction(Qt::MoveAction);
|
||||||
|
|
@ -297,9 +297,10 @@ QColor FormInfo::getBackColor()
|
||||||
}
|
}
|
||||||
|
|
||||||
//属性-左刻度
|
//属性-左刻度
|
||||||
void FormInfo::s_ChangeLeftScale(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newLeftScale)
|
void FormInfo::s_ChangeLeftScale(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newLeftScale)
|
||||||
{
|
{
|
||||||
if(m_strSlfName == strSlfName &&
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_strLineName == strLineName)
|
m_strLineName == strLineName)
|
||||||
|
|
@ -310,9 +311,10 @@ void FormInfo::s_ChangeLeftScale(QString strSlfName, QString strWellName, QStrin
|
||||||
}
|
}
|
||||||
|
|
||||||
//属性-右刻度
|
//属性-右刻度
|
||||||
void FormInfo::s_ChangeRightScale(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newRightScale)
|
void FormInfo::s_ChangeRightScale(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newRightScale)
|
||||||
{
|
{
|
||||||
if(m_strSlfName == strSlfName &&
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_strLineName == strLineName)
|
m_strLineName == strLineName)
|
||||||
|
|
@ -323,9 +325,10 @@ void FormInfo::s_ChangeRightScale(QString strSlfName, QString strWellName, QStri
|
||||||
}
|
}
|
||||||
|
|
||||||
//属性-刻度类型
|
//属性-刻度类型
|
||||||
void FormInfo::s_ChangeScaleType(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strScaleType)
|
void FormInfo::s_ChangeScaleType(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strScaleType)
|
||||||
{
|
{
|
||||||
if(m_strSlfName == strSlfName &&
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_strLineName == strLineName)
|
m_strLineName == strLineName)
|
||||||
|
|
@ -335,9 +338,10 @@ void FormInfo::s_ChangeScaleType(QString strSlfName, QString strWellName, QStrin
|
||||||
}
|
}
|
||||||
|
|
||||||
//属性-颜色
|
//属性-颜色
|
||||||
void FormInfo::s_ChangeLineColor(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor)
|
void FormInfo::s_ChangeLineColor(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor)
|
||||||
{
|
{
|
||||||
if(m_strSlfName == strSlfName &&
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_strLineName == strLineName)
|
m_strLineName == strLineName)
|
||||||
|
|
@ -348,9 +352,10 @@ void FormInfo::s_ChangeLineColor(QString strSlfName, QString strWellName, QStrin
|
||||||
}
|
}
|
||||||
|
|
||||||
//属性-线宽
|
//属性-线宽
|
||||||
void FormInfo::s_ChangeLineWidth(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double width)
|
void FormInfo::s_ChangeLineWidth(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double width)
|
||||||
{
|
{
|
||||||
if(m_strSlfName == strSlfName &&
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_strLineName == strLineName)
|
m_strLineName == strLineName)
|
||||||
|
|
@ -361,9 +366,10 @@ void FormInfo::s_ChangeLineWidth(QString strSlfName, QString strWellName, QStrin
|
||||||
}
|
}
|
||||||
|
|
||||||
//属性-线型
|
//属性-线型
|
||||||
void FormInfo::s_ChangeLineStyle(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, Qt::PenStyle lineStyle)
|
void FormInfo::s_ChangeLineStyle(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, Qt::PenStyle lineStyle)
|
||||||
{
|
{
|
||||||
if(m_strSlfName == strSlfName &&
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_strLineName == strLineName)
|
m_strLineName == strLineName)
|
||||||
|
|
@ -374,9 +380,10 @@ void FormInfo::s_ChangeLineStyle(QString strSlfName, QString strWellName, QStrin
|
||||||
}
|
}
|
||||||
|
|
||||||
//岩性填充-不填充
|
//岩性填充-不填充
|
||||||
void FormInfo::s_ClearFillMode(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
void FormInfo::s_ClearFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
||||||
{
|
{
|
||||||
if(m_strSlfName == strSlfName &&
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_strLineName == strLineName)
|
m_strLineName == strLineName)
|
||||||
|
|
@ -387,11 +394,12 @@ void FormInfo::s_ClearFillMode(QString strSlfName, QString strWellName, QString
|
||||||
}
|
}
|
||||||
|
|
||||||
//岩性填充-填充
|
//岩性填充-填充
|
||||||
void FormInfo::s_ChangeFillMode(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
void FormInfo::s_ChangeFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||||
QString newFillType, QString newTargetLine, QColor newColor, QString newLithosImage, QString newHeadFill,
|
QString newFillType, QString newTargetLine, QColor newColor, QString newLithosImage, QString newHeadFill,
|
||||||
float vMin, float vMax, QColor frontColor, QColor backColor, QString newFillMode)
|
float vMin, float vMax, QColor frontColor, QColor backColor, QString newFillMode)
|
||||||
{
|
{
|
||||||
if(m_strSlfName == strSlfName &&
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_strLineName == strLineName)
|
m_strLineName == strLineName)
|
||||||
|
|
|
||||||
|
|
@ -35,22 +35,22 @@ public slots:
|
||||||
void dropEvent(QDropEvent* event);
|
void dropEvent(QDropEvent* event);
|
||||||
//属性
|
//属性
|
||||||
//左刻度
|
//左刻度
|
||||||
void s_ChangeLeftScale(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newLeftScale);
|
void s_ChangeLeftScale(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newLeftScale);
|
||||||
//右刻度
|
//右刻度
|
||||||
void s_ChangeRightScale(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newRightScale);
|
void s_ChangeRightScale(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newRightScale);
|
||||||
//刻度类型
|
//刻度类型
|
||||||
void s_ChangeScaleType(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strScaleType);
|
void s_ChangeScaleType(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strScaleType);
|
||||||
|
|
||||||
//线颜色
|
//线颜色
|
||||||
void s_ChangeLineColor(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor);
|
void s_ChangeLineColor(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor);
|
||||||
//线宽
|
//线宽
|
||||||
void s_ChangeLineWidth(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double width);
|
void s_ChangeLineWidth(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double width);
|
||||||
//线型
|
//线型
|
||||||
void s_ChangeLineStyle(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, Qt::PenStyle lineStyle);
|
void s_ChangeLineStyle(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, Qt::PenStyle lineStyle);
|
||||||
//岩性填充-不填充
|
//岩性填充-不填充
|
||||||
void s_ClearFillMode(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
void s_ClearFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||||
//岩性填充-填充
|
//岩性填充-填充
|
||||||
void s_ChangeFillMode(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
void s_ChangeFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||||
QString newFillType, QString newTargetLine, QColor newColor, QString newLithosImage, QString newHeadFill,
|
QString newFillType, QString newTargetLine, QColor newColor, QString newLithosImage, QString newHeadFill,
|
||||||
float vMin, float vMax, QColor frontColor, QColor backColor, QString newFillMode);
|
float vMin, float vMax, QColor frontColor, QColor backColor, QString newFillMode);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,11 +50,13 @@ void FormTrack::s_addLine(QString strSlfName, QString strWellName, QString strTr
|
||||||
{
|
{
|
||||||
qDebug() << "FormTrack s_addLine";
|
qDebug() << "FormTrack s_addLine";
|
||||||
|
|
||||||
|
ui->tableWidget->m_strUuid = m_strUuid;
|
||||||
int row = ui->tableWidget->rowCount();
|
int row = ui->tableWidget->rowCount();
|
||||||
ui->tableWidget->setRowCount(row + 1);
|
ui->tableWidget->setRowCount(row + 1);
|
||||||
|
|
||||||
//曲线信息栏
|
//曲线信息栏
|
||||||
FormInfo *formInfo = new FormInfo(this, strSlfName, strWellName, strTrackName, strLineName, lineColor);
|
FormInfo *formInfo = new FormInfo(this, strSlfName, strWellName, strTrackName, strLineName, lineColor);
|
||||||
|
formInfo->m_strUuid = m_strUuid;
|
||||||
formInfo->setLineWidth(dWidth);
|
formInfo->setLineWidth(dWidth);
|
||||||
formInfo->setVMax(vmax);
|
formInfo->setVMax(vmax);
|
||||||
formInfo->setVMin(vmin);
|
formInfo->setVMin(vmin);
|
||||||
|
|
|
||||||
|
|
@ -25,9 +25,9 @@ FormWell::FormWell(QWidget *parent, QString strWellName) :
|
||||||
ui->tableWidget->horizontalHeader()->setFixedHeight(3);
|
ui->tableWidget->horizontalHeader()->setFixedHeight(3);
|
||||||
|
|
||||||
//关联信号槽
|
//关联信号槽
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_NewTrack(QString, QString, QString)), this, SLOT(s_NewTrack(QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_NewTrack(QString, QString, QString, QString)), this, SLOT(s_NewTrack(QString, QString, QString, QString)));
|
||||||
//关联信号槽
|
//关联信号槽
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_NewTrack_No_Line(QString, QString)), this, SLOT(s_NewTrack_No_Line(QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_NewTrack_No_Line(QString, QString, QString)), this, SLOT(s_NewTrack_No_Line(QString, QString, QString)));
|
||||||
|
|
||||||
//s_NewTrack(m_strWellName);
|
//s_NewTrack(m_strWellName);
|
||||||
}
|
}
|
||||||
|
|
@ -37,10 +37,10 @@ FormWell::~FormWell()
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormWell::s_NewTrack(QString strWellName, QString strSlfName, QString strLineName)
|
void FormWell::s_NewTrack(QString strUuid, QString strWellName, QString strSlfName, QString strLineName)
|
||||||
{
|
{
|
||||||
//判断当前井是否与自己同名
|
//判断当前井是否与自己同名
|
||||||
if(strWellName != m_strWellName)
|
if(strUuid != m_strUuid || strWellName != m_strWellName)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -61,9 +61,11 @@ void FormWell::s_NewTrack(QString strWellName, QString strSlfName, QString strLi
|
||||||
|
|
||||||
//曲线名称栏
|
//曲线名称栏
|
||||||
FormTrack *formTrack = new FormTrack(this, m_strWellName, strTrackName);
|
FormTrack *formTrack = new FormTrack(this, m_strWellName, strTrackName);
|
||||||
|
formTrack->m_strUuid = m_strUuid;
|
||||||
formTrack->show();
|
formTrack->show();
|
||||||
//曲线绘制栏
|
//曲线绘制栏
|
||||||
FormDraw *formDraw = new FormDraw(this, m_strWellName, strTrackName);
|
FormDraw *formDraw = new FormDraw(this, m_strWellName, strTrackName);
|
||||||
|
formDraw->m_strUuid = m_strUuid;
|
||||||
formDraw->m_formTrack = formTrack;
|
formDraw->m_formTrack = formTrack;
|
||||||
//
|
//
|
||||||
for(int i=0; i<rowcount; i++)
|
for(int i=0; i<rowcount; i++)
|
||||||
|
|
@ -105,7 +107,7 @@ void FormWell::s_NewTrack(QString strWellName, QString strSlfName, QString strLi
|
||||||
if(strLineName!="")
|
if(strLineName!="")
|
||||||
{
|
{
|
||||||
//新建曲线
|
//新建曲线
|
||||||
emit CallManage::getInstance()->sig_AddLine(strSlfName, strWellName, strTrackName, strLineName);
|
emit CallManage::getInstance()->sig_AddLine(m_strUuid, strSlfName, strWellName, strTrackName, strLineName);
|
||||||
}
|
}
|
||||||
|
|
||||||
//ui->tableWidget->resizeColumnsToContents(); // 调整列宽以适应内容
|
//ui->tableWidget->resizeColumnsToContents(); // 调整列宽以适应内容
|
||||||
|
|
@ -116,10 +118,10 @@ void FormWell::s_NewTrack(QString strWellName, QString strSlfName, QString strLi
|
||||||
// connect(ui->tableWidget_2, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slotContextMenu(QPoint)));
|
// connect(ui->tableWidget_2, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slotContextMenu(QPoint)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormWell::s_NewTrack_No_Line(QString strWellName, QString strTrackName)
|
void FormWell::s_NewTrack_No_Line(QString strUuid, QString strWellName, QString strTrackName)
|
||||||
{
|
{
|
||||||
//判断当前井是否与自己同名
|
//判断当前井是否与自己同名
|
||||||
if(strWellName != m_strWellName)
|
if(strUuid != m_strUuid || strWellName != m_strWellName)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -138,9 +140,11 @@ void FormWell::s_NewTrack_No_Line(QString strWellName, QString strTrackName)
|
||||||
|
|
||||||
//曲线名称栏
|
//曲线名称栏
|
||||||
FormTrack *formTrack = new FormTrack(this, m_strWellName, strTrackName);
|
FormTrack *formTrack = new FormTrack(this, m_strWellName, strTrackName);
|
||||||
|
formTrack->m_strUuid = m_strUuid;
|
||||||
formTrack->show();
|
formTrack->show();
|
||||||
//曲线绘制栏
|
//曲线绘制栏
|
||||||
FormDraw *formDraw = new FormDraw(this, m_strWellName, strTrackName);
|
FormDraw *formDraw = new FormDraw(this, m_strWellName, strTrackName);
|
||||||
|
formDraw->m_strUuid = m_strUuid;
|
||||||
formDraw->m_formTrack = formTrack;
|
formDraw->m_formTrack = formTrack;
|
||||||
//
|
//
|
||||||
for(int i=0; i<rowcount; i++)
|
for(int i=0; i<rowcount; i++)
|
||||||
|
|
|
||||||
|
|
@ -30,9 +30,9 @@ public:
|
||||||
QJsonObject makeJson();
|
QJsonObject makeJson();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void s_NewTrack(QString strWellName, QString strSlfName, QString strLineName);
|
void s_NewTrack(QString strUuid, QString strWellName, QString strSlfName, QString strLineName);
|
||||||
//新建空白道,没有曲线
|
//新建空白道,没有曲线
|
||||||
void s_NewTrack_No_Line(QString strWellName, QString strTrackName);
|
void s_NewTrack_No_Line(QString strUuid, QString strWellName, QString strTrackName);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FORMWELL_H
|
#endif // FORMWELL_H
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ int g_iY1 = -3000;
|
||||||
int g_iY2 = 0;
|
int g_iY2 = 0;
|
||||||
int g_iCanZoom = 0;
|
int g_iCanZoom = 0;
|
||||||
|
|
||||||
int g_iScale = 3000;
|
int g_iScale = 300;
|
||||||
QString g_prjname="";
|
QString g_prjname="";
|
||||||
|
|
||||||
MainWindow::MainWindow(QWidget *parent) :
|
MainWindow::MainWindow(QWidget *parent) :
|
||||||
|
|
@ -370,23 +370,27 @@ void MainWindow::s_showView()
|
||||||
//----
|
//----
|
||||||
MainWindowCurve *mainWindowCurve = new MainWindowCurve();//中间工作区
|
MainWindowCurve *mainWindowCurve = new MainWindowCurve();//中间工作区
|
||||||
m_centerWidgets->addTab(mainWindowCurve, fileName);
|
m_centerWidgets->addTab(mainWindowCurve, fileName);
|
||||||
|
mainWindowCurve->Open(fileFull);
|
||||||
//mainWindowCurve->s_Open(fileFull);
|
|
||||||
|
|
||||||
//QFuture<void> future = QtConcurrent::run(std::bind(&MainWindowCurve::s_Open, mainWindowCurve, fileFull));
|
//QFuture<void> future = QtConcurrent::run(std::bind(&MainWindowCurve::s_Open, mainWindowCurve, fileFull));
|
||||||
//mainWindowCurve->Open(fileFull);
|
//mainWindowCurve->Open(fileFull);
|
||||||
|
|
||||||
// 创建 FileSearchThread 实例
|
// 创建 FileSearchThread 实例
|
||||||
FileOpenThread *searchThread = new FileOpenThread(fileFull);
|
// FileOpenThread *searchThread = new FileOpenThread(fileFull);
|
||||||
connect(searchThread, &FileOpenThread::sig_NewWell, mainWindowCurve, &MainWindowCurve::s_NewWell, Qt::BlockingQueuedConnection);
|
// connect(searchThread, &FileOpenThread::sig_NewWell, mainWindowCurve, &MainWindowCurve::s_NewWell, Qt::BlockingQueuedConnection);
|
||||||
connect(searchThread, &FileOpenThread::sig_NewTrackChangeWidth, mainWindowCurve, &MainWindowCurve::s_NewTrackChangeWidth, Qt::BlockingQueuedConnection);
|
// connect(searchThread, &FileOpenThread::sig_NewTrackChangeWidth, mainWindowCurve, &MainWindowCurve::s_NewTrackChangeWidth, Qt::BlockingQueuedConnection);
|
||||||
connect(searchThread, &FileOpenThread::sig_NewTrack_No_Line, mainWindowCurve, &MainWindowCurve::s_NewTrack_No_Line, Qt::BlockingQueuedConnection);
|
// connect(searchThread, &FileOpenThread::sig_NewTrack_No_Line, mainWindowCurve, &MainWindowCurve::s_NewTrack_No_Line, Qt::BlockingQueuedConnection);
|
||||||
connect(searchThread, &FileOpenThread::sig_AddLine_Property, mainWindowCurve, &MainWindowCurve::s_AddLine_Property, Qt::BlockingQueuedConnection);
|
// connect(searchThread, &FileOpenThread::sig_AddLine_Property, mainWindowCurve, &MainWindowCurve::s_AddLine_Property, Qt::BlockingQueuedConnection);
|
||||||
|
// // 启动搜索线程
|
||||||
|
// searchThread->start();
|
||||||
|
|
||||||
//connect(searchThread, SIGNAL(sig_NewTrackChangeWidth(QString)), mainWindowCurve, SLOT(s_NewTrackChangeWidth(QString)), Qt::BlockingQueuedConnection);
|
// // 创建 FileSearchThread 实例
|
||||||
//connect(searchThread, SIGNAL(sig_NewWell(QString)), mainWindowCurve, SLOT(s_NewWell(QString)), Qt::BlockingQueuedConnection);
|
// FileOpenThread *searchThread = new FileOpenThread(fileFull);
|
||||||
// 启动搜索线程
|
// connect(searchThread, &FileOpenThread::sig_NewWell, mainWindowCurve, &MainWindowCurve::s_NewWell);//, Qt::BlockingQueuedConnection);
|
||||||
searchThread->start();
|
// connect(searchThread, &FileOpenThread::sig_NewTrackChangeWidth, mainWindowCurve, &MainWindowCurve::s_NewTrackChangeWidth);//, Qt::BlockingQueuedConnection);
|
||||||
|
// connect(searchThread, &FileOpenThread::sig_NewTrack_No_Line, mainWindowCurve, &MainWindowCurve::s_NewTrack_No_Line);//, Qt::BlockingQueuedConnection);
|
||||||
|
// connect(searchThread, &FileOpenThread::sig_AddLine_Property, mainWindowCurve, &MainWindowCurve::s_AddLine_Property);//, Qt::BlockingQueuedConnection);
|
||||||
|
// searchThread->Open(fileFull);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::s_Risize()
|
void MainWindow::s_Risize()
|
||||||
|
|
|
||||||
|
|
@ -251,10 +251,10 @@ void MainWindowCurve::s_Save()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindowCurve::s_Open(QString fileFull)
|
//void MainWindowCurve::s_Open(QString fileFull)
|
||||||
{
|
//{
|
||||||
|
|
||||||
}
|
//}
|
||||||
|
|
||||||
//显示/隐藏图头
|
//显示/隐藏图头
|
||||||
void MainWindowCurve::s_showHeadTable()
|
void MainWindowCurve::s_showHeadTable()
|
||||||
|
|
@ -404,7 +404,7 @@ void MainWindowCurve::s_NewTrack()
|
||||||
|
|
||||||
QString strWellName = ui->tableWidget_2->item(0, column)->text();
|
QString strWellName = ui->tableWidget_2->item(0, column)->text();
|
||||||
//新建道
|
//新建道
|
||||||
emit CallManage::getInstance()->sig_NewTrack(strWellName, "", "");
|
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, strWellName, "", "");
|
||||||
|
|
||||||
int iWidth = ui->tableWidget_2->columnWidth(column);
|
int iWidth = ui->tableWidget_2->columnWidth(column);
|
||||||
//设置列宽
|
//设置列宽
|
||||||
|
|
@ -440,14 +440,14 @@ void MainWindowCurve::s_NewTrackChangeWidth(QString strWellName)
|
||||||
//新建空白道,没有曲线
|
//新建空白道,没有曲线
|
||||||
void MainWindowCurve::s_NewTrack_No_Line(QString strWellName, QString strTrackName)
|
void MainWindowCurve::s_NewTrack_No_Line(QString strWellName, QString strTrackName)
|
||||||
{
|
{
|
||||||
emit CallManage::getInstance()->sig_NewTrack_No_Line(strWellName, strTrackName);
|
emit CallManage::getInstance()->sig_NewTrack_No_Line(m_strUuid, strWellName, strTrackName);
|
||||||
}
|
}
|
||||||
|
|
||||||
//新建曲线,带属性
|
//新建曲线,带属性
|
||||||
void MainWindowCurve::s_AddLine_Property(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
void MainWindowCurve::s_AddLine_Property(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||||
double newLeftScale, double newRightScale, QColor lineColor, double width, Qt::PenStyle lineStyle)
|
double newLeftScale, double newRightScale, QColor lineColor, double width, Qt::PenStyle lineStyle)
|
||||||
{
|
{
|
||||||
emit CallManage::getInstance()->sig_AddLine_Property(strSlfName, strWellName, strTrackName, strLineName,
|
emit CallManage::getInstance()->sig_AddLine_Property(m_strUuid, strSlfName, strWellName, strTrackName, strLineName,
|
||||||
newLeftScale, newRightScale, lineColor, width, lineStyle);
|
newLeftScale, newRightScale, lineColor, width, lineStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -459,7 +459,7 @@ void MainWindowCurve::NewWellAndTrack(QString strWellName, QString strSlfName, Q
|
||||||
{
|
{
|
||||||
//不在道里,新建道+曲线
|
//不在道里,新建道+曲线
|
||||||
//新建道+曲线
|
//新建道+曲线
|
||||||
emit CallManage::getInstance()->sig_NewTrack(strWellName, strSlfName, strLineName);
|
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, strWellName, strSlfName, strLineName);
|
||||||
//改变井宽
|
//改变井宽
|
||||||
emit sig_NewTrackChangeWidth(strWellName);
|
emit sig_NewTrackChangeWidth(strWellName);
|
||||||
}
|
}
|
||||||
|
|
@ -471,7 +471,7 @@ void MainWindowCurve::NewWellAndTrack(QString strWellName, QString strSlfName, Q
|
||||||
m_listWell.push_back(strWellName);
|
m_listWell.push_back(strWellName);
|
||||||
|
|
||||||
//新建道+曲线
|
//新建道+曲线
|
||||||
emit CallManage::getInstance()->sig_NewTrack(strWellName, strSlfName, strLineName);
|
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, strWellName, strSlfName, strLineName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -831,3 +831,403 @@ void MainWindowCurve::onPasteExcelData()
|
||||||
}
|
}
|
||||||
table->setUpdatesEnabled(true);
|
table->setUpdatesEnabled(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void MainWindowCurve::Open(QString fileFull)
|
||||||
|
{
|
||||||
|
QString strPrjname = "";
|
||||||
|
QJsonArray wellsArray;
|
||||||
|
|
||||||
|
QJsonParseError jsonError;
|
||||||
|
// 文件
|
||||||
|
QFile file(fileFull);
|
||||||
|
if(file.open(QIODevice::ReadOnly))
|
||||||
|
{
|
||||||
|
// 解析JSON
|
||||||
|
QJsonDocument document = QJsonDocument::fromJson(file.readAll(), &jsonError);
|
||||||
|
if (!document.isNull() && (jsonError.error == QJsonParseError::NoError))
|
||||||
|
{
|
||||||
|
if (document.isObject())
|
||||||
|
{
|
||||||
|
QJsonObject object = document.object();
|
||||||
|
//
|
||||||
|
if (object.contains("prjname"))
|
||||||
|
{
|
||||||
|
QJsonValue value = object.value("prjname");
|
||||||
|
if (value.isString()) {
|
||||||
|
strPrjname = value.toString();
|
||||||
|
qDebug() << "prjname:" << strPrjname;
|
||||||
|
|
||||||
|
if(strPrjname != g_prjname)
|
||||||
|
{
|
||||||
|
file.close();
|
||||||
|
qDebug() << "JSON 模板文件项目名称与当前项目不一致!";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (object.contains("wells"))
|
||||||
|
{
|
||||||
|
QJsonValue value = object.value("wells");
|
||||||
|
if (value.isArray()) {
|
||||||
|
wellsArray = value.toArray();
|
||||||
|
qDebug() << "wellsArray number:" << QString::number(wellsArray.size());
|
||||||
|
//展示所有井
|
||||||
|
DisplayWells(wellsArray);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
file.close();
|
||||||
|
qDebug() << "JSON 模板文件读取成功!";
|
||||||
|
} else {
|
||||||
|
qWarning() << "JSON 模板文件打开失败:" << file.errorString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindowCurve::DisplayWells(QJsonArray wellsArray)
|
||||||
|
{
|
||||||
|
QMap<int, int> mapWells;
|
||||||
|
|
||||||
|
int id = 0;
|
||||||
|
int iCount = wellsArray.size();
|
||||||
|
for(int i=0; i<iCount; i++)
|
||||||
|
{
|
||||||
|
QJsonValue wellValue = wellsArray[i];
|
||||||
|
|
||||||
|
QJsonObject wellObj = wellValue.toObject();
|
||||||
|
//
|
||||||
|
if (wellObj.contains("id"))
|
||||||
|
{
|
||||||
|
QJsonValue value = wellObj.value("id");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
id = value.toInt();
|
||||||
|
qDebug() << "id:" << QString::number(id);
|
||||||
|
//
|
||||||
|
mapWells.insert(id, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int id=0; id<iCount; id++)
|
||||||
|
{
|
||||||
|
if(mapWells.contains(id*2))
|
||||||
|
{
|
||||||
|
int iNum = mapWells.value(id*2);
|
||||||
|
//按照id顺序,展示井
|
||||||
|
QJsonValue wellValue = wellsArray[iNum];
|
||||||
|
QJsonObject wellObj = wellValue.toObject();
|
||||||
|
//
|
||||||
|
if (wellObj.contains("info"))
|
||||||
|
{
|
||||||
|
QJsonValue value = wellObj.value("info");
|
||||||
|
if (value.isObject()) {
|
||||||
|
QJsonObject wellObjInfo = value.toObject();
|
||||||
|
//展示其中一口井
|
||||||
|
DisplayWell_One(wellObjInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//展示其中一口井
|
||||||
|
void MainWindowCurve::DisplayWell_One(QJsonObject wellObjInfo)
|
||||||
|
{
|
||||||
|
QString strWellName = "";
|
||||||
|
QJsonArray tracksArray;
|
||||||
|
|
||||||
|
if (wellObjInfo.contains("WellName"))
|
||||||
|
{
|
||||||
|
QJsonValue value = wellObjInfo.value("WellName");
|
||||||
|
if (value.isString()) {
|
||||||
|
strWellName = value.toString();
|
||||||
|
qDebug() << "WellName:" << strWellName;
|
||||||
|
|
||||||
|
//新建井
|
||||||
|
//mainWindowCurve->s_NewWell(strWellName);
|
||||||
|
s_NewWell(strWellName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (wellObjInfo.contains("formTracks"))
|
||||||
|
{
|
||||||
|
QJsonValue value = wellObjInfo.value("formTracks");
|
||||||
|
if (value.isArray()) {
|
||||||
|
tracksArray = value.toArray();
|
||||||
|
qDebug() << "tracksArray number:" << QString::number(tracksArray.size());
|
||||||
|
//展示所有道
|
||||||
|
DisplayTracks(tracksArray);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//展示所有道
|
||||||
|
void MainWindowCurve::DisplayTracks(QJsonArray tracksArray)
|
||||||
|
{
|
||||||
|
QMap<int, int> mapTracks;
|
||||||
|
|
||||||
|
int id = 0;
|
||||||
|
int iCount = tracksArray.size();
|
||||||
|
for(int i=0; i<iCount; i++)
|
||||||
|
{
|
||||||
|
QJsonValue trackValue = tracksArray[i];
|
||||||
|
|
||||||
|
QJsonObject trackObj = trackValue.toObject();
|
||||||
|
//
|
||||||
|
if (trackObj.contains("id"))
|
||||||
|
{
|
||||||
|
QJsonValue value = trackObj.value("id");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
id = value.toInt();
|
||||||
|
qDebug() << "id:" << QString::number(id);
|
||||||
|
//
|
||||||
|
mapTracks.insert(id, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int id=0; id<iCount; id++)
|
||||||
|
{
|
||||||
|
if(mapTracks.contains(id))
|
||||||
|
{
|
||||||
|
int iNum = mapTracks.value(id);
|
||||||
|
//按照id顺序,展示道
|
||||||
|
QJsonValue trackValue = tracksArray[iNum];
|
||||||
|
QJsonObject trackObj = trackValue.toObject();
|
||||||
|
//
|
||||||
|
if (trackObj.contains("info"))
|
||||||
|
{
|
||||||
|
QJsonValue value = trackObj.value("info");
|
||||||
|
if (value.isObject()) {
|
||||||
|
QJsonObject trackObjInfo = value.toObject();
|
||||||
|
//展示其中一道
|
||||||
|
DisplayTrack_One(trackObjInfo, id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//展示其中一道
|
||||||
|
void MainWindowCurve::DisplayTrack_One(QJsonObject trackObjInfo, int id)
|
||||||
|
{
|
||||||
|
QString strWellName = "";
|
||||||
|
QString strTrackName = "";
|
||||||
|
QJsonArray linesArray;
|
||||||
|
|
||||||
|
if (trackObjInfo.contains("WellName"))
|
||||||
|
{
|
||||||
|
QJsonValue value = trackObjInfo.value("WellName");
|
||||||
|
if (value.isString()) {
|
||||||
|
strWellName = value.toString();
|
||||||
|
qDebug() << "WellName:" << strWellName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (trackObjInfo.contains("TrackName"))
|
||||||
|
{
|
||||||
|
QJsonValue value = trackObjInfo.value("TrackName");
|
||||||
|
if (value.isString()) {
|
||||||
|
strTrackName = value.toString();
|
||||||
|
qDebug() << "TrackName:" << strTrackName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//新建道+曲线
|
||||||
|
s_NewTrack_No_Line(strWellName, strTrackName);//新建空白道,没有曲线
|
||||||
|
if(id>0)
|
||||||
|
{
|
||||||
|
//改变井宽
|
||||||
|
s_NewTrackChangeWidth(strWellName);
|
||||||
|
//mainWindowCurve->s_NewTrackChangeWidth(strWellName);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (trackObjInfo.contains("formInfos"))
|
||||||
|
{
|
||||||
|
QJsonValue value = trackObjInfo.value("formInfos");
|
||||||
|
if (value.isArray()) {
|
||||||
|
linesArray = value.toArray();
|
||||||
|
qDebug() << "linesArray number:" << QString::number(linesArray.size());
|
||||||
|
//展示所有曲线
|
||||||
|
DisplayLines(linesArray);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//展示所有曲线
|
||||||
|
void MainWindowCurve::DisplayLines(QJsonArray linesArray)
|
||||||
|
{
|
||||||
|
QMap<int, int> mapLines;
|
||||||
|
|
||||||
|
int id = 0;
|
||||||
|
int iCount = linesArray.size();
|
||||||
|
for(int i=0; i<iCount; i++)
|
||||||
|
{
|
||||||
|
QJsonValue lineValue = linesArray[i];
|
||||||
|
|
||||||
|
QJsonObject lineObj = lineValue.toObject();
|
||||||
|
//
|
||||||
|
if (lineObj.contains("id"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObj.value("id");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
id = value.toInt();
|
||||||
|
qDebug() << "id:" << QString::number(id);
|
||||||
|
//
|
||||||
|
mapLines.insert(id, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for(int id=0; id<iCount; id++)
|
||||||
|
{
|
||||||
|
if(mapLines.contains(id))
|
||||||
|
{
|
||||||
|
int iNum = mapLines.value(id);
|
||||||
|
//按照id顺序,展示曲线
|
||||||
|
QJsonValue lineValue = linesArray[iNum];
|
||||||
|
QJsonObject lineObj = lineValue.toObject();
|
||||||
|
//
|
||||||
|
if (lineObj.contains("info"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObj.value("info");
|
||||||
|
if (value.isObject()) {
|
||||||
|
QJsonObject lineObjInfo = value.toObject();
|
||||||
|
//展示其中一条曲线
|
||||||
|
DisplayLine_One(lineObjInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//展示其中一条曲线
|
||||||
|
void MainWindowCurve::DisplayLine_One(QJsonObject lineObjInfo)
|
||||||
|
{
|
||||||
|
QString strSlfName = "";
|
||||||
|
QString strWellName = "";
|
||||||
|
QString strTrackName = "";
|
||||||
|
QString strLineName = "";
|
||||||
|
double newLeftScale = 0;
|
||||||
|
double newRightScale = 500;
|
||||||
|
QColor lineColor = QColor(0,0,0);
|
||||||
|
double width = 3;
|
||||||
|
Qt::PenStyle lineStyle = Qt::SolidLine;
|
||||||
|
|
||||||
|
if (lineObjInfo.contains("SlfName"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("SlfName");
|
||||||
|
if (value.isString()) {
|
||||||
|
strSlfName = value.toString();
|
||||||
|
qDebug() << "SlfName:" << strSlfName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("WellName"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("WellName");
|
||||||
|
if (value.isString()) {
|
||||||
|
strWellName = value.toString();
|
||||||
|
qDebug() << "WellName:" << strWellName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("TrackName"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("TrackName");
|
||||||
|
if (value.isString()) {
|
||||||
|
strTrackName = value.toString();
|
||||||
|
qDebug() << "TrackName:" << strTrackName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("LineName"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("LineName");
|
||||||
|
if (value.isString()) {
|
||||||
|
strLineName = value.toString();
|
||||||
|
qDebug() << "LineName:" << strLineName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lineObjInfo.contains("vmin"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("vmin");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
newLeftScale = value.toDouble();
|
||||||
|
qDebug() << "vmin:" << QString::number(newLeftScale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("vmax"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("vmax");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
newRightScale = value.toDouble();
|
||||||
|
qDebug() << "vmax:" << QString::number(newRightScale);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("Width"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("Width");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
width = value.toDouble();
|
||||||
|
qDebug() << "Width:" << QString::number(width);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lineObjInfo.contains("lineStyle"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("lineStyle");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
lineStyle = (Qt::PenStyle)value.toInt();
|
||||||
|
qDebug() << "lineStyle:" << QString::number(lineStyle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
if (lineObjInfo.contains("lineColorRed"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("lineColorRed");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
lineColor.setRed(value.toInt());
|
||||||
|
qDebug() << "lineColorRed:" << QString::number(value.toInt());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
if (lineObjInfo.contains("lineColorGreen"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("lineColorGreen");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
lineColor.setGreen(value.toInt());
|
||||||
|
qDebug() << "lineColorGreen:" << QString::number(value.toInt());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
if (lineObjInfo.contains("lineColorBlue"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("lineColorBlue");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
lineColor.setBlue(value.toInt());
|
||||||
|
qDebug() << "lineColorBlue:" << QString::number(value.toInt());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
if (lineObjInfo.contains("lineColorAlpha"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("lineColorAlpha");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
lineColor.setAlpha(value.toInt());
|
||||||
|
qDebug() << "lineColorAlpha:" << QString::number(value.toInt());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(strLineName!="")
|
||||||
|
{
|
||||||
|
//新建曲线
|
||||||
|
s_AddLine_Property(strSlfName, strWellName, strTrackName, strLineName,
|
||||||
|
newLeftScale, newRightScale, lineColor, width, lineStyle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,21 @@ public:
|
||||||
QString m_strUuid;
|
QString m_strUuid;
|
||||||
QStringList m_listWell;
|
QStringList m_listWell;
|
||||||
|
|
||||||
|
public:
|
||||||
|
//展示所有井
|
||||||
|
void DisplayWells(QJsonArray wellsArray);
|
||||||
|
//展示其中一口井
|
||||||
|
void DisplayWell_One(QJsonObject wellObjInfo);
|
||||||
|
//展示所有道
|
||||||
|
void DisplayTracks(QJsonArray tracksArray);
|
||||||
|
//展示其中一道
|
||||||
|
void DisplayTrack_One(QJsonObject trackObjInfo, int id);
|
||||||
|
//展示所有曲线
|
||||||
|
void DisplayLines(QJsonArray linesArray);
|
||||||
|
//展示其中一条曲线
|
||||||
|
void DisplayLine_One(QJsonObject lineObjInfo);
|
||||||
|
|
||||||
|
void Open(QString fileFull);//打开
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//样式
|
//样式
|
||||||
|
|
@ -72,7 +87,7 @@ public slots:
|
||||||
void s_NewTrack();//新建道
|
void s_NewTrack();//新建道
|
||||||
//
|
//
|
||||||
void s_Save();//保存
|
void s_Save();//保存
|
||||||
void s_Open(QString fileFull);//打开
|
//void s_Open(QString fileFull);//打开
|
||||||
|
|
||||||
|
|
||||||
void s_showHeadTable();//显示/隐藏图头
|
void s_showHeadTable();//显示/隐藏图头
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ void PreQTableWidget::dropEvent(QDropEvent *event)
|
||||||
{
|
{
|
||||||
m_AddSuc = true;
|
m_AddSuc = true;
|
||||||
//新建曲线
|
//新建曲线
|
||||||
emit CallManage::getInstance()->sig_AddLine(strSlfName, strWellName, m_strTrackName, strLineName);
|
emit CallManage::getInstance()->sig_AddLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||||
|
|
||||||
//
|
//
|
||||||
//m_listLineName.push_back(strLineName);
|
//m_listLineName.push_back(strLineName);
|
||||||
|
|
@ -162,7 +162,7 @@ void PreQTableWidget::dropEvent(QDropEvent *event)
|
||||||
{
|
{
|
||||||
m_AddSuc = true;
|
m_AddSuc = true;
|
||||||
//新建曲线
|
//新建曲线
|
||||||
emit CallManage::getInstance()->sig_AddLine(strSlfName, strWellName, m_strTrackName, strLineName);
|
emit CallManage::getInstance()->sig_AddLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||||
|
|
||||||
//
|
//
|
||||||
//m_listLineName.push_back(strLineName);
|
//m_listLineName.push_back(strLineName);
|
||||||
|
|
@ -211,7 +211,7 @@ void PreQTableWidget::performDrag()
|
||||||
// 处理拖拽结束的逻辑,例如从界面上移除拖拽的项
|
// 处理拖拽结束的逻辑,例如从界面上移除拖拽的项
|
||||||
removeRow(iCurrentRow);
|
removeRow(iCurrentRow);
|
||||||
//删除曲线
|
//删除曲线
|
||||||
emit CallManage::getInstance()->sig_delLine(formInfo->m_strWellName, formInfo->m_strTrackName, formInfo->m_strLineName);
|
emit CallManage::getInstance()->sig_delLine(m_strUuid, formInfo->m_strWellName, formInfo->m_strTrackName, formInfo->m_strLineName);
|
||||||
//
|
//
|
||||||
//m_listLineName.removeOne(formInfo->m_strLineName);
|
//m_listLineName.removeOne(formInfo->m_strLineName);
|
||||||
}
|
}
|
||||||
|
|
@ -259,7 +259,7 @@ void PreQTableWidget::mouseReleaseEvent(QMouseEvent *event)
|
||||||
PropertyService()->initCurveProperty(formInfo, strListOtherLine, listMin, listMax);
|
PropertyService()->initCurveProperty(formInfo, strListOtherLine, listMin, listMax);
|
||||||
|
|
||||||
//曲线置顶显示,激活可选
|
//曲线置顶显示,激活可选
|
||||||
emit CallManage::getInstance()->sig_Raise(formInfo->m_strSlfName, formInfo->m_strWellName, formInfo->m_strTrackName, formInfo->m_strLineName);
|
emit CallManage::getInstance()->sig_Raise(m_strUuid, formInfo->m_strSlfName, formInfo->m_strWellName, formInfo->m_strTrackName, formInfo->m_strLineName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,24 +27,24 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
|
||||||
|
|
||||||
//关联信号槽
|
//关联信号槽
|
||||||
//左刻度
|
//左刻度
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLeftScale(QString, QString, QString, QString, double)), this, SLOT(s_ChangeLeftScale(QString, QString, QString, QString, double)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLeftScale(QString, QString, QString, QString, QString, double)), this, SLOT(s_ChangeLeftScale(QString, QString, QString, QString, QString, double)));
|
||||||
//右刻度
|
//右刻度
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeRightScale(QString, QString, QString, QString, double)), this, SLOT(s_ChangeRightScale(QString, QString, QString, QString, double)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeRightScale(QString, QString, QString, QString, QString, double)), this, SLOT(s_ChangeRightScale(QString, QString, QString, QString, QString, double)));
|
||||||
//刻度类型
|
//刻度类型
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeScaleType(QString, QString, QString, QString, QString)), this, SLOT(s_ChangeScaleType(QString, QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeScaleType(QString, QString, QString, QString, QString, QString)), this, SLOT(s_ChangeScaleType(QString, QString, QString, QString, QString, QString)));
|
||||||
|
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_Raise(QString, QString, QString, QString)), this, SLOT(s_Raise(QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_Raise(QString, QString, QString, QString, QString)), this, SLOT(s_Raise(QString, QString, QString, QString, QString)));
|
||||||
//颜色
|
//颜色
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineColor(QString, QString, QString, QString, QColor)), this, SLOT(s_ChangeLineColor(QString, QString, QString, QString, QColor)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineColor(QString, QString, QString, QString, QString, QColor)), this, SLOT(s_ChangeLineColor(QString, QString, QString, QString, QString, QColor)));
|
||||||
//线宽
|
//线宽
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineWidth(QString, QString, QString, QString, double)), this, SLOT(s_ChangeLineWidth(QString, QString, QString, QString, double)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineWidth(QString, QString, QString, QString, QString, double)), this, SLOT(s_ChangeLineWidth(QString, QString, QString, QString, QString, double)));
|
||||||
//线型
|
//线型
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineStyle(QString, QString, QString, QString, Qt::PenStyle)), this, SLOT(s_ChangeLineStyle(QString, QString, QString, QString, Qt::PenStyle)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLineStyle(QString, QString, QString, QString, QString, Qt::PenStyle)), this, SLOT(s_ChangeLineStyle(QString, QString, QString, QString, QString, Qt::PenStyle)));
|
||||||
//岩性填充-不填充
|
//岩性填充-不填充
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ClearFillMode(QString, QString, QString, QString)), this, SLOT(s_ClearFillMode(QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ClearFillMode(QString, QString, QString, QString, QString)), this, SLOT(s_ClearFillMode(QString, QString, QString, QString, QString)));
|
||||||
//岩性填充-填充
|
//岩性填充-填充
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeFillMode(QString, QString, QString, QString, QString, QString, QColor, QString, QString, float, float, QColor, QColor, QString)),
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeFillMode(QString, QString, QString, QString, QString, QString, QString, QColor, QString, QString, float, float, QColor, QColor, QString)),
|
||||||
this, SLOT(s_ChangeFillMode(QString, QString, QString, QString, QString, QString, QColor, QString, QString, float, float, QColor, QColor, QString)));
|
this, SLOT(s_ChangeFillMode(QString, QString, QString, QString, QString, QString, QString, QColor, QString, QString, float, float, QColor, QColor, QString)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -162,9 +162,10 @@ void QMyCustomPlot::removeSelectedGraphByTitle()
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
void QMyCustomPlot::s_Raise(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
void QMyCustomPlot::s_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
||||||
{
|
{
|
||||||
if(m_strSlfName == strSlfName &&
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_strLineName == strLineName)
|
m_strLineName == strLineName)
|
||||||
|
|
@ -174,9 +175,10 @@ void QMyCustomPlot::s_Raise(QString strSlfName, QString strWellName, QString str
|
||||||
}
|
}
|
||||||
|
|
||||||
//属性-左刻度
|
//属性-左刻度
|
||||||
void QMyCustomPlot::s_ChangeLeftScale(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newLeftScale)
|
void QMyCustomPlot::s_ChangeLeftScale(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newLeftScale)
|
||||||
{
|
{
|
||||||
if(m_strSlfName == strSlfName &&
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_strLineName == strLineName)
|
m_strLineName == strLineName)
|
||||||
|
|
@ -186,22 +188,24 @@ void QMyCustomPlot::s_ChangeLeftScale(QString strSlfName, QString strWellName, Q
|
||||||
//
|
//
|
||||||
replot();
|
replot();
|
||||||
}
|
}
|
||||||
else if(m_strSlfName == strSlfName &&
|
else if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_newTargetLine == strLineName)
|
m_newTargetLine == strLineName)
|
||||||
{
|
{
|
||||||
//其他曲线
|
//其他曲线
|
||||||
s_ChangeFillMode(m_strSlfName, m_strWellName, m_strTrackName, m_strLineName,
|
s_ChangeFillMode(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName,
|
||||||
m_newFillType, m_newTargetLine, m_newColor, m_newLithosImage, m_newHeadFill,
|
m_newFillType, m_newTargetLine, m_newColor, m_newLithosImage, m_newHeadFill,
|
||||||
newLeftScale, m_vMax, m_frontColor, m_backColor, m_newFillMode);
|
newLeftScale, m_vMax, m_frontColor, m_backColor, m_newFillMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//属性-右刻度
|
//属性-右刻度
|
||||||
void QMyCustomPlot::s_ChangeRightScale(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newRightScale)
|
void QMyCustomPlot::s_ChangeRightScale(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newRightScale)
|
||||||
{
|
{
|
||||||
if(m_strSlfName == strSlfName &&
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_strLineName == strLineName)
|
m_strLineName == strLineName)
|
||||||
|
|
@ -211,22 +215,24 @@ void QMyCustomPlot::s_ChangeRightScale(QString strSlfName, QString strWellName,
|
||||||
//
|
//
|
||||||
replot();
|
replot();
|
||||||
}
|
}
|
||||||
else if(m_strSlfName == strSlfName &&
|
else if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_newTargetLine == strLineName)
|
m_newTargetLine == strLineName)
|
||||||
{
|
{
|
||||||
//其他曲线
|
//其他曲线
|
||||||
s_ChangeFillMode(m_strSlfName, m_strWellName, m_strTrackName, m_strLineName,
|
s_ChangeFillMode(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, m_strLineName,
|
||||||
m_newFillType, m_newTargetLine, m_newColor, m_newLithosImage, m_newHeadFill,
|
m_newFillType, m_newTargetLine, m_newColor, m_newLithosImage, m_newHeadFill,
|
||||||
m_vMin, newRightScale, m_frontColor, m_backColor, m_newFillMode);
|
m_vMin, newRightScale, m_frontColor, m_backColor, m_newFillMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//属性-刻度类型
|
//属性-刻度类型
|
||||||
void QMyCustomPlot::s_ChangeScaleType(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strScaleType)
|
void QMyCustomPlot::s_ChangeScaleType(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strScaleType)
|
||||||
{
|
{
|
||||||
if(m_strSlfName == strSlfName &&
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_strLineName == strLineName)
|
m_strLineName == strLineName)
|
||||||
|
|
@ -244,7 +250,8 @@ void QMyCustomPlot::s_ChangeScaleType(QString strSlfName, QString strWellName, Q
|
||||||
//
|
//
|
||||||
replot();
|
replot();
|
||||||
}
|
}
|
||||||
else if(m_strSlfName == strSlfName &&
|
else if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_newTargetLine == strLineName)
|
m_newTargetLine == strLineName)
|
||||||
|
|
@ -257,9 +264,10 @@ void QMyCustomPlot::s_ChangeScaleType(QString strSlfName, QString strWellName, Q
|
||||||
}
|
}
|
||||||
|
|
||||||
//属性-颜色
|
//属性-颜色
|
||||||
void QMyCustomPlot::s_ChangeLineColor(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor)
|
void QMyCustomPlot::s_ChangeLineColor(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor)
|
||||||
{
|
{
|
||||||
if(m_strSlfName == strSlfName &&
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_strLineName == strLineName)
|
m_strLineName == strLineName)
|
||||||
|
|
@ -273,9 +281,10 @@ void QMyCustomPlot::s_ChangeLineColor(QString strSlfName, QString strWellName, Q
|
||||||
}
|
}
|
||||||
|
|
||||||
//属性-线宽
|
//属性-线宽
|
||||||
void QMyCustomPlot::s_ChangeLineWidth(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double width)
|
void QMyCustomPlot::s_ChangeLineWidth(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double width)
|
||||||
{
|
{
|
||||||
if(m_strSlfName == strSlfName &&
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_strLineName == strLineName)
|
m_strLineName == strLineName)
|
||||||
|
|
@ -289,9 +298,10 @@ void QMyCustomPlot::s_ChangeLineWidth(QString strSlfName, QString strWellName, Q
|
||||||
}
|
}
|
||||||
|
|
||||||
//属性-线型
|
//属性-线型
|
||||||
void QMyCustomPlot::s_ChangeLineStyle(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, Qt::PenStyle lineStyle)
|
void QMyCustomPlot::s_ChangeLineStyle(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, Qt::PenStyle lineStyle)
|
||||||
{
|
{
|
||||||
if(m_strSlfName == strSlfName &&
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_strLineName == strLineName)
|
m_strLineName == strLineName)
|
||||||
|
|
@ -305,9 +315,10 @@ void QMyCustomPlot::s_ChangeLineStyle(QString strSlfName, QString strWellName, Q
|
||||||
}
|
}
|
||||||
|
|
||||||
//岩性填充-不填充
|
//岩性填充-不填充
|
||||||
void QMyCustomPlot::s_ClearFillMode(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
void QMyCustomPlot::s_ClearFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName)
|
||||||
{
|
{
|
||||||
if(m_strSlfName == strSlfName &&
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_strLineName == strLineName)
|
m_strLineName == strLineName)
|
||||||
|
|
@ -324,12 +335,13 @@ void QMyCustomPlot::s_ClearFillMode(QString strSlfName, QString strWellName, QSt
|
||||||
}
|
}
|
||||||
|
|
||||||
//岩性填充-填充
|
//岩性填充-填充
|
||||||
void QMyCustomPlot::s_ChangeFillMode(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||||
QString newFillType, QString newTargetLine, QColor newColor, QString newLithosImage, QString newHeadFill,
|
QString newFillType, QString newTargetLine, QColor newColor, QString newLithosImage, QString newHeadFill,
|
||||||
float vMin, float vMax, QColor frontColor, QColor backColor, QString newFillMode)
|
float vMin, float vMax, QColor frontColor, QColor backColor, QString newFillMode)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(m_strSlfName == strSlfName &&
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
m_strWellName == strWellName &&
|
m_strWellName == strWellName &&
|
||||||
m_strTrackName == strTrackName &&
|
m_strTrackName == strTrackName &&
|
||||||
m_strLineName == strLineName)
|
m_strLineName == strLineName)
|
||||||
|
|
@ -774,7 +786,7 @@ void QMyCustomPlot::mouseMoveEvent(QMouseEvent *event)
|
||||||
//float x_val = yAxis->pixelToCoord(x_pos);
|
//float x_val = yAxis->pixelToCoord(x_pos);
|
||||||
float y_val = xAxis->pixelToCoord(y_pos);
|
float y_val = xAxis->pixelToCoord(y_pos);
|
||||||
|
|
||||||
emit CallManage::getInstance()->sig_MouseMove(m_strWellName, m_strTrackName, 0-y_val);
|
emit CallManage::getInstance()->sig_MouseMove(m_strUuid, m_strWellName, m_strTrackName, 0-y_val);
|
||||||
|
|
||||||
QCustomPlot::mouseMoveEvent(event);
|
QCustomPlot::mouseMoveEvent(event);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,26 +57,26 @@ public slots:
|
||||||
void removeSelectedGraph();
|
void removeSelectedGraph();
|
||||||
void removeSelectedGraphByTitle();
|
void removeSelectedGraphByTitle();
|
||||||
|
|
||||||
void s_Raise(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
void s_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||||
|
|
||||||
//属性
|
//属性
|
||||||
//左刻度
|
//左刻度
|
||||||
void s_ChangeLeftScale(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newLeftScale);
|
void s_ChangeLeftScale(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newLeftScale);
|
||||||
//右刻度
|
//右刻度
|
||||||
void s_ChangeRightScale(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newRightScale);
|
void s_ChangeRightScale(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double newRightScale);
|
||||||
//刻度类型
|
//刻度类型
|
||||||
void s_ChangeScaleType(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strScaleType);
|
void s_ChangeScaleType(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strScaleType);
|
||||||
|
|
||||||
//线颜色
|
//线颜色
|
||||||
void s_ChangeLineColor(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor);
|
void s_ChangeLineColor(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor);
|
||||||
//线宽
|
//线宽
|
||||||
void s_ChangeLineWidth(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double width);
|
void s_ChangeLineWidth(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, double width);
|
||||||
//线型
|
//线型
|
||||||
void s_ChangeLineStyle(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, Qt::PenStyle lineStyle);
|
void s_ChangeLineStyle(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, Qt::PenStyle lineStyle);
|
||||||
//岩性填充-不填充
|
//岩性填充-不填充
|
||||||
void s_ClearFillMode(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
void s_ClearFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||||
//岩性填充-填充
|
//岩性填充-填充
|
||||||
void s_ChangeFillMode(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
void s_ChangeFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||||
QString newFillType, QString newTargetLine, QColor newColor, QString newLithosImage, QString newHeadFill,
|
QString newFillType, QString newTargetLine, QColor newColor, QString newLithosImage, QString newHeadFill,
|
||||||
float vMin, float vMax, QColor frontColor, QColor backColor, QString newFillMode);
|
float vMin, float vMax, QColor frontColor, QColor backColor, QString newFillMode);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user