首次提交
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
#include "WaterFall_p.h"
|
||||
#include "../base/Plot.h"
|
||||
|
||||
|
||||
namespace YSG {
|
||||
Q_Ptr_cpp(WaterFall)
|
||||
PROP_P(WaterFall, FrequentAxis*, frequentAxis)
|
||||
PROP_P(WaterFall, TimeAxis*, timeAxis)
|
||||
PROP_P(WaterFall, Range, frequentRange)
|
||||
PROP_P(WaterFall, Range, powerRange)
|
||||
PROP_P(WaterFall, int, frequentPointSize)
|
||||
|
||||
void WaterFall::giveData(int tick, const QVector<double>& data) {
|
||||
if(!ok()) return;
|
||||
INIT_SET(WaterFall)
|
||||
td->mDataList.push_back({tick, data});
|
||||
}
|
||||
|
||||
WaterFall::Builder::Builder(FrequentAxis* frequentAxis, TimeAxis* timeAxis) {
|
||||
ASSERT(frequentAxis->mPlot != nullptr, "Afterglow build error! frequentAxis->mPlot == nullptr");
|
||||
ASSERT(frequentAxis->mPlot == timeAxis->mPlot, "Afterglow build error! frequentAxis->mPlot != timeAxis->mPlot");
|
||||
plot = frequentAxis->mPlot;
|
||||
this->frequentAxis = frequentAxis;
|
||||
this->timeAxis = timeAxis;
|
||||
}
|
||||
WaterFall* WaterFall::Builder::build() {
|
||||
auto ret = new WaterFall();
|
||||
ret->init(plot, layerName);
|
||||
WaterFallPrivate* pd = ret->d();
|
||||
WaterFallRenderState* sc = pd->renderStateCache();
|
||||
PROP_R(FrequentAxis*, frequentAxis)
|
||||
PROP_R(TimeAxis*, timeAxis)
|
||||
PROP_R(Range, frequentRange)
|
||||
PROP_R(Range, powerRange)
|
||||
PROP_R(int, frequentPointSize)
|
||||
return ret;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user