DataSeriesType.h
35 lines
| 659 B
| text/x-c
|
CLexer
r0 | #ifndef SCIQLOP_DATASERIESTYPE_H | |||
#define SCIQLOP_DATASERIESTYPE_H | ||||
#include <QString> | ||||
r60 | enum class DataSeriesType | |||
{ | ||||
r62 | NONE, | |||
r60 | SCALAR, | |||
VECTOR, | ||||
r62 | SPECTROGRAM | |||
r60 | }; | |||
r0 | ||||
r60 | struct DataSeriesTypeUtils | |||
{ | ||||
static DataSeriesType fromString(const QString& type) | ||||
{ | ||||
if(type.toLower() == QStringLiteral("scalar")) | ||||
{ return DataSeriesType::SCALAR; } | ||||
else if(type.toLower() == QStringLiteral("spectrogram")) | ||||
{ | ||||
return DataSeriesType::SPECTROGRAM; | ||||
} | ||||
else if(type.toLower() == QStringLiteral("vector")) | ||||
{ | ||||
return DataSeriesType::VECTOR; | ||||
} | ||||
else | ||||
r0 | { | |||
r62 | return DataSeriesType::NONE; | |||
r0 | } | |||
r60 | } | |||
r0 | }; | |||
#endif // SCIQLOP_DATASERIESTYPE_H | ||||