Skip to content

Migrate PropDashboardDialog to PersistentDialog (#2679 follow-up 1/3) #2767

Description

@ten9876

Context

Part of #2679 (umbrella PersistentDialog migrations). Reference implementation: PR #2742 (migrated ProfileImportExportDialog).

What to do

Migrate `src/gui/PropDashboardDialog.{cpp,h}` from `QDialog` to inherit from `PersistentDialog`, following the exact recipe used in PR #2742.

File sizes (for context):

  • `PropDashboardDialog.cpp` — 1164 lines
  • `PropDashboardDialog.h` — 82 lines

Why this one first: smallest of the three remaining dialogs and has no inline-construction complications.

Recipe (copy from PR #2742)

  1. Header — replace `: public QDialog` with `: public PersistentDialog`, drop `m_titleBar`/`m_bodyLayout` members and the `setFramelessMode` declaration.
  2. Constructor — change initializer list to `: PersistentDialog("Propagation Dashboard", "PropDashboardDialogGeometry", parent)`, drop the manual frameless-chrome setup, build dialog content into `bodyWidget()` instead of a hand-rolled body widget.
  3. Drop the standalone `setFramelessMode` method — base class provides it.
  4. `closeEvent` — forward to `PersistentDialog::closeEvent` instead of `QDialog::closeEvent`.
  5. `MainWindow.cpp` — change the lazy-construct block at line 5517-5527 to a single `showOrRaisePersistent(m_propDashboardDialog, m_propForecast)` call.
  6. `MainWindow.cpp` — remove the `qobject_cast` branch at line 11628 from `setFramelessWindow()` — base class auto-propagates via `m_persistentDialogs` registry.
  7. `MainWindow.h` — change `QPointer m_propDashboardDialog;` at line 495 to `QPointer m_propDashboardDialog;`.

AppSettings geometry key

Use `PropDashboardDialogGeometry` (PascalCase, matches existing convention).

Acceptance criteria

  • `PropDashboardDialog` inherits from `PersistentDialog`.
  • `m_propDashboardDialog` is typed `QPointer` (no `QDialog` fallback).
  • Lazy-construct site uses `showOrRaisePersistent`.
  • `setFramelessWindow()` no longer has an explicit `qobject_cast` branch.
  • Geometry persists across launches under AppSettings key `PropDashboardDialogGeometry`.
  • No behavior change in the propagation dashboard's content (panels, charts, refresh logic).

Pickup

Mechanical migration matching PR #2742's recipe. AetherClaude-eligible.

73, Jeremy KK7GWY & Claude (AI dev partner)

Metadata

Metadata

Assignees

No one assigned

    Labels

    GUIUser interfaceenhancementImprovement to existing featuremaintainer-reviewRequires maintainer review before any action is takenrefactorCode cleanup, restructuring, or consolidation — no user-visible behavior change

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions