##// END OF EJS Templates
Removes VisualizationController::onVariableCreated() slot...
Removes VisualizationController::onVariableCreated() slot The slot is replaced by a signal that only propagates the VariableController signal. This new signal will be intercepted by the VisualizationWidget to create a new graph from the created variable

File last commit:

r154:ab6272d8de5a
r161:992eeb099247
Show More
VariableController.h
48 lines | 1.2 KiB | text/x-c | CLexer
#ifndef SCIQLOP_VARIABLECONTROLLER_H
#define SCIQLOP_VARIABLECONTROLLER_H
#include <QLoggingCategory>
#include <QObject>
#include <Common/spimpl.h>
class IDataProvider;
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;
signals:
/// Signal emitted when a variable has been created
void variableCreated(std::shared_ptr<Variable> variable);
public slots:
/**
* 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