logPlus 适配linux
This commit is contained in:
parent
dcefae14f0
commit
f55658f774
|
|
@ -4,7 +4,12 @@ greaterThan(QT_MAJOR_VERSION, 4): CONFIG += c++11
|
|||
|
||||
#下面用于开启opengl
|
||||
DEFINES += QCUSTOMPLOT_USE_OPENGL
|
||||
LIBS += -lopengl32 -lglu32
|
||||
win32 {
|
||||
LIBS += -lopengl32 -lglu32
|
||||
}
|
||||
unix:!macx {
|
||||
LIBS += -lGL
|
||||
}
|
||||
|
||||
#将当前目录加入到头文件路径
|
||||
INCLUDEPATH += $$PWD
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
#include "geometryutils.h"
|
||||
#include <qdir.h>
|
||||
#include "qapplication.h"
|
||||
#include <QMessageBox.h>
|
||||
#include <QMessageBox>
|
||||
|
||||
int GetDepPairs(float* curve1,float stdep1,float endep1,float rlev1,
|
||||
float* curve2,float stdep2,float endep2,float rlev2,float cmins,
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class DepPairs
|
|||
{
|
||||
protected:
|
||||
public:
|
||||
DepPairs::DepPairs(float* curve1,float stdep1,float endep1,float rlev1,
|
||||
DepPairs(float* curve1,float stdep1,float endep1,float rlev1,
|
||||
float* curve2,float stdep2,float endep2,float rlev2,float cmins,
|
||||
float winLength,float stepLength, float searchLength
|
||||
);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#include <cassert>
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include "MemRdwt.h"
|
||||
#include "MemRdWt.h"
|
||||
#include "DrawNrad.h"
|
||||
|
||||
#define MAX_ARM 100 // 最大臂数
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@
|
|||
#include "DrawBase.h"
|
||||
//#include "VecSceneManager.h"
|
||||
//#include "WellSectionWindowDocument.h"
|
||||
#include "memrdwt.h"
|
||||
#include "GeometryUtils.h"
|
||||
#include "MemRdWt.h"
|
||||
#include "geometryutils.h"
|
||||
#include "DrawTvd.h"
|
||||
#pragma warning( pop )
|
||||
|
||||
|
|
@ -202,12 +202,12 @@ void CDrawTvd::ReadData()
|
|||
for(int i=0;i<m_PointNum;i++)
|
||||
{
|
||||
mrw.ReadTable(index,i+1,&m_Lscx[i]);
|
||||
Xmax=__max(Xmax,m_Lscx[i].XE);
|
||||
Ymax=__max(Ymax,m_Lscx[i].YN);
|
||||
Xmin=__min(Xmin,m_Lscx[i].XE);
|
||||
Ymin=__min(Ymin,m_Lscx[i].YN);
|
||||
tvdmin=__min(tvdmin,m_Lscx[i].TVD);
|
||||
tvdmax=__max(tvdmax,m_Lscx[i].TVD);
|
||||
Xmax= qMax(Xmax,m_Lscx[i].XE);
|
||||
Ymax= qMax(Ymax,m_Lscx[i].YN);
|
||||
Xmin= qMin(Xmin,m_Lscx[i].XE);
|
||||
Ymin= qMin(Ymin,m_Lscx[i].YN);
|
||||
tvdmin=qMin(tvdmin,m_Lscx[i].TVD);
|
||||
tvdmax=qMax(tvdmax,m_Lscx[i].TVD);
|
||||
if(tmax<m_Lscx[i].HOFS)tmax=m_Lscx[i].HOFS;
|
||||
}
|
||||
mrw.CloseTable(index);
|
||||
|
|
@ -218,9 +218,9 @@ void CDrawTvd::ReadData()
|
|||
FPar.MaxYns=Ymax;
|
||||
FPar.MinYns=Ymin;
|
||||
float max;
|
||||
max=__max(Xmax,Ymax);
|
||||
max=__max(max,fabs(Xmin));
|
||||
max=__max(max,fabs(Ymin));
|
||||
max=qMax(Xmax,Ymax);
|
||||
max=qMax(max,fabs(Xmin));
|
||||
max=qMax(max,fabs(Ymin));
|
||||
Xmax=max;
|
||||
Xmin=-max;
|
||||
Ymax=max;
|
||||
|
|
@ -1190,9 +1190,7 @@ int CDrawTvd::DrawFst(int y_Start1, QPainter* pDC,QRectF mrt)
|
|||
if(m_ScBxPointMessage.MiaoShu[0]=='A')ScMiaoShu[0]+=ii;
|
||||
else if(ii>0)
|
||||
{
|
||||
char ss[4];
|
||||
itoa(ii,ss,10);
|
||||
strcat(ScMiaoShu,ss);
|
||||
strcat(ScMiaoShu,QString::number(ii).toStdString().c_str());
|
||||
}
|
||||
int h=strlen(ScMiaoShu);
|
||||
pDC->setPen(m_ScBxPointMessage.Color);
|
||||
|
|
@ -1201,9 +1199,7 @@ int CDrawTvd::DrawFst(int y_Start1, QPainter* pDC,QRectF mrt)
|
|||
if(m_SjBxPointMessage.MiaoShu[0]=='A')SjMiaoShu[0]+=ii;
|
||||
else if(ii>0)
|
||||
{
|
||||
char ss[4];
|
||||
itoa(ii,ss,10);
|
||||
strcat(SjMiaoShu,ss);
|
||||
strcat(SjMiaoShu,QString::number(ii).toStdString().c_str());
|
||||
}
|
||||
pDC->setPen(m_SjBxPointMessage.Color);
|
||||
if(0)
|
||||
|
|
@ -1533,9 +1529,7 @@ int CDrawTvd::DrawCst(int y_Start1, QPainter* pDC,QRectF mrt,CST_PAR CPar,int no
|
|||
if(m_ScBxPointMessage.MiaoShu[0]=='A')ScMiaoShu[0]+=i;
|
||||
else if(i>0)
|
||||
{
|
||||
char ss[4];
|
||||
itoa(i,ss,10);
|
||||
strcat(ScMiaoShu,ss);
|
||||
strcat(ScMiaoShu,QString::number(i).toStdString().c_str());
|
||||
}
|
||||
int h=strlen(ScMiaoShu);
|
||||
pDC->setPen(m_ScBxPointMessage.Color);
|
||||
|
|
@ -1544,9 +1538,7 @@ int CDrawTvd::DrawCst(int y_Start1, QPainter* pDC,QRectF mrt,CST_PAR CPar,int no
|
|||
if(m_SjBxPointMessage.MiaoShu[0]=='A')SjMiaoShu[0]+=i;
|
||||
else if(i>0)
|
||||
{
|
||||
char ss[4];
|
||||
itoa(i,ss,10);
|
||||
strcat(SjMiaoShu,ss);
|
||||
strcat(SjMiaoShu,QString::number(i).toStdString().c_str());
|
||||
}
|
||||
pDC->setPen(m_SjBxPointMessage.Color);
|
||||
pDC->drawText(x+xadd*strlen(SjMiaoShu)*NoteFontWidth,y+yadd*NoteFontHeight,QString::fromLocal8Bit(SjMiaoShu));
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#include <QTextStream>
|
||||
|
||||
#include <QGraphicsItem>
|
||||
#include "GeometryUtils.h"
|
||||
#include "geometryutils.h"
|
||||
#include "GeoIndicatorGenerator.h"
|
||||
|
||||
#include <fstream>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include <QGraphicsWidget>
|
||||
#include <QGraphicsView>
|
||||
#include <QStyleOptionGraphicsItem>
|
||||
#include "LogmudItemDrawer.h"
|
||||
#include "LogmuditemDrawer.h"
|
||||
#include <QtSvg/QSvgRenderer>
|
||||
#include <QtGlobal>
|
||||
#include <float.h>
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ bool LogmudResultItem::operator> (const LogmudResultItem& other)
|
|||
|
||||
bool LogmudResultItem::operator== (const LogmudResultItem& other)
|
||||
{
|
||||
return fabs(other.Number-Number)<1e-10;
|
||||
return qAbs(other.Number-Number)<1e-10;
|
||||
}
|
||||
|
||||
bool LogmudResultItem::Contains(double depth) const
|
||||
|
|
|
|||
|
|
@ -6761,7 +6761,7 @@ TDTResultItem* FormDraw::LoadTDTResult_SLF(QString strSlfName)
|
|||
if(!logio->Open(strSlfName.toStdString().c_str(),CSlfIO::modeRead))
|
||||
{
|
||||
delete logio;
|
||||
return false;
|
||||
return NULL;
|
||||
}
|
||||
QStringList slist;
|
||||
slist<<"U1_DOT"<<"U2_DOT"<<"U3_DOT"<<"U4_DOT"<<"U5_DOT"<<"U6_DOT"<<"U7_DOT"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
#include "formtrack.h"
|
||||
#include "LogIO.h"
|
||||
#include "MemRdWt.h"
|
||||
#include "FormLine.h"
|
||||
#include "formline.h"
|
||||
#include "FormBase.h"
|
||||
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "FormLogmud.h"
|
||||
#include "ui_FormLogmud.h"
|
||||
#include "formlogmud.h"
|
||||
#include "ui_formlogmud.h"
|
||||
#include <QPainter>
|
||||
#include "CallManage.h"
|
||||
#include "MemRdWt.h"
|
||||
|
|
|
|||
|
|
@ -35,11 +35,7 @@ protected:
|
|||
|
||||
bool IsFiniteNumber(float v)
|
||||
{
|
||||
#ifdef _MSC_VER
|
||||
return _finite(v) != 0;
|
||||
#else
|
||||
return (v == v) && (v <= FLT_MAX) && (v >= -FLT_MAX);
|
||||
#endif
|
||||
return qIsFinite(v) != 0;
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "FormTrackTop.h"
|
||||
#include "ui_FormTrackTop.h"
|
||||
#include "formtracktop.h"
|
||||
#include "ui_formtracktop.h"
|
||||
|
||||
#include "CallManage.h"
|
||||
#include <QDebug>
|
||||
|
|
|
|||
|
|
@ -201,7 +201,9 @@ else: unix:!android: target.path = /opt/$${TARGET}/bin
|
|||
|
||||
|
||||
include (3rd_qcustomplot/3rd_qcustomplot.pri)
|
||||
include (3rd_tiff/libtiff.pri)
|
||||
win32 {
|
||||
include (3rd_tiff/libtiff.pri)
|
||||
}
|
||||
|
||||
RESOURCES += \
|
||||
logplus.qrc
|
||||
|
|
@ -230,7 +232,9 @@ INCLUDEPATH += $$PWD/../DataMgr/include
|
|||
INCLUDEPATH += $$PWD/../DrawBase/include
|
||||
INCLUDEPATH += $$PWD/../ModuleConsole/include
|
||||
INCLUDEPATH += $$PWD/../WellLogModule/include
|
||||
INCLUDEPATH += $$PWD/../Workflow/include
|
||||
win32 {
|
||||
INCLUDEPATH += $$PWD/../Workflow/include
|
||||
}
|
||||
INCLUDEPATH += $$PWD/../Workflow/WFCrystal/Crystal/include
|
||||
INCLUDEPATH += $$PWD/../Workflow/WFCrystal/Plugin/include
|
||||
INCLUDEPATH += $$PWD/../Workflow/WFCrystal/SysUtility/utils/include
|
||||
|
|
@ -244,16 +248,20 @@ INCLUDEPATH += $$PWD/../Workflow/WFWidget/include
|
|||
INCLUDEPATH += $$PWD/../EditPlotHeader/include
|
||||
|
||||
CONFIG(debug, debug|release){
|
||||
LIBS += -L$$PWD/../Bin -lBaseFund
|
||||
LIBS += -L$$PWD/../Bin -lslfiod
|
||||
LIBS += -L$$PWD/../Bin -lWellLogUId
|
||||
LIBS += -L$$PWD/../Bin -lqtpropertybrowserd
|
||||
LIBS += -L$$PWD/../Bin -lConvertorManagerd
|
||||
LIBS += -L$$PWD/../Bin -lOSGDataModeld
|
||||
LIBS += -L$$PWD/../Bin -lDataOutputd
|
||||
LIBS += -L$$PWD/../Bin/ -lBaseFund
|
||||
LIBS += -L$$PWD/../Bin/ -lslfiod
|
||||
LIBS += -L$$PWD/../Bin/ -lWellLogUId
|
||||
LIBS += -L$$PWD/../Bin/ -lqtpropertybrowserd
|
||||
LIBS += -L$$PWD/../Bin/ -lConvertorManagerd
|
||||
LIBS += -L$$PWD/../Bin/ -lOSGDataModeld
|
||||
LIBS += -L$$PWD/../Bin/ -lDataOutputd
|
||||
LIBS += -L$$PWD/../Bin/ -lCallPlugind -lHPluginManaged
|
||||
LIBS += -L$$PWD/../Bin/ -lDataMgrd
|
||||
LIBS += -L$$PWD/../Bin/ -lDrawBased
|
||||
LIBS += -L$$PWD/../Bin/ -lWFWidgetd
|
||||
LIBS += -L$$PWD/../Bin/ -lWFCrystald
|
||||
LIBS += -L$$PWD/../Bin/ -lOSGFrameworkd
|
||||
LIBS += -L$$PWD/../Bin/ -lWellLogModuled
|
||||
LIBS += -L$$PWD/../Bin/ -lLogModuleConsoled
|
||||
LIBS += -L$$PWD/../Bin/ -lWFEngined
|
||||
LIBS += -L$$PWD/../Bin/ -lEditPlotHeaderd
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include <QFuture>
|
||||
#include <QtConcurrent/QtConcurrent>
|
||||
#include "fileopenthread.h"
|
||||
#include "ObjWellLogINP.h"
|
||||
#include "ObjWelllogINP.h"
|
||||
#include "TxtEditorDlg.h"
|
||||
#include "ObjWell.h"
|
||||
#include "wellloginformation.h"
|
||||
|
|
@ -473,7 +473,7 @@ void MainWindow::s_Open()
|
|||
fileFull = QFileDialog::getOpenFileName(this,
|
||||
tr("打开项目"),
|
||||
GetProjectFolder(),
|
||||
tr("项目文件(*.wwl)"));
|
||||
tr("项目文件 (*.wwl)"));
|
||||
if (!fileFull.isEmpty())
|
||||
{
|
||||
//关闭老项目
|
||||
|
|
|
|||
|
|
@ -19,8 +19,11 @@
|
|||
#include <QSvgGenerator>
|
||||
#include "ItemBorderDelegate.h"
|
||||
|
||||
#include "TIFFIO.H"
|
||||
#include "TIFF.H"
|
||||
#ifdef WIN32
|
||||
#include "tiffio.h"
|
||||
#include "tiff.h"
|
||||
#endif
|
||||
|
||||
#include "DepthProgress.h"
|
||||
#include "wellheader.h"
|
||||
|
||||
|
|
@ -2735,6 +2738,7 @@ QImage MainWindowCurve::convertToQImage(const QPixmap pixmap)
|
|||
|
||||
void MainWindowCurve::writeTiff(const QImage image, const QString filename)
|
||||
{
|
||||
#ifdef WIN32
|
||||
TIFF *tiff = TIFFOpen(filename.toStdString().c_str(), "w");
|
||||
if (!tiff) {
|
||||
qDebug() << "Error opening TIFF file for writing";
|
||||
|
|
@ -2774,11 +2778,12 @@ void MainWindowCurve::writeTiff(const QImage image, const QString filename)
|
|||
|
||||
// Close the TIFF file.
|
||||
TIFFClose(tiff);
|
||||
#endif
|
||||
}
|
||||
|
||||
bool MainWindowCurve::saveMultipageTiff(const QList<QImage> images, const QString filename)
|
||||
{
|
||||
|
||||
#ifdef WIN32
|
||||
int width_Max = images.first().width();
|
||||
int height_Total = 0; // 计算总高度
|
||||
for (const QImage &image : images)
|
||||
|
|
@ -2828,6 +2833,8 @@ bool MainWindowCurve::saveMultipageTiff(const QList<QImage> images, const QStrin
|
|||
}
|
||||
|
||||
TIFFClose(tiff);
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
#include "TransparentDraggableLine.h"
|
||||
#include "TransparentDraggableLine_Master.h"
|
||||
#include "transparentdraggableSelectRect.h"
|
||||
#include "transparentdraggableLayer.h"
|
||||
#include "TransparentDraggableLayer.h"
|
||||
#include "transparentdraggableRightList.h"
|
||||
#include "TransparentDraggableCorePhysics.h"
|
||||
#include "qtcommonclass.h"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "qmytreewidget.h"
|
||||
#include "ObjWellLog.h"
|
||||
#include "ObjWelllog.h"
|
||||
#include<QMessageBox>
|
||||
|
||||
QMyTreeWidget::QMyTreeWidget(QWidget *parent)
|
||||
|
|
|
|||
|
|
@ -266,6 +266,7 @@ void QtProjectWidgets::s_loadTreeWidget(QString fileFull)
|
|||
itemIndex->setExpanded(true);
|
||||
}
|
||||
|
||||
|
||||
void QtProjectWidgets::loadIndexSysTree(QTreeWidgetItem *parent, QString fileFull, QString prjname)
|
||||
{
|
||||
//Logdata
|
||||
|
|
@ -297,6 +298,10 @@ void QtProjectWidgets::loadIndexSysTree(QTreeWidgetItem *parent, QString fileFul
|
|||
}
|
||||
else
|
||||
{
|
||||
qDebug() << " folderPath " << folderPath;
|
||||
|
||||
|
||||
|
||||
//井目录
|
||||
//取当前当前目录内容
|
||||
QDir dir(folderPath);
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ void SelectLineDialog::setInfo(QString fileFull, QString strWellName, QString st
|
|||
#ifdef WIN32
|
||||
if(_isnan(temp)||!_finite(temp)) continue;
|
||||
#else
|
||||
if(__isnan(temp)||!__finite(temp)) continue;
|
||||
if(qIsNaN(temp)||!qIsFinite(temp)) continue;
|
||||
#endif // WIN32
|
||||
|
||||
if(acurveinfo.MaxValue<temp) if(temp!=-9999.0&&temp!=-999.25&&temp!=-99999.0)acurveinfo.MaxValue=temp;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user