#pragma once #include "../Axis/Abs_Axis.h" #include "../GlobalTypes.h" #include namespace YSG { class Time_Axis; struct Audio_Frequent_Private; class LIB_DECL Audio_Frequent : public Renderable { public: Audio_Frequent_Private* d(); Render_Data* create_render_data() override; Render_State* create_render_state() override; Input_Data* create_input_data() override; protected: Audio_Frequent(); friend struct Audio_Frequent_Private; friend struct Audio_Frequent_Render_State; friend struct Audio_Frequent_Input_Data; public: void give_data(int tick, double data); PROP(int, time_point_size) PROP(Time_Axis*, time_axis) PROP(Axis*, value_axis) PROP(Range, key_range) PROP(QColor, color) struct Builder; }; struct AudioFrequent_Prop { int time_point_size = 100; Time_Axis* time_axis; Axis* value_axis{}; Range key_range = {0, 20}; QColor color = Qt::yellow; }; struct LIB_DECL Audio_Frequent::Builder : AudioFrequent_Prop { PROP_B(int, time_point_size) PROP_B(Time_Axis*, time_axis) PROP_B(Axis*, value_axis) PROP_B(Range, key_range) PROP_B(QColor, color) SETTER(QString, layerName, "plottable") Builder(Time_Axis* time_axis, Axis* value_axis); Audio_Frequent* build(); protected: Axis* value_axis; Time_Axis* time_axis{}; Plot* plot{}; }; }