diff --git a/logPlus/PropertyWidget.cpp b/logPlus/PropertyWidget.cpp index 534b85a..466827e 100644 --- a/logPlus/PropertyWidget.cpp +++ b/logPlus/PropertyWidget.cpp @@ -536,7 +536,7 @@ void PropertyWidget::changedCorePhysicsProperty(QtProperty *qtProperty, const QV break; } this->m_formInfo->m_cp_scaleType = newStyle; - this->m_tdCorePhysics->setCpScaleType(newStyle); +// this->m_tdCorePhysics->setCpScaleType(newStyle); } else if("显示单位" == m_propertyData[qtProperty]) @@ -3449,6 +3449,14 @@ void PropertyWidget::initCorePhysicsItemProperty(TransparentDraggableCorePhysics { //初始化,清空 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, tdImage->mPlot->m_strTrackName, tdImage->mPlot->m_strLineName); if (formInfo != NULL) diff --git a/logPlus/TransparentDraggableCorePhysics.cpp b/logPlus/TransparentDraggableCorePhysics.cpp index db00957..92bceed 100644 --- a/logPlus/TransparentDraggableCorePhysics.cpp +++ b/logPlus/TransparentDraggableCorePhysics.cpp @@ -50,7 +50,7 @@ void TransparentDraggableCorePhysics::setRange(double left_Low, double right_Hig } m_lY1 = lY1; // lY2除以实际左到右刻度数值 - lY2 = lY2 / (getCpRightScale() - getCpLeftScale()) * 100; +// lY2 = lY2 / (getCpRightScale() - getCpLeftScale()) * 100; qcpItemLine->start->setCoords(left_Low, lY1);//圆心位置 @@ -122,6 +122,7 @@ void TransparentDraggableCorePhysics::initRect() tracer->setVisible(false); qDebug() << "Creating qcpItemLine"; +// qDebug() << "=========this:" << this << " mPlot:" << mPlot; } void TransparentDraggableCorePhysics::updateHandles() @@ -306,35 +307,25 @@ void TransparentDraggableCorePhysics::setCpCoreValue(double value) qcpItemLine->end->setCoords(currentX, value); } -double TransparentDraggableCorePhysics::getCpExampleAreaHeightCm() const -{ - return this->m_cp_exampleAreaHeightCm; -} +//double TransparentDraggableCorePhysics::getCpRotationAngle() const +//{ +// return this->m_cp_rotationAngle; +//} -void TransparentDraggableCorePhysics::setCpExampleAreaHeightCm(double value) -{ - this->m_cp_exampleAreaHeightCm = value; -} +//void TransparentDraggableCorePhysics::setCpRotationAngle(double value) +//{ +// this->m_cp_rotationAngle = value; +//} -double TransparentDraggableCorePhysics::getCpRotationAngle() const -{ - return this->m_cp_rotationAngle; -} +//QString TransparentDraggableCorePhysics::getCpDisplayName() const +//{ +// return this->m_cp_displayName; +//} -void TransparentDraggableCorePhysics::setCpRotationAngle(double 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; -} +//void TransparentDraggableCorePhysics::setCpDisplayName(const QString &value) +//{ +// this->m_cp_displayName = value; +//} int TransparentDraggableCorePhysics::getCpLineWidth() const { @@ -381,88 +372,88 @@ void TransparentDraggableCorePhysics::setCpLineStyle(Qt::PenStyle value) } -double TransparentDraggableCorePhysics::getCpLeftScale() const -{ - return this->m_cp_leftScale; -} +//double TransparentDraggableCorePhysics::getCpLeftScale() const +//{ +// return this->m_cp_leftScale; +//} -void TransparentDraggableCorePhysics::setCpLeftScale(double value) -{ - this->m_cp_leftScale = value; +//void TransparentDraggableCorePhysics::setCpLeftScale(double value) +//{ +// this->m_cp_leftScale = value; -// this->mPlot->yAxis2->setRange(value, this->mPlot->yAxis2->range().upper); -// // 重新绘制图形 -// this->setRange(this->m_left_Low, this->m_left_Low, this->getCpCoreValue(), false); -} +//// this->mPlot->yAxis2->setRange(value, this->mPlot->yAxis2->range().upper); +//// // 重新绘制图形 +//// this->setRange(this->m_left_Low, this->m_left_Low, this->getCpCoreValue(), false); +//} -double TransparentDraggableCorePhysics::getCpRightScale() const -{ - return this->m_cp_rightScale; -} +//double TransparentDraggableCorePhysics::getCpRightScale() const +//{ +// return this->m_cp_rightScale; +//} -void TransparentDraggableCorePhysics::setCpRightScale(double value) -{ - this->m_cp_rightScale = value; +//void TransparentDraggableCorePhysics::setCpRightScale(double value) +//{ +// this->m_cp_rightScale = 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->mPlot->yAxis2->setRange(this->mPlot->yAxis2->range().lower, value); +//// // 重新绘制图形 +//// this->setRange(this->m_left_Low, this->m_left_Low, this->getCpCoreValue(), false); +//} -int TransparentDraggableCorePhysics::getCpScaleType() const -{ - return this->m_cp_scaleType; -} +//int TransparentDraggableCorePhysics::getCpScaleType() const +//{ +// return this->m_cp_scaleType; +//} -void TransparentDraggableCorePhysics::setCpScaleType(int value) -{ - this->m_cp_scaleType = value; +//void TransparentDraggableCorePhysics::setCpScaleType(int value) +//{ +// this->m_cp_scaleType = value; -// int newStyle = 0; -// switch(value) -// { -// case 0: -// // 线性 -// this->mPlot->yAxis2->setScaleType(QCPAxis::stLinear); -// break; -// case 1: -// // 对数 -// this->mPlot->yAxis2->setScaleType(QCPAxis::stLogarithmic); -// break; -// case 2: -// // 倾角 没有倾角类型 -// this->mPlot->yAxis2->setScaleType(QCPAxis::stLogarithmic); -// break; -// } -} +//// int newStyle = 0; +//// switch(value) +//// { +//// case 0: +//// // 线性 +//// this->mPlot->yAxis2->setScaleType(QCPAxis::stLinear); +//// break; +//// case 1: +//// // 对数 +//// this->mPlot->yAxis2->setScaleType(QCPAxis::stLogarithmic); +//// break; +//// case 2: +//// // 倾角 没有倾角类型 +//// this->mPlot->yAxis2->setScaleType(QCPAxis::stLogarithmic); +//// break; +//// } +//} -int TransparentDraggableCorePhysics::getCpScaleDivisionsOrCustom() const -{ - return this->m_cp_scaleDivisionsOrCustom; -} +//int TransparentDraggableCorePhysics::getCpScaleDivisionsOrCustom() const +//{ +// return this->m_cp_scaleDivisionsOrCustom; +//} -void TransparentDraggableCorePhysics::setCpScaleDivisionsOrCustom(int value) -{ - this->m_cp_scaleDivisionsOrCustom = value; +//void TransparentDraggableCorePhysics::setCpScaleDivisionsOrCustom(int value) +//{ +// this->m_cp_scaleDivisionsOrCustom = value; -// // 创建文本刻度 Ticker -// QSharedPointer textTicker(new QCPAxisTickerText); -// double minVal = this->mPlot->yAxis2->range().lower; -// double maxVal = this->mPlot->yAxis2->range().upper; -// // 计算步长:(最大值 - 最小值) / 等分数 -// double step = (maxVal - minVal) / value; -// // 生成刻度 -// for (int i = 0; i <= value; ++i) { -// double value = minVal + step * i; -// // 取整显示(34.0 显示为 "34") -// QString label = QString::number(qRound(value)); -// textTicker->addTick(value, label); -// } -// // 应用 Ticker -// this->mPlot->yAxis2->setTicker(textTicker); -// // 设置范围(稍微留边距,让刻度显示完整) -//// this->mPlot->yAxis2->setRange(minVal - step * 0.1, maxVal + step * 0.1); -} +//// // 创建文本刻度 Ticker +//// QSharedPointer textTicker(new QCPAxisTickerText); +//// double minVal = this->mPlot->yAxis2->range().lower; +//// double maxVal = this->mPlot->yAxis2->range().upper; +//// // 计算步长:(最大值 - 最小值) / 等分数 +//// double step = (maxVal - minVal) / value; +//// // 生成刻度 +//// for (int i = 0; i <= value; ++i) { +//// double value = minVal + step * i; +//// // 取整显示(34.0 显示为 "34") +//// QString label = QString::number(qRound(value)); +//// textTicker->addTick(value, label); +//// } +//// // 应用 Ticker +//// this->mPlot->yAxis2->setTicker(textTicker); +//// // 设置范围(稍微留边距,让刻度显示完整) +////// this->mPlot->yAxis2->setRange(minVal - step * 0.1, maxVal + step * 0.1); +//} QString TransparentDraggableCorePhysics::getCpDisplayUnit() const { diff --git a/logPlus/TransparentDraggableCorePhysics.h b/logPlus/TransparentDraggableCorePhysics.h index 294e5fa..9f212e5 100644 --- a/logPlus/TransparentDraggableCorePhysics.h +++ b/logPlus/TransparentDraggableCorePhysics.h @@ -48,14 +48,11 @@ public: double getCpCoreValue() const; void setCpCoreValue(double value); - double getCpExampleAreaHeightCm() const; - void setCpExampleAreaHeightCm(double value); +// double getCpRotationAngle() const; +// void setCpRotationAngle(double value); - double getCpRotationAngle() const; - void setCpRotationAngle(double value); - - QString getCpDisplayName() const; - void setCpDisplayName(const QString &value); +// QString getCpDisplayName() const; +// void setCpDisplayName(const QString &value); int getCpLineWidth() const; void setCpLineWidth(int value); @@ -66,17 +63,17 @@ public: Qt::PenStyle getCpLineStyle() const; void setCpLineStyle(Qt::PenStyle value); - double getCpLeftScale() const; - void setCpLeftScale(double value); +// double getCpLeftScale() const; +// void setCpLeftScale(double value); - double getCpRightScale() const; - void setCpRightScale(double value); +// double getCpRightScale() const; +// void setCpRightScale(double value); - int getCpScaleType() const; - void setCpScaleType(int value); +// int getCpScaleType() const; +// void setCpScaleType(int value); - int getCpScaleDivisionsOrCustom() const; - void setCpScaleDivisionsOrCustom(int value); +// int getCpScaleDivisionsOrCustom() const; +// void setCpScaleDivisionsOrCustom(int value); QString getCpDisplayUnit() const; void setCpDisplayUnit(const QString &value); @@ -124,16 +121,15 @@ signals: void rangeChanged(QCPRange newRange); private: - double m_cp_exampleAreaHeightCm; // 例区高度(cm) - double m_cp_rotationAngle; // 旋转角度 - QString m_cp_displayName; // 显示名称 +// double m_cp_rotationAngle; // 旋转角度 +// QString m_cp_displayName; // 显示名称 int m_cp_lineWidth; // 线宽 QColor m_cp_lineColor; // 线条颜色 Qt::PenStyle m_cp_lineStyle; // 线型 - double m_cp_leftScale = 0; // 左刻度 - double m_cp_rightScale = 100; // 右刻度 - int m_cp_scaleType; // 刻度类型 - int m_cp_scaleDivisionsOrCustom; // 等分刻度数或自定序列 +// double m_cp_leftScale = 0; // 左刻度 +// double m_cp_rightScale = 100; // 右刻度 +// int m_cp_scaleType; // 刻度类型 +// int m_cp_scaleDivisionsOrCustom; // 等分刻度数或自定序列 QString m_cp_displayUnit; // 显示单位 QString m_cp_curveName; // 曲线名称 QString m_cp_curveUnit; // 曲线单位 diff --git a/logPlus/qmycustomplot.cpp b/logPlus/qmycustomplot.cpp index f69bac9..08422fe 100644 --- a/logPlus/qmycustomplot.cpp +++ b/logPlus/qmycustomplot.cpp @@ -1930,6 +1930,10 @@ void QMyCustomPlot::addCorePhysics() void QMyCustomPlot::addCorePhysicsWithParam(int Order, double Depth, double CorrDepth, double CoreValue) { +// qDebug() << Order << "====="; +// qDebug() << Depth << "====="; +// qDebug() << CorrDepth << "====="; +// qDebug() << CoreValue << "====="; QtCommonClass *qtCommon = new QtCommonClass(this); QString strUuid = qtCommon->getUUid(); TransparentDraggableCorePhysics *dragRect = new TransparentDraggableCorePhysics(this, strUuid);