From 8a449628fae004c0922c6a4ac44a9b720646a364 Mon Sep 17 00:00:00 2001 From: jinyuan Date: Fri, 15 May 2026 09:56:42 +0800 Subject: [PATCH] =?UTF-8?q?SLFAsciiConvertor=20=E9=80=82=E9=85=8Dlinux?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- qtpropertybrowser/Gradient.cpp | 2 +- qtpropertybrowser/qtColorSchemeComboBox.cpp | 56 ++++++++++--------- .../src/SLFAsciiConvertor.cpp | 2 +- .../src/SLFAsciiConvertor.pro | 4 +- tran/TexOutFun/TxtOutFun.cpp | 8 +-- 5 files changed, 39 insertions(+), 33 deletions(-) diff --git a/qtpropertybrowser/Gradient.cpp b/qtpropertybrowser/Gradient.cpp index dc696e9..df07a32 100644 --- a/qtpropertybrowser/Gradient.cpp +++ b/qtpropertybrowser/Gradient.cpp @@ -495,7 +495,7 @@ void CGradient::Serialize(QString strCfg)//CArchive &ar) //GetBinDir(str); memset(str, '\0', sizeof (str)); strcat(str, QCoreApplication::applicationDirPath().toStdString().c_str()); - strcat(str,"\\color\\"); + strcat(str,"/color/"); strcat(str,strCfg.toStdString().c_str()); //strcat(str,"_clr.cfg"); diff --git a/qtpropertybrowser/qtColorSchemeComboBox.cpp b/qtpropertybrowser/qtColorSchemeComboBox.cpp index a1c2433..166fe84 100644 --- a/qtpropertybrowser/qtColorSchemeComboBox.cpp +++ b/qtpropertybrowser/qtColorSchemeComboBox.cpp @@ -231,6 +231,7 @@ int getPaiSystemColorNumber(QStringList &names) fclose(fp1); return i; } + int getPaiSystemColor(int nIndex,QVector &colorList,bool inpolation) { colorList.clear(); @@ -239,6 +240,7 @@ int getPaiSystemColor(int nIndex,QVector &colorList,bool inpolation QString strPathTmp = QCoreApplication::applicationDirPath() + QDir::separator(); strImagePath = QDir::toNativeSeparators( strPathTmp ); QString filecfg=strImagePath+"image"+QDir::separator()+"colortable"+QDir::separator()+"colortable.cfg"; + FILE *fp1=fopen(filecfg.toStdString().c_str(),"rt"); if(!fp1) return -1; char buf[100]; @@ -254,7 +256,9 @@ int getPaiSystemColor(int nIndex,QVector &colorList,bool inpolation } fclose(fp1); if(str.isEmpty()) return -1; + str = str.replace('\\', '/'); QString filename=strImagePath+"image"+QDir::separator()+"colortable"+QDir::separator()+str; + FILE *fp=fopen(filename.toStdString().c_str(),"rt"); if(!fp) return -1; float r,g,b; @@ -394,31 +398,31 @@ bool QtColorTableData::LoadScheme(bool IsReLoad) { m_SharedMemory.setKey(m_modulName); } - { - if(m_SharedMemory.isAttached()) m_SharedMemory.detach(); - m_SharedMemory.create(sizeof(QtScheme_Color)*m_colorSchemeList.size()+sizeof(int)); - if(!m_SharedMemory.isAttached()) m_SharedMemory.attach(); - char *buffer=(char*)m_SharedMemory.data(); - *(int *)buffer=m_colorSchemeList.size(); - int size=m_colorSchemeList.size(); - for(int i=0;i &qFiles) //GetBinDir(str); qstr = QCoreApplication::applicationDirPath();//QString(QLatin1String(str)); //char*=>QString - qstr += "\\color\\colorConfig.list"; + qstr += "/color/colorConfig.list"; qFiles.clear(); QFile f(qstr); if (!f.open(QIODevice::ReadOnly | QIODevice::Text)) diff --git a/tran/SLFAscIIConvertor/src/SLFAsciiConvertor.cpp b/tran/SLFAscIIConvertor/src/SLFAsciiConvertor.cpp index e3ad3d1..5f6967c 100644 --- a/tran/SLFAscIIConvertor/src/SLFAsciiConvertor.cpp +++ b/tran/SLFAscIIConvertor/src/SLFAsciiConvertor.cpp @@ -55,7 +55,7 @@ TIME WF // #include "WellBaseInfo.h" #include #include "geometryutils.h" -#include "..\\..\\TexOutFun\\TxtOutFun.cpp" +#include "../../TexOutFun/TxtOutFun.cpp" extern int HeadLineNum;//文件头行数 #pragma warning( pop) BEGIN_OSGGRAPHICS_NAMESPACE; diff --git a/tran/SLFAscIIConvertor/src/SLFAsciiConvertor.pro b/tran/SLFAscIIConvertor/src/SLFAsciiConvertor.pro index c91ae18..7e2cf14 100644 --- a/tran/SLFAscIIConvertor/src/SLFAsciiConvertor.pro +++ b/tran/SLFAscIIConvertor/src/SLFAsciiConvertor.pro @@ -16,7 +16,9 @@ INCLUDEPATH += $(OSGHOME)/include \ ../../../Slfio/include\ ../../../ConvertorManager/include\ ../../../OSGDataModel/include\ -../../../Workflow/include\ +win32 { + INCLUDEPATH += ../../../Workflow/include +} ../../../Workflow/WFCrystal/Crystal/include\ ../../../Workflow/WFCrystal/Plugin/include\ ../../../Workflow/WFCrystal/SysUtility/utils/include\ diff --git a/tran/TexOutFun/TxtOutFun.cpp b/tran/TexOutFun/TxtOutFun.cpp index 659cc30..d8a2a6d 100644 --- a/tran/TexOutFun/TxtOutFun.cpp +++ b/tran/TexOutFun/TxtOutFun.cpp @@ -2,11 +2,11 @@ #include #include #include -#include "basefun.h" -#include "memrdwt.h" +#include "BaseFun.h" +#include "MemRdWt.h" #include "CStringType.h" #include "DepthProgress.h" -#include "GeometryUtils.h" +#include "geometryutils.h" QString cfg; QListdates; QListdepths; @@ -866,4 +866,4 @@ bool Tran(char *FileName,char *outfile,int *OutCurveNo,char **OutCurve,char **st Stime+=QString::fromLocal8Bit("\r\n共")+QString::number(elapsed)+QString::fromLocal8Bit("毫秒"); //QMessageBox::about(NULL,QString::fromLocal8Bit("解编运行时间"),Stime); return TRUE; -} \ No newline at end of file +}