解决道名编号冲突,自动累加编号。
This commit is contained in:
parent
cf16a247f8
commit
8e655ec015
|
|
@ -2552,7 +2552,7 @@ void PropertyWidget::initProperty(FormInfo *formInfo)
|
|||
//固井结论
|
||||
this->initGujingProperty(formInfo);
|
||||
}
|
||||
if (m_strLineName == "IMAGE_DATA")
|
||||
else if (m_strLineName == "IMAGE_DATA")
|
||||
{
|
||||
// 岩心图片
|
||||
this->initImageProperty(formInfo);
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
#include "PickFrac.h"
|
||||
#include "DrawNrad.h"
|
||||
#include "formline.h"
|
||||
#include "PropertyWidget.h"
|
||||
|
||||
//以下参数从配置文件读取
|
||||
extern int g_iIndex;
|
||||
|
|
@ -2805,6 +2806,12 @@ void FormDraw::s_delLine(QString strUuid, QString strWellName, QString strTrackN
|
|||
{
|
||||
childWidget->deleteLater(); // 安排控件的删除,稍后执行
|
||||
m_listLineName.removeOne(strLineName);
|
||||
|
||||
//属性清空
|
||||
PropertyService()->InitCurrentViewInfo();
|
||||
|
||||
//取消所有选中单元格
|
||||
emit CallManage::getInstance()->sig_Raise(m_strUuid, "", "", "", "", 0, "");
|
||||
//break;
|
||||
}
|
||||
}
|
||||
|
|
@ -2851,6 +2858,12 @@ void FormDraw::s_delWave(QString strUuid, QString strWellName, QString strTrackN
|
|||
{
|
||||
childWidget->deleteLater(); // 安排控件的删除,稍后执行
|
||||
m_listWaveName.removeOne(strLineName);
|
||||
|
||||
//属性清空
|
||||
PropertyService()->InitCurrentViewInfo();
|
||||
|
||||
//取消所有选中单元格
|
||||
emit CallManage::getInstance()->sig_Raise(m_strUuid, "", "", "", "", 0, "");
|
||||
//break;
|
||||
}
|
||||
}
|
||||
|
|
@ -2896,6 +2909,12 @@ void FormDraw::s_delTableLine(QString strUuid, QString strWellName, QString strT
|
|||
{
|
||||
childWidget->deleteLater(); // 安排控件的删除,稍后执行
|
||||
m_listTableName.removeOne(strLineName);
|
||||
|
||||
//属性清空
|
||||
PropertyService()->InitCurrentViewInfo();
|
||||
|
||||
//取消所有选中单元格
|
||||
emit CallManage::getInstance()->sig_Raise(m_strUuid, "", "", "", "", 0, "");
|
||||
//break;
|
||||
}
|
||||
}
|
||||
|
|
@ -7791,6 +7810,12 @@ void FormDraw::s_changeGujingLine(QString strUuid, QString strSlfName, QString s
|
|||
if(m_listLineName.contains(strLineName))
|
||||
{
|
||||
m_listLineName.removeOne(strLineName);
|
||||
|
||||
//属性清空
|
||||
//PropertyService()->InitCurrentViewInfo();
|
||||
|
||||
//取消所有选中单元格
|
||||
emit CallManage::getInstance()->sig_Raise(m_strUuid, "", "", "", "", 0, "");
|
||||
//qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
||||
//return;
|
||||
}
|
||||
|
|
@ -7811,6 +7836,12 @@ void FormDraw::s_changeJiegutextLine(QString strUuid, QString strSlfName, QStrin
|
|||
if(m_listLineName.contains(strLineName))
|
||||
{
|
||||
m_listLineName.removeOne(strLineName);
|
||||
|
||||
//属性清空
|
||||
//PropertyService()->InitCurrentViewInfo();
|
||||
|
||||
//取消所有选中单元格
|
||||
emit CallManage::getInstance()->sig_Raise(m_strUuid, "", "", "", "", 0, "");
|
||||
//qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
||||
//return;
|
||||
}
|
||||
|
|
@ -7831,6 +7862,12 @@ void FormDraw::s_changeLineName(QString strUuid, QString strSlfName, QString str
|
|||
if(m_listLineName.contains(strLineName))
|
||||
{
|
||||
m_listLineName.removeOne(strLineName);
|
||||
|
||||
//属性清空
|
||||
//PropertyService()->InitCurrentViewInfo();
|
||||
|
||||
//取消所有选中单元格
|
||||
emit CallManage::getInstance()->sig_Raise(m_strUuid, "", "", "", "", 0, "");
|
||||
//qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
||||
//return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include "qtColorSchemeComboBox.h"
|
||||
#include "geometryutils.h"
|
||||
#include "mainwindowcurve.h"
|
||||
#include "PropertyWidget.h"
|
||||
|
||||
extern int g_iOneWidth; //道宽
|
||||
//extern int m_iY1;
|
||||
|
|
@ -77,6 +78,28 @@ int FormWell::insertColumn(int nw)
|
|||
return ncolCount;
|
||||
}
|
||||
|
||||
//获取当前井的所有道名称
|
||||
QStringList FormWell::getTrackNameList()
|
||||
{
|
||||
QStringList listTrackName;
|
||||
|
||||
int columnCount = ui->tableWidget->columnCount();//总列数
|
||||
for(int i=0; i<columnCount; i++)
|
||||
{
|
||||
if( ui->tableWidget->cellWidget(0, i) != nullptr )
|
||||
{
|
||||
auto myWidget = ui->tableWidget->cellWidget(0, i);
|
||||
FormTrackTop* fromTop = qobject_cast<FormTrackTop*>(myWidget);
|
||||
if(fromTop)
|
||||
{
|
||||
listTrackName.append(fromTop->m_strTrackName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return listTrackName;
|
||||
}
|
||||
|
||||
QVector<QWidget *> FormWell::new_track(QStringList listdt, QString strTrackName)
|
||||
{
|
||||
QVector<QWidget *> vec;
|
||||
|
|
@ -101,8 +124,9 @@ QVector<QWidget *> FormWell::new_track(QStringList listdt, QString strTrackName)
|
|||
|
||||
if(strTrackName.length() <= 0)
|
||||
{
|
||||
//道名
|
||||
strTrackName = "道" + QString::number(columnCount+1);
|
||||
//获取当前井的所有道名称
|
||||
QStringList listTrackName = getTrackNameList();
|
||||
//
|
||||
if(strType == "depthObject")
|
||||
strTrackName = "深度";
|
||||
else if(strType == "roseObject")
|
||||
|
|
@ -111,6 +135,42 @@ QVector<QWidget *> FormWell::new_track(QStringList listdt, QString strTrackName)
|
|||
strTrackName = "DCA检测";
|
||||
else if(strType == "tdtObject")
|
||||
strTrackName = "TDT";
|
||||
else{
|
||||
strTrackName = "道" + QString::number(columnCount+1);
|
||||
}
|
||||
//
|
||||
if(listTrackName.size()>0)
|
||||
{
|
||||
if(listTrackName.contains(strTrackName))//道名已经存在,避免道重名
|
||||
{
|
||||
//道名
|
||||
for(int i=2; i<100; i++)
|
||||
{
|
||||
//
|
||||
if(strType == "depthObject")
|
||||
strTrackName = "深度" + QString::number(columnCount+i);
|
||||
else if(strType == "roseObject")
|
||||
strTrackName = "玫瑰图" + QString::number(columnCount+i);
|
||||
else if(strType == "dcaObject")
|
||||
strTrackName = "DCA检测" + QString::number(columnCount+i);
|
||||
else if(strType == "tdtObject")
|
||||
strTrackName = "TDT" + QString::number(columnCount+i);
|
||||
else{
|
||||
strTrackName = "道" + QString::number(columnCount+i);
|
||||
}
|
||||
|
||||
//
|
||||
if(listTrackName.contains(strTrackName))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FormTrack *formTrack = nullptr;
|
||||
|
|
@ -640,7 +700,14 @@ void FormWell::slotDeleteSelectTrack()
|
|||
if(iCurrentRow == 0)
|
||||
{
|
||||
ui->tableWidget->removeColumn(iCurrentCol);
|
||||
|
||||
resizeWindow();
|
||||
|
||||
//属性清空
|
||||
PropertyService()->InitCurrentViewInfo();
|
||||
|
||||
//取消所有选中单元格
|
||||
emit CallManage::getInstance()->sig_Raise(m_strUuid, "", "", "", "", 0, "");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,6 +51,9 @@ public:
|
|||
//设置道宽
|
||||
int setColWidth(int iCurrentCol, int iNewWidth);
|
||||
|
||||
//获取当前井的所有道名称
|
||||
QStringList getTrackNameList();
|
||||
|
||||
public slots:
|
||||
//void onTableColumnsInserted(const QModelIndex &parent, int first, int last);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user