From 8f16185002c4641646278133e0fe6e2f7f6b6ecf Mon Sep 17 00:00:00 2001 From: jiayulong Date: Fri, 16 Jan 2026 09:04:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=89=E5=9B=BE=E4=B8=80?= =?UTF-8?q?=E8=A1=A8=E7=BB=98=E5=9B=BE=EF=BC=8C=E6=94=AF=E6=8C=81=E5=8F=AF?= =?UTF-8?q?=E8=A7=86=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logPlus/DrawTvd.cpp | 20 +++++++++++++++++--- logPlus/DrawTvd.h | 4 +++- logPlus/ViewInfo.h | 1 + logPlus/formdraw.cpp | 2 +- logPlus/formline.cpp | 26 ++++++++++++++++++-------- logPlus/mainwindowcurve.cpp | 2 +- 6 files changed, 41 insertions(+), 14 deletions(-) diff --git a/logPlus/DrawTvd.cpp b/logPlus/DrawTvd.cpp index 770f32e..5f88f80 100644 --- a/logPlus/DrawTvd.cpp +++ b/logPlus/DrawTvd.cpp @@ -13,6 +13,10 @@ #include "DrawTvd.h" #pragma warning( pop ) + +extern int g_iY1; +extern int g_iY2; + //BEGIN_OSGGRAPHICS_NAMESPACE; CDrawTvd::CDrawTvd(void) @@ -65,6 +69,15 @@ CDrawTvd::CDrawTvd(void) Xmin=9999.; Ymax=-9999.; Ymin=9999.; + // + m_SDep = -g_iY2; + m_EDep = -g_iY1; + rgbList.append(QRgb(4294967295)); + rgbList.append(QRgb(4294966617)); + rgbList.append(QRgb(4294944512)); + rgbList.append(QRgb(4293345792)); + rgbList.append(QRgb(4288741473)); + rgbList.append(QRgb(4278190080)); QString ConfigName = ::GetConfPath()+"TvdTable.ini"; QFile file(ConfigName); @@ -72,6 +85,7 @@ CDrawTvd::CDrawTvd(void) if(file.open(QIODevice::ReadOnly )) { QTextStream textstream( &file ); + textstream.setCodec("UTF-8"); // 设置UTF-8编码 while(!textstream.atEnd()) { QString line = textstream.readLine(); @@ -637,8 +651,8 @@ void CDrawTvd::DrawTvd(QPainter* pDC,QRectF mrt) // } // else h=0; - m_Width=mrt.width()/GetPixelPerCm()-3; - m_Height=mrt.width()/GetPixelPerCm()-3; +// m_Width=mrt.width()/GetPixelPerCm(); +// m_Height=mrt.width()/GetPixelPerCm(); sdep=m_SDep; edep=m_EDep; @@ -675,7 +689,7 @@ void CDrawTvd::DrawTvd(QPainter* pDC,QRectF mrt) TitleFontWidth=TitleFontHeight=fm4.height()/2.0; XCenter=mrt.left()+m_Left*100.+(mrt.width()-(m_Left+m_Right)*100.)/2.; - if(1) { + if(0) { //if(m_pWellSceneManager->GetIsColorPrint()) { m_GuiJiPen=QPen(m_GuijiColor,m_GuijiWidth*(int)(fbl/2.+0.5)); m_FramePen=QPen(m_FrameColor,m_FrameWidth*(int)(fbl/2.+0.5));; diff --git a/logPlus/DrawTvd.h b/logPlus/DrawTvd.h index fc86866..eb7452f 100644 --- a/logPlus/DrawTvd.h +++ b/logPlus/DrawTvd.h @@ -17,7 +17,9 @@ //BEGIN_OSGGRAPHICS_NAMESPACE; -#define GetClassID_ObjDrawTvd() "{98EB165F-1371-4D9F-9476-E4F5C19869B7}" +#pragma execution_character_set("utf-8") + +//#define GetClassID_ObjDrawTvd() "{98EB165F-1371-4D9F-9476-E4F5C19869B7}" typedef struct BxPointMessage { int Style; diff --git a/logPlus/ViewInfo.h b/logPlus/ViewInfo.h index d738d39..062c712 100644 --- a/logPlus/ViewInfo.h +++ b/logPlus/ViewInfo.h @@ -11,6 +11,7 @@ #include #include +#pragma execution_character_set("utf-8") class CViewInfo : public QObject { Q_OBJECT diff --git a/logPlus/formdraw.cpp b/logPlus/formdraw.cpp index 313f350..6bf3e72 100644 --- a/logPlus/formdraw.cpp +++ b/logPlus/formdraw.cpp @@ -1310,7 +1310,7 @@ void FormDraw::s_addSantuyibiao(QString strUuid, QString strSlfName, QString str { dHight = 32767; } - curv->setGeometry(0, 0, g_iOneWidth, (int)dHight); + curv->setGeometry(0, 0, g_iOneWidth*4, (int)dHight); curv->show(); //斜井三图一表 diff --git a/logPlus/formline.cpp b/logPlus/formline.cpp index 41ee2ec..75d6921 100644 --- a/logPlus/formline.cpp +++ b/logPlus/formline.cpp @@ -18,15 +18,15 @@ FormLine::FormLine(QWidget *parent, QString strSlfName, QString strWellName, QSt void FormLine::DrawTvd() { - // - QPainter painter(this); - QRect rect = this->rect(); - //背景透明 - painter.fillRect(rect.left(), rect.top(), rect.width(), rect.height(), QColor(0, 0, 0, 0)); //QColor(67, 67, 67, 100) +// // +// QPainter painter(this); +// QRect rect = this->rect(); +// //背景透明 +// painter.fillRect(rect.left(), rect.top(), rect.width(), rect.height(), QColor(0, 0, 0, 0)); //QColor(67, 67, 67, 100) - CDrawTvd *drawTvd = new CDrawTvd(); - drawTvd->sFilePath = m_strSlfName; - drawTvd->DrawTvd(&painter, rect); +// CDrawTvd *drawTvd = new CDrawTvd(); +// drawTvd->sFilePath = m_strSlfName; +// drawTvd->DrawTvd(&painter, rect); } FormLine::~FormLine() @@ -36,6 +36,16 @@ FormLine::~FormLine() void FormLine::paintEvent(QPaintEvent*) { + // + QPainter painter(this); + QRect rect = this->rect(); + //背景透明 + painter.fillRect(rect.left(), rect.top(), rect.width(), rect.height(), QColor(0, 0, 0, 0)); //QColor(67, 67, 67, 100) + + CDrawTvd *drawTvd = new CDrawTvd(); + drawTvd->sFilePath = m_strSlfName; + drawTvd->DrawTvd(&painter, rect); + // QPainter painter(this); // QRect rect = this->rect(); // //背景透明 diff --git a/logPlus/mainwindowcurve.cpp b/logPlus/mainwindowcurve.cpp index f7ce6ce..bab7010 100644 --- a/logPlus/mainwindowcurve.cpp +++ b/logPlus/mainwindowcurve.cpp @@ -1400,7 +1400,7 @@ void MainWindowCurve::NewWellAndTrack(QString strWellName, QString strSlfName, Q if(strType=="SantuyibiaoObject") { //斜井三图一表 - nW = g_iOneWidth*2; + nW = g_iOneWidth*4; } //