feat(gui): add PersistentDialog base class + migrate Profile Manager (#2605)#2644
Merged
Conversation
…2605) Collapses the lazy-construct + non-modal + geometry-persist + frameless- chrome boilerplate shared by every persistent dialog in MainWindow into a single base class. Subclasses fill in their content via bodyWidget() and the base owns: * The outer (titleBar + bodyWidget) layout and frameless title-bar widget. * FramelessResizer installation (8-axis resize on the top-level window). * setFramelessMode(bool) — flips Qt::FramelessWindowHint while preserving geometry and toggles the custom title bar / body margins. * Geometry persistence under an AppSettings key. Save fires on close (canonical, disk-flushed) AND on move/resize (in-memory, crash-resilient — matches ProfileManagerDialog's existing contract). Restore deferred to first showEvent() so subclasses can call setMinimumSize() in their ctor without the just-restored geometry being clipped. MainWindow gains a showOrRaisePersistent<T>(slot, ctorArgs...) template that collapses the ~10-line menu-callback boilerplate to one line and auto-registers each dialog in m_persistentDialogs. setFramelessWindow() walks that list instead of carrying an explicit qobject_cast branch per dialog — new persistent dialogs propagate automatically. Migrates ProfileManagerDialog as the pilot per the issue's migration plan: -95 LOC of removed boilerplate, the explicit setFramelessWindow() branch gone, behavior preserved (the same "ProfileManagerDialogGeometry" key keeps prior sessions' saved geometry intact). Principle V.
The header refactor in 137da71 introduced an inline forward declaration "class QTabWidget* m_tabs;" inside namespace AetherSDR — which declares AetherSDR::QTabWidget (a new incomplete type) rather than referencing the global ::QTabWidget. The .cpp then used operations on the incomplete type, breaking the build on every platform. Move the forward declaration outside the namespace alongside the other Qt class forward-decls (QLineEdit, QListWidget, QPushButton, QCheckBox). Co-Authored-By: AetherClaude <aethersdr-agent@users.noreply.github.com> Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Resolves MainWindow.cpp conflict in setFramelessWindow(). The PR removes the m_profileManagerDialog->setFramelessMode(on) call (Profile Manager is now a PersistentDialog subclass and auto-propagates via m_persistentDialogs). Main added m_profileImportExportDialog-> setFramelessMode(on) from PR #2641 — Profile Import/Export is NOT yet migrated to PersistentDialog, so its explicit cast stays.
ten9876
approved these changes
May 14, 2026
ten9876
left a comment
Collaborator
There was a problem hiding this comment.
Approved. PersistentDialog base class consolidates the lazy-construct + non-modal + geometry-persist + frameless-chrome boilerplate that's been hand-rolled across 7+ dialogs. Architecture clean — base owns the FramelessWindowTitleBar / FramelessResizer / setFramelessMode / move-resize-close events / base64 geometry round-trip / deferred-restore lifecycle, subclasses just install their content via bodyWidget(). m_persistentDialogs registry + showOrRaisePersistent template helper eliminate per-dialog qobject_cast branches in setFramelessWindow. Profile Manager migration is strictly subtractive — 99 LOC removed. All CI green including check-windows after the merges with main.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #2605
What was changed
feat(gui): add PersistentDialog base class + migrate Profile Manager (#2605)
Files modified
CMakeLists.txtsrc/gui/MainWindow.cppsrc/gui/MainWindow.hsrc/gui/PersistentDialog.cppsrc/gui/PersistentDialog.hsrc/gui/ProfileManagerDialog.cppsrc/gui/ProfileManagerDialog.hGenerated by AetherClaude (automated agent for AetherSDR)