@@ -0,0 +1,29 | |||
|
1 | # - Try to find CatalogueAPI Module | |
|
2 | # Once done this will define | |
|
3 | # CATALOGUEAPI_FOUND - System has CatalogueAPI | |
|
4 | # CATALOGUEAPI_INCLUDE_DIRS - The CatalogueAPI include directories | |
|
5 | # CATALOGUEAPI_LIBRARIES - The libraries needed to use CatalogueAPI | |
|
6 | # CATALOGUEAPI_SHARED_LIBRARIES - The shared libraries for CatalogueAPI | |
|
7 | ||
|
8 | set(CATALOGUEAPI_ROOT_DIR "${CATALOGUEAPI_EXTERN_FOLDER}" | |
|
9 | CACHE PATHS | |
|
10 | "Path to the installation of CatalogueAPI" | |
|
11 | ${libRootDirForceValue}) | |
|
12 | ||
|
13 | find_path(CATALOGUEAPI_INCLUDE_DIR CatalogueDao.h | |
|
14 | HINTS ${CATALOGUEAPI_ROOT_DIR} ${CATALOGUEAPI_EXTERN_FOLDER} | |
|
15 | PATH_SUFFIXES src ) | |
|
16 | ||
|
17 | find_library(CATALOGUEAPI_LIBRARY NAMES CatalogueAPI | |
|
18 | HINTS ${CATALOGUEAPI_ROOT_DIR} ${CATALOGUEAPI_EXTERN_FOLDER} | |
|
19 | PATH_SUFFIXES lib) | |
|
20 | ||
|
21 | set(CATALOGUEAPI_LIBRARIES ${CATALOGUEAPI_LIBRARY} ) | |
|
22 | set(CATALOGUEAPI_INCLUDE_DIRS ${CATALOGUEAPI_INCLUDE_DIR} ) | |
|
23 | ||
|
24 | include(FindPackageHandleStandardArgs) | |
|
25 | # handle the QUIETLY and REQUIRED arguments and set CATALOGUEAPI_FOUND to TRUE | |
|
26 | # if all listed variables are TRUE | |
|
27 | find_package_handle_standard_args(CatalogueAPI FOUND_VAR CATALOGUEAPI_FOUND | |
|
28 | REQUIRED_VARS CATALOGUEAPI_LIBRARY CATALOGUEAPI_INCLUDE_DIR) | |
|
29 | mark_as_advanced(CATALOGUEAPI_INCLUDE_DIR CATALOGUEAPI_LIBRARY ) |
@@ -0,0 +1,51 | |||
|
1 | #ifndef SCIQLOP_CATALOGUECONTROLLER_H | |
|
2 | #define SCIQLOP_CATALOGUECONTROLLER_H | |
|
3 | ||
|
4 | #include "CoreGlobal.h" | |
|
5 | ||
|
6 | #include <Data/SqpRange.h> | |
|
7 | ||
|
8 | #include <QLoggingCategory> | |
|
9 | #include <QObject> | |
|
10 | #include <QUuid> | |
|
11 | ||
|
12 | #include <Common/spimpl.h> | |
|
13 | ||
|
14 | Q_DECLARE_LOGGING_CATEGORY(LOG_CatalogueController) | |
|
15 | ||
|
16 | class DataSourceItem; | |
|
17 | class Variable; | |
|
18 | ||
|
19 | /** | |
|
20 | * @brief The CatalogueController class aims to make the link between SciQlop and its plugins. | |
|
21 | * This is the intermediate class that SciQlop has to use in the way to connect a data source. | |
|
22 | * Please first use register method to initialize a plugin specified by its metadata name (JSON | |
|
23 | * plugin source) then others specifics method will be able to access it. You can load a data source | |
|
24 | * driver plugin then create a data source. | |
|
25 | */ | |
|
26 | class SCIQLOP_CORE_EXPORT CatalogueController : public QObject { | |
|
27 | Q_OBJECT | |
|
28 | public: | |
|
29 | explicit CatalogueController(QObject *parent = 0); | |
|
30 | virtual ~CatalogueController(); | |
|
31 | ||
|
32 | signals: | |
|
33 | /// Signal emitted when a variable is about to be deleted from SciQlop | |
|
34 | void variableAboutToBeDeleted(std::shared_ptr<Variable> variable); | |
|
35 | ||
|
36 | /// Signal emitted when a data acquisition is requested on a range for a variable | |
|
37 | void rangeChanged(std::shared_ptr<Variable> variable, const SqpRange &range); | |
|
38 | ||
|
39 | public slots: | |
|
40 | /// Manage init/end of the controller | |
|
41 | void initialize(); | |
|
42 | void finalize(); | |
|
43 | ||
|
44 | private: | |
|
45 | void waitForFinish(); | |
|
46 | ||
|
47 | class CatalogueControllerPrivate; | |
|
48 | spimpl::unique_impl_ptr<CatalogueControllerPrivate> impl; | |
|
49 | }; | |
|
50 | ||
|
51 | #endif // SCIQLOP_CATALOGUECONTROLLER_H |
@@ -0,0 +1,52 | |||
|
1 | #include <Catalogue/CatalogueController.h> | |
|
2 | ||
|
3 | #include <Variable/Variable.h> | |
|
4 | ||
|
5 | #include <CatalogueDao.h> | |
|
6 | ||
|
7 | #include <QMutex> | |
|
8 | #include <QThread> | |
|
9 | ||
|
10 | #include <QDir> | |
|
11 | #include <QStandardPaths> | |
|
12 | ||
|
13 | Q_LOGGING_CATEGORY(LOG_CatalogueController, "CatalogueController") | |
|
14 | ||
|
15 | class CatalogueController::CatalogueControllerPrivate { | |
|
16 | public: | |
|
17 | QMutex m_WorkingMutex; | |
|
18 | CatalogueDao m_CatalogueDao; | |
|
19 | }; | |
|
20 | ||
|
21 | CatalogueController::CatalogueController(QObject *parent) | |
|
22 | : impl{spimpl::make_unique_impl<CatalogueControllerPrivate>()} | |
|
23 | { | |
|
24 | qCDebug(LOG_CatalogueController()) << tr("CatalogueController construction") | |
|
25 | << QThread::currentThread(); | |
|
26 | } | |
|
27 | ||
|
28 | CatalogueController::~CatalogueController() | |
|
29 | { | |
|
30 | qCDebug(LOG_CatalogueController()) << tr("CatalogueController destruction") | |
|
31 | << QThread::currentThread(); | |
|
32 | this->waitForFinish(); | |
|
33 | } | |
|
34 | ||
|
35 | void CatalogueController::initialize() | |
|
36 | { | |
|
37 | qCDebug(LOG_CatalogueController()) << tr("CatalogueController init") | |
|
38 | << QThread::currentThread(); | |
|
39 | impl->m_WorkingMutex.lock(); | |
|
40 | impl->m_CatalogueDao.initialize(); | |
|
41 | qCDebug(LOG_CatalogueController()) << tr("CatalogueController init END"); | |
|
42 | } | |
|
43 | ||
|
44 | void CatalogueController::finalize() | |
|
45 | { | |
|
46 | impl->m_WorkingMutex.unlock(); | |
|
47 | } | |
|
48 | ||
|
49 | void CatalogueController::waitForFinish() | |
|
50 | { | |
|
51 | QMutexLocker locker{&impl->m_WorkingMutex}; | |
|
52 | } |
@@ -0,0 +1,73 | |||
|
1 | # - Clone and build CatalogueAPI Module | |
|
2 | include(ExternalProject) | |
|
3 | ||
|
4 | find_package(Git REQUIRED) | |
|
5 | ||
|
6 | if(WIN32) | |
|
7 | find_program(MesonExec meson PATHS C:/Appli/Meson) | |
|
8 | if(NOT MesonExec) | |
|
9 | Message("Error: Meson not found") | |
|
10 | else() | |
|
11 | message("Meson found: ${MesonExec}" ) | |
|
12 | endif() | |
|
13 | find_program(NinjaExec ninja PATHS C:/Appli/Meson) | |
|
14 | if(NOT NinjaExec) | |
|
15 | Message("Error: Ninja not found") | |
|
16 | else() | |
|
17 | message("Ninja found: ${NinjaExec}" ) | |
|
18 | endif() | |
|
19 | endif() | |
|
20 | if(NOT MesonExec) | |
|
21 | set (MesonExec meson) | |
|
22 | endif() | |
|
23 | if(NOT NinjaExec) | |
|
24 | set (NinjaExec ninja) | |
|
25 | endif() | |
|
26 | ||
|
27 | SET(CATALOGUEAPI_SOURCES_PATH ${CMAKE_SOURCE_DIR}/3rdparty/CatalogueAPI) | |
|
28 | SET(CATALOGUEAPI_BUILD_PATH ${CATALOGUEAPI_SOURCES_PATH}/build) | |
|
29 | SET(CATALOGUEAPI_QXORM_LIB_PATH ${CATALOGUEAPI_BUILD_PATH}/subprojects/QxOrm) | |
|
30 | SET(CatalogueAPI_build_type plain) | |
|
31 | ||
|
32 | if(CMAKE_BUILD_TYPE STREQUAL "") | |
|
33 | set(CMAKE_BUILD_TYPE Release) | |
|
34 | endif() | |
|
35 | string(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER) | |
|
36 | ||
|
37 | ExternalProject_Add( | |
|
38 | CatalogueAPI | |
|
39 | ||
|
40 | GIT_REPOSITORY https://perrinel@hephaistos.lpp.polytechnique.fr/rhodecode/GIT_REPOSITORIES/LPP/Users/mperrinel/CatalogueAPI | |
|
41 | GIT_TAG develop | |
|
42 | ||
|
43 | UPDATE_COMMAND ${GIT_EXECUTABLE} pull | |
|
44 | PATCH_COMMAND "" | |
|
45 | ||
|
46 | SOURCE_DIR "${CATALOGUEAPI_SOURCES_PATH}" | |
|
47 | CONFIGURE_COMMAND ${MesonExec} --prefix=${CATALOGUEAPI_SOURCES_PATH} --buildtype=${CMAKE_BUILD_TYPE_TOLOWER} "${CATALOGUEAPI_SOURCES_PATH}" "${CATALOGUEAPI_BUILD_PATH}" | |
|
48 | ||
|
49 | BUILD_COMMAND ${NinjaExec} -C "${CATALOGUEAPI_BUILD_PATH}" | |
|
50 | INSTALL_COMMAND ${NinjaExec} -C "${CATALOGUEAPI_BUILD_PATH}" install | |
|
51 | LOG_DOWNLOAD 1 | |
|
52 | LOG_UPDATE 1 | |
|
53 | ) | |
|
54 | ||
|
55 | set(CATALOG_LIB_PATH lib) | |
|
56 | if(WIN32) | |
|
57 | set(CATALOG_LIB_PATH bin) | |
|
58 | endif() | |
|
59 | ||
|
60 | ExternalProject_Add_Step( | |
|
61 | CatalogueAPI CopyToBin | |
|
62 | COMMAND ${CMAKE_COMMAND} -E copy_directory ${CATALOGUEAPI_SOURCES_PATH}/lib64 ${CATALOGUEAPI_SOURCES_PATH}/${CATALOG_LIB_PATH} | |
|
63 | COMMAND ${CMAKE_COMMAND} -E copy_directory ${CATALOGUEAPI_QXORM_LIB_PATH} ${CATALOGUEAPI_SOURCES_PATH}/${CATALOG_LIB_PATH} | |
|
64 | DEPENDEES install | |
|
65 | ) | |
|
66 | ||
|
67 | ||
|
68 | set(CATALOGUEAPI_INCLUDE ${CATALOGUEAPI_SOURCES_PATH}/src) | |
|
69 | set(CATALOGUEAPI_LIBRARIES ${CATALOGUEAPI_SOURCES_PATH}/${CATALOG_LIB_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}CatalogueAPI${CMAKE_SHARED_LIBRARY_SUFFIX}) | |
|
70 | list(APPEND CATALOGUEAPI_LIBRARIES ${CATALOGUEAPI_SOURCES_PATH}/${CATALOG_LIB_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}QxOrm${CMAKE_SHARED_LIBRARY_SUFFIX}) | |
|
71 | ||
|
72 | mark_as_advanced(CATALOGUEAPI_INCLUDE) | |
|
73 | mark_as_advanced(CATALOGUEAPI_LIBRARIES) |
@@ -0,0 +1,4 | |||
|
1 | [wrap-git] | |
|
2 | directory=CatalogueAPI | |
|
3 | url=https://hephaistos.lpp.polytechnique.fr/rhodecode/GIT_REPOSITORIES/LPP/Users/mperrinel/CatalogueAPI.git | |
|
4 | revision=head |
@@ -0,0 +1,5 | |||
|
1 | [wrap-git] | |
|
2 | directory=QxOrm | |
|
3 | url=https://github.com/jeandet/qxorm.git | |
|
4 | revision=head | |
|
5 |
@@ -3,3 +3,4 CMakeLists.txt.user | |||
|
3 | 3 | /.project |
|
4 | 4 | core/src/Version.cpp |
|
5 | 5 | core/include/Version.h |
|
6 | 3rdparty/ |
@@ -6,7 +6,13 cmake_policy(VERSION 3.6) | |||
|
6 | 6 | |
|
7 | 7 | PROJECT(SCIQLOP) |
|
8 | 8 | |
|
9 | ||
|
10 | # | |
|
11 | # build the CatalogueAPI dependencu | |
|
12 | # | |
|
13 | INCLUDE("extern/CatalogueAPI.cmake") | |
|
14 | ||
|
9 | 15 | # |
|
10 | 16 | # build the project |
|
11 | 17 | # |
|
12 | INCLUDE("cmake/sciqlop.cmake") No newline at end of file | |
|
18 | INCLUDE("cmake/sciqlop.cmake") |
@@ -1,5 +1,5 | |||
|
1 | 1 | STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TO_LOWER) |
|
2 | SET(WINDEPLOYQT_ARGS --${CMAKE_BUILD_TYPE_TO_LOWER} --list mapping --no-system-d3d-compiler --compiler-runtime --dry-run) | |
|
2 | SET(WINDEPLOYQT_ARGS --${CMAKE_BUILD_TYPE_TO_LOWER} --list mapping -network -sql --no-system-d3d-compiler --compiler-runtime --dry-run) | |
|
3 | 3 | |
|
4 | 4 | #FOREACH(qtModule @_qt5_modules@) |
|
5 | 5 | # STRING(TOLOWER ${qtModule} qtLowerModule) |
@@ -1,4 +1,3 | |||
|
1 | ||
|
2 | 1 | ## core - CMakeLists.txt |
|
3 | 2 | STRING(TOLOWER ${CMAKE_PROJECT_NAME} LIBRARY_PREFFIX) |
|
4 | 3 | SET(SQPCORE_LIBRARY_NAME "${LIBRARY_PREFFIX}_core${DEBUG_SUFFIX}") |
@@ -45,12 +44,17 set_property(TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON) | |||
|
45 | 44 | TARGET_LINK_LIBRARIES(${SQPCORE_LIBRARY_NAME}) |
|
46 | 45 | qt5_use_modules(${SQPCORE_LIBRARY_NAME} Core Network) |
|
47 | 46 | |
|
47 | # Find CATALOGUE_API | |
|
48 | include_directories("${CATALOGUEAPI_INCLUDE}") | |
|
49 | TARGET_LINK_LIBRARIES(${SQPCORE_LIBRARY_NAME} ${CATALOGUEAPI_LIBRARIES}) | |
|
48 | 50 | INSTALL(TARGETS ${SQPCORE_LIBRARY_NAME} |
|
49 | 51 | RUNTIME DESTINATION ${INSTALL_BINARY_DIR} |
|
50 | 52 | LIBRARY DESTINATION ${INSTALL_LIBRARY_DIR} |
|
51 | 53 | ARCHIVE DESTINATION ${INSTALL_LIBRARY_DIR} |
|
52 | 54 | ) |
|
53 | 55 | |
|
56 | add_dependencies(${SQPCORE_LIBRARY_NAME} CatalogueAPI) | |
|
57 | ||
|
54 | 58 | # From cmake documentation: http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html |
|
55 | 59 | # Entries in the COMPILE_DEFINITIONS are prefixed with -D or /D and added to the compile line in an unspecified order. |
|
56 | 60 | # The DEFINE_SYMBOL target property is also added as a compile definition as a special convenience case for SHARED and MODULE library targets |
@@ -64,9 +68,19 ENDIF() | |||
|
64 | 68 | # dependent shared libraries |
|
65 | 69 | SCIQLOP_SET_TO_PARENT_SCOPE(SQPCORE_LIBRARY_NAME) |
|
66 | 70 | |
|
67 | # Copy extern shared libraries to the lib folder | |
|
68 | SCIQLOP_COPY_TO_TARGET(LIBRARY ${SQPCORE_LIBRARY_NAME} ${EXTERN_SHARED_LIBRARIES}) | |
|
69 | ||
|
71 | ## Copy extern shared libraries to the lib folder | |
|
72 | LIST (APPEND ${EXTERN_SHARED_LIBRARIES} ${CATALOGUEAPI_LIBRARIES}) | |
|
73 | ||
|
74 | ||
|
75 | SET (COPY_LIBS_DESTINATION LIBRARY) | |
|
76 | if(APPLE) | |
|
77 | SET (COPY_LIBS_DESTINATION RUNTIME) | |
|
78 | endif() | |
|
79 | ||
|
80 | add_custom_command(TARGET ${SQPCORE_LIBRARY_NAME} POST_BUILD | |
|
81 | COMMAND ${CMAKE_COMMAND} -E copy ${CATALOGUEAPI_LIBRARIES} ${EXECUTABLE_OUTPUT_PATH} | |
|
82 | ) | |
|
83 | ||
|
70 | 84 | # Add the files to the list of files to be analyzed |
|
71 | 85 | LIST(APPEND CHECKSTYLE_INPUT_FILES ${MODULE_SOURCES}) |
|
72 | 86 | SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_INPUT_FILES) |
@@ -82,6 +96,7 IF(BUILD_TESTS) | |||
|
82 | 96 | FILE (GLOB_RECURSE TESTS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Test*.cpp) |
|
83 | 97 | FILE (GLOB_RECURSE TESTS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Test*.h) |
|
84 | 98 | SET( TEST_LIBRARIES ${SQPCORE_LIBRARY_NAME}) |
|
99 | list(APPEND TEST_LIBRARIES ${CATALOGUEAPI_LIBRARIES}) | |
|
85 | 100 | |
|
86 | 101 | SET(TARGETS_COV) |
|
87 | 102 | FOREACH( testFile ${TESTS_SOURCES} ) |
@@ -100,12 +115,11 IF(BUILD_TESTS) | |||
|
100 | 115 | ADD_EXECUTABLE(${testName} ${testFile} ${currentTestSources}) |
|
101 | 116 | set_property(TARGET ${testName} PROPERTY CXX_STANDARD 14) |
|
102 | 117 | set_property(TARGET ${testName} PROPERTY CXX_STANDARD_REQUIRED ON) |
|
103 |
TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES} |
|
|
118 | TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES}) | |
|
104 | 119 | qt5_use_modules(${testName} Test) |
|
105 | 120 | |
|
106 | 121 | ADD_TEST( NAME ${testName} COMMAND ${testName} ) |
|
107 | 122 | |
|
108 | SCIQLOP_COPY_TO_TARGET(RUNTIME ${testName} ${EXTERN_SHARED_LIBRARIES}) | |
|
109 | 123 | set(Coverage_NAME ${testName}) |
|
110 | 124 | if(UNIX) |
|
111 | 125 | SETUP_TARGET_FOR_COVERAGE(TARGET ${testName}_coverage OUTPUT ${testFile}-path NAME ${testFile} EXECUTABLE ${testName}) |
@@ -1,5 +1,10 | |||
|
1 | 1 | |
|
2 | qxorm_dep = dependency('QxOrm', required : true, fallback:['QxOrm','qxorm_dep']) | |
|
3 | catalogueapi_dep = dependency('CatalogueAPI', required : true, fallback:['CatalogueAPI','CatalogueAPI_dep']) | |
|
4 | ||
|
5 | ||
|
2 | 6 | core_moc_headers = [ |
|
7 | 'include/Catalogue/CatalogueController.h', | |
|
3 | 8 | 'include/Data/IDataProvider.h', |
|
4 | 9 | 'include/DataSource/DataSourceController.h', |
|
5 | 10 | 'include/DataSource/DataSourceItemAction.h', |
@@ -21,6 +26,7 core_sources = [ | |||
|
21 | 26 | 'src/Common/DateUtils.cpp', |
|
22 | 27 | 'src/Common/StringUtils.cpp', |
|
23 | 28 | 'src/Common/MimeTypesDef.cpp', |
|
29 | 'src/Catalogue/CatalogueController.cpp', | |
|
24 | 30 | 'src/Data/ScalarSeries.cpp', |
|
25 | 31 | 'src/Data/SpectrogramSeries.cpp', |
|
26 | 32 | 'src/Data/DataSeriesIterator.cpp', |
@@ -52,14 +58,15 sciqlop_core_lib = library('sciqlopcore', | |||
|
52 | 58 | core_moc_files, |
|
53 | 59 | cpp_args : '-DCORE_LIB', |
|
54 | 60 | include_directories : core_inc, |
|
55 | dependencies : [qt5core, qt5network], | |
|
61 | dependencies : [qt5core, qt5network, catalogueapi_dep], | |
|
56 | 62 | install : true |
|
57 | 63 | ) |
|
58 | 64 | |
|
59 | 65 | |
|
60 | 66 | sciqlop_core = declare_dependency(link_with : sciqlop_core_lib, |
|
61 | 67 | include_directories : core_inc, |
|
62 | dependencies : [qt5core, qt5network]) | |
|
68 | dependencies : [qt5core, qt5network, catalogueapi_dep]) | |
|
69 | ||
|
63 | 70 | |
|
64 | 71 | |
|
65 | 72 | subdir('tests') |
@@ -1,5 +1,6 | |||
|
1 | 1 | #include "SqpApplication.h" |
|
2 | 2 | |
|
3 | #include <Catalogue/CatalogueController.h> | |
|
3 | 4 | #include <Data/IDataProvider.h> |
|
4 | 5 | #include <DataSource/DataSourceController.h> |
|
5 | 6 | #include <DragAndDrop/DragDropHelper.h> |
@@ -22,6 +23,7 public: | |||
|
22 | 23 | m_NetworkController{std::make_unique<NetworkController>()}, |
|
23 | 24 | m_VisualizationController{std::make_unique<VisualizationController>()}, |
|
24 | 25 | m_DragDropHelper{std::make_unique<DragDropHelper>()}, |
|
26 | m_CatalogueController{std::make_unique<CatalogueController>()}, | |
|
25 | 27 | m_PlotInterractionMode(SqpApplication::PlotsInteractionMode::None), |
|
26 | 28 | m_PlotCursorMode(SqpApplication::PlotsCursorMode::NoCursor) |
|
27 | 29 | { |
@@ -60,6 +62,8 public: | |||
|
60 | 62 | m_VariableControllerThread.setObjectName("VariableControllerThread"); |
|
61 | 63 | m_VisualizationController->moveToThread(&m_VisualizationControllerThread); |
|
62 | 64 | m_VisualizationControllerThread.setObjectName("VsualizationControllerThread"); |
|
65 | m_CatalogueController->moveToThread(&m_CatalogueControllerThread); | |
|
66 | m_CatalogueControllerThread.setObjectName("CatalogueControllerThread"); | |
|
63 | 67 | |
|
64 | 68 | |
|
65 | 69 | // Additionnal init |
@@ -79,6 +83,9 public: | |||
|
79 | 83 | |
|
80 | 84 | m_VisualizationControllerThread.quit(); |
|
81 | 85 | m_VisualizationControllerThread.wait(); |
|
86 | ||
|
87 | m_CatalogueControllerThread.quit(); | |
|
88 | m_CatalogueControllerThread.wait(); | |
|
82 | 89 | } |
|
83 | 90 | |
|
84 | 91 | std::unique_ptr<DataSourceController> m_DataSourceController; |
@@ -86,10 +93,12 public: | |||
|
86 | 93 | std::unique_ptr<TimeController> m_TimeController; |
|
87 | 94 | std::unique_ptr<NetworkController> m_NetworkController; |
|
88 | 95 | std::unique_ptr<VisualizationController> m_VisualizationController; |
|
96 | std::unique_ptr<CatalogueController> m_CatalogueController; | |
|
89 | 97 | QThread m_DataSourceControllerThread; |
|
90 | 98 | QThread m_NetworkControllerThread; |
|
91 | 99 | QThread m_VariableControllerThread; |
|
92 | 100 | QThread m_VisualizationControllerThread; |
|
101 | QThread m_CatalogueControllerThread; | |
|
93 | 102 | |
|
94 | 103 | std::unique_ptr<DragDropHelper> m_DragDropHelper; |
|
95 | 104 | |
@@ -123,10 +132,16 SqpApplication::SqpApplication(int &argc, char **argv) | |||
|
123 | 132 | connect(&impl->m_VisualizationControllerThread, &QThread::finished, |
|
124 | 133 | impl->m_VisualizationController.get(), &VisualizationController::finalize); |
|
125 | 134 | |
|
135 | connect(&impl->m_CatalogueControllerThread, &QThread::started, | |
|
136 | impl->m_CatalogueController.get(), &CatalogueController::initialize); | |
|
137 | connect(&impl->m_CatalogueControllerThread, &QThread::finished, | |
|
138 | impl->m_CatalogueController.get(), &CatalogueController::finalize); | |
|
139 | ||
|
126 | 140 | impl->m_DataSourceControllerThread.start(); |
|
127 | 141 | impl->m_NetworkControllerThread.start(); |
|
128 | 142 | impl->m_VariableControllerThread.start(); |
|
129 | 143 | impl->m_VisualizationControllerThread.start(); |
|
144 | impl->m_CatalogueControllerThread.start(); | |
|
130 | 145 | } |
|
131 | 146 | |
|
132 | 147 | SqpApplication::~SqpApplication() |
@@ -135,7 +135,7 void TestCosinusAcquisition::testAcquisition() | |||
|
135 | 135 | QFETCH(SqpRange, referenceRange); |
|
136 | 136 | CosinusProvider referenceProvider{}; |
|
137 | 137 | auto dataSeries = referenceProvider.provideDataSeries( |
|
138 |
referenceRange, {{COSINUS_TYPE_KEY, "scalar"}, {COSINUS_FREQUENCY_KEY, 10 |
|
|
138 | referenceRange, {{COSINUS_TYPE_KEY, "scalar"}, {COSINUS_FREQUENCY_KEY, 10.}}); | |
|
139 | 139 | |
|
140 | 140 | auto end = dataSeries->cend() - 1; |
|
141 | 141 | qInfo() << dataSeries->nbPoints() << dataSeries->cbegin()->x() << end->x(); |
@@ -156,7 +156,7 void TestCosinusAcquisition::testAcquisition() | |||
|
156 | 156 | sqpApp->timeController().onTimeToUpdate(initialRange); |
|
157 | 157 | auto provider = std::make_shared<CosinusProvider>(); |
|
158 | 158 | auto variable = sqpApp->variableController().createVariable( |
|
159 |
"MMS", {{COSINUS_TYPE_KEY, "scalar"}, {COSINUS_FREQUENCY_KEY, 10 |
|
|
159 | "MMS", {{COSINUS_TYPE_KEY, "scalar"}, {COSINUS_FREQUENCY_KEY, 10.}}, provider); | |
|
160 | 160 | |
|
161 | 161 | |
|
162 | 162 | QFETCH(int, operationDelay); |
General Comments 0
You need to be logged in to leave comments.
Login now