井壁取心图标,按照老版设置大小
This commit is contained in:
parent
1287c199a0
commit
1f1870862d
|
|
@ -1080,8 +1080,9 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
double h = SideWallCoreHeight * g_dPixelPerCm; //0.4cm //40;
|
double h = SideWallCoreHeight * g_dPixelPerCm; //0.4cm //40;
|
||||||
double x1 = m_tdSwallCore->mPlot->xAxis->coordToPixel(-lower);
|
double x1 = m_tdSwallCore->mPlot->xAxis->coordToPixel(-lower);
|
||||||
//
|
//
|
||||||
double Depth2 = m_tdSwallCore->mPlot->xAxis->pixelToCoord(x1-h);
|
double Depth1 = m_tdSwallCore->mPlot->xAxis->pixelToCoord(x1+h/2.0);
|
||||||
m_tdSwallCore->setRange(-lower, Depth2);
|
double Depth2 = m_tdSwallCore->mPlot->xAxis->pixelToCoord(x1-h/2.0);
|
||||||
|
m_tdSwallCore->setRange(Depth1, Depth2);
|
||||||
//保存
|
//保存
|
||||||
m_tdSwallCore->mPlot->SaveToSLF_SwallCore();
|
m_tdSwallCore->mPlot->SaveToSLF_SwallCore();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@ TransparentDraggableSwallCore::TransparentDraggableSwallCore(QMyCustomPlot *pare
|
||||||
m_strUuid = strUuid;
|
m_strUuid = strUuid;
|
||||||
|
|
||||||
//图片高度(需要根据高度宏定义,重新计算)
|
//图片高度(需要根据高度宏定义,重新计算)
|
||||||
// double h = SideWallCoreHeight * g_dPixelPerCm; //0.4cm //40;
|
double h = SideWallCoreHeight * g_dPixelPerCm; //0.4cm //40;
|
||||||
// m_fImageHeight = h/2.0;
|
m_fImageHeight = h/2.0;
|
||||||
|
|
||||||
//
|
//
|
||||||
initRect();
|
initRect();
|
||||||
|
|
@ -506,7 +506,9 @@ void TransparentDraggableSwallCore::onMousePress(QMouseEvent *event)
|
||||||
//event->accept();
|
//event->accept();
|
||||||
|
|
||||||
double low = mRect->topLeft->coords().x();
|
double low = mRect->topLeft->coords().x();
|
||||||
//double hight = mRect->bottomRight->coords().x();
|
double hight = mRect->bottomRight->coords().x();
|
||||||
|
double depth = (low+hight)/2.0;
|
||||||
|
|
||||||
QString ColorImage = "";
|
QString ColorImage = "";
|
||||||
int ind=mPlot->colorinds_SWallCore.indexOf(mstrTitle);
|
int ind=mPlot->colorinds_SWallCore.indexOf(mstrTitle);
|
||||||
if (ind>-1&&ind<mPlot->colors_SWallCore.size())
|
if (ind>-1&&ind<mPlot->colors_SWallCore.size())
|
||||||
|
|
@ -517,7 +519,7 @@ void TransparentDraggableSwallCore::onMousePress(QMouseEvent *event)
|
||||||
ColorImage="";
|
ColorImage="";
|
||||||
}
|
}
|
||||||
|
|
||||||
PropertyService()->initSwallCoreItemProperty(this, low, m_Lith, m_Oil, ColorImage, m_fLeftSpace / g_dPixelPerCm, 1, mstrTitle.toInt());
|
PropertyService()->initSwallCoreItemProperty(this, depth, m_Lith, m_Oil, ColorImage, m_fLeftSpace / g_dPixelPerCm, 1, mstrTitle.toInt());
|
||||||
|
|
||||||
QMenu menu(nullptr);
|
QMenu menu(nullptr);
|
||||||
menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除选中对象", this, &TransparentDraggableSwallCore::onDelRect);
|
menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除选中对象", this, &TransparentDraggableSwallCore::onDelRect);
|
||||||
|
|
@ -735,6 +737,9 @@ void TransparentDraggableSwallCore::onMouseRelease(QMouseEvent *event)
|
||||||
|
|
||||||
{
|
{
|
||||||
double low = mRect->topLeft->coords().x();
|
double low = mRect->topLeft->coords().x();
|
||||||
|
double hight = mRect->bottomRight->coords().x();
|
||||||
|
double depth = (low+hight)/2.0;
|
||||||
|
|
||||||
QString ColorImage = "";
|
QString ColorImage = "";
|
||||||
int ind=mPlot->colorinds_SWallCore.indexOf(mstrTitle);
|
int ind=mPlot->colorinds_SWallCore.indexOf(mstrTitle);
|
||||||
if (ind>-1&&ind<mPlot->colors_SWallCore.size())
|
if (ind>-1&&ind<mPlot->colors_SWallCore.size())
|
||||||
|
|
@ -745,7 +750,7 @@ void TransparentDraggableSwallCore::onMouseRelease(QMouseEvent *event)
|
||||||
ColorImage="";
|
ColorImage="";
|
||||||
}
|
}
|
||||||
|
|
||||||
PropertyService()->initSwallCoreItemProperty(this, low, m_Lith, m_Oil, ColorImage, m_fLeftSpace / g_dPixelPerCm, 1, mstrTitle.toInt());
|
PropertyService()->initSwallCoreItemProperty(this, depth, m_Lith, m_Oil, ColorImage, m_fLeftSpace / g_dPixelPerCm, 1, mstrTitle.toInt());
|
||||||
|
|
||||||
if(m_bChange)
|
if(m_bChange)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -2459,10 +2459,12 @@ bool QMyCustomPlot::SaveToSLF_SwallCore()
|
||||||
//
|
//
|
||||||
QCPRange tmpRange = pDraggableRect->getRange();
|
QCPRange tmpRange = pDraggableRect->getRange();
|
||||||
float fSDepth = -tmpRange.lower;
|
float fSDepth = -tmpRange.lower;
|
||||||
|
float fEDepth = -tmpRange.upper;
|
||||||
|
float fDepth = (fSDepth+fEDepth)/2.0;
|
||||||
if(fSDepth == listSDepth[i])//按顺序写入
|
if(fSDepth == listSDepth[i])//按顺序写入
|
||||||
{
|
{
|
||||||
memset(&m_Result,0,sizeof(WALLCORE_DATA));
|
memset(&m_Result,0,sizeof(WALLCORE_DATA));
|
||||||
m_Result.Depth=fSDepth;
|
m_Result.Depth=fDepth;
|
||||||
m_Result.Order=i+1;
|
m_Result.Order=i+1;
|
||||||
|
|
||||||
QString name,lithname,oilname,colorname;
|
QString name,lithname,oilname,colorname;
|
||||||
|
|
@ -5455,11 +5457,12 @@ void QMyCustomPlot::addSwallCoreToPlot(double Depth, QString LithologyImage, QSt
|
||||||
//左侧空白
|
//左侧空白
|
||||||
dragRect->m_fLeftSpace = Sideleft*g_dPixelPerCm;
|
dragRect->m_fLeftSpace = Sideleft*g_dPixelPerCm;
|
||||||
// 设置初始范围
|
// 设置初始范围
|
||||||
double h = 32;//SideWallCoreHeight * g_dPixelPerCm; //0.4cm //40;
|
double h = SideWallCoreHeight * g_dPixelPerCm; //0.4cm //40;//32;
|
||||||
double x1 = this->xAxis->coordToPixel(Depth);
|
double x1 = this->xAxis->coordToPixel(Depth);
|
||||||
//
|
//
|
||||||
double Depth2 = this->xAxis->pixelToCoord(x1-h);
|
double Depth1 = this->xAxis->pixelToCoord(x1+h/2.0);
|
||||||
dragRect->setRange(Depth, Depth2, bRefresh);
|
double Depth2 = this->xAxis->pixelToCoord(x1-h/2.0);
|
||||||
|
dragRect->setRange(Depth1, Depth2, bRefresh);
|
||||||
// 可选:设置颜色
|
// 可选:设置颜色
|
||||||
dragRect->setColor(QColor(255, 255, 255, 80)); // 半透明红色255, 100, 100, 80
|
dragRect->setColor(QColor(255, 255, 255, 80)); // 半透明红色255, 100, 100, 80
|
||||||
//最小宽度
|
//最小宽度
|
||||||
|
|
@ -10044,14 +10047,16 @@ void QMyCustomPlot::resetPosition_SwallCore()
|
||||||
|
|
||||||
//--------------------------
|
//--------------------------
|
||||||
// 设置初始范围
|
// 设置初始范围
|
||||||
double h = 32;
|
//double h = 32;
|
||||||
double Depth = tmpRange.lower;
|
double Depth1 = tmpRange.lower;
|
||||||
double x1 = this->xAxis->coordToPixel(Depth);
|
double Depth2 = tmpRange.upper;
|
||||||
double Depth2 = this->xAxis->pixelToCoord(x1-h);
|
|
||||||
|
// double x1 = this->xAxis->coordToPixel(Depth);
|
||||||
|
// double Depth2 = this->xAxis->pixelToCoord(x1-h);
|
||||||
//--------------------------
|
//--------------------------
|
||||||
|
|
||||||
//
|
//
|
||||||
pDraggableRect->setRange(Depth, Depth2, false);
|
pDraggableRect->setRange(Depth1, Depth2, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user