Compare commits

..

No commits in common. "8e3062931cb9834f55dcb7d1eeb52388596af902" and "7fe27a80393575da50c1a998e395ed26c9dbba41" have entirely different histories.

4 changed files with 121 additions and 120 deletions

View File

@ -536,7 +536,7 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV
break; break;
} }
this->m_formInfo->m_cp_scaleType = newStyle; this->m_formInfo->m_cp_scaleType = newStyle;
// this->m_tdCorePhysics->setCpScaleType(newStyle); this->m_tdCorePhysics->setCpScaleType(newStyle);
} }
else if("显示单位" == m_propertyData[qtProperty]) else if("显示单位" == m_propertyData[qtProperty])
@ -3449,14 +3449,6 @@ void PropertyWidget::initCorePhysicsItemProperty(TransparentDraggableCorePhysics
{ {
//初始化,清空 //初始化,清空
InitCurrentViewInfo(); InitCurrentViewInfo();
// qDebug() << "=========-----this:" << tdImage << " mPlot:" << tdImage->mPlot;
// QMyCustomPlot *mPlot = tdImage->mPlot;
// qDebug() << tdImage->mPlot->m_strUuid << "====";
// qDebug() << tdImage->mPlot->m_strWellName << "====";
// qDebug() << tdImage->mPlot->m_strTrackName << "====";
// qDebug() << tdImage->mPlot->m_strLineName << "====";
// qDebug() << tdImage->mPlot->m_formTrack << "====";
FormInfo* formInfo = tdImage->mPlot->m_formTrack->getFormInfoByParameters(tdImage->mPlot->m_strUuid, tdImage->mPlot->m_strWellName, FormInfo* formInfo = tdImage->mPlot->m_formTrack->getFormInfoByParameters(tdImage->mPlot->m_strUuid, tdImage->mPlot->m_strWellName,
tdImage->mPlot->m_strTrackName, tdImage->mPlot->m_strLineName); tdImage->mPlot->m_strTrackName, tdImage->mPlot->m_strLineName);
if (formInfo != NULL) if (formInfo != NULL)

View File

@ -50,7 +50,7 @@ void TransparentDraggableCorePhysics::setRange(double left_Low, double right_Hig
} }
m_lY1 = lY1; m_lY1 = lY1;
// lY2除以实际左到右刻度数值 // lY2除以实际左到右刻度数值
// lY2 = lY2 / (getCpRightScale() - getCpLeftScale()) * 100; lY2 = lY2 / (getCpRightScale() - getCpLeftScale()) * 100;
qcpItemLine->start->setCoords(left_Low, lY1);//圆心位置 qcpItemLine->start->setCoords(left_Low, lY1);//圆心位置
@ -122,7 +122,6 @@ void TransparentDraggableCorePhysics::initRect()
tracer->setVisible(false); tracer->setVisible(false);
qDebug() << "Creating qcpItemLine"; qDebug() << "Creating qcpItemLine";
// qDebug() << "=========this:" << this << " mPlot:" << mPlot;
} }
void TransparentDraggableCorePhysics::updateHandles() void TransparentDraggableCorePhysics::updateHandles()
@ -307,25 +306,35 @@ void TransparentDraggableCorePhysics::setCpCoreValue(double value)
qcpItemLine->end->setCoords(currentX, value); qcpItemLine->end->setCoords(currentX, value);
} }
//double TransparentDraggableCorePhysics::getCpRotationAngle() const double TransparentDraggableCorePhysics::getCpExampleAreaHeightCm() const
//{ {
// return this->m_cp_rotationAngle; return this->m_cp_exampleAreaHeightCm;
//} }
//void TransparentDraggableCorePhysics::setCpRotationAngle(double value) void TransparentDraggableCorePhysics::setCpExampleAreaHeightCm(double value)
//{ {
// this->m_cp_rotationAngle = value; this->m_cp_exampleAreaHeightCm = value;
//} }
//QString TransparentDraggableCorePhysics::getCpDisplayName() const double TransparentDraggableCorePhysics::getCpRotationAngle() const
//{ {
// return this->m_cp_displayName; return this->m_cp_rotationAngle;
//} }
//void TransparentDraggableCorePhysics::setCpDisplayName(const QString &value) void TransparentDraggableCorePhysics::setCpRotationAngle(double value)
//{ {
// this->m_cp_displayName = value; this->m_cp_rotationAngle = value;
//} }
QString TransparentDraggableCorePhysics::getCpDisplayName() const
{
return this->m_cp_displayName;
}
void TransparentDraggableCorePhysics::setCpDisplayName(const QString &value)
{
this->m_cp_displayName = value;
}
int TransparentDraggableCorePhysics::getCpLineWidth() const int TransparentDraggableCorePhysics::getCpLineWidth() const
{ {
@ -372,88 +381,88 @@ void TransparentDraggableCorePhysics::setCpLineStyle(Qt::PenStyle value)
} }
//double TransparentDraggableCorePhysics::getCpLeftScale() const double TransparentDraggableCorePhysics::getCpLeftScale() const
//{ {
// return this->m_cp_leftScale; return this->m_cp_leftScale;
//} }
//void TransparentDraggableCorePhysics::setCpLeftScale(double value) 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
//{ {
// return this->m_cp_rightScale; return this->m_cp_rightScale;
//} }
//void TransparentDraggableCorePhysics::setCpRightScale(double value) 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
//{ {
// return this->m_cp_scaleType; return this->m_cp_scaleType;
//} }
//void TransparentDraggableCorePhysics::setCpScaleType(int value) 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
//{ {
// return this->m_cp_scaleDivisionsOrCustom; return this->m_cp_scaleDivisionsOrCustom;
//} }
//void TransparentDraggableCorePhysics::setCpScaleDivisionsOrCustom(int value) 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
{ {

View File

@ -48,11 +48,14 @@ public:
double getCpCoreValue() const; double getCpCoreValue() const;
void setCpCoreValue(double value); void setCpCoreValue(double value);
// double getCpRotationAngle() const; double getCpExampleAreaHeightCm() const;
// void setCpRotationAngle(double value); void setCpExampleAreaHeightCm(double value);
// QString getCpDisplayName() const; double getCpRotationAngle() const;
// void setCpDisplayName(const QString &value); void setCpRotationAngle(double value);
QString getCpDisplayName() const;
void setCpDisplayName(const QString &value);
int getCpLineWidth() const; int getCpLineWidth() const;
void setCpLineWidth(int value); void setCpLineWidth(int value);
@ -63,17 +66,17 @@ public:
Qt::PenStyle getCpLineStyle() const; Qt::PenStyle getCpLineStyle() const;
void setCpLineStyle(Qt::PenStyle value); void setCpLineStyle(Qt::PenStyle value);
// double getCpLeftScale() const; double getCpLeftScale() const;
// void setCpLeftScale(double value); void setCpLeftScale(double value);
// double getCpRightScale() const; double getCpRightScale() const;
// void setCpRightScale(double value); void setCpRightScale(double value);
// int getCpScaleType() const; int getCpScaleType() const;
// void setCpScaleType(int value); void setCpScaleType(int value);
// int getCpScaleDivisionsOrCustom() const; int getCpScaleDivisionsOrCustom() const;
// void setCpScaleDivisionsOrCustom(int value); void setCpScaleDivisionsOrCustom(int value);
QString getCpDisplayUnit() const; QString getCpDisplayUnit() const;
void setCpDisplayUnit(const QString &value); void setCpDisplayUnit(const QString &value);
@ -121,15 +124,16 @@ signals:
void rangeChanged(QCPRange newRange); void rangeChanged(QCPRange newRange);
private: private:
// double m_cp_rotationAngle; // 旋转角度 double m_cp_exampleAreaHeightCm; // 例区高度(cm)
// QString m_cp_displayName; // 显示名称 double m_cp_rotationAngle; // 旋转角度
QString m_cp_displayName; // 显示名称
int m_cp_lineWidth; // 线宽 int m_cp_lineWidth; // 线宽
QColor m_cp_lineColor; // 线条颜色 QColor m_cp_lineColor; // 线条颜色
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_scaleType; // 刻度类型 int m_cp_scaleType; // 刻度类型
// int m_cp_scaleDivisionsOrCustom; // 等分刻度数或自定序列 int m_cp_scaleDivisionsOrCustom; // 等分刻度数或自定序列
QString m_cp_displayUnit; // 显示单位 QString m_cp_displayUnit; // 显示单位
QString m_cp_curveName; // 曲线名称 QString m_cp_curveName; // 曲线名称
QString m_cp_curveUnit; // 曲线单位 QString m_cp_curveUnit; // 曲线单位

View File

@ -1930,10 +1930,6 @@ void QMyCustomPlot::addCorePhysics()
void QMyCustomPlot::addCorePhysicsWithParam(int Order, double Depth, double CorrDepth, double CoreValue) void QMyCustomPlot::addCorePhysicsWithParam(int Order, double Depth, double CorrDepth, double CoreValue)
{ {
// qDebug() << Order << "=====";
// qDebug() << Depth << "=====";
// qDebug() << CorrDepth << "=====";
// qDebug() << CoreValue << "=====";
QtCommonClass *qtCommon = new QtCommonClass(this); QtCommonClass *qtCommon = new QtCommonClass(this);
QString strUuid = qtCommon->getUUid(); QString strUuid = qtCommon->getUUid();
TransparentDraggableCorePhysics *dragRect = new TransparentDraggableCorePhysics(this, strUuid); TransparentDraggableCorePhysics *dragRect = new TransparentDraggableCorePhysics(this, strUuid);