You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
806 B

#include "operator.h"
void Operator::init(int modelType, int signalType, const QMap<QString, QVariant> &params) {
// TODO
_modeType = modelType;
_signalType = signalType;
_params = params;
_deduceMotionLib();
_deduceSignalLib();
}
void Operator::_deduceMotionLib() {
// TODO
_motionLib = "";
}
void Operator::_deduceSignalLib() {
// TODO
_signalLib = "";
}
void Operator::update() {
// TODO 加载库并执行
}
QVariant Operator::report(int beat) {
if (shouldUpdate()) {
update();
}
return _states.at(beat);
}
bool Operator::shouldUpdate() {
return _hash() == _paramsHash;
}
QString Operator::_hash() {
// TODO 对参数排序求hash
// QCryptographicHash::hash (_params, QCryptographicHash::Md5 )
return "";
}