解释结论,显示名称,字体,颜色,结论占比等数据编辑。
This commit is contained in:
parent
0ab8eb16b5
commit
5d860bd16b
|
|
@ -92,8 +92,38 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
|||
{
|
||||
if(m_strCurrentProperty == "")
|
||||
return;
|
||||
if (m_strCurrentProperty == Table_Property)
|
||||
{
|
||||
bool bDraw = false;
|
||||
QStringList slist;
|
||||
slist << "显示名称" << "垂向绘制" << "旋转角度(°)" << "字体" << "颜色"
|
||||
<< "结论占比%" << "显示位置(cm)" << "显示层号" << "层号字体" << "层号旋转";
|
||||
for (int i = 0; i < slist.length(); i++)
|
||||
{
|
||||
if (slist.at(i) == m_propertyData[pProperty])
|
||||
{
|
||||
bDraw = m_formInfo->setInfoProperty(m_propertyData[pProperty], variant);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(m_strCurrentProperty == Track_Property)
|
||||
if (!slist.contains(m_propertyData[pProperty]))
|
||||
bDraw = true;
|
||||
|
||||
if (bDraw)
|
||||
{
|
||||
QVariantList listCond;
|
||||
listCond << m_strUuid;
|
||||
listCond << m_strSlfName;
|
||||
listCond << m_strWellName;
|
||||
listCond << m_strTrackName;
|
||||
listCond << m_strLineName;
|
||||
listCond << m_propertyData[pProperty];
|
||||
listCond << variant;
|
||||
emit CallManage::getInstance()->sig_changeDrawProperty(listCond);
|
||||
}
|
||||
}
|
||||
else if(m_strCurrentProperty == Track_Property)
|
||||
{
|
||||
if(m_fromTop == NULL)
|
||||
return;
|
||||
|
|
@ -1178,6 +1208,25 @@ void PropertyWidget::initHeadProperty(FormHead *formHead, QTableWidget *tableWid
|
|||
|
||||
}
|
||||
|
||||
void PropertyWidget::initTableProperty(FormInfo *formInfo)
|
||||
{
|
||||
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
|
||||
|
||||
_CreateVariantPropertyItem("名称", "显示名称", formInfo->m_strLineName, QVariant::String);
|
||||
//_CreateVariantPropertyItem("名称", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
|
||||
//_CreateVariantPropertyItem("名称", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
|
||||
_CreateVariantPropertyItem("名称", "字体", formInfo->m_curveNameFont, QVariant::Font);
|
||||
_CreateVariantPropertyItem("名称", "颜色", formInfo->m_lineColor, QVariant::Color);
|
||||
|
||||
_CreateVariantPropertyItem("显示", "结论占比%", formInfo->m_nConclusionProportion, QVariant::Int);
|
||||
_CreateVariantPropertyItem("显示", "显示位置(cm)", formInfo->m_nShowPos, QVariant::Int);
|
||||
_CreateVariantPropertyItem("显示", "显示层号", formInfo->m_bShowLayerNo, QVariant::Bool);
|
||||
_CreateVariantPropertyItem("显示", "层号字体", formInfo->m_layerFont, QVariant::Font);
|
||||
_CreateVariantPropertyItem("显示", "层号旋转", formInfo->m_fLayerRotate, QVariant::Double);
|
||||
|
||||
m_strCurrentProperty = Table_Property;
|
||||
}
|
||||
|
||||
void PropertyWidget::initDepthProperty(FormInfo *formInfo)
|
||||
{
|
||||
//
|
||||
|
|
@ -1206,7 +1255,11 @@ void PropertyWidget::initProperty(FormInfo *formInfo)
|
|||
m_strTrackName = formInfo->m_strTrackName;
|
||||
m_strLineName = formInfo->m_strLineName;
|
||||
|
||||
if (formInfo->m_strType == "depthObject")
|
||||
if (formInfo->m_strType == "tableObject")
|
||||
{
|
||||
this->initTableProperty(formInfo);
|
||||
}
|
||||
else if (formInfo->m_strType == "depthObject")
|
||||
{
|
||||
this->initDepthProperty(formInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@
|
|||
#define Wave_Property "Wave_Property" //波列
|
||||
#define Head_Property "Head_Property" //图头,单元格
|
||||
|
||||
#define Table_Property "Table_Property" //解释结论
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
/**
|
||||
|
|
@ -111,6 +113,8 @@ public:
|
|||
//图头
|
||||
void initHeadProperty(FormHead *formHead, QTableWidget *tableWidget, QTableWidgetItem* item, int row, int col);
|
||||
|
||||
void initTableProperty(FormInfo *formInfo);
|
||||
|
||||
void initDepthProperty(FormInfo *formInfo);
|
||||
|
||||
void initProperty(FormInfo *formInfo);
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ void TransparentGroupResult::initRect()
|
|||
mDragRect->setVisible(false);
|
||||
|
||||
mDragLine = new QCPItemStraightLine(mPlot);
|
||||
mDragLine->setPen(QPen(Qt::red, 1, Qt::DashDotDotLine));
|
||||
mDragLine->setPen(QPen(Qt::red, 1));
|
||||
mDragLine->setVisible(false);
|
||||
|
||||
// 创建透明矩形
|
||||
|
|
|
|||
|
|
@ -602,7 +602,7 @@ QMyCustomPlot* FormDraw::addTableLine(QString strUuid, QString strSlfName, QStri
|
|||
|
||||
//
|
||||
QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName);
|
||||
curv->initGeometry(m_strUuid, m_iScale, g_iOneWidth);
|
||||
curv->initGeometry(m_strUuid, m_iScale, m_nTrackW);
|
||||
curv->show();
|
||||
|
||||
if (strLineName == "FRAC_HOLE.TABLE")
|
||||
|
|
|
|||
|
|
@ -29,14 +29,14 @@ FormInfo::FormInfo(QWidget *parent, QString strSlfName, QString strWellName, QSt
|
|||
m_lineStyle = Qt::SolidLine;
|
||||
m_newFillMode = "无填充";
|
||||
m_newHeadFill = "不绘制";
|
||||
// //
|
||||
// QPushButton *button = new QPushButton("Drag Me", this);
|
||||
// QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
// layout->addWidget(button);
|
||||
// setLayout(layout);
|
||||
// // 设置拖拽功能
|
||||
// setWindowFlags(Qt::FramelessWindowHint | Qt::Window);
|
||||
// setAttribute(Qt::WA_TranslucentBackground);
|
||||
// //
|
||||
// QPushButton *button = new QPushButton("Drag Me", this);
|
||||
// QVBoxLayout *layout = new QVBoxLayout(this);
|
||||
// layout->addWidget(button);
|
||||
// setLayout(layout);
|
||||
// // 设置拖拽功能
|
||||
// setWindowFlags(Qt::FramelessWindowHint | Qt::Window);
|
||||
// setAttribute(Qt::WA_TranslucentBackground);
|
||||
|
||||
//左刻度
|
||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeLeftScale(QString, QString, QString, QString, QString, double)), this, SLOT(s_ChangeLeftScale(QString, QString, QString, QString, QString, double)));
|
||||
|
|
@ -66,6 +66,7 @@ FormInfo::FormInfo(QWidget *parent, QString strSlfName, QString strWellName, QSt
|
|||
m_curveNameFont = font1; // 曲线名称
|
||||
m_curveUnitFont = font2; // 曲线单位
|
||||
m_curveScaleFont = font2; // 曲线刻度
|
||||
m_layerFont = font1;
|
||||
m_bShowScale = true;
|
||||
}
|
||||
|
||||
|
|
@ -113,7 +114,7 @@ QJsonObject FormInfo::makeJson()
|
|||
}
|
||||
rootObj["SlfName"] = slffilename;
|
||||
rootObj["WellName"] = m_strWellName;
|
||||
// rootObj["TrackName"] = m_strTrackName;
|
||||
// rootObj["TrackName"] = m_strTrackName;
|
||||
rootObj["LineName"] = m_strLineName;
|
||||
rootObj["AliasName"] = m_strAliasName;
|
||||
rootObj["Unit"] = m_strUnit;
|
||||
|
|
@ -598,7 +599,7 @@ bool FormInfo::setInfoProperty(QString strProName, QVariant val)
|
|||
{
|
||||
this->m_strUnit = val.toString();
|
||||
}
|
||||
else if ("曲线名称" == strProName)
|
||||
else if ("曲线名称" == strProName || "字体" == strProName)
|
||||
{
|
||||
this->m_curveNameFont = val.value<QFont>();
|
||||
}
|
||||
|
|
@ -692,6 +693,40 @@ bool FormInfo::setInfoProperty(QString strProName, QVariant val)
|
|||
this->m_nColorNum = val.toInt();
|
||||
return true;
|
||||
}
|
||||
else if ("垂向绘制" == strProName)
|
||||
{
|
||||
this->m_bVerticaDrawing = val.toBool();
|
||||
}
|
||||
else if ("旋转角度(°)" == strProName)
|
||||
{
|
||||
this->m_nRotationAngle = val.toInt();
|
||||
}
|
||||
else if ("结论占比%" == strProName)
|
||||
{
|
||||
bDraw = true;
|
||||
this->m_nConclusionProportion = val.toInt();
|
||||
}
|
||||
else if ("显示位置(cm)" == strProName)
|
||||
{
|
||||
bDraw = true;
|
||||
this->m_nShowPos = val.toInt();
|
||||
}
|
||||
else if ("显示层号" == strProName)
|
||||
{
|
||||
bDraw = true;
|
||||
this->m_bShowLayerNo = val.toBool();
|
||||
}
|
||||
else if ("层号字体" == strProName)
|
||||
{
|
||||
bDraw = true;
|
||||
this->m_layerFont = val.value<QFont>();
|
||||
}
|
||||
else if ("层号旋转" == strProName)
|
||||
{
|
||||
bDraw = true;
|
||||
this->m_fLayerRotate = val.toFloat();
|
||||
}
|
||||
|
||||
this->update();
|
||||
return bDraw;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ public:
|
|||
QString m_strAliasName;//显示名称
|
||||
QString m_strUnit;//单位
|
||||
|
||||
bool m_bVerticaDrawing = false; // 垂向绘制
|
||||
int m_nRotationAngle = 0; // 旋转角度
|
||||
int m_iSelect=0; //iSelect=0未知,1标准曲线,2主曲线,3从曲线
|
||||
bool m_bMerge = false;//是拼接状态,否代表校深状态。为了切换时做数据清理
|
||||
QString m_strType;//类型:curve, wave
|
||||
|
|
@ -116,6 +118,13 @@ public:
|
|||
int m_nColorNum = 256; // 调色板参数设置-变密度颜色级数
|
||||
int m_nSchemeIndex = 1; // 调色板参数设置-色板
|
||||
|
||||
// 解释结论
|
||||
int m_nConclusionProportion = 50; // 结论占比%
|
||||
int m_nShowPos = 0; // 显示位置(cm)
|
||||
bool m_bShowLayerNo = true; // 显示层号
|
||||
QFont m_layerFont; // 层号字体
|
||||
float m_fLayerRotate = 0.0f; // 层号旋转
|
||||
|
||||
public:
|
||||
void setLineWidth(double dWidth);
|
||||
double getLineWidth();
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ void QMyCustomPlot::initGeometry(QString strUuid, int nscale, int nW)
|
|||
|
||||
//curv->setMaximumHeight((int)dHight);
|
||||
//curv->setViewport(QRect(0, 0, g_iOneWidth, (int)dHight));//7500-3184
|
||||
this->setGeometry(0, 0, nW-20, (int)dHight);//7500-3184
|
||||
this->setGeometry(0, 0, nW-1, (int)dHight);//7500-3184
|
||||
}
|
||||
|
||||
void QMyCustomPlot::changePropertyWaveUpdate()
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user