25 lines
562 B
C++
25 lines
562 B
C++
#pragma once
|
|
|
|
#include <functional>
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
|
|
class TimeAction : public QObject {
|
|
public:
|
|
TimeAction(QObject* parent = nullptr);
|
|
TimeAction(std::vector<std::pair<double, int>> data, const QString& path, QObject* parent = nullptr);
|
|
~TimeAction() override;
|
|
|
|
static TimeAction* LoadFromFile(const QString& path, QObject* parent = nullptr);
|
|
|
|
const QString& GetPath() const {
|
|
return path_;
|
|
}
|
|
|
|
int GetValue(double t) const;
|
|
|
|
private:
|
|
std::vector<std::pair<double, int>> data_;
|
|
QString path_;
|
|
}; |