Variable.h
35 lines
| 842 B
| text/x-c
|
CLexer
|
r107 | #ifndef SCIQLOP_VARIABLE_H | ||
#define SCIQLOP_VARIABLE_H | ||||
|
r151 | #include <Common/spimpl.h> | ||
|
r158 | #include <QObject> | ||
|
r152 | class IDataSeries; | ||
|
r151 | class QString; | ||
|
r107 | |||
/** | ||||
|
r151 | * @brief The Variable class represents a variable in SciQlop. | ||
|
r107 | */ | ||
|
r151 | class Variable { | ||
public: | ||||
explicit Variable(const QString &name, const QString &unit, const QString &mission); | ||||
QString name() const noexcept; | ||||
QString mission() const noexcept; | ||||
QString unit() const noexcept; | ||||
|
r107 | |||
|
r152 | void addDataSeries(std::unique_ptr<IDataSeries> dataSeries) noexcept; | ||
|
r169 | /// @return the data of the variable, nullptr if there is no data | ||
IDataSeries *dataSeries() const noexcept; | ||||
|
r151 | private: | ||
class VariablePrivate; | ||||
spimpl::unique_impl_ptr<VariablePrivate> impl; | ||||
|
r107 | }; | ||
|
r158 | // Required for using shared_ptr in signals/slots | ||
Q_DECLARE_METATYPE(std::shared_ptr<Variable>) | ||||
|
r107 | #endif // SCIQLOP_VARIABLE_H | ||