选择左侧树井名称 , 点击可视解释,在空白 MainWindowCurve, 点击深度生成井、道、深度视图。
This commit is contained in:
parent
5fd6049385
commit
752c7347c9
|
|
@ -379,6 +379,8 @@ void MainWindow::s_showView()
|
|||
{
|
||||
//----
|
||||
MainWindowCurve *mainWindowCurve = new MainWindowCurve();//中间工作区
|
||||
// 左侧树
|
||||
mainWindowCurve->m_leftWidgets = m_projectWidgets;
|
||||
m_centerWidgets->addTab(mainWindowCurve, "解释视图");
|
||||
return;
|
||||
}
|
||||
|
|
@ -388,6 +390,8 @@ void MainWindow::s_showView()
|
|||
|
||||
//----
|
||||
MainWindowCurve *mainWindowCurve = new MainWindowCurve();//中间工作区
|
||||
// 左侧树
|
||||
mainWindowCurve->m_leftWidgets = m_projectWidgets;
|
||||
m_centerWidgets->addTab(mainWindowCurve, fileName);
|
||||
mainWindowCurve->Open(fileFull);
|
||||
|
||||
|
|
|
|||
|
|
@ -657,12 +657,43 @@ void MainWindowCurve::s_NewTrack()
|
|||
|
||||
void MainWindowCurve::s_NewDepth()
|
||||
{
|
||||
int column = -1;
|
||||
int nW = 100;
|
||||
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];
|
||||
// QString strLineName = list[2];
|
||||
// QString strType = list[3];
|
||||
|
||||
if(!m_listWell.contains(strWellName))
|
||||
{
|
||||
//井没创建,创建井+道+曲线
|
||||
//新建井
|
||||
s_NewWell(strWellName);
|
||||
m_listWell.push_back(strWellName);
|
||||
|
||||
column= 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(ui->tableWidget_2->columnCount()==0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int column = ui->tableWidget_2->currentColumn();//列编号从0开始
|
||||
int iWidth = 0;
|
||||
if(column < 0)
|
||||
{
|
||||
column = ui->tableWidget_2->currentColumn();//列编号从0开始
|
||||
iWidth = ui->tableWidget_2->columnWidth(column);
|
||||
}
|
||||
|
||||
if(column<0)
|
||||
{
|
||||
//当前没有选中井
|
||||
|
|
@ -679,9 +710,7 @@ void MainWindowCurve::s_NewDepth()
|
|||
}
|
||||
|
||||
QString strWellName = ui->tableWidget_2->item(0, column)->text();
|
||||
int iWidth = ui->tableWidget_2->columnWidth(column);
|
||||
|
||||
int nW = 100;
|
||||
//设置列宽
|
||||
ui->tableWidget_2->setColumnWidth(column, iWidth+nW+8);
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
#include "formwell.h"
|
||||
#include "geometryutils.h"
|
||||
#include "formmultiheads.h"
|
||||
#include "qtprojectwidgets.h"
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
|
|
@ -59,6 +60,8 @@ public:
|
|||
|
||||
QDockWidget *m_dock1;
|
||||
|
||||
QtProjectWidgets *m_leftWidgets = NULL; //左侧工程区
|
||||
|
||||
public:
|
||||
//展示所有井
|
||||
void DisplayWells(QJsonArray wellsArray);
|
||||
|
|
|
|||
|
|
@ -507,9 +507,12 @@ void QMyCustomPlot::s_ClearFillMode(QString strUuid, QString strSlfName, QString
|
|||
{
|
||||
this->removeGraph(1);
|
||||
}
|
||||
graph(0)->setBrush(Qt::NoBrush);
|
||||
//
|
||||
replot();
|
||||
if(graph(0))
|
||||
{
|
||||
graph(0)->setBrush(Qt::NoBrush);
|
||||
//
|
||||
replot();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,30 @@ QMyTreeWidget::~QMyTreeWidget()
|
|||
|
||||
}
|
||||
|
||||
QString QMyTreeWidget::getCurrentItemString()
|
||||
{
|
||||
QString sret = "";
|
||||
QTreeWidgetItem *item = currentItem();
|
||||
if(!item)
|
||||
return sret;
|
||||
if(item->parent()==NULL)
|
||||
{
|
||||
return sret;
|
||||
}
|
||||
|
||||
QString strTreeTag = item->data(0, Qt::UserRole).toString();
|
||||
if (strTreeTag == "wellItem")
|
||||
{
|
||||
//曲线
|
||||
QString strSlfName = item->data(0, Qt::UserRole+1).toString();
|
||||
//井名
|
||||
QString strWellName = item->text(0);
|
||||
|
||||
sret = strSlfName + "#@@#"+ strWellName + "#@@#" +item->text(0)+ "#@@#" + strTreeTag;
|
||||
}
|
||||
return sret;
|
||||
}
|
||||
|
||||
void QMyTreeWidget::startDrag(Qt::DropActions supportedActions)
|
||||
{
|
||||
if(currentItem()->parent()==NULL)
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ public:
|
|||
QMyTreeWidget(QWidget *parent = nullptr);
|
||||
~QMyTreeWidget();
|
||||
|
||||
QString getCurrentItemString();
|
||||
protected:
|
||||
virtual void startDrag(Qt::DropActions supportedActions);
|
||||
|
||||
|
|
|
|||
|
|
@ -65,6 +65,11 @@ QtProjectWidgets::~QtProjectWidgets()
|
|||
delete ui;
|
||||
}
|
||||
|
||||
QString QtProjectWidgets::getLeftTreeString()
|
||||
{
|
||||
return ui->treeWidget->getCurrentItemString();
|
||||
}
|
||||
|
||||
//初始化树图控件
|
||||
void QtProjectWidgets::initTreeWidget(QString fullPath, QString strProjectName)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ public:
|
|||
QtProjectWidgets(QWidget *parent = nullptr);
|
||||
~QtProjectWidgets();
|
||||
|
||||
QString getLeftTreeString();
|
||||
|
||||
private:
|
||||
Ui::QtProjectWidgetsClass *ui;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user