##// END OF EJS Templates
Makes the connection between Variable controller and Visualization controller...
Makes the connection between Variable controller and Visualization controller - Adds a slot in the visualization controller to be warned that a variable has been created - Connects the slot to the signal of the variable controller when that is emitted after variable creation

File last commit:

r154:ab6272d8de5a
r158:a3d07f8af710
Show More
VariableController.h
48 lines | 1.2 KiB | text/x-c | CLexer
/ core / include / Variable / VariableController.h
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r106 #ifndef SCIQLOP_VARIABLECONTROLLER_H
#define SCIQLOP_VARIABLECONTROLLER_H
#include <QLoggingCategory>
#include <QObject>
#include <Common/spimpl.h>
Alexandre Leroux
Updates VariableController::createVariable() method...
r154 class IDataProvider;
Alexandre Leroux
Adds Variable model in the Variable controller
r108 class Variable;
Alexandre Leroux
Affects model to the Variable Widget
r143 class VariableModel;
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r106 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();
Alexandre Leroux
Updates VariableController::createVariable() method...
r154 VariableModel *variableModel() noexcept;
signals:
/// Signal emitted when a variable has been created
void variableCreated(std::shared_ptr<Variable> variable);
public slots:
Alexandre Leroux
Adds Variable model in the Variable controller
r108 /**
Alexandre Leroux
Updates VariableController::createVariable() method...
r154 * Creates a new variable and adds it to the model
Alexandre Leroux
Adds Variable model in the Variable controller
r108 * @param name the name of the new variable
Alexandre Leroux
Updates VariableController::createVariable() method...
r154 * @param provider the data provider for the new variable
Alexandre Leroux
Adds Variable model in the Variable controller
r108 */
Alexandre Leroux
Updates VariableController::createVariable() method...
r154 void createVariable(const QString &name, std::shared_ptr<IDataProvider> provider) noexcept;
Alexandre Leroux
Adds Variable model in the Variable controller
r108
Alexandre Leroux
Inits variable controller and adds it to the SciQlop app
r106 void initialize();
void finalize();
private:
void waitForFinish();
class VariableControllerPrivate;
spimpl::unique_impl_ptr<VariableControllerPrivate> impl;
};
#endif // SCIQLOP_VARIABLECONTROLLER_H