diff --git a/.gitignore b/.gitignore index fdf9c0376a..7df1139e27 100644 --- a/.gitignore +++ b/.gitignore @@ -93,3 +93,4 @@ moc_predefs.h *.prl Sicherungskopie_* /examples/simpletest_rgbimageplot_opencv/opencv +/build diff --git a/CMakeLists.txt b/CMakeLists.txt index 10c1044377..a9902b5580 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,7 +26,7 @@ if(NOT DEFINED BUILD_EXAMPLES) option(BUILD_EXAMPLES "Build examples" ON) endif() if(NOT DEFINED BUILD_HAS_OPENCV) - option(BUILD_HAS_OPENCV "OpenCV available?" OFF) + option(BUILD_HAS_OPENCV "OpenCV available? If yes, OpenCV examples are built when BUILD_EXAMPLES=ON" OFF) endif() if(NOT DEFINED LIB_INSTALL) option(LIB_INSTALL "Install library" ON) @@ -54,13 +54,7 @@ set(CMAKE_AUTOUIC ON) # Find includes in the build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) -# Set a default build type if none was specified -#if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) -# message(STATUS "Setting build type to 'Debug' as none was specified") -# set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build" FORCE) -# # Set the possible values of build type for cmake-gui -# set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo") -#endif() + if (NOT CMAKE_INSTALL_LIBDIR) set(CMAKE_INSTALL_LIBDIR "lib") @@ -91,21 +85,29 @@ if(MSVC) # To fix error: C2338: va_start argument must not # have reference type and must not be parenthesized add_definitions(/D_CRT_NO_VA_START_VALIDATION) + if(BUILD_INCLUDE_XITS_FONTS) + add_definitions(/DAUTOLOAD_XITS_FONTS) + add_definitions(/DUSE_XITS_FONTS ) + else() + add_definitions(/DNO_XITS_FONTS ) + endif() + set(CMAKE_MSVCIDE_RUN_PATH ${CMAKE_PREFIX_PATH};${Qt5_DIR}/bin) else() add_compile_options(-fexceptions) if(BUILD_HIGH_COMPILE_WARNING_LEVEL) add_compile_options(-Wall -Wextra) # -Wimplicit-fallthrough -Wuninitialized -Wmaybe-uninitialized) # -Wmisleading-indentation -Weffc++) endif(BUILD_HIGH_COMPILE_WARNING_LEVEL) -endif() -if(BUILD_INCLUDE_XITS_FONTS) - add_definitions(-DAUTOLOAD_XITS_FONTS -DUSE_XITS_FONTS ) -else() - add_definitions(-DNO_XITS_FONTS ) + if(BUILD_INCLUDE_XITS_FONTS) + add_definitions(-DAUTOLOAD_XITS_FONTS) + add_definitions(-DUSE_XITS_FONTS ) + else() + add_definitions(-DNO_XITS_FONTS ) + endif() endif() if(BUILD_DECORATE_LIBNAMES_WITH_BUILDTYPE) - set(LIBNAME_ADDITION "_${CMAKE_BUILD_TYPE}") + set(LIBNAME_ADDITION "_$") #"_${CMAKE_BUILD_TYPE}") else() set(LIBNAME_ADDITION ) endif() diff --git a/README.md b/README.md index 50a6534632..3b2b7924cf 100644 --- a/README.md +++ b/README.md @@ -60,18 +60,17 @@ The [Screenshots-page](./screenshots/) contains several screenshots, partly take ## Building -Simply use CMake, e.g. from QTCreator, or by calling something like: + +JKQTPlotter contains two different build systems: A modern [CMake](https://cmake.org/)-based build and an older QMake-based build (which works out of the box with Qt 5.x). Both systems are explained in detail in http://jkriege2.github.io/JKQtPlotter/page_buildinstructions.html. + + +With [CMake](https://cmake.org/) you can easily build JKQTPlotter and all its examples, by calling something like: ``` $ mkdir build; cd build - $ cmake ../ - $ make - $ make install + $ cmake .. -G "" "-DCMAKE_PREFIX_PATH=" + $ cmake --build . --config "Debug" ``` -Building instructions for QMake can be found here: -- include necessary files into QMake project: [`./lib/*.pri`](./lib/README.md) -- [build a static library](./staticlib): [`./qmake/staticlib/*.pro`](./qmake/staticlib/README.md) -- [build a shared library (DLL, SO, ...)](./sharedlib): [`./qmake/sharedlib/*.pro`](./qmake/sharedlib/README.md) ## Continuous Integration Status diff --git a/appveyor.yml b/appveyor.yml index 459e2be16b..3ee2b17c59 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -17,35 +17,35 @@ environment: CMAKE_GENERATOR: "MinGW Makefiles" USE_CMAKE: true MSBUILD_FLAGS: - - QTABI: mingw53_32 - ARCH: x86 - QMAKESPEC: win32-g++ - MAKETOOL: mingw32-make - USE_CMAKE: false +# - QTABI: mingw53_32 +# ARCH: x86 +# QMAKESPEC: win32-g++ +# MAKETOOL: mingw32-make +# USE_CMAKE: false - QTABI: msvc2017_64 ARCH: x64 VSVER: 2017 CMAKE_GENERATOR: "Visual Studio 15 2017 Win64" USE_CMAKE: true MSBUILD_FLAGS: /verbosity:minimal /maxcpucount - - QTABI: msvc2017_64 - ARCH: x64 - VSVER: 2017 - QMAKESPEC: win32-msvc - MAKETOOL: jom - USE_CMAKE: false +# - QTABI: msvc2017_64 +# ARCH: x64 +# VSVER: 2017 +# QMAKESPEC: win32-msvc +# MAKETOOL: jom +# USE_CMAKE: false - QTABI: msvc2015 ARCH: x86 VSVER: 14 CMAKE_GENERATOR: "Visual Studio 15 2017" USE_CMAKE: true MSBUILD_FLAGS: /verbosity:minimal /maxcpucount - - QTABI: msvc2015 - ARCH: x86 - VSVER: 14 - QMAKESPEC: win32-msvc - MAKETOOL: jom - USE_CMAKE: false +# - QTABI: msvc2015 +# ARCH: x86 +# VSVER: 14 +# QMAKESPEC: win32-msvc +# MAKETOOL: jom +# USE_CMAKE: false skip_tags: true diff --git a/doc/dox/buildinstructions.dox b/doc/dox/buildinstructions.dox index bd561ec9a4..c71a7a6f54 100644 --- a/doc/dox/buildinstructions.dox +++ b/doc/dox/buildinstructions.dox @@ -7,23 +7,68 @@ This page explains how to use JKQTPlotter in your own Projects \section page_buildinstructions_CMAKE Build using CMake -The preferred way to build JKQTPlotter is using CMake. The CMake-build is defined in `CMakeLists.txt` files, found in many of the directories of the code repository. +\subsection page_buildinstructions_CMAKE_RUN Running a Build with CMake -You can build JKQTPlotter (and also the examples) by: - - Either opening the file CMakeLists.txt in QTCreator (which has CMake integration) - - Or by calling something like this from the source directory: - - \code{.sh} - $ mkdir build; cd build - $ cmake ../ - $ make - $ make install - \endcode +The preferred way to build JKQTPlotter is using CMake. The CMake-build is defined in `CMakeLists.txt` files, found in many of the directories of the code repository. + +You can build JKQTPlotter (and also the examples) by either opening the file CMakeLists.txt in QTCreator (which has CMake integration), or by calling \c CMake by hand. How to do this depends on your local system und build environment. + + +\subsubsection page_buildinstructions_CMAKE_MAKEFILE Building with MinGW/GNU/... Makefiles + +You can use (MinGW) Makefiles by calling: + +\code{.sh} + $ mkdir build + $ cd build + $ cmake .. -G "MinGW Makefiles" "-DCMAKE_PREFIX_PATH=" + $ cmake --build . --config "Debug" +\endcode + +\subsubsection page_buildinstructions_CMAKE_VSTUDIO Building with Visual Studio + +For Visual Studio it could look like this: +\code{.sh} + $ mkdir build + $ cd build + $ cmake .. -G "Visual Studio 15 2017 Win64" "-DCMAKE_PREFIX_PATH=" +\endcode +Where \c could be e.g. \c C:/development/Qt5/5.12.0/msvc2017_64 . This call results in a Visual Studio solution \c build/JKQTPlotter.sln that you can load and compile from the Visual Studio IDE. Alternatively you can also build the solution directly calling: +\code{.sh} + $ cmake --build . --config "Debug" +\endcode + + + +\subsection page_buildinstructions_CMAKE_CONFIG Configuring a Build with CMake + +The CMake build system offers several configuration variables that you may set/change to modify the outcome of the build: + - \c CMAKE_PREFIX_PATH : add the path to your Qt installatrion to this variable, so the \c find_package(Qt5...) commands find the libraries you want to use + - \c BUILD_SHARED_LIBS : Build as shared library (default: \c ON ) + - \c BUILD_STATIC_LIBS : Build as static library (default: \c ON ) + - \c BUILD_INCLUDE_XITS_FONTS : Include XITS fonts as resources in library (default: \c ON ) + - \c BUILD_DECORATE_LIBNAMES_WITH_BUILDTYPE : If set, the build-type is appended to the library name (default: \c ON ) + - \c BUILD_HIGH_COMPILE_WARNING_LEVEL : Set Compiler Warning level to high (default: \c OFF ) + - \c BUILD_EXAMPLES : Build examples (default: \c ON ) + - \c BUILD_HAS_OPENCV : OpenCV available? If yes, OpenCV examples are built when BUILD_EXAMPLES=ON (default: \c OFF ) + - \c LIB_INSTALL : Install library (default: \c ON ) + - \c CMAKE_INSTALL_PREFIX : Install directory (default: \c${CMAKE_CURRENT_SOURCE_DIR}/install ) . + + + + + + + + + \section page_buildinstructions_QMAKE Build using QMake + \subsection page_buildinstructions_QMAKEINCLUDE QMake Include Project + If you want to simply include the JKQTPlotter Source code into your projects, without build a shared or static library and linking against it, you can use one of these QMake-Include files: - lib/jkqtplotter.pri includes the complete library (JKQTPlotter, JKQTFastPlotter, JKQTMathText) - lib/jkqtmathtext.pri includes only JKQTMathText @@ -32,7 +77,7 @@ If you want to simply include the JKQTPlotter Source code into your projects, wi In your QMake-projects it is then sufficient to add a line like: \code{.qmake} -include(/lib/jkqtplotter.pri) + include(/lib/jkqtplotter.pri) \endcode \subsection page_buildinstructions_QMAKESTATIC QMake Static Library @@ -91,6 +136,7 @@ DEPENDPATH += \ /lib \ /qmake/sharedlib/jkqtplotterlib INCLUDEPATH += /lib +DEFINES += JKQTCOMMON_LIB_IN_DLL JKQTFASTPLOTTER_LIB_IN_DLL JKQTMATHTEXT_LIB_IN_DLL JKQTPLOTTER_LIB_IN_DLL CONFIG (debug, debug|release) { # ensure that DLLs are copied to the output directory install_jkqtplotter_dll.files = /qmake/sharedlib/jkqtplotterlib/debug/jkqtplotterlib_debug.* diff --git a/examples/advplotstyling/CMakeLists.txt b/examples/advplotstyling/CMakeLists.txt index 74fc184563..a463b2c8e5 100644 --- a/examples/advplotstyling/CMakeLists.txt +++ b/examples/advplotstyling/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS advplotstyling.qrc ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() # Installation diff --git a/examples/barchart/CMakeLists.txt b/examples/barchart/CMakeLists.txt index a8f3be89d2..2407bba8da 100644 --- a/examples/barchart/CMakeLists.txt +++ b/examples/barchart/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/boxplot/CMakeLists.txt b/examples/boxplot/CMakeLists.txt index 24ce1d9709..18ab65bf34 100644 --- a/examples/boxplot/CMakeLists.txt +++ b/examples/boxplot/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/contourplot/CMakeLists.txt b/examples/contourplot/CMakeLists.txt index 1759bf47a3..fd40677b89 100644 --- a/examples/contourplot/CMakeLists.txt +++ b/examples/contourplot/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/datastore/CMakeLists.txt b/examples/datastore/CMakeLists.txt index 3baadd3de5..7c1be28179 100644 --- a/examples/datastore/CMakeLists.txt +++ b/examples/datastore/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/datastore_groupedstat/CMakeLists.txt b/examples/datastore_groupedstat/CMakeLists.txt index 588689920f..aef8f11dc3 100644 --- a/examples/datastore_groupedstat/CMakeLists.txt +++ b/examples/datastore_groupedstat/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/datastore_iterators/CMakeLists.txt b/examples/datastore_iterators/CMakeLists.txt index 5bef5ca276..deed7e06ba 100644 --- a/examples/datastore_iterators/CMakeLists.txt +++ b/examples/datastore_iterators/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/datastore_regression/CMakeLists.txt b/examples/datastore_regression/CMakeLists.txt index 8aeca1c0fc..af9a74c08e 100644 --- a/examples/datastore_regression/CMakeLists.txt +++ b/examples/datastore_regression/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/datastore_statistics/CMakeLists.txt b/examples/datastore_statistics/CMakeLists.txt index 7a4cc696fc..9dc73a8110 100644 --- a/examples/datastore_statistics/CMakeLists.txt +++ b/examples/datastore_statistics/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/datastore_statistics_2d/CMakeLists.txt b/examples/datastore_statistics_2d/CMakeLists.txt index e34f04d985..d4607117b4 100644 --- a/examples/datastore_statistics_2d/CMakeLists.txt +++ b/examples/datastore_statistics_2d/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/dateaxes/CMakeLists.txt b/examples/dateaxes/CMakeLists.txt index c488766676..fdacffd476 100644 --- a/examples/dateaxes/CMakeLists.txt +++ b/examples/dateaxes/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/distributionplot/CMakeLists.txt b/examples/distributionplot/CMakeLists.txt index 3cd0f5e9c7..252ba1a5a5 100644 --- a/examples/distributionplot/CMakeLists.txt +++ b/examples/distributionplot/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/errorbarstyles/CMakeLists.txt b/examples/errorbarstyles/CMakeLists.txt index e94cc077a2..eb0695f86a 100644 --- a/examples/errorbarstyles/CMakeLists.txt +++ b/examples/errorbarstyles/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/filledgraphs/CMakeLists.txt b/examples/filledgraphs/CMakeLists.txt index a64bd8e7c2..cf1b8c36e5 100644 --- a/examples/filledgraphs/CMakeLists.txt +++ b/examples/filledgraphs/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/functionplot/CMakeLists.txt b/examples/functionplot/CMakeLists.txt index 3e19238427..f8029c7911 100644 --- a/examples/functionplot/CMakeLists.txt +++ b/examples/functionplot/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/geometric/CMakeLists.txt b/examples/geometric/CMakeLists.txt index e917dc5535..46bf288134 100644 --- a/examples/geometric/CMakeLists.txt +++ b/examples/geometric/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/imageplot/CMakeLists.txt b/examples/imageplot/CMakeLists.txt index dc84faafd7..33fcca9ae9 100644 --- a/examples/imageplot/CMakeLists.txt +++ b/examples/imageplot/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/imageplot_modifier/CMakeLists.txt b/examples/imageplot_modifier/CMakeLists.txt index 41e6ad6242..2bc8e4c60a 100644 --- a/examples/imageplot_modifier/CMakeLists.txt +++ b/examples/imageplot_modifier/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/imageplot_nodatastore/CMakeLists.txt b/examples/imageplot_nodatastore/CMakeLists.txt index 5053812a38..0c6caee156 100644 --- a/examples/imageplot_nodatastore/CMakeLists.txt +++ b/examples/imageplot_nodatastore/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/imageplot_opencv/CMakeLists.txt b/examples/imageplot_opencv/CMakeLists.txt index 8e07fd63b9..b354f04bac 100644 --- a/examples/imageplot_opencv/CMakeLists.txt +++ b/examples/imageplot_opencv/CMakeLists.txt @@ -17,9 +17,9 @@ if (BUILD_HAS_OPENCV) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() include_directories( ${OpenCV_INCLUDE_DIRS} ) target_link_libraries(${EXENAME} ${OpenCV_LIBS} ) diff --git a/examples/impulsesplot/CMakeLists.txt b/examples/impulsesplot/CMakeLists.txt index 22f7104746..2655373646 100644 --- a/examples/impulsesplot/CMakeLists.txt +++ b/examples/impulsesplot/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/jkqtfastplotter_test/CMakeLists.txt b/examples/jkqtfastplotter_test/CMakeLists.txt index 8cfe841b1b..fb77d9c54b 100644 --- a/examples/jkqtfastplotter_test/CMakeLists.txt +++ b/examples/jkqtfastplotter_test/CMakeLists.txt @@ -18,9 +18,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTFastPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTFastPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTFastPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTFastPlotterSharedLib) endif() diff --git a/examples/jkqtmathtext_simpletest/CMakeLists.txt b/examples/jkqtmathtext_simpletest/CMakeLists.txt index 1d83e89419..f3cfa85cfc 100644 --- a/examples/jkqtmathtext_simpletest/CMakeLists.txt +++ b/examples/jkqtmathtext_simpletest/CMakeLists.txt @@ -17,9 +17,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTMathTextLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTMathTextLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTMathTextSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTMathTextSharedLib) endif() diff --git a/examples/jkqtmathtext_test/CMakeLists.txt b/examples/jkqtmathtext_test/CMakeLists.txt index 3cc4e1f923..2ee468eefc 100644 --- a/examples/jkqtmathtext_test/CMakeLists.txt +++ b/examples/jkqtmathtext_test/CMakeLists.txt @@ -18,9 +18,9 @@ set(UIS testform.ui ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTMathTextLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTMathTextLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTMathTextSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTMathTextSharedLib) endif() diff --git a/examples/jkqtplot_test/CMakeLists.txt b/examples/jkqtplot_test/CMakeLists.txt index edab62ee9c..b7b0efb683 100644 --- a/examples/jkqtplot_test/CMakeLists.txt +++ b/examples/jkqtplot_test/CMakeLists.txt @@ -25,9 +25,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/jkqtplot_test/EmfEngine/src/EmfEngine.h b/examples/jkqtplot_test/EmfEngine/src/EmfEngine.h index ab215f1064..3694709e0a 100644 --- a/examples/jkqtplot_test/EmfEngine/src/EmfEngine.h +++ b/examples/jkqtplot_test/EmfEngine/src/EmfEngine.h @@ -39,12 +39,12 @@ #ifdef EMFENGINE_DLL # ifdef EMFENGINE_DLL_BUILD -# define EMFENGINEJKQTP_LIB_EXPORT Q_DECL_EXPORT +# define EMFENGINEJKQTCOMMON_LIB_EXPORT Q_DECL_EXPORT # else -# define EMFENGINEJKQTP_LIB_EXPORT Q_DECL_IMPORT +# define EMFENGINEJKQTCOMMON_LIB_EXPORT Q_DECL_IMPORT # endif #else -# define EMFENGINEJKQTP_LIB_EXPORT +# define EMFENGINEJKQTCOMMON_LIB_EXPORT #endif #ifdef HAVE_GDIPLUS @@ -120,7 +120,7 @@ private: void resetClipping(); }; -class EMFENGINEJKQTP_LIB_EXPORT EmfPaintDevice : public QPaintDevice +class EMFENGINEJKQTCOMMON_LIB_EXPORT EmfPaintDevice : public QPaintDevice { public: EmfPaintDevice(const QSize& s, const QString& fileName); diff --git a/examples/jkqtplot_test/TestWidgetContourPlots.cpp b/examples/jkqtplot_test/TestWidgetContourPlots.cpp index a83a20d6d5..dbf6c1d4a8 100644 --- a/examples/jkqtplot_test/TestWidgetContourPlots.cpp +++ b/examples/jkqtplot_test/TestWidgetContourPlots.cpp @@ -32,7 +32,7 @@ TestWidgetContourPlots::TestWidgetContourPlots(QWidget *parent) : layoutContour->addWidget(plotDensity); QVector histAlex; - uint histAlexNx,histAlexNy; + size_t histAlexNx,histAlexNy; // choose the test data histAlex.clear(); @@ -47,7 +47,7 @@ TestWidgetContourPlots::TestWidgetContourPlots(QWidget *parent) : histAlex.append(6); histAlex.resize(16); - histAlexNx=(uint)sqrt(histAlex.size()); + histAlexNx=(size_t)sqrt(histAlex.size()); histAlexNy=histAlexNx; auto ds=plotDensity->getPlotter()->getDatastore(); diff --git a/examples/logaxes/CMakeLists.txt b/examples/logaxes/CMakeLists.txt index 33353efba1..c46ca4eb9b 100644 --- a/examples/logaxes/CMakeLists.txt +++ b/examples/logaxes/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/multiplot/CMakeLists.txt b/examples/multiplot/CMakeLists.txt index 3af48587a1..5ccfa4ded3 100644 --- a/examples/multiplot/CMakeLists.txt +++ b/examples/multiplot/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS test_multiplot_ui.ui ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/parametriccurve/CMakeLists.txt b/examples/parametriccurve/CMakeLists.txt index 5faf783863..696b3911c0 100644 --- a/examples/parametriccurve/CMakeLists.txt +++ b/examples/parametriccurve/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/paramscatterplot/CMakeLists.txt b/examples/paramscatterplot/CMakeLists.txt index 3ebd784c05..4e4baed6df 100644 --- a/examples/paramscatterplot/CMakeLists.txt +++ b/examples/paramscatterplot/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/paramscatterplot_image/CMakeLists.txt b/examples/paramscatterplot_image/CMakeLists.txt index 8c7487ade6..6930b59d3d 100644 --- a/examples/paramscatterplot_image/CMakeLists.txt +++ b/examples/paramscatterplot_image/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/parsedfunctionplot/CMakeLists.txt b/examples/parsedfunctionplot/CMakeLists.txt index 0158753d41..912e7585a7 100644 --- a/examples/parsedfunctionplot/CMakeLists.txt +++ b/examples/parsedfunctionplot/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/rgbimageplot/CMakeLists.txt b/examples/rgbimageplot/CMakeLists.txt index 6a15cbe676..4a06234a9d 100644 --- a/examples/rgbimageplot/CMakeLists.txt +++ b/examples/rgbimageplot/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/rgbimageplot_opencv/CMakeLists.txt b/examples/rgbimageplot_opencv/CMakeLists.txt index 1809b3a253..596840d179 100644 --- a/examples/rgbimageplot_opencv/CMakeLists.txt +++ b/examples/rgbimageplot_opencv/CMakeLists.txt @@ -17,9 +17,9 @@ if (BUILD_HAS_OPENCV) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() include_directories( ${OpenCV_INCLUDE_DIRS} ) target_link_libraries(${EXENAME} ${OpenCV_LIBS} ) diff --git a/examples/rgbimageplot_qt/CMakeLists.txt b/examples/rgbimageplot_qt/CMakeLists.txt index 831432926f..a2ad14e7d7 100644 --- a/examples/rgbimageplot_qt/CMakeLists.txt +++ b/examples/rgbimageplot_qt/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/simpletest/CMakeLists.txt b/examples/simpletest/CMakeLists.txt index fde3f980dd..7f4ff3fff2 100644 --- a/examples/simpletest/CMakeLists.txt +++ b/examples/simpletest/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/speed/CMakeLists.txt b/examples/speed/CMakeLists.txt index 276386f460..3e50893abf 100644 --- a/examples/speed/CMakeLists.txt +++ b/examples/speed/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/stackedbars/CMakeLists.txt b/examples/stackedbars/CMakeLists.txt index 3f965231fb..54643ff3ed 100644 --- a/examples/stackedbars/CMakeLists.txt +++ b/examples/stackedbars/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/stepplots/CMakeLists.txt b/examples/stepplots/CMakeLists.txt index a480247335..7ddb53cf88 100644 --- a/examples/stepplots/CMakeLists.txt +++ b/examples/stepplots/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/styledboxplot/CMakeLists.txt b/examples/styledboxplot/CMakeLists.txt index c46b319e1c..65bdc19794 100644 --- a/examples/styledboxplot/CMakeLists.txt +++ b/examples/styledboxplot/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/styling/CMakeLists.txt b/examples/styling/CMakeLists.txt index 9121d536c8..b3c3bf2acc 100644 --- a/examples/styling/CMakeLists.txt +++ b/examples/styling/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS test_styling.ui ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/symbols_and_errors/CMakeLists.txt b/examples/symbols_and_errors/CMakeLists.txt index 27732f648a..54a30a4e5b 100644 --- a/examples/symbols_and_errors/CMakeLists.txt +++ b/examples/symbols_and_errors/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/symbols_and_styles/CMakeLists.txt b/examples/symbols_and_styles/CMakeLists.txt index 494d761862..04325e71d3 100644 --- a/examples/symbols_and_styles/CMakeLists.txt +++ b/examples/symbols_and_styles/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/ui/CMakeLists.txt b/examples/ui/CMakeLists.txt index 53e3f75070..b1a9b3c34e 100644 --- a/examples/ui/CMakeLists.txt +++ b/examples/ui/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS formwithjkqtplotter.ui ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/user_interaction/CMakeLists.txt b/examples/user_interaction/CMakeLists.txt index 315bd26ed6..74233f36d7 100644 --- a/examples/user_interaction/CMakeLists.txt +++ b/examples/user_interaction/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/examples/user_interaction/test_user_interaction.cpp b/examples/user_interaction/test_user_interaction.cpp index 907fea9138..b470b1ead9 100644 --- a/examples/user_interaction/test_user_interaction.cpp +++ b/examples/user_interaction/test_user_interaction.cpp @@ -457,7 +457,7 @@ void TestUserInteraction::contextMenuOpened(double x, double y, QMenu *contextMe labMouseAction->setText(QString("contextMenuOpened(x=%1, y=%2)").arg(x).arg(y)); } -void TestUserInteraction::zoomChangedLocally(double newxmin, double newxmax, double newymin, double newymax, JKQTPlotter */*sender*/) +void TestUserInteraction::zoomChangedLocally(double newxmin, double newxmax, double newymin, double newymax, JKQTPlotter * /*sender*/) { labMouseAction->setText(QString("zoomChangedLocally(x=%1..%2, y=%3..%4)").arg(newxmin).arg(newxmax).arg(newymin).arg(newymax)); } diff --git a/examples/violinplot/CMakeLists.txt b/examples/violinplot/CMakeLists.txt index a192cf87df..88b0d695f8 100644 --- a/examples/violinplot/CMakeLists.txt +++ b/examples/violinplot/CMakeLists.txt @@ -15,9 +15,9 @@ set(UIS ) add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS}) target_include_directories(${EXENAME} PRIVATE ../../lib) if(BUILD_STATIC_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterLib) elseif(BUILD_SHARED_LIBS) - target_link_libraries(${EXENAME} JKQTPlotterSharedLib${LIBNAME_ADDITION}) + target_link_libraries(${EXENAME} JKQTPlotterSharedLib) endif() diff --git a/lib/jkqtcommon/CMakeLists.txt b/lib/jkqtcommon/CMakeLists.txt index c02eef285a..703b5cd887 100644 --- a/lib/jkqtcommon/CMakeLists.txt +++ b/lib/jkqtcommon/CMakeLists.txt @@ -3,14 +3,16 @@ cmake_minimum_required(VERSION 3.0) set(libBasename JKQTCommon) if(BUILD_SHARED_LIBS) - set(libsh_name ${libBasename}SharedLib${LIBNAME_ADDITION}) - set(${libsh_name}_LIBRARY ${libsh_name} PARENT_SCOPE) + set(libsh_name ${libBasename}SharedLib) + set(libsh_name_decorated ${libsh_name}${LIBNAME_ADDITION}) + set(${libBasename}_SHARED_LIBRARY ${libsh_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE) message( STATUS "-- Building ${libsh_name}" ) endif(BUILD_SHARED_LIBS) if(BUILD_STATIC_LIBS) - set(lib_name ${libBasename}Lib${LIBNAME_ADDITION}) - set(${lib_name}_LIBRARY ${lib_name} PARENT_SCOPE) + set(lib_name ${libBasename}Lib) + set(lib_name_decorated ${lib_name}${LIBNAME_ADDITION}) + set(${libBasename}_STATIC_LIBRARY ${lib_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE) message( STATUS "-- Building ${lib_name}" ) endif(BUILD_STATIC_LIBS) @@ -40,7 +42,7 @@ set(SOURCES ) set(HEADERS - jkqtp_imexport.h + jkqtcommon_imexport.h jkqtpdebuggingtools.h jkqtpmathtools.h jkqtpalgorithms.h @@ -67,14 +69,19 @@ set(HEADERS if(BUILD_SHARED_LIBS) add_library(${libsh_name} SHARED ${SOURCES} ${HEADERS}) set_property(TARGET ${libsh_name} PROPERTY VERSION "${PROJECT_VERSION}") + set_property(TARGET ${libsh_name} PROPERTY OUTPUT_NAME "${libsh_name_decorated}") target_link_libraries(${libsh_name} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport) - target_compile_definitions(${libsh_name} PUBLIC JKQTP_LIB_IN_DLL) - target_compile_definitions(${libsh_name} PRIVATE JKQTP_LIB_EXPORT_LIBRARY) + target_compile_definitions(${libsh_name} PUBLIC JKQTCOMMON_LIB_IN_DLL) + target_compile_definitions(${libsh_name} PRIVATE JKQTCOMMON_LIB_EXPORT_LIBRARY) + set_property(TARGET ${libsh_name} PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS "ON") +# include(GenerateExportHeader) +# generate_export_header(${libsh_name}) endif() if(BUILD_STATIC_LIBS) add_library(${lib_name} STATIC ${SOURCES} ${HEADERS}) set_property(TARGET ${lib_name} PROPERTY VERSION "${PROJECT_VERSION}") + set_property(TARGET ${lib_name} PROPERTY OUTPUT_NAME "${lib_name_decorated}") target_link_libraries(${lib_name} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport) endif() diff --git a/lib/jkqtcommon/jkqtcommon_imexport.h b/lib/jkqtcommon/jkqtcommon_imexport.h new file mode 100644 index 0000000000..490104a1f9 --- /dev/null +++ b/lib/jkqtcommon/jkqtcommon_imexport.h @@ -0,0 +1,108 @@ +#ifndef jkqtcommon_IMPORT_H +#define jkqtcommon_IMPORT_H + + +/* + Copyright (c) 2008-2019 Jan W. Krieger () + + last modification: $LastChangedDate: 2015-04-02 13:55:22 +0200 (Do, 02 Apr 2015) $ (revision $Rev: 3902 $) + + This software is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License (LGPL) as published by + the Free Software Foundation, either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License (LGPL) for more details. + + You should have received a copy of the GNU Lesser General Public License (LGPL) + along with this program. If not, see . +*/ + + + + +/*! \def JKQTCOMMON_LIB_EXPORT + \ingroup tools + + This define allows to export functions and classes from the jkqtcommon-library when building a dynamic/shared library. + Usage is as follows: + \code + #include "jkqtcommon/jkqtcommon_imexport.h" + + class JKQTCOMMON_LIB_EXPORT exportedClassName { + ... + }; + + JKQTCOMMON_LIB_EXPORT void exportedFunctionName(); + \endcode + + These macros append the appropriate \c __declspec(dllexport) and \c __declspec(dllimport) + to the function/class body and thus tell windows compilers to export these sysmbols from + the shared library, or import them from a shared library. + + Note that these attributes are only necessary on windows systems! + + These macros are controlled by two other macros: + - \c JKQTCOMMON_LIB_IN_DLL declares that the application should link against a shared version of + JKQTCommon, i.e. \c JKQTCommonSharedLib_XYZ . + This needs to be defined while compiling the library and while compiling + any application linking against \c JKQTCommonSharedLib_XYZ. + - \c JKQTCOMMON_LIB_EXPORT_LIBRARY is only defined while compiling JKQTCommon into \c JKQTCommonSharedLib_XYZ + and ensures thet the symbols are exported. If it is not defined (e.g. while + compiling an application), the symbols are imported + . + + */ + +/*! \def JKQTCOMMON_LIB_IN_DLL + \ingroup tools + \brief declares that the application should link against a shared version of + JKQTCommon, i.e. \c JKQTCommonSharedLib_XYZ . + This needs to be defined while compiling the library and while compiling + any application linking against \c JKQTCommonSharedLib_XYZ. +*/ + +/*! \def JKQTCOMMON_LIB_EXPORT_LIBRARY + \ingroup tools + \brief is only defined while compiling JKQTCommon into \c JKQTCommonSharedLib_XYZ + and ensures thet the symbols are exported. If it is not defined (e.g. while + compiling an application), the symbols are imported +*/ + +# ifndef __WINDOWS__ +# if defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32) +# define __WINDOWS__ +# endif +# endif + +#ifdef __WINDOWS__ +# ifdef JKQTCOMMON_LIB_IN_DLL +# ifndef JKQTCOMMON_LIB_EXPORT +# ifdef JKQTCOMMON_LIB_EXPORT_LIBRARY + /* We are building this library */ +# define JKQTCOMMON_LIB_EXPORT __declspec(dllexport) +# else + /* We are using this library */ +# define JKQTCOMMON_LIB_EXPORT __declspec(dllimport) +# endif +# endif +# else +# ifndef JKQTCOMMON_LIB_EXPORT +# define JKQTCOMMON_LIB_EXPORT +# endif +# endif +#else +# define JKQTCOMMON_LIB_EXPORT +#endif + + + + + + + +#endif // jkqtcommon_IMPORT_H + diff --git a/lib/jkqtcommon/jkqtp_imexport.h b/lib/jkqtcommon/jkqtp_imexport.h deleted file mode 100644 index 6d19cae7a4..0000000000 --- a/lib/jkqtcommon/jkqtp_imexport.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef jkqtp_IMPORT_H -#define jkqtp_IMPORT_H - - -/* - Copyright (c) 2008-2019 Jan W. Krieger () - - last modification: $LastChangedDate: 2015-04-02 13:55:22 +0200 (Do, 02 Apr 2015) $ (revision $Rev: 3902 $) - - This software is free software: you can redistribute it and/or modify - it under the terms of the GNU Lesser General Public License (LGPL) as published by - the Free Software Foundation, either version 2.1 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU Lesser General Public License (LGPL) for more details. - - You should have received a copy of the GNU Lesser General Public License (LGPL) - along with this program. If not, see . -*/ - - - - -/*! \file jkqtp_imexport.h - \ingroup tools - - This file allows to export functions and classes from this directory in a dynamic/shared lib and to append the - correct __declspec() declaration on windows. If you want to export one, make sure you have set - \code - #include "jkqtcommon/jkqtp_imexport.h" - - class JKQTP_LIB_EXPORT exportedClassName { - ... - }; - - JKQTP_LIB_EXPORT void exportedFunctionName(); - \endcode - - Then when compiling define the preprocessor symbol \c JKQTP_LIB_IN_DLL when exporting AND using the classes/functions. - When compiling the classes for export, also define the preprocessor symbol \c JKQTP_LIB_EXPORT_LIBRARY . - */ - - - -# ifndef __WINDOWS__ -# if defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32) -# define __WINDOWS__ -# endif -# endif - -#ifdef __WINDOWS__ -# ifdef JKQTP_LIB_IN_DLL -# if defined(JKQTP_LIB_EXPORT_LIBRARY) -# define JKQTP_LIB_EXPORT __declspec(dllexport) -# else -# define JKQTP_LIB_EXPORT __declspec(dllimport) -# endif -# else -# define JKQTP_LIB_EXPORT -# endif -#else -# define JKQTP_LIB_EXPORT -#endif - - - - - - - - -#endif // jkqtp_IMPORT_H - diff --git a/lib/jkqtcommon/jkqtpalgorithms.h b/lib/jkqtcommon/jkqtpalgorithms.h index 63f70d8a7f..6d93c50061 100644 --- a/lib/jkqtcommon/jkqtpalgorithms.h +++ b/lib/jkqtcommon/jkqtpalgorithms.h @@ -21,7 +21,7 @@ #ifndef JKQTPALGORITHMS_H_INCLUDED #define JKQTPALGORITHMS_H_INCLUDED -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtcommon/jkqtcommon_imexport.h" diff --git a/lib/jkqtcommon/jkqtparraytools.h b/lib/jkqtcommon/jkqtparraytools.h index 41f9dbd341..317d71e3ce 100644 --- a/lib/jkqtcommon/jkqtparraytools.h +++ b/lib/jkqtcommon/jkqtparraytools.h @@ -34,7 +34,7 @@ #include #include #include -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtcommon/jkqtcommon_imexport.h" #ifdef _OPENMP diff --git a/lib/jkqtcommon/jkqtpbasicimagetools.cpp b/lib/jkqtcommon/jkqtpbasicimagetools.cpp index deef202231..af2fa32605 100644 --- a/lib/jkqtcommon/jkqtpbasicimagetools.cpp +++ b/lib/jkqtcommon/jkqtpbasicimagetools.cpp @@ -30,7 +30,7 @@ const int JKQTPImageTools::PALETTE_ICON_WIDTH = 64; const int JKQTPImageTools::PALETTE_IMAGEICON_HEIGHT = 64; const int JKQTPImageTools::LUTSIZE = 256; -QList global_jkqtpimagetools_lutstore = QList(); +QList JKQTPImageTools::global_jkqtpimagetools_lutstore = QList(); bool JKQTPImagePlot_buildDefinedPaletteLessThan(const QPair &s1, const QPair &s2) diff --git a/lib/jkqtcommon/jkqtpbasicimagetools.h b/lib/jkqtcommon/jkqtpbasicimagetools.h index bdcfc18dc5..fec5134880 100644 --- a/lib/jkqtcommon/jkqtpbasicimagetools.h +++ b/lib/jkqtcommon/jkqtpbasicimagetools.h @@ -24,7 +24,7 @@ #include #include #include -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtcommon/jkqtcommon_imexport.h" #include #include #include @@ -34,19 +34,26 @@ \ingroup jkqtptools_qt \internal */ -struct JKQTP_LIB_EXPORT JKQTPImageTools { +struct JKQTPImageTools { /*! \brief Width of the Palette-Icons, generated e.g. by JKQTPMathImageGetPaletteIcon() \ingroup jkqtptools_qt */ - static const int PALETTE_ICON_WIDTH; + static JKQTCOMMON_LIB_EXPORT const int PALETTE_ICON_WIDTH; /*! \brief Height of the Palette-Icons, generated e.g. by JKQTPMathImageGetPaletteIcon() \ingroup jkqtptools_qt */ - static const int PALETTE_IMAGEICON_HEIGHT; + static JKQTCOMMON_LIB_EXPORT const int PALETTE_IMAGEICON_HEIGHT; /*! \brief size of the lookup tables used by JKQTFPimagePlot_array2image() \ingroup jkqtplotter_imagelots_tools */ - static const int LUTSIZE; + static JKQTCOMMON_LIB_EXPORT const int LUTSIZE; + + /*! \brief internal global storage object for lookup-tables + \ingroup jkqtplotter_imagelots_tools + \internal + */ + static JKQTCOMMON_LIB_EXPORT QList global_jkqtpimagetools_lutstore; + }; @@ -133,13 +140,13 @@ enum JKQTPMathImageColorPalette { \ingroup jkqtplotter_imagelots_tools \see String2JKQTPMathImageColorPalette() */ -JKQTP_LIB_EXPORT QString JKQTPMathImageColorPalette2String(JKQTPMathImageColorPalette p); +JKQTCOMMON_LIB_EXPORT QString JKQTPMathImageColorPalette2String(JKQTPMathImageColorPalette p); /*! \brief convert the palette name \a p to JKQTPMathImageColorPalette (compatible with String2JKQTPMathImageColorPalette() ) \ingroup jkqtplotter_imagelots_tools \see JKQTPMathImageColorPalette2String() */ -JKQTP_LIB_EXPORT JKQTPMathImageColorPalette String2JKQTPMathImageColorPalette(const QString& p); +JKQTCOMMON_LIB_EXPORT JKQTPMathImageColorPalette String2JKQTPMathImageColorPalette(const QString& p); @@ -552,7 +559,7 @@ inline QList JKQTPImagePlot_makeQList(const T& defaultVal, int N=1) { \a lut needs to have \c lut_size) entries */ -void JKQTP_LIB_EXPORT JKQTPImagePlot_buildDefinedPaletteLinInterpolate(int* lut, QList > items, int lut_size=JKQTPImageTools::LUTSIZE); +void JKQTCOMMON_LIB_EXPORT JKQTPImagePlot_buildDefinedPaletteLinInterpolate(int* lut, QList > items, int lut_size=JKQTPImageTools::LUTSIZE); /*! \brief build a linearly interpolated palette in \a lut with \a N entries that are provided as (double, QRgb) value pairss in the variable arguments \ingroup jkqtplotter_imagelots_tools @@ -562,7 +569,7 @@ void JKQTP_LIB_EXPORT JKQTPImagePlot_buildDefinedPaletteLinInterpolate(int* lut, \a lut needs to have \c lut_size) entries */ -void JKQTP_LIB_EXPORT JKQTPImagePlot_buildDefinedPaletteLinInterpolate(int* lut, int N, ...); +void JKQTCOMMON_LIB_EXPORT JKQTPImagePlot_buildDefinedPaletteLinInterpolate(int* lut, int N, ...); /*! \brief build a palette in \a lut with \a N entries that are provided in \a items \ingroup jkqtplotter_imagelots_tools @@ -572,16 +579,16 @@ void JKQTP_LIB_EXPORT JKQTPImagePlot_buildDefinedPaletteLinInterpolate(int* lut, \a lut needs to have \c JKQTPImageTools::LUTSIZE) entries */ -void JKQTP_LIB_EXPORT JKQTPImagePlot_buildDefinedPalette(int* lut, QList > items); +void JKQTCOMMON_LIB_EXPORT JKQTPImagePlot_buildDefinedPalette(int* lut, QList > items); /*! \brief build a palette in \a lut with \a N entries that are provided as as (double, QRgb) value pairss in the variable arguments \ingroup jkqtplotter_imagelots_tools */ -void JKQTP_LIB_EXPORT JKQTPImagePlot_buildDefinedPalette(int* lut, int N, ...); +void JKQTCOMMON_LIB_EXPORT JKQTPImagePlot_buildDefinedPalette(int* lut, int N, ...); /*! \brief return a list of all globally available LUTs \ingroup jkqtplotter_imagelots_tools */ -QStringList JKQTP_LIB_EXPORT JKQTPImagePlot_getPredefinedPalettes(); +QStringList JKQTCOMMON_LIB_EXPORT JKQTPImagePlot_getPredefinedPalettes(); @@ -589,20 +596,14 @@ QStringList JKQTP_LIB_EXPORT JKQTPImagePlot_getPredefinedPalettes(); \ingroup jkqtplotter_imagelots_tools \internal */ -JKQTP_LIB_EXPORT int* JKQTPImagePlot_getCreateLUT(QList &lutstore, JKQTPMathImageColorPalette palette); +JKQTCOMMON_LIB_EXPORT int* JKQTPImagePlot_getCreateLUT(QList &lutstore, JKQTPMathImageColorPalette palette); /*! \brief frees a list of LUTs \ingroup jkqtplotter_imagelots_tools \internal */ -void JKQTP_LIB_EXPORT JKQTPImagePlot_freeLUTs(QList &lutstore); +void JKQTCOMMON_LIB_EXPORT JKQTPImagePlot_freeLUTs(QList &lutstore); -/*! \brief internal global storage object for lookup-tables - \ingroup jkqtplotter_imagelots_tools - \internal - */ -extern JKQTP_LIB_EXPORT QList global_jkqtpimagetools_lutstore; - /*! \brief convert a 2D image (as 1D array) into a QImage with given palette (see JKQTFPColorPalette) \ingroup jkqtplotter_imagelots_tools @@ -678,7 +679,7 @@ inline void JKQTPImagePlot_array2image(const T* dbl_in, int width, int height, Q const int* lut_used=nullptr; int lutSize=JKQTPImageTools::LUTSIZE; - if (global_jkqtpimagetools_lutstore.size()<=0) global_jkqtpimagetools_lutstore=JKQTPImagePlot_makeQList(nullptr, JKQTPImagePlot_getPredefinedPalettes().size()+2); + if (JKQTPImageTools::global_jkqtpimagetools_lutstore.size()<=0) JKQTPImageTools::global_jkqtpimagetools_lutstore =JKQTPImagePlot_makeQList(nullptr, JKQTPImagePlot_getPredefinedPalettes().size()+2); img = QImage(width, height, QImage::Format_ARGB32); @@ -692,7 +693,7 @@ inline void JKQTPImagePlot_array2image(const T* dbl_in, int width, int height, Q lutSize=lutUserSize; //qDebug()<<"user palette "< #include @@ -52,7 +52,7 @@ /** \brief RAII construct that times its lifetime, outputting properly indented qDebug()-message * \ingroup jkqtptools_debugging */ -class JKQTP_LIB_EXPORT JKQTPAutoOutputTimer : public QElapsedTimer +class JKQTCOMMON_LIB_EXPORT JKQTPAutoOutputTimer : public QElapsedTimer { public: explicit JKQTPAutoOutputTimer(const QString& message); diff --git a/lib/jkqtcommon/jkqtpdrawingtools.h b/lib/jkqtcommon/jkqtpdrawingtools.h index 70e5967f9d..fbae40f0ce 100644 --- a/lib/jkqtcommon/jkqtpdrawingtools.h +++ b/lib/jkqtcommon/jkqtpdrawingtools.h @@ -20,7 +20,7 @@ #ifndef JKQTPDRAWINGTOOLS_H_INCLUDED #define JKQTPDRAWINGTOOLS_H_INCLUDED -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtcommon/jkqtcommon_imexport.h" #include #include #include @@ -44,10 +44,10 @@ class JKQTPEnhancedPainter; // forward /*! \brief tool class with static values used by JKQTPlotter/JKQTBasePlotter \ingroup jkqtptools_drawing */ -struct JKQTP_LIB_EXPORT JKQTPlotterDrawingTools { +struct JKQTPlotterDrawingTools { /** \brief smallest linewidth any line in JKQTPlotter/JKQTBasePlotter may have */ - static const double ABS_MIN_LINEWIDTH; + static JKQTCOMMON_LIB_EXPORT const double ABS_MIN_LINEWIDTH; }; @@ -137,16 +137,16 @@ enum JKQTPGraphSymbols { /** \brief converts a JKQTPGraphSymbols variable into a identifier string * \ingroup jkqtptools_drawing */ -JKQTP_LIB_EXPORT QString JKQTPGraphSymbols2String(JKQTPGraphSymbols pos); +JKQTCOMMON_LIB_EXPORT QString JKQTPGraphSymbols2String(JKQTPGraphSymbols pos); /** \brief converts a JKQTPGraphSymbols variable into a human-readable string * \ingroup jkqtptools_drawing */ -JKQTP_LIB_EXPORT QString JKQTPGraphSymbols2NameString(JKQTPGraphSymbols pos); +JKQTCOMMON_LIB_EXPORT QString JKQTPGraphSymbols2NameString(JKQTPGraphSymbols pos); /** \brief converts a String into a JKQTPGraphSymbols * \ingroup jkqtptools_drawing */ -JKQTP_LIB_EXPORT JKQTPGraphSymbols String2JKQTPGraphSymbols(const QString& pos); +JKQTCOMMON_LIB_EXPORT JKQTPGraphSymbols String2JKQTPGraphSymbols(const QString& pos); @@ -154,7 +154,7 @@ JKQTP_LIB_EXPORT JKQTPGraphSymbols String2JKQTPGraphSymbols(const QString& pos); /** \brief rotate a rectangle by given angle (rotates all points around the center of the rectangle and returns it as a QPolygonF) * \ingroup jkqtptools_drawing */ -JKQTP_LIB_EXPORT QPolygonF jkqtpRotateRect(QRectF r, double angle); +JKQTCOMMON_LIB_EXPORT QPolygonF jkqtpRotateRect(QRectF r, double angle); /*! \brief plot the specified symbol at pixel position x,y \ingroup jkqtptools_drawing @@ -184,7 +184,7 @@ inline void JKQTPPlotSymbol(TPainter& painter, double x, double y, JKQTPGraphSym \param color color of the symbol lines \param fillColor color of the symbol filling */ -JKQTP_LIB_EXPORT void JKQTPPlotSymbol(QPaintDevice& paintDevice, double x, double y, JKQTPGraphSymbols symbol, double size, double symbolLineWidth, QColor color, QColor fillColor); +JKQTCOMMON_LIB_EXPORT void JKQTPPlotSymbol(QPaintDevice& paintDevice, double x, double y, JKQTPGraphSymbols symbol, double size, double symbolLineWidth, QColor color, QColor fillColor); /*! \brief draw an ellipse without setting pen or brush, or saving the painter! @@ -204,7 +204,7 @@ JKQTP_LIB_EXPORT void JKQTPPlotSymbol(QPaintDevice& paintDevice, double x, doubl \note all angles are given in degrees [0..360] */ -JKQTP_LIB_EXPORT QVector JKQTPDrawEllipse(double x, double y, double a, double b, double angle_start=0, double angle_end=360, double alpha=0, int controlPoints=180, QPointF* x_start=nullptr, QPointF* x_end=nullptr); +JKQTCOMMON_LIB_EXPORT QVector JKQTPDrawEllipse(double x, double y, double a, double b, double angle_start=0, double angle_end=360, double alpha=0, int controlPoints=180, QPointF* x_start=nullptr, QPointF* x_end=nullptr); /*! \brief draw a tooltip, using the current brush and pen of the provided painter \ingroup jkqtptools_drawing @@ -226,7 +226,7 @@ inline void JKQTPDrawTooltip(TPainter& painter, double x, double y, const QRectF * \param distanceThreshold if two end-points are closer together as this value, they are united to a single point * \return a cleaned polygon, where all consecutive points that were closer than distanceThreshold are united */ -JKQTP_LIB_EXPORT QPolygonF JKQTPCleanPolygon(const QPolygonF& poly, double distanceThreshold=0.3); +JKQTCOMMON_LIB_EXPORT QPolygonF JKQTPCleanPolygon(const QPolygonF& poly, double distanceThreshold=0.3); /** \brief takes a list of QLineF objesct \a lines and tries to combine as many of them as possible to QPolygonF objects. * Note: This method implements an incomplete algorithm with \a searchMaxSurroundingElements>0, as solving @@ -238,7 +238,7 @@ JKQTP_LIB_EXPORT QPolygonF JKQTPCleanPolygon(const QPolygonF& poly, double dista * \param searchMaxSurroundingElements limits the search for a connected polygon to at most this number of neighbors * \return a vector of QPolygonF objects, which contain longer line-segments formed from \a lines */ -JKQTP_LIB_EXPORT QVector JKQTPUnifyLinesToPolygons(const QVector& lines, double distanceThreshold=0.3, int searchMaxSurroundingElements=10); +JKQTCOMMON_LIB_EXPORT QVector JKQTPUnifyLinesToPolygons(const QVector& lines, double distanceThreshold=0.3, int searchMaxSurroundingElements=10); diff --git a/lib/jkqtcommon/jkqtpenhancedpainter.h b/lib/jkqtcommon/jkqtpenhancedpainter.h index 7d92647c9f..4b310a2b1f 100644 --- a/lib/jkqtcommon/jkqtpenhancedpainter.h +++ b/lib/jkqtcommon/jkqtpenhancedpainter.h @@ -20,7 +20,7 @@ #ifndef JKQTPENHANCED_PAINTERS_H #define JKQTPENHANCED_PAINTERS_H -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtcommon/jkqtcommon_imexport.h" #include @@ -30,7 +30,7 @@ */ -class JKQTP_LIB_EXPORT JKQTPEnhancedPainter : public QPainter { +class JKQTCOMMON_LIB_EXPORT JKQTPEnhancedPainter : public QPainter { Q_GADGET public: JKQTPEnhancedPainter(QPaintDevice* device); diff --git a/lib/jkqtcommon/jkqtphighrestimer.cpp b/lib/jkqtcommon/jkqtphighrestimer.cpp index 7a92c00535..3b78d4ced7 100644 --- a/lib/jkqtcommon/jkqtphighrestimer.cpp +++ b/lib/jkqtcommon/jkqtphighrestimer.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2008-2015 Jan W. Krieger (, ) (DKFZ) & IWR, University of Heidelberg + Copyright (c) 2008-2019 Jan W. Krieger (, ) (DKFZ) & IWR, University of Heidelberg last modification: $LastChangedDate: 2015-06-10 19:19:10 +0200 (Mi, 10 Jun 2015) $ (revision $Rev: 3976 $) diff --git a/lib/jkqtcommon/jkqtphighrestimer.h b/lib/jkqtcommon/jkqtphighrestimer.h index 75c2d63ec4..257019d7e3 100644 --- a/lib/jkqtcommon/jkqtphighrestimer.h +++ b/lib/jkqtcommon/jkqtphighrestimer.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2008-2015 Jan W. Krieger (, ) (DKFZ) & IWR, University of Heidelberg + Copyright (c) 2008-2019 Jan W. Krieger (, ) (DKFZ) & IWR, University of Heidelberg last modification: $LastChangedDate: 2015-06-10 19:19:10 +0200 (Mi, 10 Jun 2015) $ (revision $Rev: 3976 $) @@ -23,7 +23,7 @@ #include #include -#include "jkqtp_imexport.h" +#include "jkqtcommon_imexport.h" #ifndef __WINDOWS__ # if defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32) @@ -127,7 +127,7 @@ * \test you can find an example application in the file \link test_hrestimer.cpp \endlink. * */ -class JKQTP_LIB_EXPORT JKQTPHighResTimer { +class JKQTCOMMON_LIB_EXPORT JKQTPHighResTimer { protected: #ifdef __WINDOWS__ /** \brief internal: time stamp of the last call of start() */ diff --git a/lib/jkqtcommon/jkqtplinalgtools.h b/lib/jkqtcommon/jkqtplinalgtools.h index 0cf65d8122..e097761664 100644 --- a/lib/jkqtcommon/jkqtplinalgtools.h +++ b/lib/jkqtcommon/jkqtplinalgtools.h @@ -35,7 +35,7 @@ #include #include #include -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtcommon/jkqtcommon_imexport.h" #include "jkqtcommon/jkqtparraytools.h" #include "jkqtcommon/jkqtpmathtools.h" #include "jkqtcommon/jkqtpstringtools.h" diff --git a/lib/jkqtcommon/jkqtpmathparser.h b/lib/jkqtcommon/jkqtpmathparser.h index dd94607e10..1344509c4a 100644 --- a/lib/jkqtcommon/jkqtpmathparser.h +++ b/lib/jkqtcommon/jkqtpmathparser.h @@ -47,7 +47,7 @@ #include #include #include -#include "jkqtp_imexport.h" +#include "jkqtcommon_imexport.h" #ifndef JKQTPMATHPARSER_H #define JKQTPMATHPARSER_H @@ -235,7 +235,7 @@ } \endcode */ -class JKQTP_LIB_EXPORT JKQTPMathParser +class JKQTCOMMON_LIB_EXPORT JKQTPMathParser { protected: void* data; @@ -315,7 +315,7 @@ class JKQTP_LIB_EXPORT JKQTPMathParser /** \brief result of any expression * \ingroup jkmpultil*/ - struct JKQTP_LIB_EXPORT jkmpResult { + struct JKQTCOMMON_LIB_EXPORT jkmpResult { jkmpResult(); bool isValid; @@ -336,7 +336,7 @@ class JKQTP_LIB_EXPORT JKQTPMathParser * only contains pointers to the data * \ingroup jkmpultil */ - struct JKQTP_LIB_EXPORT jkmpVariable { + struct JKQTCOMMON_LIB_EXPORT jkmpVariable { jkmpVariable(); jkmpResultType type; /*!< \brief type of the variable */ bool internal; /*!< \brief this is an internal variable */ @@ -348,7 +348,7 @@ class JKQTP_LIB_EXPORT JKQTPMathParser /** \brief This struct is for managing temporary variables. It is generally like jkmpVariable. * \ingroup jkmpultil */ - struct JKQTP_LIB_EXPORT jkmpTempVariable { + struct JKQTCOMMON_LIB_EXPORT jkmpTempVariable { std::string name; /*!< \brief name of the variable */ jkmpResultType type; /*!< \brief type of the variable */ bool internal; /*!< \brief this is an internal variable */ @@ -385,7 +385,7 @@ class JKQTP_LIB_EXPORT JKQTPMathParser /** \brief description of a user registered function */ - struct JKQTP_LIB_EXPORT jkmpFunctionDescriptor { + struct JKQTCOMMON_LIB_EXPORT jkmpFunctionDescriptor { jkmpEvaluateFunc function; /*!< \brief a pointer to the function implementation */ std::string name; /*!< \brief name of the function */ }; @@ -400,7 +400,7 @@ class JKQTP_LIB_EXPORT JKQTPMathParser * All allowed node types must inherit from jkmpNode * \ingroup jkmpNodes */ - class JKQTP_LIB_EXPORT jkmpNode { + class JKQTCOMMON_LIB_EXPORT jkmpNode { protected: JKQTPMathParser* parser; /*!< \brief points to the parser object that is used to evaluate this node */ jkmpNode* parent; /*!< \brief points to the parent node */ @@ -430,7 +430,7 @@ class JKQTP_LIB_EXPORT JKQTPMathParser * add (+), subtract (-), multiply (*), divide (/), a to the power of b (a^b) * \ingroup jkmpNodes */ - class JKQTP_LIB_EXPORT jkmpBinaryArithmeticNode: public jkmpNode { + class JKQTCOMMON_LIB_EXPORT jkmpBinaryArithmeticNode: public jkmpNode { private: jkmpNode* left, *right; char operation; @@ -455,7 +455,7 @@ class JKQTP_LIB_EXPORT JKQTPMathParser * \brief This class represents a binary boolean operation: and, or, xor, nor, nand * \ingroup jkmpNodes */ - class JKQTP_LIB_EXPORT jkmpBinaryBoolNode: public jkmpNode { + class JKQTCOMMON_LIB_EXPORT jkmpBinaryBoolNode: public jkmpNode { private: jkmpNode* left, *right; char operation; @@ -480,7 +480,7 @@ class JKQTP_LIB_EXPORT JKQTPMathParser * \brief This class represents a binary compare operation: !=, ==, >=, <=, >, < * \ingroup jkmpNodes */ - class JKQTP_LIB_EXPORT jkmpCompareNode: public jkmpNode { + class JKQTCOMMON_LIB_EXPORT jkmpCompareNode: public jkmpNode { private: jkmpNode* left, *right; char operation; @@ -505,7 +505,7 @@ class JKQTP_LIB_EXPORT JKQTPMathParser * \brief This class represents a unary operations: ! (bool negation), - (arithmetic negation) * \ingroup jkmpNodes */ - class JKQTP_LIB_EXPORT jkmpUnaryNode: public jkmpNode { + class JKQTCOMMON_LIB_EXPORT jkmpUnaryNode: public jkmpNode { private: jkmpNode* child; char operation; @@ -529,7 +529,7 @@ class JKQTP_LIB_EXPORT JKQTPMathParser * \brief This class represents a variable assignment (a = expression) * \ingroup jkmpNodes */ - class JKQTP_LIB_EXPORT jkmpVariableAssignNode: public jkmpNode { + class JKQTCOMMON_LIB_EXPORT jkmpVariableAssignNode: public jkmpNode { private: jkmpNode* child; std::string variable; @@ -554,7 +554,7 @@ class JKQTP_LIB_EXPORT JKQTPMathParser * \brief This class represents a number, a string contant or a boolean contant (true/false) * \ingroup jkmpNodes */ - class JKQTP_LIB_EXPORT jkmpConstantNode: public jkmpNode { + class JKQTCOMMON_LIB_EXPORT jkmpConstantNode: public jkmpNode { private: jkmpResult data; public: @@ -573,7 +573,7 @@ class JKQTP_LIB_EXPORT JKQTPMathParser * \brief This class represents a variable. * \ingroup jkmpNodes */ - class JKQTP_LIB_EXPORT jkmpVariableNode: public jkmpNode { + class JKQTCOMMON_LIB_EXPORT jkmpVariableNode: public jkmpNode { private: std::string var; public: @@ -598,7 +598,7 @@ class JKQTP_LIB_EXPORT JKQTPMathParser * * Functions may have 8 parameters at the most. */ - class JKQTP_LIB_EXPORT jkmpFunctionNode: public jkmpNode { + class JKQTCOMMON_LIB_EXPORT jkmpFunctionNode: public jkmpNode { private: std::string fun; jkmpNode** child; @@ -627,7 +627,7 @@ class JKQTP_LIB_EXPORT JKQTPMathParser * * when evaluating the result will be the result of the last node in the list. */ - class JKQTP_LIB_EXPORT jkmpNodeList: public jkmpNode { + class JKQTCOMMON_LIB_EXPORT jkmpNodeList: public jkmpNode { private: std::vector list; public: @@ -666,7 +666,7 @@ class JKQTP_LIB_EXPORT JKQTPMathParser * error handler and assign it (function pointer) to the global variable jkmathparser_exception_function. * If this is not nullptr this function will be called instead of throwing an exception. */ - class JKQTP_LIB_EXPORT jkmpException : public std::exception { + class JKQTCOMMON_LIB_EXPORT jkmpException : public std::exception { private: /** \brief the error message */ std::string errormessage; diff --git a/lib/jkqtcommon/jkqtpmathtools.h b/lib/jkqtcommon/jkqtpmathtools.h index cc34c1c2c5..b74bc59dc4 100644 --- a/lib/jkqtcommon/jkqtpmathtools.h +++ b/lib/jkqtcommon/jkqtpmathtools.h @@ -21,7 +21,7 @@ #ifndef jkqtpmathtools_H_INCLUDED #define jkqtpmathtools_H_INCLUDED -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtcommon/jkqtcommon_imexport.h" #include "jkqtcommon/jkqtpstringtools.h" #include #include @@ -374,7 +374,7 @@ inline double jkqtp_polyEval(double x, PolyItP firstP, PolyItP lastP) { /*! \brief a C++-functor, which evaluates a polynomial \ingroup jkqtptools_math_basic */ -struct JKQTP_LIB_EXPORT JKQTPPolynomialFunctor { +struct JKQTCOMMON_LIB_EXPORT JKQTPPolynomialFunctor { std::vector P; template inline JKQTPPolynomialFunctor(PolyItP firstP, PolyItP lastP) { diff --git a/lib/jkqtcommon/jkqtpstatbasics.h b/lib/jkqtcommon/jkqtpstatbasics.h index f911101133..1ae7aadc0f 100644 --- a/lib/jkqtcommon/jkqtpstatbasics.h +++ b/lib/jkqtcommon/jkqtpstatbasics.h @@ -34,7 +34,7 @@ #include #include #include -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtcommon/jkqtcommon_imexport.h" #include "jkqtcommon/jkqtplinalgtools.h" #include "jkqtcommon/jkqtparraytools.h" #include "jkqtcommon/jkqtpdebuggingtools.h" @@ -1018,7 +1018,7 @@ inline void jkqtpstat5NumberStatisticsAndOutliers(InputIt first, InputIt last, O \ingroup jkqtptools_math_statistics_basic \see https://en.wikipedia.org/wiki/Five-number_summary, jkqtpstat5NumberStatistics() */ -struct JKQTP_LIB_EXPORT JKQTPStat5NumberStatistics { +struct JKQTCOMMON_LIB_EXPORT JKQTPStat5NumberStatistics { JKQTPStat5NumberStatistics(); /** \brief minimum value */ diff --git a/lib/jkqtcommon/jkqtpstatgrouped.h b/lib/jkqtcommon/jkqtpstatgrouped.h index 9948fde067..8fdec85f76 100644 --- a/lib/jkqtcommon/jkqtpstatgrouped.h +++ b/lib/jkqtcommon/jkqtpstatgrouped.h @@ -34,7 +34,7 @@ #include #include #include -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtcommon/jkqtcommon_imexport.h" #include "jkqtcommon/jkqtplinalgtools.h" #include "jkqtcommon/jkqtparraytools.h" #include "jkqtcommon/jkqtpdebuggingtools.h" @@ -60,13 +60,13 @@ typedef std::function JKQTPStatGroupDefinitionFunctor1D; \see JKQTPStatGroupDefinitionFunctor1D */ -JKQTP_LIB_EXPORT double jkqtpstatGroupingIdentity1D(double v); +JKQTCOMMON_LIB_EXPORT double jkqtpstatGroupingIdentity1D(double v); /*! \brief use a rounded column value as group ID directly \f$ f(x)=\mbox{round}(x) \f$ \ingroup jkqtptools_math_statistics_grouped \see JKQTPStatGroupDefinitionFunctor1D */ -JKQTP_LIB_EXPORT double jkqtpstatGroupingRound1D(double v); +JKQTCOMMON_LIB_EXPORT double jkqtpstatGroupingRound1D(double v); /*! \brief assign each value to groups \f$ \mbox{firstGroupCenter} \f$ , \f$ \mbox{firstGroupCenter}\pm\mbox{groupWidth}/2\f$ , \f$ \mbox{firstGroupCenter}\pm2\cdot\mbox{groupWidth}/2 \f$ , \f$ \mbox{firstGroupCenter}\pm3\cdot\mbox{groupWidth}/2 \f$ , ... \ingroup jkqtptools_math_statistics_grouped @@ -74,7 +74,7 @@ JKQTP_LIB_EXPORT double jkqtpstatGroupingRound1D(double v); \see JKQTPStatGroupDefinitionFunctor1D, jkqtpstatMakeGroupingCustomRound1D() for a factory-function that returns a functor of this function bound to specific arguments. */ -JKQTP_LIB_EXPORT double jkqtpstatGroupingCustomRound1D(double v, double firstGroupCenter, double groupWidth); +JKQTCOMMON_LIB_EXPORT double jkqtpstatGroupingCustomRound1D(double v, double firstGroupCenter, double groupWidth); /*! \brief generates a functor of jkqtpstatGroupingCustomRound1D() with the two paramaters \a firstGroupCenter and \a groupWidth fixed to the given values \ingroup jkqtptools_math_statistics_grouped @@ -82,7 +82,7 @@ JKQTP_LIB_EXPORT double jkqtpstatGroupingCustomRound1D(double v, double firstGro \see JKQTPStatGroupDefinitionFunctor1D, jkqtpstatGroupingCustomRound1D() */ -JKQTP_LIB_EXPORT JKQTPStatGroupDefinitionFunctor1D jkqtpstatMakeGroupingCustomRound1D(double firstGroupCenter, double groupWidth); +JKQTCOMMON_LIB_EXPORT JKQTPStatGroupDefinitionFunctor1D jkqtpstatMakeGroupingCustomRound1D(double firstGroupCenter, double groupWidth); diff --git a/lib/jkqtcommon/jkqtpstathistogram.h b/lib/jkqtcommon/jkqtpstathistogram.h index a03a3507ef..af6e48efca 100644 --- a/lib/jkqtcommon/jkqtpstathistogram.h +++ b/lib/jkqtcommon/jkqtpstathistogram.h @@ -34,7 +34,7 @@ #include #include #include -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtcommon/jkqtcommon_imexport.h" #include "jkqtcommon/jkqtplinalgtools.h" #include "jkqtcommon/jkqtparraytools.h" #include "jkqtcommon/jkqtpdebuggingtools.h" diff --git a/lib/jkqtcommon/jkqtpstatkde.h b/lib/jkqtcommon/jkqtpstatkde.h index 5896967ab8..ae976be442 100644 --- a/lib/jkqtcommon/jkqtpstatkde.h +++ b/lib/jkqtcommon/jkqtpstatkde.h @@ -34,7 +34,7 @@ #include #include #include -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtcommon/jkqtcommon_imexport.h" #include "jkqtcommon/jkqtplinalgtools.h" #include "jkqtcommon/jkqtparraytools.h" #include "jkqtcommon/jkqtpdebuggingtools.h" @@ -49,64 +49,64 @@ \f[ k(t):=\frac{1}{\sqrt{2\pi}}\exp \left(-\frac{1}{2}t^2\right) \f] */ -JKQTP_LIB_EXPORT double jkqtpstatKernel1DGaussian(double t); +JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DGaussian(double t); /*! \brief a 1D Cauchy kernel function, e.g. for Kernel Density Estimation \ingroup jkqtptools_math_statistics_1dkde_kernels \f[ k(t):=\frac{1}{\pi(1+t^2)} \f] */ -JKQTP_LIB_EXPORT double jkqtpstatKernel1DCauchy(double t); +JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DCauchy(double t); /*! \brief a 1D Picard kernel function, e.g. for Kernel Density Estimation \ingroup jkqtptools_math_statistics_1dkde_kernels \f[ k(t):=\frac{1}{2}\exp(-|t|) \f] */ -JKQTP_LIB_EXPORT double jkqtpstatKernel1DPicard(double t); +JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DPicard(double t); /*! \brief a 1D Epanechnikov kernel function, e.g. for Kernel Density Estimation \ingroup jkqtptools_math_statistics_1dkde_kernels \f[ k(t) :=\begin{cases}\frac{3}{4} ( 1- t^2 ), & \text{if }t\in [-1;1]\\0, & \text{else}\end{cases} \f] */ -JKQTP_LIB_EXPORT double jkqtpstatKernel1DEpanechnikov(double t); +JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DEpanechnikov(double t); /*! \brief a 1D uniform kernel function, e.g. for Kernel Density Estimation \ingroup jkqtptools_math_statistics_1dkde_kernels \f[ k(t) :=\begin{cases}0.5, & \text{if }t\in [-1;1]\\0, & \text{else}\end{cases} \f] */ -JKQTP_LIB_EXPORT double jkqtpstatKernel1DUniform(double t); +JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DUniform(double t); /*! \brief a 1D Epanechnikov kernel function, e.g. for Kernel Density Estimation \ingroup jkqtptools_math_statistics_1dkde_kernels \f[ k(t) :=\begin{cases}1-|t|, & \text{if }t\in [-1;1]\\0, & \text{else}\end{cases} \f] */ -JKQTP_LIB_EXPORT double jkqtpstatKernel1DTriangle(double t); +JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DTriangle(double t); /*! \brief a 1D quartic kernel function, e.g. for Kernel Density Estimation \ingroup jkqtptools_math_statistics_1dkde_kernels \f[ k(t) :=\begin{cases}\frac{15}{16}(1-t^2)^2, & \text{if }t\in [-1;1]\\0, & \text{else}\end{cases} \f] */ -JKQTP_LIB_EXPORT double jkqtpstatKernel1DQuartic(double t); +JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DQuartic(double t); /*! \brief a 1D triweight kernel function, e.g. for Kernel Density Estimation \ingroup jkqtptools_math_statistics_1dkde_kernels \f[ k(t) :=\begin{cases}\frac{35}{32}(1-t^2)^3, & \text{if }t\in [-1;1]\\0, & \text{else}\end{cases} \f] */ -JKQTP_LIB_EXPORT double jkqtpstatKernel1DTriweight(double t); +JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DTriweight(double t); /*! \brief a 1D tricube kernel function, e.g. for Kernel Density Estimation \ingroup jkqtptools_math_statistics_1dkde_kernels \f[ k(t) :=\begin{cases}\frac{70}{81}(1-|t|^3)^3, & \text{if }t\in [-1;1]\\0, & \text{else}\end{cases} \f] */ -JKQTP_LIB_EXPORT double jkqtpstatKernel1DTricube(double t); +JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DTricube(double t); /*! \brief a 1D cosine kernel function, e.g. for Kernel Density Estimation \ingroup jkqtptools_math_statistics_1dkde_kernels \f[ k(t) :=\begin{cases}\frac{\pi}{4}\cos\left(\frac{\pi}{2}t\right), & \text{if }t\in [-1;1]\\0, & \text{else}\end{cases} \f] */ -JKQTP_LIB_EXPORT double jkqtpstatKernel1DCosine(double t); +JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel1DCosine(double t); @@ -125,14 +125,14 @@ JKQTP_LIB_EXPORT double jkqtpstatKernel1DCosine(double t); \f[ k(t_x, t_y):=\frac{1}{2\pi}\exp \left(-\frac{t_x^2+t_y^2}{2}\right) \f] */ -JKQTP_LIB_EXPORT double jkqtpstatKernel2DGaussian(double tx, double ty); +JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel2DGaussian(double tx, double ty); /*! \brief a 1D Gaussian kernel function, e.g. for Kernel Density Estimation \ingroup jkqtptools_math_statistics_2dkde_kernels \f[ k(t_x, t_y):=\begin{cases}\frac{1}{4}, & \text{if }t_x,t_y\in [-1;1]\\0, & \text{else}\end{cases} \f] */ -JKQTP_LIB_EXPORT double jkqtpstatKernel2DUniform(double tx, double ty); +JKQTCOMMON_LIB_EXPORT double jkqtpstatKernel2DUniform(double tx, double ty); diff --git a/lib/jkqtcommon/jkqtpstatpoly.h b/lib/jkqtcommon/jkqtpstatpoly.h index 56883e0825..7c2ed8cebc 100644 --- a/lib/jkqtcommon/jkqtpstatpoly.h +++ b/lib/jkqtcommon/jkqtpstatpoly.h @@ -34,7 +34,7 @@ #include #include #include -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtcommon/jkqtcommon_imexport.h" #include "jkqtcommon/jkqtplinalgtools.h" #include "jkqtcommon/jkqtparraytools.h" #include "jkqtcommon/jkqtpdebuggingtools.h" diff --git a/lib/jkqtcommon/jkqtpstatregression.h b/lib/jkqtcommon/jkqtpstatregression.h index fc5d241cd1..db6af830fb 100644 --- a/lib/jkqtcommon/jkqtpstatregression.h +++ b/lib/jkqtcommon/jkqtpstatregression.h @@ -34,7 +34,7 @@ #include #include #include -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtcommon/jkqtcommon_imexport.h" #include "jkqtcommon/jkqtplinalgtools.h" #include "jkqtcommon/jkqtparraytools.h" #include "jkqtcommon/jkqtpdebuggingtools.h" @@ -278,37 +278,37 @@ enum class JKQTPStatRegressionModelType { /*! \brief Generates functors \c f(x,a,b) for the models from JKQTPStatRegressionModelType in \a type \ingroup jkqtptools_math_statistics_regression */ -JKQTP_LIB_EXPORT std::function jkqtpStatGenerateRegressionModel(JKQTPStatRegressionModelType type); +JKQTCOMMON_LIB_EXPORT std::function jkqtpStatGenerateRegressionModel(JKQTPStatRegressionModelType type); /*! \brief Generates a LaTeX string for the models from JKQTPStatRegressionModelType in \a type \ingroup jkqtptools_math_statistics_regression */ -JKQTP_LIB_EXPORT QString jkqtpstatRegressionModel2Latex(JKQTPStatRegressionModelType type, double a, double b); +JKQTCOMMON_LIB_EXPORT QString jkqtpstatRegressionModel2Latex(JKQTPStatRegressionModelType type, double a, double b); /*! \brief Generates functors \c f(x) for the models from JKQTPStatRegressionModelType in \a type and binds the parameter values \a and \a b to the returned function \ingroup jkqtptools_math_statistics_regression */ -JKQTP_LIB_EXPORT std::function jkqtpStatGenerateRegressionModel(JKQTPStatRegressionModelType type, double a, double b); +JKQTCOMMON_LIB_EXPORT std::function jkqtpStatGenerateRegressionModel(JKQTPStatRegressionModelType type, double a, double b); /*! \brief Generates the transformation function for x-data (\c result.first ) and y-data (\c result.second ) for each regression model in JKQTPStatRegressionModelType in \a type \ingroup jkqtptools_math_statistics_regression \internal */ -JKQTP_LIB_EXPORT std::pair,std::function > jkqtpStatGenerateTransformation(JKQTPStatRegressionModelType type); +JKQTCOMMON_LIB_EXPORT std::pair,std::function > jkqtpStatGenerateTransformation(JKQTPStatRegressionModelType type); /*! \brief Generates the transformation function for a-parameter (offset, \c result.first : transform, \c result.second : back-transform) for each regression model in JKQTPStatRegressionModelType in \a type \ingroup jkqtptools_math_statistics_regression \internal */ -JKQTP_LIB_EXPORT std::pair,std::function > jkqtpStatGenerateParameterATransformation(JKQTPStatRegressionModelType type); +JKQTCOMMON_LIB_EXPORT std::pair,std::function > jkqtpStatGenerateParameterATransformation(JKQTPStatRegressionModelType type); /*! \brief Generates the transformation function for b-parameter (slope, \c result.first : transform, \c result.second : back-transform) for each regression model in JKQTPStatRegressionModelType in \a type \ingroup jkqtptools_math_statistics_regression \internal */ -JKQTP_LIB_EXPORT std::pair,std::function > jkqtpStatGenerateParameterBTransformation(JKQTPStatRegressionModelType type); +JKQTCOMMON_LIB_EXPORT std::pair,std::function > jkqtpStatGenerateParameterBTransformation(JKQTPStatRegressionModelType type); /*! \brief calculate the linear regression coefficients for a given data range \a firstX / \a firstY ... \a lastX / \a lastY where the model is defined by \a type diff --git a/lib/jkqtcommon/jkqtpstringtools.cpp b/lib/jkqtcommon/jkqtpstringtools.cpp index 8ef148a13e..f6f59a15f4 100644 --- a/lib/jkqtcommon/jkqtpstringtools.cpp +++ b/lib/jkqtcommon/jkqtpstringtools.cpp @@ -85,7 +85,7 @@ std::string jkqtp_tolower(const std::string& s){ va_list ap; char buffer[4096]; va_start (ap, templ); - vsprintf (buffer, templ.c_str(), ap); + vsnprintf(buffer, 4096, templ.c_str(), ap); va_end (ap); std::string ret(buffer); return ret; @@ -140,7 +140,7 @@ std::string jkqtp_tolower(const std::string& s){ if (dpos==std::string::npos) { return r; } else { - long i=r.size()-1; + long i= static_cast(r.size())-1; bool nonz=false; while (i>=0) { //std::cout< #include #include @@ -30,21 +30,21 @@ /** \brief converts a QT::PenStyle into a string * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT QString jkqtp_QPenStyle2String(Qt::PenStyle style); +JKQTCOMMON_LIB_EXPORT QString jkqtp_QPenStyle2String(Qt::PenStyle style); /** \brief converts a QString into a Qt::PenStyle * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT Qt::PenStyle jkqtp_String2QPenStyle(const QString& style); +JKQTCOMMON_LIB_EXPORT Qt::PenStyle jkqtp_String2QPenStyle(const QString& style); /** \brief converts a QT::BrushStyle into a string * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT QString jkqtp_QBrushStyle2String(Qt::BrushStyle style); +JKQTCOMMON_LIB_EXPORT QString jkqtp_QBrushStyle2String(Qt::BrushStyle style); /** \brief converts a QString into a Qt::BrushStyle * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT Qt::BrushStyle jkqtp_String2QBrushStyle(const QString& style); +JKQTCOMMON_LIB_EXPORT Qt::BrushStyle jkqtp_String2QBrushStyle(const QString& style); @@ -75,55 +75,55 @@ inline QString JKQTPDoubleToQString(double value, int prec = 10, char f = 'g', Q /** \brief convert a string to lower-case characters * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT std::string jkqtp_tolower(const std::string& s); +JKQTCOMMON_LIB_EXPORT std::string jkqtp_tolower(const std::string& s); /** \brief convert a string to a boolean * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT bool jkqtp_strtobool(const std::string& data); +JKQTCOMMON_LIB_EXPORT bool jkqtp_strtobool(const std::string& data); /** \brief convert a string to upper-case * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT std::string jkqtp_toupper(const std::string& s); +JKQTCOMMON_LIB_EXPORT std::string jkqtp_toupper(const std::string& s); /** \brief std::string wrapper around sprintf() * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT std::string jkqtp_format(const std::string& templ, ...); +JKQTCOMMON_LIB_EXPORT std::string jkqtp_format(const std::string& templ, ...); /** \brief convert a number of bytes to a string, formatting e.g. 1024 as 1kB, ... * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT std::string jkqtp_bytestostr(double bytes); +JKQTCOMMON_LIB_EXPORT std::string jkqtp_bytestostr(double bytes); /** \brief convert an integer to a string * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT std::string jkqtp_inttostr(long data); +JKQTCOMMON_LIB_EXPORT std::string jkqtp_inttostr(long data); /** \brief convert an integer to a hex string * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT std::string jkqtp_inttohex(long data); +JKQTCOMMON_LIB_EXPORT std::string jkqtp_inttohex(long data); /** \brief convert an unsigned int to a string * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT std::string jkqtp_uinttostr(unsigned long data); +JKQTCOMMON_LIB_EXPORT std::string jkqtp_uinttostr(unsigned long data); /** \brief convert a double to a string * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT std::string jkqtp_floattostr(double data, int past_comma=-1, bool remove_trail0=false, double belowIsZero=1e-16); +JKQTCOMMON_LIB_EXPORT std::string jkqtp_floattostr(double data, int past_comma=-1, bool remove_trail0=false, double belowIsZero=1e-16); /** \brief convert a double to a string, encoding powers of ten as characters, e.g. \c jkqtp_floattounitstr(1000,"g") will result in "1kg" * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT std::string jkqtp_floattounitstr(double dataa, const std::string& unitname); +JKQTCOMMON_LIB_EXPORT std::string jkqtp_floattounitstr(double dataa, const std::string& unitname); /** \brief convert a boolean to a string * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT std::string jkqtp_booltostr(bool data); +JKQTCOMMON_LIB_EXPORT std::string jkqtp_booltostr(bool data); /** \brief converts a RGBA color into a string * \ingroup jkqtptools_string * @@ -135,57 +135,57 @@ JKQTP_LIB_EXPORT std::string jkqtp_booltostr(bool data); * \param a alpha value of the color to convert * \param useSpecialTransparencySyntax is set (\c true ), the function uses a special syntax to denote color and transparency: \c color,trans */ -JKQTP_LIB_EXPORT QString jkqtp_rgbtostring(unsigned char r, unsigned char g, unsigned char b, unsigned char a=255, bool useSpecialTransparencySyntax=true); +JKQTCOMMON_LIB_EXPORT QString jkqtp_rgbtostring(unsigned char r, unsigned char g, unsigned char b, unsigned char a=255, bool useSpecialTransparencySyntax=true); /** \brief converts a QColor into a string using the jkqtp_rgbtostring() method. * \ingroup jkqtptools_string * * This returns a QString which contains the name of named colors and the RGBA values in a QT readable form othertwise. */ -JKQTP_LIB_EXPORT QString jkqtp_QColor2String(QColor color, bool useSpecialTransparencySyntax=true); +JKQTCOMMON_LIB_EXPORT QString jkqtp_QColor2String(QColor color, bool useSpecialTransparencySyntax=true); /** \brief converts a QString into a QColor, compatible with jkqtp_QColor2String(QColor color); * \ingroup jkqtptools_string * * This returns a QString which contains the name of named colors and the RGBA values in a QT readable form othertwise. */ -JKQTP_LIB_EXPORT QColor jkqtp_String2QColor(const QString& color); +JKQTCOMMON_LIB_EXPORT QColor jkqtp_String2QColor(const QString& color); /** \brief clean a string to be usable as a variable name, e.g. in an expression parser, or a C++-expression * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT std::string jkqtp_to_valid_variable_name(const std::string& input); +JKQTCOMMON_LIB_EXPORT std::string jkqtp_to_valid_variable_name(const std::string& input); /** \brief convert a double to a string, encoding powers of ten as characters, e.g. \c jkqtp_floattounitstr(1000) will result in "1k" * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT std::string jkqtp_floattounitstr(double data, int past_comma=5, bool remove_trail0=false); +JKQTCOMMON_LIB_EXPORT std::string jkqtp_floattounitstr(double data, int past_comma=5, bool remove_trail0=false); /** \brief convert a double to a string, encoding powers of ten as exponent in LaTeX notation (e.g. -1.23\\cdot 10^{-5}) * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT std::string jkqtp_floattolatexstr(double data, int past_comma=5, bool remove_trail0=false, double belowIsZero=1e-16, double minNoExponent=1e-3, double maxNoExponent=1e4, bool ensurePlusMinus=false); +JKQTCOMMON_LIB_EXPORT std::string jkqtp_floattolatexstr(double data, int past_comma=5, bool remove_trail0=false, double belowIsZero=1e-16, double minNoExponent=1e-3, double maxNoExponent=1e4, bool ensurePlusMinus=false); /** \brief convert a double to a string, encoding powers of ten as exponent with HTML tags * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT std::string jkqtp_floattohtmlstr(double data, int past_comma=5, bool remove_trail0=false, double belowIsZero=1e-16, double minNoExponent=1e-3, double maxNoExponent=1e4); +JKQTCOMMON_LIB_EXPORT std::string jkqtp_floattohtmlstr(double data, int past_comma=5, bool remove_trail0=false, double belowIsZero=1e-16, double minNoExponent=1e-3, double maxNoExponent=1e4); /** \brief convert a double to a string, encoding powers of ten as characters, e.g. \c jkqtp_floattounitstr(1000) will result in "1k" * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT QString jkqtp_floattounitqstr(double data, int past_comma=5, bool remove_trail0=false); +JKQTCOMMON_LIB_EXPORT QString jkqtp_floattounitqstr(double data, int past_comma=5, bool remove_trail0=false); /** \brief convert a double to a string, encoding powers of ten as exponent in LaTeX notation (e.g. -1.23\\cdot 10^{-5}) * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT QString jkqtp_floattolatexqstr(double data, int past_comma=5, bool remove_trail0=false, double belowIsZero=1e-16, double minNoExponent=1e-3, double maxNoExponent=1e4, bool ensurePlusMinus=false); +JKQTCOMMON_LIB_EXPORT QString jkqtp_floattolatexqstr(double data, int past_comma=5, bool remove_trail0=false, double belowIsZero=1e-16, double minNoExponent=1e-3, double maxNoExponent=1e4, bool ensurePlusMinus=false); /** \brief convert a double to a string, encoding powers of ten as exponent with HTML tags * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT QString jkqtp_floattohtmlqstr(double data, int past_comma=5, bool remove_trail0=false, double belowIsZero=1e-16, double minNoExponent=1e-3, double maxNoExponent=1e4); +JKQTCOMMON_LIB_EXPORT QString jkqtp_floattohtmlqstr(double data, int past_comma=5, bool remove_trail0=false, double belowIsZero=1e-16, double minNoExponent=1e-3, double maxNoExponent=1e4); /** \brief convert a character to a string * \ingroup jkqtptools_string */ -JKQTP_LIB_EXPORT std::string jkqtp_chartostr(char data); +JKQTCOMMON_LIB_EXPORT std::string jkqtp_chartostr(char data); diff --git a/lib/jkqtcommon/jkqttools.cpp b/lib/jkqtcommon/jkqttools.cpp index cdf0d07c6e..3816aea190 100644 --- a/lib/jkqtcommon/jkqttools.cpp +++ b/lib/jkqtcommon/jkqttools.cpp @@ -97,7 +97,7 @@ QString jkVariantListToString(const QList& data, const QString& separa return r; } -JKQTP_LIB_EXPORT QString jkqtp_filenameize(const QString& data) { +JKQTCOMMON_LIB_EXPORT QString jkqtp_filenameize(const QString& data) { QString r; QString data1=data.simplified(); for (int i=0; i #include #include @@ -38,7 +38,7 @@ \param widget the widget to store \param prefix this prefix is prepended to the QSettings keys */ -JKQTP_LIB_EXPORT void jksaveWidgetGeometry(QSettings& settings, QWidget* widget, const QString& prefix=QString("")); +JKQTCOMMON_LIB_EXPORT void jksaveWidgetGeometry(QSettings& settings, QWidget* widget, const QString& prefix=QString("")); /*! \brief load the geometry of a given widget to a QSettings \ingroup jkqtpjkqtptools_qt @@ -49,7 +49,7 @@ JKQTP_LIB_EXPORT void jksaveWidgetGeometry(QSettings& settings, QWidget* widget, \param[out] widget the widget to change \param prefix this prefix is prepended to the QSettings keys */ -JKQTP_LIB_EXPORT void jkloadWidgetGeometry(QSettings& settings, QWidget* widget, const QString& prefix=QString("")); +JKQTCOMMON_LIB_EXPORT void jkloadWidgetGeometry(QSettings& settings, QWidget* widget, const QString& prefix=QString("")); /*! \brief load the geometry of a given widget to a QSettings @@ -63,7 +63,7 @@ JKQTP_LIB_EXPORT void jkloadWidgetGeometry(QSettings& settings, QWidget* widget, \param defaultSize default size of the widget \param prefix this prefix is prepended to the QSettings keys */ -JKQTP_LIB_EXPORT void jkloadWidgetGeometry(QSettings& settings, QWidget* widget, QPoint defaultPosition, QSize defaultSize, const QString& prefix=QString("")); +JKQTCOMMON_LIB_EXPORT void jkloadWidgetGeometry(QSettings& settings, QWidget* widget, QPoint defaultPosition, QSize defaultSize, const QString& prefix=QString("")); /*! \brief store the geometry of a given widget to a QSettings \ingroup jkqtpjkqtptools_qt @@ -74,7 +74,7 @@ JKQTP_LIB_EXPORT void jkloadWidgetGeometry(QSettings& settings, QWidget* widget, \param widget the widget to store \param prefix this prefix is prepended to the QSettings keys */ -JKQTP_LIB_EXPORT void jksaveSplitter(QSettings& settings, QSplitter* splitter, const QString& prefix=QString("")); +JKQTCOMMON_LIB_EXPORT void jksaveSplitter(QSettings& settings, QSplitter* splitter, const QString& prefix=QString("")); /*! \brief load the geometry of a given widget to a QSettings \ingroup jkqtpjkqtptools_qt @@ -85,23 +85,23 @@ JKQTP_LIB_EXPORT void jksaveSplitter(QSettings& settings, QSplitter* splitter, c \param[out] plitter the plitter to change \param prefix this prefix is prepended to the QSettings keys */ -JKQTP_LIB_EXPORT void jkloadSplitter(QSettings& settings, QSplitter* splitter, const QString& prefix=QString("")); +JKQTCOMMON_LIB_EXPORT void jkloadSplitter(QSettings& settings, QSplitter* splitter, const QString& prefix=QString("")); /*! \brief convert a QList to a string \ingroup jkqtpjkqtptools_qt */ -JKQTP_LIB_EXPORT QString jkVariantListToString(const QList& data, const QString& separator=QString(", ")); +JKQTCOMMON_LIB_EXPORT QString jkVariantListToString(const QList& data, const QString& separator=QString(", ")); /*! \brief filename-ize a string, i.e. replace every non-number and non-character (and also not _ -) character to \c _ \ingroup tools */ -JKQTP_LIB_EXPORT QString jkqtp_filenameize(const QString& data); +JKQTCOMMON_LIB_EXPORT QString jkqtp_filenameize(const QString& data); /** \brief create a valid variable name from the string, i.e. a string with only characters and digits and \c '_'. ALso the first character has to be a charcter. * \ingroup tools */ -JKQTP_LIB_EXPORT QString jkqtp_toValidVariableName(const QString& input); +JKQTCOMMON_LIB_EXPORT QString jkqtp_toValidVariableName(const QString& input); /** \brief convert a Qt::KeyboardModifiers to a QString * \ingroup tools @@ -111,14 +111,14 @@ JKQTP_LIB_EXPORT QString jkqtp_toValidVariableName(const QString& input); * * \see jkqtp_String2KeyboardModifiers() */ -JKQTP_LIB_EXPORT QString jkqtp_KeyboardModifiers2String(Qt::KeyboardModifiers modifiers, bool useNONE=true); +JKQTCOMMON_LIB_EXPORT QString jkqtp_KeyboardModifiers2String(Qt::KeyboardModifiers modifiers, bool useNONE=true); /** \brief convert a QString (created by jkqtp_KeyboardModifiers2String() ) to Qt::KeyboardModifiers * \ingroup tools * * \see jkqtp_KeyboardModifiers2String() */ -JKQTP_LIB_EXPORT Qt::KeyboardModifiers jkqtp_String2KeyboardModifiers(const QString& modifiers); +JKQTCOMMON_LIB_EXPORT Qt::KeyboardModifiers jkqtp_String2KeyboardModifiers(const QString& modifiers); /** \brief convert a Qt::MouseButton to a QString * \ingroup tools * @@ -127,13 +127,13 @@ JKQTP_LIB_EXPORT Qt::KeyboardModifiers jkqtp_String2KeyboardModifiers(const QStr * * \see jkqtp_MouseButton2String() */ -JKQTP_LIB_EXPORT QString jkqtp_MouseButton2String(Qt::MouseButton button, bool useNONE=true); +JKQTCOMMON_LIB_EXPORT QString jkqtp_MouseButton2String(Qt::MouseButton button, bool useNONE=true); /** \brief convert a QString (created by jkqtp_MouseButton2String() ) to Qt::MouseButton * \ingroup tools * * \see jkqtp_MouseButton2String() */ -JKQTP_LIB_EXPORT Qt::MouseButton jkqtp_String2MouseButton(const QString &button); +JKQTCOMMON_LIB_EXPORT Qt::MouseButton jkqtp_String2MouseButton(const QString &button); #endif // JKQTTOOLS_H diff --git a/lib/jkqtfastplotter/CMakeLists.txt b/lib/jkqtfastplotter/CMakeLists.txt index 860199a78a..f64f59c1c1 100644 --- a/lib/jkqtfastplotter/CMakeLists.txt +++ b/lib/jkqtfastplotter/CMakeLists.txt @@ -3,14 +3,16 @@ cmake_minimum_required(VERSION 3.0) set(libBasename JKQTFastPlotter) if(BUILD_SHARED_LIBS) - set(libsh_name ${libBasename}SharedLib${LIBNAME_ADDITION}) - set(${libsh_name}_LIBRARY ${libsh_name} PARENT_SCOPE) + set(libsh_name ${libBasename}SharedLib) + set(libsh_name_decorated ${libsh_name}${LIBNAME_ADDITION}) + set(${libBasename}_SHARED_LIBRARY ${libsh_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE) message( STATUS "-- Building ${libsh_name}" ) endif(BUILD_SHARED_LIBS) if(BUILD_STATIC_LIBS) - set(lib_name ${libBasename}Lib${LIBNAME_ADDITION}) - set(${lib_name}_LIBRARY ${lib_name} PARENT_SCOPE) + set(lib_name ${libBasename}Lib) + set(lib_name_decorated ${lib_name}${LIBNAME_ADDITION}) + set(${libBasename}_STATIC_LIBRARY ${lib_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE) message( STATUS "-- Building ${lib_name}" ) endif(BUILD_STATIC_LIBS) @@ -22,6 +24,7 @@ set(SOURCES set(HEADERS jkqtfastplotter.h + jkqtfastplotter_imexport.h ) @@ -29,15 +32,20 @@ set(HEADERS if(BUILD_SHARED_LIBS) add_library(${libsh_name} SHARED ${SOURCES} ${HEADERS} ${RESOURCES}) set_property(TARGET ${libsh_name} PROPERTY VERSION "${PROJECT_VERSION}") - target_link_libraries(${libsh_name} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::OpenGL JKQTCommonSharedLib${LIBNAME_ADDITION}) - target_compile_definitions(${libsh_name} PUBLIC JKQTP_LIB_IN_DLL) - target_compile_definitions(${libsh_name} PRIVATE JKQTP_LIB_EXPORT_LIBRARY) + set_property(TARGET ${libsh_name} PROPERTY OUTPUT_NAME "${libsh_name_decorated}") + target_link_libraries(${libsh_name} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::OpenGL JKQTCommonSharedLib) + target_compile_definitions(${libsh_name} PUBLIC JKQTFASTPLOTTER_LIB_IN_DLL) + target_compile_definitions(${libsh_name} PRIVATE JKQTFASTPLOTTER_LIB_EXPORT_LIBRARY) + set_property(TARGET ${libsh_name} PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS "ON") +# include(GenerateExportHeader) +# generate_export_header(${libsh_name}) endif() if(BUILD_STATIC_LIBS) add_library(${lib_name} STATIC ${SOURCES} ${HEADERS} ${RESOURCES}) set_property(TARGET ${lib_name} PROPERTY VERSION "${PROJECT_VERSION}") - target_link_libraries(${lib_name} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::OpenGL JKQTCommonLib${LIBNAME_ADDITION}) + set_property(TARGET ${lib_name} PROPERTY OUTPUT_NAME "${lib_name_decorated}") + target_link_libraries(${lib_name} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::OpenGL JKQTCommonLib) endif() diff --git a/lib/jkqtfastplotter/jkqtfastplotter.cpp b/lib/jkqtfastplotter/jkqtfastplotter.cpp index 7abc3bf0e4..5dc9bf725b 100644 --- a/lib/jkqtfastplotter/jkqtfastplotter.cpp +++ b/lib/jkqtfastplotter/jkqtfastplotter.cpp @@ -1,5 +1,5 @@ /* - Copyright (c) 2008-2015 Jan W. Krieger (, ) (DKFZ) & IWR, University of Heidelberg + Copyright (c) 2008-2019 Jan W. Krieger (, ) (DKFZ) & IWR, University of Heidelberg diff --git a/lib/jkqtfastplotter/jkqtfastplotter.h b/lib/jkqtfastplotter/jkqtfastplotter.h index dfdbcbacd5..b46add2613 100644 --- a/lib/jkqtfastplotter/jkqtfastplotter.h +++ b/lib/jkqtfastplotter/jkqtfastplotter.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2008-2015 Jan W. Krieger (, ) (DKFZ) & IWR, University of Heidelberg + Copyright (c) 2008-2019 Jan W. Krieger (, ) (DKFZ) & IWR, University of Heidelberg @@ -18,17 +18,11 @@ */ -/* - Name: jkqtpfastplotter.h - Copyright: (c) 2010-2019 - Author: Jan krieger , http://www.jkrieger.de/ -*/ - #ifndef JKQTFASTPLOTTER_H #define JKQTFASTPLOTTER_H -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtfastplotter_imexport.h" #include #include #include @@ -89,7 +83,7 @@ class JKQTFPPlot; . */ -class JKQTP_LIB_EXPORT JKQTFastPlotter : public QGLWidget { +class JKQTFASTPLOTTER_LIB_EXPORT JKQTFastPlotter : public QGLWidget { Q_OBJECT public: @@ -1004,7 +998,7 @@ class JKQTP_LIB_EXPORT JKQTFastPlotter : public QGLWidget { /*! \brief base class for all plots that may be plotted by JKQTFastPlotter \ingroup jkqtfastplotter */ -class JKQTP_LIB_EXPORT JKQTFPPlot: public QObject { +class JKQTFASTPLOTTER_LIB_EXPORT JKQTFPPlot: public QObject { Q_OBJECT protected: /** \brief parent class, i.e. the plotter to plot on */ @@ -1046,7 +1040,7 @@ class JKQTP_LIB_EXPORT JKQTFPPlot: public QObject { This class plots data as (x,y) points connected by straight lines. If errors for the y values are provided, also y+/-yerr errorlines are drawn. */ -class JKQTP_LIB_EXPORT JKQTFPLinePlot: public JKQTFPPlot { +class JKQTFASTPLOTTER_LIB_EXPORT JKQTFPLinePlot: public JKQTFPPlot { public: /** \brief used to store which datatype is used for the plot data */ enum DataType { @@ -1274,7 +1268,7 @@ class JKQTP_LIB_EXPORT JKQTFPLinePlot: public JKQTFPPlot { This class does not support y errors! */ -class JKQTP_LIB_EXPORT JKQTFPVCrossPlot: public JKQTFPLinePlot { +class JKQTFASTPLOTTER_LIB_EXPORT JKQTFPVCrossPlot: public JKQTFPLinePlot { Q_OBJECT public: /*! \brief class constructor @@ -1329,7 +1323,7 @@ class JKQTP_LIB_EXPORT JKQTFPVCrossPlot: public JKQTFPLinePlot { This class does not support y errors! */ -class JKQTP_LIB_EXPORT JKQTFPVBarPlot: public JKQTFPLinePlot { +class JKQTFASTPLOTTER_LIB_EXPORT JKQTFPVBarPlot: public JKQTFPLinePlot { Q_OBJECT public: /*! \brief class constructor @@ -1364,7 +1358,7 @@ class JKQTP_LIB_EXPORT JKQTFPVBarPlot: public JKQTFPLinePlot { \ingroup jkqtfastplotter */ -class JKQTP_LIB_EXPORT JKQTFPXRangePlot: public JKQTFPPlot { +class JKQTFASTPLOTTER_LIB_EXPORT JKQTFPXRangePlot: public JKQTFPPlot { Q_OBJECT protected: /** \brief start of x range */ @@ -1528,7 +1522,7 @@ class JKQTP_LIB_EXPORT JKQTFPXRangePlot: public JKQTFPPlot { \ingroup jkqtfastplotter */ -class JKQTP_LIB_EXPORT JKQTFPYRangePlot: public JKQTFPPlot { +class JKQTFASTPLOTTER_LIB_EXPORT JKQTFPYRangePlot: public JKQTFPPlot { Q_OBJECT protected: /** \brief start of x range */ @@ -1691,7 +1685,7 @@ class JKQTP_LIB_EXPORT JKQTFPYRangePlot: public JKQTFPPlot { /*! \brief a plot of a QImage \ingroup jkqtfastplotter */ -class JKQTP_LIB_EXPORT JKQTFPQImagePlot: public JKQTFPPlot { +class JKQTFASTPLOTTER_LIB_EXPORT JKQTFPQImagePlot: public JKQTFPPlot { Q_OBJECT protected: /** \brief image to plot */ @@ -2352,17 +2346,17 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i \ingroup jkqtfastplotter \see JKQTFPimagePlot_array2image() */ -JKQTP_LIB_EXPORT QStringList JKQTFPimagePlot_getPalettes(); +JKQTFASTPLOTTER_LIB_EXPORT QStringList JKQTFPimagePlot_getPalettes(); /*! \brief get QIcon representing the given palette \ingroup jkqtfastplotter \see JKQTFPimagePlot_array2image() */ -JKQTP_LIB_EXPORT QIcon JKQTFPimagePlot_getPaletteIcon(int i); +JKQTFASTPLOTTER_LIB_EXPORT QIcon JKQTFPimagePlot_getPaletteIcon(int i); /*! \brief get QIcon representing the given palette \ingroup jkqtfastplotter \see JKQTFPimagePlot_array2image() */ -JKQTP_LIB_EXPORT QIcon JKQTFPimagePlot_getPaletteIcon(JKQTFPColorPalette palette); +JKQTFASTPLOTTER_LIB_EXPORT QIcon JKQTFPimagePlot_getPaletteIcon(JKQTFPColorPalette palette); /*! \brief plots a given grayscale image with a given color palette @@ -2373,7 +2367,7 @@ JKQTP_LIB_EXPORT QIcon JKQTFPimagePlot_getPaletteIcon(JKQTFPColorPalette palette . */ -class JKQTP_LIB_EXPORT JKQTFPimagePlot: public JKQTFPPlot { +class JKQTFASTPLOTTER_LIB_EXPORT JKQTFPimagePlot: public JKQTFPPlot { Q_OBJECT protected: /** \brief image to plot */ @@ -2744,7 +2738,7 @@ inline void JKQTFPRGBImageOverlayPlot_array2image(T* dbl, int width, int height, . */ -class JKQTP_LIB_EXPORT JKQTFPRGBImageOverlayPlot: public JKQTFPPlot { +class JKQTFASTPLOTTER_LIB_EXPORT JKQTFPRGBImageOverlayPlot: public JKQTFPPlot { Q_OBJECT protected: /** \brief image to plot */ @@ -3106,7 +3100,7 @@ class JKQTP_LIB_EXPORT JKQTFPRGBImageOverlayPlot: public JKQTFPPlot { \ingroup jkqtfastplotter */ -class JKQTP_LIB_EXPORT JKQTFPimageOverlayPlot: public JKQTFPPlot { +class JKQTFASTPLOTTER_LIB_EXPORT JKQTFPimageOverlayPlot: public JKQTFPPlot { Q_OBJECT public: enum SymbolType { @@ -3261,7 +3255,7 @@ class JKQTP_LIB_EXPORT JKQTFPimageOverlayPlot: public JKQTFPPlot { \ingroup jkqtfastplotter */ -class JKQTP_LIB_EXPORT JKQTFPQScaleBarXPlot: public JKQTFPPlot { +class JKQTFASTPLOTTER_LIB_EXPORT JKQTFPQScaleBarXPlot: public JKQTFPPlot { Q_OBJECT public: enum Position { @@ -3385,7 +3379,7 @@ class JKQTP_LIB_EXPORT JKQTFPQScaleBarXPlot: public JKQTFPPlot { \ingroup jkqtfastplotter */ -class JKQTP_LIB_EXPORT JKQTFPQOverlayLinearGridPlot: public JKQTFPPlot { +class JKQTFASTPLOTTER_LIB_EXPORT JKQTFPQOverlayLinearGridPlot: public JKQTFPPlot { Q_OBJECT protected: diff --git a/lib/jkqtfastplotter/jkqtfastplotter_imexport.h b/lib/jkqtfastplotter/jkqtfastplotter_imexport.h new file mode 100644 index 0000000000..b3eaad5ad4 --- /dev/null +++ b/lib/jkqtfastplotter/jkqtfastplotter_imexport.h @@ -0,0 +1,108 @@ +#ifndef jkqtfastplotter_IMPORT_H +#define jkqtfastplotter_IMPORT_H + + +/* + Copyright (c) 2008-2019 Jan W. Krieger () + + last modification: $LastChangedDate: 2015-04-02 13:55:22 +0200 (Do, 02 Apr 2015) $ (revision $Rev: 3902 $) + + This software is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License (LGPL) as published by + the Free Software Foundation, either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License (LGPL) for more details. + + You should have received a copy of the GNU Lesser General Public License (LGPL) + along with this program. If not, see . +*/ + + + + +/*! \def JKQTFASTPLOTTER_LIB_EXPORT + \ingroup tools + + This define allows to export functions and classes from the jkqtcommon-library when building a dynamic/shared library. + Usage is as follows: + \code + #include "jkqtfastplotter/jkqtfastplotter_imexport.h" + + class JKQTFASTPLOTTER_LIB_EXPORT exportedClassName { + ... + }; + + JKQTFASTPLOTTER_LIB_EXPORT void exportedFunctionName(); + \endcode + + These macros append the appropriate \c __declspec(dllexport) and \c __declspec(dllimport) + to the function/class body and thus tell windows compilers to export these sysmbols from + the shared library, or import them from a shared library. + + Note that these attributes are only necessary on windows systems! + + These macros are controlled by two other macros: + - \c JKQTFASTPLOTTER_LIB_IN_DLL declares that the application should link against a shared version of + JKQTFastPlotter, i.e. \c JKQTFastPlotterSharedLib_XYZ . + This needs to be defined while compiling the library and while compiling + any application linking against \c JKQTFastPlotterSharedLib_XYZ. + - \c JKQTFASTPLOTTER_LIB_EXPORT_LIBRARY is only defined while compiling JKQTFastPlotter into \c JKQTFastPlotterSharedLib_XYZ + and ensures thet the symbols are exported. If it is not defined (e.g. while + compiling an application), the symbols are imported + . + + */ + +/*! \def JKQTFASTPLOTTER_LIB_IN_DLL + \ingroup tools + \brief declares that the application should link against a shared version of + JKQTFastPlotter, i.e. \c JKQTFastPlotterSharedLib_XYZ . + This needs to be defined while compiling the library and while compiling + any application linking against \c JKQTFastPlotterSharedLib_XYZ. +*/ + +/*! \def JKQTFASTPLOTTER_LIB_EXPORT_LIBRARY + \ingroup tools + \brief is only defined while compiling JKQTFastPlotter into \c JKQTFastPlotterSharedLib_XYZ + and ensures thet the symbols are exported. If it is not defined (e.g. while + compiling an application), the symbols are imported +*/ + +# ifndef __WINDOWS__ +# if defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32) +# define __WINDOWS__ +# endif +# endif + +#ifdef __WINDOWS__ +# ifdef JKQTFASTPLOTTER_LIB_IN_DLL +# ifndef JKQTFASTPLOTTER_LIB_EXPORT +# ifdef JKQTFASTPLOTTER_LIB_EXPORT_LIBRARY + /* We are building this library */ +# define JKQTFASTPLOTTER_LIB_EXPORT __declspec(dllexport) +# else + /* We are using this library */ +# define JKQTFASTPLOTTER_LIB_EXPORT __declspec(dllimport) +# endif +# endif +# else +# ifndef JKQTFASTPLOTTER_LIB_EXPORT +# define JKQTFASTPLOTTER_LIB_EXPORT +# endif +# endif +#else +# define JKQTFASTPLOTTER_LIB_EXPORT +#endif + + + + + + + +#endif // jkqtfastplotter_IMPORT_H + diff --git a/lib/jkqtmathtext/CMakeLists.txt b/lib/jkqtmathtext/CMakeLists.txt index ad79d56fc9..d257f9898e 100644 --- a/lib/jkqtmathtext/CMakeLists.txt +++ b/lib/jkqtmathtext/CMakeLists.txt @@ -3,14 +3,16 @@ cmake_minimum_required(VERSION 3.0) set(libBasename JKQTMathText) if(BUILD_SHARED_LIBS) - set(libsh_name ${libBasename}SharedLib${LIBNAME_ADDITION}) - set(${libsh_name}_LIBRARY ${libsh_name} PARENT_SCOPE) + set(libsh_name ${libBasename}SharedLib) + set(libsh_name_decorated ${libsh_name}${LIBNAME_ADDITION}) + set(${libBasename}_SHARED_LIBRARY ${libsh_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE) message( STATUS "-- Building ${libsh_name}" ) endif(BUILD_SHARED_LIBS) if(BUILD_STATIC_LIBS) - set(lib_name ${libBasename}Lib${LIBNAME_ADDITION}) - set(${lib_name}_LIBRARY ${lib_name} PARENT_SCOPE) + set(lib_name ${libBasename}Lib) + set(lib_name_decorated ${lib_name}${LIBNAME_ADDITION}) + set(${libBasename}_STATIC_LIBRARY ${lib_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE) message( STATUS "-- Building ${lib_name}" ) endif(BUILD_STATIC_LIBS) @@ -23,6 +25,7 @@ set(SOURCES set(HEADERS jkqtmathtext.h + jkqtmathtext_imexport.h ) if(BUILD_INCLUDE_XITS_FONTS) @@ -35,15 +38,20 @@ endif(BUILD_INCLUDE_XITS_FONTS) if(BUILD_SHARED_LIBS) add_library(${libsh_name} SHARED ${SOURCES} ${HEADERS} ${RESOURCES}) set_property(TARGET ${libsh_name} PROPERTY VERSION "${PROJECT_VERSION}") - target_link_libraries(${libsh_name} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport JKQTCommonSharedLib${LIBNAME_ADDITION}) - target_compile_definitions(${libsh_name} PUBLIC JKQTP_LIB_IN_DLL) - target_compile_definitions(${libsh_name} PRIVATE JKQTP_LIB_EXPORT_LIBRARY) + set_property(TARGET ${libsh_name} PROPERTY OUTPUT_NAME "${libsh_name_decorated}") + target_link_libraries(${libsh_name} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport JKQTCommonSharedLib) + target_compile_definitions(${libsh_name} PUBLIC JKQTMATHTEXT_LIB_IN_DLL) + target_compile_definitions(${libsh_name} PRIVATE JKQTMATHTEXT_LIB_EXPORT_LIBRARY) + set_property(TARGET ${libsh_name} PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS "ON") +# include(GenerateExportHeader) +# generate_export_header(${libsh_name}) endif() if(BUILD_STATIC_LIBS) add_library(${lib_name} STATIC ${SOURCES} ${HEADERS} ${RESOURCES}) set_property(TARGET ${lib_name} PROPERTY VERSION "${PROJECT_VERSION}") - target_link_libraries(${lib_name} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport JKQTCommonLib${LIBNAME_ADDITION}) + set_property(TARGET ${lib_name} PROPERTY OUTPUT_NAME "${lib_name_decorated}") + target_link_libraries(${lib_name} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport JKQTCommonLib) endif() diff --git a/lib/jkqtmathtext/jkqtmathtext.h b/lib/jkqtmathtext/jkqtmathtext.h index 9326a716c6..d6ce32a268 100644 --- a/lib/jkqtmathtext/jkqtmathtext.h +++ b/lib/jkqtmathtext/jkqtmathtext.h @@ -36,7 +36,7 @@ #include #include #include -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtmathtext/jkqtmathtext_imexport.h" #include #include #include @@ -46,7 +46,7 @@ /** \brief initialized Qt-ressources necessary for JKQTMathText * \ingroup jkqtmathtext */ -JKQTP_LIB_EXPORT void initJKQTMathTextResources(); +JKQTMATHTEXT_LIB_EXPORT void initJKQTMathTextResources(); /*! \brief this class parses a LaTeX string and can then draw the contained text/equation onto a QPainter \ingroup jkqtmathtext @@ -217,7 +217,7 @@ JKQTP_LIB_EXPORT void initJKQTMathTextResources(); */ -class JKQTP_LIB_EXPORT JKQTMathText : public QObject { +class JKQTMATHTEXT_LIB_EXPORT JKQTMathText : public QObject { Q_OBJECT public: /** \brief minimum linewidth allowed in a JKQTMathText (given in pt) */ @@ -703,7 +703,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject { }; /** \brief beschreibt die Größe eines Knotens */ - struct JKQTP_LIB_EXPORT MTnodeSize { + struct JKQTMATHTEXT_LIB_EXPORT MTnodeSize { MTnodeSize(); double width; double baselineHeight; @@ -718,7 +718,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject { * * \image html jkqtmathtext_node_geo.png */ - class JKQTP_LIB_EXPORT MTnode { + class JKQTMATHTEXT_LIB_EXPORT MTnode { public: MTnode(JKQTMathText* parent); virtual ~MTnode(); @@ -789,7 +789,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject { /** \brief subclass representing one text node in the syntax tree * \ingroup jkqtmathtext_items */ - class JKQTP_LIB_EXPORT MTtextNode: public MTnode { + class JKQTMATHTEXT_LIB_EXPORT MTtextNode: public MTnode { public: MTtextNode(JKQTMathText* parent, const QString& text, bool addWhitespace, bool stripInnerWhitepace=false); virtual ~MTtextNode() override; @@ -811,7 +811,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject { /** \brief subclass representing one text node in the syntax tree * \ingroup jkqtmathtext_items */ - class JKQTP_LIB_EXPORT MTplainTextNode: public MTtextNode { + class JKQTMATHTEXT_LIB_EXPORT MTplainTextNode: public MTtextNode { public: MTplainTextNode(JKQTMathText* parent, const QString& text, bool addWhitespace, bool stripInnerWhitepace=false); /** \copydoc MTnode::getTypeName() */ @@ -823,7 +823,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject { /** \brief subclass representing one whitepsace node in the syntax tree * \ingroup jkqtmathtext_items */ - class JKQTP_LIB_EXPORT MTwhitespaceNode: public MTtextNode { + class JKQTMATHTEXT_LIB_EXPORT MTwhitespaceNode: public MTtextNode { public: MTwhitespaceNode(JKQTMathText* parent); virtual ~MTwhitespaceNode() override; @@ -837,7 +837,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject { /** \brief subclass representing one symbol (e.g. \c \\alpha , \c \\cdot ...) node in the syntax tree * \ingroup jkqtmathtext_items */ - class JKQTP_LIB_EXPORT MTsymbolNode: public MTnode { + class JKQTMATHTEXT_LIB_EXPORT MTsymbolNode: public MTnode { public: MTsymbolNode(JKQTMathText* parent, const QString& name, bool addWhitespace); virtual ~MTsymbolNode() override; @@ -881,7 +881,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject { /** \brief subclass representing a list of nodes in the syntax tree * \ingroup jkqtmathtext_items */ - class JKQTP_LIB_EXPORT MTlistNode: public MTnode { + class JKQTMATHTEXT_LIB_EXPORT MTlistNode: public MTnode { public: MTlistNode(JKQTMathText* parent); virtual ~MTlistNode() override; @@ -906,7 +906,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject { /** \brief subclass representing an instruction node with exactly one argument in the syntax tree * \ingroup jkqtmathtext_items */ - class JKQTP_LIB_EXPORT MTinstruction1Node: public MTnode { + class JKQTMATHTEXT_LIB_EXPORT MTinstruction1Node: public MTnode { public: MTinstruction1Node(JKQTMathText* parent, const QString& name, MTnode* child, const QStringList& parameters=QStringList()); virtual ~MTinstruction1Node() override; @@ -942,7 +942,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject { * * \image html jkqtmathtext_subscriptnode_getSizeInternal.png */ - class JKQTP_LIB_EXPORT MTsubscriptNode: public MTnode { + class JKQTMATHTEXT_LIB_EXPORT MTsubscriptNode: public MTnode { public: MTsubscriptNode(JKQTMathText* parent, MTnode* child); virtual ~MTsubscriptNode() override; @@ -970,7 +970,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject { * * \note a MTlistNode might modify the positioning slightly for special cases (e.g. \c \\int , \c \\sum ... or after braces) */ - class JKQTP_LIB_EXPORT MTsuperscriptNode: public MTnode { + class JKQTMATHTEXT_LIB_EXPORT MTsuperscriptNode: public MTnode { public: MTsuperscriptNode(JKQTMathText* parent, MTnode* child); virtual ~MTsuperscriptNode() override; @@ -995,7 +995,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject { /** \brief subclass representing a brace node * \ingroup jkqtmathtext_items */ - class JKQTP_LIB_EXPORT MTbraceNode: public MTnode { + class JKQTMATHTEXT_LIB_EXPORT MTbraceNode: public MTnode { public: MTbraceNode(JKQTMathText* parent, const QString& openbrace, const QString& closebrace, MTnode* child, bool showRightBrace=true); virtual ~MTbraceNode() override; @@ -1038,7 +1038,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject { /** \brief subclass representing a sqrt node * \ingroup jkqtmathtext_items */ - class JKQTP_LIB_EXPORT MTsqrtNode: public MTnode { + class JKQTMATHTEXT_LIB_EXPORT MTsqrtNode: public MTnode { public: MTsqrtNode(JKQTMathText* parent, MTnode* child, int degree=2); virtual ~MTsqrtNode() override; @@ -1082,7 +1082,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject { /** \brief subclass representing a \\frac node * \ingroup jkqtmathtext_items */ - class JKQTP_LIB_EXPORT MTfracNode: public MTnode { + class JKQTMATHTEXT_LIB_EXPORT MTfracNode: public MTnode { public: MTfracNode(JKQTMathText* parent, MTnode* child_top, MTnode* child_bottom, MTfracMode mode); virtual ~MTfracNode() override; @@ -1116,7 +1116,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject { /** \brief subclass representing a \\begin{matrix} node * \ingroup jkqtmathtext_items */ - class JKQTP_LIB_EXPORT MTmatrixNode: public MTnode { + class JKQTMATHTEXT_LIB_EXPORT MTmatrixNode: public MTnode { public: MTmatrixNode(JKQTMathText* parent, QVector > children); virtual ~MTmatrixNode() override; @@ -1165,7 +1165,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject { /** \brief subclass representing a decorated text m (e.g. \c \\vec \c \\hat ...) node * \ingroup jkqtmathtext_items */ - class JKQTP_LIB_EXPORT MTdecoratedNode: public MTnode { + class JKQTMATHTEXT_LIB_EXPORT MTdecoratedNode: public MTnode { public: MTdecoratedNode(JKQTMathText* parent, MTdecoration decoration, MTnode* child); virtual ~MTdecoratedNode() override; @@ -1423,7 +1423,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject { return this->parsedNode; } - struct JKQTP_LIB_EXPORT tbrData { + struct JKQTMATHTEXT_LIB_EXPORT tbrData { explicit tbrData(const QFont& f, const QString& text, QPaintDevice *pd); QFontMetricsF fm; QString text; @@ -1434,7 +1434,7 @@ class JKQTP_LIB_EXPORT JKQTMathText : public QObject { bool operator==(const tbrData& other) const; }; - struct JKQTP_LIB_EXPORT tbrDataH { + struct JKQTMATHTEXT_LIB_EXPORT tbrDataH { explicit tbrDataH(const QFont& f, const QString& text, QPaintDevice *pd); QString text; QFont f; @@ -1461,7 +1461,7 @@ inline uint qHash(const JKQTMathText::tbrDataH& data) { \see JKQTMathText */ -class JKQTP_LIB_EXPORT JKQTMathTextLabel: public QLabel { +class JKQTMATHTEXT_LIB_EXPORT JKQTMathTextLabel: public QLabel { Q_OBJECT public: explicit JKQTMathTextLabel(QWidget* parent=nullptr); diff --git a/lib/jkqtmathtext/jkqtmathtext_imexport.h b/lib/jkqtmathtext/jkqtmathtext_imexport.h new file mode 100644 index 0000000000..59e9515710 --- /dev/null +++ b/lib/jkqtmathtext/jkqtmathtext_imexport.h @@ -0,0 +1,108 @@ +#ifndef JKQTMATHTEXT_IMPORT_H +#define JKQTMATHTEXT_IMPORT_H + + +/* + Copyright (c) 2008-2019 Jan W. Krieger () + + last modification: $LastChangedDate: 2015-04-02 13:55:22 +0200 (Do, 02 Apr 2015) $ (revision $Rev: 3902 $) + + This software is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License (LGPL) as published by + the Free Software Foundation, either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License (LGPL) for more details. + + You should have received a copy of the GNU Lesser General Public License (LGPL) + along with this program. If not, see . +*/ + + + + +/*! \def JKQTMATHTEXT_LIB_EXPORT + \ingroup jkqtmathtext + + This define allows to export functions and classes from the jkqtcommon-library when building a dynamic/shared library. + Usage is as follows: + \code + #include "jkqtmathtext/jkqtmathtext_imexport.h" + + class JKQTMATHTEXT_LIB_EXPORT exportedClassName { + ... + }; + + JKQTMATHTEXT_LIB_EXPORT void exportedFunctionName(); + \endcode + + These macros append the appropriate \c __declspec(dllexport) and \c __declspec(dllimport) + to the function/class body and thus tell windows compilers to export these sysmbols from + the shared library, or import them from a shared library. + + Note that these attributes are only necessary on windows systems! + + These macros are controlled by two other macros: + - \c JKQTMATHTEXT_LIB_IN_DLL declares that the application should link against a shared version of + JKQTMathText, i.e. \c JKQTMathTextSharedLib_XYZ . + This needs to be defined while compiling the library and while compiling + any application linking against \c JKQTMathTextSharedLib_XYZ. + - \c JKQTMATHTEXT_LIB_EXPORT_LIBRARY is only defined while compiling JKQTMathText into \c JKQTMathTextSharedLib_XYZ + and ensures thet the symbols are exported. If it is not defined (e.g. while + compiling an application), the symbols are imported + . + + */ + +/*! \def JKQTMATHTEXT_LIB_IN_DLL + \ingroup jkqtmathtext + \brief declares that the application should link against a shared version of + JKQTMathText, i.e. \c JKQTMathTextSharedLib_XYZ . + This needs to be defined while compiling the library and while compiling + any application linking against \c JKQTMathTextSharedLib_XYZ. +*/ + +/*! \def JKQTMATHTEXT_LIB_EXPORT_LIBRARY + \ingroup jkqtmathtext + \brief is only defined while compiling JKQTMathText into \c JKQTMathTextSharedLib_XYZ + and ensures thet the symbols are exported. If it is not defined (e.g. while + compiling an application), the symbols are imported +*/ + +# ifndef __WINDOWS__ +# if defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32) +# define __WINDOWS__ +# endif +# endif + +#ifdef __WINDOWS__ +# ifdef JKQTMATHTEXT_LIB_IN_DLL +# ifndef JKQTMATHTEXT_LIB_EXPORT +# ifdef JKQTMATHTEXT_LIB_EXPORT_LIBRARY + /* We are building this library */ +# define JKQTMATHTEXT_LIB_EXPORT __declspec(dllexport) +# else + /* We are using this library */ +# define JKQTMATHTEXT_LIB_EXPORT __declspec(dllimport) +# endif +# endif +# else +# ifndef JKQTMATHTEXT_LIB_EXPORT +# define JKQTMATHTEXT_LIB_EXPORT +# endif +# endif +#else +# define JKQTMATHTEXT_LIB_EXPORT +#endif + + + + + + + +#endif // JKQTMATHTEXT_IMPORT_H + diff --git a/lib/jkqtpcommon.pri b/lib/jkqtpcommon.pri index e13646c465..ceb4b31179 100644 --- a/lib/jkqtpcommon.pri +++ b/lib/jkqtpcommon.pri @@ -16,7 +16,7 @@ isEmpty(JKQTP_COMMON_PRI_INCLUDED) { DEFINES += NOMINMAX } - HEADERS += $$PWD/jkqtcommon/jkqtp_imexport.h \ + HEADERS += $$PWD/jkqtcommon/jkqtcommon_imexport.h \ $$PWD/jkqtcommon/jkqtpdebuggingtools.h \ $$PWD/jkqtcommon/jkqtpmathtools.h \ $$PWD/jkqtcommon/jkqtpalgorithms.h \ diff --git a/lib/jkqtplotter/CMakeLists.txt b/lib/jkqtplotter/CMakeLists.txt index a5dfaec298..b905638a7b 100644 --- a/lib/jkqtplotter/CMakeLists.txt +++ b/lib/jkqtplotter/CMakeLists.txt @@ -3,14 +3,16 @@ cmake_minimum_required(VERSION 3.0) set(libBasename JKQTPlotter) if(BUILD_SHARED_LIBS) - set(libsh_name ${libBasename}SharedLib${LIBNAME_ADDITION}) - set(${libsh_name}_LIBRARY ${libsh_name} PARENT_SCOPE) + set(libsh_name ${libBasename}SharedLib) + set(libsh_name_decorated ${libsh_name}${LIBNAME_ADDITION}) + set(${libBasename}_SHARED_LIBRARY ${libsh_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE) message( STATUS "-- Building ${libsh_name}" ) endif(BUILD_SHARED_LIBS) if(BUILD_STATIC_LIBS) - set(lib_name ${libBasename}Lib${LIBNAME_ADDITION}) - set(${lib_name}_LIBRARY ${lib_name} PARENT_SCOPE) + set(lib_name ${libBasename}Lib) + set(lib_name_decorated ${lib_name}${LIBNAME_ADDITION}) + set(${libBasename}_STATIC_LIBRARY ${lib_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE) message( STATUS "-- Building ${lib_name}" ) endif(BUILD_STATIC_LIBS) @@ -82,6 +84,7 @@ set(HEADERS jkqtpcoordinateaxes.h jkqtpcoordinateaxesstyle.h jkqtpimagetools.h + jkqtplotter_imexport.h ) set(HEADERS_GRAPHS graphs/jkqtpboxplot.h @@ -125,15 +128,20 @@ set(RESOURCES if(BUILD_SHARED_LIBS) add_library(${libsh_name} SHARED ${SOURCES} ${SOURCES_GRAPHS} ${SOURCES_GUI} ${SOURCES_OVERLAYS} ${HEADERS} ${HEADERS_GRAPHS} ${HEADERS_GUI} ${HEADERS_OVERLAYS} ${RESOURCES}) set_property(TARGET ${libsh_name} PROPERTY VERSION "${PROJECT_VERSION}") - target_link_libraries(${libsh_name} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::Svg Qt5::Xml JKQTCommonSharedLib${LIBNAME_ADDITION} JKQTMathTextSharedLib${LIBNAME_ADDITION}) - target_compile_definitions(${libsh_name} PUBLIC JKQTP_LIB_IN_DLL) - target_compile_definitions(${libsh_name} PRIVATE JKQTP_LIB_EXPORT_LIBRARY) + set_property(TARGET ${libsh_name} PROPERTY OUTPUT_NAME "${libsh_name_decorated}") + target_link_libraries(${libsh_name} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::Svg Qt5::Xml JKQTCommonSharedLib JKQTMathTextSharedLib) + target_compile_definitions(${libsh_name} PUBLIC JKQTPLOTTER_LIB_IN_DLL) + target_compile_definitions(${libsh_name} PRIVATE JKQTPLOTTER_LIB_EXPORT_LIBRARY) + set_property(TARGET ${libsh_name} PROPERTY WINDOWS_EXPORT_ALL_SYMBOLS "ON") +# include(GenerateExportHeader) +# generate_export_header(${libsh_name}) endif() if(BUILD_STATIC_LIBS) add_library(${lib_name} STATIC ${SOURCES} ${SOURCES_GRAPHS} ${SOURCES_GUI} ${SOURCES_OVERLAYS} ${HEADERS} ${HEADERS_GRAPHS} ${HEADERS_GUI} ${HEADERS_OVERLAYS} ${RESOURCES}) set_property(TARGET ${lib_name} PROPERTY VERSION "${PROJECT_VERSION}") - target_link_libraries(${lib_name} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::Svg Qt5::Xml JKQTCommonLib${LIBNAME_ADDITION} JKQTMathTextLib${LIBNAME_ADDITION}) + set_property(TARGET ${lib_name} PROPERTY OUTPUT_NAME "${lib_name_decorated}") + target_link_libraries(${lib_name} Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport Qt5::Svg Qt5::Xml JKQTCommonLib JKQTMathTextLib) endif() diff --git a/lib/jkqtplotter/graphs/jkqtpbarchart.cpp b/lib/jkqtplotter/graphs/jkqtpbarchart.cpp index ebe9f8e503..9d69f2ca0a 100644 --- a/lib/jkqtplotter/graphs/jkqtpbarchart.cpp +++ b/lib/jkqtplotter/graphs/jkqtpbarchart.cpp @@ -84,7 +84,7 @@ void JKQTPBarVerticalGraph::draw(JKQTPEnhancedPainter& painter) { QBrush b=getFillBrush(painter, parent); - int imax=qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax=static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); int imin=0; if (imaxgetDatastore(); int imin=0; - int imax=qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax=static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); if (imaxgetDatastore(); int imin=0; - int imax=qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax=static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); if (imaxgetRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax=static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); int imin=0; if (imaxgetDatastore(); int imin=0; - int imax=qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(xColumn))); + int imax=static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); if (imaxgetDatastore(); int imin=0; - int imax=qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax=static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); if (imaxgetDatastore(); int imin=0; - int imax=qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax=static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); if (imaxgetDatastore(); int imin=0; - int imax=qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax=static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); if (imaxgetDatastore(); int imin=0; - int imax=qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax=static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); if (imax #include #include "jkqtplotter/jkqtptools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtpimagetools.h" #include "jkqtplotter/jkqtpgraphsbase.h" #include "jkqtplotter/jkqtpgraphsbaseerrors.h" @@ -56,7 +56,7 @@ \see JKQTPBarHorizontalGraph, \ref JKQTPlotterBarcharts, jkqtpstatAddHHistogram1D(), jkqtpstatAddHHistogram1DAutoranged() */ -class JKQTP_LIB_EXPORT JKQTPBarVerticalGraph: public JKQTPXYGraph, public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPBarVerticalGraph: public JKQTPXYGraph, public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin { Q_OBJECT public: /** \brief class constructor */ @@ -175,7 +175,7 @@ class JKQTP_LIB_EXPORT JKQTPBarVerticalGraph: public JKQTPXYGraph, public JKQTPG * * \see JKQTPBarVerticalGraph, \ref JKQTPlotterStackedBarChart */ -class JKQTP_LIB_EXPORT JKQTPBarVerticalStackableGraph: public JKQTPBarVerticalGraph { +class JKQTPLOTTER_LIB_EXPORT JKQTPBarVerticalStackableGraph: public JKQTPBarVerticalGraph { Q_OBJECT public: /** \brief class constructor */ @@ -215,7 +215,7 @@ class JKQTP_LIB_EXPORT JKQTPBarVerticalStackableGraph: public JKQTPBarVerticalGr * * \see jkqtpstatAddYErrorBarGraph(), JKQTPBarVerticalGraph, \ref JKQTPlotterBarcharts */ -class JKQTP_LIB_EXPORT JKQTPBarVerticalErrorGraph: public JKQTPBarVerticalGraph, public JKQTPYGraphErrors { +class JKQTPLOTTER_LIB_EXPORT JKQTPBarVerticalErrorGraph: public JKQTPBarVerticalGraph, public JKQTPYGraphErrors { Q_OBJECT public: /** \brief class constructor */ @@ -249,7 +249,7 @@ class JKQTP_LIB_EXPORT JKQTPBarVerticalErrorGraph: public JKQTPBarVerticalGraph, \see \ref JKQTPlotterBarcharts, jkqtpstatAddVHistogram1D(), jkqtpstatAddVHistogram1DAutoranged() */ -class JKQTP_LIB_EXPORT JKQTPBarHorizontalGraph: public JKQTPBarVerticalGraph { +class JKQTPLOTTER_LIB_EXPORT JKQTPBarHorizontalGraph: public JKQTPBarVerticalGraph { Q_OBJECT public: /** \brief class constructor */ @@ -287,7 +287,7 @@ class JKQTP_LIB_EXPORT JKQTPBarHorizontalGraph: public JKQTPBarVerticalGraph { * * \see JKQTPBarHorizontalGraph, \ref JKQTPlotterStackedBarChart */ -class JKQTP_LIB_EXPORT JKQTPBarHorizontalStackableGraph: public JKQTPBarHorizontalGraph { +class JKQTPLOTTER_LIB_EXPORT JKQTPBarHorizontalStackableGraph: public JKQTPBarHorizontalGraph { Q_OBJECT public: /** \brief class constructor */ @@ -328,7 +328,7 @@ class JKQTP_LIB_EXPORT JKQTPBarHorizontalStackableGraph: public JKQTPBarHorizont * \see jkqtpstatAddXErrorBarGraph(), JKQTPBarHorizontalGraph, \ref JKQTPlotterBarcharts * */ -class JKQTP_LIB_EXPORT JKQTPBarHorizontalErrorGraph: public JKQTPBarHorizontalGraph, public JKQTPXGraphErrors { +class JKQTPLOTTER_LIB_EXPORT JKQTPBarHorizontalErrorGraph: public JKQTPBarHorizontalGraph, public JKQTPXGraphErrors { Q_OBJECT public: /** \brief class constructor */ diff --git a/lib/jkqtplotter/graphs/jkqtpboxplot.cpp b/lib/jkqtplotter/graphs/jkqtpboxplot.cpp index c8ba03e649..a8576ccbfd 100644 --- a/lib/jkqtplotter/graphs/jkqtpboxplot.cpp +++ b/lib/jkqtplotter/graphs/jkqtpboxplot.cpp @@ -257,7 +257,7 @@ bool JKQTPBoxplotVerticalGraph::getYMinMax(double& miny, double& maxy, double& s JKQTPDatastore* datastore=parent->getDatastore(); int imin=0; - int imax=datastore->getRows(medianColumn); + int imax= static_cast(datastore->getRows(medianColumn)); if (imaxgetDatastore(); int imin=0; - int imax=datastore->getRows(medianColumn); + int imax= static_cast(datastore->getRows(medianColumn)); if (imax #include #include "jkqtplotter/jkqtptools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtpimagetools.h" #include "jkqtplotter/jkqtpgraphsbase.h" #include "jkqtplotter/graphs/jkqtpboxplotstylingmixins.h" @@ -98,7 +98,7 @@ \see \ref JKQTPlotterBoxplotsGraphs, jkqtpstatVAddBoxplots(),\ref JKQTPlotterBasicJKQTPDatastoreStatisticsGroupedStat, \ref JKQTPlotterBasicJKQTPDatastoreStatistics, \ref JKQTPlotterBoxplotStyling */ -class JKQTP_LIB_EXPORT JKQTPBoxplotVerticalGraph: public JKQTPGraph, public JKQTPGraphBoxplotStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPBoxplotVerticalGraph: public JKQTPGraph, public JKQTPGraphBoxplotStyleMixin { Q_OBJECT public: @@ -255,7 +255,7 @@ class JKQTP_LIB_EXPORT JKQTPBoxplotVerticalGraph: public JKQTPGraph, public JKQT \see JKQTPBoxplotVerticalGraph \ref JKQTPlotterBoxplotsGraphs, jkqtpstatHAddBoxplots(), \ref JKQTPlotterBasicJKQTPDatastoreStatisticsGroupedStat, \ref JKQTPlotterBasicJKQTPDatastoreStatistics, \ref JKQTPlotterBoxplotStyling */ -class JKQTP_LIB_EXPORT JKQTPBoxplotHorizontalGraph: public JKQTPBoxplotVerticalGraph { +class JKQTPLOTTER_LIB_EXPORT JKQTPBoxplotHorizontalGraph: public JKQTPBoxplotVerticalGraph { Q_OBJECT public: /** \brief class constructor */ @@ -309,7 +309,7 @@ class JKQTP_LIB_EXPORT JKQTPBoxplotHorizontalGraph: public JKQTPBoxplotVerticalG \see jkqtpstatVAddBoxplot(), \ref JKQTPlotterBasicJKQTPDatastoreStatistics, \ref JKQTPlotterBoxplotsGraphs, \ref JKQTPlotterBoxplotStyling, jkqtpstatAddVBoxplotAndOutliers() */ -class JKQTP_LIB_EXPORT JKQTPBoxplotVerticalElement: public JKQTPPlotObject, public JKQTPGraphBoxplotStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPBoxplotVerticalElement: public JKQTPPlotObject, public JKQTPGraphBoxplotStyleMixin { Q_OBJECT public: /** \brief class constructor */ @@ -433,7 +433,7 @@ class JKQTP_LIB_EXPORT JKQTPBoxplotVerticalElement: public JKQTPPlotObject, publ \see JKQTPBoxplotVerticalElement, jkqtpstatHAddBoxplot(), \ref JKQTPlotterBasicJKQTPDatastoreStatistics, \ref JKQTPlotterBoxplotsGraphs, \ref JKQTPlotterBoxplotStyling, jkqtpstatAddHBoxplotAndOutliers() */ -class JKQTP_LIB_EXPORT JKQTPBoxplotHorizontalElement: public JKQTPBoxplotVerticalElement { +class JKQTPLOTTER_LIB_EXPORT JKQTPBoxplotHorizontalElement: public JKQTPBoxplotVerticalElement { Q_OBJECT public: /** \brief class constructor */ diff --git a/lib/jkqtplotter/graphs/jkqtpboxplotstylingmixins.h b/lib/jkqtplotter/graphs/jkqtpboxplotstylingmixins.h index a9b0fe394f..c64427efdc 100644 --- a/lib/jkqtplotter/graphs/jkqtpboxplotstylingmixins.h +++ b/lib/jkqtplotter/graphs/jkqtpboxplotstylingmixins.h @@ -21,7 +21,7 @@ #include #include #include "jkqtplotter/jkqtptools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtpgraphsbase.h" #include "jkqtplotter/jkqtpgraphsbasestylingmixins.h" @@ -42,7 +42,7 @@ \image html test_styledboxplot.png */ -class JKQTP_LIB_EXPORT JKQTPGraphBoxplotStyleMixin: public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPGraphBoxplotStyleMixin: public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin { Q_GADGET public: /** \brief class constructor */ diff --git a/lib/jkqtplotter/graphs/jkqtpcontour.cpp b/lib/jkqtplotter/graphs/jkqtpcontour.cpp index 8e08c76a25..6c9eaa855a 100644 --- a/lib/jkqtplotter/graphs/jkqtpcontour.cpp +++ b/lib/jkqtplotter/graphs/jkqtpcontour.cpp @@ -439,11 +439,16 @@ JKQTPColumnContourPlot::JKQTPColumnContourPlot(JKQTPlotter *parent): void JKQTPColumnContourPlot::setImageColumn(int __value) { - this->imageColumn = __value; - if (parent && __value>=0 && parent->getDatastore()) { - setNx(parent->getDatastore()->getColumnImageWidth(__value)); - setNy(parent->getDatastore()->getColumnImageHeight(__value)); - } + this->imageColumn = __value; + if (parent && __value >= 0 && parent->getDatastore()) { + setNx(parent->getDatastore()->getColumnImageWidth(__value)); + setNy(parent->getDatastore()->getColumnImageHeight(__value)); + } +} + +void JKQTPColumnContourPlot::setImageColumn(size_t __value) +{ + setImageColumn(static_cast(__value)); } int JKQTPColumnContourPlot::getImageColumn() const @@ -465,6 +470,6 @@ void JKQTPColumnContourPlot::ensureImageData() } else { this->datatype=JKQTPMathImageBase::DoubleArray; this->data=parent->getDatastore()->getColumnPointer(imageColumn,0); - this->Ny=parent->getDatastore()->getRows(imageColumn)/this->Nx; + this->Ny=static_cast(parent->getDatastore()->getRows(imageColumn)/this->Nx); } } diff --git a/lib/jkqtplotter/graphs/jkqtpcontour.h b/lib/jkqtplotter/graphs/jkqtpcontour.h index 6ea121d75d..3b9a54540e 100644 --- a/lib/jkqtplotter/graphs/jkqtpcontour.h +++ b/lib/jkqtplotter/graphs/jkqtpcontour.h @@ -32,7 +32,7 @@ #include "jkqtplotter/jkqtpbaseelements.h" #include "jkqtplotter/graphs/jkqtpimage.h" #include "jkqtplotter/jkqtpgraphsbasestylingmixins.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtpimagetools.h" @@ -73,7 +73,7 @@ * is necessary. If it doesn't match, the contours are recalculated. In addition several methods that change certain * properties of the plot will force a recalculation. Finally you can call clearCachedContours() to force a recalculation! */ -class JKQTP_LIB_EXPORT JKQTPContourPlot: public JKQTPMathImage, public JKQTPGraphLineStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPContourPlot: public JKQTPMathImage, public JKQTPGraphLineStyleMixin { Q_OBJECT public: /** \brief options of how the colors for the contours are chosen (note that all images in the documentation show the same graph, just with different coloring modes!)*/ @@ -250,7 +250,7 @@ class JKQTP_LIB_EXPORT JKQTPContourPlot: public JKQTPMathImage, public JKQTPGrap * * \see jkqtpstatAddKDE2DContour(), jkqtpstatAddHistogram2DContour(), \ref JKQTPlotterContourPlot, \ref JKQTPlotterBasicJKQTPDatastoreStatistics2D */ -class JKQTP_LIB_EXPORT JKQTPColumnContourPlot: public JKQTPContourPlot { +class JKQTPLOTTER_LIB_EXPORT JKQTPColumnContourPlot: public JKQTPContourPlot { Q_OBJECT public: @@ -261,7 +261,10 @@ class JKQTP_LIB_EXPORT JKQTPColumnContourPlot: public JKQTPContourPlot { JKQTPColumnContourPlot(JKQTPlotter* parent); /*! \copydoc imageColumn */ - virtual void setImageColumn(int __value); + void setImageColumn(int __value); + + /*! \copydoc imageColumn */ + void setImageColumn(size_t __value); /*! \copydoc imageColumn */ int getImageColumn() const; diff --git a/lib/jkqtplotter/graphs/jkqtpevaluatedfunction.cpp b/lib/jkqtplotter/graphs/jkqtpevaluatedfunction.cpp index ae56a84f06..bc5aadee52 100644 --- a/lib/jkqtplotter/graphs/jkqtpevaluatedfunction.cpp +++ b/lib/jkqtplotter/graphs/jkqtpevaluatedfunction.cpp @@ -302,7 +302,7 @@ void JKQTPXFunctionLineGraph::collectParameters() iparams.clear(); JKQTPDatastore* datastore=parent->getDatastore(); int imin=0; - int imax=datastore->getRows(parameterColumn); + int imax=static_cast(datastore->getRows(parameterColumn)); for (int i=imin; iget(parameterColumn,i); @@ -325,7 +325,7 @@ void JKQTPXFunctionLineGraph::collectParameters() ierrorparams.clear(); JKQTPDatastore* datastore=parent->getDatastore(); int imin=0; - int imax=datastore->getRows(errorParameterColumn); + int imax= static_cast(datastore->getRows(errorParameterColumn)); for (int i=imin; iget(errorParameterColumn,i); diff --git a/lib/jkqtplotter/graphs/jkqtpevaluatedfunction.h b/lib/jkqtplotter/graphs/jkqtpevaluatedfunction.h index 085d5d7f31..ee75dc2463 100644 --- a/lib/jkqtplotter/graphs/jkqtpevaluatedfunction.h +++ b/lib/jkqtplotter/graphs/jkqtpevaluatedfunction.h @@ -24,7 +24,7 @@ #include #include "jkqtplotter/graphs/jkqtpscatter.h" #include "jkqtplotter/jkqtpgraphsbasestylingmixins.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include #ifndef jkqtpgraphsevaluatedfunction_H @@ -68,7 +68,7 @@ typedef std::function jkqtpSimplePlotFunctionType; \see \ref JKQTPlotterFunctionPlots, jkqtpstatAddPolyFit(), jkqtpstatAddWeightedRegression(), jkqtpstatAddRobustIRLSRegression(), jkqtpstatAddRegression(), jkqtpstatAddLinearWeightedRegression(), jkqtpstatAddRobustIRLSLinearRegression(), jkqtpstatAddLinearRegression() */ -class JKQTP_LIB_EXPORT JKQTPXFunctionLineGraph: public JKQTPGraph, public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPXFunctionLineGraph: public JKQTPGraph, public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin { Q_OBJECT public: @@ -396,7 +396,7 @@ class JKQTP_LIB_EXPORT JKQTPXFunctionLineGraph: public JKQTPGraph, public JKQTPG \see \ref JKQTPlotterFunctionPlots */ -class JKQTP_LIB_EXPORT JKQTPYFunctionLineGraph: public JKQTPXFunctionLineGraph { +class JKQTPLOTTER_LIB_EXPORT JKQTPYFunctionLineGraph: public JKQTPXFunctionLineGraph { Q_OBJECT public: /** \brief class constructor */ diff --git a/lib/jkqtplotter/graphs/jkqtpfilledcurve.h b/lib/jkqtplotter/graphs/jkqtpfilledcurve.h index ae247ee4d0..a038151354 100644 --- a/lib/jkqtplotter/graphs/jkqtpfilledcurve.h +++ b/lib/jkqtplotter/graphs/jkqtpfilledcurve.h @@ -18,7 +18,7 @@ */ -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtpgraphsbase.h" #include "jkqtplotter/jkqtpgraphsbaseerrors.h" #include "jkqtplotter/graphs/jkqtpspecialline.h" @@ -37,7 +37,7 @@ \see \ref JKQTPlotterFilledGraphs */ -class JKQTP_LIB_EXPORT JKQTPFilledCurveXGraph: public JKQTPSpecialLineHorizontalGraph { +class JKQTPLOTTER_LIB_EXPORT JKQTPFilledCurveXGraph: public JKQTPSpecialLineHorizontalGraph { Q_OBJECT public: /** \brief class constructor */ @@ -56,7 +56,7 @@ class JKQTP_LIB_EXPORT JKQTPFilledCurveXGraph: public JKQTPSpecialLineHorizontal \see \ref JKQTPlotterFilledGraphs, jkqtpstatAddXErrorFilledCurveGraph() */ -class JKQTP_LIB_EXPORT JKQTPFilledCurveXErrorGraph: public JKQTPFilledCurveXGraph, public JKQTPYGraphErrors { +class JKQTPLOTTER_LIB_EXPORT JKQTPFilledCurveXErrorGraph: public JKQTPFilledCurveXGraph, public JKQTPYGraphErrors { Q_OBJECT public: /** \brief class constructor */ @@ -85,7 +85,7 @@ class JKQTP_LIB_EXPORT JKQTPFilledCurveXErrorGraph: public JKQTPFilledCurveXGrap \see \ref JKQTPlotterFilledGraphs */ -class JKQTP_LIB_EXPORT JKQTPFilledCurveYGraph: public JKQTPSpecialLineVerticalGraph { +class JKQTPLOTTER_LIB_EXPORT JKQTPFilledCurveYGraph: public JKQTPSpecialLineVerticalGraph { Q_OBJECT public: /** \brief class constructor */ @@ -105,7 +105,7 @@ class JKQTP_LIB_EXPORT JKQTPFilledCurveYGraph: public JKQTPSpecialLineVerticalGr \see \ref JKQTPlotterFilledGraphs, jkqtpstatAddYErrorFilledCurveGraph() */ -class JKQTP_LIB_EXPORT JKQTPFilledCurveYErrorGraph: public JKQTPFilledCurveYGraph, public JKQTPXGraphErrors { +class JKQTPLOTTER_LIB_EXPORT JKQTPFilledCurveYErrorGraph: public JKQTPFilledCurveYGraph, public JKQTPXGraphErrors { Q_OBJECT public: /** \brief class constructor */ @@ -139,7 +139,7 @@ class JKQTP_LIB_EXPORT JKQTPFilledCurveYErrorGraph: public JKQTPFilledCurveYGrap \see \ref JKQTPlotterDateTimeAxes */ -class JKQTP_LIB_EXPORT JKQTPFilledVerticalRangeGraph: public JKQTPXYGraph, public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPFilledVerticalRangeGraph: public JKQTPXYGraph, public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin { Q_OBJECT public: /** \brief class constructor */ diff --git a/lib/jkqtplotter/graphs/jkqtpgeometric.h b/lib/jkqtplotter/graphs/jkqtpgeometric.h index 0c3383c39a..7f380d8ded 100644 --- a/lib/jkqtplotter/graphs/jkqtpgeometric.h +++ b/lib/jkqtplotter/graphs/jkqtpgeometric.h @@ -24,7 +24,7 @@ #include "jkqtplotter/graphs/jkqtpscatter.h" #include "jkqtplotter/jkqtpgraphsbasestylingmixins.h" #include "jkqtplotter/jkqtptools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtmathtext/jkqtmathtext.h" #ifndef jkqtpgraphsgeometric_H_INCLUDED @@ -36,7 +36,7 @@ \ingroup jkqtplotter_geoplots */ -class JKQTP_LIB_EXPORT JKQTPGeoBaseLine: public JKQTPPlotObject, public JKQTPGraphLineStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPGeoBaseLine: public JKQTPPlotObject, public JKQTPGraphLineStyleMixin { Q_OBJECT public: /*! \brief class contructor @@ -86,7 +86,7 @@ class JKQTP_LIB_EXPORT JKQTPGeoBaseLine: public JKQTPPlotObject, public JKQTPGra \ingroup jkqtplotter_geoplots */ -class JKQTP_LIB_EXPORT JKQTPGeoBaseFilled: public JKQTPGeoBaseLine, public JKQTPGraphFillStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPGeoBaseFilled: public JKQTPGeoBaseLine, public JKQTPGraphFillStyleMixin { Q_OBJECT public: /*! \brief class contructor @@ -154,7 +154,7 @@ class JKQTP_LIB_EXPORT JKQTPGeoBaseFilled: public JKQTPGeoBaseLine, public JKQTP \ingroup jkqtplotter_geoplots */ -class JKQTP_LIB_EXPORT JKQTPGeoSymbol: public JKQTPPlotObject, public JKQTPGraphSymbolStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPGeoSymbol: public JKQTPPlotObject, public JKQTPGraphSymbolStyleMixin { Q_OBJECT public: /*! \brief class contructor @@ -219,7 +219,7 @@ class JKQTP_LIB_EXPORT JKQTPGeoSymbol: public JKQTPPlotObject, public JKQTPGraph \ingroup jkqtplotter_geoplots */ -class JKQTP_LIB_EXPORT JKQTPGeoText: public JKQTPPlotObject, public JKQTPGraphTextStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPGeoText: public JKQTPPlotObject, public JKQTPGraphTextStyleMixin { Q_OBJECT public: /*! \brief class contructor @@ -306,7 +306,7 @@ class JKQTP_LIB_EXPORT JKQTPGeoText: public JKQTPPlotObject, public JKQTPGraphTe \image html plot_geoline.png */ -class JKQTP_LIB_EXPORT JKQTPGeoLine: public JKQTPGeoBaseLine { +class JKQTPLOTTER_LIB_EXPORT JKQTPGeoLine: public JKQTPGeoBaseLine { Q_OBJECT public: /*! \brief class constructor @@ -404,7 +404,7 @@ class JKQTP_LIB_EXPORT JKQTPGeoLine: public JKQTPGeoBaseLine { \image html plot_geoinfiniteline.png */ -class JKQTP_LIB_EXPORT JKQTPGeoInfiniteLine: public JKQTPGeoBaseLine { +class JKQTPLOTTER_LIB_EXPORT JKQTPGeoInfiniteLine: public JKQTPGeoBaseLine { Q_OBJECT public: /*! \brief class constructor @@ -482,7 +482,7 @@ class JKQTP_LIB_EXPORT JKQTPGeoInfiniteLine: public JKQTPGeoBaseLine { \image html plot_geolines.png */ -class JKQTP_LIB_EXPORT JKQTPGeoPolyLines: public JKQTPGeoBaseLine { +class JKQTPLOTTER_LIB_EXPORT JKQTPGeoPolyLines: public JKQTPGeoBaseLine { Q_OBJECT public: /*! \brief class constructor @@ -549,7 +549,7 @@ class JKQTP_LIB_EXPORT JKQTPGeoPolyLines: public JKQTPGeoBaseLine { \image html plot_georectangle.png */ -class JKQTP_LIB_EXPORT JKQTPGeoRectangle: public JKQTPGeoBaseFilled { +class JKQTPLOTTER_LIB_EXPORT JKQTPGeoRectangle: public JKQTPGeoBaseFilled { Q_OBJECT public: /*! \brief class constructor @@ -691,7 +691,7 @@ protected: \image html plot_geopolygon.png */ -class JKQTP_LIB_EXPORT JKQTPGeoPolygon: public JKQTPGeoBaseFilled { +class JKQTPLOTTER_LIB_EXPORT JKQTPGeoPolygon: public JKQTPGeoBaseFilled { Q_OBJECT public: /*! \brief class constructor @@ -773,7 +773,7 @@ class JKQTP_LIB_EXPORT JKQTPGeoPolygon: public JKQTPGeoBaseFilled { \see http://www.codeguru.com/cpp/g-m/gdi/article.php/c131 and http://en.wikipedia.org/wiki/Ellipse#General_parametric_form */ -class JKQTP_LIB_EXPORT JKQTPGeoEllipse: public JKQTPGeoRectangle { +class JKQTPLOTTER_LIB_EXPORT JKQTPGeoEllipse: public JKQTPGeoRectangle { Q_OBJECT public: /*! \brief class constructor @@ -879,7 +879,7 @@ class JKQTP_LIB_EXPORT JKQTPGeoEllipse: public JKQTPGeoRectangle { \image html plot_geoarc.png */ -class JKQTP_LIB_EXPORT JKQTPGeoArc: public JKQTPGeoBaseLine { +class JKQTPLOTTER_LIB_EXPORT JKQTPGeoArc: public JKQTPGeoBaseLine { Q_OBJECT public: /*! \brief class constructor @@ -988,7 +988,7 @@ class JKQTP_LIB_EXPORT JKQTPGeoArc: public JKQTPGeoBaseLine { \image html plot_geopie.png */ -class JKQTP_LIB_EXPORT JKQTPGeoPie: public JKQTPGeoEllipse { +class JKQTPLOTTER_LIB_EXPORT JKQTPGeoPie: public JKQTPGeoEllipse { Q_OBJECT public: /*! \brief class constructor @@ -1057,7 +1057,7 @@ class JKQTP_LIB_EXPORT JKQTPGeoPie: public JKQTPGeoEllipse { \image html plot_geochord.png */ -class JKQTP_LIB_EXPORT JKQTPGeoChord: public JKQTPGeoPie { +class JKQTPLOTTER_LIB_EXPORT JKQTPGeoChord: public JKQTPGeoPie { Q_OBJECT public: /*! \brief class constructor diff --git a/lib/jkqtplotter/graphs/jkqtpimage.cpp b/lib/jkqtplotter/graphs/jkqtpimage.cpp index 647d8fb9ed..68332483a3 100644 --- a/lib/jkqtplotter/graphs/jkqtpimage.cpp +++ b/lib/jkqtplotter/graphs/jkqtpimage.cpp @@ -417,7 +417,12 @@ void JKQTPMathImageBase::drawKeyMarker(JKQTPEnhancedPainter &/*painter*/, QRectF void JKQTPMathImageBase::setNx(int __value) { - this->Nx = __value; + this->Nx = __value; +} + +void JKQTPMathImageBase::setNx(size_t __value) +{ + this->Nx = static_cast(__value); } int JKQTPMathImageBase::getNx() const @@ -427,7 +432,12 @@ int JKQTPMathImageBase::getNx() const void JKQTPMathImageBase::setNy(int __value) { - this->Ny = __value; + this->Ny = __value; +} + +void JKQTPMathImageBase::setNy(size_t __value) +{ + this->Ny = static_cast(__value); } int JKQTPMathImageBase::getNy() const @@ -1670,8 +1680,8 @@ JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, dou this->modifierColumn=-1; this->imageColumn=imageColumn; if (parent && imageColumn>=0 && parent->getDatastore()) { - Nx=parent->getDatastore()->getColumnImageWidth(imageColumn); - Ny=parent->getDatastore()->getColumnImageHeight(imageColumn); + Nx= static_cast(parent->getDatastore()->getColumnImageWidth(imageColumn)); + Ny= static_cast(parent->getDatastore()->getColumnImageHeight(imageColumn)); } this->datatype=JKQTPMathImageBase::DoubleArray; } @@ -1696,6 +1706,15 @@ JKQTPColumnMathImage::JKQTPColumnMathImage(double x, double y, double width, dou { } +void JKQTPColumnMathImage::setImageColumn(size_t __value) +{ + setImageColumn(static_cast(__value)); +} + +void JKQTPColumnMathImage::setModifierColumn(size_t __value) +{ + setImageColumn(static_cast(__value)); +} void JKQTPColumnMathImage::setImageColumn(int __value) { this->imageColumn = __value; @@ -1739,7 +1758,7 @@ void JKQTPColumnMathImage::ensureImageData() } else { this->datatype=JKQTPMathImageBase::DoubleArray; this->data=parent->getDatastore()->getColumnPointer(imageColumn,0); - this->Ny=parent->getDatastore()->getRows(imageColumn)/this->Nx; + this->Ny= static_cast(parent->getDatastore()->getRows(imageColumn)/this->Nx); } if (this->Nx==0 || modifierColumn<0 || !parent->getDatastore()->getColumnPointer(modifierColumn,0)) { this->dataModifier=nullptr; diff --git a/lib/jkqtplotter/graphs/jkqtpimage.h b/lib/jkqtplotter/graphs/jkqtpimage.h index 39dc99db20..d222f0f2a8 100644 --- a/lib/jkqtplotter/graphs/jkqtpimage.h +++ b/lib/jkqtplotter/graphs/jkqtpimage.h @@ -29,7 +29,7 @@ #include "jkqtplotter/graphs/jkqtpscatter.h" #include "jkqtplotter/jkqtptools.h" #include "jkqtplotter/jkqtpbaseelements.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtpimagetools.h" @@ -37,7 +37,7 @@ /*! \brief base class for plotting an image \ingroup jkqtplotter_imagelots_elements */ -class JKQTP_LIB_EXPORT JKQTPImageBase: public JKQTPGraph { +class JKQTPLOTTER_LIB_EXPORT JKQTPImageBase: public JKQTPGraph { Q_OBJECT public: /** \brief class constructor @@ -130,7 +130,7 @@ class JKQTP_LIB_EXPORT JKQTPImageBase: public JKQTPGraph { \image html imageplot.png */ -class JKQTP_LIB_EXPORT JKQTPMathImageBase: public JKQTPImageBase { +class JKQTPLOTTER_LIB_EXPORT JKQTPMathImageBase: public JKQTPImageBase { Q_OBJECT public: /** \brief possible datatypes of the data array, plotted by this class. */ @@ -230,13 +230,17 @@ class JKQTP_LIB_EXPORT JKQTPMathImageBase: public JKQTPImageBase { /** \brief plots a key marker inside the specified rectangle \a rect */ virtual void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect) override; - /*! \copydoc Nx */ - void setNx(int __value); - /*! \copydoc Nx */ + /*! \copydoc Nx */ + void setNx(int __value); + /*! \copydoc Nx */ + void setNx(size_t __value); + /*! \copydoc Nx */ int getNx() const; /*! \copydoc Ny */ void setNy(int __value); - /*! \copydoc Ny */ + /*! \copydoc Ny */ + void setNy(size_t __value); + /*! \copydoc Ny */ int getNy() const; /*! \copydoc data */ virtual void setData(void* __value); @@ -337,7 +341,7 @@ class JKQTP_LIB_EXPORT JKQTPMathImageBase: public JKQTPImageBase { \see \ref JKQTPlotterImagePlotQImageRGB */ -class JKQTP_LIB_EXPORT JKQTPImage: public JKQTPImageBase { +class JKQTPLOTTER_LIB_EXPORT JKQTPImage: public JKQTPImageBase { Q_OBJECT public: @@ -472,7 +476,7 @@ class JKQTP_LIB_EXPORT JKQTPImage: public JKQTPImageBase { \see \ref JKQTPlotterImagePlotNoDatastore */ -class JKQTP_LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase { +class JKQTPLOTTER_LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase { Q_OBJECT public: @@ -1000,7 +1004,7 @@ int JKQTPMathImage::getModifierSampleSize() const { \see jkqtpstatAddKDE2DImage(), jkqtpstatAddHistogram2DImage(), \ref JKQTPlotterImagePlot, \ref JKQTPlotterImagePlotModifier, \ref JKQTPlotterImagePlotOpenCV */ -class JKQTP_LIB_EXPORT JKQTPColumnMathImage: public JKQTPMathImage { +class JKQTPLOTTER_LIB_EXPORT JKQTPColumnMathImage: public JKQTPMathImage { Q_OBJECT public: @@ -1072,11 +1076,16 @@ class JKQTP_LIB_EXPORT JKQTPColumnMathImage: public JKQTPMathImage { /*! \copydoc imageColumn */ virtual void setImageColumn(int __value); + + /*! \copydoc imageColumn */ + virtual void setImageColumn(size_t __value); /*! \copydoc imageColumn */ int getImageColumn() const; /*! \copydoc modifierColumn */ virtual void setModifierColumn(int __value); - /*! \copydoc modifierColumn */ + /*! \copydoc modifierColumn */ + virtual void setModifierColumn(size_t __value); + /*! \copydoc modifierColumn */ int getModifierColumn() const; /** \copydoc JKQTPGraph::usesColumn() */ diff --git a/lib/jkqtplotter/graphs/jkqtpimageoverlays.cpp b/lib/jkqtplotter/graphs/jkqtpimageoverlays.cpp index 482ef9b2d0..e43a5f14c4 100644 --- a/lib/jkqtplotter/graphs/jkqtpimageoverlays.cpp +++ b/lib/jkqtplotter/graphs/jkqtpimageoverlays.cpp @@ -161,6 +161,11 @@ void JKQTPOverlayImage::setNx(int __value) this->Nx = __value; } +void JKQTPOverlayImage::setNx(size_t __value) +{ + this->Nx = static_cast(__value); +} + int JKQTPOverlayImage::getNx() const { return this->Nx; @@ -171,6 +176,10 @@ void JKQTPOverlayImage::setNy(int __value) this->Ny = __value; } +void JKQTPOverlayImage::setNy(size_t __value) +{ + this->Ny = static_cast(__value); +} int JKQTPOverlayImage::getNy() const { return this->Ny; @@ -359,7 +368,7 @@ void JKQTPColumnOverlayImageEnhanced::draw(JKQTPEnhancedPainter &painter) { double* d=parent->getDatastore()->getColumnPointer(imageColumn,0); size_t imgSize=parent->getDatastore()->getRows(imageColumn); this->data=(bool*)malloc(imgSize*sizeof(bool)); - this->Ny=imgSize/this->Nx; + this->Ny= static_cast(imgSize/this->Nx); for (size_t i=0; iimageBColumn=-1; this->datatype=JKQTPMathImageBase::DoubleArray; if (parent && imageRColumn>=0 && parent->getDatastore()) { - Nx=parent->getDatastore()->getColumnImageWidth(imageRColumn); - Ny=parent->getDatastore()->getColumnImageHeight(imageRColumn); + Nx= static_cast(parent->getDatastore()->getColumnImageWidth(imageRColumn)); + Ny= static_cast(parent->getDatastore()->getColumnImageHeight(imageRColumn)); } } @@ -1181,8 +1181,8 @@ JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double widt this->imageBColumn=-1; this->datatype=JKQTPMathImageBase::DoubleArray; if (parent && imageRColumn>=0 && parent->getDatastore()) { - Nx=parent->getDatastore()->getColumnImageWidth(imageRColumn); - Ny=parent->getDatastore()->getColumnImageHeight(imageRColumn); + Nx= static_cast(parent->getDatastore()->getColumnImageWidth(imageRColumn)); + Ny= static_cast(parent->getDatastore()->getColumnImageHeight(imageRColumn)); } } @@ -1195,8 +1195,8 @@ JKQTPColumnRGBMathImage::JKQTPColumnRGBMathImage(double x, double y, double widt this->imageBColumn=imageBColumn; this->datatype=JKQTPMathImageBase::DoubleArray; if (parent && imageRColumn>=0 && parent->getDatastore()) { - Nx=parent->getDatastore()->getColumnImageWidth(imageRColumn); - Ny=parent->getDatastore()->getColumnImageHeight(imageRColumn); + Nx= static_cast(parent->getDatastore()->getColumnImageWidth(imageRColumn)); + Ny= static_cast(parent->getDatastore()->getColumnImageHeight(imageRColumn)); } } diff --git a/lib/jkqtplotter/graphs/jkqtpimagergb.h b/lib/jkqtplotter/graphs/jkqtpimagergb.h index 2dcbfb2f00..17fab82244 100644 --- a/lib/jkqtplotter/graphs/jkqtpimagergb.h +++ b/lib/jkqtplotter/graphs/jkqtpimagergb.h @@ -29,7 +29,7 @@ #include "jkqtplotter/graphs/jkqtpimage.h" #include "jkqtplotter/jkqtptools.h" #include "jkqtplotter/jkqtpbaseelements.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtpimagetools.h" @@ -40,7 +40,7 @@ \image html rgbimageplots.png \image html rgbimageplot_opencv.png */ -class JKQTP_LIB_EXPORT JKQTPRGBMathImage: public JKQTPMathImageBase { +class JKQTPLOTTER_LIB_EXPORT JKQTPRGBMathImage: public JKQTPMathImageBase { Q_OBJECT public: using JKQTPMathImageBase::setData; @@ -428,7 +428,7 @@ class JKQTP_LIB_EXPORT JKQTPRGBMathImage: public JKQTPMathImageBase { \see Examples: \ref JKQTPlotterRGBImagePlot and \ref JKQTPlotterImagePlotRGBOpenCV */ -class JKQTP_LIB_EXPORT JKQTPColumnRGBMathImage: public JKQTPRGBMathImage { +class JKQTPLOTTER_LIB_EXPORT JKQTPColumnRGBMathImage: public JKQTPRGBMathImage { Q_OBJECT public: diff --git a/lib/jkqtplotter/graphs/jkqtpimpulses.cpp b/lib/jkqtplotter/graphs/jkqtpimpulses.cpp index 0a1667c668..9c19a5eccc 100644 --- a/lib/jkqtplotter/graphs/jkqtpimpulses.cpp +++ b/lib/jkqtplotter/graphs/jkqtpimpulses.cpp @@ -64,7 +64,7 @@ void JKQTPImpulsesHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { QPen p=getLinePen(painter, parent); p.setCapStyle(Qt::FlatCap); - int imax=qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax=static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); int imin=0; if (imaxgetRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax=static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); int imin=0; if (imax. */ -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtpgraphsbase.h" #include "jkqtplotter/jkqtpgraphsbaseerrors.h" #include "jkqtplotter/jkqtpgraphsbasestylingmixins.h" @@ -34,7 +34,7 @@ \see JKQTPImpulsesVerticalGraph, \ref JKQTPlotterImpulsePlots */ -class JKQTP_LIB_EXPORT JKQTPImpulsesHorizontalGraph: public JKQTPXYGraph, public JKQTPGraphLineStyleMixin, public JKQTPGraphSymbolStyleMixin{ +class JKQTPLOTTER_LIB_EXPORT JKQTPImpulsesHorizontalGraph: public JKQTPXYGraph, public JKQTPGraphLineStyleMixin, public JKQTPGraphSymbolStyleMixin{ Q_OBJECT public: /** \brief class constructor */ @@ -85,7 +85,7 @@ class JKQTP_LIB_EXPORT JKQTPImpulsesHorizontalGraph: public JKQTPXYGraph, public \see jkqtpstatAddXErrorImpulsesGraph(), JKQTPImpulsesHorizontalGraph, \ref JKQTPlotterImpulsePlots */ -class JKQTP_LIB_EXPORT JKQTPImpulsesHorizontalErrorGraph: public JKQTPImpulsesHorizontalGraph, public JKQTPXGraphErrors { +class JKQTPLOTTER_LIB_EXPORT JKQTPImpulsesHorizontalErrorGraph: public JKQTPImpulsesHorizontalGraph, public JKQTPXGraphErrors { Q_OBJECT public: /** \brief class constructor */ @@ -110,7 +110,7 @@ class JKQTP_LIB_EXPORT JKQTPImpulsesHorizontalErrorGraph: public JKQTPImpulsesHo \see \ref JKQTPlotterImpulsePlots */ -class JKQTP_LIB_EXPORT JKQTPImpulsesVerticalGraph: public JKQTPImpulsesHorizontalGraph { +class JKQTPLOTTER_LIB_EXPORT JKQTPImpulsesVerticalGraph: public JKQTPImpulsesHorizontalGraph { Q_OBJECT public: /** \brief class constructor */ @@ -131,7 +131,7 @@ class JKQTP_LIB_EXPORT JKQTPImpulsesVerticalGraph: public JKQTPImpulsesHorizonta \see JKQTPImpulsesVerticalGraph, jkqtpstatAddYErrorImpulsesGraph(), \ref JKQTPlotterImpulsePlots */ -class JKQTP_LIB_EXPORT JKQTPImpulsesVerticalErrorGraph: public JKQTPImpulsesVerticalGraph, public JKQTPYGraphErrors { +class JKQTPLOTTER_LIB_EXPORT JKQTPImpulsesVerticalErrorGraph: public JKQTPImpulsesVerticalGraph, public JKQTPYGraphErrors { Q_OBJECT public: /** \brief class constructor */ diff --git a/lib/jkqtplotter/graphs/jkqtpparsedfunction.h b/lib/jkqtplotter/graphs/jkqtpparsedfunction.h index 2d80410797..597c2807ff 100644 --- a/lib/jkqtplotter/graphs/jkqtpparsedfunction.h +++ b/lib/jkqtplotter/graphs/jkqtpparsedfunction.h @@ -26,7 +26,7 @@ #include #include "jkqtplotter/jkqtptools.h" #include "jkqtcommon/jkqtpmathparser.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/graphs/jkqtpevaluatedfunction.h" // forward declarations @@ -45,7 +45,7 @@ class JKQTPlotter; \see \ref JKQTPlotterParsedFunctionPlot, JKQTPMathParser */ -class JKQTP_LIB_EXPORT JKQTPXParsedFunctionLineGraph: public JKQTPXFunctionLineGraph { +class JKQTPLOTTER_LIB_EXPORT JKQTPXParsedFunctionLineGraph: public JKQTPXFunctionLineGraph { Q_OBJECT public: @@ -114,7 +114,7 @@ class JKQTP_LIB_EXPORT JKQTPXParsedFunctionLineGraph: public JKQTPXFunctionLineG \see \ref JKQTPlotterParsedFunctionPlot, JKQTPMathParser */ -class JKQTP_LIB_EXPORT JKQTPYParsedFunctionLineGraph: public JKQTPYFunctionLineGraph { +class JKQTPLOTTER_LIB_EXPORT JKQTPYParsedFunctionLineGraph: public JKQTPYFunctionLineGraph { Q_OBJECT public: diff --git a/lib/jkqtplotter/graphs/jkqtppeakstream.h b/lib/jkqtplotter/graphs/jkqtppeakstream.h index c3bcf27252..369e16d1d1 100644 --- a/lib/jkqtplotter/graphs/jkqtppeakstream.h +++ b/lib/jkqtplotter/graphs/jkqtppeakstream.h @@ -45,7 +45,7 @@ class JKQTPDatastore; \see \ref JKQTPlotterBasicJKQTPDatastoreStatistics */ -class JKQTP_LIB_EXPORT JKQTPPeakStreamGraph: public JKQTPSingleColumnGraph, public JKQTPGraphLineStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPPeakStreamGraph: public JKQTPSingleColumnGraph, public JKQTPGraphLineStyleMixin { Q_OBJECT public: /** \brief class constructor */ diff --git a/lib/jkqtplotter/graphs/jkqtprange.h b/lib/jkqtplotter/graphs/jkqtprange.h index a7bbca98ad..6140535331 100644 --- a/lib/jkqtplotter/graphs/jkqtprange.h +++ b/lib/jkqtplotter/graphs/jkqtprange.h @@ -22,7 +22,7 @@ #include #include #include "jkqtplotter/jkqtptools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtcommon/jkqtpdrawingtools.h" #include "jkqtplotter/jkqtpgraphsbase.h" #include "jkqtcommon/jkqtpenhancedpainter.h" @@ -50,7 +50,7 @@ class JKQTPDatastore; \image html JKQTPHorizontalRange.png */ -class JKQTP_LIB_EXPORT JKQTPHorizontalRange: public JKQTPGraph, public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPHorizontalRange: public JKQTPGraph, public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin { Q_OBJECT public: /** \brief class constructor */ @@ -184,7 +184,7 @@ class JKQTP_LIB_EXPORT JKQTPHorizontalRange: public JKQTPGraph, public JKQTPGrap \image html JKQTPVerticalRange.png */ -class JKQTP_LIB_EXPORT JKQTPVerticalRange: public JKQTPHorizontalRange { +class JKQTPLOTTER_LIB_EXPORT JKQTPVerticalRange: public JKQTPHorizontalRange { Q_OBJECT public: /** \brief class constructor */ diff --git a/lib/jkqtplotter/graphs/jkqtpscatter.cpp b/lib/jkqtplotter/graphs/jkqtpscatter.cpp index 6f56c3ceab..db173dfbb1 100644 --- a/lib/jkqtplotter/graphs/jkqtpscatter.cpp +++ b/lib/jkqtplotter/graphs/jkqtpscatter.cpp @@ -78,7 +78,7 @@ void JKQTPXYLineGraph::draw(JKQTPEnhancedPainter& painter) { QPen penSelection=getHighlightingLinePen(painter, parent); - int imax=qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax= static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); int imin=0; if (imaxgetDatastore(); int imin=0; - int imax=qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax= static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); if (imaxgetDatastore(); int imin=0; - int imax=qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax= static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); if (imaxgetRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax= static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); int imin=0; if (imaxgetDatastore(); if (datastore==nullptr) return; if (colorColumn<0) return; - int imax=qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax= static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); int imin=0; if (imaxgetDatastore(); int imin=0; - int imax=qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax= static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); if (imaxgetDatastore(); int imin=0; - int imax=qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax= static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); if (imax #include #include "jkqtplotter/jkqtptools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtcommon/jkqtpdrawingtools.h" #include "jkqtplotter/jkqtpgraphsbase.h" #include "jkqtcommon/jkqtpenhancedpainter.h" @@ -53,7 +53,7 @@ class JKQTPDatastore; \see \ref JKQTPlotterAdvancedLineAndFillStyling, \ref JKQTPlotterSimpleTest, \ref JKQTPlotterSymbolsAndStyles, jkqtpstatAddVKDE1D(), jkqtpstatAddVKDE1DAutoranged(), jkqtpstatAddHKDE1D(), jkqtpstatAddHKDE1DAutoranged() */ -class JKQTP_LIB_EXPORT JKQTPXYLineGraph: public JKQTPXYGraph, public JKQTPGraphLineStyleMixin, public JKQTPGraphSymbolStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPXYLineGraph: public JKQTPXYGraph, public JKQTPGraphLineStyleMixin, public JKQTPGraphSymbolStyleMixin { Q_OBJECT public: /** \brief class constructor */ @@ -113,7 +113,7 @@ class JKQTP_LIB_EXPORT JKQTPXYLineGraph: public JKQTPXYGraph, public JKQTPGraphL \see JKQTPXYParametrizedErrorScatterGraph, \ref JKQTPlotterParamScatter , \ref JKQTPlotterParamScatterImage, \ref JKQTPlotterParametricCurves */ -class JKQTP_LIB_EXPORT JKQTPXYParametrizedScatterGraph: public JKQTPXYLineGraph, public JKQTPColorPaletteStyleAndToolsMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPXYParametrizedScatterGraph: public JKQTPXYLineGraph, public JKQTPColorPaletteStyleAndToolsMixin { Q_OBJECT public: /** \brief functor, which converts the value of the symbol column (at a location x,y) into a JKQTPGraphSymbols */ @@ -372,7 +372,7 @@ class JKQTP_LIB_EXPORT JKQTPXYParametrizedScatterGraph: public JKQTPXYLineGraph, \see jkqtpstatAddXYErrorLineGraph(), jkqtpstatAddXErrorLineGraph(), jkqtpstatAddYErrorLineGraph(), \ref JKQTPlotterErrorBarStyles, \ref JKQTPlotterBasicJKQTPDatastoreStatisticsGroupedStat */ -class JKQTP_LIB_EXPORT JKQTPXYLineErrorGraph: public JKQTPXYLineGraph, public JKQTPXYGraphErrors { +class JKQTPLOTTER_LIB_EXPORT JKQTPXYLineErrorGraph: public JKQTPXYLineGraph, public JKQTPXYGraphErrors { Q_OBJECT public: /** \brief class constructor */ @@ -409,7 +409,7 @@ class JKQTP_LIB_EXPORT JKQTPXYLineErrorGraph: public JKQTPXYLineGraph, public JK \see JKQTPXYParametrizedScatterGraph, \ref JKQTPlotterParamScatter, jkqtpstatAddXErrorParametrizedScatterGraph(), jkqtpstatAddYErrorParametrizedScatterGraph() */ -class JKQTP_LIB_EXPORT JKQTPXYParametrizedErrorScatterGraph: public JKQTPXYParametrizedScatterGraph, public JKQTPXYGraphErrors { +class JKQTPLOTTER_LIB_EXPORT JKQTPXYParametrizedErrorScatterGraph: public JKQTPXYParametrizedScatterGraph, public JKQTPXYGraphErrors { Q_OBJECT public: JKQTPXYParametrizedErrorScatterGraph(JKQTBasePlotter* parent=nullptr); diff --git a/lib/jkqtplotter/graphs/jkqtpsinglecolumnsymbols.h b/lib/jkqtplotter/graphs/jkqtpsinglecolumnsymbols.h index c409eced39..94ca7d00b7 100644 --- a/lib/jkqtplotter/graphs/jkqtpsinglecolumnsymbols.h +++ b/lib/jkqtplotter/graphs/jkqtpsinglecolumnsymbols.h @@ -50,7 +50,7 @@ \see \ref JKQTPlotterDistributionPlot, \ref JKQTPlotterViolinplotGraphs */ -class JKQTP_LIB_EXPORT JKQTPSingleColumnSymbolsGraph: public JKQTPSingleColumnGraph, public JKQTPGraphSymbolStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPSingleColumnSymbolsGraph: public JKQTPSingleColumnGraph, public JKQTPGraphSymbolStyleMixin { Q_OBJECT public: /** \brief describes how data from dataColumn of a JKQTPSingleColumnSymbolsGraph positioned at position */ diff --git a/lib/jkqtplotter/graphs/jkqtpspecialline.cpp b/lib/jkqtplotter/graphs/jkqtpspecialline.cpp index 23a04bca58..e4e5d781ed 100644 --- a/lib/jkqtplotter/graphs/jkqtpspecialline.cpp +++ b/lib/jkqtplotter/graphs/jkqtpspecialline.cpp @@ -155,7 +155,7 @@ void JKQTPSpecialLineHorizontalGraph::draw(JKQTPEnhancedPainter& painter) { QPen np(Qt::NoPen); QBrush b=getFillBrush(painter, parent); - int imax=qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax=static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); int imin=0; if (imaxgetRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn))); + int imax=static_cast(qMin(datastore->getRows(static_cast(xColumn)), datastore->getRows(static_cast(yColumn)))); int imin=0; if (imax #include #include "jkqtplotter/jkqtptools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtcommon/jkqtpdrawingtools.h" #include "jkqtplotter/jkqtpgraphsbase.h" #include "jkqtcommon/jkqtpenhancedpainter.h" @@ -50,7 +50,7 @@ class JKQTPDatastore; \see JKQTPSpecialLineVerticalGraph, JKQTPFilledCurveXGraph, \ref JKQTPlotterSpecialStepLinePlot */ -class JKQTP_LIB_EXPORT JKQTPSpecialLineHorizontalGraph: public JKQTPXYGraph, public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin, public JKQTPGraphSymbolStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPSpecialLineHorizontalGraph: public JKQTPXYGraph, public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin, public JKQTPGraphSymbolStyleMixin { Q_OBJECT public: /** \brief class constructor */ @@ -110,7 +110,7 @@ class JKQTP_LIB_EXPORT JKQTPSpecialLineHorizontalGraph: public JKQTPXYGraph, pub \see JKQTPSpecialLineHorizontalGraph, JKQTPFilledCurveYGraph, \ref JKQTPlotterSpecialStepLinePlot */ -class JKQTP_LIB_EXPORT JKQTPSpecialLineVerticalGraph: public JKQTPSpecialLineHorizontalGraph { +class JKQTPLOTTER_LIB_EXPORT JKQTPSpecialLineVerticalGraph: public JKQTPSpecialLineHorizontalGraph { Q_OBJECT public: /** \brief class constructor */ diff --git a/lib/jkqtplotter/graphs/jkqtpstatisticsadaptors.h b/lib/jkqtplotter/graphs/jkqtpstatisticsadaptors.h index abde7d90c5..4e12e4f8be 100644 --- a/lib/jkqtplotter/graphs/jkqtpstatisticsadaptors.h +++ b/lib/jkqtplotter/graphs/jkqtpstatisticsadaptors.h @@ -18,7 +18,7 @@ */ -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtcommon/jkqtpstatisticstools.h" #include "jkqtcommon/jkqtpdebuggingtools.h" #include "jkqtplotter/jkqtpgraphsbase.h" @@ -1795,7 +1795,7 @@ inline JKQTPXFunctionLineGraph* jkqtpstatAddLinearRegression(JKQTBasePlotter* pl \see \ref JKQTPlotterBasicJKQTPDatastoreRegression, jkqtpstatLinearRegression() */ -JKQTP_LIB_EXPORT JKQTPXFunctionLineGraph* jkqtpstatAddLinearRegression(JKQTPXYGraph *datagraph, double* coeffA=nullptr, double* coeffB=nullptr, bool fixA=false, bool fixB=false); +JKQTPLOTTER_LIB_EXPORT JKQTPXFunctionLineGraph* jkqtpstatAddLinearRegression(JKQTPXYGraph *datagraph, double* coeffA=nullptr, double* coeffB=nullptr, bool fixA=false, bool fixB=false); @@ -1874,7 +1874,7 @@ inline JKQTPXFunctionLineGraph* jkqtpstatAddRobustIRLSLinearRegression(JKQTBaseP \see \ref JKQTPlotterBasicJKQTPDatastoreRegression, jkqtpstatRobustIRLSLinearRegression() */ -JKQTP_LIB_EXPORT JKQTPXFunctionLineGraph *jkqtpstatAddRobustIRLSLinearRegression(JKQTPXYGraph *datagraph, double* coeffA=nullptr, double* coeffB=nullptr, bool fixA=false, bool fixB=false, double p=1.1, int iterations=100); +JKQTPLOTTER_LIB_EXPORT JKQTPXFunctionLineGraph *jkqtpstatAddRobustIRLSLinearRegression(JKQTPXYGraph *datagraph, double* coeffA=nullptr, double* coeffB=nullptr, bool fixA=false, bool fixB=false, double p=1.1, int iterations=100); @@ -1960,7 +1960,7 @@ inline JKQTPXFunctionLineGraph* jkqtpstatAddLinearWeightedRegression(JKQTBasePlo \see \ref JKQTPlotterBasicJKQTPDatastoreRegression, jkqtpstatLinearRegression() */ -JKQTP_LIB_EXPORT JKQTPXFunctionLineGraph* jkqtpstatAddLinearWeightedRegression(JKQTPXYGraph *datagraph, double* coeffA=nullptr, double* coeffB=nullptr, bool fixA=false, bool fixB=false); +JKQTPLOTTER_LIB_EXPORT JKQTPXFunctionLineGraph* jkqtpstatAddLinearWeightedRegression(JKQTPXYGraph *datagraph, double* coeffA=nullptr, double* coeffB=nullptr, bool fixA=false, bool fixB=false); @@ -2044,7 +2044,7 @@ inline JKQTPXFunctionLineGraph* jkqtpstatAddRegression(JKQTBasePlotter* plotter, \see \ref JKQTPlotterBasicJKQTPDatastoreRegression, jkqtpstatRegression() */ -JKQTP_LIB_EXPORT JKQTPXFunctionLineGraph* jkqtpstatAddRegression(JKQTPXYGraph *datagraph, JKQTPStatRegressionModelType type, double* coeffA=nullptr, double* coeffB=nullptr, bool fixA=false, bool fixB=false); +JKQTPLOTTER_LIB_EXPORT JKQTPXFunctionLineGraph* jkqtpstatAddRegression(JKQTPXYGraph *datagraph, JKQTPStatRegressionModelType type, double* coeffA=nullptr, double* coeffB=nullptr, bool fixA=false, bool fixB=false); @@ -2124,7 +2124,7 @@ inline JKQTPXFunctionLineGraph* jkqtpstatAddRobustIRLSRegression(JKQTBasePlotter \see \ref JKQTPlotterBasicJKQTPDatastoreRegression, jkqtpstatRobustIRLSRegression() */ -JKQTP_LIB_EXPORT JKQTPXFunctionLineGraph *jkqtpstatAddRobustIRLSRegression(JKQTPXYGraph *datagraph, JKQTPStatRegressionModelType type, double* coeffA=nullptr, double* coeffB=nullptr, bool fixA=false, bool fixB=false, double p=1.1, int iterations=100); +JKQTPLOTTER_LIB_EXPORT JKQTPXFunctionLineGraph *jkqtpstatAddRobustIRLSRegression(JKQTPXYGraph *datagraph, JKQTPStatRegressionModelType type, double* coeffA=nullptr, double* coeffB=nullptr, bool fixA=false, bool fixB=false, double p=1.1, int iterations=100); @@ -2212,7 +2212,7 @@ inline JKQTPXFunctionLineGraph* jkqtpstatAddWeightedRegression(JKQTBasePlotter* \see \ref JKQTPlotterBasicJKQTPDatastoreRegression, jkqtpstatWeightedRegression() */ -JKQTP_LIB_EXPORT JKQTPXFunctionLineGraph* jkqtpstatAddWeightedRegression(JKQTPXYGraph *datagraph, JKQTPStatRegressionModelType type, double* coeffA=nullptr, double* coeffB=nullptr, bool fixA=false, bool fixB=false); +JKQTPLOTTER_LIB_EXPORT JKQTPXFunctionLineGraph* jkqtpstatAddWeightedRegression(JKQTPXYGraph *datagraph, JKQTPStatRegressionModelType type, double* coeffA=nullptr, double* coeffB=nullptr, bool fixA=false, bool fixB=false); @@ -2335,7 +2335,7 @@ inline JKQTPXFunctionLineGraph* jkqtpstatAddPolyFit(JKQTPXYGraph *datagraph, siz \see \ref JKQTPlotterBasicJKQTPDatastoreRegression, jkqtpstatPolyFit() */ -JKQTP_LIB_EXPORT JKQTPXFunctionLineGraph* jkqtpstatAddPolyFit(JKQTPXYGraph *datagraph, size_t P); +JKQTPLOTTER_LIB_EXPORT JKQTPXFunctionLineGraph* jkqtpstatAddPolyFit(JKQTPXYGraph *datagraph, size_t P); diff --git a/lib/jkqtplotter/graphs/jkqtpviolinplot.h b/lib/jkqtplotter/graphs/jkqtpviolinplot.h index 61d027dcad..5bb375bf87 100644 --- a/lib/jkqtplotter/graphs/jkqtpviolinplot.h +++ b/lib/jkqtplotter/graphs/jkqtpviolinplot.h @@ -22,7 +22,7 @@ #include #include #include "jkqtplotter/jkqtptools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtpimagetools.h" #include "jkqtplotter/jkqtpgraphsbase.h" #include "jkqtplotter/graphs/jkqtpviolinplotstylingmixins.h" @@ -60,7 +60,7 @@ \see \ref JKQTPlotterViolinplotGraphs */ -class JKQTP_LIB_EXPORT JKQTPViolinplotVerticalElement: public JKQTPPlotObject, public JKQTPGraphViolinplotStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPViolinplotVerticalElement: public JKQTPPlotObject, public JKQTPGraphViolinplotStyleMixin { Q_OBJECT public: /** \brief class constructor */ @@ -191,7 +191,7 @@ class JKQTP_LIB_EXPORT JKQTPViolinplotVerticalElement: public JKQTPPlotObject, p \see \ref JKQTPlotterViolinplotGraphs */ -class JKQTP_LIB_EXPORT JKQTPViolinplotHorizontalElement: public JKQTPViolinplotVerticalElement { +class JKQTPLOTTER_LIB_EXPORT JKQTPViolinplotHorizontalElement: public JKQTPViolinplotVerticalElement { Q_OBJECT public: /** \brief class constructor */ diff --git a/lib/jkqtplotter/graphs/jkqtpviolinplotstylingmixins.h b/lib/jkqtplotter/graphs/jkqtpviolinplotstylingmixins.h index 2ee0a78a54..c1f0fcaca1 100644 --- a/lib/jkqtplotter/graphs/jkqtpviolinplotstylingmixins.h +++ b/lib/jkqtplotter/graphs/jkqtpviolinplotstylingmixins.h @@ -21,7 +21,7 @@ #include #include #include "jkqtplotter/jkqtptools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtpgraphsbase.h" #include "jkqtplotter/jkqtpgraphsbasestylingmixins.h" @@ -39,7 +39,7 @@ \image html JKQTPViolinplotHorizontalElement_elements.png */ -class JKQTP_LIB_EXPORT JKQTPGraphViolinplotStyleMixin: public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPGraphViolinplotStyleMixin: public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin { Q_GADGET public: diff --git a/lib/jkqtplotter/gui/jkqtpcomboboxes.h b/lib/jkqtplotter/gui/jkqtpcomboboxes.h index ea72e56db8..b968b19533 100644 --- a/lib/jkqtplotter/gui/jkqtpcomboboxes.h +++ b/lib/jkqtplotter/gui/jkqtpcomboboxes.h @@ -23,7 +23,7 @@ #define JKQTPCOMBOBOXES_H #include "jkqtplotter/jkqtpbaseplotter.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/graphs/jkqtpimage.h" #include #include "jkqtplotter/jkqtpimagetools.h" @@ -36,7 +36,7 @@ \image html JKQTPMathImageColorPaletteComboBox.png */ -class JKQTP_LIB_EXPORT JKQTPMathImageColorPaletteComboBox: public QComboBox { +class JKQTPLOTTER_LIB_EXPORT JKQTPMathImageColorPaletteComboBox: public QComboBox { Q_OBJECT public: JKQTPMathImageColorPaletteComboBox(QWidget* parent=nullptr); @@ -57,7 +57,7 @@ class JKQTP_LIB_EXPORT JKQTPMathImageColorPaletteComboBox: public QComboBox { /*! \brief a QComboBox which shows JKQTPCADrawMode \ingroup jkqtpcomboboxes */ -class JKQTP_LIB_EXPORT JKQTPCADrawModeComboBox: public QComboBox { +class JKQTPLOTTER_LIB_EXPORT JKQTPCADrawModeComboBox: public QComboBox { Q_OBJECT public: JKQTPCADrawModeComboBox(QWidget* parent=nullptr); @@ -73,7 +73,7 @@ class JKQTP_LIB_EXPORT JKQTPCADrawModeComboBox: public QComboBox { /*! \brief a QComboBox which shows JKQTPCALabelType \ingroup jkqtpcomboboxes */ -class JKQTP_LIB_EXPORT JKQTPCALabelTypeComboBox: public QComboBox { +class JKQTPLOTTER_LIB_EXPORT JKQTPCALabelTypeComboBox: public QComboBox { Q_OBJECT public: JKQTPCALabelTypeComboBox(QWidget* parent=nullptr); @@ -88,7 +88,7 @@ class JKQTP_LIB_EXPORT JKQTPCALabelTypeComboBox: public QComboBox { /*! \brief a QComboBox which shows JKQTPLabelPosition \ingroup jkqtpcomboboxes */ -class JKQTP_LIB_EXPORT JKQTPLabelPositionComboBox: public QComboBox { +class JKQTPLOTTER_LIB_EXPORT JKQTPLabelPositionComboBox: public QComboBox { Q_OBJECT public: JKQTPLabelPositionComboBox(QWidget* parent=nullptr); @@ -106,7 +106,7 @@ class JKQTP_LIB_EXPORT JKQTPLabelPositionComboBox: public QComboBox { \image html JKQTPKeyPositionComboBox.png */ -class JKQTP_LIB_EXPORT JKQTPKeyPositionComboBox: public QComboBox { +class JKQTPLOTTER_LIB_EXPORT JKQTPKeyPositionComboBox: public QComboBox { Q_OBJECT public: JKQTPKeyPositionComboBox(QWidget* parent=nullptr); @@ -128,7 +128,7 @@ class JKQTP_LIB_EXPORT JKQTPKeyPositionComboBox: public QComboBox { \image html JKQTPKeyLayoutComboBox.png */ -class JKQTP_LIB_EXPORT JKQTPKeyLayoutComboBox: public QComboBox { +class JKQTPLOTTER_LIB_EXPORT JKQTPKeyLayoutComboBox: public QComboBox { Q_OBJECT public: JKQTPKeyLayoutComboBox(QWidget* parent=nullptr); @@ -149,7 +149,7 @@ class JKQTP_LIB_EXPORT JKQTPKeyLayoutComboBox: public QComboBox { \image html JKQTPErrorPlotstyleComboBox.png */ -class JKQTP_LIB_EXPORT JKQTPErrorPlotstyleComboBox: public QComboBox { +class JKQTPLOTTER_LIB_EXPORT JKQTPErrorPlotstyleComboBox: public QComboBox { Q_OBJECT public: JKQTPErrorPlotstyleComboBox(QWidget* parent=nullptr); @@ -168,7 +168,7 @@ class JKQTP_LIB_EXPORT JKQTPErrorPlotstyleComboBox: public QComboBox { \image html JKQTPSymbolComboBox.png */ -class JKQTP_LIB_EXPORT JKQTPSymbolComboBox: public QComboBox { +class JKQTPLOTTER_LIB_EXPORT JKQTPSymbolComboBox: public QComboBox { Q_OBJECT public: JKQTPSymbolComboBox(QWidget* parent=nullptr); @@ -184,7 +184,7 @@ class JKQTP_LIB_EXPORT JKQTPSymbolComboBox: public QComboBox { /*! \brief a QComboBox to select whether a line, symbols or both should be displayed \ingroup jkqtpcomboboxes */ -class JKQTP_LIB_EXPORT JKQTPLinePlotStyleComboBox: public QComboBox { +class JKQTPLOTTER_LIB_EXPORT JKQTPLinePlotStyleComboBox: public QComboBox { Q_OBJECT public: JKQTPLinePlotStyleComboBox(QWidget* parent=nullptr); @@ -205,7 +205,7 @@ class JKQTP_LIB_EXPORT JKQTPLinePlotStyleComboBox: public QComboBox { /*! \brief a QComboBox to select whether a line, symbols or both should be displayed, in addition to JKQTPLinePlotStyleComboBox this may also have different symbol sizes! \ingroup jkqtpcomboboxes */ -class JKQTP_LIB_EXPORT JKQTPLinePlotStyleWithSymbolSizeComboBox: public QComboBox { +class JKQTPLOTTER_LIB_EXPORT JKQTPLinePlotStyleWithSymbolSizeComboBox: public QComboBox { Q_OBJECT public: JKQTPLinePlotStyleWithSymbolSizeComboBox(QWidget* parent=nullptr); @@ -237,7 +237,7 @@ class JKQTP_LIB_EXPORT JKQTPLinePlotStyleWithSymbolSizeComboBox: public QComboBo \see JKQTPSpecialLineType */ -class JKQTP_LIB_EXPORT JKQTPSpecialLineTypeComboBox: public QComboBox { +class JKQTPLOTTER_LIB_EXPORT JKQTPSpecialLineTypeComboBox: public QComboBox { Q_OBJECT public: JKQTPSpecialLineTypeComboBox(QWidget* parent=nullptr); @@ -255,7 +255,7 @@ class JKQTP_LIB_EXPORT JKQTPSpecialLineTypeComboBox: public QComboBox { \see JKQTPMathImageBase::ModifierMode */ -class JKQTP_LIB_EXPORT JKQTPImageModifierModeComboBox: public QComboBox { +class JKQTPLOTTER_LIB_EXPORT JKQTPImageModifierModeComboBox: public QComboBox { Q_OBJECT public: JKQTPImageModifierModeComboBox(QWidget* parent=nullptr); diff --git a/lib/jkqtplotter/gui/jkqtpenhancedspinboxes.h b/lib/jkqtplotter/gui/jkqtpenhancedspinboxes.h index f90e086747..4843a8b9ca 100644 --- a/lib/jkqtplotter/gui/jkqtpenhancedspinboxes.h +++ b/lib/jkqtplotter/gui/jkqtpenhancedspinboxes.h @@ -20,7 +20,7 @@ #ifndef jkqtpenhancedspinboxes_H_INCLUDED #define jkqtpenhancedspinboxes_H_INCLUDED -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include #include @@ -30,7 +30,7 @@ This class adds an event editingFinished() to QDoubleSpinBox. */ -class JKQTP_LIB_EXPORT JKQTPEnhancedDoubleSpinBox : public QDoubleSpinBox { +class JKQTPLOTTER_LIB_EXPORT JKQTPEnhancedDoubleSpinBox : public QDoubleSpinBox { Q_OBJECT public: JKQTPEnhancedDoubleSpinBox(QWidget* parent=nullptr); @@ -48,7 +48,7 @@ class JKQTP_LIB_EXPORT JKQTPEnhancedDoubleSpinBox : public QDoubleSpinBox { This class adds an event editingFinished() to QDoubleSpinBox. */ -class JKQTP_LIB_EXPORT JKQTPEnhancedSpinBox : public QSpinBox { +class JKQTPLOTTER_LIB_EXPORT JKQTPEnhancedSpinBox : public QSpinBox { Q_OBJECT public: JKQTPEnhancedSpinBox(QWidget* parent=nullptr); diff --git a/lib/jkqtplotter/gui/jkqtpenhancedtableview.h b/lib/jkqtplotter/gui/jkqtpenhancedtableview.h index fac736e2ea..2c24214bd7 100644 --- a/lib/jkqtplotter/gui/jkqtpenhancedtableview.h +++ b/lib/jkqtplotter/gui/jkqtpenhancedtableview.h @@ -20,7 +20,7 @@ #ifndef JKQTPEnhancedTableView_H_INCLUDED #define JKQTPEnhancedTableView_H_INCLUDED -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include #include @@ -38,7 +38,7 @@ \image html JKQTPEnhancedTableView.png */ -class JKQTP_LIB_EXPORT JKQTPEnhancedTableView : public QTableView { +class JKQTPLOTTER_LIB_EXPORT JKQTPEnhancedTableView : public QTableView { Q_OBJECT public: JKQTPEnhancedTableView(QWidget* parent=nullptr); diff --git a/lib/jkqtplotter/gui/jkqtpgraphsmodel.h b/lib/jkqtplotter/gui/jkqtpgraphsmodel.h index 6c8035b5d9..23f259a1f4 100644 --- a/lib/jkqtplotter/gui/jkqtpgraphsmodel.h +++ b/lib/jkqtplotter/gui/jkqtpgraphsmodel.h @@ -23,7 +23,7 @@ #define jkqtpgraphsmodel_H #include "jkqtplotter/jkqtpbaseplotter.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include diff --git a/lib/jkqtplotter/gui/jkvanishqtoolbar.h b/lib/jkqtplotter/gui/jkvanishqtoolbar.h index e1bacd6ca3..2a9c6a6b26 100644 --- a/lib/jkqtplotter/gui/jkvanishqtoolbar.h +++ b/lib/jkqtplotter/gui/jkvanishqtoolbar.h @@ -21,7 +21,7 @@ #ifndef jkvanishqtoolbar_H #define jkvanishqtoolbar_H -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtptools.h" #include @@ -35,7 +35,7 @@ * \image html jkqtvanishtoolbar.gif * */ -class JKQTP_LIB_EXPORT JKVanishQToolBar: public QToolBar { +class JKQTPLOTTER_LIB_EXPORT JKVanishQToolBar: public QToolBar { Q_OBJECT public: /** \brief class constructor */ diff --git a/lib/jkqtplotter/jkqtpbaseplotter.cpp b/lib/jkqtplotter/jkqtpbaseplotter.cpp index c8edb51dca..7d322549b2 100644 --- a/lib/jkqtplotter/jkqtpbaseplotter.cpp +++ b/lib/jkqtplotter/jkqtpbaseplotter.cpp @@ -1364,8 +1364,8 @@ void JKQTBasePlotter::gridPrintingCalc() { } int w=0; int h=0; - for (int i=0; i(gridPrintingColumns[i]); }; + for (int i=0; i(gridPrintingRows[i]); }; gridPrintingSize=QSize(w, h); } } @@ -1426,8 +1426,8 @@ void JKQTBasePlotter::gridPaint(JKQTPEnhancedPainter& painter, QSizeF pageRect, int t_x=0; int t_y=0; //std::cout<<"printing this ...\n"; - for (size_t i=0; i(i)]; } - for (size_t i=0; i(i)]; } + for (size_t i=0; i(gridPrintingColumns[static_cast(i)]); } + for (size_t i=0; i(gridPrintingRows[static_cast(i)]); } //std::cout<<"printing this @ "<(j)]; } - for (size_t j=0; j(j)]; } + for (size_t j=0; j(gridPrintingColumns[static_cast(j)]); } + for (size_t j=0; j(gridPrintingRows[static_cast(j)]); } //std::cout<<"printing "<drawPlot(painter, showOverlays); @@ -1509,8 +1509,8 @@ void JKQTBasePlotter::gridPaintOverlays(JKQTPEnhancedPainter &painter, QSizeF pa int t_y=0; //std::cout<<"printing "<(j)]; } - for (size_t j=0; j(j)]; } + for (size_t j=0; j(gridPrintingColumns[static_cast(j)]); } + for (size_t j=0; j(gridPrintingRows[static_cast(j)]); } //std::cout<<"printing "<drawOverlaysWithHints(painter); diff --git a/lib/jkqtplotter/jkqtpbaseplotter.h b/lib/jkqtplotter/jkqtpbaseplotter.h index 7d408b97d0..6e9e5f4091 100644 --- a/lib/jkqtplotter/jkqtpbaseplotter.h +++ b/lib/jkqtplotter/jkqtpbaseplotter.h @@ -45,7 +45,7 @@ #include #include #include - #include "jkqtcommon/jkqtp_imexport.h" + #include "jkqtplotter/jkqtplotter_imexport.h" #ifndef JKQTPBASEPLOTTER_H @@ -58,11 +58,11 @@ class JKQTPPlotElement; // forward /** \brief initialized Qt-ressources necessary for JKQTBasePlotter * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT void initJKQTBasePlotterResources(); +JKQTPLOTTER_LIB_EXPORT void initJKQTBasePlotterResources(); /** \brief virtual base-class for exporter classes that can be used to save data inot a file * \ingroup jkqtpplottersupprt */ -class JKQTP_LIB_EXPORT JKQTPSaveDataAdapter { +class JKQTPLOTTER_LIB_EXPORT JKQTPSaveDataAdapter { public: virtual ~JKQTPSaveDataAdapter() ; virtual QString getFilter() const=0; @@ -72,7 +72,7 @@ class JKQTP_LIB_EXPORT JKQTPSaveDataAdapter { /** \brief Service from this class to implement a special QPaintDevice as a plugin, that can be registered to JKQTBasePlotter/JKQTPlotter * and then be used to export graphics, use registerPaintDeviceAdapter() to register such a plass * \ingroup jkqtpplottersupprt */ -class JKQTP_LIB_EXPORT JKQTPPaintDeviceAdapter { +class JKQTPLOTTER_LIB_EXPORT JKQTPPaintDeviceAdapter { public: virtual ~JKQTPPaintDeviceAdapter() {} virtual QString getFilter() const=0; @@ -326,7 +326,7 @@ class JKQTP_LIB_EXPORT JKQTPPaintDeviceAdapter { * These methods MAY (strictly optional and turned off by default) be called by saveSettings() and loadSettings(), if the property userSettigsFilename ( \copybrief userSettigsFilename )is * set (not-empty). In this case the suer settings are stored/loaded also everytime they are changed by the user or programmatically. */ -class JKQTP_LIB_EXPORT JKQTBasePlotter: public QObject { +class JKQTPLOTTER_LIB_EXPORT JKQTBasePlotter: public QObject { Q_OBJECT public: typedef QMap > > AdditionalActionsMap; @@ -565,7 +565,7 @@ class JKQTP_LIB_EXPORT JKQTBasePlotter: public QObject { * * \see getPlotStyle() */ - class JKQTP_LIB_EXPORT JKQTPPen { + class JKQTPLOTTER_LIB_EXPORT JKQTPPen { protected: QColor m_color; QColor m_fillColor; @@ -1083,7 +1083,7 @@ class JKQTP_LIB_EXPORT JKQTBasePlotter: public QObject { /** \brief internal tool class for text sizes * \ingroup jkqtpplottersupprt * \internal */ - struct JKQTP_LIB_EXPORT textSizeData { + struct JKQTPLOTTER_LIB_EXPORT textSizeData { explicit textSizeData(); double ascent, descent, width, strikeoutPos; }; @@ -1091,7 +1091,7 @@ class JKQTP_LIB_EXPORT JKQTBasePlotter: public QObject { /** \brief internal tool class for text-sizess in a plot key * \ingroup jkqtpplottersupprt * \internal */ - struct JKQTP_LIB_EXPORT textSizeKey { + struct JKQTPLOTTER_LIB_EXPORT textSizeKey { explicit textSizeKey(const QFont& f, const QString& text, QPaintDevice *pd); explicit textSizeKey(const QString& fontName, double fontSize, const QString& text, QPaintDevice *pd); QString text; diff --git a/lib/jkqtplotter/jkqtpbaseplotterstyle.h b/lib/jkqtplotter/jkqtpbaseplotterstyle.h index 014e1eba17..06dc35d7cd 100644 --- a/lib/jkqtplotter/jkqtpbaseplotterstyle.h +++ b/lib/jkqtplotter/jkqtpbaseplotterstyle.h @@ -25,7 +25,7 @@ #include "jkqtplotter/jkqtpcoordinateaxesstyle.h" #include "jkqtplotter/jkqtpkeystyle.h" #include "jkqtplotter/jkqtpimagetools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtcommon/jkqtpdrawingtools.h" #include "jkqtcommon/jkqtpbasicimagetools.h" #include @@ -42,7 +42,7 @@ * * \see JKQTBasePlotter, \ref jkqtpplotter_styling */ -class JKQTP_LIB_EXPORT JKQTBasePlotterStyle { +class JKQTPLOTTER_LIB_EXPORT JKQTBasePlotterStyle { Q_GADGET public: JKQTBasePlotterStyle(); @@ -189,13 +189,13 @@ class JKQTP_LIB_EXPORT JKQTBasePlotterStyle { * * \see JKQTPGetSystemDefaultStyle(), JKQTPSetSystemDefaultStyle(), JKQTPSetSystemDefaultBaseStyle(), \ref jkqtpplotter_styling */ -JKQTP_LIB_EXPORT JKQTBasePlotterStyle& JKQTPGetSystemDefaultBaseStyle(); +JKQTPLOTTER_LIB_EXPORT JKQTBasePlotterStyle& JKQTPGetSystemDefaultBaseStyle(); /** \brief replaces the system-wide default JKQTPlotterStyle with the given \a newStyle * \ingroup jkqtpplotter_styling * * \see JKQTPGetSystemDefaultStyle(), JKQTPSetSystemDefaultStyle(), JKQTPGetSystemDefaultBaseStyle(), \ref jkqtpplotter_styling */ -JKQTP_LIB_EXPORT void JKQTPSetSystemDefaultBaseStyle(JKQTBasePlotterStyle& newStyle); +JKQTPLOTTER_LIB_EXPORT void JKQTPSetSystemDefaultBaseStyle(JKQTBasePlotterStyle& newStyle); #endif // JKQTBASEPLOTTERSTYLE_H diff --git a/lib/jkqtplotter/jkqtpcoordinateaxes.h b/lib/jkqtplotter/jkqtpcoordinateaxes.h index 885f5fe8f6..e6780cb8f5 100644 --- a/lib/jkqtplotter/jkqtpcoordinateaxes.h +++ b/lib/jkqtplotter/jkqtpcoordinateaxes.h @@ -30,7 +30,7 @@ #include #include "jkqtplotter/jkqtptools.h" #include "jkqtmathtext/jkqtmathtext.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtpcoordinateaxesstyle.h" // forward declarations @@ -151,7 +151,7 @@ class JKQTBasePlotter; nearest but \c ">=" to the given \c JKQTPCoordinateAxisStyle::minTicks. The Algorithm is described in detail with the function calcLinearTickSpacing(). To activate this automatic tick spacing you have to set autoAxisSpacing=true. */ -class JKQTP_LIB_EXPORT JKQTPCoordinateAxis: public QObject { +class JKQTPLOTTER_LIB_EXPORT JKQTPCoordinateAxis: public QObject { Q_OBJECT protected: public: @@ -737,7 +737,7 @@ class JKQTP_LIB_EXPORT JKQTPCoordinateAxis: public QObject { \ingroup jkqtpbaseplotter_elements */ -class JKQTP_LIB_EXPORT JKQTPVerticalAxis: public JKQTPCoordinateAxis { +class JKQTPLOTTER_LIB_EXPORT JKQTPVerticalAxis: public JKQTPCoordinateAxis { Q_OBJECT protected: public: @@ -778,7 +778,7 @@ class JKQTP_LIB_EXPORT JKQTPVerticalAxis: public JKQTPCoordinateAxis { This axis may be draw at a user-supplied position (used e.g. for color bar axes) */ -class JKQTP_LIB_EXPORT JKQTPVerticalIndependentAxis: public JKQTPVerticalAxis { +class JKQTPLOTTER_LIB_EXPORT JKQTPVerticalIndependentAxis: public JKQTPVerticalAxis { Q_OBJECT protected: public: @@ -818,7 +818,7 @@ class JKQTP_LIB_EXPORT JKQTPVerticalIndependentAxis: public JKQTPVerticalAxis { \ingroup jkqtpbaseplotter_elements */ -class JKQTP_LIB_EXPORT JKQTPHorizontalAxis: public JKQTPCoordinateAxis { +class JKQTPLOTTER_LIB_EXPORT JKQTPHorizontalAxis: public JKQTPCoordinateAxis { Q_OBJECT protected: public: @@ -860,7 +860,7 @@ class JKQTP_LIB_EXPORT JKQTPHorizontalAxis: public JKQTPCoordinateAxis { This axis may be draw at a user-supplied position (used e.g. for color bar axes) */ -class JKQTP_LIB_EXPORT JKQTPHorizontalIndependentAxis: public JKQTPHorizontalAxis { +class JKQTPLOTTER_LIB_EXPORT JKQTPHorizontalIndependentAxis: public JKQTPHorizontalAxis { Q_OBJECT protected: public: diff --git a/lib/jkqtplotter/jkqtpcoordinateaxesstyle.h b/lib/jkqtplotter/jkqtpcoordinateaxesstyle.h index aa513fdb6b..fbf4112ef8 100644 --- a/lib/jkqtplotter/jkqtpcoordinateaxesstyle.h +++ b/lib/jkqtplotter/jkqtpcoordinateaxesstyle.h @@ -24,7 +24,7 @@ #include #include #include "jkqtplotter/jkqtptools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" class JKQTBasePlotterStyle; // forward @@ -34,7 +34,7 @@ class JKQTBasePlotterStyle; // forward * \see JKQTPCoordinateAxis, \ref jkqtpplotter_styling * */ -class JKQTP_LIB_EXPORT JKQTPCoordinateAxisStyle { +class JKQTPLOTTER_LIB_EXPORT JKQTPCoordinateAxisStyle { Q_GADGET public: JKQTPCoordinateAxisStyle(); diff --git a/lib/jkqtplotter/jkqtpdatastorage.h b/lib/jkqtplotter/jkqtpdatastorage.h index a7424141d1..5244dff385 100644 --- a/lib/jkqtplotter/jkqtpdatastorage.h +++ b/lib/jkqtplotter/jkqtpdatastorage.h @@ -19,7 +19,7 @@ -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtptools.h" #include "jkqtcommon/jkqtpdebuggingtools.h" #include @@ -277,7 +277,7 @@ enum class JKQTPDatastoreItemFormat { * notion of data columns. This class provides a set of interface methods for this list: * */ -class JKQTP_LIB_EXPORT JKQTPDatastore{ +class JKQTPLOTTER_LIB_EXPORT JKQTPDatastore{ private: /** \brief a std::vector that contains all items managed by this datastore */ QMap items; @@ -1377,7 +1377,7 @@ class JKQTP_LIB_EXPORT JKQTPDatastore{ * * \see JKQTPDatastore */ -class JKQTP_LIB_EXPORT JKQTPColumn { +class JKQTPLOTTER_LIB_EXPORT JKQTPColumn { private: /** \brief index of the item in the datastore that contains the data for this column */ size_t datastoreItem; @@ -2189,7 +2189,7 @@ class JKQTPColumnConstIterator { * * \see JKQTPDatastore */ -class JKQTP_LIB_EXPORT JKQTPDatastoreItem { +class JKQTPLOTTER_LIB_EXPORT JKQTPDatastoreItem { private: /** \brief how data is represented in this JKQTPDatastoreItem */ enum class StorageType { @@ -2406,7 +2406,7 @@ class JKQTP_LIB_EXPORT JKQTPDatastoreItem { * * \see JKQTPDatastore */ -class JKQTP_LIB_EXPORT JKQTPDatastoreModel: public QAbstractTableModel { +class JKQTPLOTTER_LIB_EXPORT JKQTPDatastoreModel: public QAbstractTableModel { Q_OBJECT public: JKQTPDatastoreModel(JKQTPDatastore* datastore, QObject* parent=nullptr); diff --git a/lib/jkqtplotter/jkqtpgraphsbase.h b/lib/jkqtplotter/jkqtpgraphsbase.h index d2cecfce56..3419ed989c 100644 --- a/lib/jkqtplotter/jkqtpgraphsbase.h +++ b/lib/jkqtplotter/jkqtpgraphsbase.h @@ -24,7 +24,7 @@ #include "jkqtplotter/jkqtpbaseelements.h" #include "jkqtplotter/jkqtpbaseplotter.h" #include "jkqtplotter/jkqtptools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtpimagetools.h" #ifndef JKQTPGRAPHSBASE_H @@ -59,7 +59,7 @@ class JKQTPGraphErrorStyleMixin; * * \see \ref jkqtplotter_graphsgroup_classstructure */ -class JKQTP_LIB_EXPORT JKQTPPlotElement: public QObject { +class JKQTPLOTTER_LIB_EXPORT JKQTPPlotElement: public QObject { Q_OBJECT public: @@ -377,7 +377,7 @@ class JKQTP_LIB_EXPORT JKQTPPlotElement: public QObject { * * \see \ref jkqtplotter_graphsgroup_classstructure */ -class JKQTP_LIB_EXPORT JKQTPGraph: public JKQTPPlotElement { +class JKQTPLOTTER_LIB_EXPORT JKQTPGraph: public JKQTPPlotElement { Q_OBJECT public: /** \brief class constructor */ @@ -436,7 +436,7 @@ class JKQTP_LIB_EXPORT JKQTPGraph: public JKQTPPlotElement { * \see \ref jkqtplotter_graphsgroup_classstructure * */ -class JKQTP_LIB_EXPORT JKQTPPlotObject: public JKQTPPlotElement { +class JKQTPLOTTER_LIB_EXPORT JKQTPPlotObject: public JKQTPPlotElement { Q_OBJECT public: /** \brief class constructor */ @@ -472,7 +472,7 @@ class JKQTP_LIB_EXPORT JKQTPPlotObject: public JKQTPPlotElement { . */ -class JKQTP_LIB_EXPORT JKQTPXYGraph: public JKQTPGraph { +class JKQTPLOTTER_LIB_EXPORT JKQTPXYGraph: public JKQTPGraph { Q_OBJECT public: /** \brief specifies how to sort the data in a JKQTPXYGraph before drawing @@ -593,7 +593,7 @@ class JKQTP_LIB_EXPORT JKQTPXYGraph: public JKQTPGraph { \see \ref jkqtplotter_graphsgroup_classstructure */ -class JKQTP_LIB_EXPORT JKQTPSingleColumnGraph: public JKQTPGraph { +class JKQTPLOTTER_LIB_EXPORT JKQTPSingleColumnGraph: public JKQTPGraph { Q_OBJECT public: /** \brief specifies how to sort the data for a JKQTPSingleColumnGraph before drawing diff --git a/lib/jkqtplotter/jkqtpgraphsbaseerrors.cpp b/lib/jkqtplotter/jkqtpgraphsbaseerrors.cpp index b1c8dec638..8c8ff2cffc 100644 --- a/lib/jkqtplotter/jkqtpgraphsbaseerrors.cpp +++ b/lib/jkqtplotter/jkqtpgraphsbaseerrors.cpp @@ -93,7 +93,7 @@ QPen JKQTPGraphErrorStyleMixin::getErrorLinePenForRects(JKQTPEnhancedPainter &pa return p; } -QBrush JKQTPGraphErrorStyleMixin::getErrorFillBrush(JKQTPEnhancedPainter &/*painter*/, JKQTBasePlotter */*parent*/) const +QBrush JKQTPGraphErrorStyleMixin::getErrorFillBrush(JKQTPEnhancedPainter &/*painter*/, JKQTBasePlotter * /*parent*/) const { return m_errorFillBrush; } diff --git a/lib/jkqtplotter/jkqtpgraphsbaseerrors.h b/lib/jkqtplotter/jkqtpgraphsbaseerrors.h index 4e6e190189..7fa216d370 100644 --- a/lib/jkqtplotter/jkqtpgraphsbaseerrors.h +++ b/lib/jkqtplotter/jkqtpgraphsbaseerrors.h @@ -25,7 +25,7 @@ #include "jkqtplotter/jkqtpbaseplotter.h" #include "jkqtplotter/jkqtpgraphsbase.h" #include "jkqtplotter/jkqtptools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtpimagetools.h" #ifndef JKQTPGRAPHSBASEERROR_H @@ -41,7 +41,7 @@ \see \ref jkqtplotter_graphsgroup_classstructure_mixins */ -class JKQTP_LIB_EXPORT JKQTPGraphErrorStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPGraphErrorStyleMixin { Q_GADGET public: /** \brief class contructor */ @@ -193,7 +193,7 @@ class JKQTP_LIB_EXPORT JKQTPGraphErrorStyleMixin { \ingroup jkqtplotter_basegraphserrors \see JKQTPYGraphErrorData, \ref jkqtplotter_graphsgroup_classstructure_mixins */ -class JKQTP_LIB_EXPORT JKQTPXGraphErrorData { +class JKQTPLOTTER_LIB_EXPORT JKQTPXGraphErrorData { Q_GADGET public: /** \brief class contructor */ @@ -243,7 +243,7 @@ class JKQTP_LIB_EXPORT JKQTPXGraphErrorData { \ingroup jkqtplotter_basegraphserrors \see JKQTPXGraphErrorData \ref jkqtplotter_graphsgroup_classstructure_mixins */ -class JKQTP_LIB_EXPORT JKQTPYGraphErrorData { +class JKQTPLOTTER_LIB_EXPORT JKQTPYGraphErrorData { Q_GADGET public: /** \brief class contructor */ @@ -291,7 +291,7 @@ class JKQTP_LIB_EXPORT JKQTPYGraphErrorData { \ingroup jkqtplotter_basegraphserrors \see JKQTPXGraphErrorData, JKQTPGraphErrorStyleMixin, \ref jkqtplotter_graphsgroup_classstructure_mixins */ -class JKQTP_LIB_EXPORT JKQTPXGraphErrors: public JKQTPXGraphErrorData, public JKQTPGraphErrorStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPXGraphErrors: public JKQTPXGraphErrorData, public JKQTPGraphErrorStyleMixin { Q_GADGET public: /** \brief class contructor */ @@ -313,7 +313,7 @@ class JKQTP_LIB_EXPORT JKQTPXGraphErrors: public JKQTPXGraphErrorData, public JK \ingroup jkqtplotter_basegraphserrors \see JKQTPYGraphErrorData, JKQTPGraphErrorStyleMixin, \ref jkqtplotter_graphsgroup_classstructure_mixins */ -class JKQTP_LIB_EXPORT JKQTPYGraphErrors: public JKQTPYGraphErrorData, public JKQTPGraphErrorStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPYGraphErrors: public JKQTPYGraphErrorData, public JKQTPGraphErrorStyleMixin { Q_GADGET public: /** \brief class contructor */ @@ -337,7 +337,7 @@ class JKQTP_LIB_EXPORT JKQTPYGraphErrors: public JKQTPYGraphErrorData, public JK \ingroup jkqtplotter_basegraphserrors \see JKQTPXGraphErrorData, JKQTPYGraphErrorData, JKQTPGraphErrorStyleMixin, \ref jkqtplotter_graphsgroup_classstructure_mixins */ -class JKQTP_LIB_EXPORT JKQTPXYGraphErrors: public JKQTPXGraphErrorData, public JKQTPYGraphErrorData, public JKQTPGraphErrorStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPXYGraphErrors: public JKQTPXGraphErrorData, public JKQTPYGraphErrorData, public JKQTPGraphErrorStyleMixin { Q_GADGET public: /** \brief class contructor */ diff --git a/lib/jkqtplotter/jkqtpgraphsbasestylingmixins.cpp b/lib/jkqtplotter/jkqtpgraphsbasestylingmixins.cpp index cba1bf3d6b..dbadf7ab92 100644 --- a/lib/jkqtplotter/jkqtpgraphsbasestylingmixins.cpp +++ b/lib/jkqtplotter/jkqtpgraphsbasestylingmixins.cpp @@ -374,7 +374,7 @@ void JKQTPGraphFillStyleMixin::setFillTransform(const QTransform &b) m_fillBrush.setTransform(b); } -QBrush JKQTPGraphFillStyleMixin::getFillBrush(JKQTPEnhancedPainter &/*painter*/, JKQTBasePlotter */*parent*/) const +QBrush JKQTPGraphFillStyleMixin::getFillBrush(JKQTPEnhancedPainter &/*painter*/, JKQTBasePlotter * /*parent*/) const { return m_fillBrush; } diff --git a/lib/jkqtplotter/jkqtpgraphsbasestylingmixins.h b/lib/jkqtplotter/jkqtpgraphsbasestylingmixins.h index 4df3cad010..24da022c33 100644 --- a/lib/jkqtplotter/jkqtpgraphsbasestylingmixins.h +++ b/lib/jkqtplotter/jkqtpgraphsbasestylingmixins.h @@ -23,7 +23,7 @@ #include #include #include "jkqtplotter/jkqtptools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtcommon/jkqtpdrawingtools.h" @@ -45,7 +45,7 @@ class JKQTPlotter; // forward - line color, when graph is highlighted . */ -class JKQTP_LIB_EXPORT JKQTPGraphLineStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPGraphLineStyleMixin { Q_GADGET public: /** \brief class constructor */ @@ -161,7 +161,7 @@ class JKQTP_LIB_EXPORT JKQTPGraphLineStyleMixin { - symbol (line) width . */ -class JKQTP_LIB_EXPORT JKQTPGraphSymbolStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPGraphSymbolStyleMixin { Q_GADGET public: /** \brief class constructor */ @@ -276,7 +276,7 @@ class JKQTP_LIB_EXPORT JKQTPGraphSymbolStyleMixin { - fill texture/gradient/matrix (if required by fill style) . */ -class JKQTP_LIB_EXPORT JKQTPGraphFillStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPGraphFillStyleMixin { Q_GADGET public: /** \brief class constructor */ @@ -343,7 +343,7 @@ class JKQTP_LIB_EXPORT JKQTPGraphFillStyleMixin { - text color . */ -class JKQTP_LIB_EXPORT JKQTPGraphTextStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPGraphTextStyleMixin { Q_GADGET public: /** \brief class constructor */ diff --git a/lib/jkqtplotter/jkqtpimagetools.h b/lib/jkqtplotter/jkqtpimagetools.h index 3fd6c0337e..78ff43627a 100644 --- a/lib/jkqtplotter/jkqtpimagetools.h +++ b/lib/jkqtplotter/jkqtpimagetools.h @@ -24,7 +24,7 @@ #include #include #include -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtcommon/jkqtpbasicimagetools.h" #include #include @@ -39,7 +39,7 @@ class JKQTBasePlotter; // forward /*! \brief if a class is derived from this class, it may use color bars \ingroup jkqtplotter_imagelots_tools */ -class JKQTP_LIB_EXPORT JKQTPColorPaletteStyleAndToolsMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPColorPaletteStyleAndToolsMixin { Q_GADGET public: diff --git a/lib/jkqtplotter/jkqtpkeystyle.h b/lib/jkqtplotter/jkqtpkeystyle.h index af33a20173..680efe232f 100644 --- a/lib/jkqtplotter/jkqtpkeystyle.h +++ b/lib/jkqtplotter/jkqtpkeystyle.h @@ -21,7 +21,7 @@ #define JKQTPSTYLE_H #include "jkqtplotter/jkqtptools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include #include #include @@ -33,7 +33,7 @@ class JKQTBasePlotterStyle; // forward * * \see JKQTBasePlotter, JKQTBasePlotterStyle, \ref jkqtpplotter_styling */ -class JKQTP_LIB_EXPORT JKQTPKeyStyle { +class JKQTPLOTTER_LIB_EXPORT JKQTPKeyStyle { Q_GADGET public: JKQTPKeyStyle(); diff --git a/lib/jkqtplotter/jkqtplotter.h b/lib/jkqtplotter/jkqtplotter.h index 39a2e4a831..24c753f2fd 100644 --- a/lib/jkqtplotter/jkqtplotter.h +++ b/lib/jkqtplotter/jkqtplotter.h @@ -42,7 +42,7 @@ #include "jkqtplotter/jkqtplotterstyle.h" #include "jkqtplotter/jkqtpbaseplotterstyle.h" #include "jkqtplotter/jkqtptools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/gui/jkvanishqtoolbar.h" #include @@ -52,7 +52,7 @@ /** \brief initialized Qt-ressources necessary for JKQTPlotter * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT void initJKQTPlotterResources(); +JKQTPLOTTER_LIB_EXPORT void initJKQTPlotterResources(); /** \brief plotter widget for scientific plots (uses JKQTBasePlotter to do the actual drawing) @@ -429,7 +429,7 @@ JKQTP_LIB_EXPORT void initJKQTPlotterResources(); * \see \ref JKQTPlotterQtCreator
Also see \ref JKQTPlotterStyling for another example of using the Qt UI Designer with JKQTPlotter * */ -class JKQTP_LIB_EXPORT JKQTPlotter: public QWidget { +class JKQTPLOTTER_LIB_EXPORT JKQTPlotter: public QWidget { Q_OBJECT public: /** \brief class constructor @@ -1394,7 +1394,7 @@ class JKQTP_LIB_EXPORT JKQTPlotter: public QWidget { * \internal * \ingroup jkqtpplottersupprt */ - struct JKQTP_LIB_EXPORT MouseDragAction { + struct JKQTPLOTTER_LIB_EXPORT MouseDragAction { /** \brief constructs an invalid object */ MouseDragAction(); MouseDragAction(Qt::MouseButton _mouseButton, Qt::KeyboardModifiers _modifier, JKQTPMouseDragActions _mode); diff --git a/lib/jkqtplotter/jkqtplotter_imexport.h b/lib/jkqtplotter/jkqtplotter_imexport.h new file mode 100644 index 0000000000..4a7d28a537 --- /dev/null +++ b/lib/jkqtplotter/jkqtplotter_imexport.h @@ -0,0 +1,108 @@ +#ifndef JKQTPLOTTER_IMPORT_H +#define JKQTPLOTTER_IMPORT_H + + +/* + Copyright (c) 2008-2019 Jan W. Krieger () + + last modification: $LastChangedDate: 2015-04-02 13:55:22 +0200 (Do, 02 Apr 2015) $ (revision $Rev: 3902 $) + + This software is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License (LGPL) as published by + the Free Software Foundation, either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License (LGPL) for more details. + + You should have received a copy of the GNU Lesser General Public License (LGPL) + along with this program. If not, see . +*/ + + + + +/*! \def JKQTPLOTTER_LIB_EXPORT + \ingroup jkqtpplottersupprt + + This define allows to export functions and classes from the jkqtcommon-library when building a dynamic/shared library. + Usage is as follows: + \code + #include "jkqtplotter/jkqtplotter_imexport.h.h" + + class JKQTPLOTTER_LIB_EXPORT exportedClassName { + ... + }; + + JKQTPLOTTER_LIB_EXPORT void exportedFunctionName(); + \endcode + + These macros append the appropriate \c __declspec(dllexport) and \c __declspec(dllimport) + to the function/class body and thus tell windows compilers to export these sysmbols from + the shared library, or import them from a shared library. + + Note that these attributes are only necessary on windows systems! + + These macros are controlled by two other macros: + - \c JKQTPLOTTER_LIB_IN_DLL declares that the application should link against a shared version of + JKQTPlotter, i.e. \c JKQTPlotterSharedLib_XYZ . + This needs to be defined while compiling the library and while compiling + any application linking against \c JKQTPlotterSharedLib_XYZ. + - \c JKQTPLOTTER_LIB_EXPORT_LIBRARY is only defined while compiling JKQTPlotter into \c JKQTPlotterSharedLib_XYZ + and ensures thet the symbols are exported. If it is not defined (e.g. while + compiling an application), the symbols are imported + . + + */ + +/*! \def JKQTPLOTTER_LIB_IN_DLL + \ingroup jkqtpplottersupprt + \brief declares that the application should link against a shared version of + JKQTPlotter, i.e. \c JKQTPlotterSharedLib_XYZ . + This needs to be defined while compiling the library and while compiling + any application linking against \c JKQTPlotterSharedLib_XYZ. +*/ + +/*! \def JKQTPLOTTER_LIB_EXPORT_LIBRARY + \ingroup jkqtpplottersupprt + \brief is only defined while compiling JKQTPlotter into \c JKQTPlotterSharedLib_XYZ + and ensures thet the symbols are exported. If it is not defined (e.g. while + compiling an application), the symbols are imported +*/ + +# ifndef __WINDOWS__ +# if defined(WIN32) || defined(WIN64) || defined(_MSC_VER) || defined(_WIN32) +# define __WINDOWS__ +# endif +# endif + +#ifdef __WINDOWS__ +# ifdef JKQTPLOTTER_LIB_IN_DLL +# ifndef JKQTPLOTTER_LIB_EXPORT +# ifdef JKQTPLOTTER_LIB_EXPORT_LIBRARY + /* We are building this library */ +# define JKQTPLOTTER_LIB_EXPORT __declspec(dllexport) +# else + /* We are using this library */ +# define JKQTPLOTTER_LIB_EXPORT __declspec(dllimport) +# endif +# endif +# else +# ifndef JKQTPLOTTER_LIB_EXPORT +# define JKQTPLOTTER_LIB_EXPORT +# endif +# endif +#else +# define JKQTPLOTTER_LIB_EXPORT +#endif + + + + + + + +#endif // JKQTPLOTTER_IMPORT_H + diff --git a/lib/jkqtplotter/jkqtplotterstyle.h b/lib/jkqtplotter/jkqtplotterstyle.h index b27f697a7c..ad1b614090 100644 --- a/lib/jkqtplotter/jkqtplotterstyle.h +++ b/lib/jkqtplotter/jkqtplotterstyle.h @@ -21,7 +21,7 @@ #define JKQTPLOTTERSTYLE_H #include "jkqtplotter/jkqtptools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include #include #include @@ -36,7 +36,7 @@ * * \see JKQTPlotter, \ref jkqtpplotter_styling */ -class JKQTP_LIB_EXPORT JKQTPlotterStyle { +class JKQTPLOTTER_LIB_EXPORT JKQTPlotterStyle { Q_GADGET public: /** \brief initialize with default values */ @@ -159,14 +159,14 @@ public: * * \see JKQTPSetSystemDefaultStyle(), JKQTPGetSystemDefaultBaseStyle(), JKQTPSetSystemDefaultBaseStyle(), \ref jkqtpplotter_styling */ -JKQTP_LIB_EXPORT JKQTPlotterStyle& JKQTPGetSystemDefaultStyle(); +JKQTPLOTTER_LIB_EXPORT JKQTPlotterStyle& JKQTPGetSystemDefaultStyle(); /** \brief replaces the system-wide default JKQTPlotterStyle with the given \a newStyle * \ingroup jkqtpplotter_styling * * \see JKQTPGetSystemDefaultStyle(), JKQTPGetSystemDefaultBaseStyle(), JKQTPSetSystemDefaultBaseStyle(), \ref jkqtpplotter_styling */ -JKQTP_LIB_EXPORT void JKQTPSetSystemDefaultStyle(JKQTPlotterStyle& newStyle); +JKQTPLOTTER_LIB_EXPORT void JKQTPSetSystemDefaultStyle(JKQTPlotterStyle& newStyle); #endif // JKQTPLOTTERSTYLE_H diff --git a/lib/jkqtplotter/jkqtpopencvinterface.h b/lib/jkqtplotter/jkqtpopencvinterface.h index 6edf581591..bbeec68e53 100644 --- a/lib/jkqtplotter/jkqtpopencvinterface.h +++ b/lib/jkqtplotter/jkqtpopencvinterface.h @@ -19,7 +19,7 @@ -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtpdatastorage.h" #include diff --git a/lib/jkqtplotter/jkqtpoverlaysbase.h b/lib/jkqtplotter/jkqtpoverlaysbase.h index 74c45aa9be..18c8a74d18 100644 --- a/lib/jkqtplotter/jkqtpoverlaysbase.h +++ b/lib/jkqtplotter/jkqtpoverlaysbase.h @@ -23,7 +23,7 @@ #include #include #include "jkqtplotter/jkqtptools.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtpgraphsbasestylingmixins.h" #ifndef jkqtpelementsoverlay_H @@ -38,7 +38,7 @@ class JKQTBasePlotter; These simple primitive elements can be used to e.g. display fast changing indicators on the graph ... */ -class JKQTP_LIB_EXPORT JKQTPOverlayElement : public QObject { +class JKQTPLOTTER_LIB_EXPORT JKQTPOverlayElement : public QObject { Q_OBJECT public: explicit JKQTPOverlayElement(JKQTBasePlotter *parent = nullptr); @@ -106,7 +106,7 @@ class JKQTP_LIB_EXPORT JKQTPOverlayElement : public QObject { /*! \brief baseclass for a two-position overlay \ingroup jkqtplotter_overlays */ -class JKQTP_LIB_EXPORT JKQTPOverlayTwoPositionOverlay : public JKQTPOverlayElement { +class JKQTPLOTTER_LIB_EXPORT JKQTPOverlayTwoPositionOverlay : public JKQTPOverlayElement { Q_OBJECT public: explicit JKQTPOverlayTwoPositionOverlay(double x1, double y1, double x2, double y2, JKQTBasePlotter *parent = nullptr); @@ -143,7 +143,7 @@ class JKQTP_LIB_EXPORT JKQTPOverlayTwoPositionOverlay : public JKQTPOverlayEleme /*! \brief baseclass for one-coordinate indicator overlays (horizontal/vertical lines \ingroup jkqtplotter_overlays */ -class JKQTP_LIB_EXPORT JKQTPOverlayOneCoordOverlay : public JKQTPOverlayElement { +class JKQTPLOTTER_LIB_EXPORT JKQTPOverlayOneCoordOverlay : public JKQTPOverlayElement { Q_OBJECT public: explicit JKQTPOverlayOneCoordOverlay(double pos, JKQTBasePlotter *parent = nullptr); @@ -162,7 +162,7 @@ class JKQTP_LIB_EXPORT JKQTPOverlayOneCoordOverlay : public JKQTPOverlayElement /*! \brief baseclass for two-coordinate indicator overlays (horizontal/vertical lines \ingroup jkqtplotter_overlays */ -class JKQTP_LIB_EXPORT JKQTPOverlayTwoCoordOverlay : public JKQTPOverlayOneCoordOverlay { +class JKQTPLOTTER_LIB_EXPORT JKQTPOverlayTwoCoordOverlay : public JKQTPOverlayOneCoordOverlay { Q_OBJECT public: explicit JKQTPOverlayTwoCoordOverlay(double pos, double pos2, JKQTBasePlotter *parent = nullptr); diff --git a/lib/jkqtplotter/jkqtptools.h b/lib/jkqtplotter/jkqtptools.h index 72426818f8..4c358a28db 100644 --- a/lib/jkqtplotter/jkqtptools.h +++ b/lib/jkqtplotter/jkqtptools.h @@ -21,7 +21,7 @@ #ifndef JKQTPTOOLS_H_INCLUDED #define JKQTPTOOLS_H_INCLUDED -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include #include #include @@ -74,13 +74,13 @@ enum JKQTPUserActionMarkerType { * * \see String2JKQTPUserActionMarkerType(), JKQTPUserActionMarkerType */ -JKQTP_LIB_EXPORT QString JKQTPUserActionMarkerType2String(JKQTPUserActionMarkerType act); +JKQTPLOTTER_LIB_EXPORT QString JKQTPUserActionMarkerType2String(JKQTPUserActionMarkerType act); /** \brief convert a QString (created by JKQTPUserActionMarkerType2String() ) to JKQTPUserActionMarkerType * \ingroup jkqtpplottersupprt * * \see JKQTPUserActionMarkerType2String(), JKQTPUserActionMarkerType */ -JKQTP_LIB_EXPORT JKQTPUserActionMarkerType String2JKQTPUserActionMarkerType(const QString &act); +JKQTPLOTTER_LIB_EXPORT JKQTPUserActionMarkerType String2JKQTPUserActionMarkerType(const QString &act); @@ -108,13 +108,13 @@ enum JKQTPMouseDragActions { * * \see String2JKQTPMouseDragActions(), JKQTPMouseDragActions */ -JKQTP_LIB_EXPORT QString JKQTPMouseDragActions2String(JKQTPMouseDragActions act); +JKQTPLOTTER_LIB_EXPORT QString JKQTPMouseDragActions2String(JKQTPMouseDragActions act); /** \brief convert a QString (created by JKQTPMouseDragActions2String() ) to JKQTPMouseDragActions * \ingroup jkqtpplottersupprt * * \see JKQTPMouseDragActions2String(), JKQTPMouseDragActions */ -JKQTP_LIB_EXPORT JKQTPMouseDragActions String2JKQTPMouseDragActions(const QString &button); +JKQTPLOTTER_LIB_EXPORT JKQTPMouseDragActions String2JKQTPMouseDragActions(const QString &button); /** \brief actions that can be bound to a double-click of the mouse * \ingroup jkqtpplottersupprt @@ -132,13 +132,13 @@ enum JKQTPMouseDoubleClickActions { * * \see String2JKQTPMouseDoubleClickActions(), JKQTPMouseDoubleClickActions */ -JKQTP_LIB_EXPORT QString JKQTPMouseDoubleClickActions2String(JKQTPMouseDoubleClickActions act); +JKQTPLOTTER_LIB_EXPORT QString JKQTPMouseDoubleClickActions2String(JKQTPMouseDoubleClickActions act); /** \brief convert a QString (created by JKQTPMouseDoubleClickActions2String() ) to JKQTPMouseDoubleClickActions * \ingroup jkqtpplottersupprt * * \see JKQTPMouseDoubleClickActions2String(), JKQTPMouseDoubleClickActions */ -JKQTP_LIB_EXPORT JKQTPMouseDoubleClickActions String2JKQTPMouseDoubleClickActions(const QString &act); +JKQTPLOTTER_LIB_EXPORT JKQTPMouseDoubleClickActions String2JKQTPMouseDoubleClickActions(const QString &act); /** \brief actions that can be bound to a mouse wheel event * \ingroup jkqtpplottersupprt @@ -153,13 +153,13 @@ enum JKQTPMouseWheelActions { * * \see String2JKQTPMouseWheelActions(), JKQTPMouseWheelActions */ -JKQTP_LIB_EXPORT QString JKQTPMouseWheelActions2String(JKQTPMouseWheelActions act); +JKQTPLOTTER_LIB_EXPORT QString JKQTPMouseWheelActions2String(JKQTPMouseWheelActions act); /** \brief convert a QString (created by JKQTPMouseWheelActions2String() ) to JKQTPMouseWheelActions * \ingroup jkqtpplottersupprt * * \see JKQTPMouseWheelActions2String(), JKQTPMouseWheelActions */ -JKQTP_LIB_EXPORT JKQTPMouseWheelActions String2JKQTPMouseWheelActions(const QString &act); +JKQTPLOTTER_LIB_EXPORT JKQTPMouseWheelActions String2JKQTPMouseWheelActions(const QString &act); /** \brief modes for the context menu * \ingroup jkqtpplottersupprt @@ -176,13 +176,13 @@ enum JKQTPContextMenuModes { * * \see String2JKQTPContextMenuModes(), JKQTPContextMenuModes */ -JKQTP_LIB_EXPORT QString JKQTPContextMenuModes2String(JKQTPContextMenuModes act); +JKQTPLOTTER_LIB_EXPORT QString JKQTPContextMenuModes2String(JKQTPContextMenuModes act); /** \brief convert a QString (created by JKQTPContextMenuModes2String() ) to JKQTPContextMenuModes * \ingroup jkqtpplottersupprt * * \see JKQTPContextMenuModes2String(), JKQTPContextMenuModes */ -JKQTP_LIB_EXPORT JKQTPContextMenuModes String2JKQTPContextMenuModes(const QString &act); +JKQTPLOTTER_LIB_EXPORT JKQTPContextMenuModes String2JKQTPContextMenuModes(const QString &act); /** \brief data structure for storage of assigned JKQTPMouseDragActions \see JKQTPMouseDragActionsHashMapIterator * \ingroup jkqtpplottersupprt */ @@ -229,7 +229,7 @@ enum JKQTPColorDerivationMode { * * \see JKQTPColorDerivationMode */ -JKQTP_LIB_EXPORT QColor JKQTPGetDerivedColor(JKQTPColorDerivationMode mode, const QColor& col); +JKQTPLOTTER_LIB_EXPORT QColor JKQTPGetDerivedColor(JKQTPColorDerivationMode mode, const QColor& col); /** \brief construct a QColor, based on the given \a color, but with alpha set to the specified value \a alphaF * \ingroup jkqtpplotter_styling @@ -256,13 +256,13 @@ inline QColor QColorWithAlpha(const QColor& color, int alpha) { * * \see String2JKQTPColorDerivationMode(), JKQTPColorDerivationMode */ -JKQTP_LIB_EXPORT QString JKQTPColorDerivationMode2String(JKQTPColorDerivationMode mode); +JKQTPLOTTER_LIB_EXPORT QString JKQTPColorDerivationMode2String(JKQTPColorDerivationMode mode); /** \brief convert a QString (created by JKQTPColorDerivationMode2String() ) to JKQTPColorDerivationMode * \ingroup jkqtpplotter_styling * * \see JKQTPColorDerivationMode2String(), JKQTPColorDerivationMode */ -JKQTP_LIB_EXPORT JKQTPColorDerivationMode String2JKQTPColorDerivationMode(const QString &mode); +JKQTPLOTTER_LIB_EXPORT JKQTPColorDerivationMode String2JKQTPColorDerivationMode(const QString &mode); /** \brief display mode for an axis @@ -283,34 +283,34 @@ enum JKQTPCADrawMode { /** \brief determines whether JKQTPCADrawMode has the line * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT bool JKQTPCADrawModeHasLine(JKQTPCADrawMode pos); +JKQTPLOTTER_LIB_EXPORT bool JKQTPCADrawModeHasLine(JKQTPCADrawMode pos); /** \brief determines whether JKQTPCADrawMode has ticks * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT bool JKQTPCADrawModeHasTicks(JKQTPCADrawMode pos); +JKQTPLOTTER_LIB_EXPORT bool JKQTPCADrawModeHasTicks(JKQTPCADrawMode pos); /** \brief determines whether JKQTPCADrawMode has tick labels * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT bool JKQTPCADrawModeHasTickLabels(JKQTPCADrawMode pos); +JKQTPLOTTER_LIB_EXPORT bool JKQTPCADrawModeHasTickLabels(JKQTPCADrawMode pos); /** \brief determines whether JKQTPCADrawMode has the axis label * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT bool JKQTPCADrawModeHasAxisLabel(JKQTPCADrawMode pos); +JKQTPLOTTER_LIB_EXPORT bool JKQTPCADrawModeHasAxisLabel(JKQTPCADrawMode pos); /** \brief converts a JKQTPCADrawMode variable into a human-readable string * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT QString JKQTPCADrawMode2String(JKQTPCADrawMode pos); +JKQTPLOTTER_LIB_EXPORT QString JKQTPCADrawMode2String(JKQTPCADrawMode pos); /** \brief converts a string into a JKQTPCADrawMode * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT JKQTPCADrawMode String2JKQTPCADrawMode(const QString& pos); +JKQTPLOTTER_LIB_EXPORT JKQTPCADrawMode String2JKQTPCADrawMode(const QString& pos); /** \brief display mode for the axis labels @@ -337,23 +337,23 @@ enum JKQTPLabelTickMode { /** \brief converts a JKQTPLabelTickMode variable into a human-readable string * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT QString JKQTPLabelTickMode2String(JKQTPLabelTickMode pos); +JKQTPLOTTER_LIB_EXPORT QString JKQTPLabelTickMode2String(JKQTPLabelTickMode pos); /** \brief converts a string into a JKQTPLabelTickMode * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT JKQTPLabelTickMode String2JKQTPLabelTickMode(const QString& pos); +JKQTPLOTTER_LIB_EXPORT JKQTPLabelTickMode String2JKQTPLabelTickMode(const QString& pos); /** \brief converts a JKQTPCALabelType variable into a human-readable string * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT QString JKQTPCALabelType2String(JKQTPCALabelType pos); +JKQTPLOTTER_LIB_EXPORT QString JKQTPCALabelType2String(JKQTPCALabelType pos); /** \brief converts a string into a JKQTPCALabelType * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT JKQTPCALabelType String2JKQTPCALabelType(const QString& pos); +JKQTPLOTTER_LIB_EXPORT JKQTPCALabelType String2JKQTPCALabelType(const QString& pos); /** \brief position of the axis labels * \ingroup jkqtpplottersupprt @@ -368,12 +368,12 @@ enum JKQTPLabelPosition { /** \brief converts a JKQTPLabelPosition variable into a human-readable string * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT QString JKQTPLabelPosition2String(JKQTPLabelPosition pos); +JKQTPLOTTER_LIB_EXPORT QString JKQTPLabelPosition2String(JKQTPLabelPosition pos); /** \brief converts a string into a JKQTPLabelPosition * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT JKQTPLabelPosition String2JKQTPLabelPosition(const QString& pos); +JKQTPLOTTER_LIB_EXPORT JKQTPLabelPosition String2JKQTPLabelPosition(const QString& pos); /** \brief position of the key * \ingroup jkqtpplottersupprt @@ -397,12 +397,12 @@ enum JKQTPKeyPosition { /** \brief converts a JKQTPLabelPosition variable into a human-readable string * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT QString JKQTPKeyPosition2String(JKQTPKeyPosition pos); +JKQTPLOTTER_LIB_EXPORT QString JKQTPKeyPosition2String(JKQTPKeyPosition pos); /** \brief converts a string into a JKQTPLabelPosition * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT JKQTPKeyPosition String2JKQTPKeyPosition(const QString& pos); +JKQTPLOTTER_LIB_EXPORT JKQTPKeyPosition String2JKQTPKeyPosition(const QString& pos); /** \brief layout of the key * \ingroup jkqtpplottersupprt @@ -417,12 +417,12 @@ enum JKQTPKeyLayout { /** \brief converts a JKQTPKeyLayout variable into a human-readable string * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT QString JKQTPKeyLayout2String(JKQTPKeyLayout pos); +JKQTPLOTTER_LIB_EXPORT QString JKQTPKeyLayout2String(JKQTPKeyLayout pos); /** \brief converts a String into a JKQTPKeyLayout * \ingroup jkqtpplottersupprt */ -JKQTP_LIB_EXPORT JKQTPKeyLayout String2JKQTPKeyLayout(const QString& pos); +JKQTPLOTTER_LIB_EXPORT JKQTPKeyLayout String2JKQTPKeyLayout(const QString& pos); @@ -430,7 +430,7 @@ JKQTP_LIB_EXPORT JKQTPKeyLayout String2JKQTPKeyLayout(const QString& pos); * \ingroup jkqtpplottersupprt * \internal */ -struct JKQTP_LIB_EXPORT JKQTPGridPrintingItem { +struct JKQTPLOTTER_LIB_EXPORT JKQTPGridPrintingItem { /** \brief logic x-position of a graph, relative to the current JKQtPlotter */ size_t x; /** \brief logic y-position of a graph, relative to the current JKQtPlotter */ @@ -464,12 +464,12 @@ enum JKQTPErrorPlotstyle { /** \brief converts a JKQTPErrorPlotstyle variable into a human-readable string * \ingroup jkqtplotter_basegraphserrors */ -JKQTP_LIB_EXPORT QString JKQTPErrorPlotstyle2String(JKQTPErrorPlotstyle pos); +JKQTPLOTTER_LIB_EXPORT QString JKQTPErrorPlotstyle2String(JKQTPErrorPlotstyle pos); /** \brief converts a String into a JKQTPErrorPlotstyle * \ingroup jkqtplotter_basegraphserrors */ -JKQTP_LIB_EXPORT JKQTPErrorPlotstyle String2JKQTPErrorPlotstyle(const QString& pos); +JKQTPLOTTER_LIB_EXPORT JKQTPErrorPlotstyle String2JKQTPErrorPlotstyle(const QString& pos); @@ -491,12 +491,12 @@ enum JKQTPSpecialLineType { /** \brief converts a JKQTPSpecialLineType variable into a human-readable string * \ingroup jkqtplotter_linesymbolgraphs_simple */ -JKQTP_LIB_EXPORT QString JKQTPSpecialLineType2String(JKQTPSpecialLineType pos); +JKQTPLOTTER_LIB_EXPORT QString JKQTPSpecialLineType2String(JKQTPSpecialLineType pos); /** \brief converts a String into a JKQTPSpecialLineType * \ingroup jkqtplotter_linesymbolgraphs_simple */ -JKQTP_LIB_EXPORT JKQTPSpecialLineType String2JKQTPSpecialLineType(const QString& pos); +JKQTPLOTTER_LIB_EXPORT JKQTPSpecialLineType String2JKQTPSpecialLineType(const QString& pos); diff --git a/lib/jkqtplotter/overlays/jkqtpbasicoverlays.h b/lib/jkqtplotter/overlays/jkqtpbasicoverlays.h index 5acb6fa05b..2628625809 100644 --- a/lib/jkqtplotter/overlays/jkqtpbasicoverlays.h +++ b/lib/jkqtplotter/overlays/jkqtpbasicoverlays.h @@ -24,7 +24,7 @@ #include #include "jkqtplotter/jkqtptools.h" #include "jkqtplotter/jkqtpoverlaysbase.h" -#include "jkqtcommon/jkqtp_imexport.h" +#include "jkqtplotter/jkqtplotter_imexport.h" #include "jkqtplotter/jkqtpgraphsbasestylingmixins.h" #ifndef jkqtpbasicoverlays_H @@ -40,7 +40,7 @@ class JKQTBasePlotter; These simple primitive elements can be used to e.g. display fast changing indicators on the graph ... */ -class JKQTP_LIB_EXPORT JKQTPOverlayVerticalLine : public JKQTPOverlayOneCoordOverlay, public JKQTPGraphLineStyleMixin, public JKQTPGraphTextStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPOverlayVerticalLine : public JKQTPOverlayOneCoordOverlay, public JKQTPGraphLineStyleMixin, public JKQTPGraphTextStyleMixin { Q_OBJECT public: explicit JKQTPOverlayVerticalLine(double pos, JKQTBasePlotter *parent = nullptr); @@ -67,7 +67,7 @@ class JKQTP_LIB_EXPORT JKQTPOverlayVerticalLine : public JKQTPOverlayOneCoordOve These simple primitive elements can be used to e.g. display fast changing indicators on the graph ... */ -class JKQTP_LIB_EXPORT JKQTPOverlayVerticalRange : public JKQTPOverlayTwoCoordOverlay, public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin, public JKQTPGraphTextStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPOverlayVerticalRange : public JKQTPOverlayTwoCoordOverlay, public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin, public JKQTPGraphTextStyleMixin { Q_OBJECT public: explicit JKQTPOverlayVerticalRange(double pos, double pos2, JKQTBasePlotter *parent = nullptr); @@ -98,7 +98,7 @@ class JKQTP_LIB_EXPORT JKQTPOverlayVerticalRange : public JKQTPOverlayTwoCoordOv \ingroup jkqtplotter_overlays */ -class JKQTP_LIB_EXPORT JKQTPOverlayLine : public JKQTPOverlayTwoPositionOverlay, public JKQTPGraphLineStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPOverlayLine : public JKQTPOverlayTwoPositionOverlay, public JKQTPGraphLineStyleMixin { Q_OBJECT public: explicit JKQTPOverlayLine(double x1, double y1, double x2, double y2, JKQTBasePlotter *parent = nullptr); @@ -121,7 +121,7 @@ class JKQTP_LIB_EXPORT JKQTPOverlayLine : public JKQTPOverlayTwoPositionOverlay, \ingroup jkqtplotter_overlays */ -class JKQTP_LIB_EXPORT JKQTPOverlayRectangle : public JKQTPOverlayTwoPositionOverlay, public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin { +class JKQTPLOTTER_LIB_EXPORT JKQTPOverlayRectangle : public JKQTPOverlayTwoPositionOverlay, public JKQTPGraphLineStyleMixin, public JKQTPGraphFillStyleMixin { Q_OBJECT public: explicit JKQTPOverlayRectangle(double x1, double y1, double x2, double y2, JKQTBasePlotter *parent = nullptr); diff --git a/qmake/sharedlib/jkqtfastplotterlib/jkqtfastplotterlib.pro b/qmake/sharedlib/jkqtfastplotterlib/jkqtfastplotterlib.pro index 96c8837965..39806e569a 100644 --- a/qmake/sharedlib/jkqtfastplotterlib/jkqtfastplotterlib.pro +++ b/qmake/sharedlib/jkqtfastplotterlib/jkqtfastplotterlib.pro @@ -8,8 +8,8 @@ CONFIG+=dll CONFIG += create_prl win32 { - DEFINES += JKQTP_LIB_IN_DLL - DEFINES += JKQTP_LIB_EXPORT_LIBRARY + DEFINES += JKQTCOMMON_LIB_IN_DLL JKQTFASTPLOTTER_LIB_IN_DLL + DEFINES += JKQTCOMMON_LIB_EXPORT_LIBRARY JKQTFASTPLOTTER_LIB_EXPORT_LIBRARY } include(../../../lib/jkqtfastplotter.pri) diff --git a/qmake/sharedlib/jkqtmathtextlib/jkqtmathtextlib.pro b/qmake/sharedlib/jkqtmathtextlib/jkqtmathtextlib.pro index 79d1e03e71..116363c5ec 100644 --- a/qmake/sharedlib/jkqtmathtextlib/jkqtmathtextlib.pro +++ b/qmake/sharedlib/jkqtmathtextlib/jkqtmathtextlib.pro @@ -8,8 +8,8 @@ CONFIG+=dll CONFIG += create_prl win32 { - DEFINES += JKQTP_LIB_IN_DLL - DEFINES += JKQTP_LIB_EXPORT_LIBRARY + DEFINES += JKQTCOMMON_LIB_IN_DLL JKQTMATHTEXT_LIB_IN_DLL + DEFINES += JKQTCOMMON_LIB_EXPORT_LIBRARY JKQTMATHTEXT_LIB_EXPORT_LIBRARY } include(../../../lib/jkqtmathtext.pri) diff --git a/qmake/sharedlib/jkqtpcommonlib/jkqtpcommonlib.pro b/qmake/sharedlib/jkqtpcommonlib/jkqtpcommonlib.pro index 9a2a26bdb4..fee6a824b1 100644 --- a/qmake/sharedlib/jkqtpcommonlib/jkqtpcommonlib.pro +++ b/qmake/sharedlib/jkqtpcommonlib/jkqtpcommonlib.pro @@ -8,8 +8,8 @@ CONFIG += dll CONFIG += create_prl win32 { - DEFINES += JKQTP_LIB_IN_DLL - DEFINES += JKQTP_LIB_EXPORT_LIBRARY + DEFINES += JKQTCOMMON_LIB_IN_DLL + DEFINES += JKQTCOMMON_LIB_EXPORT_LIBRARY } include(../../../lib/jkqtpcommon.pri) diff --git a/qmake/sharedlib/jkqtplotterlib/jkqtplotterlib.pro b/qmake/sharedlib/jkqtplotterlib/jkqtplotterlib.pro index 1ca06479d8..f91a701bac 100644 --- a/qmake/sharedlib/jkqtplotterlib/jkqtplotterlib.pro +++ b/qmake/sharedlib/jkqtplotterlib/jkqtplotterlib.pro @@ -8,8 +8,8 @@ CONFIG += dll CONFIG += create_prl win32 { - DEFINES += JKQTP_LIB_IN_DLL - DEFINES += JKQTP_LIB_EXPORT_LIBRARY + DEFINES += JKQTCOMMON_LIB_IN_DLL JKQTFASTPLOTTER_LIB_IN_DLL JKQTMATHTEXT_LIB_IN_DLL JKQTPLOTTER_LIB_IN_DLL + DEFINES += JKQTCOMMON_LIB_EXPORT_LIBRARY JKQTFASTPLOTTER_LIB_EXPORT_LIBRARY JKQTMATHTEXT_LIB_EXPORT_LIBRARY JKQTPLOTTER_LIB_EXPORT_LIBRARY } win32-msvc*: DEFINES += _USE_MATH_DEFINES