This commit is contained in:
DESKTOP-450PEFP\mainc 2026-03-11 14:23:56 +08:00
commit ea34409a5f
34 changed files with 6337 additions and 160 deletions

View File

@ -0,0 +1,29 @@
/**
* @file CBaseDialog.h
* @date July 2, 2014
* @auto zhangjie
*/
#ifndef CBaseDialog_H
#define CBaseDialog_H
#include <QDialog.h>
#include "OSGFramework.h"
#pragma warning( push ,0)
#pragma warning( pop )
class OSGFRAMEWORK_EXPORT CBaseDialog : public QDialog
{
Q_OBJECT
public:
CBaseDialog(QWidget *parent = 0, Qt::WindowFlags flags = 0)
:QDialog(parent, flags)
{
};
~CBaseDialog(void)
{
};
virtual void ReFreshWindow(int type=0)
{
}
};
#endif /* PAITABLEWIDGET_H_ */

View File

@ -0,0 +1,10 @@
#ifdef _WIN32
#ifdef OSGWELLLOGUI_LIB
#define EDITPLOTHEADER_EXPORT __declspec(dllexport)
#else
#define EDITPLOTHEADER_EXPORT __declspec(dllimport)
#endif
#else
#define EDITPLOTHEADER_EXPORT
#endif

View File

@ -0,0 +1,73 @@
#ifndef WELLLOGINFORMATION_H
#define WELLLOGINFORMATION_H
//using namespace Ui;
#include <QWidget>
#include "BaseDialog.h"
#include "EditPlotHeader.h"
#include <QButtonGroup>
#include "ObjWelllogRound.h"
#pragma execution_character_set("utf-8")
using namespace pai;
using namespace pai::datamodel;
namespace Ui
{
class WellLogInformationClass;
}
namespace pai
{
namespace gui
{
//class CustomLineEdit;
class EDITPLOTHEADER_EXPORT WellLogInformation : public /*CBaseDialog*/ QDialog
{
Q_OBJECT
public:
WellLogInformation(QWidget *parent = 0, Qt::WindowFlags flags = 0);
~WellLogInformation();
void SetWelllogRound(CObjWelllogRound*);
CObjWelllogRound* GetWelllogRound();
int CreateTable(CLogIO *);
protected:
//bool eventFilter(QObject * pObject, QEvent * pEvent) override;
private slots:
void OnSave();
void OnCAddCurve();
void OnSAddCurve();
void OnCDeleteCurve();
void OnSDeleteCurve();
void OnCalcTemp();
private:
void ReadWellP(QString szText,QLineEdit* pStart,QLineEdit* pEnd);
void ReadCustomWell(const Slf_FILE_MESSAGE& rMessage);
void ReadCementationWell(const Slf_FILE_MESSAGE& rMessage);
void ReadProduceWell(const Slf_FILE_MESSAGE& rMessage);
void ReadTable(QString tablename);
void WriteTable(CLogIO *,int);
void GetValueTable(CLogIO * pLogio,Slf_TABLE_FIELD *pFieldInfo,int nTableFlag,int nRow,int nColumn ,char*);
QString
GetStringtValueInTable(CLogIO * pLogio,Slf_TABLE_FIELD *pFieldInfo,int nTableFlag,int nRow,int nColumn,char*);
void SetItemValue(CLogIO * pLogio,int nTableFlag,const QString& szKey,const QString& szValue,int nRow,int nCol,char*);
void SetItemValue(CLogIO * pLogio,int nTableFlag,const QString& szKey,
const QString& szValue1,const QString& szValue2,int nRow,int nCol,char*);
private:
Ui::WellLogInformationClass* m_pUi;
CObjWelllogRound* m_pObjWelllogRound;
};
}
}
#endif // WELLLOGINFORMATION_H

View File

@ -0,0 +1,90 @@
#-------------------------------------------------
#
# Project created by QtCreator 2024-07-11T18:44:51
#
#-------------------------------------------------
QT += core gui widgets
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = EditPlotHeader
TEMPLATE = lib
# 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
#DEFINES += _WINDOWS
DEFINES += OSGWELLLOGUI_LIB
DEFINES += _TIMESPEC_DEFINED
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
CONFIG += console \
# static \
c++11 \
shared\
dll
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
CONFIG(debug, debug|release){
DESTDIR = ../../Bin
TARGET = $$join(TARGET,,,d) #为debug版本生成的文件增加d的后缀
} else {
DESTDIR = ../../Bin
TARGET = $$join(TARGET,,,)
}
FORMS += \
wellloginformation.ui
SOURCES += ../src/customlistwidget.cpp \
../../common/geometryutils.cpp \
wellloginformation.cpp
HEADERS += \
../../common/geometryutils.h \
../include/BaseObject.h \
../include/ObjWelllog.h \
../include/ObjWelllogTABLE.h \
../include/wellloginformation.h \
customlistwidget.h
INCLUDEPATH += ../include
INCLUDEPATH += ../CallManage
INCLUDEPATH += ../../Slfio/include
INCLUDEPATH += ../../common
INCLUDEPATH += ../../BaseFun/include
INCLUDEPATH += ../../OSGDataModel/include
INCLUDEPATH += ../../DataMgr/include
INCLUDEPATH += ../../OSGFramework/include
INCLUDEPATH += ../../Workflow/include
INCLUDEPATH += ../../Workflow/WFCrystal/Crystal/include
INCLUDEPATH += ../../Workflow/WFCrystal/Plugin/include
INCLUDEPATH += ../../Workflow/WFCrystal/SysUtility/utils/include
INCLUDEPATH += ../../Workflow/WFEngine/IOService/include
INCLUDEPATH += ../../Workflow/WFEngine/Module/include
INCLUDEPATH += ../../Workflow/WFEngine/Component/WorkflowWidget/include
INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModel/include
INCLUDEPATH += ../../Workflow/WFEngine/WorkflowEngine/include
INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include
INCLUDEPATH += ../../Workflow/WFWidget/include
CONFIG(debug, debug|release){
LIBS += -L../../Bin -lslfiod
LIBS += -L../../Bin -lOSGDataModeld
} else {
LIBS += -L../../Bin -lslfio
LIBS += -L../../Bin -lOSGDataModel
}

View File

