SWMMVis  6.0.0-alpha.4
Qt6/C++ GIS-based graphical user interface for the SWMMVis engine (6.0.0-alpha.4)
Loading...
Searching...
No Matches
chartaxisformatcontroller.h File Reference

Per-chart axis number-format state + "Chart Properties…" launcher. More...

#include "plot/numberformat.h"
#include <QObject>
#include <QPointer>
Include dependency graph for chartaxisformatcontroller.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  openswmmvis::ui::ChartAxisFormatController
 

Namespaces

namespace  openswmmvis
 
namespace  openswmmvis::ui
 

Detailed Description

Per-chart axis number-format state + "Chart Properties…" launcher.

Author
Caleb Buahin caleb.nosp@m..bua.nosp@m.hin@g.nosp@m.mail.nosp@m..com
Date
2026
License\n GPL-3.0-or-later

The editor charts (curve / pattern / timeseries / scatter / hydrograph / transect) each own one of these. It holds the persistent X/Y axis NumberFormat (decimals vs. significant figures, digit count, optional custom printf override), seeded from the global PreferencesManager defaults, and:

  • apply() pushes the current formats onto every QValueAxis of the bound chart (call it after a (re)build that recreates axes);
  • setChart() rebinds to a freshly-rebuilt chart and re-applies;
  • openDialog() opens the shared ChartPropertiesDialog seeded from the stored formats, writing any edits back here so they survive replots.

Persisting the format on the controller (not on the transient ChartProperties the dialog owns) is what lets a per-chart choice stick across the editors' replot cycles.