对数曲线填充处理
This commit is contained in:
parent
714e9a5379
commit
45b3b4de88
|
|
@ -63,7 +63,7 @@ signals:
|
||||||
//岩性填充-填充
|
//岩性填充-填充
|
||||||
void sig_ChangeFillMode(QString strUuid, 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, QString strOtherScaleType, QColor frontColor, QColor backColor, QString newFillMode);
|
||||||
//置顶层
|
//置顶层
|
||||||
void sig_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
void sig_Raise(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,8 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
{
|
{
|
||||||
QString newScaleType = pProperty->valueText();
|
QString newScaleType = pProperty->valueText();
|
||||||
emit CallManage::getInstance()->sig_ChangeScaleType(m_strUuid, 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);
|
||||||
|
//更新填充
|
||||||
|
ChangFillProperty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if("颜色" == m_propertyData[pProperty])
|
else if("颜色" == m_propertyData[pProperty])
|
||||||
|
|
@ -274,6 +276,7 @@ void PropertyWidget::ChangFillProperty()
|
||||||
QString newHeadFill = "不绘制";
|
QString newHeadFill = "不绘制";
|
||||||
float vMax = 0.0;
|
float vMax = 0.0;
|
||||||
float vMin = 0.0;
|
float vMin = 0.0;
|
||||||
|
QString strOtherScaleType = "线性";
|
||||||
QColor frontColor;//岩性前景色
|
QColor frontColor;//岩性前景色
|
||||||
QColor backColor;//岩性背景色
|
QColor backColor;//岩性背景色
|
||||||
|
|
||||||
|
|
@ -318,6 +321,7 @@ void PropertyWidget::ChangFillProperty()
|
||||||
{
|
{
|
||||||
vMax = m_listMax[i];
|
vMax = m_listMax[i];
|
||||||
vMin = m_listMin[i];
|
vMin = m_listMin[i];
|
||||||
|
strOtherScaleType = m_strListOtherScaleType[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -379,7 +383,7 @@ void PropertyWidget::ChangFillProperty()
|
||||||
{
|
{
|
||||||
emit CallManage::getInstance()->sig_ChangeFillMode(m_strUuid, 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, strOtherScaleType, frontColor, backColor, newFillMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -476,7 +480,7 @@ void PropertyWidget::initWidgetProperty()
|
||||||
_CreateVariantPropertyItem("水平格线", "中格线间隔(m)", 2.0, QVariant::Double);
|
_CreateVariantPropertyItem("水平格线", "中格线间隔(m)", 2.0, QVariant::Double);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PropertyWidget::initCurveProperty(FormInfo *formInfo, QStringList strListOtherLine, QList<float> listMin, QList<float> listMax)
|
void PropertyWidget::initCurveProperty(FormInfo *formInfo, QStringList strListOtherLine, QList<float> listMin, QList<float> listMax, QStringList strListOtherScaleType)
|
||||||
//void PropertyWidget::initCurveProperty(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor, double dWidth, QStringList strListOtherLine)
|
//void PropertyWidget::initCurveProperty(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor, double dWidth, QStringList strListOtherLine)
|
||||||
{
|
{
|
||||||
//初始化,清空
|
//初始化,清空
|
||||||
|
|
@ -491,6 +495,7 @@ void PropertyWidget::initCurveProperty(FormInfo *formInfo, QStringList strListOt
|
||||||
double dWidth = formInfo->m_dWidth;
|
double dWidth = formInfo->m_dWidth;
|
||||||
float vmax = formInfo->m_vmax;
|
float vmax = formInfo->m_vmax;
|
||||||
float vmin = formInfo->m_vmin;
|
float vmin = formInfo->m_vmin;
|
||||||
|
QString strScaleType = formInfo->m_strScaleType;
|
||||||
QColor frontColor = formInfo->m_frontColor;
|
QColor frontColor = formInfo->m_frontColor;
|
||||||
QColor backColor = formInfo->m_backColor;
|
QColor backColor = formInfo->m_backColor;
|
||||||
|
|
||||||
|
|
@ -504,10 +509,12 @@ void PropertyWidget::initCurveProperty(FormInfo *formInfo, QStringList strListOt
|
||||||
m_strListOtherLine.clear();
|
m_strListOtherLine.clear();
|
||||||
m_listMin.clear();
|
m_listMin.clear();
|
||||||
m_listMax.clear();
|
m_listMax.clear();
|
||||||
|
m_strListOtherScaleType.clear();
|
||||||
//
|
//
|
||||||
m_strListOtherLine.append(strListOtherLine);
|
m_strListOtherLine.append(strListOtherLine);
|
||||||
m_listMin.append(listMin);
|
m_listMin.append(listMin);
|
||||||
m_listMax.append(listMax);
|
m_listMax.append(listMax);
|
||||||
|
m_strListOtherScaleType.append(strListOtherScaleType);
|
||||||
|
|
||||||
//当前属性类型
|
//当前属性类型
|
||||||
m_strCurrentProperty = Curve_Property;
|
m_strCurrentProperty = Curve_Property;
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ public:
|
||||||
QStringList m_strListOtherLine;
|
QStringList m_strListOtherLine;
|
||||||
QList<float> m_listMin;
|
QList<float> m_listMin;
|
||||||
QList<float> m_listMax;
|
QList<float> m_listMax;
|
||||||
|
QStringList m_strListOtherScaleType;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QWidget* GetPropertyWidget();
|
QWidget* GetPropertyWidget();
|
||||||
|
|
@ -66,7 +67,7 @@ public:
|
||||||
void InitCurrentViewInfo(); //初始化属性,清空
|
void InitCurrentViewInfo(); //初始化属性,清空
|
||||||
void initWidgetProperty(); //可视解释整体属性
|
void initWidgetProperty(); //可视解释整体属性
|
||||||
//void initCurveProperty(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor, double dWidth, QStringList strListOtherLine); //曲线属性
|
//void initCurveProperty(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QColor lineColor, double dWidth, QStringList strListOtherLine); //曲线属性
|
||||||
void initCurveProperty(FormInfo *formInfo, QStringList strListOtherLine, QList<float> listMin, QList<float> listMax);
|
void initCurveProperty(FormInfo *formInfo, QStringList strListOtherLine, QList<float> listMin, QList<float> listMax, QStringList strListOtherScaleType);
|
||||||
|
|
||||||
void ChangFillProperty();//填充属性改变
|
void ChangFillProperty();//填充属性改变
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,6 @@ void FormDraw::s_addLine(QString strUuid, QString strSlfName, QString strWellNam
|
||||||
|
|
||||||
curv->show();
|
curv->show();
|
||||||
initForm(curv, strSlfName, strLineName);
|
initForm(curv, strSlfName, strLineName);
|
||||||
|
|
||||||
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
@ -489,6 +488,8 @@ void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLi
|
||||||
|
|
||||||
//最大值,最小值
|
//最大值,最小值
|
||||||
vmax=vmin=val[0];
|
vmax=vmin=val[0];
|
||||||
|
//vmax=vmin=log(val[0]);
|
||||||
|
|
||||||
// for(int i=1;i<count;i++)
|
// for(int i=1;i<count;i++)
|
||||||
// {
|
// {
|
||||||
// if(vmax<val[i])vmax=val[i];
|
// if(vmax<val[i])vmax=val[i];
|
||||||
|
|
@ -506,6 +507,15 @@ void FormDraw::initForm(QMyCustomPlot *widget, QString strSlfName, QString strLi
|
||||||
//
|
//
|
||||||
x.append(-(sdep+ rlev*i));
|
x.append(-(sdep+ rlev*i));
|
||||||
y.append(val[i]);
|
y.append(val[i]);
|
||||||
|
|
||||||
|
/*if(newLeftScale==-9999)
|
||||||
|
{
|
||||||
|
if(vmax<log(val[i]))vmax=log(val[i]);
|
||||||
|
if(vmin>log(val[i]))vmin=log(val[i]);
|
||||||
|
}
|
||||||
|
//
|
||||||
|
x.append(-(sdep+ rlev*i));
|
||||||
|
y.append(log(val[i]));*/
|
||||||
}
|
}
|
||||||
|
|
||||||
if(newLeftScale!=-9999)
|
if(newLeftScale!=-9999)
|
||||||
|
|
|
||||||
|
|
@ -51,8 +51,8 @@ FormInfo::FormInfo(QWidget *parent, QString strSlfName, QString strWellName, QSt
|
||||||
//岩性填充-不填充
|
//岩性填充-不填充
|
||||||
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_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, 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, QString, QColor, QColor, QString)),
|
||||||
this, SLOT(s_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, QString, QColor, QString, QString, float, float, QString, QColor, QColor, QString)));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -397,7 +397,7 @@ void FormInfo::s_ClearFillMode(QString strUuid, QString strSlfName, QString strW
|
||||||
//岩性填充-填充
|
//岩性填充-填充
|
||||||
void FormInfo::s_ChangeFillMode(QString strUuid, 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, QString strOtherScaleType, QColor frontColor, QColor backColor, QString newFillMode)
|
||||||
{
|
{
|
||||||
if(m_strUuid == strUuid &&
|
if(m_strUuid == strUuid &&
|
||||||
m_strSlfName == strSlfName &&
|
m_strSlfName == strSlfName &&
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ public slots:
|
||||||
//岩性填充-填充
|
//岩性填充-填充
|
||||||
void s_ChangeFillMode(QString strUuid, 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, QString strOtherScaleType, QColor frontColor, QColor backColor, QString newFillMode);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QString m_strUuid;
|
QString m_strUuid;
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ void MyCustomPlot::init(QString strName, QVector<double> xx, QVector<double> yy0
|
||||||
|
|
||||||
void MyCustomPlot::mousePressEvent(QMouseEvent *event)
|
void MyCustomPlot::mousePressEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
qDebug() << "mousePress";
|
//qDebug() << "mousePress";
|
||||||
QCustomPlot::mousePressEvent(event);
|
QCustomPlot::mousePressEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -253,10 +253,11 @@ void PreQTableWidget::mouseReleaseEvent(QMouseEvent *event)
|
||||||
//
|
//
|
||||||
QList<float> listMin;
|
QList<float> listMin;
|
||||||
QList<float> listMax;
|
QList<float> listMax;
|
||||||
QStringList strListOtherLine = getListLineName(formInfo->m_strLineName, listMin, listMax);
|
QStringList strListOtherScaleType;
|
||||||
|
QStringList strListOtherLine = getListLineName(formInfo->m_strLineName, listMin, listMax, strListOtherScaleType);
|
||||||
//PropertyService()->initCurveProperty(formInfo->m_strSlfName, formInfo->m_strWellName, formInfo->m_strTrackName, formInfo->m_strLineName, formInfo->m_lineColor, formInfo->m_dWidth, strListOtherLine);
|
//PropertyService()->initCurveProperty(formInfo->m_strSlfName, formInfo->m_strWellName, formInfo->m_strTrackName, formInfo->m_strLineName, formInfo->m_lineColor, formInfo->m_dWidth, strListOtherLine);
|
||||||
|
|
||||||
PropertyService()->initCurveProperty(formInfo, strListOtherLine, listMin, listMax);
|
PropertyService()->initCurveProperty(formInfo, strListOtherLine, listMin, listMax, strListOtherScaleType);
|
||||||
|
|
||||||
//曲线置顶显示,激活可选
|
//曲线置顶显示,激活可选
|
||||||
emit CallManage::getInstance()->sig_Raise(m_strUuid, 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);
|
||||||
|
|
@ -264,7 +265,7 @@ void PreQTableWidget::mouseReleaseEvent(QMouseEvent *event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList PreQTableWidget::getListLineName(QString strLineName, QList<float> &listMin, QList<float> &listMax)
|
QStringList PreQTableWidget::getListLineName(QString strLineName, QList<float> &listMin, QList<float> &listMax, QStringList &strListOtherScaleType)
|
||||||
{
|
{
|
||||||
QStringList strListOtherLine;
|
QStringList strListOtherLine;
|
||||||
for(int i=0; i<rowCount(); i++)
|
for(int i=0; i<rowCount(); i++)
|
||||||
|
|
@ -280,6 +281,7 @@ QStringList PreQTableWidget::getListLineName(QString strLineName, QList<float> &
|
||||||
strListOtherLine.push_back(strTmp);
|
strListOtherLine.push_back(strTmp);
|
||||||
listMin.push_back(formInfo->m_vmin);
|
listMin.push_back(formInfo->m_vmin);
|
||||||
listMax.push_back(formInfo->m_vmax);
|
listMax.push_back(formInfo->m_vmax);
|
||||||
|
strListOtherScaleType.push_back(formInfo->m_strScaleType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public:
|
||||||
//QStringList m_listLineName;//会漏掉第1条曲线,因为在track添加的
|
//QStringList m_listLineName;//会漏掉第1条曲线,因为在track添加的
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QStringList getListLineName(QString strLineName, QList<float> &listMin, QList<float> &listMax);
|
QStringList getListLineName(QString strLineName, QList<float> &listMin, QList<float> &listMax, QStringList &strListOtherScaleType);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,8 @@ QMyCustomPlot::QMyCustomPlot(QWidget *parent, QString strSlfName, QString strWel
|
||||||
//岩性填充-不填充
|
//岩性填充-不填充
|
||||||
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_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, 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, QString , QColor, QColor, QString)),
|
||||||
this, SLOT(s_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, QString, QColor, QString, QString, float, float, QString, QColor, QColor, QString)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -56,7 +56,7 @@ void QMyCustomPlot::init(QString strName, QVector<double> xx, QVector<double> yy
|
||||||
|
|
||||||
void QMyCustomPlot::mousePressEvent(QMouseEvent *event)
|
void QMyCustomPlot::mousePressEvent(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
qDebug() << "mousePress";
|
//qDebug() << "mousePress";
|
||||||
QCustomPlot::mousePressEvent(event);
|
QCustomPlot::mousePressEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -198,7 +198,7 @@ void QMyCustomPlot::s_ChangeLeftScale(QString strUuid, QString strSlfName, QStri
|
||||||
//其他曲线
|
//其他曲线
|
||||||
s_ChangeFillMode(m_strUuid, 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_strOtherScaleType, m_frontColor, m_backColor, m_newFillMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -225,7 +225,7 @@ void QMyCustomPlot::s_ChangeRightScale(QString strUuid, QString strSlfName, QStr
|
||||||
//其他曲线
|
//其他曲线
|
||||||
s_ChangeFillMode(m_strUuid, 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_strOtherScaleType, m_frontColor, m_backColor, m_newFillMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -259,9 +259,9 @@ void QMyCustomPlot::s_ChangeScaleType(QString strUuid, QString strSlfName, QStri
|
||||||
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, m_vMax, strScaleType, m_frontColor, m_backColor, m_newFillMode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -339,7 +339,7 @@ void QMyCustomPlot::s_ClearFillMode(QString strUuid, QString strSlfName, QString
|
||||||
//岩性填充-填充
|
//岩性填充-填充
|
||||||
void QMyCustomPlot::s_ChangeFillMode(QString strUuid, 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, QString strOtherScaleType, QColor frontColor, QColor backColor, QString newFillMode)
|
||||||
{
|
{
|
||||||
|
|
||||||
if(m_strUuid == strUuid &&
|
if(m_strUuid == strUuid &&
|
||||||
|
|
@ -356,6 +356,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
m_newHeadFill = newHeadFill;
|
m_newHeadFill = newHeadFill;
|
||||||
m_vMin = vMin;
|
m_vMin = vMin;
|
||||||
m_vMax = vMax;
|
m_vMax = vMax;
|
||||||
|
m_strOtherScaleType = strOtherScaleType;
|
||||||
m_frontColor = frontColor;
|
m_frontColor = frontColor;
|
||||||
m_backColor = backColor;
|
m_backColor = backColor;
|
||||||
m_newFillMode = newFillMode;
|
m_newFillMode = newFillMode;
|
||||||
|
|
@ -428,15 +429,13 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
{
|
{
|
||||||
if(newFillMode=="左填充")
|
if(newFillMode=="左填充")
|
||||||
{
|
{
|
||||||
// if(m_strScaleType=="对数")
|
float iX1_Tmp=m_iX1;
|
||||||
// {
|
float iX2_Tmp=m_iX2;
|
||||||
// float iX1_Tmp=log(m_iX1);
|
if(m_strScaleType=="对数")
|
||||||
// m_iX1 = iX1_Tmp;
|
{
|
||||||
// //
|
iX1_Tmp=log(m_iX1);
|
||||||
|
iX2_Tmp=log(m_iX2);
|
||||||
// float iX2_Tmp=log(m_iX2);
|
}
|
||||||
// m_iX2 = iX2_Tmp;
|
|
||||||
// }
|
|
||||||
|
|
||||||
//其他曲线(左填充)
|
//其他曲线(左填充)
|
||||||
CLogIO *logio=new CLogIO();
|
CLogIO *logio=new CLogIO();
|
||||||
|
|
@ -480,40 +479,39 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
{
|
{
|
||||||
float x0=-(sdep+ rlev*i);
|
float x0=-(sdep+ rlev*i);
|
||||||
float y0_old=val[i];
|
float y0_old=val[i];
|
||||||
float y0 = (m_iX2-m_iX1)*(val[i]-vMin)/(vMax-vMin) + m_iX1;
|
float y0 = (iX2_Tmp-iX1_Tmp)*(val[i]-vMin)/(vMax-vMin) + iX1_Tmp;
|
||||||
|
|
||||||
//读取基线
|
//读取基线
|
||||||
float BaseY0=0;
|
float BaseY0=0;
|
||||||
float BaseY0_Tmp=0;
|
float BaseY0_Tmp=0;
|
||||||
logio->ReadCurve(indexBaseCurv, 0-x0, 1, &BaseY0);
|
logio->ReadCurve(indexBaseCurv, 0-x0, 1, &BaseY0);
|
||||||
// if(m_strScaleType=="对数")
|
if(m_strScaleType=="对数")
|
||||||
// {
|
{
|
||||||
// BaseY0_Tmp=log(BaseY0);
|
BaseY0_Tmp=log(BaseY0);
|
||||||
// BaseY0 = BaseY0_Tmp;
|
BaseY0 = BaseY0_Tmp;
|
||||||
// }
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
if(i+1<count)
|
if(i+1<count)
|
||||||
{
|
{
|
||||||
float x1=-(sdep+ rlev*(i+1));
|
float x1=-(sdep+ rlev*(i+1));
|
||||||
//float y1=val[i+1];
|
//float y1=val[i+1];
|
||||||
float y1 = (m_iX2-m_iX1)*(val[i+1]-vMin)/(vMax-vMin) + m_iX1;
|
float y1 = (iX2_Tmp-iX1_Tmp)*(val[i+1]-vMin)/(vMax-vMin) + iX1_Tmp;
|
||||||
//读取基线
|
//读取基线
|
||||||
float BaseY1=0;
|
float BaseY1=0;
|
||||||
float BaseY1_Tmp=0;
|
float BaseY1_Tmp=0;
|
||||||
logio->ReadCurve(indexBaseCurv, 0-x1, 1, &BaseY1);
|
logio->ReadCurve(indexBaseCurv, 0-x1, 1, &BaseY1);
|
||||||
|
if(m_strScaleType=="对数")
|
||||||
// if(m_strScaleType=="对数")
|
{
|
||||||
// {
|
BaseY1_Tmp=log(BaseY1);
|
||||||
// BaseY1_Tmp=log(BaseY1);
|
BaseY1 = BaseY1_Tmp;
|
||||||
// BaseY1 = BaseY1_Tmp;
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
if(BaseY0<=y0 && BaseY1<=y1)
|
if(BaseY0<=y0 && BaseY1<=y1)
|
||||||
{
|
{
|
||||||
//基线在左,采用基线值
|
//基线在左,采用基线值
|
||||||
//y0=BaseY0;
|
//y0=BaseY0;
|
||||||
y0_old = (BaseY0-m_iX1)/(m_iX2-m_iX1)*(vMax-vMin) + vMin;
|
y0_old = (BaseY0-iX1_Tmp)/(iX2_Tmp-iX1_Tmp)*(vMax-vMin) + vMin;
|
||||||
//
|
//
|
||||||
x.append(x0);
|
x.append(x0);
|
||||||
y.append(y0_old);
|
y.append(y0_old);
|
||||||
|
|
@ -528,7 +526,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
{
|
{
|
||||||
//基线起点在左,采用基线值
|
//基线起点在左,采用基线值
|
||||||
//y0=BaseY0;
|
//y0=BaseY0;
|
||||||
y0_old = (BaseY0-m_iX1)/(m_iX2-m_iX1)*(vMax-vMin) + vMin;
|
y0_old = (BaseY0-iX1_Tmp)/(iX2_Tmp-iX1_Tmp)*(vMax-vMin) + vMin;
|
||||||
//
|
//
|
||||||
x.append(x0);
|
x.append(x0);
|
||||||
y.append(y0_old);
|
y.append(y0_old);
|
||||||
|
|
@ -536,7 +534,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
//插值
|
//插值
|
||||||
float xNew=x0-rlev*(y0-BaseY0)/((BaseY1-y1)+(y0-BaseY0));//(BaseY1-y1);
|
float xNew=x0-rlev*(y0-BaseY0)/((BaseY1-y1)+(y0-BaseY0));//(BaseY1-y1);
|
||||||
float yNew=(y0-y1)/(x0-x1)*(xNew-x1) + y1;
|
float yNew=(y0-y1)/(x0-x1)*(xNew-x1) + y1;
|
||||||
float yNew_Old=(yNew-m_iX1)/(m_iX2-m_iX1)*(vMax-vMin) + vMin;
|
float yNew_Old=(yNew-iX1_Tmp)/(iX2_Tmp-iX1_Tmp)*(vMax-vMin) + vMin;
|
||||||
//
|
//
|
||||||
x.append(xNew);
|
x.append(xNew);
|
||||||
y.append(yNew_Old);
|
y.append(yNew_Old);
|
||||||
|
|
@ -550,7 +548,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
//插值
|
//插值
|
||||||
float xNew=x0-rlev*(y0-BaseY0)/((BaseY1-y1)+(y0-BaseY0));//(BaseY1-y1);
|
float xNew=x0-rlev*(y0-BaseY0)/((BaseY1-y1)+(y0-BaseY0));//(BaseY1-y1);
|
||||||
float yNew=(BaseY0-BaseY1)/(x0-x1)*(xNew-x1) + BaseY1;
|
float yNew=(BaseY0-BaseY1)/(x0-x1)*(xNew-x1) + BaseY1;
|
||||||
float yNew_Old=(yNew-m_iX1)/(m_iX2-m_iX1)*(vMax-vMin) + vMin;
|
float yNew_Old=(yNew-iX1_Tmp)/(iX2_Tmp-iX1_Tmp)*(vMax-vMin) + vMin;
|
||||||
//
|
//
|
||||||
x.append(xNew);
|
x.append(xNew);
|
||||||
y.append(yNew_Old);
|
y.append(yNew_Old);
|
||||||
|
|
@ -563,15 +561,11 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
{
|
{
|
||||||
//基线在左,采用基线值
|
//基线在左,采用基线值
|
||||||
//y0=BaseY0;
|
//y0=BaseY0;
|
||||||
y0_old = (BaseY0-m_iX1)/(m_iX2-m_iX1)*(vMax-vMin) + vMin;
|
y0_old = (BaseY0-iX1_Tmp)/(iX2_Tmp-iX1_Tmp)*(vMax-vMin) + vMin;
|
||||||
}
|
}
|
||||||
x.append(x0);
|
x.append(x0);
|
||||||
y.append(y0_old);
|
y.append(y0_old);
|
||||||
}
|
}
|
||||||
|
|
||||||
//newVal = (m_iX2-m_iX1)*(val[i]-vMin)/(vMax-vMin) + m_iX1;
|
|
||||||
//newVal = val[i];
|
|
||||||
//y.append(newVal);
|
|
||||||
}
|
}
|
||||||
logio->CloseCurve(indexBaseCurv);
|
logio->CloseCurve(indexBaseCurv);
|
||||||
delete logio;
|
delete logio;
|
||||||
|
|
@ -584,6 +578,14 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
}
|
}
|
||||||
else if(newFillMode=="右填充")
|
else if(newFillMode=="右填充")
|
||||||
{
|
{
|
||||||
|
float iX1_Tmp=m_iX1;
|
||||||
|
float iX2_Tmp=m_iX2;
|
||||||
|
if(m_strScaleType=="对数")
|
||||||
|
{
|
||||||
|
iX1_Tmp=log(m_iX1);
|
||||||
|
iX2_Tmp=log(m_iX2);
|
||||||
|
}
|
||||||
|
|
||||||
//其他曲线(右填充)
|
//其他曲线(右填充)
|
||||||
CLogIO *logio=new CLogIO();
|
CLogIO *logio=new CLogIO();
|
||||||
logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead);
|
logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead);
|
||||||
|
|
@ -626,20 +628,33 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
{
|
{
|
||||||
float x0=-(sdep+ rlev*i);
|
float x0=-(sdep+ rlev*i);
|
||||||
float y0_old=val[i];
|
float y0_old=val[i];
|
||||||
float y0 = (m_iX2-m_iX1)*(val[i]-vMin)/(vMax-vMin) + m_iX1;
|
float y0 = (iX2_Tmp-iX1_Tmp)*(val[i]-vMin)/(vMax-vMin) + iX1_Tmp;
|
||||||
|
|
||||||
//读取基线
|
//读取基线
|
||||||
float BaseY0=0;
|
float BaseY0=0;
|
||||||
|
float BaseY0_Tmp=0;
|
||||||
logio->ReadCurve(indexBaseCurv, 0-x0, 1, &BaseY0);
|
logio->ReadCurve(indexBaseCurv, 0-x0, 1, &BaseY0);
|
||||||
|
if(m_strScaleType=="对数")
|
||||||
|
{
|
||||||
|
BaseY0_Tmp=log(BaseY0);
|
||||||
|
BaseY0 = BaseY0_Tmp;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
if(i+1<count)
|
if(i+1<count)
|
||||||
{
|
{
|
||||||
float x1=-(sdep+ rlev*(i+1));
|
float x1=-(sdep+ rlev*(i+1));
|
||||||
//float y1=val[i+1];
|
//float y1=val[i+1];
|
||||||
float y1 = (m_iX2-m_iX1)*(val[i+1]-vMin)/(vMax-vMin) + m_iX1;
|
float y1 = (iX2_Tmp-iX1_Tmp)*(val[i+1]-vMin)/(vMax-vMin) + iX1_Tmp;
|
||||||
//读取基线
|
//读取基线
|
||||||
float BaseY1=0;
|
float BaseY1=0;
|
||||||
|
float BaseY1_Tmp=0;
|
||||||
logio->ReadCurve(indexBaseCurv, 0-x1, 1, &BaseY1);
|
logio->ReadCurve(indexBaseCurv, 0-x1, 1, &BaseY1);
|
||||||
|
if(m_strScaleType=="对数")
|
||||||
|
{
|
||||||
|
BaseY1_Tmp=log(BaseY1);
|
||||||
|
BaseY1 = BaseY1_Tmp;
|
||||||
|
}
|
||||||
|
|
||||||
if(BaseY0<=y0 && BaseY1<=y1)
|
if(BaseY0<=y0 && BaseY1<=y1)
|
||||||
{
|
{
|
||||||
|
|
@ -651,7 +666,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
{
|
{
|
||||||
//基线在右,采用基线值
|
//基线在右,采用基线值
|
||||||
//y0=BaseY0;
|
//y0=BaseY0;
|
||||||
y0_old = (BaseY0-m_iX1)/(m_iX2-m_iX1)*(vMax-vMin) + vMin;
|
y0_old = (BaseY0-iX1_Tmp)/(iX2_Tmp-iX1_Tmp)*(vMax-vMin) + vMin;
|
||||||
//
|
//
|
||||||
x.append(x0);
|
x.append(x0);
|
||||||
y.append(y0_old);
|
y.append(y0_old);
|
||||||
|
|
@ -665,7 +680,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
//插值
|
//插值
|
||||||
float xNew=x0-rlev*(y0-BaseY0)/((BaseY1-y1)+(y0-BaseY0));//(BaseY1-y1);
|
float xNew=x0-rlev*(y0-BaseY0)/((BaseY1-y1)+(y0-BaseY0));//(BaseY1-y1);
|
||||||
float yNew=(y0-y1)/(x0-x1)*(xNew-x1) + y1;
|
float yNew=(y0-y1)/(x0-x1)*(xNew-x1) + y1;
|
||||||
float yNew_Old=(yNew-m_iX1)/(m_iX2-m_iX1)*(vMax-vMin) + vMin;
|
float yNew_Old=(yNew-iX1_Tmp)/(iX2_Tmp-iX1_Tmp)*(vMax-vMin) + vMin;
|
||||||
//
|
//
|
||||||
x.append(xNew);
|
x.append(xNew);
|
||||||
y.append(yNew_Old);
|
y.append(yNew_Old);
|
||||||
|
|
@ -674,7 +689,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
{
|
{
|
||||||
//基线在右,采用基线值
|
//基线在右,采用基线值
|
||||||
//y0=BaseY0;
|
//y0=BaseY0;
|
||||||
y0_old = (BaseY0-m_iX1)/(m_iX2-m_iX1)*(vMax-vMin) + vMin;
|
y0_old = (BaseY0-iX1_Tmp)/(iX2_Tmp-iX1_Tmp)*(vMax-vMin) + vMin;
|
||||||
//
|
//
|
||||||
x.append(x0);
|
x.append(x0);
|
||||||
y.append(y0_old);
|
y.append(y0_old);
|
||||||
|
|
@ -682,7 +697,7 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
//插值
|
//插值
|
||||||
float xNew=x0-rlev*(y0-BaseY0)/((BaseY1-y1)+(y0-BaseY0));//(BaseY1-y1);
|
float xNew=x0-rlev*(y0-BaseY0)/((BaseY1-y1)+(y0-BaseY0));//(BaseY1-y1);
|
||||||
float yNew=(BaseY0-BaseY1)/(x0-x1)*(xNew-x1) + BaseY1;
|
float yNew=(BaseY0-BaseY1)/(x0-x1)*(xNew-x1) + BaseY1;
|
||||||
float yNew_Old=(yNew-m_iX1)/(m_iX2-m_iX1)*(vMax-vMin) + vMin;
|
float yNew_Old=(yNew-iX1_Tmp)/(iX2_Tmp-iX1_Tmp)*(vMax-vMin) + vMin;
|
||||||
//
|
//
|
||||||
x.append(xNew);
|
x.append(xNew);
|
||||||
y.append(yNew_Old);
|
y.append(yNew_Old);
|
||||||
|
|
@ -695,15 +710,11 @@ void QMyCustomPlot::s_ChangeFillMode(QString strUuid, QString strSlfName, QStrin
|
||||||
{
|
{
|
||||||
//基线在右,采用基线值
|
//基线在右,采用基线值
|
||||||
//y0=BaseY0;
|
//y0=BaseY0;
|
||||||
y0_old = (BaseY0-m_iX1)/(m_iX2-m_iX1)*(vMax-vMin) + vMin;
|
y0_old = (BaseY0-iX1_Tmp)/(iX2_Tmp-iX1_Tmp)*(vMax-vMin) + vMin;
|
||||||
}
|
}
|
||||||
x.append(x0);
|
x.append(x0);
|
||||||
y.append(y0_old);
|
y.append(y0_old);
|
||||||
}
|
}
|
||||||
|
|
||||||
//newVal = (m_iX2-m_iX1)*(val[i]-vMin)/(vMax-vMin) + m_iX1;
|
|
||||||
//newVal = val[i];
|
|
||||||
//y.append(newVal);
|
|
||||||
}
|
}
|
||||||
logio->CloseCurve(indexBaseCurv);
|
logio->CloseCurve(indexBaseCurv);
|
||||||
delete logio;
|
delete logio;
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ public:
|
||||||
QString m_newHeadFill;
|
QString m_newHeadFill;
|
||||||
float m_vMin;
|
float m_vMin;
|
||||||
float m_vMax;
|
float m_vMax;
|
||||||
|
QString m_strOtherScaleType;
|
||||||
QString m_strScaleType="线性";//刻度类型(线性,对数)
|
QString m_strScaleType="线性";//刻度类型(线性,对数)
|
||||||
|
|
||||||
QColor m_frontColor;//岩性前景色
|
QColor m_frontColor;//岩性前景色
|
||||||
|
|
@ -78,7 +79,7 @@ public slots:
|
||||||
//岩性填充-填充
|
//岩性填充-填充
|
||||||
void s_ChangeFillMode(QString strUuid, 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, QString strOtherScaleType, QColor frontColor, QColor backColor, QString newFillMode);
|
||||||
|
|
||||||
void onAddRect();
|
void onAddRect();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user