@ -0,0 +1,21 @@
#include "customlistwidget.h"
#include <QKeyEvent>
CustomListWidget::CustomListWidget(QWidget *parent)
: QListWidget(parent)
{
}
CustomListWidget::~CustomListWidget()
{
}
void CustomListWidget::keyPressEvent(QKeyEvent * pEvent)
{
QListWidget::keyPressEvent(pEvent);
if(pEvent->key()==Qt::Key_Delete)
{
emit SignalDelete();
}
}

View File

@ -0,0 +1,21 @@
#ifndef CUSTOMLISTWIDGET_H
#define CUSTOMLISTWIDGET_H
#include <QListWidget>
class CustomListWidget : public QListWidget
{
Q_OBJECT
public:
CustomListWidget(QWidget *parent=NULL);
~CustomListWidget();
signals:
void SignalDelete();
protected:
virtual void keyPressEvent(QKeyEvent *);
private:
};
#endif // CUSTOMLISTWIDGET_H

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -81,7 +81,7 @@ public:
*/ */
// virtual bool Serialize( CObjectArchive &ar ) = 0; // virtual bool Serialize( CObjectArchive &ar ) = 0;
virtual void Delete() = 0; // virtual void Delete() = 0;
/** /**
* @brief Add a child object in general way. * @brief Add a child object in general way.
@ -107,7 +107,7 @@ public:
/** /**
* @brief * @brief
*/ */
virtual void DeleteAllChild() = 0; // virtual void DeleteAllChild() = 0;
PaiObject *GetPaiObject() PaiObject *GetPaiObject()
{ {

View File

@ -20,7 +20,7 @@ class OSGDATAMODEL_EXPORT CObjWelllogRound : public CBaseObject/*CBaseObjectImp
{ {
// Q_OBJECT // Q_OBJECT
public: public:
// CObjWelllogRound(); CObjWelllogRound();
~CObjWelllogRound(); ~CObjWelllogRound();
@ -50,7 +50,7 @@ public:
virtual void CopyFrom( CBaseObject *pOSGObjectOther ); virtual void CopyFrom( CBaseObject *pOSGObjectOther );
QString GetSlfFileName() const { return m_strAttachedSlfFile; } QString GetSlfFileName() const { return m_strAttachedSlfFile; }
// void SetSlfFileName(QString val); void SetSlfFileName(QString val);
CObjWell *GetWell(); CObjWell *GetWell();
void SetWell(CObjWell *pWell); void SetWell(CObjWell *pWell);
// QString GetWellRoundPath(); // QString GetWellRoundPath();

View File

@ -144,17 +144,17 @@ void CObjWelllogRound::SetWell(CObjWell *pWell)
m_pWell=pWell; m_pWell=pWell;
} }
// CObjWelllogRound::CObjWelllogRound() CObjWelllogRound::CObjWelllogRound()
// { {
// SetIconName( "icon/WellRound.png"); // SetIconName( "icon/WellRound.png");
// m_pObject = NULL; // m_pObject = NULL;
// m_pWell=NULL; m_pWell=NULL;
// isFLAG=false; isFLAG=false;
// } }
// void CObjWelllogRound::SetSlfFileName(QString val) void CObjWelllogRound::SetSlfFileName(QString val)
// { {
// QString oldf=m_strAttachedSlfFile; QString oldf=m_strAttachedSlfFile;
// m_strAttachedSlfFile=val; m_strAttachedSlfFile=val;
// std::vector<CBaseObject*> PaiObjects; // std::vector<CBaseObject*> PaiObjects;
// CPaiObjectHelper::RecursionGetAllChildren(this,PaiObjects ); // CPaiObjectHelper::RecursionGetAllChildren(this,PaiObjects );
// for(int j=0;j<PaiObjects.size();j++) { // for(int j=0;j<PaiObjects.size();j++) {
@ -208,7 +208,7 @@ void CObjWelllogRound::SetWell(CObjWell *pWell)
// } // }
// } // }
// } // }
// } }
CObjWelllogRound::~CObjWelllogRound() CObjWelllogRound::~CObjWelllogRound()
{ {

View File

@ -3379,9 +3379,7 @@ int CSlfIO::FindSlfObjectIndex(const char* namee,int status)
char name[128]; char name[128];
strcpy(name,namee); strcpy(name,namee);
for(int i=0;i<m_SlfHead.TableNumber;i++) { for(int i=0;i<m_SlfHead.TableNumber;i++) {
QString strName =QString::fromLocal8Bit(m_SlfObjectEntry[i].Name); if(stricmp(name,m_SlfObjectEntry[i].Name)==0||stricmp(name,m_SlfObjectEntry[i].HZName)==0) {
QString strHZName =QString::fromLocal8Bit(m_SlfObjectEntry[i].HZName);
if(stricmp(name,strName.toStdString().c_str())==0||stricmp(name,strHZName.toStdString().c_str())==0) {
if(status==-1) return i; if(status==-1) return i;
if(status==m_SlfObjectEntry[i].Status) return i; if(status==m_SlfObjectEntry[i].Status) return i;
} }

View File

@ -2612,7 +2612,7 @@ void GridDataAdapter::initTableWellLogData(DType type,QList<CObjWellLog*> WellLo
return ; return ;
} }
char name[100]; char name[100];
strcpy(name,m_pWellLogs[0]->GetName().toStdString().c_str()); strcpy(name,m_pWellLogs[0]->GetName().toLocal8Bit().toStdString().c_str());
int iIndex=logio->OpenTable(name); int iIndex=logio->OpenTable(name);
if (iIndex >=0) if (iIndex >=0)
{ {
@ -2746,7 +2746,7 @@ void GridDataAdapter::updatetTableWellLogData()
return ; return ;
} }
char name[100]; char name[100];
strcpy(name,m_pWellLogs[0]->GetName().toStdString().c_str()); strcpy(name,m_pWellLogs[0]->GetName().toLocal8Bit().toStdString().c_str());
int iIndex=logio->OpenTable(name); int iIndex=logio->OpenTable(name);
if (iIndex >=0) if (iIndex >=0)
{ {

View File

@ -114,6 +114,16 @@ void PropertyWidget::CommonPropertyChanged( QtProperty *pProperty, const QVarian
m_formInfo->m_lineColor = newColor; m_formInfo->m_lineColor = newColor;
m_formInfo->update(); m_formInfo->update();
} }
else if ("垂向绘制" == m_propertyData[pProperty])
{
m_formInfo->m_bVerticaDrawing = variant.toBool();
m_formInfo->update();
}
else if ("旋转角度(°)" == m_propertyData[pProperty])
{
m_formInfo->m_nRotationAngle = variant.toInt();
m_formInfo->update();
}
} }
void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant &variant ) void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant &variant )
@ -309,6 +319,10 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
{ {
m_formInfo->m_bShowOil = bShow; m_formInfo->m_bShowOil = bShow;
} }
else if(m_propertyData[pProperty] == "含油性居中")
{
m_formInfo->m_bCenterOil = bShow;
}
else if(m_propertyData[pProperty] == "显示颜色") else if(m_propertyData[pProperty] == "显示颜色")
{ {
m_formInfo->m_bShowColor = bShow; m_formInfo->m_bShowColor = bShow;
@ -726,6 +740,10 @@ void PropertyWidget::SlotPropertyChanged( QtProperty *pProperty, const QVariant
{ {
m_formInfo->m_bShowOil = bShow; m_formInfo->m_bShowOil = bShow;
} }
else if(m_propertyData[pProperty] == "含油性居中")
{
m_formInfo->m_bCenterOil = bShow;
}
else if(m_propertyData[pProperty] == "显示颜色") else if(m_propertyData[pProperty] == "显示颜色")
{ {
m_formInfo->m_bShowColor = bShow; m_formInfo->m_bShowColor = bShow;
@ -2060,6 +2078,8 @@ void PropertyWidget::initSwallCoreProperty(FormInfo *formInfo)
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
@ -2086,6 +2106,8 @@ void PropertyWidget::initSwallCoreItemProperty(TransparentDraggableSwallCore* td
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
} }
@ -2108,6 +2130,8 @@ void PropertyWidget::initTextProperty(FormInfo *formInfo)
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
@ -2135,6 +2159,8 @@ void PropertyWidget::initTextItemProperty(TransparentDraggableRect* tdText, doub
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
} }
@ -2162,6 +2188,8 @@ void PropertyWidget::initLayerProperty(FormInfo *formInfo)
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
@ -2188,6 +2216,8 @@ void PropertyWidget::initLayerItemProperty(TransparentDraggableLayer* tdLayer, d
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
} }
@ -2216,6 +2246,8 @@ void PropertyWidget::initGujingProperty(FormInfo *formInfo)
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
@ -2242,6 +2274,8 @@ void PropertyWidget::initGujingItemProperty(TransparentDraggableGujing* tdGujing
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("名称", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("名称", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
} }
@ -2261,6 +2295,8 @@ void PropertyWidget::initGeoLithProperty(FormInfo *formInfo)
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
@ -2268,6 +2304,7 @@ void PropertyWidget::initGeoLithProperty(FormInfo *formInfo)
_CreateVariantPropertyItem("显示", "岩性配色显示", formInfo->m_bLithColor, QVariant::Bool); _CreateVariantPropertyItem("显示", "岩性配色显示", formInfo->m_bLithColor, QVariant::Bool);
_CreateVariantPropertyItem("显示", "单岩性显示", formInfo->m_bLithOne, QVariant::Bool); _CreateVariantPropertyItem("显示", "单岩性显示", formInfo->m_bLithOne, QVariant::Bool);
_CreateVariantPropertyItem("显示", "显示含油性", formInfo->m_bShowOil, QVariant::Bool); _CreateVariantPropertyItem("显示", "显示含油性", formInfo->m_bShowOil, QVariant::Bool);
_CreateVariantPropertyItem("显示", "含油性居中", formInfo->m_bCenterOil, QVariant::Bool);
_CreateVariantPropertyItem("显示", "显示颜色", formInfo->m_bShowColor, QVariant::Bool); _CreateVariantPropertyItem("显示", "显示颜色", formInfo->m_bShowColor, QVariant::Bool);
_CreateVariantPropertyItem("显示", "绘制颜色号", formInfo->m_bShowColorNum, QVariant::Bool); _CreateVariantPropertyItem("显示", "绘制颜色号", formInfo->m_bShowColorNum, QVariant::Bool);
_CreateVariantPropertyItem("显示", "含油占比(1~8)", formInfo->m_dOilZhan, QVariant::Double, 1, 8); _CreateVariantPropertyItem("显示", "含油占比(1~8)", formInfo->m_dOilZhan, QVariant::Double, 1, 8);
@ -2296,12 +2333,15 @@ void PropertyWidget::initGeoLithItemProperty(TransparentDraggableGeoLith* tdGeoL
_CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String); _CreateVariantPropertyItem("通常", "选择井曲线", m_strLineName + "@" + m_strSlfName, QVariant::String);
_CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String); _CreateVariantPropertyItem("对象", "显示名称", formInfo->m_strAliasName, QVariant::String);
_CreateVariantPropertyItem("对象", "垂向绘制", formInfo->m_bVerticaDrawing, QVariant::Bool);
_CreateVariantPropertyItem("对象", "旋转角度(°)", formInfo->m_nRotationAngle, QVariant::Int);
_CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font); _CreateVariantPropertyItem("对象", "字体", formInfo->m_curveNameFont, QVariant::Font);
_CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color); _CreateVariantPropertyItem("对象", "颜色", formInfo->m_lineColor, QVariant::Color);
//显示 //显示
_CreateVariantPropertyItem("显示", "岩性配色显示", formInfo->m_bLithColor, QVariant::Bool); _CreateVariantPropertyItem("显示", "岩性配色显示", formInfo->m_bLithColor, QVariant::Bool);
_CreateVariantPropertyItem("显示", "单岩性显示", formInfo->m_bLithOne, QVariant::Bool); _CreateVariantPropertyItem("显示", "单岩性显示", formInfo->m_bLithOne, QVariant::Bool);
_CreateVariantPropertyItem("显示", "显示含油性", formInfo->m_bShowOil, QVariant::Bool); _CreateVariantPropertyItem("显示", "显示含油性", formInfo->m_bShowOil, QVariant::Bool);
_CreateVariantPropertyItem("显示", "含油性居中", formInfo->m_bCenterOil, QVariant::Bool);
_CreateVariantPropertyItem("显示", "显示颜色", formInfo->m_bShowColor, QVariant::Bool); _CreateVariantPropertyItem("显示", "显示颜色", formInfo->m_bShowColor, QVariant::Bool);
_CreateVariantPropertyItem("显示", "绘制颜色号", formInfo->m_bShowColorNum, QVariant::Bool); _CreateVariantPropertyItem("显示", "绘制颜色号", formInfo->m_bShowColorNum, QVariant::Bool);
_CreateVariantPropertyItem("显示", "含油占比(1~8)", formInfo->m_dOilZhan, QVariant::Double, 1, 8); _CreateVariantPropertyItem("显示", "含油占比(1~8)", formInfo->m_dOilZhan, QVariant::Double, 1, 8);

View File

@ -116,21 +116,37 @@ void TransparentDraggableGeoLith::drawLith(double left_Low, double right_Hight,
{ {
if(mPlot->m_bShowColor || mPlot->m_bShowColorNum) // 绘制颜色号/显示颜色 if(mPlot->m_bShowColor || mPlot->m_bShowColorNum) // 绘制颜色号/显示颜色
{ {
y1 = mPlot->yAxis->coordToPixel(lY1+2*(lY2-lY1)/mPlot->m_dOilZhan); if(mPlot->m_bCenterOil)//含油性居中
{
y1 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/mPlot->m_dOilZhan);
}
else
{
y1 = mPlot->yAxis->coordToPixel(lY1+2*(lY2-lY1)/mPlot->m_dOilZhan);
}
} }
else else
{ {
y1 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/mPlot->m_dOilZhan); if(mPlot->m_bCenterOil)//含油性居中
{
y1 = mPlot->yAxis->coordToPixel(lY1);
}
else
{
y1 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/mPlot->m_dOilZhan);
}
} }
} }
else else
{ {
if(mPlot->m_bShowColor || mPlot->m_bShowColorNum) // 绘制颜色号/显示颜色 if(mPlot->m_bShowColor || mPlot->m_bShowColorNum) // 绘制颜色号/显示颜色
{ {
//不绘制含油性
y1 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/mPlot->m_dOilZhan); y1 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/mPlot->m_dOilZhan);
} }
else else
{ {
//不绘制含油性,左侧颜色
y1 = mPlot->yAxis->coordToPixel(lY1); y1 = mPlot->yAxis->coordToPixel(lY1);
} }
} }
@ -225,7 +241,60 @@ void TransparentDraggableGeoLith::drawLith(double left_Low, double right_Hight,
} }
mPixmap_Lith->topLeft->setCoords(mPlot->xAxis->pixelToCoord(x2+1), mPlot->yAxis->pixelToCoord(y1+1));//right_Hight mPixmap_Lith->topLeft->setCoords(mPlot->xAxis->pixelToCoord(x2+1), mPlot->yAxis->pixelToCoord(y1+1));//right_Hight
mPixmap_Lith->bottomRight->setCoords(mPlot->xAxis->pixelToCoord(x1-1), mPlot->yAxis->pixelToCoord(y2-1));//left_Low mPixmap_Lith->bottomRight->setCoords(mPlot->xAxis->pixelToCoord(x1-1), mPlot->yAxis->pixelToCoord(y2-1));//left_Low
}
void TransparentDraggableGeoLith::drawColorLeft(double left_Low, double right_Hight, double lY1, double lY2)
{
//不显示
if(m_Color=="" || !mPlot->m_bShowColor)
{
mPixmap_Color->topLeft->setCoords(0, 0);//right_Hight
mPixmap_Color->bottomRight->setCoords(0, 0);//left_Low
return;
}
QString path,filename;
GetWellNameAndPath(m_Color, filename, path);
QString basename = filename;
double x1 = mPlot->xAxis->coordToPixel(left_Low);
double x2 = mPlot->xAxis->coordToPixel(right_Hight);
double y1 = mPlot->yAxis->coordToPixel(lY1);
double y2 = mPlot->yAxis->coordToPixel(lY1+(lY2-lY1)/mPlot->m_dOilZhan);
double newWidth = y2-y1;
double newHeight = x1-x2;
QString val="";
QImage image(newWidth, newHeight, QImage::Format_RGB32);
QPainter painter(&image);
QRectF fillRect(0,0,newWidth, newHeight);
painter.fillRect(fillRect,Qt::white);
//
if(mPlot->m_bShowColor)
{
//颜色
QString strLastColor = m_Color.right(4);
if(strLastColor.toLower()==".svg")
{
//拉伸
DrawSVGSteched(&painter,m_Color,fillRect,0);
}
}
//
val=GetImagePath()+"TempNew";
QDir ss;
if(!ss.exists(val)) {
ss.mkdir(val);
}
val+=QDir::separator();
val+=basename+".png";
image.save(val);
//
mPixmap_Color->setPixmap(QPixmap(val)); // 设置图片
mPixmap_Color->topLeft->setCoords(right_Hight, lY1);//right_Hight
mPixmap_Color->bottomRight->setCoords(left_Low, lY1+(lY2-lY1)/mPlot->m_dOilZhan);//left_Low
} }
//设置m_Oil //设置m_Oil
@ -238,6 +307,8 @@ void TransparentDraggableGeoLith::drawOil(double left_Low, double right_Hight, d
{ {
if(m_Oil=="" || !mPlot->m_bShowOil) if(m_Oil=="" || !mPlot->m_bShowOil)
{ {
mPixmap_Oil->topLeft->setCoords(0, 0); //right_Hight, lY1
mPixmap_Oil->bottomRight->setCoords(0, 0); //left_Low
return; return;
} }
@ -311,56 +382,20 @@ void TransparentDraggableGeoLith::drawOil(double left_Low, double right_Hight, d
mPixmap_Oil->setPixmap(QPixmap(filePath)); // 设置图片 mPixmap_Oil->setPixmap(QPixmap(filePath)); // 设置图片
} }
mPixmap_Oil->topLeft->setCoords(xNewRight, mPlot->yAxis->pixelToCoord(y1+1)); //right_Hight, lY1 if(mPlot->m_bCenterOil)//含油性居中
mPixmap_Oil->bottomRight->setCoords(xNewLeft, mPlot->yAxis->pixelToCoord(y2-1)); //left_Low {
mPixmap_Oil->topLeft->setCoords(xNewRight, lY1+ (lY2-lY1 -(lY2-lY1)/mPlot->m_dOilZhan) / 2.0); //right_Hight, lY1
mPixmap_Oil->bottomRight->setCoords(xNewLeft, lY2- (lY2-lY1 -(lY2-lY1)/mPlot->m_dOilZhan) / 2.0); //left_Low
}
else
{
mPixmap_Oil->topLeft->setCoords(xNewRight, mPlot->yAxis->pixelToCoord(y1+1)); //right_Hight, lY1
mPixmap_Oil->bottomRight->setCoords(xNewLeft, mPlot->yAxis->pixelToCoord(y2-1)); //left_Low
}
//mPlot->replot(); //mPlot->replot();
} }
////设置Color
//void TransparentDraggableGeoLith::setColor(QString filePath)
//{
// m_Color = filePath;
// //
// QString strLast = filePath.right(4);
// if(strLast.toLower()==".svg")
// {
// QString path,filename;
// GetWellNameAndPath(filePath, filename, path);
// QString basename = filename;
// QString val=filePath;
// QImage image(320,160,QImage::Format_RGB32);
// QPainter painter(&image);
// QRectF fillRect(0,0,320,160);
// painter.fillRect(fillRect,Qt::white);
// //拉伸
// DrawSVGSteched(&painter,filePath,fillRect,0);
// //平铺
// //DrawSVGTiled(&painter,filePath,fillRect,0);
// //正常
// //DrawSVGNormal(&painter,filePath,fillRect,0);
// val=GetImagePath()+"TempNew";
// QDir ss;
// if(!ss.exists(val)) {
// ss.mkdir(val);
// }
// val+=QDir::separator();
// val+=basename+".png";
// image.save(val);
// //
// mPixmap_Color->setPixmap(QPixmap(val)); // 设置图片
// }
// else
// {
// mPixmap_Color->setPixmap(QPixmap(filePath)); // 设置图片
// }
// //mPlot->replot();
//}
// 设置矩形范围 // 设置矩形范围
void TransparentDraggableGeoLith::setRange(double left_Low, double right_Hight, bool bRefresh) void TransparentDraggableGeoLith::setRange(double left_Low, double right_Hight, bool bRefresh)
{ {
@ -378,17 +413,20 @@ void TransparentDraggableGeoLith::setRange(double left_Low, double right_Hight,
if(mPlot->m_bShowColor || mPlot->m_bShowColorNum) // 绘制颜色号/显示颜色 if(mPlot->m_bShowColor || mPlot->m_bShowColorNum) // 绘制颜色号/显示颜色
{ {
// 设置父锚点,定位点 // 设置父锚点,定位点
mItemTitle->setText(mstrTitle); if(mPlot->m_bShowColorNum)
{
mItemTitle->setText(mstrTitle);
}
else{
mItemTitle->setText("");
}
float flNewPos = mPlot->xAxis->coordToPixel((left_Low + right_Hight)/2.0) - 15; float flNewPos = mPlot->xAxis->coordToPixel((left_Low + right_Hight)/2.0) - 15;
mItemTitle->position->setCoords(mPlot->xAxis->pixelToCoord(flNewPos), mItemTitle->position->setCoords(mPlot->xAxis->pixelToCoord(flNewPos),
lY1+(lY2-lY1)/mPlot->m_dOilZhan/2); lY1+(lY2-lY1)/mPlot->m_dOilZhan/2);
mPixmap_Color->topLeft->setCoords(right_Hight, lY1+2*(lY2-lY1)/mPlot->m_dOilZhan);
} }
else else
{ {
mItemTitle->setText(""); mItemTitle->setText("");
mPixmap_Color->topLeft->setCoords(right_Hight, lY1+(lY2-lY1)/mPlot->m_dOilZhan);
} }
} }
else else
@ -396,26 +434,31 @@ void TransparentDraggableGeoLith::setRange(double left_Low, double right_Hight,
if(mPlot->m_bShowColor || mPlot->m_bShowColorNum) // 绘制颜色号/显示颜色 if(mPlot->m_bShowColor || mPlot->m_bShowColorNum) // 绘制颜色号/显示颜色
{ {
// 设置父锚点,定位点 // 设置父锚点,定位点
mItemTitle->setText(mstrTitle); if(mPlot->m_bShowColorNum)
{
mItemTitle->setText(mstrTitle);
}
else{
mItemTitle->setText("");
}
float flNewPos = mPlot->xAxis->coordToPixel((left_Low + right_Hight)/2.0) - 15; float flNewPos = mPlot->xAxis->coordToPixel((left_Low + right_Hight)/2.0) - 15;
mItemTitle->position->setCoords(mPlot->xAxis->pixelToCoord(flNewPos), mItemTitle->position->setCoords(mPlot->xAxis->pixelToCoord(flNewPos),
lY1+(lY2-lY1)/mPlot->m_dOilZhan/2); lY1+(lY2-lY1)/mPlot->m_dOilZhan/2);
mPixmap_Color->topLeft->setCoords(right_Hight, lY1+(lY2-lY1)/mPlot->m_dOilZhan);
} }
else else
{ {
mItemTitle->setText(""); mItemTitle->setText("");
mPixmap_Color->topLeft->setCoords(right_Hight, lY1);
} }
} }
mPixmap_Color->bottomRight->setCoords(left_Low, lY2);
// //
drawLith(left_Low, right_Hight, lY1, lY2); drawLith(left_Low, right_Hight, lY1, lY2);
//位置与rect不一样否则图像反转 //位置与rect不一样否则图像反转
drawOil(left_Low, right_Hight, lY1, lY2); drawOil(left_Low, right_Hight, lY1, lY2);
//左侧颜色
drawColorLeft(left_Low, right_Hight, lY1, lY2);
updateHandles(); updateHandles();
if(bRefresh) if(bRefresh)

View File

@ -30,11 +30,12 @@ public:
//设置标题 //设置标题
void setTitle(QString strTitle); void setTitle(QString strTitle);
//设置解释结论 //设置岩性
void setLith(QString filePath, QString colorPath); void setLith(QString filePath, QString colorPath);
void drawLith(double left_Low, double right_Hight, double lY1, double lY2); void drawLith(double left_Low, double right_Hight, double lY1, double lY2);
// void setColor(QString filePath); // void setColor(QString filePath);
void drawColorLeft(double left_Low, double right_Hight, double lY1, double lY2);
//设置m_Oil //设置m_Oil
void setOil(QString filePath); void setOil(QString filePath);

View File

@ -380,6 +380,56 @@ void FormDraw::DisplayTable_One(QJsonObject lineObjInfo)
lineColor.setNamedColor(lineObjInfo.value("lineColor").toString()); lineColor.setNamedColor(lineObjInfo.value("lineColor").toString());
} }
bool bLithColor = true; // 岩性配色显示
bool bLithOne = true; // 单岩性显示
bool bShowOil = true; // 显示含油性
bool bCenterOil = false; // 含油性居中
bool bShowColor = false; // 显示颜色
bool bShowColorNum = false; // 绘制颜色号
//
if (lineObjInfo.contains("LithColor"))
{
QJsonValue value = lineObjInfo.value("LithColor");
if (value.isBool()) {
bLithColor = value.toBool();
}
}
if (lineObjInfo.contains("LithOne"))
{
QJsonValue value = lineObjInfo.value("LithOne");
if (value.isBool()) {
bLithOne = value.toBool();
}
}
if (lineObjInfo.contains("ShowOil"))
{
QJsonValue value = lineObjInfo.value("ShowOil");
if (value.isBool()) {
bShowOil = value.toBool();
}
}
if (lineObjInfo.contains("CenterOil"))
{
QJsonValue value = lineObjInfo.value("CenterOil");
if (value.isBool()) {
bCenterOil = value.toBool();
}
}
if (lineObjInfo.contains("ShowColor"))
{
QJsonValue value = lineObjInfo.value("ShowColor");
if (value.isBool()) {
bShowColor = value.toBool();
}
}
if (lineObjInfo.contains("ShowColorNum"))
{
QJsonValue value = lineObjInfo.value("ShowColorNum");
if (value.isBool()) {
bShowColorNum = value.toBool();
}
}
QString folderPath = GetLogdataPath(); QString folderPath = GetLogdataPath();
folderPath = folderPath + g_prjname; folderPath = folderPath + g_prjname;
strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName; strSlfName = folderPath + "/" + "#" + strWellName + "/" + strSlfName;
@ -395,7 +445,53 @@ void FormDraw::DisplayTable_One(QJsonObject lineObjInfo)
{ {
listOtherProperty.append(QString::number(lineObjInfo.value("OilZhan").toInt())); listOtherProperty.append(QString::number(lineObjInfo.value("OilZhan").toInt()));
} }
if(bLithColor)
{
listOtherProperty.append("LithColor");
}
else{
listOtherProperty.append("0");
}
//
if(bLithOne)
{
listOtherProperty.append("LithOne");
}
else{
listOtherProperty.append("0");
}
//
if(bShowOil)
{
listOtherProperty.append("ShowOil");
}
else{
listOtherProperty.append("0");
}
//
if(bCenterOil)
{
listOtherProperty.append("CenterOil");
}
else{
listOtherProperty.append("0");
}
//
if(bShowColor)
{
listOtherProperty.append("ShowColor");
}
else{
listOtherProperty.append("0");
}
//
if(bShowColorNum)
{
listOtherProperty.append("ShowColorNum");
}
else{
listOtherProperty.append("0");
}
//结论 //结论
this->addTableLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, listOtherProperty); this->addTableLine(m_strUuid, strSlfName, strWellName, m_strTrackName, strLineName, listOtherProperty);
} }
@ -3666,9 +3762,64 @@ void FormDraw::initGeoLith(QMyCustomPlot *widget, QString strSlfName, QString st
widget->yAxis2->setTicks(false); widget->yAxis2->setTicks(false);
//含油占比 //含油占比
if(listOtherProperty.size()>=4) if(listOtherProperty.size()>=10)
{ {
widget->m_dOilZhan = listOtherProperty[3].toDouble(); widget->m_dOilZhan = listOtherProperty[3].toDouble();
//
if(listOtherProperty[4]=="LithColor")
{
widget->m_bLithColor = true;
}
else
{
widget->m_bLithColor = false;
}
//
if(listOtherProperty[5]=="LithOne")
{
widget->m_bLithOne = true;
}
else
{
widget->m_bLithOne = false;
}
//
if(listOtherProperty[6]=="ShowOil")
{
widget->m_bShowOil = true;
}
else
{
widget->m_bShowOil = false;
}
//
if(listOtherProperty[7]=="CenterOil")
{
widget->m_bCenterOil = true;
}
else
{
widget->m_bCenterOil = false;
}
//
if(listOtherProperty[8]=="ShowColor")
{
widget->m_bShowColor = true;
}
else
{
widget->m_bShowColor = false;
}
//
if(listOtherProperty[9]=="ShowColorNum")
{
widget->m_bShowColorNum = true;
}
else
{
widget->m_bShowColorNum = false;
}
} }
//加载 //加载
widget->LoadFromSLF_GeoLith(strSlfName, strLineName); widget->LoadFromSLF_GeoLith(strSlfName, strLineName);

View File

@ -158,6 +158,12 @@ QJsonObject FormInfo::makeJson()
rootObj["lineColor"] = m_lineColor.name(); rootObj["lineColor"] = m_lineColor.name();
rootObj["OilZhan"] = m_dOilZhan;//含油占比 rootObj["OilZhan"] = m_dOilZhan;//含油占比
rootObj["LithColor"] = m_bLithColor;
rootObj["LithOne"] = m_bLithOne;
rootObj["ShowOil"] = m_bShowOil;
rootObj["CenterOil"] = m_bCenterOil;
rootObj["ShowColor"] = m_bShowColor;
rootObj["ShowColorNum"] = m_bShowColorNum;
//item属性写入slf文件不需要此次记录 //item属性写入slf文件不需要此次记录
return rootObj; return rootObj;
} }
@ -286,6 +292,7 @@ void FormInfo::paintEvent(QPaintEvent* event)
//painter.drawRoundRect(rectRound);//利用画刷(颜色/岩性图片),画框 //painter.drawRoundRect(rectRound);//利用画刷(颜色/岩性图片),画框
painter.drawRect(rectRound); painter.drawRect(rectRound);
QString strShowTxt = "";
painter.setBrush(Qt::NoBrush); // 确保文字不被填充色遮挡 painter.setBrush(Qt::NoBrush); // 确保文字不被填充色遮挡
painter.setFont(m_curveNameFont); painter.setFont(m_curveNameFont);
painter.setPen(m_lineColor); // fontColor QColor(220, 220, 220) painter.setPen(m_lineColor); // fontColor QColor(220, 220, 220)
@ -365,7 +372,8 @@ void FormInfo::paintEvent(QPaintEvent* event)
strAliasNameTmp = strAliasNameTmp + "-从校"; strAliasNameTmp = strAliasNameTmp + "-从校";
} }
} }
painter.drawText(rect.left(), rect.top(), rect.width(), rect.height()/3, Qt::AlignCenter, strAliasNameTmp); strShowTxt = strAliasNameTmp;
//painter.drawText(rect.left(), rect.top(), rect.width(), rect.height()/3, Qt::AlignCenter, strAliasNameTmp);
} }
if(m_strType=="waveObject") if(m_strType=="waveObject")
@ -426,12 +434,7 @@ void FormInfo::paintEvent(QPaintEvent* event)
} }
} }
painter.setFont(m_curveUnitFont);
painter.setPen(m_lineColor);
//painter.drawText(rect.left() + 20, 55, m_strUnit);
//painter.drawText(rect.left() + 20, 80, QString::number(m_vmin)+" ~ "+QString::number(m_vmax));
QString strShowTxt = "";
if(m_strLineName=="RESULT") if(m_strLineName=="RESULT")
{ {
//解释结论,不绘制左右范围 //解释结论,不绘制左右范围
@ -447,12 +450,6 @@ void FormInfo::paintEvent(QPaintEvent* event)
//蝌蚪图,不绘制左右范围 //蝌蚪图,不绘制左右范围
strShowTxt = "蝌蚪图"; strShowTxt = "蝌蚪图";
} }
else if(m_strLineName=="井眼垮塌矢量图"
|| m_strLineName=="井斜方位图")
{
painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3, Qt::AlignCenter, m_strUnit);
painter.drawText(rect.left(), rect.top()+rect.height()*2/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, QString::number(m_vmin)+" ~ "+QString::number(m_vmax));
}
if (strShowTxt.length()>0) if (strShowTxt.length()>0)
{ {
@ -501,6 +498,12 @@ void FormInfo::paintEvent(QPaintEvent* event)
} }
} }
//单位------------------------------
painter.setFont(m_curveUnitFont);
painter.setPen(m_lineColor);
//painter.drawText(rect.left() + 20, 55, m_strUnit);
//painter.drawText(rect.left() + 20, 80, QString::number(m_vmin)+" ~ "+QString::number(m_vmax));
// //
if(m_strType=="tableObject" && (m_strLineName=="WORDS_RELUST" || m_strLineName == "RESULT" if(m_strType=="tableObject" && (m_strLineName=="WORDS_RELUST" || m_strLineName == "RESULT"
|| m_strLineName == "GEO_LITH"|| m_strLineName == "SWALL_CORE" || m_strLineName == "GEO_LITH"|| m_strLineName == "SWALL_CORE"
@ -528,6 +531,13 @@ void FormInfo::paintEvent(QPaintEvent* event)
} }
} }
if(m_strLineName=="井眼垮塌矢量图"
|| m_strLineName=="井斜方位图")
{
painter.drawText(rect.left(), rect.top()+rect.height()/3, rect.width(), rect.height()/3, Qt::AlignCenter, m_strUnit);
painter.drawText(rect.left(), rect.top()+rect.height()*2/3, rect.width(), rect.height()/3 ,Qt::AlignCenter, QString::number(m_vmin)+" ~ "+QString::number(m_vmax));
}
QWidget::paintEvent(event); QWidget::paintEvent(event);
} }

View File

@ -149,6 +149,7 @@ public:
bool m_bLithColor = true; // 岩性配色显示 bool m_bLithColor = true; // 岩性配色显示
bool m_bLithOne = true; // 单岩性显示 bool m_bLithOne = true; // 单岩性显示
bool m_bShowOil = true; // 显示含油性 bool m_bShowOil = true; // 显示含油性
bool m_bCenterOil = false; // 含油性居中
bool m_bShowColor = false; // 显示颜色 bool m_bShowColor = false; // 显示颜色
bool m_bShowColorNum = false; // 绘制颜色号 bool m_bShowColorNum = false; // 绘制颜色号
double m_dOilZhan = 8; //含油占比 double m_dOilZhan = 8; //含油占比

View File

@ -585,10 +585,66 @@ void FormTrack::s_AddTableLine(QString strSlfName, QString strWellName, QString
//录井剖面 //录井剖面
if(strLineName == "GEO_LITH") if(strLineName == "GEO_LITH")
{ {
if(listOtherProperty.size()>=4) if(listOtherProperty.size()>=10)
{ {
formInfo->m_dOilZhan = listOtherProperty[3].toDouble(); formInfo->m_dOilZhan = listOtherProperty[3].toDouble();
//
if(listOtherProperty[4]=="LithColor")
{
formInfo->m_bLithColor = true;
}
else
{
formInfo->m_bLithColor = false;
}
//
if(listOtherProperty[5]=="LithOne")
{
formInfo->m_bLithOne = true;
}
else
{
formInfo->m_bLithOne = false;
}
//
if(listOtherProperty[6]=="ShowOil")
{
formInfo->m_bShowOil = true;
}
else
{
formInfo->m_bShowOil = false;
}
//
if(listOtherProperty[7]=="CenterOil")
{
formInfo->m_bCenterOil = true;
}
else
{
formInfo->m_bCenterOil = false;
}
//
if(listOtherProperty[8]=="ShowColor")
{
formInfo->m_bShowColor = true;
}
else
{
formInfo->m_bShowColor = false;
}
//
if(listOtherProperty[9]=="ShowColorNum")
{
formInfo->m_bShowColorNum = true;
}
else
{
formInfo->m_bShowColorNum = false;
}
} }
} }
} }
//设置高度 //设置高度

View File

@ -219,6 +219,7 @@ INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModel/include
INCLUDEPATH += ../../Workflow/WFEngine/WorkflowEngine/include INCLUDEPATH += ../../Workflow/WFEngine/WorkflowEngine/include
INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include INCLUDEPATH += ../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include
INCLUDEPATH += ../../Workflow/WFWidget/include INCLUDEPATH += ../../Workflow/WFWidget/include
INCLUDEPATH += ../../EditPlotHeader/include
CONFIG(debug, debug|release){ CONFIG(debug, debug|release){
LIBS += -L../../Bin -lBaseFund LIBS += -L../../Bin -lBaseFund
@ -233,6 +234,7 @@ CONFIG(debug, debug|release){
LIBS += -L../../Bin/ -lDrawBased LIBS += -L../../Bin/ -lDrawBased
LIBS += -L../../Bin/ -lLogModuleConsoled LIBS += -L../../Bin/ -lLogModuleConsoled
LIBS += -L../../Bin/ -lWFEngined LIBS += -L../../Bin/ -lWFEngined
LIBS += -L../../Bin/ -lEditPlotHeaderd
#-lCallManaged #-lCallManaged
} else { } else {
LIBS += -L../../Bin -lBaseFun LIBS += -L../../Bin -lBaseFun
@ -247,5 +249,6 @@ CONFIG(debug, debug|release){
LIBS += -L../../Bin/ -lDrawBase LIBS += -L../../Bin/ -lDrawBase
LIBS += -L../../Bin/ -lLogModuleConsole LIBS += -L../../Bin/ -lLogModuleConsole
LIBS += -L../../Bin/ -lWFEngine LIBS += -L../../Bin/ -lWFEngine
LIBS += -L../../Bin/ -lEditPlotHeader
#-lCallManage #-lCallManage
} }

View File

@ -22,7 +22,9 @@
#include "fileopenthread.h" #include "fileopenthread.h"
#include "ObjWellLogINP.h" #include "ObjWellLogINP.h"
#include "TxtEditorDlg.h" #include "TxtEditorDlg.h"
#include "ObjWell.h"
#include "wellloginformation.h"
using namespace pai::gui;
//以下参数从配置文件读取 //以下参数从配置文件读取
int g_iIndex = 0; int g_iIndex = 0;
int g_iNum = 0; int g_iNum = 0;
@ -571,72 +573,30 @@ void MainWindow::s_WelllogInformation(QString strSlfName)
{ {
if(m_centerWidgets) if(m_centerWidgets)
{ {
// pai::gui::WellLogInformation* pWellLogInformation=new pai::gui::WellLogInformation; WellLogInformation* pWellLogInformation=new WellLogInformation;
// pWellLogInformation->exec(); CObjWelllogRound* pWelllogRound = new CObjWelllogRound;
// pWellLogInformation->SetWelllogRound(pWelllogRound); CObjWell* pWell = new CObjWell;
CLogIO * pLogio=new CLogIO();
if(!pLogio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeReadWrite))
{
QMessageBox::information(nullptr,QString::fromLocal8Bit("提示"),QString::fromLocal8Bit("存储失败!"));
delete pLogio;
return;
}
// pWellLogInformation->CreateTable(pLogio);
QString wellname;QString path; QString wellname;QString path;
GetWellNameAndPath(strSlfName, wellname, path); GetWellNameAndPath(strSlfName, wellname, path);
// m_centerWidgets->addTab(pWellLogInformation, wellname + ":测井信息" );
// int iCount = m_centerWidgets->count();
// m_centerWidgets->m_pTabBar->setCurrentIndex(iCount-1);
QDir dir(path);
QStringList filters;
filters << "*.well"; // 查找扩展名为.well的文件
dir.setNameFilters(filters);
QStringList fileNames = dir.entryList(QDir::Files);
foreach (const QString &fileName, fileNames) {
pWell->SetWellFileName(path + "/" + fileName);
}
pWelllogRound->SetWell(pWell);
int nTableFlag =pLogio->OpenTable("wellloginformation"); pWelllogRound->SetSlfFileName(strSlfName);
if(nTableFlag!=-1)
{
s_ShowTable(strSlfName, "wellloginformation");
return;
}
QString szColumnName; pWellLogInformation->SetWelllogRound(pWelllogRound);
// pWellLogInformation->exec();
szColumnName+=("缩写");szColumnName+=","; m_centerWidgets->addTab(pWellLogInformation, wellname + ":" + "WellLogInformation");
szColumnName+=("");szColumnName+=","; int iCount = m_centerWidgets->count();
m_centerWidgets->m_pTabBar->setCurrentIndex(iCount-1);
szColumnName+=("单位");szColumnName+=","; return;
szColumnName+=("中文名");szColumnName+=",";
QString szDataType;
szDataType+="6,6,6,6";
QString szSize;
szSize+="64,128,64,128";
QString szRemark;
szRemark+="0,0,0,0";
nTableFlag =pLogio->Open_Set_Table("wellloginformation",
TABLEE_OBJECT,
4,
szColumnName.toLocal8Bit().data(),
// szColumnName.toStdString().c_str(),
szSize.toLocal8Bit().data(),
szDataType.toLocal8Bit().data(),
szRemark.toLocal8Bit().data());
int nTableColumn=pLogio->GetTableFieldCount(nTableFlag);
Slf_TABLE_FIELD *pFieldInfo=new Slf_TABLE_FIELD[nTableColumn+1];
pLogio->GetTableFieldInfo(nTableFlag,pFieldInfo);
char pArr[100];
strcpy(pArr, "WN");
pLogio->SetTableFieldData(nTableFlag,0,pArr,1);//缩写
strcpy(pArr, wellname.toStdString().c_str());
pLogio->SetTableFieldData(nTableFlag,1,pArr,1);//单位
strcpy(pArr, "NONE");
pLogio->SetTableFieldData(nTableFlag,2,pArr,1);//井名
strcpy(pArr, QString("井名").toLocal8Bit());
pLogio->SetTableFieldData(nTableFlag,3,pArr,1);
s_ShowTable(strSlfName, "wellloginformation");
} }
} }

View File

@ -5415,6 +5415,10 @@ void QMyCustomPlot::s_changeGeoLithShow(QString strUuid, QString strSlfName, QSt
{ {
m_bShowOil = bShow; m_bShowOil = bShow;
} }
else if(propertyData == "含油性居中")
{
m_bCenterOil = bShow;
}
else if(propertyData == "显示颜色") else if(propertyData == "显示颜色")
{ {
m_bShowColor = bShow; m_bShowColor = bShow;

View File

@ -187,6 +187,7 @@ public:
bool m_bLithColor = true; // 岩性配色显示 bool m_bLithColor = true; // 岩性配色显示
bool m_bLithOne = true; // 单岩性显示 bool m_bLithOne = true; // 单岩性显示
bool m_bShowOil = true; // 显示含油性 bool m_bShowOil = true; // 显示含油性
bool m_bCenterOil = false; // 含油性居中
bool m_bShowColor = false; // 显示颜色 bool m_bShowColor = false; // 显示颜色
bool m_bShowColorNum = false; // 绘制颜色号 bool m_bShowColorNum = false; // 绘制颜色号
double m_dOilZhan = 8; //含油占比 double m_dOilZhan = 8; //含油占比

View File

@ -20,7 +20,8 @@ https://www.cnblogs.com/ys0103/p/4562493.html
17.DataOutput--内存分配问题windows兼容 17.DataOutput--内存分配问题windows兼容
18.tran\SLFAscIIConvertor 18.tran\SLFAscIIConvertor
19.DrawBase 19.DrawBase
20.logPlus 20.EditPlotHeader
21.logPlus
powershell统计代码行数 powershell统计代码行数