Merge branch 'main' of http://git.hivekion.com:3000/jiayulong/logplus
This commit is contained in:
commit
0ab8eb16b5
|
|
@ -38,6 +38,7 @@ signals:
|
||||||
void sig_OpenProject(QString strName);//打开项目
|
void sig_OpenProject(QString strName);//打开项目
|
||||||
void sig_CloseProject();//关闭项目
|
void sig_CloseProject();//关闭项目
|
||||||
|
|
||||||
|
void sig_ShowParameterCard(QString strSlfName, QString strName);//参数表查看
|
||||||
void sig_ShowCurve(QString strSlfName, QString strName);//曲线数据查看
|
void sig_ShowCurve(QString strSlfName, QString strName);//曲线数据查看
|
||||||
void sig_DepthShift(QString strSlfName, QString strName, double DepthOffset);//深度移动
|
void sig_DepthShift(QString strSlfName, QString strName, double DepthOffset);//深度移动
|
||||||
void sig_ShowTable(QString strSlfName, QString strName);//表格数据查看
|
void sig_ShowTable(QString strSlfName, QString strName);//表格数据查看
|
||||||
|
|
@ -51,7 +52,7 @@ signals:
|
||||||
void sig_NewTrack_No_Line(QString strUuid, QJsonObject topObj, QJsonObject infoObj);//新建空白道,没有曲线
|
void sig_NewTrack_No_Line(QString strUuid, QJsonObject topObj, QJsonObject infoObj);//新建空白道,没有曲线
|
||||||
void sig_AddLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);//新建曲线
|
void sig_AddLine(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);//新建曲线
|
||||||
void sig_AddLine_Property(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
void sig_AddLine_Property(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||||
double newLeftScale, double newRightScale, QString strScaleType, QColor lineColor, double width, Qt::PenStyle lineStyle);//新建曲线,带属性
|
double newLeftScale, double newRightScale, QString strScaleType, QColor lineColor, double width, Qt::PenStyle lineStyle, QStringList listOtherProperty);//新建曲线,带属性
|
||||||
void sig_delLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName);//删除曲线
|
void sig_delLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName);//删除曲线
|
||||||
|
|
||||||
void sig_AddDepth(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0);//深度
|
void sig_AddDepth(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW = 0);//深度
|
||||||
|
|
|
||||||
|
|
@ -56,15 +56,17 @@ FormDraw::FormDraw(QWidget *parent, QString strWellName, QString strTrackName) :
|
||||||
m_strTrackName = strTrackName;
|
m_strTrackName = strTrackName;
|
||||||
m_nSltk=15.0;//杆状图长度
|
m_nSltk=15.0;//杆状图长度
|
||||||
|
|
||||||
|
//曲线
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_AddLine(QString, QString, QString, QString, QString)), this, SLOT(s_addLine(QString, QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_AddLine(QString, QString, QString, QString, QString)), this, SLOT(s_addLine(QString, QString, QString, QString, QString)));
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_AddLine_Property(QString, QString, QString, QString, QString, double, double, QString, QColor, double, Qt::PenStyle, QStringList)),
|
connect(CallManage::getInstance(), SIGNAL(sig_AddLine_Property(QString, QString, QString, QString, QString, double, double, QString, QColor, double, Qt::PenStyle, QStringList)),
|
||||||
this, SLOT(s_AddLine_Property(QString, QString, QString, QString, QString, double, double, QString, QColor, double, Qt::PenStyle, QStringList)));
|
this, SLOT(s_AddLine_Property(QString, QString, QString, QString, QString, double, double, QString, QColor, double, Qt::PenStyle, QStringList)));
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_delLine(QString, QString, QString, QString)), this, SLOT(s_delLine(QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_delLine(QString, QString, QString, QString)), this, SLOT(s_delLine(QString, QString, QString, QString)));
|
||||||
|
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_MouseMove(QString, QString, QString, float)), this, SLOT(s_MouseMove(QString, QString, QString, float)));
|
connect(CallManage::getInstance(), SIGNAL(sig_MouseMove(QString, QString, QString, float)), this, SLOT(s_MouseMove(QString, QString, QString, float)));
|
||||||
//波列
|
//波列
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_AddWave(QString, QString, QString, QString, QString)), this, SLOT(s_addWave(QString, QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_AddWave(QString, QString, QString, QString, QString)), this, SLOT(s_addWave(QString, QString, QString, QString, QString)));
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_delWave(QString, QString, QString, QString)), this, SLOT(s_delWave(QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_delWave(QString, QString, QString, QString)), this, SLOT(s_delWave(QString, QString, QString, QString)));
|
||||||
//表格曲线
|
//表格
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_AddTableLine(QString, QString, QString, QString, QString)), this, SLOT(s_addTableLine(QString, QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_AddTableLine(QString, QString, QString, QString, QString)), this, SLOT(s_addTableLine(QString, QString, QString, QString, QString)));
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_delTableLine(QString, QString, QString, QString)), this, SLOT(s_delTableLine(QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_delTableLine(QString, QString, QString, QString)), this, SLOT(s_delTableLine(QString, QString, QString, QString)));
|
||||||
|
|
||||||
|
|
@ -3159,7 +3161,7 @@ void FormDraw::initIMAGE_DATA(QMyCustomPlot *widget, QString strSlfName, QString
|
||||||
double width=2;
|
double width=2;
|
||||||
QString strScaleType = "";
|
QString strScaleType = "";
|
||||||
//道-对象
|
//道-对象
|
||||||
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "yanxinImageObject");
|
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_RightVal, m_LeftVal, strScaleType, "tableObject");//yanxinImageObject
|
||||||
}
|
}
|
||||||
|
|
||||||
bool FormDraw::LoadFromSLF(QMyCustomPlot *widget, QString strSlfName, QString strLineName)
|
bool FormDraw::LoadFromSLF(QMyCustomPlot *widget, QString strSlfName, QString strLineName)
|
||||||
|
|
@ -6248,8 +6250,14 @@ void FormDraw::addRandomGraph(QMyCustomPlot *widget, QVector<double> x, QVector<
|
||||||
widget->addRandomGraph(x, y, strSlfName, strLineName, strAliasName, strUnit,
|
widget->addRandomGraph(x, y, strSlfName, strLineName, strAliasName, strUnit,
|
||||||
newLeftScale, newRightScale, strScaleType, newlineColor, width, lineStyle);
|
newLeftScale, newRightScale, strScaleType, newlineColor, width, lineStyle);
|
||||||
//道-对象
|
//道-对象
|
||||||
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_vmax, m_vmin, strScaleType, "curveObject");
|
if(widget->m_bDrawCore_PHYSICS)
|
||||||
|
{
|
||||||
|
//岩心分析特殊处理
|
||||||
|
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_vmax, m_vmin, strScaleType, "tableObject");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, m_vmax, m_vmin, strScaleType, "curveObject");
|
||||||
|
}
|
||||||
//AppendConsole(PAI_INFO, "FormDraw addRandomGraph");
|
//AppendConsole(PAI_INFO, "FormDraw addRandomGraph");
|
||||||
// widget->addGraph();
|
// widget->addGraph();
|
||||||
// if(strLineName=="")
|
// if(strLineName=="")
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,9 @@ FormHead::FormHead(QWidget *parent, QString indexID) :
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
//加载样式
|
||||||
|
loadStyle(":/qrc/qss/flatgray.css");
|
||||||
|
|
||||||
m_indexID =indexID;
|
m_indexID =indexID;
|
||||||
m_parent = (FormMultiHeads *)parent;
|
m_parent = (FormMultiHeads *)parent;
|
||||||
|
|
||||||
|
|
@ -82,6 +85,31 @@ FormHead::~FormHead()
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FormHead::loadStyle(const QString &qssFile)
|
||||||
|
{
|
||||||
|
//加载样式表
|
||||||
|
QString qss;
|
||||||
|
QFile file(qssFile);
|
||||||
|
if (file.open(QFile::ReadOnly)) {
|
||||||
|
//用QTextStream读取样式文件不用区分文件编码 带bom也行
|
||||||
|
QStringList list;
|
||||||
|
QTextStream in(&file);
|
||||||
|
//in.setCodec("utf-8");
|
||||||
|
while (!in.atEnd()) {
|
||||||
|
QString line;
|
||||||
|
in >> line;
|
||||||
|
list << line;
|
||||||
|
}
|
||||||
|
|
||||||
|
file.close();
|
||||||
|
qss = list.join("\n");
|
||||||
|
QString paletteColor = qss.mid(20, 7);
|
||||||
|
this->setPalette(QPalette(paletteColor));
|
||||||
|
//用时主要在下面这句
|
||||||
|
this->setStyleSheet(qss);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FormHead::resizeWindow(bool bDelete)
|
void FormHead::resizeWindow(bool bDelete)
|
||||||
{
|
{
|
||||||
QRect rect = this->rect();
|
QRect rect = this->rect();
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ public:
|
||||||
FormMultiHeads *m_parent;
|
FormMultiHeads *m_parent;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void loadStyle(const QString &qssFile);
|
||||||
void Init(int iRows, int iCols);
|
void Init(int iRows, int iCols);
|
||||||
//更新
|
//更新
|
||||||
void updateJsonInfo(QJsonObject headObjInfo);
|
void updateJsonInfo(QJsonObject headObjInfo);
|
||||||
|
|
|
||||||
|
|
@ -848,19 +848,38 @@ void FormInfo::contextMenuEvent(QContextMenuEvent *event)
|
||||||
{
|
{
|
||||||
QMenu menu(this);
|
QMenu menu(this);
|
||||||
menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowCurve);
|
menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowCurve);
|
||||||
menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteObject);
|
menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteCurv);
|
||||||
|
menu.exec(event->globalPos());
|
||||||
|
}
|
||||||
|
else if(m_strType=="tableObject")
|
||||||
|
{
|
||||||
|
QMenu menu(this);
|
||||||
|
menu.addAction(QIcon(::GetImagePath() + "icon/Sheet.png"), "数据对象查看", this, &FormInfo::onShowTable);
|
||||||
|
menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "删除当前对象", this, &FormInfo::onDeleteTable);
|
||||||
menu.exec(event->globalPos());
|
menu.exec(event->globalPos());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//数据查看
|
//曲线数据查看
|
||||||
void FormInfo::onShowCurve()
|
void FormInfo::onShowCurve()
|
||||||
{
|
{
|
||||||
emit CallManage::getInstance()->sig_ShowCurve(m_strSlfName, m_strLineName);
|
emit CallManage::getInstance()->sig_ShowCurve(m_strSlfName, m_strLineName);
|
||||||
}
|
}
|
||||||
|
//删除曲线
|
||||||
void FormInfo::onDeleteObject()
|
void FormInfo::onDeleteCurv()
|
||||||
{
|
{
|
||||||
//删除曲线
|
//删除曲线
|
||||||
emit CallManage::getInstance()->sig_delLine(m_strUuid, m_strWellName, m_strTrackName, m_strLineName);
|
emit CallManage::getInstance()->sig_delLine(m_strUuid, m_strWellName, m_strTrackName, m_strLineName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//表格查看
|
||||||
|
void FormInfo::onShowTable()
|
||||||
|
{
|
||||||
|
emit CallManage::getInstance()->sig_ShowTable(m_strSlfName, m_strLineName);
|
||||||
|
}
|
||||||
|
//删除表格
|
||||||
|
void FormInfo::onDeleteTable()
|
||||||
|
{
|
||||||
|
//删除表格
|
||||||
|
emit CallManage::getInstance()->sig_delTableLine(m_strUuid, m_strWellName, m_strTrackName, m_strLineName);
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -149,10 +149,15 @@ private:
|
||||||
QPoint startPosition;
|
QPoint startPosition;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
//数据查看
|
//曲线数据查看
|
||||||
void onShowCurve();
|
void onShowCurve();
|
||||||
//删除当前对象
|
//删除曲线
|
||||||
void onDeleteObject();
|
void onDeleteCurv();
|
||||||
|
|
||||||
|
//表格查看
|
||||||
|
void onShowTable();
|
||||||
|
//删除表格
|
||||||
|
void onDeleteTable();
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
|
#include <QFile>
|
||||||
#include "newheaddialog.h"
|
#include "newheaddialog.h"
|
||||||
#include "formhead.h"
|
#include "formhead.h"
|
||||||
#include "qtcommonclass.h"
|
#include "qtcommonclass.h"
|
||||||
|
|
@ -21,6 +22,9 @@ FormMultiHeads::FormMultiHeads(QWidget *parent) :
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
//加载样式
|
||||||
|
loadStyle(":/qrc/qss/flatgray.css");
|
||||||
|
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
// 强制使用Qt渲染引擎
|
// 强制使用Qt渲染引擎
|
||||||
//QApplication::setAttribute(Qt::AA_UseStyleSheetPropagationInWidgetStyles, true);
|
//QApplication::setAttribute(Qt::AA_UseStyleSheetPropagationInWidgetStyles, true);
|
||||||
|
|
@ -61,6 +65,31 @@ FormMultiHeads::~FormMultiHeads()
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FormMultiHeads::loadStyle(const QString &qssFile)
|
||||||
|
{
|
||||||
|
//加载样式表
|
||||||
|
QString qss;
|
||||||
|
QFile file(qssFile);
|
||||||
|
if (file.open(QFile::ReadOnly)) {
|
||||||
|
//用QTextStream读取样式文件不用区分文件编码 带bom也行
|
||||||
|
QStringList list;
|
||||||
|
QTextStream in(&file);
|
||||||
|
//in.setCodec("utf-8");
|
||||||
|
while (!in.atEnd()) {
|
||||||
|
QString line;
|
||||||
|
in >> line;
|
||||||
|
list << line;
|
||||||
|
}
|
||||||
|
|
||||||
|
file.close();
|
||||||
|
qss = list.join("\n");
|
||||||
|
QString paletteColor = qss.mid(20, 7);
|
||||||
|
this->setPalette(QPalette(paletteColor));
|
||||||
|
//用时主要在下面这句
|
||||||
|
this->setStyleSheet(qss);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FormMultiHeads::slotContextMenu(QPoint pos)
|
void FormMultiHeads::slotContextMenu(QPoint pos)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ public slots:
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void loadStyle(const QString &qssFile);
|
||||||
void AddHead();
|
void AddHead();
|
||||||
void resizeItem(QString indexID, double tempWidth, double tempHight, bool bDelete=false);
|
void resizeItem(QString indexID, double tempWidth, double tempHight, bool bDelete=false);
|
||||||
QJsonArray makeJsonArray();
|
QJsonArray makeJsonArray();
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ FormTrack::FormTrack(QWidget *parent, QString strWellName, QString strTrackName)
|
||||||
ui->tableWidget->setShowGrid(false);
|
ui->tableWidget->setShowGrid(false);
|
||||||
//设置样式表,竖直边框宽度为0,隐藏
|
//设置样式表,竖直边框宽度为0,隐藏
|
||||||
ui->tableWidget->setStyleSheet( "QTableView::item {border-left: 0px solid black;} \
|
ui->tableWidget->setStyleSheet( "QTableView::item {border-left: 0px solid black;} \
|
||||||
QTableView::item:selected {border-left: 0px solid black;}\
|
QTableView::item:selected {border-left: 0px solid black; color:#57595B; background:#E4E4E4;}\
|
||||||
QTableView::item {border-right: 0px solid black;} \
|
QTableView::item {border-right: 0px solid black;} \
|
||||||
QTableView::item:selected {border-right: 0px solid black;}");
|
QTableView::item:selected {border-right: 0px solid black;}");
|
||||||
|
|
||||||
|
|
@ -48,10 +48,14 @@ FormTrack::FormTrack(QWidget *parent, QString strWellName, QString strTrackName)
|
||||||
connect(this, SIGNAL(sig_AddLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)),
|
connect(this, SIGNAL(sig_AddLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)),
|
||||||
this, SLOT(s_addLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)));
|
this, SLOT(s_addLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)));
|
||||||
//删除曲线
|
//删除曲线
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_delLine(QString, QString, QString, QString)), this, SLOT(s_delLine(QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_delLine(QString, QString, QString, QString)),
|
||||||
//波列
|
this, SLOT(s_delLine(QString, QString, QString, QString)));
|
||||||
|
|
||||||
|
//表格
|
||||||
connect(this, SIGNAL(sig_AddWave(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)),
|
connect(this, SIGNAL(sig_AddWave(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)),
|
||||||
this, SLOT(s_addWave(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)));
|
this, SLOT(s_addWave(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)));
|
||||||
|
connect(CallManage::getInstance(), SIGNAL(sig_delTableLine(QString, QString, QString, QString)),
|
||||||
|
this, SLOT(s_delTableLine(QString, QString, QString, QString)));
|
||||||
|
|
||||||
//波列
|
//波列
|
||||||
connect(this, SIGNAL(sig_AddTableLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)),
|
connect(this, SIGNAL(sig_AddTableLine(QString, QString, QString, QString, QString, QString, QColor, double, float, float, QString)),
|
||||||
|
|
@ -198,10 +202,10 @@ void FormTrack::Add(QString strSlfName, QString strWellName, QString strTrackNam
|
||||||
{
|
{
|
||||||
emit sig_AddDenv(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType);
|
emit sig_AddDenv(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType);
|
||||||
}
|
}
|
||||||
else if(strType=="yanxinImageObject")
|
// else if(strType=="yanxinImageObject")
|
||||||
{
|
// {
|
||||||
emit sig_AddYanXinImage(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType);
|
// emit sig_AddYanXinImage(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType);
|
||||||
}
|
// }
|
||||||
else if(strType=="DrawImageObject")
|
else if(strType=="DrawImageObject")
|
||||||
{
|
{
|
||||||
emit sig_AddDrawImage(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType);
|
emit sig_AddDrawImage(strSlfName, strWellName, m_strTrackName, strLineName, strAliasName, strUnit, lineColor, dWidth, vmax, vmin, strScaleType);
|
||||||
|
|
@ -376,6 +380,38 @@ void FormTrack::s_delLine(QString strUuid, QString strWellName, QString strTrack
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FormTrack::s_delTableLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName)
|
||||||
|
{
|
||||||
|
//井名&道名不一致
|
||||||
|
if(strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
int rowCount = ui->tableWidget->rowCount();
|
||||||
|
for(int i=0; i<rowCount; i++)
|
||||||
|
{
|
||||||
|
if( ui->tableWidget->cellWidget(i, 0) != nullptr )
|
||||||
|
{
|
||||||
|
auto myWidget = ui->tableWidget->cellWidget(i, 0);
|
||||||
|
FormInfo *formInfo = qobject_cast<FormInfo*>(myWidget);//获得widget
|
||||||
|
if(formInfo)
|
||||||
|
{
|
||||||
|
if(strUuid == formInfo->m_strUuid
|
||||||
|
&& formInfo->m_strWellName == strWellName
|
||||||
|
&& formInfo->m_strTrackName == strTrackName
|
||||||
|
&& formInfo->m_strLineName == strLineName)
|
||||||
|
{
|
||||||
|
ui->tableWidget->removeRow(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void FormTrack::s_addWave(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType)
|
void FormTrack::s_addWave(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType)
|
||||||
{
|
{
|
||||||
qDebug() << "FormTrack s_addWave";
|
qDebug() << "FormTrack s_addWave";
|
||||||
|
|
@ -420,7 +456,7 @@ void FormTrack::s_AddTableLine(QString strSlfName, QString strWellName, QString
|
||||||
if(strLineName == "FRAC_HOLE.TABLE" || strLineName == "WORDS_RELUST" || strLineName == "RESULT"
|
if(strLineName == "FRAC_HOLE.TABLE" || strLineName == "WORDS_RELUST" || strLineName == "RESULT"
|
||||||
|| strLineName == "GEO_LITH" || strLineName == "SWALL_CORE"
|
|| strLineName == "GEO_LITH" || strLineName == "SWALL_CORE"
|
||||||
|| strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT"
|
|| strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT"
|
||||||
|| strLineName == "CORE_PHYSICS")
|
|| strLineName == "CORE_PHYSICS" || strLineName == "IMAGE_DATA")
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,8 +89,11 @@ signals:
|
||||||
public slots:
|
public slots:
|
||||||
void s_addLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
void s_addLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||||
void s_delLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName);
|
void s_delLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName);
|
||||||
|
|
||||||
void s_addWave(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
void s_addWave(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||||
|
|
||||||
void s_AddTableLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
void s_AddTableLine(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||||
|
void s_delTableLine(QString strUuid, QString strWellName, QString strTrackName, QString strLineName);
|
||||||
|
|
||||||
void s_addDepth(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
void s_addDepth(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||||
void s_addGanZhuangTu(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
void s_addGanZhuangTu(QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, QString strAliasName, QString strUnit, QColor lineColor, double dWidth, float vmax, float vmin, QString strScaleType);
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,8 @@ FormWell::FormWell(QWidget *parent, QString strWellName) :
|
||||||
//ui->tableWidget->verticalHeader()->setFixedWidth(3);//标题栏宽度
|
//ui->tableWidget->verticalHeader()->setFixedWidth(3);//标题栏宽度
|
||||||
ui->tableWidget->horizontalHeader()->setFixedHeight(3);
|
ui->tableWidget->horizontalHeader()->setFixedHeight(3);
|
||||||
|
|
||||||
|
ui->tableWidget->setStyleSheet( "QTableView::item:selected {color:#57595B; background:#E4E4E4;}");
|
||||||
|
|
||||||
// 设置右键菜单策略
|
// 设置右键菜单策略
|
||||||
ui->tableWidget->setContextMenuPolicy(Qt::CustomContextMenu);
|
ui->tableWidget->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
// 连接信号和槽
|
// 连接信号和槽
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,8 @@
|
||||||
#include <QFuture>
|
#include <QFuture>
|
||||||
#include <QtConcurrent/QtConcurrent>
|
#include <QtConcurrent/QtConcurrent>
|
||||||
#include "fileopenthread.h"
|
#include "fileopenthread.h"
|
||||||
|
#include "ObjWellLogINP.h"
|
||||||
|
#include "TxtEditorDlg.h"
|
||||||
|
|
||||||
//以下参数从配置文件读取
|
//以下参数从配置文件读取
|
||||||
int g_iIndex = 0;
|
int g_iIndex = 0;
|
||||||
|
|
@ -76,6 +78,8 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
//关联信号槽,关闭项目
|
//关联信号槽,关闭项目
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_CloseProject()), this, SLOT(s_CloseProject()));
|
connect(CallManage::getInstance(), SIGNAL(sig_CloseProject()), this, SLOT(s_CloseProject()));
|
||||||
|
|
||||||
|
//参数卡
|
||||||
|
connect(CallManage::getInstance(), SIGNAL(sig_ShowParameterCard(QString, QString)), this, SLOT(s_ShowParameterCard(QString, QString)));
|
||||||
//曲线
|
//曲线
|
||||||
//关联信号槽,数据查看曲线数据
|
//关联信号槽,数据查看曲线数据
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ShowCurve(QString, QString)), this, SLOT(s_ShowCurve(QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ShowCurve(QString, QString)), this, SLOT(s_ShowCurve(QString, QString)));
|
||||||
|
|
@ -494,6 +498,29 @@ void MainWindow::s_CloseProject()
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//参数卡数据查看
|
||||||
|
void MainWindow::s_ShowParameterCard(QString strSlfName, QString strName)
|
||||||
|
{
|
||||||
|
if(m_centerWidgets)
|
||||||
|
{
|
||||||
|
CObjWellLogINP * currentinp = new CObjWellLogINP();
|
||||||
|
if(!currentinp)
|
||||||
|
return;
|
||||||
|
currentinp->SetName(strName);
|
||||||
|
currentinp->SetSlfFileName(strSlfName);
|
||||||
|
currentinp->isLoad=false;
|
||||||
|
currentinp->LoadFromSLF();
|
||||||
|
TxtEditorDlg * pDialog= new TxtEditorDlg(currentinp);
|
||||||
|
pDialog->SetEditingTxt(currentinp->paramcard);
|
||||||
|
QString wellname;
|
||||||
|
QString path;
|
||||||
|
GetWellNameAndPath(strSlfName, wellname, path);
|
||||||
|
m_centerWidgets->addTab(pDialog, wellname + ":" + strName);
|
||||||
|
int iCount = m_centerWidgets->count();
|
||||||
|
m_centerWidgets->m_pTabBar->setCurrentIndex(iCount-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//曲线数据查看
|
//曲线数据查看
|
||||||
void MainWindow::s_ShowCurve(QString strSlfName, QString strName)
|
void MainWindow::s_ShowCurve(QString strSlfName, QString strName)
|
||||||
{
|
{
|
||||||
|
|
@ -590,8 +617,8 @@ void MainWindow::s_WelllogInformation(QString strSlfName)
|
||||||
nTableFlag =pLogio->Open_Set_Table("wellloginformation",
|
nTableFlag =pLogio->Open_Set_Table("wellloginformation",
|
||||||
TABLEE_OBJECT,
|
TABLEE_OBJECT,
|
||||||
4,
|
4,
|
||||||
// szColumnName.toLocal8Bit().data(),
|
szColumnName.toLocal8Bit().data(),
|
||||||
szColumnName.toStdString().c_str(),
|
// szColumnName.toStdString().c_str(),
|
||||||
szSize.toLocal8Bit().data(),
|
szSize.toLocal8Bit().data(),
|
||||||
szDataType.toLocal8Bit().data(),
|
szDataType.toLocal8Bit().data(),
|
||||||
szRemark.toLocal8Bit().data());
|
szRemark.toLocal8Bit().data());
|
||||||
|
|
@ -608,7 +635,7 @@ void MainWindow::s_WelllogInformation(QString strSlfName)
|
||||||
pLogio->SetTableFieldData(nTableFlag,1,pArr,1);//单位
|
pLogio->SetTableFieldData(nTableFlag,1,pArr,1);//单位
|
||||||
strcpy(pArr, "NONE");
|
strcpy(pArr, "NONE");
|
||||||
pLogio->SetTableFieldData(nTableFlag,2,pArr,1);//井名
|
pLogio->SetTableFieldData(nTableFlag,2,pArr,1);//井名
|
||||||
strcpy(pArr, "井名");
|
strcpy(pArr, QString("井名").toLocal8Bit());
|
||||||
pLogio->SetTableFieldData(nTableFlag,3,pArr,1);
|
pLogio->SetTableFieldData(nTableFlag,3,pArr,1);
|
||||||
s_ShowTable(strSlfName, "wellloginformation");
|
s_ShowTable(strSlfName, "wellloginformation");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ public slots:
|
||||||
void s_showView();
|
void s_showView();
|
||||||
//开发工具
|
//开发工具
|
||||||
void s_development();
|
void s_development();
|
||||||
|
void s_ShowParameterCard(QString strSlfName, QString strName);//参数卡数据查看
|
||||||
void s_ShowCurve(QString strSlfName, QString strName);//曲线数据查看
|
void s_ShowCurve(QString strSlfName, QString strName);//曲线数据查看
|
||||||
void s_ShowTable(QString strSlfName, QString strName);//表格数据查看
|
void s_ShowTable(QString strSlfName, QString strName);//表格数据查看
|
||||||
void s_ShowWave(QString strSlfName, QString strName); //波列数据查看
|
void s_ShowWave(QString strSlfName, QString strName); //波列数据查看
|
||||||
|
|
|
||||||
|
|
@ -55,41 +55,13 @@ MainWindowCurve::MainWindowCurve(QWidget *parent) :
|
||||||
//加载样式
|
//加载样式
|
||||||
loadStyle(":/qrc/qss/flatgray.css");
|
loadStyle(":/qrc/qss/flatgray.css");
|
||||||
|
|
||||||
//-------------------------------------
|
|
||||||
ui->tableWidget->hide();
|
|
||||||
// //隐藏网格线
|
|
||||||
// ui->tableWidget->setShowGrid(false);
|
|
||||||
// //设置样式表,不显示竖直边框
|
|
||||||
// ui->tableWidget->setStyleSheet( "QTableView::item {border-left: 0px solid black;} \
|
|
||||||
// QTableView::item:selected {border-left: 0px solid black;}\
|
|
||||||
// QTableView::item {border-right: 0px solid black;} \
|
|
||||||
// QTableView::item:selected {border-right: 0px solid black;}");
|
|
||||||
// //
|
|
||||||
// ui->tableWidget->verticalHeader()->hide(); //行
|
|
||||||
// ui->tableWidget->horizontalHeader()->hide(); //列
|
|
||||||
// //ui->tableWidget->verticalHeader()->setFixedWidth(3);//标题栏宽度
|
|
||||||
// //ui->tableWidget->horizontalHeader()->setFixedHeight(3);//标题栏高度
|
|
||||||
// ui->tableWidget->setColumnCount(1); //动态设置列数
|
|
||||||
// ui->tableWidget->horizontalHeader()->setStretchLastSection(true);//最后一列铺满最后
|
|
||||||
// //标题
|
|
||||||
// QTableWidgetItem *headerItem = new QTableWidgetItem("");
|
|
||||||
// ui->tableWidget->setHorizontalHeaderItem(0, headerItem);
|
|
||||||
// //我们让一列也可以滑动
|
|
||||||
// ui->tableWidget->setHorizontalScrollMode(QAbstractItemView::ScrollPerPixel);
|
|
||||||
// ui->tableWidget->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
|
|
||||||
// // 设置右键菜单策略
|
|
||||||
// ui->tableWidget->setContextMenuPolicy(Qt::CustomContextMenu);
|
|
||||||
// connect(ui->tableWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slotContextMenu(QPoint)));
|
|
||||||
// // 在窗口构造函数中
|
|
||||||
// //ui->tableWidget->installEventFilter(this);
|
|
||||||
|
|
||||||
//-------------------------------------
|
//-------------------------------------
|
||||||
//ui->tableWidget_2->setFrameShape(QFrame::NoFrame); //设置无边框
|
//ui->tableWidget_2->setFrameShape(QFrame::NoFrame); //设置无边框
|
||||||
//隐藏网格线
|
//隐藏网格线
|
||||||
ui->tableWidget_2->setShowGrid(false);
|
ui->tableWidget_2->setShowGrid(false);
|
||||||
//设置样式表,只显示竖直边框
|
//设置样式表,只显示竖直边框
|
||||||
ui->tableWidget_2->setStyleSheet( "QTableView::item {border-left: 1px solid black;} \
|
ui->tableWidget_2->setStyleSheet( "QTableView::item {border-left: 1px solid black;} \
|
||||||
QTableView::item:selected {border-left: 1px solid black;}\
|
QTableView::item:selected {border-left: 1px solid black; color:#57595B; background:#E4E4E4;}\
|
||||||
QTableView::item {border-right: 1px solid black;} \
|
QTableView::item {border-right: 1px solid black;} \
|
||||||
QTableView::item:selected {border-right: 1px solid black;}");
|
QTableView::item:selected {border-right: 1px solid black;}");
|
||||||
|
|
||||||
|
|
@ -106,10 +78,10 @@ MainWindowCurve::MainWindowCurve(QWidget *parent) :
|
||||||
|
|
||||||
connect(ui->tableWidget_2, SIGNAL(itemClicked(QTableWidgetItem*)), this, SLOT(onItemClicked(QTableWidgetItem*)));
|
connect(ui->tableWidget_2, SIGNAL(itemClicked(QTableWidgetItem*)), this, SLOT(onItemClicked(QTableWidgetItem*)));
|
||||||
|
|
||||||
//-------------------------------------
|
// 设置右键菜单策略
|
||||||
ui->tableWidget_3->hide();
|
ui->tableWidget_2->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||||
ui->tableWidget_3->verticalHeader()->hide();
|
// 连接信号和槽
|
||||||
ui->tableWidget_3->horizontalHeader()->hide();
|
connect(ui->tableWidget_2, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slotContextMenu(QPoint)));
|
||||||
|
|
||||||
connect(this, SIGNAL(sig_NewTrackChangeWidth(QString, int)), this, SLOT(s_NewTrackChangeWidth(QString, int)));
|
connect(this, SIGNAL(sig_NewTrackChangeWidth(QString, int)), this, SLOT(s_NewTrackChangeWidth(QString, int)));
|
||||||
//connect(this, SIGNAL(sig_NewWell(QString, QString)), this, SLOT(s_NewWell(QString, QString)));
|
//connect(this, SIGNAL(sig_NewWell(QString, QString)), this, SLOT(s_NewWell(QString, QString)));
|
||||||
|
|
@ -161,7 +133,6 @@ MainWindowCurve::MainWindowCurve(QWidget *parent) :
|
||||||
//成果表----------
|
//成果表----------
|
||||||
m_dock2=new QDockWidget(tr(""),this);
|
m_dock2=new QDockWidget(tr(""),this);
|
||||||
m_dock2->setFeatures(QDockWidget::NoDockWidgetFeatures);//QDockWidget::DockWidgetMovable
|
m_dock2->setFeatures(QDockWidget::NoDockWidgetFeatures);//QDockWidget::DockWidgetMovable
|
||||||
//dock1->setAllowedAreas(Qt::TopDockWidgetArea);
|
|
||||||
//
|
//
|
||||||
m_formMultiTails = new FormMultiHeads(this);
|
m_formMultiTails = new FormMultiHeads(this);
|
||||||
m_formMultiTails->m_strHeadOrTail = "Tail";
|
m_formMultiTails->m_strHeadOrTail = "Tail";
|
||||||
|
|
@ -2076,7 +2047,7 @@ QStringList MainWindowCurve::insertCol(int nW)
|
||||||
//井没创建,创建井+道+曲线
|
//井没创建,创建井+道+曲线
|
||||||
//新建井
|
//新建井
|
||||||
s_NewWell(strWellName, strSlfName);
|
s_NewWell(strWellName, strSlfName);
|
||||||
m_listWell.push_back(strWellName);
|
//m_listWell.push_back(strWellName);//重复添加
|
||||||
|
|
||||||
column= 0;
|
column= 0;
|
||||||
}
|
}
|
||||||
|
|
@ -2120,6 +2091,66 @@ QStringList MainWindowCurve::insertCol(int nW)
|
||||||
return sret;
|
return sret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QStringList MainWindowCurve::getSelectWell_New()
|
||||||
|
{
|
||||||
|
QStringList sret;
|
||||||
|
//没有选中要添加的道
|
||||||
|
if(m_SelectTableItem.m_iTableType==0)
|
||||||
|
{
|
||||||
|
if(ui->tableWidget_2->columnCount()==0)
|
||||||
|
{
|
||||||
|
//0井,空白视图
|
||||||
|
QString strLeft = m_leftWidgets->getLeftTreeString();
|
||||||
|
if(strLeft.length() > 0)
|
||||||
|
{
|
||||||
|
QStringList list = strLeft.split("#@@#");//QString字符串分割函数
|
||||||
|
if (list.size() > 3)
|
||||||
|
{
|
||||||
|
QString strSlfName = list[0];
|
||||||
|
QString strWellName = list[1];
|
||||||
|
|
||||||
|
sret << strWellName << strSlfName;
|
||||||
|
return sret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
QMessageBox::warning(this, "提示", "请先选中待处理井次!");
|
||||||
|
return sret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(ui->tableWidget_2->columnCount()==1)
|
||||||
|
{
|
||||||
|
//单井
|
||||||
|
QString strWellName = ui->tableWidget_2->item(0, 0)->text();
|
||||||
|
//直接从单井获取,data记录slf路径
|
||||||
|
QString strSlfName = ui->tableWidget_2->item(0, 0)->data(Qt::UserRole+1).toString();
|
||||||
|
|
||||||
|
sret << strWellName << strSlfName;
|
||||||
|
return sret;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//多井
|
||||||
|
QMessageBox::warning(this, "提示", "请在可视解释视图,选择添加的井或道!");
|
||||||
|
return sret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(m_SelectTableItem.m_iTableType==2)
|
||||||
|
{
|
||||||
|
//选中道
|
||||||
|
//不在此处处理
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//选中井次或曲线
|
||||||
|
QString strSlfName = m_SelectTableItem.m_strSlfName;
|
||||||
|
QString strWellName = m_SelectTableItem.m_strWellName;
|
||||||
|
|
||||||
|
sret << strWellName << strSlfName;
|
||||||
|
return sret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QStringList MainWindowCurve::getSelectWell()
|
QStringList MainWindowCurve::getSelectWell()
|
||||||
{
|
{
|
||||||
QStringList sret;
|
QStringList sret;
|
||||||
|
|
@ -2327,38 +2358,6 @@ void MainWindowCurve::s_showHeadTable()
|
||||||
m_dock1->show();
|
m_dock1->show();
|
||||||
m_dock2->show();
|
m_dock2->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
// if(ui->tableWidget->isVisible())
|
|
||||||
// {
|
|
||||||
// ui->tableWidget->hide();
|
|
||||||
// }
|
|
||||||
// else {
|
|
||||||
// ui->tableWidget->show();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// QTableWidget *tableWidget = new QTableWidget();
|
|
||||||
|
|
||||||
// tableWidget->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
|
||||||
// tableWidget->verticalHeader()->setSectionResizeMode(QHeaderView::Stretch);
|
|
||||||
|
|
||||||
// tableWidget->setRowCount(5);
|
|
||||||
// tableWidget->setColumnCount(5);
|
|
||||||
// for(int i=0; i<5; i++)
|
|
||||||
// {
|
|
||||||
// //tableWidget->setColumnWidth(i, 100);
|
|
||||||
// for(int j=0; j<5; j++)
|
|
||||||
// {
|
|
||||||
// QTableWidgetItem* item = new QTableWidgetItem("");
|
|
||||||
// tableWidget->setItem(i, j, item);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
//// QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); // 首选大小策略
|
|
||||||
//// sizePolicy.setHorizontalStretch(0); // 水平拉伸因子
|
|
||||||
//// sizePolicy.setVerticalStretch(0); // 垂直拉伸因子
|
|
||||||
//// tableWidget->setSizePolicy(sizePolicy);
|
|
||||||
|
|
||||||
// ui->verticalLayout_head->addWidget(tableWidget, 0, Qt::AlignCenter); // 通过布局添加表格
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QJsonObject MainWindowCurve::makeJson()
|
QJsonObject MainWindowCurve::makeJson()
|
||||||
|
|
@ -2551,7 +2550,7 @@ void MainWindowCurve::onItemClicked(QTableWidgetItem* item)
|
||||||
|
|
||||||
PropertyService()->initWellProperty(m_strUuid, strSlfName, strWellName, m_iY1, m_iY2);
|
PropertyService()->initWellProperty(m_strUuid, strSlfName, strWellName, m_iY1, m_iY2);
|
||||||
//取消所有选中单元格
|
//取消所有选中单元格
|
||||||
emit CallManage::getInstance()->sig_Raise(m_strUuid, "", "", "", "", 1, "");
|
emit CallManage::getInstance()->sig_Raise(m_strUuid, strSlfName, strWellName, "", "", 1, "");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2579,7 +2578,7 @@ void MainWindowCurve::s_NewTrack()
|
||||||
//井没创建,创建井+道+曲线
|
//井没创建,创建井+道+曲线
|
||||||
//新建井
|
//新建井
|
||||||
s_NewWell(strWellName, strSlfName);
|
s_NewWell(strWellName, strSlfName);
|
||||||
m_listWell.push_back(strWellName);
|
//m_listWell.push_back(strWellName);//重复添加
|
||||||
|
|
||||||
column= 0;
|
column= 0;
|
||||||
}
|
}
|
||||||
|
|
@ -2644,7 +2643,7 @@ void MainWindowCurve::s_NewDepth()
|
||||||
//井没创建,创建井+道+曲线
|
//井没创建,创建井+道+曲线
|
||||||
//新建井
|
//新建井
|
||||||
s_NewWell(strWellName, strSlfName);
|
s_NewWell(strWellName, strSlfName);
|
||||||
m_listWell.push_back(strWellName);
|
//m_listWell.push_back(strWellName);//重复添加
|
||||||
|
|
||||||
column= 0;
|
column= 0;
|
||||||
}
|
}
|
||||||
|
|
@ -2701,7 +2700,14 @@ void MainWindowCurve::s_NewDepth()
|
||||||
//曲线
|
//曲线
|
||||||
void MainWindowCurve::s_NewLogs()
|
void MainWindowCurve::s_NewLogs()
|
||||||
{
|
{
|
||||||
QStringList sret = this->getSelectWell();
|
//选中道
|
||||||
|
if(m_SelectTableItem.m_iTableType==2) {
|
||||||
|
//新建曲线
|
||||||
|
emit CallManage::getInstance()->sig_AddLine(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "AC");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList sret = this->getSelectWell_New();
|
||||||
if(sret.length() <= 0)
|
if(sret.length() <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -2712,7 +2718,14 @@ void MainWindowCurve::s_NewLogs()
|
||||||
//波列
|
//波列
|
||||||
void MainWindowCurve::s_NewWave()
|
void MainWindowCurve::s_NewWave()
|
||||||
{
|
{
|
||||||
QStringList sret = this->getSelectWell();
|
//选中道
|
||||||
|
if(m_SelectTableItem.m_iTableType==2) {
|
||||||
|
//新建波列
|
||||||
|
emit CallManage::getInstance()->sig_AddWave(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "STAIMAGE");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList sret = this->getSelectWell_New();
|
||||||
if(sret.length() <= 0)
|
if(sret.length() <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -2723,7 +2736,14 @@ void MainWindowCurve::s_NewWave()
|
||||||
//解释结论
|
//解释结论
|
||||||
void MainWindowCurve::s_NewOGResult()
|
void MainWindowCurve::s_NewOGResult()
|
||||||
{
|
{
|
||||||
QStringList sret = this->getSelectWell();
|
//选中道
|
||||||
|
if(m_SelectTableItem.m_iTableType==2) {
|
||||||
|
//新建表格曲线
|
||||||
|
emit CallManage::getInstance()->sig_AddTableLine(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "RESULT");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList sret = this->getSelectWell_New();
|
||||||
if(sret.length() <= 0)
|
if(sret.length() <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -2734,7 +2754,14 @@ void MainWindowCurve::s_NewOGResult()
|
||||||
//固井结论道
|
//固井结论道
|
||||||
void MainWindowCurve::s_NewGujing()
|
void MainWindowCurve::s_NewGujing()
|
||||||
{
|
{
|
||||||
QStringList sret = this->getSelectWell();
|
//选中道
|
||||||
|
if(m_SelectTableItem.m_iTableType==2) {
|
||||||
|
//新建表格曲线
|
||||||
|
emit CallManage::getInstance()->sig_AddTableLine(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "GUJING1_RESULT");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList sret = this->getSelectWell_New();
|
||||||
if(sret.length() <= 0)
|
if(sret.length() <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -2745,7 +2772,14 @@ void MainWindowCurve::s_NewGujing()
|
||||||
//井壁取心
|
//井壁取心
|
||||||
void MainWindowCurve::s_NewSideCore()
|
void MainWindowCurve::s_NewSideCore()
|
||||||
{
|
{
|
||||||
QStringList sret = this->getSelectWell();
|
//选中道
|
||||||
|
if(m_SelectTableItem.m_iTableType==2) {
|
||||||
|
//新建表格曲线
|
||||||
|
emit CallManage::getInstance()->sig_AddTableLine(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "SWALL_CORE");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList sret = this->getSelectWell_New();
|
||||||
if(sret.length() <= 0)
|
if(sret.length() <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -2756,7 +2790,14 @@ void MainWindowCurve::s_NewSideCore()
|
||||||
//岩心分析
|
//岩心分析
|
||||||
void MainWindowCurve::s_NewCore()
|
void MainWindowCurve::s_NewCore()
|
||||||
{
|
{
|
||||||
QStringList sret = this->getSelectWell();
|
//选中道
|
||||||
|
if(m_SelectTableItem.m_iTableType==2) {
|
||||||
|
//新建表格曲线
|
||||||
|
emit CallManage::getInstance()->sig_AddTableLine(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "CORE_PHYSICS");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList sret = this->getSelectWell_New();
|
||||||
if(sret.length() <= 0)
|
if(sret.length() <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -2767,7 +2808,14 @@ void MainWindowCurve::s_NewCore()
|
||||||
//录井剖面
|
//录井剖面
|
||||||
void MainWindowCurve::s_NewMudlogging()
|
void MainWindowCurve::s_NewMudlogging()
|
||||||
{
|
{
|
||||||
QStringList sret = this->getSelectWell();
|
//选中道
|
||||||
|
if(m_SelectTableItem.m_iTableType==2) {
|
||||||
|
//新建表格曲线
|
||||||
|
emit CallManage::getInstance()->sig_AddTableLine(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "GEO_LITH");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList sret = this->getSelectWell_New();
|
||||||
if(sret.length() <= 0)
|
if(sret.length() <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -2778,7 +2826,14 @@ void MainWindowCurve::s_NewMudlogging()
|
||||||
//岩性描述
|
//岩性描述
|
||||||
void MainWindowCurve::s_NewTxt()
|
void MainWindowCurve::s_NewTxt()
|
||||||
{
|
{
|
||||||
QStringList sret = this->getSelectWell();
|
//选中道
|
||||||
|
if(m_SelectTableItem.m_iTableType==2) {
|
||||||
|
//新建表格曲线
|
||||||
|
emit CallManage::getInstance()->sig_AddTableLine(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "WORDS_RELUST");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList sret = this->getSelectWell_New();
|
||||||
if(sret.length() <= 0)
|
if(sret.length() <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -2789,7 +2844,14 @@ void MainWindowCurve::s_NewTxt()
|
||||||
//岩心照片
|
//岩心照片
|
||||||
void MainWindowCurve::s_NewCoreImage()
|
void MainWindowCurve::s_NewCoreImage()
|
||||||
{
|
{
|
||||||
QStringList sret = this->getSelectWell();
|
//选中道
|
||||||
|
if(m_SelectTableItem.m_iTableType==2) {
|
||||||
|
//新建表格曲线
|
||||||
|
emit CallManage::getInstance()->sig_AddTableLine(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "IMAGE_DATA");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList sret = this->getSelectWell_New();
|
||||||
if(sret.length() <= 0)
|
if(sret.length() <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -2822,7 +2884,14 @@ void MainWindowCurve::s_NewCrack()
|
||||||
//蝌蚪图
|
//蝌蚪图
|
||||||
void MainWindowCurve::s_NewShowDip()
|
void MainWindowCurve::s_NewShowDip()
|
||||||
{
|
{
|
||||||
QStringList sret = this->getSelectWell();
|
//选中道
|
||||||
|
if(m_SelectTableItem.m_iTableType==2) {
|
||||||
|
//新建表格曲线
|
||||||
|
emit CallManage::getInstance()->sig_AddTableLine(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "FRAC_HOLE.TABLE");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList sret = this->getSelectWell_New();
|
||||||
if(sret.length() <= 0)
|
if(sret.length() <= 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
@ -3221,7 +3290,7 @@ void MainWindowCurve::s_AddLine_Property(QString strSlfName, QString strWellName
|
||||||
double newLeftScale, double newRightScale, QString strScaleType, QColor lineColor, double width, Qt::PenStyle lineStyle, QStringList listOtherProperty)
|
double newLeftScale, double newRightScale, QString strScaleType, QColor lineColor, double width, Qt::PenStyle lineStyle, QStringList listOtherProperty)
|
||||||
{
|
{
|
||||||
emit CallManage::getInstance()->sig_AddLine_Property(m_strUuid, strSlfName, strWellName, strTrackName, strLineName,
|
emit CallManage::getInstance()->sig_AddLine_Property(m_strUuid, strSlfName, strWellName, strTrackName, strLineName,
|
||||||
newLeftScale, newRightScale, strScaleType, lineColor, width, lineStyle);
|
newLeftScale, newRightScale, strScaleType, lineColor, width, lineStyle, listOtherProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
//新建井+道+曲线(首条)
|
//新建井+道+曲线(首条)
|
||||||
|
|
@ -3248,7 +3317,7 @@ void MainWindowCurve::NewWellAndTrack(QString strWellName, QString strSlfName, Q
|
||||||
//井没创建,创建井+道+曲线
|
//井没创建,创建井+道+曲线
|
||||||
//新建井
|
//新建井
|
||||||
s_NewWell(strWellName, strSlfName);
|
s_NewWell(strWellName, strSlfName);
|
||||||
m_listWell.push_back(strWellName);
|
//m_listWell.push_back(strWellName);//重复添加
|
||||||
|
|
||||||
//新建道+曲线
|
//新建道+曲线
|
||||||
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, strWellName, strSlfName, strLineName, strType, nW);
|
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, strWellName, strSlfName, strLineName, strType, nW);
|
||||||
|
|
@ -4239,3 +4308,92 @@ void MainWindowCurve::resizeItem(QString strWellName, double colWidth, double ro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindowCurve::slotContextMenu(QPoint pos)
|
||||||
|
{
|
||||||
|
if(ui->tableWidget_2->columnCount()==0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int column = ui->tableWidget_2->currentColumn();//列编号从0开始
|
||||||
|
if(column<0)
|
||||||
|
{
|
||||||
|
//当前没有选中井
|
||||||
|
QMessageBox::warning(this, "提示", "当前没有选中井", "确定");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(column%2==0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//空白列
|
||||||
|
QMessageBox::warning(this, "提示", "当前没有选中井", "确定");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//当前行
|
||||||
|
int iCurrentRow = ui->tableWidget_2->currentRow();
|
||||||
|
if(iCurrentRow == 0)
|
||||||
|
{
|
||||||
|
QMenu menu(ui->tableWidget_2);
|
||||||
|
menu.addAction(QIcon(::GetImagePath() + "antialiasing.png"), "删除当前测井图", this, &MainWindowCurve::slotDeleteSelectTrack);
|
||||||
|
menu.exec(ui->tableWidget_2->mapToGlobal(pos));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindowCurve::slotDeleteSelectTrack()
|
||||||
|
{
|
||||||
|
int colCount = ui->tableWidget_2->columnCount();
|
||||||
|
|
||||||
|
//当前列
|
||||||
|
int column = ui->tableWidget_2->currentColumn();//列编号从0开始
|
||||||
|
if(column<0)
|
||||||
|
{
|
||||||
|
//当前没有选中井
|
||||||
|
QMessageBox::warning(this, "提示", "当前没有选中井", "确定");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(column%2==0)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//空白列
|
||||||
|
QMessageBox::warning(this, "提示", "当前没有选中井", "确定");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//当前行
|
||||||
|
int iCurrentRow = ui->tableWidget_2->currentRow();
|
||||||
|
if(iCurrentRow == 0)
|
||||||
|
{
|
||||||
|
if(column==0)
|
||||||
|
{
|
||||||
|
if(colCount==1)//只有1口井
|
||||||
|
{
|
||||||
|
ui->tableWidget_2->removeColumn(column);
|
||||||
|
m_listWell.clear();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
QString strWellName = ui->tableWidget_2->item(iCurrentRow, column)->text();
|
||||||
|
m_listWell.removeOne(strWellName);
|
||||||
|
//
|
||||||
|
ui->tableWidget_2->removeColumn(column+1);//空白列,注意先删除空白列,否则列号改变
|
||||||
|
ui->tableWidget_2->removeColumn(column);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(column>1)
|
||||||
|
{
|
||||||
|
QString strWellName = ui->tableWidget_2->item(iCurrentRow, column)->text();
|
||||||
|
m_listWell.removeOne(strWellName);
|
||||||
|
//
|
||||||
|
ui->tableWidget_2->removeColumn(column);
|
||||||
|
ui->tableWidget_2->removeColumn(column-1);//空白列,注意先删除选中列,否则列号改变
|
||||||
|
}
|
||||||
|
//resizeWindow();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ public:
|
||||||
QLineEdit *spinbox3;
|
QLineEdit *spinbox3;
|
||||||
|
|
||||||
int m_iScale=200;
|
int m_iScale=200;
|
||||||
double m_iY1=0;
|
double m_iY1=-1000;
|
||||||
double m_iY2=0;
|
double m_iY2=0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
@ -118,7 +118,9 @@ public:
|
||||||
QStringList insertCol(int nW);
|
QStringList insertCol(int nW);
|
||||||
|
|
||||||
// 返回 strWellName << strSlfName
|
// 返回 strWellName << strSlfName
|
||||||
QStringList getSelectWell();
|
QStringList getSelectWell();
|
||||||
|
// 返回 strWellName << strSlfName
|
||||||
|
QStringList getSelectWell_New();
|
||||||
|
|
||||||
//停靠
|
//停靠
|
||||||
void dockLayout();
|
void dockLayout();
|
||||||
|
|
@ -156,6 +158,10 @@ public slots:
|
||||||
//右键--清除全部分段线
|
//右键--清除全部分段线
|
||||||
void s_DelAllShiftLine(QString strUuid);
|
void s_DelAllShiftLine(QString strUuid);
|
||||||
|
|
||||||
|
//右键菜单响应函数
|
||||||
|
void slotContextMenu(QPoint pos);
|
||||||
|
void slotDeleteSelectTrack();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void s_NewWell(QString strWellName, QString strSlfName);//新建井
|
void s_NewWell(QString strWellName, QString strSlfName);//新建井
|
||||||
void s_NewTrackChangeWidth(QString strWellName, int nW=0);//新建道后,改变井宽
|
void s_NewTrackChangeWidth(QString strWellName, int nW=0);//新建道后,改变井宽
|
||||||
|
|
|
||||||
|
|
@ -17,15 +17,9 @@
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
|
||||||
<widget class="QTableWidget" name="tableWidget"/>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTableWidget" name="tableWidget_2"/>
|
<widget class="QTableWidget" name="tableWidget_2"/>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QTableWidget" name="tableWidget_3"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|
|
||||||
|
|
@ -585,6 +585,9 @@ void QtProjectWidgets::loadWellTree(QTreeWidgetItem *parent, QString fileFull, Q
|
||||||
//参数卡-》树图
|
//参数卡-》树图
|
||||||
QTreeWidgetItem *itemCardChild = new QTreeWidgetItem();
|
QTreeWidgetItem *itemCardChild = new QTreeWidgetItem();
|
||||||
itemCardChild->setText(0, strCurveName);
|
itemCardChild->setText(0, strCurveName);
|
||||||
|
itemCardChild->setData(0, Qt::UserRole, "cardObject"); // 存储额外数据,如ID
|
||||||
|
itemCardChild->setData(0, Qt::UserRole + 1, fileFull); // 存储额外数据,井次文件路径
|
||||||
|
itemCardChild->setData(0, Qt::UserRole + 2, wellname); // 存储额外数据,井名
|
||||||
itemCardChild->setIcon(0, iconParameterCard);
|
itemCardChild->setIcon(0, iconParameterCard);
|
||||||
if (0 == itemParameterCard->childCount())
|
if (0 == itemParameterCard->childCount())
|
||||||
{
|
{
|
||||||
|
|
@ -622,6 +625,13 @@ void QtProjectWidgets::initMenu()
|
||||||
_menuRoot = new QMenu(ui->treeWidget);
|
_menuRoot = new QMenu(ui->treeWidget);
|
||||||
initRootTreeMenu(_menuRoot, ui->treeWidget);
|
initRootTreeMenu(_menuRoot, ui->treeWidget);
|
||||||
|
|
||||||
|
_menuWells = new QMenu(ui->treeWidget);
|
||||||
|
initWellsTreeMenu(_menuWells, ui->treeWidget);
|
||||||
|
|
||||||
|
//参数卡对象-右键菜单
|
||||||
|
_menuCardObject = new QMenu(ui->treeWidget);
|
||||||
|
initParameterCardTreeMenu(_menuCardObject, ui->treeWidget);
|
||||||
|
|
||||||
//曲线对象-右键菜单
|
//曲线对象-右键菜单
|
||||||
_menuCurveObject = new QMenu(ui->treeWidget);
|
_menuCurveObject = new QMenu(ui->treeWidget);
|
||||||
initCurveObjectTreeMenu(_menuCurveObject, ui->treeWidget);
|
initCurveObjectTreeMenu(_menuCurveObject, ui->treeWidget);
|
||||||
|
|
@ -662,7 +672,33 @@ void QtProjectWidgets::initRootTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
||||||
m_action_Open->setIcon(QIcon(GetImagePath() + "openproject.png")); // 设置图标
|
m_action_Open->setIcon(QIcon(GetImagePath() + "openproject.png")); // 设置图标
|
||||||
connect(m_action_Open, SIGNAL(triggered(bool)), this, SLOT(onOpenProject(bool)));
|
connect(m_action_Open, SIGNAL(triggered(bool)), this, SLOT(onOpenProject(bool)));
|
||||||
menu->addAction(m_action_Open);
|
menu->addAction(m_action_Open);
|
||||||
|
}
|
||||||
|
|
||||||
|
//初始化根节点(项目名称)-右键菜单
|
||||||
|
void QtProjectWidgets::initWellsTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
||||||
|
{
|
||||||
|
QAction* action_New = new QAction("数据导入", treeWidget);
|
||||||
|
action_New->setIcon(QIcon(GetImagePath() + "wellog.png")); // 设置图标
|
||||||
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSingleWellLogData()));
|
||||||
|
menu->addAction(action_New);
|
||||||
|
|
||||||
|
action_New = new QAction("导入离散数据", treeWidget);
|
||||||
|
action_New->setIcon(QIcon(GetImagePath() + "icon/intable.png")); // 设置图标
|
||||||
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSlfTable()));
|
||||||
|
menu->addAction(action_New);
|
||||||
|
|
||||||
|
// action_New = new QAction("输出数据", treeWidget);
|
||||||
|
// action_New->setIcon(QIcon(GetImagePath() + "icon/outcurves.png")); // 设置图标
|
||||||
|
// connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onOutWellLogRound()));
|
||||||
|
// menu->addAction(action_New);
|
||||||
|
}
|
||||||
|
//初始化参数卡-右键菜单
|
||||||
|
void QtProjectWidgets::initParameterCardTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
||||||
|
{
|
||||||
|
QAction* action_CardObject = new QAction("数据查看", treeWidget);
|
||||||
|
action_CardObject->setIcon(QIcon(GetImagePath() + "icon/Sheet.png")); // 设置图标":/image/u174.png"
|
||||||
|
connect(action_CardObject, SIGNAL(triggered(bool)), this, SLOT(onShowParameterCard(bool)));
|
||||||
|
menu->addAction(action_CardObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
//初始化曲线对象(AC、BS...)-右键菜单
|
//初始化曲线对象(AC、BS...)-右键菜单
|
||||||
|
|
@ -710,7 +746,7 @@ void QtProjectWidgets::initTableObjectTreeMenu(QMenu *menu, QTreeWidget *treeWid
|
||||||
//初始化根节点(井名称)-右键菜单
|
//初始化根节点(井名称)-右键菜单
|
||||||
void QtProjectWidgets::initWellNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
void QtProjectWidgets::initWellNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
||||||
{
|
{
|
||||||
QAction* action_New = new QAction("导入数据", treeWidget);
|
QAction* action_New = new QAction("数据导入", treeWidget);
|
||||||
action_New->setIcon(QIcon(GetImagePath() + "wellog.png")); // 设置图标
|
action_New->setIcon(QIcon(GetImagePath() + "wellog.png")); // 设置图标
|
||||||
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSingleWellLogData()));
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSingleWellLogData()));
|
||||||
menu->addAction(action_New);
|
menu->addAction(action_New);
|
||||||
|
|
@ -734,7 +770,17 @@ void QtProjectWidgets::initWellNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget
|
||||||
//初始化根节点(井次名称)-右键菜单
|
//初始化根节点(井次名称)-右键菜单
|
||||||
void QtProjectWidgets::initSlfNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
void QtProjectWidgets::initSlfNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
||||||
{
|
{
|
||||||
QAction* action_New = new QAction("编辑测井信息", treeWidget);
|
QAction* action_New = new QAction("数据导入", treeWidget);
|
||||||
|
action_New->setIcon(QIcon(GetImagePath() + "wellog.png")); // 设置图标
|
||||||
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSingleWellLogData()));
|
||||||
|
menu->addAction(action_New);
|
||||||
|
|
||||||
|
action_New = new QAction("导入离散数据", treeWidget);
|
||||||
|
action_New->setIcon(QIcon(GetImagePath() + "icon/intable.png")); // 设置图标
|
||||||
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onImportSlfTable()));
|
||||||
|
menu->addAction(action_New);
|
||||||
|
|
||||||
|
action_New = new QAction("编辑测井信息", treeWidget);
|
||||||
action_New->setIcon(QIcon(GetImagePath() + "icon/Edit.png")); // 设置图标
|
action_New->setIcon(QIcon(GetImagePath() + "icon/Edit.png")); // 设置图标
|
||||||
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onWelllogInformation()));
|
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onWelllogInformation()));
|
||||||
menu->addAction(action_New);
|
menu->addAction(action_New);
|
||||||
|
|
@ -803,7 +849,13 @@ void QtProjectWidgets::s_OpenProject(QString fileFull)
|
||||||
s_loadTreeWidget(fileFull);
|
s_loadTreeWidget(fileFull);
|
||||||
}
|
}
|
||||||
|
|
||||||
//数据查看
|
//参数表数据查看
|
||||||
|
void QtProjectWidgets::onShowParameterCard(bool checked)
|
||||||
|
{
|
||||||
|
emit CallManage::getInstance()->sig_ShowParameterCard(m_strSlfName, m_strCurveObjectName);
|
||||||
|
}
|
||||||
|
|
||||||
|
//曲线数据查看
|
||||||
void QtProjectWidgets::onShowCurve(bool checked)
|
void QtProjectWidgets::onShowCurve(bool checked)
|
||||||
{
|
{
|
||||||
emit CallManage::getInstance()->sig_ShowCurve(m_strSlfName, m_strCurveObjectName);
|
emit CallManage::getInstance()->sig_ShowCurve(m_strSlfName, m_strCurveObjectName);
|
||||||
|
|
@ -1070,6 +1122,14 @@ void QtProjectWidgets::onImportSingleWellLogData()
|
||||||
QTreeWidgetItem *wellItem = *ui->treeWidget->selectedItems().begin();
|
QTreeWidgetItem *wellItem = *ui->treeWidget->selectedItems().begin();
|
||||||
|
|
||||||
QString wellname = wellItem->text(0);
|
QString wellname = wellItem->text(0);
|
||||||
|
if (wellname == "井组")
|
||||||
|
{
|
||||||
|
QFileInfo temDir(file_name);
|
||||||
|
QString tempWellName=temDir.completeBaseName();
|
||||||
|
tempWellName.replace(" ","");//whp add 2020.3.3 删除井名中的空格
|
||||||
|
//m_WellLogRoundInfo->SetName(tempWellName.toStdString());
|
||||||
|
wellname = tempWellName;
|
||||||
|
}
|
||||||
QString wellroundname = wellname;
|
QString wellroundname = wellname;
|
||||||
ImportDataDialog *pDialog = new ImportDataDialog(NULL,wellname,wellroundname);
|
ImportDataDialog *pDialog = new ImportDataDialog(NULL,wellname,wellroundname);
|
||||||
QTreeWidgetItem rootItem = *ui->treeWidget->topLevelItem(0);
|
QTreeWidgetItem rootItem = *ui->treeWidget->topLevelItem(0);
|
||||||
|
|
@ -1130,6 +1190,11 @@ void QtProjectWidgets::onItemClicked(QTreeWidgetItem* item, int index)
|
||||||
//根节点(项目名称)-右键菜单
|
//根节点(项目名称)-右键菜单
|
||||||
popMenu = _menuRoot;
|
popMenu = _menuRoot;
|
||||||
}
|
}
|
||||||
|
else if (strTreeTag == "wells")
|
||||||
|
{
|
||||||
|
//井组-右键菜单
|
||||||
|
popMenu = _menuWells;
|
||||||
|
}
|
||||||
else if (strTreeTag == "curveObject"){
|
else if (strTreeTag == "curveObject"){
|
||||||
//曲线对象(AC、BS...)-右键菜单
|
//曲线对象(AC、BS...)-右键菜单
|
||||||
popMenu = _menuCurveObject;
|
popMenu = _menuCurveObject;
|
||||||
|
|
@ -1142,6 +1207,12 @@ void QtProjectWidgets::onItemClicked(QTreeWidgetItem* item, int index)
|
||||||
m_strCurveObjectName = item->text(0);
|
m_strCurveObjectName = item->text(0);
|
||||||
m_strSlfName = item->data(0, Qt::UserRole+1).toString();
|
m_strSlfName = item->data(0, Qt::UserRole+1).toString();
|
||||||
}
|
}
|
||||||
|
else if (strTreeTag == "cardObject"){
|
||||||
|
//参数卡对象
|
||||||
|
popMenu = _menuCardObject;
|
||||||
|
m_strCurveObjectName = item->text(0);
|
||||||
|
m_strSlfName = item->data(0, Qt::UserRole+1).toString();
|
||||||
|
}
|
||||||
else if (strTreeTag == "tableObject")
|
else if (strTreeTag == "tableObject")
|
||||||
{
|
{
|
||||||
//表格对象
|
//表格对象
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,8 @@ public slots:
|
||||||
//
|
//
|
||||||
void s_NewProject(); //新建项目
|
void s_NewProject(); //新建项目
|
||||||
void s_OpenProject(QString fileFull); //打开项目
|
void s_OpenProject(QString fileFull); //打开项目
|
||||||
|
//参数表
|
||||||
|
void onShowParameterCard(bool checked = false);//数据查看
|
||||||
//曲线
|
//曲线
|
||||||
void onShowCurve(bool checked = false); //数据查看
|
void onShowCurve(bool checked = false); //数据查看
|
||||||
void ApplyShiftDepth(QString strSlfName, QString strLineName, double DepthOffset);
|
void ApplyShiftDepth(QString strSlfName, QString strLineName, double DepthOffset);
|
||||||
|
|
@ -62,7 +63,9 @@ public:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
//右键菜单
|
//右键菜单
|
||||||
QMenu *_menuRoot;
|
QMenu *_menuRoot; //根目录
|
||||||
|
QMenu *_menuWells; //井组
|
||||||
|
QMenu *_menuCardObject; //参数卡
|
||||||
QMenu *_menuCurveObject; //曲线对象(AC、BS...)
|
QMenu *_menuCurveObject; //曲线对象(AC、BS...)
|
||||||
QMenu *_menuWaveObject; //波列对象
|
QMenu *_menuWaveObject; //波列对象
|
||||||
QMenu *_menuTableObject; //表格对象
|
QMenu *_menuTableObject; //表格对象
|
||||||
|
|
@ -92,6 +95,10 @@ public:
|
||||||
|
|
||||||
//初始化根节点(项目名称)-右键菜单
|
//初始化根节点(项目名称)-右键菜单
|
||||||
void initRootTreeMenu(QMenu *menu, QTreeWidget *treeWidget);
|
void initRootTreeMenu(QMenu *menu, QTreeWidget *treeWidget);
|
||||||
|
//井组-右键菜单
|
||||||
|
void initWellsTreeMenu(QMenu *menu, QTreeWidget *treeWidget);
|
||||||
|
//初始化参数卡-右键菜单
|
||||||
|
void initParameterCardTreeMenu(QMenu *menu, QTreeWidget *treeWidget);
|
||||||
//初始化曲线对象(AC、BS...)-右键菜单
|
//初始化曲线对象(AC、BS...)-右键菜单
|
||||||
void initCurveObjectTreeMenu(QMenu *menu, QTreeWidget *treeWidget);
|
void initCurveObjectTreeMenu(QMenu *menu, QTreeWidget *treeWidget);
|
||||||
//初始化波列对象-右键菜单
|
//初始化波列对象-右键菜单
|
||||||
|
|
|
||||||
2
编译说明.txt
2
编译说明.txt
|
|
@ -13,7 +13,7 @@ https://www.cnblogs.com/ys0103/p/4562493.html
|
||||||
10.DataMgr
|
10.DataMgr
|
||||||
11.OSGFramework
|
11.OSGFramework
|
||||||
12.WellLogModule
|
12.WellLogModule
|
||||||
13.WellLogUI--删除WellLogUI\include\PaiTableWidget.h后编译
|
13.WellLogUI
|
||||||
14.ModuleConsole
|
14.ModuleConsole
|
||||||
15.appDllTest--算法测试
|
15.appDllTest--算法测试
|
||||||
16.ConvertorManager
|
16.ConvertorManager
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user