diff --git a/DrawBase/include/drawbase_global.h b/DrawBase/include/drawbase_global.h index 27369af..20aafd9 100644 --- a/DrawBase/include/drawbase_global.h +++ b/DrawBase/include/drawbase_global.h @@ -1,11 +1,14 @@ -#ifndef DRAWBASE_GLOBAL_H +#ifndef DRAWBASE_GLOBAL_H #define DRAWBASE_GLOBAL_H +#ifdef WIN32 + # ifdef DRAWBASE_LIB_EXPORT + # define DRAWBASE_EXPORT __declspec(dllexport) + # else + # define DRAWBASE_EXPORT __declspec(dllimport) + # endif +#else + #define DRAWBASE_EXPORT +#endif -# ifdef DRAWBASE_LIB_EXPORT -# define DRAWBASE_EXPORT __declspec(dllexport) -# else -# define DRAWBASE_EXPORT __declspec(dllimport) -# endif - -#endif \ No newline at end of file +#endif diff --git a/DrawBase/src/DrawBase.pro b/DrawBase/src/DrawBase.pro index c5a737c..72145ab 100644 --- a/DrawBase/src/DrawBase.pro +++ b/DrawBase/src/DrawBase.pro @@ -28,7 +28,7 @@ INCLUDEPATH += ../../common \ ../../Workflow/WFEngine/ObjectModel/ObjectModelBase/include\ ../../Workflow/WFWidget/include -# HEADERS += ../include/*.h +HEADERS += ../include/*.h SOURCES += *.cpp diff --git a/Slfio/src/slf.cpp b/Slfio/src/slf.cpp index baffd82..798fe69 100644 --- a/Slfio/src/slf.cpp +++ b/Slfio/src/slf.cpp @@ -43,6 +43,7 @@ CString MemName(CString wellname,CString Curve) wchar_t* AnsiToUnicode(const char* szStr) { +#ifdef WIN32 int nLen = MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, szStr, -1, NULL, 0 ); if (nLen == 0) { @@ -51,9 +52,14 @@ wchar_t* AnsiToUnicode(const char* szStr) wchar_t* pResult = new wchar_t[nLen]; MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, szStr, -1, pResult, nLen ); return pResult; +#else + wchar_t* pResult = new wchar_t[1]; + return pResult; +#endif } int IsMappingMem(const char *MemName) { +#ifdef WIN32 QString slf1=MemName; slf1.replace("\\","/"); slf1.replace(".","_"); @@ -65,9 +71,13 @@ int IsMappingMem(const char *MemName) // (GetLastError() == ERROR_ALREADY_EXISTS); CloseHandle(hMapFile); return fInit; +#else + return 0; +#endif } bool MappingMem(HANDLE *hHandle,LPSTR *hMem,int len,const char* name) { +#ifdef WIN32 QString slf1=name; slf1.replace("\\","/"); slf1.replace(".","_"); @@ -97,12 +107,19 @@ bool MappingMem(HANDLE *hHandle,LPSTR *hMem,int len,const char* name) 0); // default: map entire file if (*hMem == NULL) return FALSE; return TRUE; +#else + return FALSE; +#endif } void CloseView(HANDLE hMapObject,LPVOID lpvMem) { +#ifdef WIN32 if(lpvMem)UnmapViewOfFile(lpvMem); if(hMapObject)CloseHandle(hMapObject); +#else + return; +#endif } time_t StringToTime(char * szTime) diff --git a/Workflow/WFCrystal/SysUtility/utils/include/Turtle_globle.h b/Workflow/WFCrystal/SysUtility/utils/include/Turtle_globle.h index 8897b7c..fbf88cf 100644 --- a/Workflow/WFCrystal/SysUtility/utils/include/Turtle_globle.h +++ b/Workflow/WFCrystal/SysUtility/utils/include/Turtle_globle.h @@ -1,4 +1,4 @@ -/** +/** * @file Turtle_globle.h * @brief * @@ -10,7 +10,7 @@ namespace pai{ namespace turtle { -#if defined(_WINDOWS) +#if defined(WIN32) #define PAI_CURRENT_FUNCTION __FUNCSIG__ #define __func__ __FUNCTION__ #define VARIABLE_IS_NOT_USED __attribute__ ((unused)) diff --git a/Workflow/WFCrystal/SysUtility/utils/src/Utils.cpp b/Workflow/WFCrystal/SysUtility/utils/src/Utils.cpp index fe189e8..6937882 100644 --- a/Workflow/WFCrystal/SysUtility/utils/src/Utils.cpp +++ b/Workflow/WFCrystal/SysUtility/utils/src/Utils.cpp @@ -1,4 +1,4 @@ -#ifdef LLToString +#ifdef LLToString #undef LLToString #endif #include @@ -30,6 +30,7 @@ using std::endl; #include #include #include +#include #endif using namespace pai::turtle; diff --git a/Workflow/WFCrystal/WFCrystal.pro b/Workflow/WFCrystal/WFCrystal.pro index 32edbb9..3cc872d 100644 --- a/Workflow/WFCrystal/WFCrystal.pro +++ b/Workflow/WFCrystal/WFCrystal.pro @@ -59,6 +59,9 @@ HEADERS += \ ./SysUtility/utils/include/PAIConst.h \ ./SysUtility/configuration/include/Configure.h +HEADERS += \ + ./SysUtility/utils/include/*.h + SOURCES += \ ./Crystal/src/GlobalUtility.cpp \ ./Crystal/src/IExtension.cpp \ diff --git a/appDllTest/src/appDllTest.cpp b/appDllTest/src/appDllTest.cpp index 1f70a08..b644f6d 100644 --- a/appDllTest/src/appDllTest.cpp +++ b/appDllTest/src/appDllTest.cpp @@ -1,6 +1,6 @@ -#include "memrdwt.h" +#include "MemRdWt.h" #include "math.h" -#include "basefun.h" +#include "BaseFun.h" #include "appDllTest.h" #include "appDllTestDialog.h" Slf_WAVE mWave[1]; diff --git a/logPlus/formdraw.cpp b/logPlus/formdraw.cpp index 18e59f4..b743ef9 100644 --- a/logPlus/formdraw.cpp +++ b/logPlus/formdraw.cpp @@ -14,6 +14,8 @@ #include "PropertyWidget.h" #include "DrawTvd.h" #include "DepthProgress.h" +#include "CallGlobalManage.h" +// #include "CylinderImagePlot.h" //以下参数从配置文件读取 extern int g_iOneWidth; //道宽 @@ -3569,7 +3571,7 @@ void FormDraw::s_AddLine_Property(QString strUuid, QString strSlfName, QString s } //qDebug() << "FormDraw s_AddLine_Property"; - AppendConsole(PAI_INFO, "FormDraw s_AddLine_Property"); + //AppendConsole(PAI_INFO, "FormDraw s_AddLine_Property"); if(m_listLineName.contains(strLineName)) { @@ -3593,7 +3595,7 @@ void FormDraw::s_AddLine_Property(QString strUuid, QString strSlfName, QString s // m_listLineName.push_back(strLineName); - AppendConsole(PAI_INFO, "FormDraw s_AddLine_Property end"); + //AppendConsole(PAI_INFO, "FormDraw s_AddLine_Property end"); } //#include "CylinderImagePlot.h" void FormDraw::s_addWave(QString strUuid, QString strSlfName, QString strWellName, QString strTrackName, QString strWaveName) @@ -4168,7 +4170,7 @@ void FormDraw::setupSelectionDemo(QMyCustomPlot *customPlot) double key = customPlot->graph(i)->data()->at(k)->key; double value = customPlot->graph(i)->data()->at(k)->value; - AppendConsole(PAI_INFO, QString("曲线 %1: (%2, %3)").arg(i).arg(key).arg(value)); + //AppendConsole(PAI_INFO, QString("曲线 %1: (%2, %3)").arg(i).arg(key).arg(value)); } }*/ } @@ -4308,9 +4310,11 @@ void FormDraw::s_addDrawImage(QString strUuid, QString strSlfName, QString strWe } // - QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName); + + QMyCustomPlot *curv = new QMyCustomPlot(this, strSlfName, strWellName, strTrackName, strLineName, "DrawImageObject"); //绑定m_formTrack,方便关联formInfo curv->m_formTrack = m_formTrack; + curv->setScaleX(0, 264); curv->setDepthY(m_iY1, m_iY2); if (nW <= 0) nW = g_iOneWidth; @@ -4322,8 +4326,18 @@ void FormDraw::s_addDrawImage(QString strUuid, QString strSlfName, QString strWe QString strWaveName = ""; int _nSamples = 0; curv->initImage(strSlfName, strWaveName); + //curv->initImage3D(strSlfName, strWaveName); + //DrawImageNew_NoFilter(curv, strSlfName, strWaveName, _nSamples); + //curv->m_colorMap->setVisible(false); + //CylindricalImageMap* cylinderMap = new CylindricalImageMap(curv->xAxis, curv->yAxis); + //cylinderMap->setData(curv->m_colorMap->data()); + //cylinderMap->setCylinderRadius(2.0); + //cylinderMap->setSourceColorMap(curv->m_colorMap); // 共享梯度 + //cylinderMap->setAzimuth(45); + //cylinderMap->setElevation(30); + // connect(curv, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(s_mouseWheel(QWheelEvent*))); diff --git a/logPlus/qtprojectwidgets.cpp b/logPlus/qtprojectwidgets.cpp index 0143366..cab5759 100644 --- a/logPlus/qtprojectwidgets.cpp +++ b/logPlus/qtprojectwidgets.cpp @@ -47,7 +47,7 @@ QtProjectWidgets::QtProjectWidgets(QWidget *parent) connect(ui->btnFind, &QPushButton::clicked, this, [ = ]() { qDebug()<<"btnFind clicked"; - AppendConsole(PAI_INFO, "btnFind clicked..."); + //AppendConsole(PAI_INFO, "btnFind clicked..."); //emit CallManage::getInstance()->sig_Find(); }); diff --git a/qtpropertybrowser/ColorSchemeComboBox.cpp b/qtpropertybrowser/ColorSchemeComboBox.cpp index 95be9a5..98dd40f 100644 --- a/qtpropertybrowser/ColorSchemeComboBox.cpp +++ b/qtpropertybrowser/ColorSchemeComboBox.cpp @@ -5,7 +5,7 @@ #include #include #include "ColorSchemeComboBox.h" -#include "QtColorSchemeComboBox.h" +#include "qtColorSchemeComboBox.h" // #include "QtColorTableData.h" template static Value getData(const QMap &propertyMap, @@ -13,7 +13,7 @@ static Value getData(const QMap &propertyMap, const QtProperty *property, const Value &defaultValue = Value()) { typedef QMap PropertyToData; - typedef PropertyToData::const_iterator PropertyToDataConstIterator; + typedef typename PropertyToData::const_iterator PropertyToDataConstIterator; const PropertyToDataConstIterator it = propertyMap.constFind(property); if (it == propertyMap.constEnd()) return defaultValue; diff --git a/qtpropertybrowser/ColorSchemeComboBox.h b/qtpropertybrowser/ColorSchemeComboBox.h index b1ebbe7..e7bd666 100644 --- a/qtpropertybrowser/ColorSchemeComboBox.h +++ b/qtpropertybrowser/ColorSchemeComboBox.h @@ -1,4 +1,4 @@ - + #ifndef COLORSCHEMACOMOBOX_H #define COLORSCHEMACOMOBOX_H @@ -7,7 +7,7 @@ // #include #include "qtpropertybrowser.h" #include "qteditorfactory.h" -#include "QtColorSchemeComboBox.h" +#include "qtColorSchemeComboBox.h" //const QSize rectSize(200,15); QT_BEGIN_NAMESPACE diff --git a/qtpropertybrowser/Gradient.cpp b/qtpropertybrowser/Gradient.cpp index 2b0c15e..dc696e9 100644 --- a/qtpropertybrowser/Gradient.cpp +++ b/qtpropertybrowser/Gradient.cpp @@ -1,6 +1,7 @@ #include "Gradient.h" #include +#include //extern char *GetBinDir(char *str); BYTE GetRValue(COLORREF colour) diff --git a/qtpropertybrowser/Gradient.h b/qtpropertybrowser/Gradient.h index 20271e3..296ef22 100644 --- a/qtpropertybrowser/Gradient.h +++ b/qtpropertybrowser/Gradient.h @@ -24,8 +24,11 @@ typedef DWORD *LPCOLORREF; //#define GetRValue(rgb) (LOBYTE(rgb)) //#define GetGValue(rgb) (LOBYTE(((WORD)(rgb)) >> 8)) //#define GetBValue(rgb) (LOBYTE((rgb)>>16)) - -typedef COLORREF (__cdecl* InterpolateFn)(COLORREF first, COLORREF second, float position, float start, float end); +#ifdef WIN32 + typedef COLORREF (__cdecl* InterpolateFn)(COLORREF first, COLORREF second, float position, float start, float end); +#else + typedef COLORREF (* InterpolateFn)(COLORREF first, COLORREF second, float position, float start, float end); +#endif typedef struct CPeg { COLORREF colour; float position; diff --git a/qtpropertybrowser/qtColorSchemeComboBox.cpp b/qtpropertybrowser/qtColorSchemeComboBox.cpp index fb49e22..a1c2433 100644 --- a/qtpropertybrowser/qtColorSchemeComboBox.cpp +++ b/qtpropertybrowser/qtColorSchemeComboBox.cpp @@ -1,4 +1,4 @@ -/* +/* * QtColorSchemeComboBox.cpp * * Created on: 2013-5-27 @@ -12,6 +12,7 @@ #include #include "qtColorSchemeComboBox.h" #include "Gradient.h" +#include QtColorSchemeComboBox::QtColorSchemeComboBox(QWidget *parent):QtComboBox(parent), m_isShowText(true) {