diff --git a/CMakeLists.txt b/CMakeLists.txt index 13b8805..79ff5be 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,7 +94,6 @@ FILE (GLOB_RECURSE core_SRCS ./include/Network/Downloader.h ./include/Version.h ./include/CoreGlobal.h - ./include/Visualization/VisualizationController.h ./include/PluginManager/PluginManager.h ./include/Variable/VariableModel2.h ./include/Variable/VariableSynchronizationGroup2.h @@ -115,7 +114,6 @@ FILE (GLOB_RECURSE core_SRCS ./src/Common/SignalWaiter.cpp ./src/Network/NetworkController.cpp ./src/Network/Downloader.cpp - ./src/Visualization/VisualizationController.cpp ./src/PluginManager/PluginManager.cpp ./src/Variable/VariableController2.cpp ./src/Variable/VariableModel2.cpp diff --git a/include/Visualization/VisualizationController.h b/include/Visualization/VisualizationController.h deleted file mode 100644 index f106b20..0000000 --- a/include/Visualization/VisualizationController.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef SCIQLOP_VISUALIZATIONCONTROLLER_H -#define SCIQLOP_VISUALIZATIONCONTROLLER_H - -#include "CoreGlobal.h" - -#include -#include -#include -#include -#include - -Q_DECLARE_LOGGING_CATEGORY(LOG_VisualizationController) - -class DataSourceItem; -class Variable2; - -/** - * @brief The VisualizationController class aims to make the link between - * SciQlop and its plugins. This is the intermediate class that SciQlop has to - * use in the way to connect a data source. Please first use register method to - * initialize a plugin specified by its metadata name (JSON plugin source) then - * others specifics method will be able to access it. You can load a data source - * driver plugin then create a data source. - */ -class SCIQLOP_CORE_EXPORT VisualizationController : public QObject -{ - Q_OBJECT -public: - explicit VisualizationController(QObject* parent = 0); - virtual ~VisualizationController(); - -signals: - /// Signal emitted when a variable is about to be deleted from SciQlop - void variableAboutToBeDeleted(std::shared_ptr variable); - - /// Signal emitted when a data acquisition is requested on a range for a - /// variable - void rangeChanged(std::shared_ptr variable, - const DateTimeRange& range); - -public slots: - /// Manage init/end of the controller - void initialize(); - void finalize(); - -private: - void waitForFinish(); - - class VisualizationControllerPrivate; - spimpl::unique_impl_ptr impl; -}; - -#endif // SCIQLOP_VISUALIZATIONCONTROLLER_H diff --git a/src/Visualization/VisualizationController.cpp b/src/Visualization/VisualizationController.cpp deleted file mode 100644 index ded1928..0000000 --- a/src/Visualization/VisualizationController.cpp +++ /dev/null @@ -1,43 +0,0 @@ -#include -#include -#include -#include -#include - -Q_LOGGING_CATEGORY(LOG_VisualizationController, "VisualizationController") - -class VisualizationController::VisualizationControllerPrivate -{ -public: - QMutex m_WorkingMutex; -}; - -VisualizationController::VisualizationController(QObject* parent) - : impl{spimpl::make_unique_impl()} -{ - qCDebug(LOG_VisualizationController()) - << tr("VisualizationController construction") << QThread::currentThread(); -} - -VisualizationController::~VisualizationController() -{ - qCDebug(LOG_VisualizationController()) - << tr("VisualizationController destruction") << QThread::currentThread(); - this->waitForFinish(); -} - -void VisualizationController::initialize() -{ - qCDebug(LOG_VisualizationController()) - << tr("VisualizationController init") << QThread::currentThread(); - impl->m_WorkingMutex.lock(); - qCDebug(LOG_VisualizationController()) - << tr("VisualizationController init END"); -} - -void VisualizationController::finalize() { impl->m_WorkingMutex.unlock(); } - -void VisualizationController::waitForFinish() -{ - QMutexLocker locker{&impl->m_WorkingMutex}; -}