#include "operator.h" void Operator::init(int modelType, int signalType, const QMap ¶ms) { // 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 ""; }