diff --git a/YSGraphic_Core/RenderAble.cpp b/YSGraphic_Core/RenderAble.cpp index 499ad7c..1ba4e79 100644 --- a/YSGraphic_Core/RenderAble.cpp +++ b/YSGraphic_Core/RenderAble.cpp @@ -1,7 +1,12 @@ #include "RenderAble.h" + +#include + #include "base/Plot.h" #include "Axis/AbsAxis.h" #include "plottable/HoverInfo.h" +#include "psc_global_include/export.h" +#include "psc_global_include/Fail_Fast.h" namespace YSG { @@ -129,10 +134,20 @@ namespace YSG { QVector getTurboColorGradient() { QVector colors; + // std::cout << "11111111111111111111111111111111111111" << std::endl; + // for (auto s : QDir(":/").entryList()) + // { + // std::cout << "QDir=============" << s.toStdString() << std::endl; + // } + // + // std::cout << "11111111111111111111111111111111111111" << std::endl; + // QFile file(":/turbo.colorMap"); if (!file.open(QIODevice::ReadOnly)) { - qDebug() << "getTurboColorGradient2: Failed to open file"; + std::ostringstream oss; + oss << file.errorString().toStdString() << " getTurboColorGradient2: Failed to open file" << LOG_POS_SIMPLE << std::endl; + Psc::fail_fast(oss.str()); return colors; // 返回一个空的 std::vector } diff --git a/YSGraphic_Core/base/Global.h b/YSGraphic_Core/base/Global.h index e760c63..47d5f47 100644 --- a/YSGraphic_Core/base/Global.h +++ b/YSGraphic_Core/base/Global.h @@ -5,6 +5,7 @@ #include #include +extern int qInitResources_resource(); namespace YSG { class LIB_DECL TimerThread : public QThread { Q_OBJECT @@ -14,8 +15,11 @@ namespace YSG { void run() override; }; + + class LIB_DECL Global : public QObject, public Psc::Singleton { public: + int r = qInitResources_resource(); int mTimerId{}; QMap mTimerThreadMap; int mInterval = 10; diff --git a/main.cmake b/main.cmake index 18a6c17..0830a97 100644 --- a/main.cmake +++ b/main.cmake @@ -10,7 +10,7 @@ endif() set(dir "${CMAKE_CURRENT_LIST_DIR}/YSGraphic_Core") -file(GLOB_RECURSE srcs "${dir}/*.c" "${dir}/*.cpp" "${dir}/*.h") +file(GLOB_RECURSE srcs "${dir}/*.c" "${dir}/*.cpp" "${dir}/*.h" "${dir}/*.qrc") add_library(YSGraphic_Core STATIC "${srcs}") target_include_directories(YSGraphic_Core PUBLIC "${CMAKE_CURRENT_LIST_DIR}")