mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 19:07:57 +00:00
Add performance stats overlay in status bar
Show FPS, frame time, visible/total objects, and visible/total triangles in the status bar. Toggled via Settings > Show Performance Stats, persisted in app settings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include "SettingsWindow.h"
|
||||
#include "AppSettings.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QDialogButtonBox>
|
||||
#include <QFormLayout>
|
||||
#include <QLineEdit>
|
||||
@@ -40,6 +41,9 @@ void SettingsWindow::setupUi() {
|
||||
geometry_library_edit_->setMinimumWidth(280);
|
||||
form->addRow("Geometry Library", geometry_library_edit_);
|
||||
|
||||
show_stats_check_ = new QCheckBox(this);
|
||||
form->addRow("Show Performance Stats", show_stats_check_);
|
||||
|
||||
auto* button_box = new QDialogButtonBox(
|
||||
QDialogButtonBox::Ok | QDialogButtonBox::Cancel, this);
|
||||
|
||||
@@ -60,9 +64,11 @@ void SettingsWindow::showEvent(QShowEvent* event) {
|
||||
|
||||
void SettingsWindow::syncFromSettings() {
|
||||
geometry_library_edit_->setText(AppSettings::instance().geometryLibrary());
|
||||
show_stats_check_->setChecked(AppSettings::instance().showStats());
|
||||
}
|
||||
|
||||
void SettingsWindow::onAccepted() {
|
||||
AppSettings::instance().setGeometryLibrary(geometry_library_edit_->text());
|
||||
AppSettings::instance().setShowStats(show_stats_check_->isChecked());
|
||||
accept();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user