首次提交
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#include "AudioFrequent_p.h"
|
||||
#include "../Axis/TimeAxis.h"
|
||||
|
||||
|
||||
namespace YSG {
|
||||
Q_Ptr_cpp(AudioFrequent)
|
||||
PROP_P(AudioFrequent, int, timePointSize)
|
||||
PROP_P(AudioFrequent, TimeAxis*, timeAxis)
|
||||
PROP_P(AudioFrequent, Axis*, valueAxis)
|
||||
PROP_P(AudioFrequent, Range, keyRange)
|
||||
PROP_P(AudioFrequent, QColor, color)
|
||||
|
||||
AudioFrequent::Builder::Builder(TimeAxis* timeAxis, Axis* valueAxis) {
|
||||
ASSERT(timeAxis->mPlot != nullptr, "AudioFrequent build error! timeAxis->mPlot == nullptr");
|
||||
ASSERT(timeAxis->mPlot == valueAxis->mPlot, "AudioFrequent build error! timeAxis->mPlot != valueAxis->mPlot");
|
||||
plot = timeAxis->mPlot;
|
||||
this->timeAxis = timeAxis;
|
||||
this->valueAxis = valueAxis;
|
||||
}
|
||||
AudioFrequent* AudioFrequent::Builder::build() {
|
||||
auto ret = new AudioFrequent();
|
||||
ret->init(plot, layerName);
|
||||
AudioFrequentPrivate* pd = ret->d();
|
||||
AudioFrequentRenderState* sc = pd->renderStateCache();
|
||||
PROP_R(int, timePointSize)
|
||||
PROP_R(TimeAxis*, timeAxis)
|
||||
PROP_R(Axis*, valueAxis)
|
||||
PROP_R(Range, keyRange)
|
||||
PROP_R(QColor, color)
|
||||
return ret;
|
||||
}
|
||||
void AudioFrequent::giveData(int tick, double data) {
|
||||
Q_UNUSED(tick)
|
||||
if(!ok()) return;
|
||||
INIT_SET(AudioFrequent)
|
||||
td->mDataList.push_front(data);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user