SLFAsciiConvertor 适配linux
This commit is contained in:
parent
3f9dd8a9c3
commit
8a449628fa
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
|
|
@ -231,6 +231,7 @@ int getPaiSystemColorNumber(QStringList &names)
|
|||
fclose(fp1);
|
||||
return i;
|
||||
}
|
||||
|
||||
int getPaiSystemColor(int nIndex,QVector<QtColorItem> &colorList,bool inpolation)
|
||||
{
|
||||
colorList.clear();
|
||||
|
|
@ -239,6 +240,7 @@ int getPaiSystemColor(int nIndex,QVector<QtColorItem> &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<QtColorItem> &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<size;i++) {
|
||||
QtScheme_Color sc;
|
||||
memset(&sc,0,sizeof(QtScheme_Color));
|
||||
sc.isCustom=m_colorSchemeList[i].isCustom;
|
||||
sc.isDirty=m_colorSchemeList[i].isDirty;
|
||||
sc.currentIndex=m_colorSchemeList[i].currentIndex;
|
||||
sc.isCustom=m_colorSchemeList[i].isCustom;
|
||||
strcpy(sc.schemeName,m_colorSchemeList[i].schemeName.toStdString().c_str());
|
||||
sc.size=m_colorSchemeList[i].colorList.size();
|
||||
for(int j=0;j<m_colorSchemeList[i].colorList.size();j++) {
|
||||
sc.colorList[j].color=m_colorSchemeList[i].colorList[j].color.rgb();
|
||||
sc.colorList[j].fromValue=m_colorSchemeList[i].colorList[j].fromValue;
|
||||
sc.colorList[j].toValue=m_colorSchemeList[i].colorList[j].toValue;
|
||||
strcpy(sc.colorList[j].strComments,m_colorSchemeList[i].colorList[j].strComments.toStdString().c_str());
|
||||
}
|
||||
memmove(&buffer[4]+i*sizeof(QtScheme_Color),&sc,sizeof(QtScheme_Color));
|
||||
}
|
||||
}
|
||||
// {
|
||||
// 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<size;i++) {
|
||||
// QtScheme_Color sc;
|
||||
// memset(&sc,0,sizeof(QtScheme_Color));
|
||||
// sc.isCustom=m_colorSchemeList[i].isCustom;
|
||||
// sc.isDirty=m_colorSchemeList[i].isDirty;
|
||||
// sc.currentIndex=m_colorSchemeList[i].currentIndex;
|
||||
// sc.isCustom=m_colorSchemeList[i].isCustom;
|
||||
// strcpy(sc.schemeName,m_colorSchemeList[i].schemeName.toStdString().c_str());
|
||||
// sc.size=m_colorSchemeList[i].colorList.size();
|
||||
// for(int j=0;j<m_colorSchemeList[i].colorList.size();j++) {
|
||||
// sc.colorList[j].color=m_colorSchemeList[i].colorList[j].color.rgb();
|
||||
// sc.colorList[j].fromValue=m_colorSchemeList[i].colorList[j].fromValue;
|
||||
// sc.colorList[j].toValue=m_colorSchemeList[i].colorList[j].toValue;
|
||||
// strcpy(sc.colorList[j].strComments,m_colorSchemeList[i].colorList[j].strComments.toStdString().c_str());
|
||||
// }
|
||||
// memmove(&buffer[4]+i*sizeof(QtScheme_Color),&sc,sizeof(QtScheme_Color));
|
||||
// }
|
||||
// }
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -431,7 +435,7 @@ int QtColorTableData::getColorConfig(QVector <QString> &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))
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ TIME WF
|
|||
// #include "WellBaseInfo.h"
|
||||
#include <qstringlist.h>
|
||||
#include "geometryutils.h"
|
||||
#include "..\\..\\TexOutFun\\TxtOutFun.cpp"
|
||||
#include "../../TexOutFun/TxtOutFun.cpp"
|
||||
extern int HeadLineNum;//文件头行数
|
||||
#pragma warning( pop)
|
||||
BEGIN_OSGGRAPHICS_NAMESPACE;
|
||||
|
|
|
|||
|
|
@ -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\
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
#include <QTime>
|
||||
#include <QTextStream>
|
||||
#include <QTextCodec>
|
||||
#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;
|
||||
QList<double>dates;
|
||||
QList<double>depths;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user