Add recent projects to Bonsai Viewer

Replace the "Open Recent coming soon" placeholder with a working
most-recently-used project list. RecentProjects persists .ifcfed paths
via QSettings, capped and pruned to existing files. The Open Recent
ribbon button now shows a popup menu of recent projects; every
successful open or save (local or cloud) records an entry.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Dion Moult
2026-05-20 15:52:47 +10:00
parent 8734b419e5
commit 4913b84af7
7 changed files with 203 additions and 2 deletions
+4
View File
@@ -27,6 +27,7 @@
class QLabel;
class QDockWidget;
class QMenu;
class QProgressBar;
class QStackedWidget;
class QToolButton;
@@ -61,6 +62,9 @@ private:
QWidget* buildPanelsRibbonPage();
void updateWindowTitle();
QToolButton* makePanelToggle(const QString& text, QDockWidget* dock);
// Rebuilds `menu` from the persisted recent-projects list. Wired to the
// menu's aboutToShow so it always reflects the current MRU state.
void populateRecentMenu(QMenu* menu);
private:
QLabel* status_mode_label_ = nullptr;