From a8b2d1202bbfe8dfe5f13496d397de50994ae7d2 Mon Sep 17 00:00:00 2001 From: wyc <1104749580@qq.com> Date: Thu, 30 Jul 2026 11:21:30 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=9F=E5=8F=8D=E9=A6=88=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=88=90=E5=8A=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/radio/BackEnd/RadioWidget.cpp | 4 ++-- module/radio/component/ProgressBar.h | 14 ++++---------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/module/radio/BackEnd/RadioWidget.cpp b/module/radio/BackEnd/RadioWidget.cpp index ae3e34f..6ddfb92 100644 --- a/module/radio/BackEnd/RadioWidget.cpp +++ b/module/radio/BackEnd/RadioWidget.cpp @@ -25,8 +25,8 @@ static bool radio_show_performance_overlay() { static void configure_radio_plot_perf(renderive::Plot* plot) { if (!radio_mock_perf_mode()) return; - plot->set_render_check_fps(1000); - plot->set_render_schedule_mode(renderive::Plot_Render_Schedule_Mode::Chase_Latest); + plot->set_max_render_fps(1000); + plot->set_render_schedule_mode(renderive::Plot_Render_Schedule_Mode::Feedback); if (radio_show_performance_overlay()) plot->set_use_performance_shower(true); } diff --git a/module/radio/component/ProgressBar.h b/module/radio/component/ProgressBar.h index 3eed36c..1387458 100644 --- a/module/radio/component/ProgressBar.h +++ b/module/radio/component/ProgressBar.h @@ -4,20 +4,17 @@ #include #include #include "../Global.h" - -struct Tick{ +struct Tick { QString text; QColor color; double value = 0; - Tick(QString text, QColor color) : text(std::move(text)), color(std::move(color)){ - QString that = (text[0] == '+' || text[0] == '-' || text[0] == '<' || text[0] == '>') ? text.mid(1) : text; + Tick(QString text, QColor color) : text(std::move(text)), color(std::move(color)) { + QString that = (this->text.startsWith('+') || this->text.startsWith('-') || this->text.startsWith('<') || this->text.startsWith('>')) ? this->text.mid(1) : this->text; value = that.toDouble(); } - Tick(QString text, QColor color, double value) : text(std::move(text)), color(std::move(color)), value(value){ + Tick(QString text, QColor color, double value) : text(std::move(text)), color(std::move(color)), value(value) { } }; - - class Progress_Bar : public QWidget { public: explicit Progress_Bar(const std::vector& tick_list, QWidget *parent = nullptr); @@ -35,6 +32,3 @@ protected: std::vector tick_list; }; #endif - - -