修改一些

This commit is contained in:
2026-08-18 10:50:14 +08:00
parent 4581b3fc05
commit 182fa2232a
26 changed files with 695 additions and 126 deletions
+7 -1
View File
@@ -11,7 +11,6 @@ TEST(Renderive_Qt, WidgetLifecycleDrivesAndStopsKernelScene) {
ASSERT_NE(application, nullptr);
Latency_Eager_Plot plot;
plot.resize(240, 120);
plot.init();
const auto root = plot.root_renderable();
renderive_Owner<Frequency_Axis> x_axis;
renderive_Owner<Axis> y_axis;
@@ -24,7 +23,9 @@ TEST(Renderive_Qt, WidgetLifecycleDrivesAndStopsKernelScene) {
.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);
y_axis = Axis::Builder{}
.set<&Axis::Properties::orientation>(Orientation::Vertical)
.set<&Axis::Properties::x>(20)
@@ -33,13 +34,18 @@ TEST(Renderive_Qt, WidgetLifecycleDrivesAndStopsKernelScene) {
.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)
.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();
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});
plot.show();
QTimer::singleShot(150, application, &QCoreApplication::quit);