岩心分析属性
This commit is contained in:
parent
82c261e8c3
commit
770c07bd97
|
|
@ -183,7 +183,7 @@ signals:
|
||||||
void sig_changeDepthProperty(QVariantList vlist);
|
void sig_changeDepthProperty(QVariantList vlist);
|
||||||
|
|
||||||
//改变岩心分析
|
//改变岩心分析
|
||||||
void sig_changeCorePhysicsProperty(QVariantList vlist);
|
void sig_changeCorePhysicsProperty(QVariantMap vlist);
|
||||||
|
|
||||||
//右键--添加分段线
|
//右键--添加分段线
|
||||||
void sig_AddShiftLine(QString strUuid, double left_Low, double right_Hight);
|
void sig_AddShiftLine(QString strUuid, double left_Low, double right_Hight);
|
||||||
|
|
|
||||||
|
|
@ -296,22 +296,25 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV
|
||||||
{
|
{
|
||||||
int temp = variant.toInt();
|
int temp = variant.toInt();
|
||||||
this->m_formInfo->m_cp_lineWidth = temp;
|
this->m_formInfo->m_cp_lineWidth = temp;
|
||||||
this->m_tdCorePhysics->setCpLineWidth(temp);
|
|
||||||
|
|
||||||
QVariantList listCond;
|
QVariantMap variantMap;
|
||||||
// emit CallManage::getInstance()->sig_changeCorePhysicsProperty(listCond);
|
variantMap["lineWidth"] = temp;
|
||||||
|
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
|
||||||
}
|
}
|
||||||
else if("颜色" == m_propertyData[qtProperty])
|
else if("颜色" == m_propertyData[qtProperty])
|
||||||
{
|
{
|
||||||
QColor temp = variant.value<QColor>();
|
QColor temp = variant.value<QColor>();
|
||||||
this->m_formInfo->m_cp_lineColor = temp;
|
this->m_formInfo->m_cp_lineColor = temp;
|
||||||
this->m_tdCorePhysics->setCpLineColor(temp);
|
|
||||||
|
QVariantMap variantMap;
|
||||||
|
variantMap["lineColor"] = temp;
|
||||||
|
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
|
||||||
}
|
}
|
||||||
else if("线型" == m_propertyData[qtProperty])
|
else if("线型" == m_propertyData[qtProperty])
|
||||||
{
|
{
|
||||||
|
int temp = variant.value<int>();
|
||||||
Qt::PenStyle newStyle = Qt::SolidLine;
|
Qt::PenStyle newStyle = Qt::SolidLine;
|
||||||
int iStyle = variant.value<int>();
|
switch(temp)
|
||||||
switch(iStyle)
|
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
//无
|
//无
|
||||||
|
|
@ -341,43 +344,62 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
this->m_formInfo->m_cp_lineStyle = newStyle;
|
this->m_formInfo->m_cp_lineStyle = newStyle;
|
||||||
this->m_tdCorePhysics->setCpLineStyle(newStyle);
|
|
||||||
|
QVariantMap variantMap;
|
||||||
|
variantMap["lineStyle"] = temp;
|
||||||
|
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
|
||||||
}
|
}
|
||||||
else if("杆状" == m_propertyData[qtProperty])
|
else if("杆状" == m_propertyData[qtProperty])
|
||||||
{
|
{
|
||||||
bool temp = variant.toBool();
|
bool temp = variant.toBool();
|
||||||
this->m_formInfo->m_cp_drawAsBar = temp;
|
this->m_formInfo->m_cp_drawAsBar = temp;
|
||||||
this->m_tdCorePhysics->setCpDrawAsBar(temp);
|
|
||||||
|
QVariantMap variantMap;
|
||||||
|
variantMap["drawAsBar"] = temp;
|
||||||
|
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
|
||||||
}
|
}
|
||||||
else if("左界" == m_propertyData[qtProperty])
|
else if("左界" == m_propertyData[qtProperty])
|
||||||
{
|
{
|
||||||
bool temp = variant.toBool();
|
bool temp = variant.toBool();
|
||||||
this->m_formInfo->m_cp_leftBoundary = temp;
|
this->m_formInfo->m_cp_leftBoundary = temp;
|
||||||
this->m_tdCorePhysics->setCpLeftBoundary(temp);
|
|
||||||
|
QVariantMap variantMap;
|
||||||
|
variantMap["leftBoundary"] = temp;
|
||||||
|
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
|
||||||
}
|
}
|
||||||
else if("不绘零等无效值" == m_propertyData[qtProperty])
|
else if("不绘零等无效值" == m_propertyData[qtProperty])
|
||||||
{
|
{
|
||||||
bool temp = variant.toBool();
|
bool temp = variant.toBool();
|
||||||
this->m_formInfo->m_cp_skipZeroInvalidValues = temp;
|
this->m_formInfo->m_cp_skipZeroInvalidValues = temp;
|
||||||
this->m_tdCorePhysics->setCpSkipZeroInvalidValues(temp);
|
|
||||||
|
QVariantMap variantMap;
|
||||||
|
variantMap["skipZeroInvalidValues"] = temp;
|
||||||
|
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
|
||||||
}
|
}
|
||||||
else if("绘制包络线" == m_propertyData[qtProperty])
|
else if("绘制包络线" == m_propertyData[qtProperty])
|
||||||
{
|
{
|
||||||
bool temp = variant.toBool();
|
bool temp = variant.toBool();
|
||||||
this->m_formInfo->m_cp_drawEnvelope = temp;
|
this->m_formInfo->m_cp_drawEnvelope = temp;
|
||||||
this->m_tdCorePhysics->setCpDrawEnvelope(temp);
|
|
||||||
|
QVariantMap variantMap;
|
||||||
|
variantMap["drawEnvelope"] = temp;
|
||||||
|
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
|
||||||
}
|
}
|
||||||
else if("点状" == m_propertyData[qtProperty])
|
else if("点状" == m_propertyData[qtProperty])
|
||||||
{
|
{
|
||||||
bool temp = variant.toBool();
|
bool temp = variant.toBool();
|
||||||
this->m_formInfo->m_cp_drawAsDot = temp;
|
this->m_formInfo->m_cp_drawAsDot = temp;
|
||||||
this->m_tdCorePhysics->setCpDrawAsDot(temp);
|
|
||||||
|
QVariantMap variantMap;
|
||||||
|
variantMap["drawAsDot"] = temp;
|
||||||
|
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
|
||||||
}
|
}
|
||||||
else if("符号类型" == m_propertyData[qtProperty])
|
else if("符号类型" == m_propertyData[qtProperty])
|
||||||
{
|
{
|
||||||
|
// 目前只有 圆形和矩形
|
||||||
|
int temp = variant.value<int>();
|
||||||
int newStyle = 0;
|
int newStyle = 0;
|
||||||
int iStyle = variant.value<int>();
|
switch(temp)
|
||||||
switch(iStyle)
|
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
// 圆形
|
// 圆形
|
||||||
|
|
@ -397,25 +419,37 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
this->m_formInfo->m_cp_symbolType = newStyle;
|
this->m_formInfo->m_cp_symbolType = newStyle;
|
||||||
this->m_tdCorePhysics->setCpSymbolType(newStyle);
|
|
||||||
|
QVariantMap variantMap;
|
||||||
|
variantMap["symbolType"] = temp;
|
||||||
|
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
|
||||||
}
|
}
|
||||||
else if("边框颜色" == m_propertyData[qtProperty])
|
else if("边框颜色" == m_propertyData[qtProperty])
|
||||||
{
|
{
|
||||||
QColor temp = variant.value<QColor>();
|
QColor temp = variant.value<QColor>();
|
||||||
this->m_formInfo->m_cp_symbolBorderColor = temp;
|
this->m_formInfo->m_cp_symbolBorderColor = temp;
|
||||||
this->m_tdCorePhysics->setCpSymbolBorderColor(temp);
|
|
||||||
|
QVariantMap variantMap;
|
||||||
|
variantMap["symbolBorderColor"] = temp;
|
||||||
|
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
|
||||||
}
|
}
|
||||||
else if("大小" == m_propertyData[qtProperty])
|
else if("大小" == m_propertyData[qtProperty])
|
||||||
{
|
{
|
||||||
int temp = variant.toInt();
|
int temp = variant.toInt();
|
||||||
this->m_formInfo->m_cp_symbolSize = temp;
|
this->m_formInfo->m_cp_symbolSize = temp;
|
||||||
this->m_tdCorePhysics->setCpSymbolSize(temp);
|
|
||||||
|
QVariantMap variantMap;
|
||||||
|
variantMap["symbolSize"] = temp;
|
||||||
|
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
|
||||||
}
|
}
|
||||||
else if("填充颜色" == m_propertyData[qtProperty])
|
else if("填充颜色" == m_propertyData[qtProperty])
|
||||||
{
|
{
|
||||||
QColor temp = variant.value<QColor>();
|
QColor temp = variant.value<QColor>();
|
||||||
this->m_formInfo->m_cp_symbolFillColor = temp;
|
this->m_formInfo->m_cp_symbolFillColor = temp;
|
||||||
this->m_tdCorePhysics->setCpSymbolFillColor(temp);
|
|
||||||
|
QVariantMap variantMap;
|
||||||
|
variantMap["symbolFillColor"] = temp;
|
||||||
|
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
|
||||||
}
|
}
|
||||||
else if("序号" == m_propertyData[qtProperty])
|
else if("序号" == m_propertyData[qtProperty])
|
||||||
{
|
{
|
||||||
|
|
@ -449,32 +483,37 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV
|
||||||
{
|
{
|
||||||
double temp = variant.toDouble();
|
double temp = variant.toDouble();
|
||||||
this->m_formInfo->m_cp_leftScale = temp;
|
this->m_formInfo->m_cp_leftScale = temp;
|
||||||
|
this->m_formInfo->repaint();
|
||||||
|
|
||||||
// this->m_tdCorePhysics->setCpLeftScale(temp);
|
// this->m_tdCorePhysics->setCpLeftScale(temp);
|
||||||
// 这个操作需要修改所有对象
|
// 这个操作需要修改所有对象
|
||||||
QMap<QString, QObject*> m_mapDraggable_CorePhysics = this->m_tdCorePhysics->mPlot->m_mapDraggable_CorePhysics;
|
// QMap<QString, QObject*> m_mapDraggable_CorePhysics = this->m_tdCorePhysics->mPlot->m_mapDraggable_CorePhysics;
|
||||||
for (QMap<QString,QObject *>::Iterator iter = m_mapDraggable_CorePhysics.begin(); iter != m_mapDraggable_CorePhysics.end(); iter++)
|
// for (QMap<QString,QObject *>::Iterator iter = m_mapDraggable_CorePhysics.begin(); iter != m_mapDraggable_CorePhysics.end(); iter++)
|
||||||
{
|
// {
|
||||||
TransparentDraggableCorePhysics* pDraggableRect = (TransparentDraggableCorePhysics*)iter.value();
|
// TransparentDraggableCorePhysics* pDraggableRect = (TransparentDraggableCorePhysics*)iter.value();
|
||||||
pDraggableRect->setCpLeftScale(temp);
|
// pDraggableRect->setCpLeftScale(temp);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
else if("右刻度" == m_propertyData[qtProperty])
|
else if("右刻度" == m_propertyData[qtProperty])
|
||||||
{
|
{
|
||||||
double temp = variant.toDouble();
|
double temp = variant.toDouble();
|
||||||
this->m_formInfo->m_cp_rightScale = temp;
|
this->m_formInfo->m_cp_rightScale = temp;
|
||||||
|
this->m_formInfo->repaint();
|
||||||
|
|
||||||
// this->m_tdCorePhysics->setCpRightScale(temp);
|
// this->m_tdCorePhysics->setCpRightScale(temp);
|
||||||
QMap<QString, QObject*> m_mapDraggable_CorePhysics = this->m_tdCorePhysics->mPlot->m_mapDraggable_CorePhysics;
|
// QMap<QString, QObject*> m_mapDraggable_CorePhysics = this->m_tdCorePhysics->mPlot->m_mapDraggable_CorePhysics;
|
||||||
for (QMap<QString,QObject *>::Iterator iter = m_mapDraggable_CorePhysics.begin(); iter != m_mapDraggable_CorePhysics.end(); iter++)
|
// for (QMap<QString,QObject *>::Iterator iter = m_mapDraggable_CorePhysics.begin(); iter != m_mapDraggable_CorePhysics.end(); iter++)
|
||||||
{
|
// {
|
||||||
TransparentDraggableCorePhysics* pDraggableRect = (TransparentDraggableCorePhysics*)iter.value();
|
// TransparentDraggableCorePhysics* pDraggableRect = (TransparentDraggableCorePhysics*)iter.value();
|
||||||
pDraggableRect->setCpRightScale(temp);
|
// pDraggableRect->setCpRightScale(temp);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
else if("等分刻度数或自定义序列" == m_propertyData[qtProperty])
|
else if("等分刻度数或自定义序列" == m_propertyData[qtProperty])
|
||||||
{
|
{
|
||||||
double temp = variant.toDouble();
|
double temp = variant.toDouble();
|
||||||
this->m_formInfo->m_cp_scaleDivisionsOrCustom = temp;
|
this->m_formInfo->m_cp_scaleDivisionsOrCustom = temp;
|
||||||
this->m_tdCorePhysics->setCpScaleDivisionsOrCustom(temp);
|
this->m_formInfo->repaint();
|
||||||
|
// this->m_tdCorePhysics->setCpScaleDivisionsOrCustom(temp);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if("刻度类型" == m_propertyData[qtProperty])
|
else if("刻度类型" == m_propertyData[qtProperty])
|
||||||
|
|
@ -504,7 +543,7 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV
|
||||||
{
|
{
|
||||||
QString temp = variant.toString();
|
QString temp = variant.toString();
|
||||||
this->m_formInfo->m_strUnit = temp;
|
this->m_formInfo->m_strUnit = temp;
|
||||||
this->m_tdCorePhysics->setCpDisplayUnit(temp);
|
// this->m_tdCorePhysics->setCpDisplayUnit(temp);
|
||||||
this->m_formInfo->repaint();
|
this->m_formInfo->repaint();
|
||||||
}
|
}
|
||||||
else if("曲线单位" == m_propertyData[qtProperty])
|
else if("曲线单位" == m_propertyData[qtProperty])
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,6 @@ void TransparentDraggableCorePhysics::initRect()
|
||||||
connect(mPlot, &QCustomPlot::mouseRelease, this, &TransparentDraggableCorePhysics::onMouseRelease);
|
connect(mPlot, &QCustomPlot::mouseRelease, this, &TransparentDraggableCorePhysics::onMouseRelease);
|
||||||
|
|
||||||
qcpItemLine = new QCPItemLine(mPlot);
|
qcpItemLine = new QCPItemLine(mPlot);
|
||||||
// qcpItemLine->setPen(QPen(Qt::blue, 20));
|
|
||||||
qcpItemLine->setLayer("overlay"); // 确保在最上层
|
qcpItemLine->setLayer("overlay"); // 确保在最上层
|
||||||
|
|
||||||
//上下边界
|
//上下边界
|
||||||
|
|
@ -115,7 +114,7 @@ void TransparentDraggableCorePhysics::initRect()
|
||||||
tracer->setGraph(nullptr); // 不关联曲线,自由定位
|
tracer->setGraph(nullptr); // 不关联曲线,自由定位
|
||||||
tracer->setStyle(QCPItemTracer::tsCircle); // 圆形,可选:tsSquare, tsCross, tsPlus等
|
tracer->setStyle(QCPItemTracer::tsCircle); // 圆形,可选:tsSquare, tsCross, tsPlus等
|
||||||
tracer->setSize(3); // 点的大小(像素)
|
tracer->setSize(3); // 点的大小(像素)
|
||||||
tracer->setPen(QPen(Qt::red)); // 边框颜色
|
tracer->setPen(QPen(Qt::black)); // 边框颜色
|
||||||
tracer->setBrush(QBrush(QColor(0, 0, 0, 0))); // 黄色半透明,Alpha=128
|
tracer->setBrush(QBrush(QColor(0, 0, 0, 0))); // 黄色半透明,Alpha=128
|
||||||
tracer->setInterpolating(false);
|
tracer->setInterpolating(false);
|
||||||
// 绑定到线条终点(关键!)
|
// 绑定到线条终点(关键!)
|
||||||
|
|
@ -167,7 +166,7 @@ void TransparentDraggableCorePhysics::onMousePress(QMouseEvent *event)
|
||||||
TransparentDraggableCorePhysics *tmpLine = (TransparentDraggableCorePhysics*)mPlot->m_SelectShiftLine;
|
TransparentDraggableCorePhysics *tmpLine = (TransparentDraggableCorePhysics*)mPlot->m_SelectShiftLine;
|
||||||
QPen pen = tmpLine->qcpItemLine->pen();
|
QPen pen = tmpLine->qcpItemLine->pen();
|
||||||
// pen.setWidth(getCpLineWidth());
|
// pen.setWidth(getCpLineWidth());
|
||||||
pen.setColor(Qt::black); // 线宽
|
pen.setColor(this->getCpLineColor()); // 线宽
|
||||||
tmpLine->qcpItemLine->setPen(pen);
|
tmpLine->qcpItemLine->setPen(pen);
|
||||||
// tmpLine->qcpItemLine->setPen(QPen(Qt::black));
|
// tmpLine->qcpItemLine->setPen(QPen(Qt::black));
|
||||||
}
|
}
|
||||||
|
|
@ -345,12 +344,11 @@ int TransparentDraggableCorePhysics::getCpLineWidth() const
|
||||||
void TransparentDraggableCorePhysics::setCpLineWidth(int value)
|
void TransparentDraggableCorePhysics::setCpLineWidth(int value)
|
||||||
{
|
{
|
||||||
this->m_cp_lineWidth = value;
|
this->m_cp_lineWidth = value;
|
||||||
QList<QCPItemLine*> itemLine = this->mPlot->findChildren<QCPItemLine*>();
|
|
||||||
foreach (QCPItemLine *tracer, itemLine) {
|
QPen pen = this->qcpItemLine->pen();
|
||||||
QPen pen = tracer->pen();
|
pen.setWidth(value); // 线宽
|
||||||
pen.setWidth(value); // 线宽
|
this->qcpItemLine->setPen(pen);
|
||||||
tracer->setPen(pen);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QColor TransparentDraggableCorePhysics::getCpLineColor() const
|
QColor TransparentDraggableCorePhysics::getCpLineColor() const
|
||||||
|
|
@ -362,14 +360,12 @@ void TransparentDraggableCorePhysics::setCpLineColor(QColor value)
|
||||||
{
|
{
|
||||||
this->m_cp_lineColor = value;
|
this->m_cp_lineColor = value;
|
||||||
|
|
||||||
QList<QCPItemLine*> itemLine = this->mPlot->findChildren<QCPItemLine*>();
|
QPen pen = this->qcpItemLine->pen();
|
||||||
foreach (QCPItemLine *tracer, itemLine) {
|
pen.setColor(value);
|
||||||
QPen pen = tracer->pen();
|
this->qcpItemLine->setPen(pen);
|
||||||
pen.setColor(value);
|
|
||||||
tracer->setPen(pen);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Qt::PenStyle TransparentDraggableCorePhysics::getCpLineStyle() const
|
Qt::PenStyle TransparentDraggableCorePhysics::getCpLineStyle() const
|
||||||
{
|
{
|
||||||
return this->m_cp_lineStyle;
|
return this->m_cp_lineStyle;
|
||||||
|
|
@ -379,12 +375,10 @@ void TransparentDraggableCorePhysics::setCpLineStyle(Qt::PenStyle value)
|
||||||
{
|
{
|
||||||
this->m_cp_lineStyle = value;
|
this->m_cp_lineStyle = value;
|
||||||
|
|
||||||
QList<QCPItemLine*> itemLine = this->mPlot->findChildren<QCPItemLine*>();
|
QPen pen = this->qcpItemLine->pen();
|
||||||
foreach (QCPItemLine *tracer, itemLine) {
|
pen.setStyle(value);
|
||||||
QPen pen = tracer->pen();
|
this->qcpItemLine->setPen(pen);
|
||||||
pen.setStyle(value);
|
|
||||||
tracer->setPen(pen);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double TransparentDraggableCorePhysics::getCpLeftScale() const
|
double TransparentDraggableCorePhysics::getCpLeftScale() const
|
||||||
|
|
@ -396,9 +390,9 @@ void TransparentDraggableCorePhysics::setCpLeftScale(double value)
|
||||||
{
|
{
|
||||||
this->m_cp_leftScale = value;
|
this->m_cp_leftScale = value;
|
||||||
|
|
||||||
this->mPlot->yAxis2->setRange(value, this->mPlot->yAxis2->range().upper);
|
// this->mPlot->yAxis2->setRange(value, this->mPlot->yAxis2->range().upper);
|
||||||
// 重新绘制图形
|
// // 重新绘制图形
|
||||||
this->setRange(this->m_left_Low, this->m_left_Low, this->getCpCoreValue(), false);
|
// this->setRange(this->m_left_Low, this->m_left_Low, this->getCpCoreValue(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
double TransparentDraggableCorePhysics::getCpRightScale() const
|
double TransparentDraggableCorePhysics::getCpRightScale() const
|
||||||
|
|
@ -410,9 +404,9 @@ void TransparentDraggableCorePhysics::setCpRightScale(double value)
|
||||||
{
|
{
|
||||||
this->m_cp_rightScale = value;
|
this->m_cp_rightScale = value;
|
||||||
|
|
||||||
this->mPlot->yAxis2->setRange(this->mPlot->yAxis2->range().lower, value);
|
// this->mPlot->yAxis2->setRange(this->mPlot->yAxis2->range().lower, value);
|
||||||
// 重新绘制图形
|
// // 重新绘制图形
|
||||||
this->setRange(this->m_left_Low, this->m_left_Low, this->getCpCoreValue(), false);
|
// this->setRange(this->m_left_Low, this->m_left_Low, this->getCpCoreValue(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
int TransparentDraggableCorePhysics::getCpScaleType() const
|
int TransparentDraggableCorePhysics::getCpScaleType() const
|
||||||
|
|
@ -424,22 +418,22 @@ void TransparentDraggableCorePhysics::setCpScaleType(int value)
|
||||||
{
|
{
|
||||||
this->m_cp_scaleType = value;
|
this->m_cp_scaleType = value;
|
||||||
|
|
||||||
int newStyle = 0;
|
// int newStyle = 0;
|
||||||
switch(value)
|
// switch(value)
|
||||||
{
|
// {
|
||||||
case 0:
|
// case 0:
|
||||||
// 线性
|
// // 线性
|
||||||
this->mPlot->yAxis2->setScaleType(QCPAxis::stLinear);
|
// this->mPlot->yAxis2->setScaleType(QCPAxis::stLinear);
|
||||||
break;
|
// break;
|
||||||
case 1:
|
// case 1:
|
||||||
// 对数
|
// // 对数
|
||||||
this->mPlot->yAxis2->setScaleType(QCPAxis::stLogarithmic);
|
// this->mPlot->yAxis2->setScaleType(QCPAxis::stLogarithmic);
|
||||||
break;
|
// break;
|
||||||
case 2:
|
// case 2:
|
||||||
// 倾角 没有倾角类型
|
// // 倾角 没有倾角类型
|
||||||
this->mPlot->yAxis2->setScaleType(QCPAxis::stLogarithmic);
|
// this->mPlot->yAxis2->setScaleType(QCPAxis::stLogarithmic);
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
int TransparentDraggableCorePhysics::getCpScaleDivisionsOrCustom() const
|
int TransparentDraggableCorePhysics::getCpScaleDivisionsOrCustom() const
|
||||||
|
|
@ -451,23 +445,23 @@ void TransparentDraggableCorePhysics::setCpScaleDivisionsOrCustom(int value)
|
||||||
{
|
{
|
||||||
this->m_cp_scaleDivisionsOrCustom = value;
|
this->m_cp_scaleDivisionsOrCustom = value;
|
||||||
|
|
||||||
// 创建文本刻度 Ticker
|
// // 创建文本刻度 Ticker
|
||||||
QSharedPointer<QCPAxisTickerText> textTicker(new QCPAxisTickerText);
|
// QSharedPointer<QCPAxisTickerText> textTicker(new QCPAxisTickerText);
|
||||||
double minVal = this->mPlot->yAxis2->range().lower;
|
// double minVal = this->mPlot->yAxis2->range().lower;
|
||||||
double maxVal = this->mPlot->yAxis2->range().upper;
|
// double maxVal = this->mPlot->yAxis2->range().upper;
|
||||||
// 计算步长:(最大值 - 最小值) / 等分数
|
// // 计算步长:(最大值 - 最小值) / 等分数
|
||||||
double step = (maxVal - minVal) / value;
|
// double step = (maxVal - minVal) / value;
|
||||||
// 生成刻度
|
// // 生成刻度
|
||||||
for (int i = 0; i <= value; ++i) {
|
// for (int i = 0; i <= value; ++i) {
|
||||||
double value = minVal + step * i;
|
// double value = minVal + step * i;
|
||||||
// 取整显示(34.0 显示为 "34")
|
// // 取整显示(34.0 显示为 "34")
|
||||||
QString label = QString::number(qRound(value));
|
// QString label = QString::number(qRound(value));
|
||||||
textTicker->addTick(value, label);
|
// textTicker->addTick(value, label);
|
||||||
}
|
// }
|
||||||
// 应用 Ticker
|
// // 应用 Ticker
|
||||||
this->mPlot->yAxis2->setTicker(textTicker);
|
// this->mPlot->yAxis2->setTicker(textTicker);
|
||||||
// 设置范围(稍微留边距,让刻度显示完整)
|
// // 设置范围(稍微留边距,让刻度显示完整)
|
||||||
// this->mPlot->yAxis2->setRange(minVal - step * 0.1, maxVal + step * 0.1);
|
//// this->mPlot->yAxis2->setRange(minVal - step * 0.1, maxVal + step * 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString TransparentDraggableCorePhysics::getCpDisplayUnit() const
|
QString TransparentDraggableCorePhysics::getCpDisplayUnit() const
|
||||||
|
|
@ -509,7 +503,7 @@ void TransparentDraggableCorePhysics::setCpCurveScale(QFont value)
|
||||||
{
|
{
|
||||||
this->m_cp_curveScale = value;
|
this->m_cp_curveScale = value;
|
||||||
|
|
||||||
this->mPlot->yAxis2->setTickLabelFont(value);
|
// this->mPlot->yAxis2->setTickLabelFont(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TransparentDraggableCorePhysics::getCpDrawAsBar() const
|
bool TransparentDraggableCorePhysics::getCpDrawAsBar() const
|
||||||
|
|
|
||||||
|
|
@ -6959,30 +6959,28 @@ void FormDraw::initCorePhysics(QMyCustomPlot *widget, QString strSlfName, QStrin
|
||||||
widget->xAxis->setTicks(false);
|
widget->xAxis->setTicks(false);
|
||||||
widget->yAxis->setTicks(false);
|
widget->yAxis->setTicks(false);
|
||||||
widget->xAxis2->setTicks(false);
|
widget->xAxis2->setTicks(false);
|
||||||
widget->yAxis2->setTicks(true);
|
widget->yAxis2->setTicks(false);
|
||||||
|
|
||||||
widget->yAxis2->setTickLabels(true);
|
// widget->yAxis2->setTickLabels(true);
|
||||||
widget->yAxis2->setTickLabelSide(QCPAxis::lsInside);
|
// widget->yAxis2->setTickLabelSide(QCPAxis::lsInside);
|
||||||
|
// widget->yAxis2->setRange(0, 100);
|
||||||
|
// // 设置刻度
|
||||||
widget->yAxis2->setRange(0, 100);
|
// // 创建文本刻度 Ticker
|
||||||
// 设置刻度
|
// QSharedPointer<QCPAxisTickerText> textTicker(new QCPAxisTickerText);
|
||||||
// 创建文本刻度 Ticker
|
// double minVal = widget->yAxis2->range().lower;
|
||||||
QSharedPointer<QCPAxisTickerText> textTicker(new QCPAxisTickerText);
|
// double maxVal = widget->yAxis2->range().upper;
|
||||||
double minVal = widget->yAxis2->range().lower;
|
// int value = 2;
|
||||||
double maxVal = widget->yAxis2->range().upper;
|
// // 计算步长:(最大值 - 最小值) / 等分数
|
||||||
int value = 2;
|
// double step = (maxVal - minVal) / value;
|
||||||
// 计算步长:(最大值 - 最小值) / 等分数
|
// // 生成刻度
|
||||||
double step = (maxVal - minVal) / value;
|
// for (int i = 0; i <= value; ++i) {
|
||||||
// 生成刻度
|
// double value = minVal + step * i;
|
||||||
for (int i = 0; i <= value; ++i) {
|
// // 取整显示(34.0 显示为 "34")
|
||||||
double value = minVal + step * i;
|
// QString label = QString::number(qRound(value));
|
||||||
// 取整显示(34.0 显示为 "34")
|
// textTicker->addTick(value, label);
|
||||||
QString label = QString::number(qRound(value));
|
// }
|
||||||
textTicker->addTick(value, label);
|
// // 应用 Ticker
|
||||||
}
|
// widget->yAxis2->setTicker(textTicker);
|
||||||
// 应用 Ticker
|
|
||||||
widget->yAxis2->setTicker(textTicker);
|
|
||||||
|
|
||||||
|
|
||||||
// 加载slf文件 开始
|
// 加载slf文件 开始
|
||||||
|
|
|
||||||
|
|
@ -800,20 +800,62 @@ void FormInfo::paintEvent(QPaintEvent* event)
|
||||||
}
|
}
|
||||||
if(m_strType == "tableObject" && m_strLineName == "CORE_PHYSICS")
|
if(m_strType == "tableObject" && m_strLineName == "CORE_PHYSICS")
|
||||||
{
|
{
|
||||||
|
painter.setPen(Qt::black);
|
||||||
|
// 字体->曲线单位
|
||||||
QFont oldFont = painter.font();
|
QFont oldFont = painter.font();
|
||||||
painter.setFont(m_strUnitFont);
|
painter.setFont(m_strUnitFont);
|
||||||
|
// 显示单位
|
||||||
painter.drawText(rect.left()+10, rect.top() + rect.height() * 2 / 3, rect.width(), rect.height() / 3, Qt::AlignCenter, m_strUnit);
|
painter.drawText(rect.left()+10, rect.top() + rect.height() * 2 / 3, rect.width(), rect.height() / 3, Qt::AlignCenter, m_strUnit);
|
||||||
painter.setFont(oldFont);
|
painter.setFont(oldFont);
|
||||||
// 显示刻度
|
|
||||||
if (m_bShowScale)
|
// 刻度的那条线
|
||||||
|
int baseY = rect.top() + rect.height() * 2 / 3;
|
||||||
|
int textH = rect.height() / 3;
|
||||||
|
// 关键:线 Y 坐标 = 文字底部,但不超过 rect 底部
|
||||||
|
int lineY = baseY + textH - 7;
|
||||||
|
int x1 = rect.left() + 20;
|
||||||
|
int x2 = rect.right() - 30;
|
||||||
|
painter.drawLine(x1, lineY, x2, lineY);
|
||||||
|
|
||||||
|
// 字体->曲线刻度
|
||||||
|
oldFont = painter.font();
|
||||||
|
painter.setFont(m_cp_curveScale);
|
||||||
|
// ========== 在这条线上画刻度 + 数字 ==========
|
||||||
|
int minVal = this->m_cp_leftScale; // 最小值(可变)
|
||||||
|
int maxVal = this->m_cp_rightScale; // 最大值(可变)
|
||||||
|
if(this->m_cp_scaleDivisionsOrCustom <= 0)
|
||||||
{
|
{
|
||||||
painter.setFont(m_curveScaleFont);
|
this->m_cp_scaleDivisionsOrCustom = 1;
|
||||||
QFontMetrics fm1(m_curveScaleFont);
|
|
||||||
QRect textRect = fm1.boundingRect(QString::number(m_vmax, 'f', 0));
|
|
||||||
painter.drawText(rect.left() + 10, rect.top() + rect.height() * 2 / 3, rect.width(), rect.height() / 3, Qt::AlignLeft | Qt::AlignVCenter, QString::number(m_vmin));// +" ~ " + QString::number(m_vmax));
|
|
||||||
painter.drawText(rect.left() + 10, rect.top() + rect.height() * 2 / 3, rect.width() - textRect.width(), rect.height() / 3, Qt::AlignRight | Qt::AlignVCenter, QString::number(m_vmax));
|
|
||||||
}
|
}
|
||||||
|
int tickCount = this->m_cp_scaleDivisionsOrCustom + 1; // 总刻度等分数(可变,比如 5/10/20)
|
||||||
|
// 样式配置
|
||||||
|
int tickHeight = 6; // 小刻度高度
|
||||||
|
int textOffsetUp = 18; // 数字往上偏移量(解决被遮挡问题)
|
||||||
|
// 计算总步长(自动等分)
|
||||||
|
double step = (maxVal - minVal) * 1.0 / (tickCount - 1);
|
||||||
|
// 开始画所有刻度 + 数字
|
||||||
|
for (int i = 0; i < tickCount; ++i) {
|
||||||
|
// 当前刻度值(自动计算)
|
||||||
|
int val = minVal + qRound(step * i);
|
||||||
|
// 计算在横线上的 X 坐标
|
||||||
|
qreal ratio = (val - minVal) * 1.0 / (maxVal - minVal);
|
||||||
|
int tickX = x1 + ratio * (x2 - x1);
|
||||||
|
// 画向上的小刻度线
|
||||||
|
painter.drawLine(tickX, lineY, tickX, lineY - tickHeight);
|
||||||
|
// 画刻度数字(在线上方,不遮挡)
|
||||||
|
painter.drawText(
|
||||||
|
tickX - 12,
|
||||||
|
lineY - tickHeight - textOffsetUp,
|
||||||
|
24, 14,
|
||||||
|
Qt::AlignCenter,
|
||||||
|
QString::number(val)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
painter.setFont(oldFont);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QWidget::paintEvent(event);
|
QWidget::paintEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -225,10 +225,10 @@ public:
|
||||||
Qt::PenStyle m_cp_lineStyle; // 线型
|
Qt::PenStyle m_cp_lineStyle; // 线型
|
||||||
double m_cp_leftScale = 0; // 左刻度
|
double m_cp_leftScale = 0; // 左刻度
|
||||||
double m_cp_rightScale = 100; // 右刻度
|
double m_cp_rightScale = 100; // 右刻度
|
||||||
int m_cp_scaleDivisionsOrCustom = 2; // 等分刻度数或自定序列
|
int m_cp_scaleDivisionsOrCustom = 1; // 等分刻度数或自定序列
|
||||||
int m_cp_scaleType = 0; // 刻度类型
|
int m_cp_scaleType = 0; // 刻度类型
|
||||||
QFont m_cp_curveUnit; // 曲线单位
|
QFont m_cp_curveUnit = QFont("微软雅黑", 7); // 曲线单位
|
||||||
QFont m_cp_curveScale; // 曲线刻度
|
QFont m_cp_curveScale = QFont("微软雅黑", 7); // 曲线刻度
|
||||||
bool m_cp_drawAsBar = true; // 杆状
|
bool m_cp_drawAsBar = true; // 杆状
|
||||||
bool m_cp_leftBoundary = true; // 左界
|
bool m_cp_leftBoundary = true; // 左界
|
||||||
bool m_cp_skipZeroInvalidValues = false; // 不绘零等无效值
|
bool m_cp_skipZeroInvalidValues = false; // 不绘零等无效值
|
||||||
|
|
|
||||||
|
|
@ -681,11 +681,11 @@ void FormTrack::s_AddTableLine(QString strSlfName, QString strWellName, QString
|
||||||
formInfo->m_strAliasName = listOtherProperty[3];
|
formInfo->m_strAliasName = listOtherProperty[3];
|
||||||
// 线宽
|
// 线宽
|
||||||
formInfo->m_cp_lineWidth = listOtherProperty[4].toInt();
|
formInfo->m_cp_lineWidth = listOtherProperty[4].toInt();
|
||||||
QVariantList listCond;
|
QVariantMap variantMap;
|
||||||
listCond.append(listOtherProperty[4].toInt());
|
variantMap["lineWidth"] = listOtherProperty[4].toInt();
|
||||||
// 线条颜色
|
// 线条颜色
|
||||||
formInfo->m_cp_lineColor = listOtherProperty[5];
|
formInfo->m_cp_lineColor = listOtherProperty[5];
|
||||||
listCond.append(listOtherProperty[5]);
|
variantMap["lineColor"] = listOtherProperty[5];
|
||||||
// 线型
|
// 线型
|
||||||
Qt::PenStyle newStyle = Qt::SolidLine;
|
Qt::PenStyle newStyle = Qt::SolidLine;
|
||||||
int iStyle = listOtherProperty[6].toInt();
|
int iStyle = listOtherProperty[6].toInt();
|
||||||
|
|
@ -719,7 +719,7 @@ void FormTrack::s_AddTableLine(QString strSlfName, QString strWellName, QString
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
formInfo->m_cp_lineStyle = newStyle;
|
formInfo->m_cp_lineStyle = newStyle;
|
||||||
listCond.append(listOtherProperty[6].toInt());
|
variantMap["lineStyle"] = (listOtherProperty[6].toInt());
|
||||||
// 左刻度
|
// 左刻度
|
||||||
formInfo->m_cp_leftScale = listOtherProperty[7].toInt();
|
formInfo->m_cp_leftScale = listOtherProperty[7].toInt();
|
||||||
formInfo->m_vmin = listOtherProperty[7].toInt();
|
formInfo->m_vmin = listOtherProperty[7].toInt();
|
||||||
|
|
@ -764,36 +764,36 @@ void FormTrack::s_AddTableLine(QString strSlfName, QString strWellName, QString
|
||||||
}
|
}
|
||||||
// 杆状
|
// 杆状
|
||||||
formInfo->m_cp_drawAsBar = (listOtherProperty[15] == "1");
|
formInfo->m_cp_drawAsBar = (listOtherProperty[15] == "1");
|
||||||
listCond.append(formInfo->m_cp_drawAsBar);
|
variantMap["drawAsBar"] = (formInfo->m_cp_drawAsBar);
|
||||||
// 左界
|
// 左界
|
||||||
formInfo->m_cp_leftBoundary = (listOtherProperty[16] == "1");
|
formInfo->m_cp_leftBoundary = (listOtherProperty[16] == "1");
|
||||||
listCond.append(formInfo->m_cp_leftBoundary);
|
variantMap["leftBoundary"] = (formInfo->m_cp_leftBoundary);
|
||||||
// 不绘零等无效值
|
// 不绘零等无效值
|
||||||
formInfo->m_cp_skipZeroInvalidValues = (listOtherProperty[17] == "1");
|
formInfo->m_cp_skipZeroInvalidValues = (listOtherProperty[17] == "1");
|
||||||
listCond.append(formInfo->m_cp_skipZeroInvalidValues);
|
variantMap["skipZeroInvalidValues"] = (formInfo->m_cp_skipZeroInvalidValues);
|
||||||
// 绘制包络线
|
// 绘制包络线
|
||||||
formInfo->m_cp_drawEnvelope = (listOtherProperty[18] == "1");
|
formInfo->m_cp_drawEnvelope = (listOtherProperty[18] == "1");
|
||||||
listCond.append(formInfo->m_cp_drawEnvelope);
|
variantMap["drawEnvelope"] = (formInfo->m_cp_drawEnvelope);
|
||||||
// 点状
|
// 点状
|
||||||
formInfo->m_cp_drawAsDot = (listOtherProperty[19] == "1");
|
formInfo->m_cp_drawAsDot = (listOtherProperty[19] == "1");
|
||||||
listCond.append(formInfo->m_cp_drawAsDot);
|
variantMap["drawAsDot"] = (formInfo->m_cp_drawAsDot);
|
||||||
// 符号类型
|
// 符号类型
|
||||||
formInfo->m_cp_symbolType = listOtherProperty[20].toInt();
|
formInfo->m_cp_symbolType = listOtherProperty[20].toInt();
|
||||||
listCond.append(formInfo->m_cp_symbolType);
|
variantMap["symbolType"] = (formInfo->m_cp_symbolType);
|
||||||
// 边框颜色
|
// 边框颜色
|
||||||
formInfo->m_cp_symbolBorderColor = listOtherProperty[21];
|
formInfo->m_cp_symbolBorderColor = listOtherProperty[21];
|
||||||
listCond.append(formInfo->m_cp_symbolBorderColor);
|
variantMap["symbolBorderColor"] = formInfo->m_cp_symbolBorderColor;
|
||||||
// 大小
|
// 大小
|
||||||
formInfo->m_cp_symbolSize = listOtherProperty[22].toInt();
|
formInfo->m_cp_symbolSize = listOtherProperty[22].toInt();
|
||||||
listCond.append(formInfo->m_cp_symbolSize);
|
variantMap["symbolSize"] = (formInfo->m_cp_symbolSize);
|
||||||
// 填充颜色
|
// 填充颜色
|
||||||
formInfo->m_cp_symbolFillColor = listOtherProperty[23];
|
formInfo->m_cp_symbolFillColor = listOtherProperty[23];
|
||||||
listCond.append(formInfo->m_cp_symbolFillColor);
|
variantMap["symbolFillColor"] = (formInfo->m_cp_symbolFillColor);
|
||||||
// 字段名称
|
// 字段名称
|
||||||
formInfo->m_cp_fieldName = listOtherProperty[24].toInt();
|
formInfo->m_cp_fieldName = listOtherProperty[24].toInt();
|
||||||
listCond.append(formInfo->m_cp_fieldName);
|
variantMap["fieldName"] = (formInfo->m_cp_fieldName);
|
||||||
|
|
||||||
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(listCond);
|
emit CallManage::getInstance()->sig_changeCorePhysicsProperty(variantMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
|
||||||
// 深度属性修改
|
// 深度属性修改
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_changeDepthProperty(QVariantList)), this, SLOT(s_changeDepthProperty(QVariantList)));
|
connect(CallManage::getInstance(), SIGNAL(sig_changeDepthProperty(QVariantList)), this, SLOT(s_changeDepthProperty(QVariantList)));
|
||||||
// 岩心分析
|
// 岩心分析
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_changeCorePhysicsProperty(QVariantList)), this, SLOT(s_changeCorePhysicsProperty(QVariantList)));
|
connect(CallManage::getInstance(), SIGNAL(sig_changeCorePhysicsProperty(QVariantMap)), this, SLOT(s_changeCorePhysicsProperty(QVariantMap)));
|
||||||
|
|
||||||
//改变固井曲线名
|
//改变固井曲线名
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_changeGujingLine(QString, QString, QString, QString, QString, QString)), this, SLOT(s_changeGujingLine(QString, QString, QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_changeGujingLine(QString, QString, QString, QString, QString, QString)), this, SLOT(s_changeGujingLine(QString, QString, QString, QString, QString, QString)));
|
||||||
|
|
@ -4841,76 +4841,107 @@ void QMyCustomPlot::s_changeDepthProperty(QVariantList vlist)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 岩心分析
|
// 岩心分析
|
||||||
void QMyCustomPlot::s_changeCorePhysicsProperty(QVariantList vlist)
|
void QMyCustomPlot::s_changeCorePhysicsProperty(QVariantMap variantMap)
|
||||||
{
|
{
|
||||||
int lineWidth = vlist.at(0).toInt();
|
TransparentDraggableCorePhysics *tdCorePhysics = NULL;
|
||||||
QColor lineColor = vlist[1].value<QColor>();
|
|
||||||
int iStyle = vlist.at(2).toInt();
|
|
||||||
Qt::PenStyle newStyle = Qt::SolidLine;
|
|
||||||
switch(iStyle)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
//无
|
|
||||||
newStyle = Qt::NoPen;
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
//实线
|
|
||||||
newStyle = Qt::SolidLine;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
//虚线
|
|
||||||
newStyle = Qt::DashLine;
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
//点线
|
|
||||||
newStyle = Qt::DotLine;
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
//虚点线
|
|
||||||
newStyle = Qt::DashDotLine;
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
//虚点点线
|
|
||||||
newStyle = Qt::DashDotDotLine;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
// 杆状
|
|
||||||
bool drawAsBar = vlist.at(3).toBool();
|
|
||||||
// 左界
|
|
||||||
bool leftBoundary = vlist.at(4).toBool();
|
|
||||||
// 不绘零等无效值
|
|
||||||
bool skipZeroInvalidValues = vlist.at(5).toBool();
|
|
||||||
// 绘制包络线
|
|
||||||
bool drawEnvelope = vlist.at(6).toBool();
|
|
||||||
// 点状
|
|
||||||
bool drawAsDot = vlist.at(7).toBool();
|
|
||||||
// 符号类型
|
|
||||||
int symbolType = vlist.at(8).toInt();
|
|
||||||
// 边框颜色
|
|
||||||
QColor symbolBorderColor = vlist[9].value<QColor>();
|
|
||||||
// 大小
|
|
||||||
int symbolSize = vlist.at(10).toInt();
|
|
||||||
// 填充颜色
|
|
||||||
QColor symbolFillColor = vlist[11].value<QColor>();
|
|
||||||
|
|
||||||
TransparentDraggableCorePhysics *pDraggableRect =NULL;
|
|
||||||
for (QMap<QString,QObject *>::Iterator iter = m_mapDraggable_CorePhysics.begin(); iter != m_mapDraggable_CorePhysics.end(); iter++)
|
for (QMap<QString,QObject *>::Iterator iter = m_mapDraggable_CorePhysics.begin(); iter != m_mapDraggable_CorePhysics.end(); iter++)
|
||||||
{
|
{
|
||||||
pDraggableRect = (TransparentDraggableCorePhysics*)iter.value();
|
tdCorePhysics = (TransparentDraggableCorePhysics*)iter.value();
|
||||||
pDraggableRect->setCpLineWidth(lineWidth);
|
// 线宽
|
||||||
pDraggableRect->setCpLineColor(lineColor);
|
if(variantMap["lineWidth"].isValid())
|
||||||
pDraggableRect->setCpLineStyle(newStyle);
|
{
|
||||||
pDraggableRect->setCpDrawAsBar(drawAsBar);
|
tdCorePhysics->setCpLineWidth(variantMap["lineWidth"].toInt());
|
||||||
pDraggableRect->setCpLeftBoundary(leftBoundary);
|
}
|
||||||
pDraggableRect->setCpDrawAsDot(drawAsDot);
|
// 颜色
|
||||||
pDraggableRect->setCpSymbolType(symbolType);
|
if(variantMap["lineColor"].isValid())
|
||||||
pDraggableRect->setCpSymbolBorderColor(symbolBorderColor);
|
{
|
||||||
pDraggableRect->setCpSymbolSize(symbolSize);
|
tdCorePhysics->setCpLineColor(variantMap["lineColor"].value<QColor>());
|
||||||
pDraggableRect->setCpSymbolFillColor(symbolFillColor);
|
}
|
||||||
|
// 线形
|
||||||
|
if(variantMap["lineStyle"].isValid())
|
||||||
|
{
|
||||||
|
int lineStyle = variantMap["lineStyle"].toInt();
|
||||||
|
Qt::PenStyle penStyle = Qt::SolidLine;
|
||||||
|
switch(lineStyle)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
//无
|
||||||
|
penStyle = Qt::NoPen;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
//实线
|
||||||
|
penStyle = Qt::SolidLine;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
//虚线
|
||||||
|
penStyle = Qt::DashLine;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
//点线
|
||||||
|
penStyle = Qt::DotLine;
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
//虚点线
|
||||||
|
penStyle = Qt::DashDotLine;
|
||||||
|
break;
|
||||||
|
case 5:
|
||||||
|
//虚点点线
|
||||||
|
penStyle = Qt::DashDotDotLine;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
tdCorePhysics->setCpLineStyle(penStyle);
|
||||||
|
}
|
||||||
|
// 杆状
|
||||||
|
if(variantMap["drawAsBar"].isValid())
|
||||||
|
{
|
||||||
|
tdCorePhysics->setCpDrawAsBar(variantMap["drawAsBar"].toBool());
|
||||||
|
}
|
||||||
|
// 左界
|
||||||
|
if(variantMap["leftBoundary"].isValid())
|
||||||
|
{
|
||||||
|
tdCorePhysics->setCpLeftBoundary(variantMap["leftBoundary"].toBool());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 不绘零等无效值
|
||||||
|
if(variantMap["skipZeroInvalidValues"].isValid())
|
||||||
|
{
|
||||||
|
tdCorePhysics->setCpSkipZeroInvalidValues(variantMap["skipZeroInvalidValues"].toBool());
|
||||||
|
}
|
||||||
|
// 绘制包络线
|
||||||
|
if(variantMap["drawEnvelope"].isValid())
|
||||||
|
{
|
||||||
|
tdCorePhysics->setCpDrawEnvelope(variantMap["drawEnvelope"].toBool());
|
||||||
|
}
|
||||||
|
// 点状
|
||||||
|
if(variantMap["drawAsDot"].isValid())
|
||||||
|
{
|
||||||
|
tdCorePhysics->setCpDrawAsDot(variantMap["drawAsDot"].toBool());
|
||||||
|
}
|
||||||
|
|
||||||
|
// 符号类型
|
||||||
|
if(variantMap["symbolType"].isValid())
|
||||||
|
{
|
||||||
|
tdCorePhysics->setCpSymbolType(variantMap["symbolType"].toInt());
|
||||||
|
}
|
||||||
|
// 边框颜色
|
||||||
|
if(variantMap["symbolBorderColor"].isValid())
|
||||||
|
{
|
||||||
|
tdCorePhysics->setCpSymbolBorderColor(variantMap["symbolBorderColor"].value<QColor>());
|
||||||
|
}
|
||||||
|
// 大小
|
||||||
|
if(variantMap["symbolSize"].isValid())
|
||||||
|
{
|
||||||
|
tdCorePhysics->setCpSymbolSize(variantMap["symbolSize"].toInt());
|
||||||
|
}
|
||||||
|
// 填充颜色
|
||||||
|
if(variantMap["symbolFillColor"].isValid())
|
||||||
|
{
|
||||||
|
tdCorePhysics->setCpSymbolFillColor(variantMap["symbolFillColor"].value<QColor>());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this->replot();
|
this->replot();
|
||||||
}
|
}
|
||||||
|
|
||||||
//校深线段
|
//校深线段
|
||||||
|
|
|
||||||
|
|
@ -551,7 +551,7 @@ public slots:
|
||||||
void s_changeDepthProperty(QVariantList vlist);
|
void s_changeDepthProperty(QVariantList vlist);
|
||||||
|
|
||||||
// 岩心分析
|
// 岩心分析
|
||||||
void s_changeCorePhysicsProperty(QVariantList vlist);
|
void s_changeCorePhysicsProperty(QVariantMap vlist);
|
||||||
|
|
||||||
void onAddRect();
|
void onAddRect();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user