##// END OF EJS Templates
Fix the cosinus bug....
Fix the cosinus bug. The provider now works on the variable controller thread instead of the main thread. That means the visu is still usable during zoom operation

File last commit:

r276:3a08c66e4df2
r276:3a08c66e4df2
Show More
VariableController.h
57 lines | 1.4 KiB | text/x-c | CLexer
#ifndef SCIQLOP_VARIABLECONTROLLER_H
#define SCIQLOP_VARIABLECONTROLLER_H
#include <Data/SqpDateTime.h>
#include <QLoggingCategory>
#include <QObject>
#include <Common/spimpl.h>
class IDataProvider;
class TimeController;
class Variable;
class VariableModel;
Q_DECLARE_LOGGING_CATEGORY(LOG_VariableController)
/**
* @brief The VariableController class aims to handle the variables in SciQlop.
*/
class VariableController : public QObject {
Q_OBJECT
public:
explicit VariableController(QObject *parent = 0);
virtual ~VariableController();
VariableModel *variableModel() noexcept;
void setTimeController(TimeController *timeController) noexcept;
signals:
/// Signal emitted when a variable has been created
void variableCreated(std::shared_ptr<Variable> variable);
public slots:
/// Request the data loading of the variable whithin dateTime
void onRequestDataLoading(std::shared_ptr<Variable> variable, const SqpDateTime &dateTime);
/**
* Creates a new variable and adds it to the model
* @param name the name of the new variable
* @param provider the data provider for the new variable
*/
void createVariable(const QString &name, std::shared_ptr<IDataProvider> provider) noexcept;
void initialize();
void finalize();
private:
void waitForFinish();
class VariableControllerPrivate;
spimpl::unique_impl_ptr<VariableControllerPrivate> impl;
};
#endif // SCIQLOP_VARIABLECONTROLLER_H