修改一些

This commit is contained in:
2026-08-18 11:09:48 +08:00
parent 182fa2232a
commit 704a6f02ff
36 changed files with 235 additions and 261 deletions
+2 -9
View File
@@ -11,7 +11,6 @@ TEST(Renderive_Qt, WidgetLifecycleDrivesAndStopsKernelScene) {
ASSERT_NE(application, nullptr);
Latency_Eager_Plot plot;
plot.resize(240, 120);
const auto root = plot.root_renderable();
renderive_Owner<Frequency_Axis> x_axis;
renderive_Owner<Axis> y_axis;
renderive_Owner<Spectrum> spectrum;
@@ -21,8 +20,6 @@ TEST(Renderive_Qt, WidgetLifecycleDrivesAndStopsKernelScene) {
.set<&Frequency_Axis::Properties::y>(100)
.set<&Frequency_Axis::Properties::pixel_length>(200)
.set<&Frequency_Axis::Properties::coordinates>(Range{0.0, 10.0})
.set_paint_rely({root})
.set_render_rely({root})
.set_object_name("X Axis")
.build();
plot.add_renderable(x_axis);
@@ -32,18 +29,14 @@ TEST(Renderive_Qt, WidgetLifecycleDrivesAndStopsKernelScene) {
.set<&Axis::Properties::y>(10)
.set<&Axis::Properties::pixel_length>(90)
.set<&Axis::Properties::coordinates>(Range{1.0, 0.0})
.set_paint_rely({root})
.set_render_rely({root})
.set_object_name("Y Axis")
.build();
plot.add_renderable(y_axis);
spectrum = Spectrum::Builder(x_axis, y_axis)
spectrum = Spectrum::Builder{}
.set<&Spectrum::Properties::frequency_range>(Range{0.0, 10.0})
.set<&Spectrum::Properties::frequency_point_size>(8)
.set_paint_rely({root})
.set_render_rely({root})
.set_object_name("Spectrum")
.build();
.build(x_axis, y_axis);
plot.add_renderable(spectrum);
plot.init();
spectrum->update_samples(std::vector<double>{0.1, 0.3, 0.8, 0.5, 0.9, 0.4, 0.2, 0.7});