Merge branch 'main' of http://git.hivekion.com:3000/jiayulong/logplus
This commit is contained in:
commit
4bc1e77a31
|
|
@ -127,6 +127,10 @@ signals:
|
||||||
//绘制对称曲线
|
//绘制对称曲线
|
||||||
void sig_ChangeDrawSymmetry(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawSymmetry);
|
void sig_ChangeDrawSymmetry(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawSymmetry);
|
||||||
|
|
||||||
|
//斜井三图一表
|
||||||
|
void sig_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||||
|
QObject *pTvd);
|
||||||
|
|
||||||
//斜井三图一表
|
//斜井三图一表
|
||||||
void sig_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
void sig_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||||
QString strGroup, QString strProperty, QVariant variant);
|
QString strGroup, QString strProperty, QVariant variant);
|
||||||
|
|
|
||||||
|
|
@ -81,3 +81,36 @@ void CallPlugin::setPluginParams(QString strPluginName, QString strParams)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QList<QAction *> CallPlugin::getPluginActionList(QWidget *parent)
|
||||||
|
{
|
||||||
|
QList<QAction *> ret;
|
||||||
|
foreach (HPLUGIN_INFO *pluItem, HPluginManage::getInstance()->getPluginList())
|
||||||
|
{
|
||||||
|
HPluginInterface *pluInter = reinterpret_cast<HPluginInterface *>(pluItem->pluClass);
|
||||||
|
QWidget *pWidget = pluInter->createWindow(parent);
|
||||||
|
if(pWidget)
|
||||||
|
pWidget->hide();
|
||||||
|
QAction *p = pluInter->createAction(parent);
|
||||||
|
if(p)
|
||||||
|
ret << p;
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
QAction *CallPlugin::getPluginAction(QString strPluginName, QWidget *parent)
|
||||||
|
{
|
||||||
|
if (strPluginName == "")
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
|
foreach (HPLUGIN_INFO *pluItem, HPluginManage::getInstance()->getPluginList())
|
||||||
|
{
|
||||||
|
HPluginInterface *pluInter = reinterpret_cast<HPluginInterface *>(pluItem->pluClass);
|
||||||
|
if (pluItem->pluName == strPluginName)
|
||||||
|
{
|
||||||
|
QAction *pAct = pluInter->createAction(parent);
|
||||||
|
return pAct;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,13 @@ public:
|
||||||
QString getPluginParams(QString strPluginName);
|
QString getPluginParams(QString strPluginName);
|
||||||
void setPluginParams(QString strPluginName, QString strParams);
|
void setPluginParams(QString strPluginName, QString strParams);
|
||||||
|
|
||||||
|
// 从插件模块中获取所有需要显示在平台的按钮
|
||||||
|
QList<QAction*> getPluginActionList(QWidget *parent = Q_NULLPTR);
|
||||||
|
|
||||||
|
//根据插件名称获取平台显示按钮
|
||||||
|
QAction *getPluginAction(QString strPluginName, QWidget *parent = Q_NULLPTR);
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Q_DISABLE_COPY(CallPlugin)
|
Q_DISABLE_COPY(CallPlugin)
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ struct DRAWBASE_EXPORT WaveMessage
|
||||||
ColorMessage m_ColorMessage;
|
ColorMessage m_ColorMessage;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DRAWBASE_EXPORT CDrawBase/*:public CQtWellLogTrackNode*/
|
class DRAWBASE_EXPORT CDrawBase : public QObject/*:public CQtWellLogTrackNode*/
|
||||||
{
|
{
|
||||||
// Q_OBJECT
|
// Q_OBJECT
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
59
Plugin/PluginUnit/PluginUnit.cpp
Normal file
59
Plugin/PluginUnit/PluginUnit.cpp
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
#include "PluginUnit.h"
|
||||||
|
#include "PluginName.h"
|
||||||
|
|
||||||
|
#include "myunitui.h"
|
||||||
|
MyUnitUI *_window = nullptr;
|
||||||
|
|
||||||
|
PluginUnit::PluginUnit(QObject *parent) :
|
||||||
|
QObject(parent)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
QString PluginUnit::getPluName() const
|
||||||
|
{
|
||||||
|
QString pluName = tr(PLUGINUNIT);
|
||||||
|
return pluName;
|
||||||
|
}
|
||||||
|
|
||||||
|
QIcon PluginUnit::icon() const
|
||||||
|
{
|
||||||
|
return QIcon(":/logo.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
int PluginUnit::windowType() const
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
QWidget *PluginUnit::createWindow(QWidget *parent) const
|
||||||
|
{
|
||||||
|
if (_window == nullptr)
|
||||||
|
{
|
||||||
|
_window = new MyUnitUI(parent);
|
||||||
|
}
|
||||||
|
return _window;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString PluginUnit::getParams() const
|
||||||
|
{
|
||||||
|
if (_window != nullptr)
|
||||||
|
return _window->getParams();
|
||||||
|
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
void PluginUnit::setParams(QString &strParams)
|
||||||
|
{
|
||||||
|
if (_window != nullptr)
|
||||||
|
return _window->setParams(strParams);
|
||||||
|
}
|
||||||
|
|
||||||
|
QAction *PluginUnit::createAction(QWidget *parent) const
|
||||||
|
{
|
||||||
|
if (_window == nullptr)
|
||||||
|
createWindow(parent);
|
||||||
|
|
||||||
|
return _window->createAction();
|
||||||
|
}
|
||||||
|
|
||||||
31
Plugin/PluginUnit/PluginUnit.h
Normal file
31
Plugin/PluginUnit/PluginUnit.h
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
#ifndef PLUGINUNIT_H
|
||||||
|
#define PLUGINUNIT_H
|
||||||
|
|
||||||
|
#include "HPluginInterface.h"
|
||||||
|
|
||||||
|
class PluginUnit : public QObject, public HPluginInterface
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
Q_INTERFACES(HPluginInterface)
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
|
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.HPluginInterface")
|
||||||
|
#endif // QT_VERSION >= 0x050000
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit PluginUnit(QObject *parent = 0);
|
||||||
|
|
||||||
|
virtual QString getPluName() const;
|
||||||
|
virtual QIcon icon() const;
|
||||||
|
virtual int windowType() const;
|
||||||
|
virtual QWidget *createWindow(QWidget *parent) const;
|
||||||
|
virtual QString getParams() const;
|
||||||
|
virtual void setParams(QString &strParams);
|
||||||
|
|
||||||
|
virtual QAction *createAction(QWidget *parent) const;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
};
|
||||||
|
#endif // PLUGINUNIT_H
|
||||||
50
Plugin/PluginUnit/PluginUnit.pro
Normal file
50
Plugin/PluginUnit/PluginUnit.pro
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
QT += core gui
|
||||||
|
|
||||||
|
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||||
|
# The following define makes your compiler emit warnings if you use
|
||||||
|
# any feature of Qt which has been marked as deprecated (the exact warnings
|
||||||
|
# depend on your compiler). Please consult the documentation of the
|
||||||
|
# deprecated API in order to know how to port your code away from it.
|
||||||
|
DEFINES += QT_DEPRECATED_WARNINGS
|
||||||
|
|
||||||
|
TEMPLATE = lib
|
||||||
|
|
||||||
|
CONFIG += c++17
|
||||||
|
|
||||||
|
HEADERS = \
|
||||||
|
PluginUnit.h \
|
||||||
|
myunitui.h
|
||||||
|
|
||||||
|
SOURCES = \
|
||||||
|
PluginUnit.cpp \
|
||||||
|
myunitui.cpp
|
||||||
|
|
||||||
|
|
||||||
|
FORMS += \
|
||||||
|
myunitui.ui
|
||||||
|
|
||||||
|
|
||||||
|
INCLUDEPATH += $$PWD/../../include \
|
||||||
|
$$PWD/../../HPluginManage \
|
||||||
|
$$PWD/../../CallPlugin
|
||||||
|
INCLUDEPATH += $$PWD/../../Slfio/include
|
||||||
|
|
||||||
|
# Default rules for deployment.
|
||||||
|
CONFIG(debug, debug|release){
|
||||||
|
TARGET = PluginUnitd
|
||||||
|
DESTDIR = $$PWD/../../Bin/customPlugind
|
||||||
|
MOC_DIR = ../tmp/PluginUnitd
|
||||||
|
UI_DIR = ../tmp/PluginUnitd
|
||||||
|
OBJECTS_DIR = ../tmp/PluginUnitd
|
||||||
|
LIBS += -L$$PWD/../../Bin/ -lCallPlugind -lHPluginManaged -lslfiod
|
||||||
|
} else {
|
||||||
|
TARGET = PluginUnit
|
||||||
|
DESTDIR = $$PWD/../../BinR/customPlugin
|
||||||
|
MOC_DIR = ../tmp/PluginUnit
|
||||||
|
UI_DIR = ../tmp/PluginUnit
|
||||||
|
OBJECTS_DIR = ../tmp/PluginUnit
|
||||||
|
LIBS += -L$$PWD/../../BinR/ -lCallPlugin -lHPluginManage -lslfio
|
||||||
|
}
|
||||||
|
|
||||||
|
RESOURCES += \
|
||||||
|
res.qrc
|
||||||
BIN
Plugin/PluginUnit/image/zfu.png
Normal file
BIN
Plugin/PluginUnit/image/zfu.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 479 B |
221
Plugin/PluginUnit/myunitui.cpp
Normal file
221
Plugin/PluginUnit/myunitui.cpp
Normal file
|
|
@ -0,0 +1,221 @@
|
||||||
|
#include "myunitui.h"
|
||||||
|
#include "ui_myunitui.h"
|
||||||
|
#include "PluginName.h"
|
||||||
|
#include "MemRdWt.h"
|
||||||
|
#include <QJsonDocument>
|
||||||
|
#include <QJsonObject>
|
||||||
|
|
||||||
|
//固井结构体(注:此处为表格输出示例)
|
||||||
|
typedef struct ss_struct
|
||||||
|
{
|
||||||
|
int GNO;
|
||||||
|
float GSDEP,GEDEP;
|
||||||
|
int GRESULT;
|
||||||
|
} GUJING;
|
||||||
|
|
||||||
|
MyUnitUI::MyUnitUI(QWidget *parent) :
|
||||||
|
QWidget(parent),
|
||||||
|
ui(new Ui::MyUnitUI)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
//保存logplus窗口句柄
|
||||||
|
m_mainParentWindow = (QMainWindow *)parent;
|
||||||
|
|
||||||
|
//绑定logplus信号槽
|
||||||
|
connect(this, SIGNAL(sig_PluginMsg(QString)), m_mainParentWindow, SLOT(s_PluginMsg(QString)));
|
||||||
|
|
||||||
|
//测试用
|
||||||
|
//点击按钮
|
||||||
|
connect(ui->pushButton, &QPushButton::clicked, this, [ = ]()
|
||||||
|
{
|
||||||
|
s_ButtonClick();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
MyUnitUI::~MyUnitUI()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString MyUnitUI::getParams()
|
||||||
|
{
|
||||||
|
return ui->lineEdit->text();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MyUnitUI::setParams(QString &strParams)
|
||||||
|
{
|
||||||
|
if (strParams.length() <= 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QJsonParseError err_rpt;
|
||||||
|
QJsonDocument root_Doc = QJsonDocument::fromJson(strParams.toStdString().c_str(), &err_rpt);//字符串格式化为JSON
|
||||||
|
if (err_rpt.error != QJsonParseError::NoError)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
QJsonObject root_Obj = root_Doc.object();
|
||||||
|
if (root_Obj.contains("prjname"))
|
||||||
|
{
|
||||||
|
// 获取当前项目名称
|
||||||
|
m_strPrjName = root_Obj.value("prjname").toString();
|
||||||
|
ui->lineEdit->setText(m_strPrjName);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
QAction *MyUnitUI::createAction()
|
||||||
|
{
|
||||||
|
//下面, 平台显示按钮, 如需要平台显示解开注释
|
||||||
|
m_pAction = new QAction();
|
||||||
|
m_pAction->setText("直方图");
|
||||||
|
m_pAction->setToolTip("直方图");
|
||||||
|
m_pAction->setIcon( QIcon(":/image/zfu.png"));
|
||||||
|
m_pAction->setProperty("PluginName", PLUGINUNIT);
|
||||||
|
|
||||||
|
return m_pAction;
|
||||||
|
}
|
||||||
|
|
||||||
|
//测试按钮
|
||||||
|
void MyUnitUI::s_ButtonClick()
|
||||||
|
{
|
||||||
|
QVector<QString> vecSlfList;
|
||||||
|
QVector<QString> vecWellList;
|
||||||
|
// 根据当前项目名称获取当前项目的slf文件,获取当前项目井文件
|
||||||
|
bool bret = CMemRdWt::getPrjAllSlf(m_strPrjName, vecSlfList, vecWellList);
|
||||||
|
|
||||||
|
if(vecSlfList.size() > 0)
|
||||||
|
{
|
||||||
|
CMemRdWt *pMemRdWt=new CMemRdWt();
|
||||||
|
//(1)初始化参数、输入
|
||||||
|
pMemRdWt->Const();
|
||||||
|
pMemRdWt->In();
|
||||||
|
|
||||||
|
if(!pMemRdWt->Open(vecSlfList.at(6).toStdString().c_str(),CMemRdWt::modeReadWrite)) {
|
||||||
|
delete pMemRdWt;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//(2)波形类型的输出数据初始化检查
|
||||||
|
char outname[2][16];
|
||||||
|
int OUTindex = 0, WaveIndex = 0;
|
||||||
|
pMemRdWt->GetOutCurveName(OUTindex, outname[OUTindex]);//获取输出数据名称,参数1是序列值(从0开始)(注:波形/曲线均使用GetOutCurveName函数)
|
||||||
|
|
||||||
|
float fSdep = 2900; //设置起始深度
|
||||||
|
float fEdep = 3000; //设置结束深度
|
||||||
|
float fRlev = 0.0; //设置采样间隔
|
||||||
|
|
||||||
|
int index1 = pMemRdWt->OpenWave(outname[OUTindex]);//检查是否存在outname[OUTindex]波形
|
||||||
|
if(index1 < 0) //返回索引小于0说明没有该波形,需要创建
|
||||||
|
{
|
||||||
|
//创建方式:
|
||||||
|
Slf_WAVE myWave;
|
||||||
|
strcpy(myWave.Name, outname[OUTindex]);
|
||||||
|
strcpy(myWave.AliasName, outname[OUTindex]);
|
||||||
|
strcpy(myWave.DepthUnit, "m");
|
||||||
|
myWave.CodeLen = 4;
|
||||||
|
myWave.RepCode = 4;
|
||||||
|
myWave.DefVal = 0;
|
||||||
|
myWave.StartDepth = fSdep;
|
||||||
|
myWave.EndDepth = fEdep;
|
||||||
|
myWave.DepLevel = fRlev;
|
||||||
|
strcpy(myWave.DepthUnit, "m");
|
||||||
|
myWave.StartTime = 0; //起始记录时间
|
||||||
|
myWave.TimeLevel = 5; //时间采样间隔
|
||||||
|
myWave.ArrayNum = 1; //阵列数
|
||||||
|
myWave.TimeSamples = 36; //时间采样总数
|
||||||
|
strcpy(myWave.TimeUnit, "ns"); //时间单位
|
||||||
|
|
||||||
|
index1 = pMemRdWt->OpenWave((Slf_WAVE *)&myWave); //创建波形(注:此时返回索引应>1,代表创建成功)
|
||||||
|
}
|
||||||
|
if(index1 < 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
WaveIndex = index1;
|
||||||
|
}
|
||||||
|
|
||||||
|
//(3)曲线类型的输出数据初始化检查
|
||||||
|
OUTindex = 1;//按extern "C"中定义的输出数据顺序设置
|
||||||
|
pMemRdWt->GetOutCurveName(OUTindex, outname[OUTindex]);//获取输出数据名称,参数1是序列值(从0开始)
|
||||||
|
index1 = pMemRdWt->OpenCurve(outname[1]);//index1 = MemRdWt.OpenCurve("EEE");//检查数据是否存在//outname[OUTindex]
|
||||||
|
if(index1 < 0) //返回索引小于0说明没有这条曲线,需要创建
|
||||||
|
{
|
||||||
|
//创建方式:
|
||||||
|
Slf_CURVE myCurve; //定义曲线对象
|
||||||
|
strcpy(myCurve.Name, outname[1]); //设置名称
|
||||||
|
strcpy(myCurve.AliasName, outname[1]); //设置别名
|
||||||
|
strcpy(myCurve.Unit, "m"); //设置数据单位
|
||||||
|
myCurve.CodeLen = 4; //设置字节长度(注:4float)
|
||||||
|
myCurve.RepCode = 4; //设置数据类型(注:4float)
|
||||||
|
myCurve.DefVal = 0; //设置默认值
|
||||||
|
myCurve.StartDepth = fSdep; //设置起始深度
|
||||||
|
myCurve.EndDepth = fEdep; //设置结束深度
|
||||||
|
myCurve.DepLevel = fRlev; //设置采样间隔
|
||||||
|
strcpy(myCurve.DepthUnit, "m"); //设置深度单位
|
||||||
|
|
||||||
|
index1 = pMemRdWt->OpenCurve((Slf_CURVE *)&myCurve); //创建曲线(注:此时返回索引应>1,代表创建成功)
|
||||||
|
|
||||||
|
}
|
||||||
|
if(index1 < 0)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*************************************************向平台写表格示例*************************************************************
|
||||||
|
*****************************begin****************************/
|
||||||
|
|
||||||
|
//(1)固井结论表格
|
||||||
|
int itable1 = pMemRdWt->OpenOG_RESULT("固井质量");//例如表格取名为“固井质量”
|
||||||
|
pMemRdWt->SetTableRecordCount(itable1, 0); //清空原有表格数据
|
||||||
|
|
||||||
|
GUJING *CCNN2 = new GUJING[5];
|
||||||
|
for(int i = 0; i < 5; i++)
|
||||||
|
{
|
||||||
|
CCNN2[i].GNO = i + 1;
|
||||||
|
CCNN2[i].GSDEP = 2000 + i * 10;
|
||||||
|
CCNN2[i].GEDEP = 2000 + (i + 1) * 10;
|
||||||
|
CCNN2[i].GRESULT = 1;
|
||||||
|
|
||||||
|
int temp = pMemRdWt->WriteTable(itable1, i + 1, &CCNN2[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//(2)其他表格
|
||||||
|
struct Slf_RST{
|
||||||
|
int Order;
|
||||||
|
float Depth;
|
||||||
|
float CorrDepth;
|
||||||
|
};
|
||||||
|
struct Slf_RST m_Result;
|
||||||
|
itable1 = pMemRdWt->OpenTable("ABCD");
|
||||||
|
if (itable1 < 0)
|
||||||
|
{
|
||||||
|
itable1 = pMemRdWt->Open_Set_Table("ABCD",0,3,
|
||||||
|
"NO,DEPTH,DDEP",
|
||||||
|
"4,4,4",//字段长度
|
||||||
|
"1,4,4",//字段类型
|
||||||
|
"0,0,0");//字段备注,1-枚举
|
||||||
|
}
|
||||||
|
pMemRdWt->SetTableRecordCount(itable1,3); //设置表格有3行数据
|
||||||
|
for(int j = 0; j < 3; j++)
|
||||||
|
{
|
||||||
|
memset(&m_Result, 0, sizeof(Slf_RST));
|
||||||
|
m_Result.Order = j + 1;
|
||||||
|
m_Result.Depth = 10;
|
||||||
|
m_Result.CorrDepth = 20 + j;
|
||||||
|
pMemRdWt->WriteTable(itable1, j + 1, &m_Result);
|
||||||
|
|
||||||
|
}
|
||||||
|
pMemRdWt->CloseTable(itable1);
|
||||||
|
|
||||||
|
delete pMemRdWt;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
QString strMsg = ui->lineEdit->text();
|
||||||
|
|
||||||
|
//插件给平台发消息
|
||||||
|
emit sig_PluginMsg("插件给平台发了消息:" + strMsg);
|
||||||
|
}
|
||||||
44
Plugin/PluginUnit/myunitui.h
Normal file
44
Plugin/PluginUnit/myunitui.h
Normal file
|
|
@ -0,0 +1,44 @@
|
||||||
|
#ifndef MYUNITUI_H
|
||||||
|
#define MYUNITUI_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QMainWindow>
|
||||||
|
#include <QAction>
|
||||||
|
|
||||||
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class MyUnitUI;
|
||||||
|
}
|
||||||
|
|
||||||
|
class MyUnitUI : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit MyUnitUI(QWidget *parent = nullptr);
|
||||||
|
~MyUnitUI();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::MyUnitUI *ui;
|
||||||
|
QAction* m_pAction = nullptr;
|
||||||
|
QString m_strPrjName = "";
|
||||||
|
|
||||||
|
public:
|
||||||
|
QString getParams();
|
||||||
|
void setParams(QString &strParams);
|
||||||
|
|
||||||
|
// 创建在平台显示的QAction按钮
|
||||||
|
QAction *createAction();
|
||||||
|
|
||||||
|
public:
|
||||||
|
QMainWindow *m_mainParentWindow;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void sig_PluginMsg(QString msg);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void s_ButtonClick();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // MYUNITUI_H
|
||||||
65
Plugin/PluginUnit/myunitui.ui
Normal file
65
Plugin/PluginUnit/myunitui.ui
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>MyUnitUI</class>
|
||||||
|
<widget class="QWidget" name="MyUnitUI">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>367</width>
|
||||||
|
<height>331</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">QWidget#widget{
|
||||||
|
background-color: rgb(225, 170, 255);
|
||||||
|
}</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget" native="true">
|
||||||
|
<widget class="QWidget" name="verticalLayoutWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>60</x>
|
||||||
|
<y>80</y>
|
||||||
|
<width>211</width>
|
||||||
|
<height>111</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>我是插件-直方图</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLineEdit" name="lineEdit"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="pushButton">
|
||||||
|
<property name="text">
|
||||||
|
<string>发送消息</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
5
Plugin/PluginUnit/res.qrc
Normal file
5
Plugin/PluginUnit/res.qrc
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<RCC>
|
||||||
|
<qresource prefix="/">
|
||||||
|
<file>image/zfu.png</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
||||||
|
|
@ -124,6 +124,9 @@ public:
|
||||||
CMemRdWt();
|
CMemRdWt();
|
||||||
CMemRdWt(const char *wellname,bool mconst=FALSE,int FileType=0);
|
CMemRdWt(const char *wellname,bool mconst=FALSE,int FileType=0);
|
||||||
~CMemRdWt();
|
~CMemRdWt();
|
||||||
|
|
||||||
|
static bool getPrjAllSlf(QString prjname, QVector<QString> &vecSlfList, QVector<QString> &vecWellList);//直方图,获取当前工程下的slf
|
||||||
|
|
||||||
void Initialize(bool mconst=FALSE);
|
void Initialize(bool mconst=FALSE);
|
||||||
void BackData();
|
void BackData();
|
||||||
void RestoreData();
|
void RestoreData();
|
||||||
|
|
|
||||||
30
Slfio/include/commonutils.h
Normal file
30
Slfio/include/commonutils.h
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
#ifndef COMMONUTILS_H
|
||||||
|
#define COMMONUTILS_H
|
||||||
|
|
||||||
|
#include <QString>
|
||||||
|
#include <QStatusBar>
|
||||||
|
#include <QComboBox>
|
||||||
|
#include <QUuid>
|
||||||
|
#include <QDir>
|
||||||
|
#include<cmath>
|
||||||
|
|
||||||
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
|
class CCommonUtils
|
||||||
|
{
|
||||||
|
//函数定义
|
||||||
|
public:
|
||||||
|
//构造函数
|
||||||
|
CCommonUtils();
|
||||||
|
//析构函数
|
||||||
|
virtual ~CCommonUtils();
|
||||||
|
|
||||||
|
static bool getAllSlf(QString prjname, QVector<QString> &vecSlfList, QVector<QString> &vecWellList);//直方图,获取当前工程下的slf
|
||||||
|
static QString GetLogdataPath();
|
||||||
|
static int chakan(QString path, QStringList &wellfs, QString strSuffix);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // COMMONUTILS_H
|
||||||
|
|
@ -52,11 +52,13 @@ HEADERS += \
|
||||||
../include/LogIO.h \
|
../include/LogIO.h \
|
||||||
../include/MemRdWt.h \
|
../include/MemRdWt.h \
|
||||||
../include/SlfioExport.h \
|
../include/SlfioExport.h \
|
||||||
|
../include/commonutils.h \
|
||||||
../include/slf.h
|
../include/slf.h
|
||||||
|
|
||||||
SOURCES += \
|
SOURCES += \
|
||||||
CStringType.cpp \
|
CStringType.cpp \
|
||||||
LogIO.cpp \
|
LogIO.cpp \
|
||||||
|
commonutils.cpp \
|
||||||
memrdwt.cpp \
|
memrdwt.cpp \
|
||||||
slf.cpp
|
slf.cpp
|
||||||
|
|
||||||
|
|
|
||||||
204
Slfio/src/commonutils.cpp
Normal file
204
Slfio/src/commonutils.cpp
Normal file
|
|
@ -0,0 +1,204 @@
|
||||||
|
#include "commonutils.h"
|
||||||
|
#include "LogIO.h"
|
||||||
|
#include <QCoreApplication>
|
||||||
|
|
||||||
|
CCommonUtils::CCommonUtils()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
CCommonUtils::~CCommonUtils()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CCommonUtils::getAllSlf(QString prjname, QVector<QString> &vecSlfList, QVector<QString> &vecWellList)
|
||||||
|
{
|
||||||
|
//Logdata
|
||||||
|
QString folderPath;
|
||||||
|
folderPath = GetLogdataPath();
|
||||||
|
folderPath = folderPath + prjname;
|
||||||
|
folderPath = folderPath + "/";
|
||||||
|
|
||||||
|
//-------------------
|
||||||
|
QStringList listFolders;
|
||||||
|
QFileInfo mfi(folderPath);
|
||||||
|
if(!mfi.isDir())
|
||||||
|
{
|
||||||
|
//井文件 *.wwl
|
||||||
|
if(!mfi.isFile())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//listFiles.append(folderPath);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//井目录
|
||||||
|
//取当前当前目录内容
|
||||||
|
QDir dir(folderPath);
|
||||||
|
dir.setFilter(QDir::Dirs |QDir::NoDotAndDotDot |QDir::Files | QDir::NoSymLinks);
|
||||||
|
QFileInfoList list = dir.entryInfoList();
|
||||||
|
int file_count = list.count();
|
||||||
|
if(file_count <= 0)//判断目录是否为空,空目录返回
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//取当前目录内容,符合后缀文件
|
||||||
|
QStringList string_list;
|
||||||
|
for(int i=0; i<list.size();i++)
|
||||||
|
{
|
||||||
|
QFileInfo file_info = list.at(i);
|
||||||
|
if(file_info.isDir())
|
||||||
|
{
|
||||||
|
//#JPH-307
|
||||||
|
QString absolute_file_path = file_info.absoluteFilePath();
|
||||||
|
if(absolute_file_path.at(absolute_file_path.length()-1)==' ') {
|
||||||
|
dir.rmdir(absolute_file_path);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
listFolders.append(absolute_file_path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
QStringList wellfiles;
|
||||||
|
foreach(QString wellFolder, listFolders )
|
||||||
|
{
|
||||||
|
QFileInfo w(wellFolder);//#JPH-307
|
||||||
|
if(w.isDir())
|
||||||
|
{
|
||||||
|
chakan(wellFolder, wellfiles, "*.well");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QStringList wellNames;
|
||||||
|
foreach(QString wellFile1, wellfiles )
|
||||||
|
{
|
||||||
|
QString filename=wellFile1;
|
||||||
|
//----------------
|
||||||
|
CLogIO * logio=new CLogIO();
|
||||||
|
if(!logio->Open(filename.toStdString().c_str(),CSlfIO::modeRead))
|
||||||
|
{
|
||||||
|
delete logio;
|
||||||
|
QString aa=filename+"文件打开失败,请检查!";
|
||||||
|
//qDebug() << aa;
|
||||||
|
//AppendConsole(pai::log::PAI_ERROR,aa);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
QString wellname="";
|
||||||
|
Slf_FILE_MESSAGE mssage;
|
||||||
|
logio->GetFileMessage(mssage);
|
||||||
|
wellname=mssage.WellName;
|
||||||
|
wellname=wellname.toUpper();
|
||||||
|
if (wellname.isEmpty()||wellname.length()>64||wellname.indexOf('&')>-1)
|
||||||
|
{
|
||||||
|
//辨别井名是否有效,无效则采用文件名
|
||||||
|
QFileInfo fileInfo(filename);
|
||||||
|
QString strWellName = fileInfo.completeBaseName();
|
||||||
|
strWellName=strWellName.toUpper();
|
||||||
|
//
|
||||||
|
wellname=strWellName.toStdString().c_str();
|
||||||
|
int len=strlen(strWellName.toStdString().c_str());
|
||||||
|
if(len>sizeof(mssage.WellName)) len=sizeof(mssage.WellName);
|
||||||
|
strncpy(mssage.WellName,strWellName.toStdString().c_str(),len);
|
||||||
|
mssage.WellName[len]=0;
|
||||||
|
logio->SetFileMessage(mssage);
|
||||||
|
}
|
||||||
|
wellname=wellname.toUpper();
|
||||||
|
|
||||||
|
//查找是否已经存在该井和井次
|
||||||
|
if(wellNames.contains(wellname))
|
||||||
|
{
|
||||||
|
delete logio;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
wellNames.append(wellname);
|
||||||
|
//
|
||||||
|
vecWellList.append(wellname);
|
||||||
|
|
||||||
|
//加载*.slf
|
||||||
|
QStringList slffiles;
|
||||||
|
QString pathTmp=GetLogdataPath();
|
||||||
|
pathTmp+=prjname+"/#"+wellname;
|
||||||
|
chakan(pathTmp, slffiles, "*.slf");
|
||||||
|
foreach(QString slfFile1, slffiles )
|
||||||
|
{
|
||||||
|
CLogIO * logioSLf=new CLogIO();
|
||||||
|
if(!logioSLf->Open(slfFile1.toStdString().c_str(),CSlfIO::modeRead))
|
||||||
|
{
|
||||||
|
delete logioSLf;
|
||||||
|
//QString aa=fileFull+"文件打开失败,请检查!";
|
||||||
|
//qDebug() << aa;
|
||||||
|
//AppendConsole(pai::log::PAI_ERROR,aa);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Slf_FILE_MESSAGE mssageSlf;
|
||||||
|
logioSLf->GetFileMessage(mssageSlf);
|
||||||
|
|
||||||
|
if(wellname != QString(mssageSlf.WellName))
|
||||||
|
{
|
||||||
|
delete logioSLf;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
QString wellnameSLf=mssageSlf.Item;
|
||||||
|
//if (wellnameSLf.isEmpty()||wellnameSLf.length()>64||wellnameSLf.indexOf('&')>-1)
|
||||||
|
{
|
||||||
|
QFileInfo fileinfo;
|
||||||
|
fileinfo = QFileInfo(slfFile1);
|
||||||
|
wellnameSLf = fileinfo.completeBaseName();
|
||||||
|
}
|
||||||
|
// if(wellnameSLf != wellname)
|
||||||
|
// {
|
||||||
|
// //井次名称不一致
|
||||||
|
// //qDebug() << "井次名称不一致";
|
||||||
|
// delete logioSLf;
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
|
||||||
|
vecSlfList.append(slfFile1);
|
||||||
|
delete logioSLf;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString CCommonUtils::GetLogdataPath()
|
||||||
|
{
|
||||||
|
// 1.获取当前运行程序的目录路径
|
||||||
|
QString applicationDirPath = QCoreApplication::applicationDirPath();
|
||||||
|
//获取上级目录
|
||||||
|
int index = applicationDirPath.lastIndexOf("/");
|
||||||
|
int index1 = applicationDirPath.lastIndexOf("\\");
|
||||||
|
if(index1 > index)
|
||||||
|
{
|
||||||
|
index = index1;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
QString strImagePath;
|
||||||
|
strImagePath = applicationDirPath.mid(0,index+1) + "Logdata/";
|
||||||
|
//
|
||||||
|
QDir dir(strImagePath);
|
||||||
|
if( !dir.exists( strImagePath ) )
|
||||||
|
{
|
||||||
|
dir.mkdir(strImagePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
return strImagePath;
|
||||||
|
}
|
||||||
|
|
||||||
|
int CCommonUtils::chakan(QString path, QStringList &wellfs, QString strSuffix)
|
||||||
|
{
|
||||||
|
QDir dir(path);
|
||||||
|
QFileInfoList fileInfos = dir.entryInfoList(QStringList() << strSuffix, QDir::Files);
|
||||||
|
foreach(QFileInfo fileInfo, fileInfos)
|
||||||
|
{
|
||||||
|
wellfs.append(fileInfo.absoluteFilePath());
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
#include "MemRdWt.h"
|
#include "MemRdWt.h"
|
||||||
#include "math.h"
|
#include "math.h"
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include "commonutils.h"
|
||||||
|
|
||||||
CMemRdWt ::CMemRdWt(const char *wellname,bool bconst,int FileType):CLogIO(wellname,FileType)
|
CMemRdWt ::CMemRdWt(const char *wellname,bool bconst,int FileType):CLogIO(wellname,FileType)
|
||||||
{
|
{
|
||||||
Initialize(bconst);
|
Initialize(bconst);
|
||||||
|
|
@ -411,6 +413,12 @@ CMemRdWt ::~CMemRdWt()
|
||||||
{
|
{
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CMemRdWt::getPrjAllSlf(QString prjname, QVector<QString> &vecSlfList, QVector<QString> &vecWellList)
|
||||||
|
{
|
||||||
|
return CCommonUtils::getAllSlf(prjname, vecSlfList, vecWellList);
|
||||||
|
}
|
||||||
|
|
||||||
int CMemRdWt::GetInCurveName(int CurveNo,char *InName)
|
int CMemRdWt::GetInCurveName(int CurveNo,char *InName)
|
||||||
{
|
{
|
||||||
if(!INC) return 0;
|
if(!INC) return 0;
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include "LogIO.h"
|
#include "LogIO.h"
|
||||||
|
#include "MemRdWt.h"
|
||||||
|
|
||||||
float mLineWidth=0.75;
|
float mLineWidth=0.75;
|
||||||
QString OilField;
|
QString OilField;
|
||||||
|
|
@ -700,157 +701,7 @@ bool SystemExiting(){return SystemIsExiting;}
|
||||||
//直方图,获取当前工程下的slf
|
//直方图,获取当前工程下的slf
|
||||||
bool getAllSlf(QString prjname, QVector<QString> &vecSlfList, QVector<QString> &vecWellList)
|
bool getAllSlf(QString prjname, QVector<QString> &vecSlfList, QVector<QString> &vecWellList)
|
||||||
{
|
{
|
||||||
//Logdata
|
return CMemRdWt::getPrjAllSlf(prjname, vecSlfList, vecWellList);
|
||||||
QString folderPath;
|
|
||||||
folderPath = GetLogdataPath();
|
|
||||||
folderPath = folderPath + prjname;
|
|
||||||
folderPath = folderPath + "/";
|
|
||||||
|
|
||||||
//-------------------
|
|
||||||
QStringList listFolders;
|
|
||||||
QFileInfo mfi(folderPath);
|
|
||||||
if(!mfi.isDir())
|
|
||||||
{
|
|
||||||
//井文件 *.wwl
|
|
||||||
if(!mfi.isFile())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
//listFiles.append(folderPath);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//井目录
|
|
||||||
//取当前当前目录内容
|
|
||||||
QDir dir(folderPath);
|
|
||||||
dir.setFilter(QDir::Dirs |QDir::NoDotAndDotDot |QDir::Files | QDir::NoSymLinks);
|
|
||||||
QFileInfoList list = dir.entryInfoList();
|
|
||||||
int file_count = list.count();
|
|
||||||
if(file_count <= 0)//判断目录是否为空,空目录返回
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
//取当前目录内容,符合后缀文件
|
|
||||||
QStringList string_list;
|
|
||||||
for(int i=0; i<list.size();i++)
|
|
||||||
{
|
|
||||||
QFileInfo file_info = list.at(i);
|
|
||||||
if(file_info.isDir())
|
|
||||||
{
|
|
||||||
//#JPH-307
|
|
||||||
QString absolute_file_path = file_info.absoluteFilePath();
|
|
||||||
if(absolute_file_path.at(absolute_file_path.length()-1)==' ') {
|
|
||||||
dir.rmdir(absolute_file_path);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
listFolders.append(absolute_file_path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
QStringList wellfiles;
|
|
||||||
foreach(QString wellFolder, listFolders )
|
|
||||||
{
|
|
||||||
QFileInfo w(wellFolder);//#JPH-307
|
|
||||||
if(w.isDir())
|
|
||||||
{
|
|
||||||
chakan(wellFolder, wellfiles, "*.well");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList wellNames;
|
|
||||||
foreach(QString wellFile1, wellfiles )
|
|
||||||
{
|
|
||||||
QString filename=wellFile1;
|
|
||||||
//----------------
|
|
||||||
CLogIO * logio=new CLogIO();
|
|
||||||
if(!logio->Open(filename.toStdString().c_str(),CSlfIO::modeRead))
|
|
||||||
{
|
|
||||||
delete logio;
|
|
||||||
QString aa=filename+"文件打开失败,请检查!";
|
|
||||||
//qDebug() << aa;
|
|
||||||
//AppendConsole(pai::log::PAI_ERROR,aa);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
//
|
|
||||||
QString wellname="";
|
|
||||||
Slf_FILE_MESSAGE mssage;
|
|
||||||
logio->GetFileMessage(mssage);
|
|
||||||
wellname=mssage.WellName;
|
|
||||||
wellname=wellname.toUpper();
|
|
||||||
if (wellname.isEmpty()||wellname.length()>64||wellname.indexOf('&')>-1)
|
|
||||||
{
|
|
||||||
//辨别井名是否有效,无效则采用文件名
|
|
||||||
QFileInfo fileInfo(filename);
|
|
||||||
QString strWellName = fileInfo.completeBaseName();
|
|
||||||
strWellName=strWellName.toUpper();
|
|
||||||
//
|
|
||||||
wellname=strWellName.toStdString().c_str();
|
|
||||||
int len=strlen(strWellName.toStdString().c_str());
|
|
||||||
if(len>sizeof(mssage.WellName)) len=sizeof(mssage.WellName);
|
|
||||||
strncpy(mssage.WellName,strWellName.toStdString().c_str(),len);
|
|
||||||
mssage.WellName[len]=0;
|
|
||||||
logio->SetFileMessage(mssage);
|
|
||||||
}
|
|
||||||
wellname=wellname.toUpper();
|
|
||||||
|
|
||||||
//查找是否已经存在该井和井次
|
|
||||||
if(wellNames.contains(wellname))
|
|
||||||
{
|
|
||||||
delete logio;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
wellNames.append(wellname);
|
|
||||||
//
|
|
||||||
vecWellList.append(wellname);
|
|
||||||
|
|
||||||
//加载*.slf
|
|
||||||
QStringList slffiles;
|
|
||||||
QString pathTmp=GetLogdataPath();
|
|
||||||
pathTmp+=prjname+"/#"+wellname;
|
|
||||||
chakan(pathTmp, slffiles, "*.slf");
|
|
||||||
foreach(QString slfFile1, slffiles )
|
|
||||||
{
|
|
||||||
CLogIO * logioSLf=new CLogIO();
|
|
||||||
if(!logioSLf->Open(slfFile1.toStdString().c_str(),CSlfIO::modeRead))
|
|
||||||
{
|
|
||||||
delete logioSLf;
|
|
||||||
//QString aa=fileFull+"文件打开失败,请检查!";
|
|
||||||
//qDebug() << aa;
|
|
||||||
//AppendConsole(pai::log::PAI_ERROR,aa);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Slf_FILE_MESSAGE mssageSlf;
|
|
||||||
logioSLf->GetFileMessage(mssageSlf);
|
|
||||||
|
|
||||||
if(wellname != QString(mssageSlf.WellName))
|
|
||||||
{
|
|
||||||
delete logioSLf;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
QString wellnameSLf=mssageSlf.Item;
|
|
||||||
if (wellnameSLf.isEmpty()||wellnameSLf.length()>64||wellnameSLf.indexOf('&')>-1)
|
|
||||||
{
|
|
||||||
QFileInfo fileinfo;
|
|
||||||
fileinfo = QFileInfo(slfFile1);
|
|
||||||
wellnameSLf = fileinfo.completeBaseName();
|
|
||||||
}
|
|
||||||
if(wellnameSLf != wellname)
|
|
||||||
{
|
|
||||||
//井次名称不一致
|
|
||||||
//qDebug() << "井次名称不一致";
|
|
||||||
delete logioSLf;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
vecSlfList.append(slfFile1);
|
|
||||||
delete logioSLf;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int GetCurvInfo(QString strSlfName, QString strLineName, double &sdep, double &edep, double &rlev)
|
int GetCurvInfo(QString strSlfName, QString strLineName, double &sdep, double &edep, double &rlev)
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
#include <QtCore/QString>
|
#include <QtCore/QString>
|
||||||
#include <QtGui/QIcon>
|
#include <QtGui/QIcon>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
#include <QAction>
|
||||||
|
|
||||||
#include "HPluginDefine.h"
|
#include "HPluginDefine.h"
|
||||||
|
|
||||||
|
|
@ -20,6 +21,8 @@ public:
|
||||||
virtual QWidget *createWindow(QWidget *parent) const = 0;
|
virtual QWidget *createWindow(QWidget *parent) const = 0;
|
||||||
virtual QString getParams() const = 0;
|
virtual QString getParams() const = 0;
|
||||||
virtual void setParams(QString &strParams) = 0;
|
virtual void setParams(QString &strParams) = 0;
|
||||||
|
|
||||||
|
virtual QAction *createAction(QWidget *parent) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define HPluginInterface_iid "org.qt-project.HPluginInterface"
|
#define HPluginInterface_iid "org.qt-project.HPluginInterface"
|
||||||
|
|
|
||||||
|
|
@ -694,8 +694,6 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1356,6 +1354,13 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
m_tdGuan->setRange(-depth-m_tdGuan->mH/2.0, -depth+m_tdGuan->mH/2.0);
|
m_tdGuan->setRange(-depth-m_tdGuan->mH/2.0, -depth+m_tdGuan->mH/2.0);
|
||||||
//保存
|
//保存
|
||||||
m_tdGuan->mPlot->SaveToSLF_Tubing();
|
m_tdGuan->mPlot->SaveToSLF_Tubing();
|
||||||
|
//检查套管组件名称,是否需要更新套管图形
|
||||||
|
bool bReDraw = m_tdGuan->mPlot->checkTubingName(m_tdGuan->m_Result);
|
||||||
|
if(bReDraw)
|
||||||
|
{
|
||||||
|
//组件改变后,重绘管柱
|
||||||
|
m_tdGuan->mPlot->LoadFromSLF_ReDrawTubing(m_tdGuan->mPlot->m_strSlfName, m_tdGuan->mPlot->m_strLineName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if("组件类型" == m_propertyData[pProperty])
|
else if("组件类型" == m_propertyData[pProperty])
|
||||||
|
|
@ -1363,6 +1368,10 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
//qDebug() << "组件类型->改变";
|
//qDebug() << "组件类型->改变";
|
||||||
if(m_tdGuan)
|
if(m_tdGuan)
|
||||||
{
|
{
|
||||||
|
//检查套管组件名称,是否需要更新套管图形
|
||||||
|
bool bReDrawOld = m_tdGuan->mPlot->checkTubingName(m_tdGuan->m_Result);
|
||||||
|
|
||||||
|
//--------------------------
|
||||||
QString newResult = variant.value<QString>();
|
QString newResult = variant.value<QString>();
|
||||||
m_tdGuan->setResult(newResult);
|
m_tdGuan->setResult(newResult);
|
||||||
//
|
//
|
||||||
|
|
@ -1370,6 +1379,14 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
|
||||||
m_tdGuan->setRange(currentRange.lower, currentRange.upper);
|
m_tdGuan->setRange(currentRange.lower, currentRange.upper);
|
||||||
//保存
|
//保存
|
||||||
m_tdGuan->mPlot->SaveToSLF_Tubing();
|
m_tdGuan->mPlot->SaveToSLF_Tubing();
|
||||||
|
|
||||||
|
//---------
|
||||||
|
bool bReDrawNew = m_tdGuan->mPlot->checkTubingName(m_tdGuan->m_Result);
|
||||||
|
if(bReDrawOld || bReDrawNew)
|
||||||
|
{
|
||||||
|
//组件改变后,重绘管柱
|
||||||
|
m_tdGuan->mPlot->LoadFromSLF_ReDrawTubing(m_tdGuan->mPlot->m_strSlfName, m_tdGuan->mPlot->m_strLineName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3098,117 +3115,121 @@ void PropertyWidget::initGeoLithProperty(FormInfo *formInfo)
|
||||||
// 斜井三图一表属性
|
// 斜井三图一表属性
|
||||||
void PropertyWidget::initTvdProperty(FormInfo *formInfo)
|
void PropertyWidget::initTvdProperty(FormInfo *formInfo)
|
||||||
{
|
{
|
||||||
|
if (!formInfo->m_pTvd)
|
||||||
|
return;
|
||||||
_CreateVariantPropertyItem("通常", "选择井斜数据", m_strSlfName, QVariant::String);
|
_CreateVariantPropertyItem("通常", "选择井斜数据", m_strSlfName, QVariant::String);
|
||||||
|
|
||||||
_CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String);
|
_CreateVariantPropertyItem("通常", "显示名称", formInfo->m_strAliasName, QVariant::String);
|
||||||
_CreateVariantPropertyItem("通常", "显示井名", formInfo->m_strWellName, QVariant::String);
|
_CreateVariantPropertyItem("通常", "显示井名", formInfo->m_strWellName, QVariant::String);
|
||||||
|
|
||||||
_CreateVariantPropertyItem("绘制图形对象", "靶心", true, QVariant::Bool);
|
_CreateVariantPropertyItem("绘制图形对象", "靶心", formInfo->m_pTvd->objViewInfo->m_IsDrawBX, QVariant::Bool);
|
||||||
_CreateVariantPropertyItem("绘制图形对象", "靶心参数表", true, QVariant::Bool);
|
_CreateVariantPropertyItem("绘制图形对象", "靶心参数表", formInfo->m_pTvd->objViewInfo->m_IsDrawBxcs, QVariant::Bool);
|
||||||
_CreateVariantPropertyItem("绘制图形对象", "井斜数据表", true, QVariant::Bool);
|
_CreateVariantPropertyItem("绘制图形对象", "井斜数据表", formInfo->m_pTvd->objViewInfo->m_IsDrawTable, QVariant::Bool);
|
||||||
_CreateVariantPropertyItem("绘制图形对象", "俯视图", true, QVariant::Bool);
|
_CreateVariantPropertyItem("绘制图形对象", "俯视图", formInfo->m_pTvd->objViewInfo->m_IsDrawFst, QVariant::Bool);
|
||||||
_CreateVariantPropertyItem("绘制图形对象", "侧视图深度在左边", false, QVariant::Bool);
|
_CreateVariantPropertyItem("绘制图形对象", "侧视图深度在左边", formInfo->m_pTvd->objViewInfo->m_DepthLeft, QVariant::Bool);
|
||||||
_CreateVariantPropertyItem("绘制图形对象", "侧视图(水平位移)", true, QVariant::Bool);
|
_CreateVariantPropertyItem("绘制图形对象", "侧视图(水平位移)", formInfo->m_pTvd->objViewInfo->m_IsDrawCst1, QVariant::Bool);
|
||||||
_CreateVariantPropertyItem("绘制图形对象", "侧视图(向东)", true, QVariant::Bool);
|
_CreateVariantPropertyItem("绘制图形对象", "侧视图(向东)", formInfo->m_pTvd->objViewInfo->m_IsDrawCst2, QVariant::Bool);
|
||||||
_CreateVariantPropertyItem("绘制图形对象", "侧视图(向北)", true, QVariant::Bool);
|
_CreateVariantPropertyItem("绘制图形对象", "侧视图(向北)", formInfo->m_pTvd->objViewInfo->m_IsDrawCst3, QVariant::Bool);
|
||||||
_CreateVariantPropertyItem("绘制图形对象", "侧视图(侧视角)", false, QVariant::Bool);
|
_CreateVariantPropertyItem("绘制图形对象", "侧视图(侧视角)", formInfo->m_pTvd->objViewInfo->m_IsDrawCst, QVariant::Bool);
|
||||||
_CreateVariantPropertyItem("绘制图形对象", "立体轨迹图", true, QVariant::Bool);
|
_CreateVariantPropertyItem("绘制图形对象", "立体轨迹图", formInfo->m_pTvd->objViewInfo->m_IsDrawLtgjt, QVariant::Bool);
|
||||||
_CreateVariantPropertyItem("绘制图形对象", "绘制标注信息", true, QVariant::Bool);
|
_CreateVariantPropertyItem("绘制图形对象", "绘制标注信息", formInfo->m_pTvd->objViewInfo->m_isDrawNote, QVariant::Bool);
|
||||||
|
|
||||||
_CreateVariantPropertyItem("边框线型", "线宽", 3, QVariant::Int);
|
_CreateVariantPropertyItem("边框线型", "线宽", formInfo->m_pTvd->m_FrameWidth, QVariant::Int);
|
||||||
_CreateVariantPropertyItem("边框线型", "颜色", QColor(0, 0, 0), QVariant::Color);
|
_CreateVariantPropertyItem("边框线型", "颜色", formInfo->m_pTvd->m_FrameColor, QVariant::Color);
|
||||||
_CreateVariantPropertyItem("格线线型", "线宽", 3, QVariant::Int);
|
_CreateVariantPropertyItem("格线线型", "线宽", formInfo->m_pTvd->m_GridWidth, QVariant::Int);
|
||||||
_CreateVariantPropertyItem("格线线型", "颜色", QColor(127, 127, 127), QVariant::Color);
|
_CreateVariantPropertyItem("格线线型", "颜色", formInfo->m_pTvd->m_GridColor, QVariant::Color);
|
||||||
_CreateVariantPropertyItem("轨迹线型", "线宽", 3, QVariant::Int);
|
_CreateVariantPropertyItem("轨迹线型", "线宽", formInfo->m_pTvd->m_GuijiWidth, QVariant::Int);
|
||||||
_CreateVariantPropertyItem("轨迹线型", "颜色", QColor(0, 0, 0), QVariant::Color);
|
_CreateVariantPropertyItem("轨迹线型", "颜色", formInfo->m_pTvd->m_GuijiColor, QVariant::Color);
|
||||||
_CreateVariantPropertyItem("靶心半径线型", "线宽", 3, QVariant::Int);
|
_CreateVariantPropertyItem("靶心半径线型", "线宽", formInfo->m_pTvd->m_BxbjWidth, QVariant::Int);
|
||||||
_CreateVariantPropertyItem("靶心半径线型", "颜色", QColor(255, 0, 0), QVariant::Color);
|
_CreateVariantPropertyItem("靶心半径线型", "颜色", formInfo->m_pTvd->m_BxbjColor, QVariant::Color);
|
||||||
_CreateVariantPropertyItem("靶心连线线型", "线宽", 3, QVariant::Int);
|
_CreateVariantPropertyItem("靶心连线线型", "线宽", formInfo->m_pTvd->m_BxlxWidth, QVariant::Int);
|
||||||
_CreateVariantPropertyItem("靶心连线线型", "颜色", QColor(255, 0, 0), QVariant::Color);
|
_CreateVariantPropertyItem("靶心连线线型", "颜色", formInfo->m_pTvd->m_BxlxColor, QVariant::Color);
|
||||||
|
|
||||||
_CreateVariantPropertyItem("字体", "道头字体", QFont(), QVariant::Font);
|
_CreateVariantPropertyItem("字体", "道头字体", formInfo->m_pTvd->objViewInfo->m_HeadFont, QVariant::Font);
|
||||||
_CreateVariantPropertyItem("字体", "道头颜色", QColor(0, 0, 0), QVariant::Color);
|
_CreateVariantPropertyItem("字体", "道头颜色", formInfo->m_pTvd->objViewInfo->m_HeadColor, QVariant::Color);
|
||||||
|
|
||||||
_CreateVariantPropertyItem("字体", "标题字体", QFont(), QVariant::Font);
|
_CreateVariantPropertyItem("字体", "标题字体", formInfo->m_pTvd->objViewInfo->m_TitleFont, QVariant::Font);
|
||||||
_CreateVariantPropertyItem("字体", "标题颜色", QColor(0, 0, 0), QVariant::Color);
|
_CreateVariantPropertyItem("字体", "标题颜色", formInfo->m_pTvd->objViewInfo->m_TitleColor, QVariant::Color);
|
||||||
|
|
||||||
_CreateVariantPropertyItem("字体", "数据表字体", QFont(), QVariant::Font);
|
_CreateVariantPropertyItem("字体", "数据表字体", formInfo->m_pTvd->objViewInfo->m_TableFont, QVariant::Font);
|
||||||
_CreateVariantPropertyItem("字体", "数据表颜色", QColor(0, 0, 0), QVariant::Color);
|
_CreateVariantPropertyItem("字体", "数据表颜色", formInfo->m_pTvd->objViewInfo->m_TableColor, QVariant::Color);
|
||||||
|
|
||||||
_CreateVariantPropertyItem("字体", "刻度字体", QFont(), QVariant::Font);
|
_CreateVariantPropertyItem("字体", "刻度字体", formInfo->m_pTvd->objViewInfo->m_ScaleFont, QVariant::Font);
|
||||||
_CreateVariantPropertyItem("字体", "刻度颜色", QColor(0, 0, 0), QVariant::Color);
|
_CreateVariantPropertyItem("字体", "刻度颜色", formInfo->m_pTvd->objViewInfo->m_ScaleColor, QVariant::Color);
|
||||||
|
|
||||||
_CreateVariantPropertyItem("字体", "注释字体", QFont(), QVariant::Font);
|
_CreateVariantPropertyItem("字体", "注释字体", formInfo->m_pTvd->objViewInfo->m_NoteFont, QVariant::Font);
|
||||||
_CreateVariantPropertyItem("字体", "注释颜色", QColor(0, 0, 0), QVariant::Color);
|
_CreateVariantPropertyItem("字体", "注释颜色", formInfo->m_pTvd->objViewInfo->m_NoteColor, QVariant::Color);
|
||||||
|
|
||||||
_CreateVariantPropertyItem("井斜数据表参数", "标题名", "井连续井斜仪测量数据表", QVariant::String);
|
_CreateVariantPropertyItem("井斜数据表参数", "标题名", formInfo->m_pTvd->m_Title_table, QVariant::String);
|
||||||
_CreateVariantPropertyItem("井斜数据表参数", "头记录高度(cm)", 1.6, QVariant::Double);
|
_CreateVariantPropertyItem("井斜数据表参数", "头记录高度(cm)", formInfo->m_pTvd->objViewInfo->m_Head_Height, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("井斜数据表参数", "数据记录高度(cm)", 0.8, QVariant::Double);
|
_CreateVariantPropertyItem("井斜数据表参数", "数据记录高度(cm)", formInfo->m_pTvd->objViewInfo->m_Rec_Height, QVariant::Double);
|
||||||
|
|
||||||
_CreateVariantPropertyItem("俯视图参数", "标题名", "井井眼俯视图", QVariant::String);
|
_CreateVariantPropertyItem("俯视图参数", "标题名", formInfo->m_pTvd->objViewInfo->m_Title_fst, QVariant::String);
|
||||||
_CreateVariantPropertyItem("俯视图参数", "东西位移最小刻度", -100, QVariant::Double);
|
_CreateVariantPropertyItem("俯视图参数", "东西位移最小刻度", formInfo->m_pTvd->objViewInfo->m_MinXe, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("俯视图参数", "东西位移最大刻度", 100, QVariant::Double);
|
_CreateVariantPropertyItem("俯视图参数", "东西位移最大刻度", formInfo->m_pTvd->objViewInfo->m_MaxXe, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("俯视图参数", "南北位移最小刻度", -100, QVariant::Double);
|
_CreateVariantPropertyItem("俯视图参数", "南北位移最小刻度", formInfo->m_pTvd->objViewInfo->m_MinYn, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("俯视图参数", "南北位移最大刻度", 100, QVariant::Double);
|
_CreateVariantPropertyItem("俯视图参数", "南北位移最大刻度", formInfo->m_pTvd->objViewInfo->m_MaxYn, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("俯视图参数", "是否绘制闭合线", false, QVariant::Bool);
|
_CreateVariantPropertyItem("俯视图参数", "是否绘制闭合线", formInfo->m_pTvd->objViewInfo->m_bPlotBhx, QVariant::Bool);
|
||||||
|
|
||||||
_CreateVariantPropertyItem("侧视图参数", "标题名", "井井眼侧视图", QVariant::String);
|
_CreateVariantPropertyItem("侧视图参数", "标题名", formInfo->m_pTvd->objViewInfo->m_Title_cst, QVariant::String);
|
||||||
_CreateVariantPropertyItem("侧视图参数", "高宽相同", false, QVariant::Bool);
|
_CreateVariantPropertyItem("侧视图参数", "高宽相同", formInfo->m_pTvd->objViewInfo->m_heqw, QVariant::Bool);
|
||||||
|
|
||||||
_CreateVariantPropertyItem("侧视图(水平位移)", "最大侧视位移(m)", 100, QVariant::Double);
|
_CreateVariantPropertyItem("侧视图(水平位移)", "最大侧视位移(m)", formInfo->m_pTvd->objViewInfo->m_MaxWy_HOFF, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("侧视图(水平位移)", "最小侧视位移(m)", -100, QVariant::Double);
|
_CreateVariantPropertyItem("侧视图(水平位移)", "最小侧视位移(m)", formInfo->m_pTvd->objViewInfo->m_MinWy_HOFF, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("侧视图(水平位移)", "最大垂深(m)", 10000, QVariant::Double);
|
_CreateVariantPropertyItem("侧视图(水平位移)", "最大垂深(m)", formInfo->m_pTvd->objViewInfo->m_MaxTVD_HOFF, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("侧视图(水平位移)", "最小垂深(m)", 0, QVariant::Double);
|
_CreateVariantPropertyItem("侧视图(水平位移)", "最小垂深(m)", formInfo->m_pTvd->objViewInfo->m_MinTVD_HOFF, QVariant::Double);
|
||||||
|
|
||||||
_CreateVariantPropertyItem("侧视图(向东)", "最大侧视位移(m)", 100, QVariant::Double);
|
_CreateVariantPropertyItem("侧视图(向东)", "最大侧视位移(m)", formInfo->m_pTvd->objViewInfo->m_MaxWy_XE, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("侧视图(向东)", "最小侧视位移(m)", -100, QVariant::Double);
|
_CreateVariantPropertyItem("侧视图(向东)", "最小侧视位移(m)", formInfo->m_pTvd->objViewInfo->m_MinWy_XE, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("侧视图(向东)", "最大垂深(m)", 10000, QVariant::Double);
|
_CreateVariantPropertyItem("侧视图(向东)", "最大垂深(m)", formInfo->m_pTvd->objViewInfo->m_MaxTVD_XE, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("侧视图(向东)", "最小垂深(m)", 0, QVariant::Double);
|
_CreateVariantPropertyItem("侧视图(向东)", "最小垂深(m)", formInfo->m_pTvd->objViewInfo->m_MinTVD_XE, QVariant::Double);
|
||||||
|
|
||||||
_CreateVariantPropertyItem("侧视图(侧视角)", "最大侧视位移(m)", 100, QVariant::Double);
|
_CreateVariantPropertyItem("侧视图(向北)", "最大侧视位移(m)", formInfo->m_pTvd->objViewInfo->m_MaxWy_YN, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("侧视图(侧视角)", "最小侧视位移(m)", -100, QVariant::Double);
|
_CreateVariantPropertyItem("侧视图(向北)", "最小侧视位移(m)", formInfo->m_pTvd->objViewInfo->m_MinWy_YN, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("侧视图(侧视角)", "最大垂深(m)", 10000, QVariant::Double);
|
_CreateVariantPropertyItem("侧视图(向北)", "最大垂深(m)", formInfo->m_pTvd->objViewInfo->m_MaxTVD_YN, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("侧视图(侧视角)", "最小垂深(m)", 0, QVariant::Double);
|
_CreateVariantPropertyItem("侧视图(向北)", "最小垂深(m)", formInfo->m_pTvd->objViewInfo->m_MinTVD_YN, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("侧视图(侧视角)", "深度间隔(m)", 100, QVariant::Double);
|
|
||||||
_CreateVariantPropertyItem("侧视图(侧视角)", "等分个数(=0按深度间隔)", 0, QVariant::Double);
|
|
||||||
_CreateVariantPropertyItem("侧视图(侧视角)", "侧视角(度)", 90, QVariant::Double);
|
|
||||||
|
|
||||||
//
|
_CreateVariantPropertyItem("侧视图(侧视角)", "最大侧视位移(m)", formInfo->m_pTvd->objViewInfo->m_MaxWy, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "标题名", "", QVariant::String);
|
_CreateVariantPropertyItem("侧视图(侧视角)", "最小侧视位移(m)", formInfo->m_pTvd->objViewInfo->m_MinWy, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "最大位移(m)", 100, QVariant::Double);
|
_CreateVariantPropertyItem("侧视图(侧视角)", "最大垂深(m)", formInfo->m_pTvd->objViewInfo->m_MaxTVD, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "起始垂深(m)", 0, QVariant::Double);
|
_CreateVariantPropertyItem("侧视图(侧视角)", "最小垂深(m)", formInfo->m_pTvd->objViewInfo->m_MinTVD, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "垂深间隔(m)", 100, QVariant::Double);
|
_CreateVariantPropertyItem("侧视图(侧视角)", "深度间隔(m)", formInfo->m_pTvd->objViewInfo->m_DepSpace, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "是否绘制立体框", formInfo->m_is3DFrame, QVariant::Bool);
|
_CreateVariantPropertyItem("侧视图(侧视角)", "等分个数(=0按深度间隔)", formInfo->m_pTvd->objViewInfo->m_DepSpaceN, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "俯视角(度)", 10, QVariant::Double);
|
_CreateVariantPropertyItem("侧视图(侧视角)", "侧视角(度)", formInfo->m_pTvd->objViewInfo->m_CsAngle, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "侧视角(度)", 45, QVariant::Double);
|
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "倾斜角(度)", 0, QVariant::Double);
|
_CreateVariantPropertyItem("立体轨迹图参数", "标题名", formInfo->m_pTvd->m_Title_ltgj, QVariant::String);
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "竖线间隔", 5, QVariant::Double);
|
_CreateVariantPropertyItem("立体轨迹图参数", "最大位移(m)", formInfo->m_pTvd->objViewInfo->m_MaxWy1, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "俯视南北间隔数", 20, QVariant::Double);
|
_CreateVariantPropertyItem("立体轨迹图参数", "起始垂深(m)", formInfo->m_pTvd->objViewInfo->m_LTTTVD, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "俯视东西间隔数", 20, QVariant::Double);
|
_CreateVariantPropertyItem("立体轨迹图参数", "垂深间隔(m)", formInfo->m_pTvd->objViewInfo->m_DepSpace1, QVariant::Double);
|
||||||
|
_CreateVariantPropertyItem("立体轨迹图参数", "是否绘制立体框", formInfo->m_pTvd->objViewInfo->m_is3DFrame, QVariant::Bool);
|
||||||
|
_CreateVariantPropertyItem("立体轨迹图参数", "俯视角(度)", formInfo->m_pTvd->objViewInfo->m_LttAngle_X, QVariant::Double);
|
||||||
|
_CreateVariantPropertyItem("立体轨迹图参数", "侧视角(度)", formInfo->m_pTvd->objViewInfo->m_LttAngle, QVariant::Double);
|
||||||
|
_CreateVariantPropertyItem("立体轨迹图参数", "倾斜角(度)", formInfo->m_pTvd->objViewInfo->m_LttAngle_Z, QVariant::Double);
|
||||||
|
_CreateVariantPropertyItem("立体轨迹图参数", "竖线间隔", formInfo->m_pTvd->objViewInfo->m_LTTTVD, QVariant::Double);
|
||||||
|
_CreateVariantPropertyItem("立体轨迹图参数", "俯视南北间隔数", formInfo->m_pTvd->objViewInfo->m_YD, QVariant::Double);
|
||||||
|
_CreateVariantPropertyItem("立体轨迹图参数", "俯视东西间隔数", formInfo->m_pTvd->objViewInfo->m_XD, QVariant::Double);
|
||||||
QStringList listType;
|
QStringList listType;
|
||||||
listType.append("NONE");
|
listType.append("NONE");
|
||||||
listType.append("狗腿度");
|
listType.append("狗腿度");
|
||||||
listType.append("井经");
|
listType.append("井经");
|
||||||
listType.append("成像");
|
listType.append("成像");
|
||||||
_CreateEnumPropertyItem("立体轨迹图参数", "附加属性类型", listType.indexOf("NONE"), listType);
|
_CreateEnumPropertyItem("立体轨迹图参数", "附加属性类型", formInfo->m_pTvd->objViewInfo->m_IsDrawProperty, listType);
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "选择井曲线1", "", QVariant::String);
|
_CreateVariantPropertyItem("立体轨迹图参数", "选择井曲线1", formInfo->m_pTvd->objViewInfo->m_CurveName1, QVariant::String);
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "选择井曲线2", "", QVariant::String);
|
_CreateVariantPropertyItem("立体轨迹图参数", "选择井曲线2", formInfo->m_pTvd->objViewInfo->m_CurveName2, QVariant::String);
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "调色板参数设置",0, QVariant::Int);
|
_CreateVariantPropertyItem("立体轨迹图参数", "调色板参数设置",0, QVariant::Int);//formInfo->m_pTvd->objViewInfo->m_ColorTableIndex
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "直径放大系数", 1, QVariant::Double);
|
_CreateVariantPropertyItem("立体轨迹图参数", "直径放大系数", formInfo->m_pTvd->objViewInfo->m_calscale, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "波形基值", 0, QVariant::Double);
|
_CreateVariantPropertyItem("立体轨迹图参数", "波形基值", formInfo->m_pTvd->objViewInfo->m_baseval, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "波形最大值", 500, QVariant::Double);
|
_CreateVariantPropertyItem("立体轨迹图参数", "波形最大值", formInfo->m_pTvd->objViewInfo->m_maxval, QVariant::Double);
|
||||||
_CreateVariantPropertyItem("立体轨迹图参数", "连续填充", false, QVariant::Bool);
|
_CreateVariantPropertyItem("立体轨迹图参数", "连续填充", formInfo->m_pTvd->objViewInfo->m_isBlock, QVariant::Bool);
|
||||||
|
|
||||||
_CreateVariantPropertyItem("立体闭合方位线型", "线宽", 1, QVariant::Int);
|
_CreateVariantPropertyItem("立体闭合方位线型", "线宽", 1, QVariant::Int);
|
||||||
_CreateVariantPropertyItem("立体闭合方位线型", "颜色", QColor(255, 0, 0), QVariant::Color);
|
_CreateVariantPropertyItem("立体闭合方位线型", "颜色", QColor(255, 0, 0), QVariant::Color);
|
||||||
|
|
||||||
_CreateVariantPropertyItem("绘图参数", "最小深度间隔(m)", 5, QVariant::Double);
|
_CreateVariantPropertyItem("绘图参数", "最小深度间隔(m)", formInfo->m_pTvd->objViewInfo->m_Rlev, QVariant::Double);
|
||||||
|
|
||||||
_CreateVariantPropertyItem("立体闭合方位线型", "线宽", 3, QVariant::Int);
|
_CreateVariantPropertyItem("立体闭合方位线型", "线宽", 3, QVariant::Int);
|
||||||
_CreateVariantPropertyItem("立体闭合方位线型", "颜色", QColor(255, 0, 0), QVariant::Color);
|
_CreateVariantPropertyItem("立体闭合方位线型", "颜色", QColor(255, 0, 0), QVariant::Color);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//当前属性类型
|
//当前属性类型
|
||||||
m_strCurrentProperty = Tvd_Property;
|
m_strCurrentProperty = Tvd_Property;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -463,10 +463,149 @@ void FormDraw::DisplayLines(QJsonArray linesArray)
|
||||||
//套管组件
|
//套管组件
|
||||||
DisplayTubing_One(lineObjInfo);
|
DisplayTubing_One(lineObjInfo);
|
||||||
}
|
}
|
||||||
else if (strType == "depthObject")
|
}
|
||||||
|
else if("plObject" == strType)
|
||||||
{
|
{
|
||||||
// 深度
|
initFgrq(curv);
|
||||||
DisplayDepth_One(lineObjInfo);
|
}
|
||||||
|
else if("roseObject" == strType)
|
||||||
|
{
|
||||||
|
initRose(curv);
|
||||||
|
}
|
||||||
|
else if("dcaObject" == strType)
|
||||||
|
{
|
||||||
|
initDCA(curv);
|
||||||
|
}
|
||||||
|
else if("tdtObject" == strType)
|
||||||
|
{
|
||||||
|
initTDT(curv);
|
||||||
|
|
||||||
|
if(m_iY1 == 0.0)
|
||||||
|
{
|
||||||
|
QTimer::singleShot(200, this, [=]() {
|
||||||
|
m_iY2 = -2000;
|
||||||
|
m_iY1 = -2030;
|
||||||
|
emit CallManage::getInstance()->sig_changeDepth(m_strUuid, m_strSlfName, m_strWellName, m_iY1, m_iY2);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (strType == "tableObject")
|
||||||
|
{
|
||||||
|
//新建表格曲线
|
||||||
|
emit CallManage::getInstance()->sig_AddTableLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName);
|
||||||
|
}
|
||||||
|
curv->replot();
|
||||||
|
|
||||||
|
connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*)));
|
||||||
|
|
||||||
|
QTimer::singleShot(100, this, [=]() {
|
||||||
|
emit CallManage::getInstance()->sig_ReplotFinished(m_strUuid);
|
||||||
|
});
|
||||||
|
|
||||||
|
//
|
||||||
|
m_listLineName.push_back(strLineName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void FormDraw::setDrawPropert(QJsonObject objInfo)
|
||||||
|
{
|
||||||
|
if (objInfo.contains("formInfos"))
|
||||||
|
{
|
||||||
|
QJsonValue value = objInfo.value("formInfos");
|
||||||
|
if (value.isArray()) {
|
||||||
|
QJsonArray linesArray = value.toArray();
|
||||||
|
qDebug() << "linesArray number:" << QString::number(linesArray.size());
|
||||||
|
//展示所有曲线
|
||||||
|
DisplayLines(linesArray);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FormDraw::DisplayLines(QJsonArray linesArray)
|
||||||
|
{
|
||||||
|
QMap<int, int> mapLines;
|
||||||
|
|
||||||
|
int id = 0;
|
||||||
|
int iCount = linesArray.size();
|
||||||
|
for (int i = 0; i < iCount; i++)
|
||||||
|
{
|
||||||
|
QJsonValue lineValue = linesArray[i];
|
||||||
|
|
||||||
|
QJsonObject lineObj = lineValue.toObject();
|
||||||
|
//
|
||||||
|
if (lineObj.contains("id"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObj.value("id");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
id = value.toInt();
|
||||||
|
qDebug() << "id:" << QString::number(id);
|
||||||
|
//
|
||||||
|
mapLines.insert(id, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int id = 0; id < iCount; id++)
|
||||||
|
{
|
||||||
|
if (mapLines.contains(id))
|
||||||
|
{
|
||||||
|
int iNum = mapLines.value(id);
|
||||||
|
//按照id顺序,展示曲线
|
||||||
|
QJsonValue lineValue = linesArray[iNum];
|
||||||
|
QJsonObject lineObj = lineValue.toObject();
|
||||||
|
//
|
||||||
|
if (lineObj.contains("info"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObj.value("info");
|
||||||
|
if (value.isObject()) {
|
||||||
|
QJsonObject lineObjInfo = value.toObject();
|
||||||
|
|
||||||
|
QString strType = lineObjInfo.value("Type").toString();
|
||||||
|
|
||||||
|
//展示其中一条曲线
|
||||||
|
if (strType == "curveObject")
|
||||||
|
{
|
||||||
|
DisplayLine_One(lineObjInfo);
|
||||||
|
}
|
||||||
|
else if (strType == "tableObject")
|
||||||
|
{
|
||||||
|
QString strLineName = "";
|
||||||
|
if (lineObjInfo.contains("LineName"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("LineName");
|
||||||
|
if (value.isString()) {
|
||||||
|
strLineName = value.toString();
|
||||||
|
//qDebug() << "LineName:" << strLineName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (strLineName == "GUJING1_RESULT" || strLineName == "GUJING2_RESULT" || strLineName == "GUJING3_RESULT"
|
||||||
|
|| strLineName == "WORDS_RELUST" || strLineName == "GEO_LITH" || strLineName == "SWALL_CORE"
|
||||||
|
|| strLineName == "LAYER_DATA")
|
||||||
|
{
|
||||||
|
//固井结论/井壁取心/录井剖面/文字结论/地质分层
|
||||||
|
DisplayTable_One(lineObjInfo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (strType == "JiegutextObject")
|
||||||
|
{
|
||||||
|
//气测/FMT/射孔/文本
|
||||||
|
DisplayJiegutext_One(lineObjInfo);
|
||||||
|
}
|
||||||
|
else if (strType == "LogfaceObject")
|
||||||
|
{
|
||||||
|
//沉积相
|
||||||
|
DisplayFac_One(lineObjInfo);
|
||||||
|
}
|
||||||
|
else if (strType == "TubingstringObject")
|
||||||
|
{
|
||||||
|
//套管组件
|
||||||
|
DisplayTubing_One(lineObjInfo);
|
||||||
|
}
|
||||||
|
else if (strType == "SantuyibiaoObject")
|
||||||
|
{
|
||||||
|
// 斜井三图一表属性
|
||||||
|
DisplayTvd_One(lineObjInfo);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1152,19 +1291,693 @@ void FormDraw::DisplayTubing_One(QJsonObject lineObjInfo)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormDraw::DisplayDepth_One(QJsonObject objInfo)
|
//斜井三图一表
|
||||||
|
void FormDraw::DisplayTvd_One(QJsonObject lineObjInfo)
|
||||||
{
|
{
|
||||||
QString strType = objInfo.value("Type").toString();
|
QString strSlfName = "";
|
||||||
QString strLineName = objInfo.value("LineName").toString();
|
QString strWellName = "";
|
||||||
|
QString strLineName = "";
|
||||||
|
QString strAliasName = "";//显示名称
|
||||||
|
QFont curveNameFont("微软雅黑", 10); // 名称字体
|
||||||
|
QColor lineColor = QColor(0, 0, 0);//颜色
|
||||||
|
|
||||||
QStringList dt;
|
if (lineObjInfo.contains("SlfName"))
|
||||||
dt << m_strUuid;
|
{
|
||||||
dt << m_strWellName;
|
QJsonValue value = lineObjInfo.value("SlfName");
|
||||||
dt << m_strSlfName;
|
if (value.isString()) {
|
||||||
dt << strLineName;
|
strSlfName = value.toString();
|
||||||
dt << strType;
|
//qDebug() << "SlfName:" << strSlfName;
|
||||||
dt << QString::number(m_nTrackW);
|
|
||||||
this->setDrawData(dt, objInfo);
|
//
|
||||||
|
QString slffilename = QString("");
|
||||||
|
int ind = strSlfName.lastIndexOf('\\');
|
||||||
|
int ind2 = strSlfName.lastIndexOf('/');
|
||||||
|
if (ind2 > ind) ind = ind2;
|
||||||
|
if (ind > -1) {
|
||||||
|
slffilename = strSlfName.mid(ind + 1);
|
||||||
|
strSlfName = slffilename;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("WellName"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("WellName");
|
||||||
|
if (value.isString()) {
|
||||||
|
strWellName = value.toString();
|
||||||
|
//qDebug() << "WellName:" << strWellName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("LineName"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("LineName");
|
||||||
|
if (value.isString()) {
|
||||||
|
strLineName = value.toString();
|
||||||
|
//qDebug() << "LineName:" << strLineName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("AliasName"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("AliasName");
|
||||||
|
if (value.isString()) {
|
||||||
|
strAliasName = value.toString();
|
||||||
|
//qDebug() << "strAliasName:" << strAliasName;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//字体
|
||||||
|
if (lineObjInfo.contains("curveNameFont"))
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("curveNameFont");
|
||||||
|
if (value.isString()) {
|
||||||
|
curveNameFont.fromString(value.toString());
|
||||||
|
//qDebug() << "strUnit:" << strUnit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
if (lineObjInfo.contains("lineColor"))
|
||||||
|
{
|
||||||
|
lineColor.setNamedColor(lineObjInfo.value("lineColor").toString());
|
||||||
|
}
|
||||||
|
QString folderPath = GetLogdataPath();
|
||||||
|
folderPath = folderPath + g_prjname;
|
||||||
|
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
|
||||||
|
|
||||||
|
if (strLineName != "")
|
||||||
|
{
|
||||||
|
FormLine* pFormL = this->s_addSantuyibiao(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, 0);
|
||||||
|
if (pFormL && pFormL->m_drawTvd)
|
||||||
|
{
|
||||||
|
GetTvdProperty(pFormL->m_drawTvd, lineObjInfo);
|
||||||
|
emit CallManage::getInstance()->sig_ChangeTvdProperty(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, "Santuyibiao",
|
||||||
|
(QObject *)(pFormL->m_drawTvd));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void FormDraw::GetTvdProperty(CDrawTvd *drawTvd, QJsonObject lineObjInfo)
|
||||||
|
{
|
||||||
|
if (lineObjInfo.contains("AliasWellName")) // 通常-显示井名
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("AliasWellName");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->m_AliasWellName = value.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 绘制图形对象
|
||||||
|
if (lineObjInfo.contains("IsDrawBX")) // 绘制图形对象-靶心
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("IsDrawBX");
|
||||||
|
if (value.isBool()) {
|
||||||
|
drawTvd->objViewInfo->m_IsDrawBX = value.toBool();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("IsDrawBxcs")) // 绘制图形对象-靶心参数表
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("IsDrawBxcs");
|
||||||
|
if (value.isBool()) {
|
||||||
|
drawTvd->objViewInfo->m_IsDrawBxcs = value.toBool();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("IsDrawTable")) // 绘制图形对象-井斜数据表
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("IsDrawTable");
|
||||||
|
if (value.isBool()) {
|
||||||
|
drawTvd->objViewInfo->m_IsDrawTable = value.toBool();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("IsDrawFst")) // 绘制图形对象-俯视图
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("IsDrawFst");
|
||||||
|
if (value.isBool()) {
|
||||||
|
drawTvd->objViewInfo->m_IsDrawFst = value.toBool();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("DepthLeft")) // 绘制图形对象-侧视图深度在左边
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("DepthLeft");
|
||||||
|
if (value.isBool()) {
|
||||||
|
drawTvd->objViewInfo->m_DepthLeft = value.toBool();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("IsDrawCst1")) // 绘制图形对象-侧视图(水平位移)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("IsDrawCst1");
|
||||||
|
if (value.isBool()) {
|
||||||
|
drawTvd->objViewInfo->m_IsDrawCst1 = value.toBool();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("IsDrawCst2")) // 绘制图形对象-侧视图(向东)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("IsDrawCst2");
|
||||||
|
if (value.isBool()) {
|
||||||
|
drawTvd->objViewInfo->m_IsDrawCst2 = value.toBool();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("IsDrawCst3")) // 绘制图形对象-侧视图(向北)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("IsDrawCst3");
|
||||||
|
if (value.isBool()) {
|
||||||
|
drawTvd->objViewInfo->m_IsDrawCst3 = value.toBool();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("IsDrawCst")) // 绘制图形对象-侧视图(侧视角)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("IsDrawCst");
|
||||||
|
if (value.isBool()) {
|
||||||
|
drawTvd->objViewInfo->m_IsDrawCst = value.toBool();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("IsDrawLtgjt")) // 绘制图形对象-立体轨迹图
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("IsDrawLtgjt");
|
||||||
|
if (value.isBool()) {
|
||||||
|
drawTvd->objViewInfo->m_IsDrawLtgjt = value.toBool();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("isDrawNote")) // 绘制图形对象-绘制标注信息
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("isDrawNote");
|
||||||
|
if (value.isBool()) {
|
||||||
|
drawTvd->objViewInfo->m_isDrawNote = value.toBool();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 边框线型
|
||||||
|
if (lineObjInfo.contains("FrameWidth")) // 边框线型-线宽
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("FrameWidth");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->m_FrameWidth = value.toInt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("FrameColor")) // 边框线型-颜色
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("FrameColor");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->m_FrameColor.setNamedColor(value.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 格线线型
|
||||||
|
if (lineObjInfo.contains("GridWidth")) // 格线线型-线宽
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("GridWidth");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->m_GridWidth = value.toInt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("GridColor")) // 格线线型-颜色
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("GridColor");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->m_GridColor.setNamedColor(value.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 轨迹线型
|
||||||
|
if (lineObjInfo.contains("GuijiWidth")) // 轨迹线型-线宽
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("GuijiWidth");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->m_GuijiWidth = value.toInt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("GuijiColor")) // 轨迹线型-颜色
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("GuijiColor");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->m_GuijiColor.setNamedColor(value.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 靶心半径线型
|
||||||
|
if (lineObjInfo.contains("BxbjWidth")) // 靶心半径线型-线宽
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("BxbjWidth");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->m_BxbjWidth = value.toInt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("BxbjColor")) // 靶心半径线型-颜色
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("BxbjColor");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->m_BxbjColor.setNamedColor(value.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 靶心连线线型
|
||||||
|
if (lineObjInfo.contains("BxlxWidth")) // 靶心连线线型-线宽
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("BxlxWidth");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->m_BxlxWidth = value.toInt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("BxlxColor")) // 靶心连线线型-颜色
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("BxlxColor");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->m_BxlxColor.setNamedColor(value.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 字体
|
||||||
|
if (lineObjInfo.contains("HeadFont")) // 字体-道头字体
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("HeadFont");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->objViewInfo->m_HeadFont.fromString(value.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("HeadColor")) // 字体-道头颜色
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("HeadColor");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->objViewInfo->m_HeadColor.setNamedColor(value.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("TitleFont")) // 字体-标题字体
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("TitleFont");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->objViewInfo->m_TitleFont.fromString(value.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("TitleColor")) // 字体-标题颜色
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("TitleColor");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->objViewInfo->m_TitleColor.setNamedColor(value.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("TableFont")) // 字体-数据表字体
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("TableFont");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->objViewInfo->m_TableFont.fromString(value.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("TableColor")) // 字体-数据表颜色
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("TableColor");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->objViewInfo->m_TableColor.setNamedColor(value.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("ScaleFont")) // 字体-刻度字体
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("ScaleFont");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->objViewInfo->m_ScaleFont.fromString(value.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("ScaleColor")) // 字体-刻度颜色
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("ScaleColor");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->objViewInfo->m_ScaleColor.setNamedColor(value.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("NoteFont")) // 字体-注释字体
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("NoteFont");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->objViewInfo->m_NoteFont.fromString(value.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("NoteColor")) // 字体-注释颜色
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("NoteColor");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->objViewInfo->m_NoteColor.setNamedColor(value.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 井斜数据表参数
|
||||||
|
if (lineObjInfo.contains("Title_table")) // 井斜数据表参数-标题名
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("Title_table");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->m_Title_table = value.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("Head_Height")) // 井斜数据表参数-头记录高度(cm)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("Head_Height");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_Head_Height = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("Rec_Height")) // 井斜数据表参数-数据记录高度(cm)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("Rec_Height");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_Rec_Height = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 俯视图参数
|
||||||
|
if (lineObjInfo.contains("Title_fst")) // 俯视图参数-标题名
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("Title_fst");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->objViewInfo->m_Title_fst = value.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("MinXe")) // 俯视图参数-东西位移最小刻度
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MinXe");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MinXe = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("MaxXe")) // 俯视图参数-东西位移最大刻度
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MaxXe");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MaxXe = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("MinYn")) // 俯视图参数-南北位移最小刻度
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MinYn");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MinYn = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("MaxYn")) // 俯视图参数-南北位移最大刻度
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MaxYn");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MaxYn = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("bPlotBhx")) // 俯视图参数-是否绘制闭合线
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("bPlotBhx");
|
||||||
|
if (value.isBool()) {
|
||||||
|
drawTvd->objViewInfo->m_bPlotBhx = value.toBool();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 侧视图参数
|
||||||
|
if (lineObjInfo.contains("Title_cst")) // 侧视图参数-标题名
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("Title_cst");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->objViewInfo->m_Title_cst = value.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("heqw")) // 侧视图参数-高宽相同
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("heqw");
|
||||||
|
if (value.isBool()) {
|
||||||
|
drawTvd->objViewInfo->m_heqw = value.toBool();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 侧视图(水平位移)
|
||||||
|
if (lineObjInfo.contains("MaxWy_HOFF")) // 侧视图(水平位移)-最大侧视位移(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MaxWy_HOFF");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MaxWy_HOFF = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("MinWy_HOFF")) // 侧视图(水平位移)-最小侧视位移(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MinWy_HOFF");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MinWy_HOFF = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("MaxTVD_HOFF")) // 侧视图(水平位移)-最大垂深(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MaxTVD_HOFF");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MaxTVD_HOFF = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("MinTVD_HOFF")) // 侧视图(水平位移)-最小垂深(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MinTVD_HOFF");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MinTVD_HOFF = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 侧视图(向东)
|
||||||
|
if (lineObjInfo.contains("MaxWy_XE")) // 侧视图(向东)-最大侧视位移(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MaxWy_XE");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MaxWy_XE = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("MinWy_XE")) // 侧视图(向东)-最小侧视位移(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MinWy_XE");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MinWy_XE = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("MaxTVD_XE")) // 侧视图(向东)-最大垂深(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MaxTVD_XE");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MaxTVD_XE = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("MinTVD_XE")) // 侧视图(向东)-最小垂深(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MinTVD_XE");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MinTVD_XE = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 侧视图(向北)
|
||||||
|
if (lineObjInfo.contains("MaxWy_YN")) // 侧视图(向北)-最大侧视位移(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MaxWy_YN");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MaxWy_YN = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("MinWy_YN")) // 侧视图(向北)-最小侧视位移(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MinWy_YN");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MinWy_YN = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("MaxTVD_YN")) // 侧视图(向北)-最大垂深(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MaxTVD_YN");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MaxTVD_YN = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("MinTVD_YN")) // 侧视图(向北)-最小垂深(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MinTVD_YN");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MinTVD_YN = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 侧视图(侧视角)
|
||||||
|
if (lineObjInfo.contains("MaxWy")) // 侧视图(侧视角)-最大侧视位移(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MaxWy");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MaxWy = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("MinWy")) // 侧视图(侧视角)-最小侧视位移(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MinWy");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MinWy = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("MaxTVD")) // 侧视图(侧视角)-最大垂深(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MaxTVD");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MaxTVD = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("MinTVD")) // 侧视图(侧视角)-最小垂深(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MinTVD");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MinTVD = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("DepSpace")) // 侧视图(侧视角)-深度间隔(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("DepSpace");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_DepSpace = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("DepSpaceN")) // 侧视图(侧视角)-等分个数(=0按深度间隔)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("DepSpaceN");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_DepSpaceN = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("CsAngle")) // 侧视图(侧视角)-侧视角(度)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("CsAngle");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_CsAngle = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 立体轨迹图参数
|
||||||
|
if (lineObjInfo.contains("Title_ltgj")) // 立体轨迹图参数-标题名
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("Title_ltgj");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->m_Title_ltgj = value.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("MaxWy1")) // 立体轨迹图参数-最大位移(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("MaxWy1");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_MaxWy1 = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("LTTTVD")) // 立体轨迹图参数-起始垂深(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("LTTTVD");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_LTTTVD = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("DepSpace1")) // 立体轨迹图参数-垂深间隔(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("DepSpace1");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_DepSpace1 = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("is3DFrame")) // 立体轨迹图参数-是否绘制立体框
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("is3DFrame");
|
||||||
|
if (value.isBool()) {
|
||||||
|
drawTvd->objViewInfo->m_is3DFrame = value.toBool();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("LttAngle_X")) // 立体轨迹图参数-俯视角(度)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("LttAngle_X");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_LttAngle_X = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("LttAngle")) // 立体轨迹图参数-侧视角(度)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("LttAngle");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_LttAngle = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("LttAngle_Z")) // 立体轨迹图参数-倾斜角(度)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("LttAngle_Z");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_LttAngle_Z = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("LTTTVD")) // 立体轨迹图参数-竖线间隔
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("LTTTVD");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_LTTTVD = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("YD")) // 立体轨迹图参数-俯视南北间隔数
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("YD");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_YD = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("XD")) // 立体轨迹图参数-俯视东西间隔数
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("XD");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_XD = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("IsDrawProperty")) // 立体轨迹图参数-附加属性类型
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("IsDrawProperty");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_IsDrawProperty = value.toInt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("CurveName1")) // 立体轨迹图参数-选择井曲线1
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("CurveName1");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->objViewInfo->m_CurveName1 = value.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("CurveName2")) // 立体轨迹图参数-选择井曲线2
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("CurveName2");
|
||||||
|
if (value.isString()) {
|
||||||
|
drawTvd->objViewInfo->m_CurveName2 = value.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("ColorTableIndex")) // 立体轨迹图参数-调色板参数设置
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("ColorTableIndex");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_ColorTableIndex = value.toInt();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("calscale")) // 立体轨迹图参数-直径放大系数
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("calscale");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_calscale = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("baseval")) // 立体轨迹图参数-波形基值
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("baseval");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_baseval = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("maxval")) // 立体轨迹图参数-波形最大值
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("maxval");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_maxval = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lineObjInfo.contains("isBlock")) // 立体轨迹图参数-连续填充
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("isBlock");
|
||||||
|
if (value.isBool()) {
|
||||||
|
drawTvd->objViewInfo->m_isBlock = value.toBool();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 立体闭合方位线型
|
||||||
|
// rootObj["linewidth"] = m_pTvd->objViewInfo->m_linewidth; // 立体闭合方位线型-线宽
|
||||||
|
// rootObj["linecolor"] = m_pTvd->objViewInfo->m_linecolor; // 立体闭合方位线型-颜色
|
||||||
|
|
||||||
|
// 立体轨迹图参数
|
||||||
|
if (lineObjInfo.contains("Rlev")) // 侧视图(侧视角)-最小深度间隔(m)
|
||||||
|
{
|
||||||
|
QJsonValue value = lineObjInfo.value("Rlev");
|
||||||
|
if (value.isDouble()) {
|
||||||
|
drawTvd->objViewInfo->m_Rlev = value.toDouble();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 立体井径线型
|
||||||
|
// rootObj["linewidth"] = m_pTvd->objViewInfo->m_linewidth; // 立体井径线型-线宽
|
||||||
|
// rootObj["linecolor"] = m_pTvd->objViewInfo->m_linecolor; // 立体井径线型-颜色
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormDraw::DisplayLine_One(QJsonObject lineObjInfo)
|
void FormDraw::DisplayLine_One(QJsonObject lineObjInfo)
|
||||||
|
|
@ -2766,7 +3579,7 @@ void FormDraw::s_addDrawImage(QString strUuid, QString strSlfName, QString strWe
|
||||||
}
|
}
|
||||||
|
|
||||||
//斜井三图一表
|
//斜井三图一表
|
||||||
void FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW)
|
FormLine* FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW)
|
||||||
{
|
{
|
||||||
//井名&道名不一致
|
//井名&道名不一致
|
||||||
if(strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName)
|
if(strUuid == m_strUuid && m_strWellName == strWellName && m_strTrackName == strTrackName)
|
||||||
|
|
@ -2774,13 +3587,13 @@ void FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QString str
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_listTableName.contains(strLineName))
|
if(m_listTableName.contains(strLineName))
|
||||||
{
|
{
|
||||||
qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
qDebug() << "FormDraw strLineName already exist! " << strLineName;
|
||||||
return;
|
return NULL;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
FormLine *curv = new FormLine(this, strSlfName, strWellName, strTrackName, strLineName);
|
FormLine *curv = new FormLine(this, strSlfName, strWellName, strTrackName, strLineName);
|
||||||
|
|
@ -2821,8 +3634,10 @@ void FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QString str
|
||||||
double width=2;
|
double width=2;
|
||||||
QString strScaleType = "";
|
QString strScaleType = "";
|
||||||
//道-对象
|
//道-对象
|
||||||
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strWaveName, strAliasName, strUnit, newlineColor, width, _nSamples, 0, strScaleType, "SantuyibiaoObject");
|
m_formTrack->Add(strSlfName, m_strWellName, m_strTrackName, strLineName, strAliasName, strUnit, newlineColor, width, _nSamples, 0, strScaleType, "SantuyibiaoObject");
|
||||||
|
emit CallManage::getInstance()->sig_ChangeTvdProperty(m_strUuid, m_strSlfName, m_strWellName, m_strTrackName, "Santuyibiao",
|
||||||
|
(QObject *)(curv->m_drawTvd));
|
||||||
|
return curv;
|
||||||
}
|
}
|
||||||
|
|
||||||
//裂痕
|
//裂痕
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
#include "formtrack.h"
|
#include "formtrack.h"
|
||||||
#include "LogIO.h"
|
#include "LogIO.h"
|
||||||
#include "MemRdWt.h"
|
#include "MemRdWt.h"
|
||||||
|
#include "FormLine.h"
|
||||||
|
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
|
|
@ -73,6 +74,11 @@ public:
|
||||||
//套管組件
|
//套管組件
|
||||||
void DisplayTubing_One(QJsonObject lineObjInfo);
|
void DisplayTubing_One(QJsonObject lineObjInfo);
|
||||||
|
|
||||||
|
//斜井三图一表
|
||||||
|
void DisplayTvd_One(QJsonObject lineObjInfo);
|
||||||
|
//获取斜井三图一表属性
|
||||||
|
void GetTvdProperty(CDrawTvd *drawTvd, QJsonObject lineObjInfo);
|
||||||
|
|
||||||
// 跨道设置
|
// 跨道设置
|
||||||
void crossTrackSetting();
|
void crossTrackSetting();
|
||||||
|
|
||||||
|
|
@ -253,7 +259,7 @@ public slots:
|
||||||
//图像 成像
|
//图像 成像
|
||||||
void s_addDrawImage(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
void s_addDrawImage(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
||||||
//斜井三图一表
|
//斜井三图一表
|
||||||
void s_addSantuyibiao(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
FormLine* s_addSantuyibiao(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
||||||
//裂缝
|
//裂缝
|
||||||
void s_addCrack(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
void s_addCrack(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, int nW);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ FormInfo::FormInfo(QWidget *parent, QString strSlfName, QString strWellName, QSt
|
||||||
//
|
//
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
|
|
||||||
|
m_pTvd = NULL;
|
||||||
m_strSlfName = strSlfName;
|
m_strSlfName = strSlfName;
|
||||||
m_strWellName = strWellName;
|
m_strWellName = strWellName;
|
||||||
m_strTrackName = strTrackName;
|
m_strTrackName = strTrackName;
|
||||||
|
|
@ -64,8 +65,8 @@ FormInfo::FormInfo(QWidget *parent, QString strSlfName, QString strWellName, QSt
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeDrawSymmetry(QString, QString, QString, QString, QString, bool)), this, SLOT(s_ChangeDrawSymmetry(QString, QString, QString, QString, QString, bool)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeDrawSymmetry(QString, QString, QString, QString, QString, bool)), this, SLOT(s_ChangeDrawSymmetry(QString, QString, QString, QString, QString, bool)));
|
||||||
|
|
||||||
//斜井三图一表
|
//斜井三图一表
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeTvdProperty(QString, QString, QString, QString, QString, QString, QString, QVariant)),
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeTvdProperty(QString, QString, QString, QString, QString, QObject *)),
|
||||||
this, SLOT(s_ChangeTvdProperty(QString, QString, QString, QString, QString, QString, QString, QVariant)));
|
this, SLOT(s_ChangeTvdProperty(QString, QString, QString, QString, QString, QObject *)));
|
||||||
|
|
||||||
//岩性填充-不填充
|
//岩性填充-不填充
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ClearFillMode(QString, QString, QString, QString, QString)), this, SLOT(s_ClearFillMode(QString, QString, QString, QString, QString)));
|
connect(CallManage::getInstance(), SIGNAL(sig_ClearFillMode(QString, QString, QString, QString, QString)), this, SLOT(s_ClearFillMode(QString, QString, QString, QString, QString)));
|
||||||
|
|
@ -295,6 +296,11 @@ QJsonObject FormInfo::makeJson()
|
||||||
rootObj["SchemeIndex"] = m_nSchemeIndex;
|
rootObj["SchemeIndex"] = m_nSchemeIndex;
|
||||||
rootObj["ColorNum"] = m_nColorNum;
|
rootObj["ColorNum"] = m_nColorNum;
|
||||||
}
|
}
|
||||||
|
else if(m_strType == "SantuyibiaoObject")
|
||||||
|
{
|
||||||
|
makeTvdJson(rootObj);
|
||||||
|
}
|
||||||
|
|
||||||
else if (m_strType == "depthObject")
|
else if (m_strType == "depthObject")
|
||||||
{
|
{
|
||||||
rootObj["bVerticaDrawing"] = m_bVerticaDrawing; // 垂向绘制
|
rootObj["bVerticaDrawing"] = m_bVerticaDrawing; // 垂向绘制
|
||||||
|
|
@ -323,6 +329,127 @@ QJsonObject FormInfo::makeJson()
|
||||||
return rootObj;
|
return rootObj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FormInfo::makeTvdJson(QJsonObject& rootObj)
|
||||||
|
{
|
||||||
|
if(!m_pTvd)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
rootObj["AliasWellName"] = m_pTvd->m_AliasWellName;;// 通常-显示井名
|
||||||
|
|
||||||
|
// 绘制图形对象
|
||||||
|
rootObj["IsDrawBX"] = m_pTvd->objViewInfo->m_IsDrawBX; // 绘制图形对象-靶心
|
||||||
|
rootObj["IsDrawBxcs"] = m_pTvd->objViewInfo->m_IsDrawBxcs; // 绘制图形对象-靶心参数表
|
||||||
|
rootObj["IsDrawTable"] = m_pTvd->objViewInfo->m_IsDrawTable; // 绘制图形对象-井斜数据表
|
||||||
|
rootObj["IsDrawFst"] = m_pTvd->objViewInfo->m_IsDrawFst; // 绘制图形对象-俯视图
|
||||||
|
rootObj["DepthLeft"] = m_pTvd->objViewInfo->m_DepthLeft; // 绘制图形对象-侧视图深度在左边
|
||||||
|
rootObj["IsDrawCst1"] = m_pTvd->objViewInfo->m_IsDrawCst1; // 绘制图形对象-侧视图(水平位移)
|
||||||
|
rootObj["IsDrawCst2"] = m_pTvd->objViewInfo->m_IsDrawCst2; // 绘制图形对象-侧视图(向东)
|
||||||
|
rootObj["IsDrawCst3"] = m_pTvd->objViewInfo->m_IsDrawCst3; // 绘制图形对象-侧视图(向北)
|
||||||
|
rootObj["IsDrawCst"] = m_pTvd->objViewInfo->m_IsDrawCst; // 绘制图形对象-侧视图(侧视角)
|
||||||
|
rootObj["IsDrawLtgjt"] = m_pTvd->objViewInfo->m_IsDrawLtgjt; // 绘制图形对象-立体轨迹图
|
||||||
|
rootObj["isDrawNote"] = m_pTvd->objViewInfo->m_isDrawNote; // 绘制图形对象-绘制标注信息
|
||||||
|
|
||||||
|
// 边框线型
|
||||||
|
rootObj["FrameWidth"] = m_pTvd->m_FrameWidth; // 边框线型-线宽
|
||||||
|
rootObj["FrameColor"] = m_pTvd->m_FrameColor.name(); // 边框线型-颜色
|
||||||
|
// 格线线型
|
||||||
|
rootObj["GridWidth"] = m_pTvd->m_GridWidth; // 格线线型-线宽
|
||||||
|
rootObj["GridColor"] = m_pTvd->m_GridColor.name();// 格线线型-颜色
|
||||||
|
// 轨迹线型
|
||||||
|
rootObj["GuijiWidth"] = m_pTvd->m_GuijiWidth;// 轨迹线型-线宽
|
||||||
|
rootObj["GuijiColor"] = m_pTvd->m_GuijiColor.name();// 轨迹线型-颜色
|
||||||
|
// 靶心半径线型
|
||||||
|
rootObj["BxbjWidth"] = m_pTvd->m_BxbjWidth; // 靶心半径线型-线宽
|
||||||
|
rootObj["BxbjColor"] = m_pTvd->m_BxbjColor.name(); // 靶心半径线型-颜色
|
||||||
|
// 靶心连线线型
|
||||||
|
rootObj["BxlxWidth"] = m_pTvd->m_BxlxWidth; // 靶心连线线型-线宽
|
||||||
|
rootObj["BxlxColor"] = m_pTvd->m_BxlxColor.name(); // 靶心连线线型-颜色
|
||||||
|
// 字体
|
||||||
|
rootObj["HeadFont"] = m_pTvd->objViewInfo->m_HeadFont.toString(); // 字体-道头字体
|
||||||
|
rootObj["HeadColor"] = m_pTvd->objViewInfo->m_HeadColor.name(); // 字体-道头颜色
|
||||||
|
rootObj["TitleFont"] = m_pTvd->objViewInfo->m_TitleFont.toString(); // 字体-标题字体
|
||||||
|
rootObj["TitleColor"] = m_pTvd->objViewInfo->m_TitleColor.name(); // 字体-标题颜色
|
||||||
|
rootObj["TableFont"] = m_pTvd->objViewInfo->m_TableFont.toString(); // 字体-数据表字体
|
||||||
|
rootObj["TableColor"] = m_pTvd->objViewInfo->m_TableColor.name(); // 字体-数据表颜色
|
||||||
|
rootObj["ScaleFont"] = m_pTvd->objViewInfo->m_ScaleFont.toString(); // 字体-刻度字体
|
||||||
|
rootObj["ScaleColor"] = m_pTvd->objViewInfo->m_ScaleColor.name(); // 字体-刻度颜色
|
||||||
|
rootObj["NoteFont"] = m_pTvd->objViewInfo->m_NoteFont.toString(); // 字体-注释字体
|
||||||
|
rootObj["NoteColor"] = m_pTvd->objViewInfo->m_NoteColor.name(); // 字体-注释颜色
|
||||||
|
// 井斜数据表参数
|
||||||
|
rootObj["Title_table"] = m_pTvd->m_Title_table;// 井斜数据表参数-标题名
|
||||||
|
rootObj["Head_Height"] = m_pTvd->objViewInfo->m_Head_Height;// 井斜数据表参数-头记录高度(cm)
|
||||||
|
rootObj["Rec_Height"] = m_pTvd->objViewInfo->m_Rec_Height;// 井斜数据表参数-数据记录高度(cm)
|
||||||
|
// 俯视图参数
|
||||||
|
rootObj["Title_fst"] = m_pTvd->objViewInfo->m_Title_fst;// 俯视图参数-标题名
|
||||||
|
rootObj["MinXe"] = m_pTvd->objViewInfo->m_MinXe; // 俯视图参数-东西位移最小刻度
|
||||||
|
rootObj["MaxXe"] = m_pTvd->objViewInfo->m_MaxXe; // 俯视图参数-东西位移最大刻度
|
||||||
|
rootObj["MinYn"] = m_pTvd->objViewInfo->m_MinYn; // 俯视图参数-南北位移最小刻度
|
||||||
|
rootObj["MaxYn"] = m_pTvd->objViewInfo->m_MaxYn; // 俯视图参数-南北位移最大刻度
|
||||||
|
rootObj["bPlotBhx"] = m_pTvd->objViewInfo->m_bPlotBhx; // 俯视图参数-是否绘制闭合线
|
||||||
|
|
||||||
|
// 侧视图参数
|
||||||
|
rootObj["Title_cst"] = m_pTvd->objViewInfo->m_Title_cst; // 侧视图参数-标题名
|
||||||
|
rootObj["heqw"] = m_pTvd->objViewInfo->m_heqw; // 侧视图参数-高宽相同
|
||||||
|
|
||||||
|
// 侧视图(水平位移)
|
||||||
|
rootObj["MaxWy_HOFF"] = m_pTvd->objViewInfo->m_MaxWy_HOFF; // 侧视图(水平位移)-最大侧视位移(m)
|
||||||
|
rootObj["MinWy_HOFF"] = m_pTvd->objViewInfo->m_MinWy_HOFF; // 侧视图(水平位移)-最小侧视位移(m)
|
||||||
|
rootObj["MaxTVD_HOFF"] = m_pTvd->objViewInfo->m_MaxTVD_HOFF;// 侧视图(水平位移)-最大垂深(m)
|
||||||
|
rootObj["MinTVD_HOFF"] = m_pTvd->objViewInfo->m_MinTVD_HOFF;// 侧视图(水平位移)-最小垂深(m)
|
||||||
|
// 侧视图(向东)
|
||||||
|
rootObj["MaxWy_XE"] = m_pTvd->objViewInfo->m_MaxWy_XE; // 侧视图(向东)-最大侧视位移(m)
|
||||||
|
rootObj["MinWy_XE"] = m_pTvd->objViewInfo->m_MinWy_XE; // 侧视图(向东)-最小侧视位移(m)
|
||||||
|
rootObj["MaxTVD_XE"] = m_pTvd->objViewInfo->m_MaxTVD_XE; // 侧视图(向东)-最大垂深(m)
|
||||||
|
rootObj["MinTVD_XE"] = m_pTvd->objViewInfo->m_MinTVD_XE; // 侧视图(向东)-最小垂深(m)
|
||||||
|
// 侧视图(向北)
|
||||||
|
rootObj["MaxWy_YN"] = m_pTvd->objViewInfo->m_MaxWy_YN; // 侧视图(向北)-最大侧视位移(m)
|
||||||
|
rootObj["MinWy_YN"] = m_pTvd->objViewInfo->m_MinWy_YN; // 侧视图(向北)-最小侧视位移(m)
|
||||||
|
rootObj["MaxTVD_YN"] = m_pTvd->objViewInfo->m_MaxTVD_YN; // 侧视图(向北)-最大垂深(m)
|
||||||
|
rootObj["MinTVD_YN"] = m_pTvd->objViewInfo->m_MinTVD_YN; // 侧视图(向北)-最小垂深(m)
|
||||||
|
// 侧视图(侧视角)
|
||||||
|
rootObj["MaxWy"] = m_pTvd->objViewInfo->m_MaxWy; // 侧视图(侧视角)-最大侧视位移(m)
|
||||||
|
rootObj["MinWy"] = m_pTvd->objViewInfo->m_MinWy; // 侧视图(侧视角)-最小侧视位移(m)
|
||||||
|
rootObj["MaxTVD"] = m_pTvd->objViewInfo->m_MaxTVD; // 侧视图(侧视角)-最大垂深(m)
|
||||||
|
rootObj["MinTVD"] = m_pTvd->objViewInfo->m_MinTVD; // 侧视图(侧视角)-最小垂深(m)
|
||||||
|
rootObj["DepSpace"] = m_pTvd->objViewInfo->m_DepSpace; // 侧视图(侧视角)-深度间隔(m)
|
||||||
|
rootObj["DepSpaceN"] = m_pTvd->objViewInfo->m_DepSpaceN; // 侧视图(侧视角)-等分个数(=0按深度间隔)
|
||||||
|
rootObj["CsAngle"] = m_pTvd->objViewInfo->m_CsAngle; // 侧视图(侧视角)-侧视角(度)
|
||||||
|
|
||||||
|
// 立体轨迹图参数
|
||||||
|
rootObj["Title_ltgj"] = m_pTvd->m_Title_ltgj; // 立体轨迹图参数-标题名
|
||||||
|
rootObj["MaxWy1"] = m_pTvd->objViewInfo->m_MaxWy1; // 立体轨迹图参数-最大位移(m)
|
||||||
|
rootObj["LTTTVD"] = m_pTvd->objViewInfo->m_LTTTVD; // 立体轨迹图参数-起始垂深(m)
|
||||||
|
rootObj["DepSpace1"] = m_pTvd->objViewInfo->m_DepSpace1; // 立体轨迹图参数-垂深间隔(m)
|
||||||
|
rootObj["is3DFrame"] = m_pTvd->objViewInfo->m_is3DFrame; // 立体轨迹图参数-是否绘制立体框
|
||||||
|
rootObj["LttAngle_X"] = m_pTvd->objViewInfo->m_LttAngle_X; // 立体轨迹图参数-俯视角(度)
|
||||||
|
rootObj["LttAngle"] = m_pTvd->objViewInfo->m_LttAngle; // 立体轨迹图参数-侧视角(度)
|
||||||
|
rootObj["LttAngle_Z"] = m_pTvd->objViewInfo->m_LttAngle_Z; // 立体轨迹图参数-倾斜角(度)
|
||||||
|
rootObj["LTTTVD"] = m_pTvd->objViewInfo->m_LTTTVD; // 立体轨迹图参数-竖线间隔
|
||||||
|
rootObj["YD"] = m_pTvd->objViewInfo->m_YD; // 立体轨迹图参数-俯视南北间隔数
|
||||||
|
rootObj["XD"] = m_pTvd->objViewInfo->m_XD; // 立体轨迹图参数-俯视东西间隔数
|
||||||
|
rootObj["IsDrawProperty"] = m_pTvd->objViewInfo->m_IsDrawProperty; // 立体轨迹图参数-附加属性类型
|
||||||
|
rootObj["CurveName1"] = m_pTvd->objViewInfo->m_CurveName1; // 立体轨迹图参数-选择井曲线1
|
||||||
|
rootObj["CurveName2"] = m_pTvd->objViewInfo->m_CurveName2; // 立体轨迹图参数-选择井曲线2
|
||||||
|
rootObj["ColorTableIndex"] = m_pTvd->objViewInfo->m_ColorTableIndex; // 立体轨迹图参数-调色板参数设置
|
||||||
|
rootObj["calscale"] = m_pTvd->objViewInfo->m_calscale; // 立体轨迹图参数-直径放大系数
|
||||||
|
rootObj["baseval"] = m_pTvd->objViewInfo->m_baseval; // 立体轨迹图参数-波形基值
|
||||||
|
rootObj["maxval"] = m_pTvd->objViewInfo->m_maxval; // 立体轨迹图参数-波形最大值
|
||||||
|
rootObj["isBlock"] = m_pTvd->objViewInfo->m_isBlock; // 立体轨迹图参数-连续填充
|
||||||
|
|
||||||
|
// 立体闭合方位线型
|
||||||
|
// rootObj["linewidth"] = m_pTvd->objViewInfo->m_linewidth; // 立体闭合方位线型-线宽
|
||||||
|
// rootObj["linecolor"] = m_pTvd->objViewInfo->m_linecolor; // 立体闭合方位线型-颜色
|
||||||
|
|
||||||
|
// 立体轨迹图参数
|
||||||
|
rootObj["Rlev"] = m_pTvd->objViewInfo->m_Rlev; // 立体轨迹图参数-最小深度间隔(m)
|
||||||
|
|
||||||
|
// 立体井径线型
|
||||||
|
// rootObj["linewidth"] = m_pTvd->objViewInfo->m_linewidth; // 立体井径线型-线宽
|
||||||
|
// rootObj["linecolor"] = m_pTvd->objViewInfo->m_linecolor; // 立体井径线型-颜色
|
||||||
|
}
|
||||||
|
|
||||||
void FormInfo::paintEvent(QPaintEvent* event)
|
void FormInfo::paintEvent(QPaintEvent* event)
|
||||||
{
|
{
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
|
|
@ -1051,62 +1178,19 @@ void FormInfo::s_ChangeDrawSymmetry(QString strUuid, QString strSlfName, QString
|
||||||
}
|
}
|
||||||
|
|
||||||
void FormInfo::s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
void FormInfo::s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||||
QString strGroup, QString strProperty, QVariant variant)
|
QObject *pTvd)
|
||||||
{
|
{
|
||||||
if("井斜数据表参数" == strGroup)
|
if(m_strUuid == strUuid &&
|
||||||
|
m_strSlfName == strSlfName &&
|
||||||
|
m_strWellName == strWellName &&
|
||||||
|
m_strTrackName == strTrackName &&
|
||||||
|
m_strLineName == strLineName)
|
||||||
{
|
{
|
||||||
if("标题名" == strProperty)
|
m_pTvd = dynamic_cast<CDrawTvd*>(pTvd);
|
||||||
m_Title_table = variant.value<QString>();
|
if (m_pTvd)
|
||||||
else if("头记录高度(cm)" == strProperty)
|
{
|
||||||
m_Head_Height = variant.value<double>();
|
m_pTvd->m_AliasWellName = m_strWellName;
|
||||||
else if("数据记录高度(cm)" == strProperty)
|
|
||||||
m_Rec_Height = variant.value<double>();
|
|
||||||
}
|
}
|
||||||
else if("立体轨迹图参数" == strGroup)
|
|
||||||
{
|
|
||||||
if("标题名" == strProperty)
|
|
||||||
m_Title_ltgj = variant.value<QString>();
|
|
||||||
else if("最大位移(m)" == strProperty)
|
|
||||||
m_MaxWy1 = variant.value<double>();
|
|
||||||
else if("起始垂深(m)" == strProperty)
|
|
||||||
m_LTTTVD = variant.value<double>();
|
|
||||||
else if("垂深间隔(m)" == strProperty)
|
|
||||||
m_DepSpace1 = variant.value<double>();
|
|
||||||
else if("是否绘制立体框" == strProperty)
|
|
||||||
m_is3DFrame = variant.value<bool>();
|
|
||||||
else if("俯视角(度)" == strProperty)
|
|
||||||
m_LttAngle_X = variant.value<double>();
|
|
||||||
else if("侧视角(度)" == strProperty)
|
|
||||||
m_LttAngle = variant.value<double>();
|
|
||||||
else if("倾斜角(度)" == strProperty)
|
|
||||||
m_LttAngle_Z = variant.value<double>();
|
|
||||||
else if("竖线间隔" == strProperty)
|
|
||||||
m_LTTTVD = variant.value<double>();
|
|
||||||
else if("俯视南北间隔数" == strProperty)
|
|
||||||
m_YD = variant.value<double>();
|
|
||||||
else if("俯视东西间隔数" == strProperty)
|
|
||||||
m_XD = variant.value<double>();
|
|
||||||
else if("附加属性类型" == strProperty)
|
|
||||||
m_IsDrawProperty = variant.value<int>();
|
|
||||||
else if("选择井曲线1" == strProperty)
|
|
||||||
m_CurveName1 = variant.value<QString>();
|
|
||||||
else if("选择井曲线2" == strProperty)
|
|
||||||
m_CurveName2 = variant.value<QString>();
|
|
||||||
else if("调色板参数设置" == strProperty)
|
|
||||||
m_ColorTableIndex = variant.value<int>();
|
|
||||||
else if("直径放大系数" == strProperty)
|
|
||||||
m_calscale = variant.value<double>();
|
|
||||||
else if("波形基值" == strProperty)
|
|
||||||
m_baseval = variant.value<double>();
|
|
||||||
else if("波形最大值" == strProperty)
|
|
||||||
m_maxval = variant.value<double>();
|
|
||||||
else if("连续填充" == strProperty)
|
|
||||||
m_isBlock = variant.value<bool>();
|
|
||||||
}
|
|
||||||
else if("立体轨迹图参数" == strGroup)
|
|
||||||
{
|
|
||||||
if("最小深度间隔(m)" == strProperty)
|
|
||||||
m_Rlev = variant.value<bool>();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
|
#include "DrawTvd.h"
|
||||||
|
|
||||||
#pragma execution_character_set("utf-8")
|
#pragma execution_character_set("utf-8")
|
||||||
|
|
||||||
|
|
@ -58,10 +59,9 @@ public slots:
|
||||||
void s_ChangeDrawPoint(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawPoint);
|
void s_ChangeDrawPoint(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawPoint);
|
||||||
//绘制对称曲线
|
//绘制对称曲线
|
||||||
void s_ChangeDrawSymmetry(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawSymmetry);
|
void s_ChangeDrawSymmetry(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName, bool bDrawSymmetry);
|
||||||
|
|
||||||
//斜井三图一表
|
//斜井三图一表
|
||||||
void s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
void s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||||
QString strGroup, QString strProperty, QVariant variant);
|
QObject *pTvd);
|
||||||
|
|
||||||
//岩性填充-不填充
|
//岩性填充-不填充
|
||||||
void s_ClearFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
void s_ClearFillMode(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName);
|
||||||
|
|
@ -192,35 +192,8 @@ public:
|
||||||
float m_inD_Tubing = 121.36; //套管内径
|
float m_inD_Tubing = 121.36; //套管内径
|
||||||
float m_OutD_Tubing = 139.7; //套管外径
|
float m_OutD_Tubing = 139.7; //套管外径
|
||||||
|
|
||||||
//tvd
|
|
||||||
//斜井三图一表(井斜数据表参数)
|
//斜井三图一表(井斜数据表参数)
|
||||||
QString m_Title_table;
|
CDrawTvd *m_pTvd;
|
||||||
float m_Head_Height;
|
|
||||||
float m_Rec_Height;
|
|
||||||
//斜井三图一表(立体轨迹图参数)
|
|
||||||
QString m_Title_ltgj;
|
|
||||||
double m_MaxWy1;
|
|
||||||
double m_LTTTVD;
|
|
||||||
double m_DepSpace1;
|
|
||||||
double m_LttAngle;
|
|
||||||
double m_LttAngle_X;
|
|
||||||
double m_LttAngle_Z;
|
|
||||||
bool m_is3DFrame;
|
|
||||||
double m_LttxDela;
|
|
||||||
|
|
||||||
double m_XD;
|
|
||||||
double m_YD;
|
|
||||||
int m_IsDrawProperty;
|
|
||||||
QString m_CurveName1;
|
|
||||||
QString m_CurveName2;
|
|
||||||
|
|
||||||
int m_ColorTableIndex;
|
|
||||||
double m_calscale;
|
|
||||||
double m_baseval;
|
|
||||||
double m_maxval;
|
|
||||||
double m_Rlev;
|
|
||||||
bool m_isBlock;
|
|
||||||
//tvd
|
|
||||||
|
|
||||||
// 深度
|
// 深度
|
||||||
QColor m_sdRulerColor; // 标尺颜色
|
QColor m_sdRulerColor; // 标尺颜色
|
||||||
|
|
@ -264,6 +237,7 @@ public:
|
||||||
int getFillTypeIndex();
|
int getFillTypeIndex();
|
||||||
|
|
||||||
QJsonObject makeJson();
|
QJsonObject makeJson();
|
||||||
|
void makeTvdJson(QJsonObject& rootObj);
|
||||||
|
|
||||||
//右键菜单响应函数
|
//右键菜单响应函数
|
||||||
virtual void contextMenuEvent(QContextMenuEvent *event);
|
virtual void contextMenuEvent(QContextMenuEvent *event);
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,8 @@ FormLine::FormLine(QWidget *parent, QString strSlfName, QString strWellName, QSt
|
||||||
m_strTrackName = strTrackName;
|
m_strTrackName = strTrackName;
|
||||||
m_strLineName = strLineName;
|
m_strLineName = strLineName;
|
||||||
|
|
||||||
m_drawTvd = NULL;
|
m_drawTvd = new CDrawTvd();
|
||||||
|
m_parent = parent;
|
||||||
//斜井三图一表
|
//斜井三图一表
|
||||||
connect(CallManage::getInstance(), SIGNAL(sig_ChangeTvdProperty(QString, QString, QString, QString, QString, QString, QString, QVariant)),
|
connect(CallManage::getInstance(), SIGNAL(sig_ChangeTvdProperty(QString, QString, QString, QString, QString, QString, QString, QVariant)),
|
||||||
this, SLOT(s_ChangeTvdProperty(QString, QString, QString, QString, QString, QString, QString, QVariant)));
|
this, SLOT(s_ChangeTvdProperty(QString, QString, QString, QString, QString, QString, QString, QVariant)));
|
||||||
|
|
@ -45,6 +46,7 @@ void FormLine::paintEvent(QPaintEvent*)
|
||||||
//
|
//
|
||||||
QPainter painter(this);
|
QPainter painter(this);
|
||||||
QRect rect = this->rect();
|
QRect rect = this->rect();
|
||||||
|
// QRect rect = m_parent->rect();
|
||||||
//背景透明
|
//背景透明
|
||||||
painter.fillRect(rect.left(), rect.top(), rect.width(), rect.height(), QColor(0, 0, 0, 0)); //QColor(67, 67, 67, 100)
|
painter.fillRect(rect.left(), rect.top(), rect.width(), rect.height(), QColor(0, 0, 0, 0)); //QColor(67, 67, 67, 100)
|
||||||
|
|
||||||
|
|
@ -75,6 +77,14 @@ void FormLine::paintEvent(QPaintEvent*)
|
||||||
void FormLine::s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
void FormLine::s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strLineName,
|
||||||
QString strGroup, QString strProperty, QVariant variant)
|
QString strGroup, QString strProperty, QVariant variant)
|
||||||
{
|
{
|
||||||
|
if(m_strUuid != strUuid ||
|
||||||
|
m_strSlfName != strSlfName ||
|
||||||
|
m_strWellName != strWellName ||
|
||||||
|
m_strTrackName != strTrackName ||
|
||||||
|
m_strLineName != strLineName)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
if("通常" == strGroup)
|
if("通常" == strGroup)
|
||||||
{
|
{
|
||||||
// if("选择井斜数据" == strProperty)
|
// if("选择井斜数据" == strProperty)
|
||||||
|
|
@ -192,7 +202,7 @@ void FormLine::s_ChangeTvdProperty(QString strUuid, QString strSlfName, QString
|
||||||
else if("立体轨迹图参数" == strGroup)
|
else if("立体轨迹图参数" == strGroup)
|
||||||
{
|
{
|
||||||
if("标题名" == strProperty)
|
if("标题名" == strProperty)
|
||||||
m_drawTvd->objViewInfo->m_Title_ltgj = variant.value<QString>();
|
m_drawTvd->m_Title_ltgj = variant.value<QString>();
|
||||||
else if("最大位移(m)" == strProperty)
|
else if("最大位移(m)" == strProperty)
|
||||||
m_drawTvd->objViewInfo->m_MaxWy1 = variant.value<double>();
|
m_drawTvd->objViewInfo->m_MaxWy1 = variant.value<double>();
|
||||||
else if("起始垂深(m)" == strProperty)
|
else if("起始垂深(m)" == strProperty)
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,7 @@ public:
|
||||||
QString m_strTrackName;
|
QString m_strTrackName;
|
||||||
QString m_strLineName;
|
QString m_strLineName;
|
||||||
CDrawTvd *m_drawTvd;
|
CDrawTvd *m_drawTvd;
|
||||||
|
QWidget *m_parent;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void DrawTvd();
|
void DrawTvd();
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,7 @@ SOURCES += \
|
||||||
qmytreewidget.cpp \
|
qmytreewidget.cpp \
|
||||||
qtcommonclass.cpp \
|
qtcommonclass.cpp \
|
||||||
qtprojectwidgets.cpp \
|
qtprojectwidgets.cpp \
|
||||||
|
selectwelldialog.cpp \
|
||||||
totalTitleBar.cpp \
|
totalTitleBar.cpp \
|
||||||
transparentdraggableGuan.cpp \
|
transparentdraggableGuan.cpp \
|
||||||
transparentdraggableRightList.cpp \
|
transparentdraggableRightList.cpp \
|
||||||
|
|
@ -144,6 +145,7 @@ HEADERS += \
|
||||||
qmytreewidget.h \
|
qmytreewidget.h \
|
||||||
qtcommonclass.h \
|
qtcommonclass.h \
|
||||||
qtprojectwidgets.h \
|
qtprojectwidgets.h \
|
||||||
|
selectwelldialog.h \
|
||||||
totalTitleBar.h \
|
totalTitleBar.h \
|
||||||
transparentdraggableGuan.h \
|
transparentdraggableGuan.h \
|
||||||
transparentdraggableRightList.h \
|
transparentdraggableRightList.h \
|
||||||
|
|
@ -168,7 +170,8 @@ FORMS += \
|
||||||
mainwindowcurve.ui \
|
mainwindowcurve.ui \
|
||||||
mainwindowsplitter.ui \
|
mainwindowsplitter.ui \
|
||||||
newheaddialog.ui \
|
newheaddialog.ui \
|
||||||
qtprojectwidgets.ui
|
qtprojectwidgets.ui \
|
||||||
|
selectwelldialog.ui
|
||||||
|
|
||||||
INCLUDEPATH += ../include/ \
|
INCLUDEPATH += ../include/ \
|
||||||
../CallManage \
|
../CallManage \
|
||||||
|
|
|
||||||
|
|
@ -71,9 +71,12 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||||
|
|
||||||
initTitleBar(); //菜单栏
|
initTitleBar(); //菜单栏
|
||||||
initToolBar(); //工具栏
|
initToolBar(); //工具栏
|
||||||
|
initPluginTool(); //插件QAction
|
||||||
|
|
||||||
initProjectView(); //左侧-项目区 初始化在前
|
initProjectView(); //左侧-项目区 初始化在前
|
||||||
initWorkSpaceView(); //中间-工作区 初始化在后
|
initWorkSpaceView(); //中间-工作区 初始化在后
|
||||||
dockLayout();
|
dockLayout();
|
||||||
|
|
||||||
//
|
//
|
||||||
this->setStatusBar(::GetStatusBar());//状态栏
|
this->setStatusBar(::GetStatusBar());//状态栏
|
||||||
|
|
||||||
|
|
@ -243,6 +246,17 @@ void MainWindow::initToolBar()
|
||||||
// connect(m_loadAc, &QAction::triggered, this, &MainWindow::s_DrawLine);
|
// connect(m_loadAc, &QAction::triggered, this, &MainWindow::s_DrawLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//初始化插件QAction
|
||||||
|
void MainWindow::initPluginTool()
|
||||||
|
{
|
||||||
|
QList<QAction *> listTool = CallPlugin::getInstance()->getPluginActionList(this);
|
||||||
|
foreach (QAction *pAct, listTool)
|
||||||
|
{
|
||||||
|
ui->mainToolBar->addAction(pAct);
|
||||||
|
connect(pAct, &QAction::triggered, this, &MainWindow::slot_PluginActionFunc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//左侧
|
//左侧
|
||||||
void MainWindow::initProjectView()
|
void MainWindow::initProjectView()
|
||||||
{
|
{
|
||||||
|
|
@ -367,6 +381,34 @@ void MainWindow::s_SaveProject()
|
||||||
// emit CallManage::getInstance()->sig_testPlugin("hello");
|
// emit CallManage::getInstance()->sig_testPlugin("hello");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::slot_PluginActionFunc()
|
||||||
|
{
|
||||||
|
QAction* pAction = qobject_cast<QAction*>(sender());
|
||||||
|
if(pAction == nullptr)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (g_prjname == "")
|
||||||
|
{
|
||||||
|
QMessageBox::information(nullptr, "提示", "请先打开项目!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString strPluginName = pAction->property("PluginName").toString();
|
||||||
|
QWidget * pMyWidget = CallPlugin::getInstance()->getPluginWidget(strPluginName, (QWidget *)this);
|
||||||
|
if (pMyWidget != nullptr)
|
||||||
|
{
|
||||||
|
QJsonObject rootObject;
|
||||||
|
rootObject.insert("prjname", g_prjname);
|
||||||
|
//----------------------
|
||||||
|
QJsonDocument doc;
|
||||||
|
doc.setObject(rootObject);
|
||||||
|
|
||||||
|
CallPlugin::getInstance()->setPluginParams(strPluginName, doc.toJson(QJsonDocument::Compact));
|
||||||
|
m_centerWidgets->addTab(pMyWidget, pAction->text());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//收到插件消息
|
//收到插件消息
|
||||||
void MainWindow::s_PluginMsg(QString msg)
|
void MainWindow::s_PluginMsg(QString msg)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -65,6 +65,7 @@ public:
|
||||||
|
|
||||||
void initTitleBar(); //初始化菜单
|
void initTitleBar(); //初始化菜单
|
||||||
void initToolBar(); //初始化工具栏
|
void initToolBar(); //初始化工具栏
|
||||||
|
void initPluginTool(); //初始化插件QAction
|
||||||
void initProjectView(); //初始化左侧工程区
|
void initProjectView(); //初始化左侧工程区
|
||||||
void initWorkSpaceView(); //初始化工作区
|
void initWorkSpaceView(); //初始化工作区
|
||||||
void dockLayout(); //停靠
|
void dockLayout(); //停靠
|
||||||
|
|
@ -95,6 +96,8 @@ public slots:
|
||||||
void s_ShowWave(QString strSlfName, QString strName); //波列数据查看
|
void s_ShowWave(QString strSlfName, QString strName); //波列数据查看
|
||||||
void s_WelllogInformation(QString strSlfName);//编辑测井信息
|
void s_WelllogInformation(QString strSlfName);//编辑测井信息
|
||||||
|
|
||||||
|
void slot_PluginActionFunc();
|
||||||
|
|
||||||
//插件消息
|
//插件消息
|
||||||
void s_PluginMsg(QString msg);
|
void s_PluginMsg(QString msg);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
#include "LogModuleConsole.h"
|
#include "LogModuleConsole.h"
|
||||||
#include "DepPairs.h"
|
#include "DepPairs.h"
|
||||||
#include "mainwindowsplitter.h"
|
#include "mainwindowsplitter.h"
|
||||||
|
#include "selectwelldialog.h"
|
||||||
|
|
||||||
extern int g_iOneWidth; //道宽
|
extern int g_iOneWidth; //道宽
|
||||||
extern QString g_prjname;
|
extern QString g_prjname;
|
||||||
|
|
@ -23,6 +24,7 @@ extern QString g_prjname;
|
||||||
extern double g_dPixelPerCm;//每厘米像素数
|
extern double g_dPixelPerCm;//每厘米像素数
|
||||||
extern int g_iShow; //显示刻度
|
extern int g_iShow; //显示刻度
|
||||||
|
|
||||||
|
extern int g_SelectWellIndex;
|
||||||
//图头
|
//图头
|
||||||
//extern int g_iRows;
|
//extern int g_iRows;
|
||||||
//extern int g_iCols;
|
//extern int g_iCols;
|
||||||
|
|
@ -188,6 +190,7 @@ void MainWindowCurve::initMainToolBar()
|
||||||
QSize toolIconSize(18, 18);
|
QSize toolIconSize(18, 18);
|
||||||
ui->mainToolBar->setIconSize(toolIconSize); //设置工具栏图标大小
|
ui->mainToolBar->setIconSize(toolIconSize); //设置工具栏图标大小
|
||||||
|
|
||||||
|
QIcon selectWellIcon(::GetImagePath()+"icon/WellTops.png");
|
||||||
QIcon fixwellsectionHeaderIcon(::GetImagePath()+"icon/fixwellsectionHeader.png");
|
QIcon fixwellsectionHeaderIcon(::GetImagePath()+"icon/fixwellsectionHeader.png");
|
||||||
QIcon currtempliteIcon(::GetImagePath()+"icon/currtemplite.png");
|
QIcon currtempliteIcon(::GetImagePath()+"icon/currtemplite.png");
|
||||||
QIcon saveastemplateIcon(::GetImagePath()+"icon/saveastemplate.png");
|
QIcon saveastemplateIcon(::GetImagePath()+"icon/saveastemplate.png");
|
||||||
|
|
@ -200,6 +203,7 @@ void MainWindowCurve::initMainToolBar()
|
||||||
QIcon loadIcon(":/image/export.png");
|
QIcon loadIcon(":/image/export.png");
|
||||||
|
|
||||||
//Main工具栏
|
//Main工具栏
|
||||||
|
QAction* m_selectWellAc = nullptr; //选择井
|
||||||
QAction* m_fixwellsectionHeaderAc = nullptr; //锁头
|
QAction* m_fixwellsectionHeaderAc = nullptr; //锁头
|
||||||
QAction* m_currtempliteAc = nullptr; //加载图文件
|
QAction* m_currtempliteAc = nullptr; //加载图文件
|
||||||
QAction* m_saveastemplateAc = nullptr; //另存为图文件
|
QAction* m_saveastemplateAc = nullptr; //另存为图文件
|
||||||
|
|
@ -211,6 +215,7 @@ void MainWindowCurve::initMainToolBar()
|
||||||
// QAction* m_debugAc = nullptr; //
|
// QAction* m_debugAc = nullptr; //
|
||||||
// QAction* m_loadAc = nullptr; //加载
|
// QAction* m_loadAc = nullptr; //加载
|
||||||
|
|
||||||
|
m_selectWellAc = new QAction(selectWellIcon, "选择井", this);
|
||||||
m_fixwellsectionHeaderAc = new QAction(fixwellsectionHeaderIcon, "锁头", this);
|
m_fixwellsectionHeaderAc = new QAction(fixwellsectionHeaderIcon, "锁头", this);
|
||||||
m_currtempliteAc = new QAction(currtempliteIcon, "加载图文件", this);
|
m_currtempliteAc = new QAction(currtempliteIcon, "加载图文件", this);
|
||||||
m_saveastemplateAc = new QAction(saveastemplateIcon, "另存为图文件", this);
|
m_saveastemplateAc = new QAction(saveastemplateIcon, "另存为图文件", this);
|
||||||
|
|
@ -225,6 +230,7 @@ void MainWindowCurve::initMainToolBar()
|
||||||
ui->mainToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); //此种方式为文字显示在图标右侧
|
ui->mainToolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); //此种方式为文字显示在图标右侧
|
||||||
|
|
||||||
//add QAction to Widget.
|
//add QAction to Widget.
|
||||||
|
ui->mainToolBar->addAction(m_selectWellAc);
|
||||||
ui->mainToolBar->addAction(m_fixwellsectionHeaderAc);
|
ui->mainToolBar->addAction(m_fixwellsectionHeaderAc);
|
||||||
//ui->mainToolBar->addAction(m_currtempliteAc);
|
//ui->mainToolBar->addAction(m_currtempliteAc);
|
||||||
ui->mainToolBar->addAction(m_saveastemplateAc);
|
ui->mainToolBar->addAction(m_saveastemplateAc);
|
||||||
|
|
@ -237,6 +243,7 @@ void MainWindowCurve::initMainToolBar()
|
||||||
// ui->mainToolBar->addAction(m_loadAc);
|
// ui->mainToolBar->addAction(m_loadAc);
|
||||||
//ui->mainToolBar->addAction(m_openAc);
|
//ui->mainToolBar->addAction(m_openAc);
|
||||||
|
|
||||||
|
connect(m_selectWellAc, &QAction::triggered, this, &MainWindowCurve::s_selectWell);
|
||||||
connect(m_fixwellsectionHeaderAc, &QAction::triggered, this, &MainWindowCurve::s_showHeadTable);
|
connect(m_fixwellsectionHeaderAc, &QAction::triggered, this, &MainWindowCurve::s_showHeadTable);
|
||||||
connect(m_currtempliteAc, &QAction::triggered, this, &MainWindowCurve::s_currtemplite);
|
connect(m_currtempliteAc, &QAction::triggered, this, &MainWindowCurve::s_currtemplite);
|
||||||
connect(m_saveastemplateAc, &QAction::triggered, this, &MainWindowCurve::s_Save);
|
connect(m_saveastemplateAc, &QAction::triggered, this, &MainWindowCurve::s_Save);
|
||||||
|
|
@ -2318,6 +2325,65 @@ void MainWindowCurve::s_ModuleOpen()
|
||||||
|
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
//选择井
|
||||||
|
void MainWindowCurve::s_selectWell()
|
||||||
|
{
|
||||||
|
QStringList listSlf;
|
||||||
|
QStringList listWell;
|
||||||
|
|
||||||
|
//直方图,获取当前工程下的slf
|
||||||
|
QVector<QString> vecSlfList;
|
||||||
|
QVector<QString> vecWellList;
|
||||||
|
bool bRet = getAllSlf(g_prjname, vecSlfList, vecWellList);
|
||||||
|
if(bRet)
|
||||||
|
{
|
||||||
|
for(int i=0; i<vecWellList.size(); i++)
|
||||||
|
{
|
||||||
|
if(m_listWell.contains(vecWellList[i]))
|
||||||
|
{
|
||||||
|
//视图上存在的井,不可选
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
listWell.append(vecWellList[i]);
|
||||||
|
listSlf.append(vecSlfList[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(listWell.size()<=0)
|
||||||
|
{
|
||||||
|
QMessageBox::warning(this, "提示", "没有可选择井", "确定");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 创建对话框
|
||||||
|
SelectWellDialog *dlg = new SelectWellDialog(nullptr);
|
||||||
|
dlg->setInfo(listWell, listSlf);
|
||||||
|
//
|
||||||
|
dlg->setAttribute(Qt::WA_DeleteOnClose);//关闭时,自动删除窗口对象
|
||||||
|
int result = dlg->exec();//模态对话框
|
||||||
|
if (result == QDialog::Accepted) {
|
||||||
|
// 处理用户点击了确定按钮的逻辑
|
||||||
|
qDebug() << "Accepted=";
|
||||||
|
|
||||||
|
//井没创建,创建井+道+曲线
|
||||||
|
//新建井
|
||||||
|
s_NewWell(listWell[g_SelectWellIndex], listSlf[g_SelectWellIndex]);
|
||||||
|
//新建道
|
||||||
|
emit CallManage::getInstance()->sig_NewTrack(m_strUuid, listWell[g_SelectWellIndex], "", "", "");
|
||||||
|
}
|
||||||
|
else if (result == QDialog::Rejected) {
|
||||||
|
// 处理用户点击了取消按钮的逻辑
|
||||||
|
qDebug() << "Rejected=";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
// 处理其他情况的逻辑
|
||||||
|
qDebug() << "other=";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//显示/隐藏图头
|
//显示/隐藏图头
|
||||||
void MainWindowCurve::s_showHeadTable()
|
void MainWindowCurve::s_showHeadTable()
|
||||||
{
|
{
|
||||||
|
|
@ -2854,8 +2920,8 @@ void MainWindowCurve::s_NewSantuyibiao()
|
||||||
|
|
||||||
//选中道
|
//选中道
|
||||||
if(m_SelectTableItem.m_iTableType==2) {
|
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");
|
emit CallManage::getInstance()->sig_AddSantuyibiao(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "Santuyibiao");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3203,8 +3269,8 @@ void MainWindowCurve::s_NewJiegutext()
|
||||||
|
|
||||||
//选中道
|
//选中道
|
||||||
if(m_SelectTableItem.m_iTableType==2) {
|
if(m_SelectTableItem.m_iTableType==2) {
|
||||||
//新建表格曲线
|
//气测/FMT/射孔/文本
|
||||||
emit CallManage::getInstance()->sig_AddTableLine(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "IMAGE_DATA");
|
emit CallManage::getInstance()->sig_AddJiegutext(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "GASLOG");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3225,8 +3291,8 @@ void MainWindowCurve::s_NewLogface()
|
||||||
|
|
||||||
//选中道
|
//选中道
|
||||||
if(m_SelectTableItem.m_iTableType==2) {
|
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");
|
emit CallManage::getInstance()->sig_AddLogface(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "LITHA");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3258,8 +3324,8 @@ void MainWindowCurve::s_NewTubingstring()
|
||||||
|
|
||||||
//选中道
|
//选中道
|
||||||
if(m_SelectTableItem.m_iTableType==2) {
|
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");
|
emit CallManage::getInstance()->sig_AddTubingstring(m_strUuid, m_SelectTableItem.m_strSlfName, m_SelectTableItem.m_strWellName, m_SelectTableItem.m_strTrackName, "TUBTOOLS");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4386,12 +4452,12 @@ void MainWindowCurve::slotContextMenu(QPoint pos)
|
||||||
if(iCurrentRow == 0)
|
if(iCurrentRow == 0)
|
||||||
{
|
{
|
||||||
QMenu menu(ui->tableWidget_2);
|
QMenu menu(ui->tableWidget_2);
|
||||||
menu.addAction(QIcon(::GetImagePath() + "antialiasing.png"), "删除当前测井图", this, &MainWindowCurve::slotDeleteSelectTrack);
|
menu.addAction(QIcon(::GetImagePath() + "antialiasing.png"), "删除当前测井图", this, &MainWindowCurve::slotDeleteSelectWell);
|
||||||
menu.exec(ui->tableWidget_2->mapToGlobal(pos));
|
menu.exec(ui->tableWidget_2->mapToGlobal(pos));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindowCurve::slotDeleteSelectTrack()
|
void MainWindowCurve::slotDeleteSelectWell()
|
||||||
{
|
{
|
||||||
int colCount = ui->tableWidget_2->columnCount();
|
int colCount = ui->tableWidget_2->columnCount();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -164,7 +164,7 @@ public slots:
|
||||||
|
|
||||||
//右键菜单响应函数
|
//右键菜单响应函数
|
||||||
void slotContextMenu(QPoint pos);
|
void slotContextMenu(QPoint pos);
|
||||||
void slotDeleteSelectTrack();
|
void slotDeleteSelectWell();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void s_NewWell(QString strWellName, QString strSlfName);//新建井
|
void s_NewWell(QString strWellName, QString strSlfName);//新建井
|
||||||
|
|
@ -236,6 +236,7 @@ public slots:
|
||||||
void s_EShiftDepth(QString strSlfName, QString strLineName, int count, QList<double> left_Low_List, QList<double> right_Hight_List);
|
void s_EShiftDepth(QString strSlfName, QString strLineName, int count, QList<double> left_Low_List, QList<double> right_Hight_List);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
void s_selectWell(); //选择井
|
||||||
void s_showHeadTable(); //显示/隐藏图头
|
void s_showHeadTable(); //显示/隐藏图头
|
||||||
void s_currtemplite(); //加载图文件
|
void s_currtemplite(); //加载图文件
|
||||||
void s_Save(); //保存图文件
|
void s_Save(); //保存图文件
|
||||||
|
|
|
||||||
|
|
@ -1354,7 +1354,12 @@ void QMyCustomPlot::contextMenuEvent(QContextMenuEvent *event)
|
||||||
pSubMenu->addAction(QIcon(::GetImagePath() + "icon/OneSideWallCore.png"), str, this, &QMyCustomPlot::addItem_Tubing);
|
pSubMenu->addAction(QIcon(::GetImagePath() + "icon/OneSideWallCore.png"), str, this, &QMyCustomPlot::addItem_Tubing);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//menu.addAction(QIcon(::GetImagePath() + "icon/OneSideWallCore.png"), "添加偏配", this, &QMyCustomPlot::addItem_Tubing);
|
menu.addSeparator();
|
||||||
|
menu.addAction(QIcon(::GetImagePath() + "icon/CopyCoreTxt.png"), "从剪切板文本数据粘贴", this, &QMyCustomPlot::addItems_Tubing);
|
||||||
|
menu.addAction(QIcon(::GetImagePath() + "icon/ClearSelectCore.png"), "取消选中", this, &QMyCustomPlot::ClearSelectItems);
|
||||||
|
menu.addAction(QIcon(::GetImagePath() + "icon/Delete.png"), "全部清空", this, &QMyCustomPlot::DeleteItems_Tubing);
|
||||||
|
menu.addAction(QIcon(::GetImagePath() + "icon/CopyCoreTxt.png"), "刷新数据", this, &QMyCustomPlot::RefreshItems_Tubing);
|
||||||
|
|
||||||
menu.exec(event->globalPos());
|
menu.exec(event->globalPos());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -4704,6 +4709,8 @@ void QMyCustomPlot::s_changeDepthProperty(QVariantList vlist)
|
||||||
this->replot();
|
this->replot();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//校深线段
|
||||||
void QMyCustomPlot::addLineToPlot(double left_Low, double right_Hight, const QString strText, QColor crColor)
|
void QMyCustomPlot::addLineToPlot(double left_Low, double right_Hight, const QString strText, QColor crColor)
|
||||||
{
|
{
|
||||||
QtCommonClass *qtCommon = new QtCommonClass(this);
|
QtCommonClass *qtCommon = new QtCommonClass(this);
|
||||||
|
|
@ -8373,6 +8380,28 @@ void QMyCustomPlot::addItem_Tubing()
|
||||||
drawOne_Tubing(result);
|
drawOne_Tubing(result);
|
||||||
//保存
|
//保存
|
||||||
SaveToSLF_Tubing();
|
SaveToSLF_Tubing();
|
||||||
|
|
||||||
|
|
||||||
|
if(!mRect_Tubing || !mRect2_Tubing)
|
||||||
|
{
|
||||||
|
//绘制结构
|
||||||
|
DrawStruct();
|
||||||
|
}
|
||||||
|
|
||||||
|
//检查套管组件名称,是否需要更新套管图形
|
||||||
|
//画管柱
|
||||||
|
if(str == "管底部" ||
|
||||||
|
str == "油管深" ||
|
||||||
|
str == "喇叭口" ||
|
||||||
|
str == "剌叭口")
|
||||||
|
{
|
||||||
|
//组件改变后,重绘管柱
|
||||||
|
LoadFromSLF_ReDrawTubing(m_strSlfName, m_strLineName);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
//刷新
|
||||||
|
this->replot();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -8602,6 +8631,12 @@ bool QMyCustomPlot::LoadFromSLF_Tubing(QString strSlfName, QString csCurve)
|
||||||
m_pResultList_Tubing.clear();
|
m_pResultList_Tubing.clear();
|
||||||
|
|
||||||
cclimgpath_Tubing=GetSymbolDir()+"\\管柱组件\\";
|
cclimgpath_Tubing=GetSymbolDir()+"\\管柱组件\\";
|
||||||
|
//先删除
|
||||||
|
if(mPixmap_Tubing)
|
||||||
|
{
|
||||||
|
removeItem(mPixmap_Tubing);
|
||||||
|
mPixmap_Tubing = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
Slf_JIEGUPOS *m_pResult=NULL;
|
Slf_JIEGUPOS *m_pResult=NULL;
|
||||||
CMemRdWt *logio=new CMemRdWt();
|
CMemRdWt *logio=new CMemRdWt();
|
||||||
|
|
@ -8734,6 +8769,77 @@ void QMyCustomPlot::drawOne_Tubing(Slf_JIEGUPOS result)
|
||||||
this->addGuanToPlot(newLower, newUpper, cclimgfile, in, false);
|
this->addGuanToPlot(newLower, newUpper, cclimgfile, in, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool QMyCustomPlot::LoadFromSLF_ReDrawTubing(QString strSlfName, QString csCurve)
|
||||||
|
{
|
||||||
|
cclimgpath_Tubing=GetSymbolDir()+"\\管柱组件\\";
|
||||||
|
|
||||||
|
Slf_JIEGUPOS *m_pResult=NULL;
|
||||||
|
CMemRdWt *logio=new CMemRdWt();
|
||||||
|
if(strSlfName==""||!logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead))
|
||||||
|
{
|
||||||
|
delete logio;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int iIndex=logio->OpenTable(csCurve.toStdString().c_str());
|
||||||
|
if(iIndex<0)
|
||||||
|
{
|
||||||
|
delete logio;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
if(iIndex>-1) {
|
||||||
|
int count=logio->GetTableRecordCount(iIndex);
|
||||||
|
//int fieldnum=logio->GetTableFieldCount(iIndex);
|
||||||
|
int len=logio->GetTableRecordLength(iIndex);
|
||||||
|
m_pResult=(Slf_JIEGUPOS *)new char[len+1];
|
||||||
|
char buf[200];
|
||||||
|
logio->IsChange=true;
|
||||||
|
|
||||||
|
bool bDrawGuanzhu = false;
|
||||||
|
for(int i=0;i<count;i++)
|
||||||
|
{
|
||||||
|
memset(m_pResult,0,sizeof(len));
|
||||||
|
logio->ReadTable(iIndex,i+1,m_pResult);
|
||||||
|
|
||||||
|
Slf_JIEGUPOS result;
|
||||||
|
result.Depth=m_pResult->Depth;
|
||||||
|
result.Order=m_pResult->Order;
|
||||||
|
result.Number=m_pResult->Number;
|
||||||
|
|
||||||
|
//
|
||||||
|
double depth=m_pResult->Depth;
|
||||||
|
int Order=m_pResult->Order;
|
||||||
|
int Number=m_pResult->Number;
|
||||||
|
|
||||||
|
if(bDrawGuanzhu == false)
|
||||||
|
{
|
||||||
|
//还没有画管柱
|
||||||
|
if(Number == zoneOrder_Tubing.value("管底部").toInt()||
|
||||||
|
Number == zoneOrder_Tubing.value("油管深").toInt()||
|
||||||
|
Number == zoneOrder_Tubing.value("喇叭口").toInt()||
|
||||||
|
Number == zoneOrder_Tubing.value("剌叭口").toInt())
|
||||||
|
{
|
||||||
|
bDrawGuanzhu = true;//画管柱
|
||||||
|
m_depth_Tubing = depth;//管柱深度
|
||||||
|
|
||||||
|
//绘制管柱
|
||||||
|
DrawTubing();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
logio->CloseTable(iIndex);
|
||||||
|
delete m_pResult;
|
||||||
|
}
|
||||||
|
delete logio;
|
||||||
|
//统一刷新
|
||||||
|
this->replot();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool QMyCustomPlot::SaveToSLF_Tubing()
|
bool QMyCustomPlot::SaveToSLF_Tubing()
|
||||||
{
|
{
|
||||||
static int isrun=false;
|
static int isrun=false;
|
||||||
|
|
@ -8837,3 +8943,301 @@ bool QMyCustomPlot::SaveToSLF_Tubing()
|
||||||
isrun=false;
|
isrun=false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//检查套管组件名称,是否需要更新套管图形
|
||||||
|
bool QMyCustomPlot::checkTubingName(QString m_Result)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
QString name,itemName;
|
||||||
|
m_Result.replace("\\","/");
|
||||||
|
int l=m_Result.lastIndexOf("/");
|
||||||
|
if(l>-1) name=m_Result.mid(l+1);
|
||||||
|
l=name.indexOf(".");
|
||||||
|
name=name.left(l);
|
||||||
|
itemName=name;
|
||||||
|
//画管柱
|
||||||
|
if(itemName == "管底部" ||
|
||||||
|
itemName == "油管深" ||
|
||||||
|
itemName == "喇叭口" ||
|
||||||
|
itemName == "剌叭口")
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//粘贴数据成取心
|
||||||
|
void QMyCustomPlot::addItems_Tubing()
|
||||||
|
{
|
||||||
|
int hasNO=0;
|
||||||
|
int isSK=0;
|
||||||
|
bool bReDraw = false;
|
||||||
|
{
|
||||||
|
QClipboard *clipboard = QApplication::clipboard(); //获取系统剪贴板指针
|
||||||
|
QString originalTubingstring = clipboard->text(); //获取剪贴板上文本信息
|
||||||
|
int isspace=originalTubingstring.indexOf(" ");
|
||||||
|
int istab=originalTubingstring.indexOf("\t");
|
||||||
|
int isd=originalTubingstring.indexOf(",");
|
||||||
|
|
||||||
|
if((istab>-1|isd>-1)&&isspace>-1)
|
||||||
|
{
|
||||||
|
QMessageBox::information(NULL,"提示","\",\"或制表符与空格键并存,自动分解可能有误!\n建议用单一符号风格!");
|
||||||
|
}
|
||||||
|
originalTubingstring.replace("\t"," ");
|
||||||
|
originalTubingstring.replace(","," ");
|
||||||
|
originalTubingstring.replace("\r\n","\n");
|
||||||
|
originalTubingstring.replace("\r","\n");
|
||||||
|
QStringList line=originalTubingstring.split("\n");
|
||||||
|
line.removeAll("");
|
||||||
|
if(line.size()<1) return;
|
||||||
|
QString TableName;
|
||||||
|
QStringList temp1;
|
||||||
|
|
||||||
|
if(line.size()>1) {
|
||||||
|
temp1=line[0].split(" ");
|
||||||
|
temp1.removeAll("");
|
||||||
|
if(temp1.size()==1&&temp1.at(0).length()&&!temp1.at(0).at(0).isDigit()) {
|
||||||
|
TableName=temp1.at(0);
|
||||||
|
line.removeAt(0);
|
||||||
|
//CoreObj->SetName(TableName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
QString ss = m_strSlfName;
|
||||||
|
CMemRdWt *logio=new CMemRdWt();
|
||||||
|
if(ss==""||!logio->Open(ss.toStdString().c_str(),CSlfIO::modeReadWrite))
|
||||||
|
{
|
||||||
|
delete logio;
|
||||||
|
QMessageBox::information(NULL,"提示","SLF文件打开失败,请检查!!",QMessageBox::Yes);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
int k=0;
|
||||||
|
QStringList coredat=line[0].split(" ");
|
||||||
|
if((istab==-1||isd==-1)&&isspace>=0) coredat.removeAll("");
|
||||||
|
int iIndex=logio->OpenTable(m_strLineName.toStdString().c_str());
|
||||||
|
if(iIndex>=0) {
|
||||||
|
int count=logio->GetTableFieldCount(iIndex);
|
||||||
|
if(count!=coredat.size()) {
|
||||||
|
logio->DiscardObject(m_strLineName.toStdString().c_str());
|
||||||
|
}
|
||||||
|
iIndex=-1;
|
||||||
|
}
|
||||||
|
bool isfirst=false;
|
||||||
|
if(iIndex<0)
|
||||||
|
{
|
||||||
|
QString name,Length,type,temp;
|
||||||
|
bool ret=false;
|
||||||
|
QStringList css;
|
||||||
|
if(coredat.size()&&!coredat[0].isEmpty()) {
|
||||||
|
int NUM=0;
|
||||||
|
if(!coredat.at(0).at(0).isDigit()){
|
||||||
|
if(coredat.at(0).indexOf("NO",0,Qt::CaseInsensitive)<0
|
||||||
|
&&coredat.at(0).indexOf("序号")<0
|
||||||
|
&&coredat.at(0).indexOf("INDEX")<0
|
||||||
|
&&coredat.at(0).indexOf("ORDER")<0
|
||||||
|
)
|
||||||
|
{
|
||||||
|
coredat.insert(0,"NO");
|
||||||
|
hasNO=true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
if(hasNO) coredat.insert(0,QString::number(1));
|
||||||
|
}
|
||||||
|
if(m_strLineName=="SK"&&(coredat.size()==4||coredat.size()==5))
|
||||||
|
{
|
||||||
|
isSK=1;
|
||||||
|
name="NO,SDEP,EDEP,ZONE,RESULT,THICK,TT,ZONENO,LAYER,DEST";
|
||||||
|
Length="4,4,4,8,4,4,4,64,64,64";
|
||||||
|
type= "1,4,4,6,1,4,4,6,6,6";
|
||||||
|
temp= "0,0,0,0,1,0,0,0,0,0";
|
||||||
|
NUM=10;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for(int j=0;j<coredat.size();j++)
|
||||||
|
{
|
||||||
|
if(j==0) name+="NO";
|
||||||
|
//else if(j==1) name+="SDEP";
|
||||||
|
//else if(j==2)name+="EDEP";
|
||||||
|
if(j==0){
|
||||||
|
Length+="4";
|
||||||
|
type+="1";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
bool isdi=false;
|
||||||
|
if(css.size()>j)
|
||||||
|
{
|
||||||
|
for (int k=0;k<css.at(j).size();k++)
|
||||||
|
{
|
||||||
|
if(!css.at(j).at(k).isDigit()&&css.at(j).at(k)!='.'&&css.at(j).at(k)!='-'){
|
||||||
|
isdi=true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(isdi) {
|
||||||
|
type+="6";
|
||||||
|
Length+="64";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
type+="4";
|
||||||
|
Length+="4";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(name.indexOf("Number",0,Qt::CaseInsensitive)>-1) temp+="8";
|
||||||
|
else temp+"0";
|
||||||
|
if(j!=coredat.size())
|
||||||
|
{
|
||||||
|
name+=",";
|
||||||
|
Length+=",";
|
||||||
|
type+=",";
|
||||||
|
temp+=",";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!coredat.at(0).at(0).isDigit()&&coredat.at(0).at(0)!='.'&&coredat.at(0).at(0)!='-') name=coredat.join(",");
|
||||||
|
NUM=coredat.size();
|
||||||
|
}
|
||||||
|
iIndex=logio->Open_Set_Table(m_strLineName.toStdString().c_str(),0,NUM,
|
||||||
|
(char*)name.toStdString().c_str(),
|
||||||
|
(char*)Length.toStdString().c_str(),//字段长度
|
||||||
|
(char*)type.toStdString().c_str(),//字段类型
|
||||||
|
(char*)temp.toStdString().c_str());//字段备注,1-枚举
|
||||||
|
isfirst=true;
|
||||||
|
logio->SetTableRecordCount(iIndex,0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
int count=logio->GetTableFieldCount(iIndex);
|
||||||
|
Slf_TABLE_FIELD*pField=new Slf_TABLE_FIELD[logio->GetTableFieldCount(iIndex)];
|
||||||
|
logio->GetTableFieldInfo(iIndex,pField);
|
||||||
|
float yy;
|
||||||
|
for(int i=0;i<line.size();i++)
|
||||||
|
{
|
||||||
|
coredat=line[i].split(" ");
|
||||||
|
if((istab==-1||isd==-1)&&isspace>=0) coredat.removeAll("");
|
||||||
|
if(coredat.size()<1) continue;
|
||||||
|
if(coredat[0].isEmpty()) continue;
|
||||||
|
if(coredat.size()<2)continue;
|
||||||
|
if(!coredat.at(0).at(0).isDigit()) continue;
|
||||||
|
if(hasNO) coredat.insert(0,QString::number(0));
|
||||||
|
// for(int j=0;j<coredat.size();j++)
|
||||||
|
// {
|
||||||
|
// if(isSK&&(coredat.size()==5||coredat.size()==6))
|
||||||
|
// {
|
||||||
|
// if(j<3){
|
||||||
|
// yy=coredat[j].toFloat();
|
||||||
|
// logio->SetTableFieldData(iIndex,j,(char*)&yy,k+1);
|
||||||
|
// }
|
||||||
|
// else if(j==3) logio->SetTableFieldData(iIndex,7,(char*)coredat[j].toStdString().c_str(),k+1);
|
||||||
|
// else if(j==4) logio->SetTableFieldData(iIndex,8,(char*)coredat[j].toStdString().c_str(),k+1);
|
||||||
|
// else if(j==5) logio->SetTableFieldData(iIndex,9,(char*)coredat[j].toStdString().c_str(),k+1);
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// if(pField[j].RepCode==6) {
|
||||||
|
// logio->SetTableFieldData(iIndex,j,(char*)coredat[j].toStdString().c_str(),k+1);
|
||||||
|
// }
|
||||||
|
// else {
|
||||||
|
// yy=coredat[j].toFloat();
|
||||||
|
// logio->SetTableFieldData(iIndex,j,(char*)&yy,k+1);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// k++;
|
||||||
|
//AddItem(coredat);
|
||||||
|
//
|
||||||
|
double Depth = coredat[1].toDouble();
|
||||||
|
int Number = coredat[2].toDouble();
|
||||||
|
Slf_JIEGUPOS result;
|
||||||
|
result.Depth = Depth;
|
||||||
|
result.Order = 0;
|
||||||
|
result.Number = Number;
|
||||||
|
//
|
||||||
|
drawOne_Tubing(result);
|
||||||
|
|
||||||
|
//还没有画管柱
|
||||||
|
if(Number == zoneOrder_Tubing.value("管底部").toInt()||
|
||||||
|
Number == zoneOrder_Tubing.value("油管深").toInt()||
|
||||||
|
Number == zoneOrder_Tubing.value("喇叭口").toInt()||
|
||||||
|
Number == zoneOrder_Tubing.value("剌叭口").toInt())
|
||||||
|
{
|
||||||
|
bReDraw = true;//重画管柱
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delete logio;
|
||||||
|
delete []pField;
|
||||||
|
|
||||||
|
if(isfirst)
|
||||||
|
{
|
||||||
|
AddTableToWellRound();
|
||||||
|
//绘制结构
|
||||||
|
DrawStruct();
|
||||||
|
}
|
||||||
|
|
||||||
|
//保存
|
||||||
|
SaveToSLF_Tubing();
|
||||||
|
|
||||||
|
if(bReDraw)
|
||||||
|
{
|
||||||
|
//组件改变后,重绘管柱
|
||||||
|
LoadFromSLF_ReDrawTubing(m_strSlfName, m_strLineName);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//刷新
|
||||||
|
this->replot();
|
||||||
|
}
|
||||||
|
|
||||||
|
//属性清空
|
||||||
|
PropertyService()->InitCurrentViewInfo();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//全部清空
|
||||||
|
void QMyCustomPlot::DeleteItems_Tubing()
|
||||||
|
{
|
||||||
|
if(QMessageBox::information(NULL,QObject::tr("提示"),QObject::tr("该功能将清除当前组件展示的全部信息,清除后无法恢复,但会备份到对应的\"_BAK\"中,确定清除吗?"),QMessageBox::Yes|QMessageBox::No)!=QMessageBox::Yes) return;
|
||||||
|
QString obj=m_strLineName + "BAK";
|
||||||
|
CopyToSLFFile(m_strSlfName, false, (char *)obj.toStdString().c_str());
|
||||||
|
AddTableToWellRound();
|
||||||
|
|
||||||
|
//删除对象
|
||||||
|
TransparentDraggableGuan *pDraggableRect =NULL;
|
||||||
|
QMap<QString,QObject *>::Iterator it = m_mapDraggable_Guan.begin();
|
||||||
|
while( it != m_mapDraggable_Guan.end() )
|
||||||
|
{
|
||||||
|
pDraggableRect = (TransparentDraggableGuan*)it.value();
|
||||||
|
it++;
|
||||||
|
pDraggableRect->deleteRect();
|
||||||
|
}
|
||||||
|
|
||||||
|
//刷新
|
||||||
|
//this->replot();
|
||||||
|
|
||||||
|
//保存
|
||||||
|
SaveToSLF_Tubing();
|
||||||
|
|
||||||
|
//重新加载
|
||||||
|
LoadFromSLF_Tubing(m_strSlfName, m_strLineName);
|
||||||
|
|
||||||
|
//属性清空
|
||||||
|
PropertyService()->InitCurrentViewInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
//刷新数据
|
||||||
|
void QMyCustomPlot::RefreshItems_Tubing()
|
||||||
|
{
|
||||||
|
//删除对象
|
||||||
|
TransparentDraggableGuan *pDraggableRect =NULL;
|
||||||
|
QMap<QString,QObject *>::Iterator it = m_mapDraggable_Guan.begin();
|
||||||
|
while( it != m_mapDraggable_Guan.end() )
|
||||||
|
{
|
||||||
|
pDraggableRect = (TransparentDraggableGuan*)it.value();
|
||||||
|
it++;
|
||||||
|
pDraggableRect->deleteRect();
|
||||||
|
}
|
||||||
|
|
||||||
|
//重新加载
|
||||||
|
LoadFromSLF_Tubing(m_strSlfName, m_strLineName);
|
||||||
|
//属性清空
|
||||||
|
PropertyService()->InitCurrentViewInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -299,6 +299,10 @@ public:
|
||||||
void DrawStruct();
|
void DrawStruct();
|
||||||
//绘制管柱
|
//绘制管柱
|
||||||
void DrawTubing();
|
void DrawTubing();
|
||||||
|
//组件改变后,重绘管柱
|
||||||
|
bool LoadFromSLF_ReDrawTubing(QString strSlfName, QString csCurve);
|
||||||
|
//检查套管组件名称,是否需要更新套管图形
|
||||||
|
bool checkTubingName(QString m_Result);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void slot_time();
|
void slot_time();
|
||||||
|
|
@ -345,7 +349,8 @@ public:
|
||||||
|
|
||||||
//套管组件
|
//套管组件
|
||||||
void addGuanToPlot(double left_Low, double right_Hight, const QString imagePath, float in, bool bRefresh=true);
|
void addGuanToPlot(double left_Low, double right_Hight, const QString imagePath, float in, bool bRefresh=true);
|
||||||
//
|
|
||||||
|
//校深线段
|
||||||
void addLineToPlot(double left_Low, double right_Hight, const QString strText, QColor crColor=QColor(255, 255, 255, 80));
|
void addLineToPlot(double left_Low, double right_Hight, const QString strText, QColor crColor=QColor(255, 255, 255, 80));
|
||||||
|
|
||||||
//框选并编辑曲线
|
//框选并编辑曲线
|
||||||
|
|
@ -473,7 +478,9 @@ public slots:
|
||||||
|
|
||||||
//右键--套管组件
|
//右键--套管组件
|
||||||
void addItem_Tubing(); //添加套管组件
|
void addItem_Tubing(); //添加套管组件
|
||||||
//void RefreshItems_Tubing(); //刷新数据
|
void addItems_Tubing(); //从剪切板文本数据粘贴
|
||||||
|
void DeleteItems_Tubing();//全部清空
|
||||||
|
void RefreshItems_Tubing(); //刷新数据
|
||||||
|
|
||||||
//右键--解释结论
|
//右键--解释结论
|
||||||
void onOpenEditResult();
|
void onOpenEditResult();
|
||||||
|
|
|
||||||
74
logPlus/selectwelldialog.cpp
Normal file
74
logPlus/selectwelldialog.cpp
Normal file
|
|
@ -0,0 +1,74 @@
|
||||||
|
#include "selectwelldialog.h"
|
||||||
|
#include "ui_selectwelldialog.h"
|
||||||
|
#include <QFile>
|
||||||
|
#include <QTextStream>
|
||||||
|
|
||||||
|
int g_SelectWellIndex = 0;
|
||||||
|
|
||||||
|
SelectWellDialog::SelectWellDialog(QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::SelectWellDialog)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
loadStyle(":/qrc/qss/flatgray.css");
|
||||||
|
|
||||||
|
//
|
||||||
|
connect(ui->ok, SIGNAL(clicked()), this, SLOT(slotOkClicked()));
|
||||||
|
connect(ui->cancel, SIGNAL(clicked()), this, SLOT(slotCancelClicked()));
|
||||||
|
}
|
||||||
|
|
||||||
|
SelectWellDialog::~SelectWellDialog()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void SelectWellDialog::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 SelectWellDialog::setInfo(QStringList listWell, QStringList listSlf)
|
||||||
|
{
|
||||||
|
for(int i=0; i<listWell.size(); i++)
|
||||||
|
{
|
||||||
|
ui->comboBox->addItem(listWell[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void SelectWellDialog::slotOkClicked()
|
||||||
|
{
|
||||||
|
g_SelectWellIndex = ui->comboBox->currentIndex();
|
||||||
|
|
||||||
|
//关闭
|
||||||
|
accept(); // 让 QDialog::exec() 返回 QDialog::Accepted
|
||||||
|
//QDialog::close();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void SelectWellDialog::slotCancelClicked()
|
||||||
|
{
|
||||||
|
reject(); // 让 QDialog::exec() 返回 QDialog::Rejected
|
||||||
|
//QDialog::close();
|
||||||
|
}
|
||||||
30
logPlus/selectwelldialog.h
Normal file
30
logPlus/selectwelldialog.h
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
#ifndef SELECTWELLDIALOG_H
|
||||||
|
#define SELECTWELLDIALOG_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class SelectWellDialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
class SelectWellDialog : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit SelectWellDialog(QWidget *parent = nullptr);
|
||||||
|
~SelectWellDialog();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::SelectWellDialog *ui;
|
||||||
|
|
||||||
|
public:
|
||||||
|
void loadStyle(const QString &qssFile);
|
||||||
|
void setInfo(QStringList listWell, QStringList listSlf);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void slotOkClicked();
|
||||||
|
void slotCancelClicked();
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SELECTWELLDIALOG_H
|
||||||
70
logPlus/selectwelldialog.ui
Normal file
70
logPlus/selectwelldialog.ui
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>SelectWellDialog</class>
|
||||||
|
<widget class="QDialog" name="SelectWellDialog">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>300</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>选择井</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,2">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>选择井:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QComboBox" name="comboBox"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="ok">
|
||||||
|
<property name="text">
|
||||||
|
<string>选择</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="cancel">
|
||||||
|
<property name="text">
|
||||||
|
<string>取消</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
|
|
@ -316,6 +316,14 @@ void TransparentDraggableGuan::setItemDepthOffset()
|
||||||
//保存
|
//保存
|
||||||
mPlot->SaveToSLF_Tubing();
|
mPlot->SaveToSLF_Tubing();
|
||||||
|
|
||||||
|
//检查套管组件名称,是否需要更新套管图形
|
||||||
|
bool bReDraw = mPlot->checkTubingName(m_Result);
|
||||||
|
if(bReDraw)
|
||||||
|
{
|
||||||
|
//组件改变后,重绘管柱
|
||||||
|
mPlot->LoadFromSLF_ReDrawTubing(mPlot->m_strSlfName, mPlot->m_strLineName);
|
||||||
|
}
|
||||||
|
|
||||||
//属性清空
|
//属性清空
|
||||||
PropertyService()->InitCurrentViewInfo();
|
PropertyService()->InitCurrentViewInfo();
|
||||||
|
|
||||||
|
|
@ -406,6 +414,13 @@ void TransparentDraggableGuan::onDelRect()
|
||||||
mPlot->replot();
|
mPlot->replot();
|
||||||
//保存
|
//保存
|
||||||
mPlot->SaveToSLF_Tubing();
|
mPlot->SaveToSLF_Tubing();
|
||||||
|
//检查套管组件名称,是否需要更新套管图形
|
||||||
|
bool bReDraw = mPlot->checkTubingName(m_Result);
|
||||||
|
if(bReDraw)
|
||||||
|
{
|
||||||
|
//组件改变后,重绘管柱
|
||||||
|
mPlot->LoadFromSLF_ReDrawTubing(mPlot->m_strSlfName, mPlot->m_strLineName);
|
||||||
|
}
|
||||||
//属性清空
|
//属性清空
|
||||||
PropertyService()->InitCurrentViewInfo();
|
PropertyService()->InitCurrentViewInfo();
|
||||||
}
|
}
|
||||||
|
|
@ -606,6 +621,7 @@ void TransparentDraggableGuan::onMouseMove(QMouseEvent *event)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TransparentDraggableGuan::onMouseRelease(QMouseEvent *event)
|
void TransparentDraggableGuan::onMouseRelease(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
if(event->button() == Qt::LeftButton && mDragMode != DragNone) {
|
if(event->button() == Qt::LeftButton && mDragMode != DragNone) {
|
||||||
|
|
@ -619,6 +635,13 @@ void TransparentDraggableGuan::onMouseRelease(QMouseEvent *event)
|
||||||
{
|
{
|
||||||
//保存
|
//保存
|
||||||
mPlot->SaveToSLF_Tubing();
|
mPlot->SaveToSLF_Tubing();
|
||||||
|
//检查套管组件名称,是否需要更新套管图形
|
||||||
|
bool bReDraw = mPlot->checkTubingName(m_Result);
|
||||||
|
if(bReDraw)
|
||||||
|
{
|
||||||
|
//组件改变后,重绘管柱
|
||||||
|
mPlot->LoadFromSLF_ReDrawTubing(mPlot->m_strSlfName, mPlot->m_strLineName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//取消所有选中单元格
|
//取消所有选中单元格
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ public:
|
||||||
//设置外径长
|
//设置外径长
|
||||||
void setOin(float in);
|
void setOin(float in);
|
||||||
|
|
||||||
//设置解释结论
|
//设置套管组件
|
||||||
void setResult(QString filePath);
|
void setResult(QString filePath);
|
||||||
void drawResult(double left_Low, double right_Hight, double lY1, double lY2);
|
void drawResult(double left_Low, double right_Hight, double lY1, double lY2);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user