1.曲线的颜色等基础属性,拖拽到其它道后保持不变。 2.视图显示的页高度,如果配置高度低于分辨率,怎采用分辨率高度。

This commit is contained in:
jiayulong 2026-05-18 10:50:09 +08:00
parent e3fe5d8af9
commit 8ee53acc58
3 changed files with 164 additions and 7 deletions

View File

@ -7369,8 +7369,44 @@ void FormDraw::dropEvent(QDropEvent* event)
{
if(strType=="curveObject")
{
//新建曲线
emit CallManage::getInstance()->sig_AddLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
if (list.size() > 5)
{
QString strListPropertyText = list[4];
QStringList listOtherProperty = strListPropertyText.split(", "); // 以逗号加空格为分隔符分割字符串
//
QString strListPropertyMain = list[5];
QStringList listMainProperty = strListPropertyMain.split(", "); // 以逗号加空格为分隔符分割字符串
//
if (listMainProperty.size() > 5)
{
double newLeftScale;
double newRightScale;
QString strScaleType;
QColor lineColor;
double width;
Qt::PenStyle lineStyle;
//
newLeftScale = listMainProperty[0].toDouble();
newRightScale = listMainProperty[1].toDouble();
strScaleType = listMainProperty[2];
lineColor.setNamedColor(listMainProperty[3]);
width = listMainProperty[4].toDouble();
lineStyle = (Qt::PenStyle)listMainProperty[5].toInt();
//新建曲线
emit CallManage::getInstance()->sig_AddLine_Property(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName,
newLeftScale, newRightScale, strScaleType, lineColor, width, lineStyle, listOtherProperty);
}
else
{
emit CallManage::getInstance()->sig_AddLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
}
}
else
{
emit CallManage::getInstance()->sig_AddLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
}
}
else if(strType=="waveObject")
{
@ -7430,8 +7466,18 @@ void FormDraw::dropEvent(QDropEvent* event)
}
else if(strType=="LogfaceObject")
{
//沉积相
emit CallManage::getInstance()->sig_AddLogface(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
if (list.size() > 4)
{
QString strListPropertyText = list[4];
QStringList listOtherProperty = strListPropertyText.split(", "); // 以逗号加空格为分隔符分割字符串
//沉积相
emit CallManage::getInstance()->sig_AddLogface(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, 0, listOtherProperty);
}
else
{
//沉积相
emit CallManage::getInstance()->sig_AddLogface(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
}
}
else if(strType=="MCalsObject")
{

View File

@ -179,6 +179,21 @@ void MainWindow::ReadConfig()
int iHeight = 10000;
//读取,MyCustom界面高度
qtCommon->readHeight(configPath, iHeight);
if(iHeight == 0)
{
}
else if(iHeight == 1)
{
}
else
{
if(iHeight < QApplication::desktop()->height())
{
//不能低于分辨率
iHeight = QApplication::desktop()->height();
}
}
g_iHeight_MyCustom = iHeight;
//Debug模式

View File

@ -113,7 +113,45 @@ void PreQTableWidget::dropEvent(QDropEvent *event)
if(strType=="curveObject")
{
//新建曲线
emit CallManage::getInstance()->sig_AddLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
if (list.size() > 5)
{
QString strListPropertyText = list[4];
QStringList listOtherProperty = strListPropertyText.split(", "); // 以逗号加空格为分隔符分割字符串
//
QString strListPropertyMain = list[5];
QStringList listMainProperty = strListPropertyMain.split(", "); // 以逗号加空格为分隔符分割字符串
//
if (listMainProperty.size() > 5)
{
double newLeftScale;
double newRightScale;
QString strScaleType;
QColor lineColor;
double width;
Qt::PenStyle lineStyle;
//
newLeftScale = listMainProperty[0].toDouble();
newRightScale = listMainProperty[1].toDouble();
strScaleType = listMainProperty[2];
lineColor.setNamedColor(listMainProperty[3]);
width = listMainProperty[4].toDouble();
lineStyle = (Qt::PenStyle)listMainProperty[5].toInt();
//新建曲线
emit CallManage::getInstance()->sig_AddLine_Property(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName,
newLeftScale, newRightScale, strScaleType, lineColor, width, lineStyle, listOtherProperty);
}
else
{
emit CallManage::getInstance()->sig_AddLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
}
}
else
{
emit CallManage::getInstance()->sig_AddLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
}
}
else if(strType=="waveObject")
{
@ -361,10 +399,61 @@ void PreQTableWidget::performDrag()
//属性信息
QString strListPropertyText = "";
QString strListPropertyMain = "";
if(strType=="curveObject")
{
//曲线
//此处属性注意顺序,后续使用按照顺序
QStringList listOtherProperty;
listOtherProperty.append(formInfo->m_strAliasName);
listOtherProperty.append(formInfo->m_strUnit);
listOtherProperty.append(formInfo->m_curveNameFont.toString());//曲线名称字体
if(formInfo->m_bDrawLine)
{
listOtherProperty.append("DrawLine");
}
else{
listOtherProperty.append("0");
}
//
if(formInfo->m_bDrawGan)
{
listOtherProperty.append("DrawGan");
}
else{
listOtherProperty.append("0");
}
//
if(formInfo->m_bDrawPoint)
{
listOtherProperty.append("DrawPoint");
}
else{
listOtherProperty.append("0");
}
//
if(formInfo->m_bDrawSymmetry)
{
listOtherProperty.append("DrawSymmetry");
}
else{
listOtherProperty.append("0");
}
//
listOtherProperty.append(QString::number(formInfo->m_pointStyle));
//
strListPropertyText = listOtherProperty.join(", "); // 合并成一个字符串,元素之间用逗号加空格分隔
//
QStringList listMainProperty;
listMainProperty.append(QString::number(formInfo->m_vmin));
listMainProperty.append(QString::number(formInfo->m_vmax));
listMainProperty.append(formInfo->m_strScaleType);
listMainProperty.append(formInfo->m_lineColor.name());
listMainProperty.append(QString::number(formInfo->m_dWidth));
listMainProperty.append(QString::number(formInfo->m_lineStyle));
//
strListPropertyMain = listMainProperty.join(", "); // 合并成一个字符串,元素之间用逗号加空格分隔
}
else if(strType=="waveObject")
{
@ -473,12 +562,19 @@ void PreQTableWidget::performDrag()
// 这里需要根据你的item数据来设置mimeData例如
if(strListPropertyText == "")
{
mimeData->setText(formInfo->m_strSlfName + "#@@#"+ formInfo->m_strWellName + "#@@#" +formInfo->m_strLineName + "#@@#" + strType);
}
else
{
mimeData->setText(formInfo->m_strSlfName + "#@@#"+ formInfo->m_strWellName + "#@@#" +formInfo->m_strLineName + "#@@#" + strType + "#@@#" + strListPropertyText);
if(strListPropertyMain == "")
{
mimeData->setText(formInfo->m_strSlfName + "#@@#"+ formInfo->m_strWellName + "#@@#" +formInfo->m_strLineName + "#@@#" + strType + "#@@#" + strListPropertyText);
}
else
{
//曲线额外补充属性
mimeData->setText(formInfo->m_strSlfName + "#@@#"+ formInfo->m_strWellName + "#@@#" +formInfo->m_strLineName + "#@@#" + strType + "#@@#" + strListPropertyText+ "#@@#" + strListPropertyMain);
}
}
// 创建QDrag对象
QDrag *drag = new QDrag(this);