Files
Renderive/YSGraphic_Core/plottable/WaterFall.h
T
2026-06-16 13:33:27 +08:00

42 lines
1.4 KiB
C++

#pragma once
#include "HoverInfo.h"
namespace YSG {
struct WaterFallPrivate;
class FrequentAxis;
class TimeAxis;
// 如果timeAxis是竖轴,并且timePointSize 和竖着的像素点数没倍数关系,那么随机数整体看着会闪烁
// 如果和竖着的像素有倍数关系,但是timePointSize 是奇数,那么看着中间会闪烁
class LIB_DECL WaterFall : public RenderAble, public HoverInfoRenderAble<WaterFall>{
public:
Q_Ptr2(WaterFall)
void giveData(int tick, const QVector<double>& data);
PROP(FrequentAxis*, frequentAxis)
PROP(TimeAxis*, timeAxis)
PROP(Range, frequentRange)
PROP(Range, powerRange)
PROP(int, frequentPointSize)
struct Builder;
};
struct WaterFall_Prop {
FrequentAxis *frequentAxis{};
TimeAxis *timeAxis{};
Range frequentRange{0, 10};
Range powerRange{0, 10};
int frequentPointSize{};
int tickSpace = 50;
};
struct LIB_DECL WaterFall::Builder : WaterFall_Prop {
PROP_B(FrequentAxis*, frequentAxis)
PROP_B(TimeAxis*, timeAxis)
PROP_B(Range, frequentRange)
PROP_B(Range, powerRange)
PROP_B(int, frequentPointSize)
SETTER(QString, layerName, "plottable")
Builder(FrequentAxis* frequentAxis, TimeAxis* timeAxis);
WaterFall* build();
protected:
Plot *plot{};
};
}