|
ORE Studio 0.0.4
|
Static utility for persisting UI widget state via QSettings. More...
#include <UiPersistence.hpp>

Static Public Member Functions | |
| static void | saveSize (const QString &group, const QWidget *w) |
| Save widget size to settings. | |
| static QSize | restoreSize (const QString &group, const QSize &defaultSize={900, 400}) |
| Restore saved widget size, or return defaultSize if none saved. | |
| static void | saveSplitter (const QString &group, const QSplitter *s) |
| Save splitter position to settings. | |
| static void | restoreSplitter (const QString &group, QSplitter *s) |
| Restore saved splitter position. No-op if no state is saved. | |
| static void | saveHeader (const QString &group, const QHeaderView *h, int version=1) |
| Save table header state (column widths, order, visibility) to settings. | |
| static bool | restoreHeader (const QString &group, QHeaderView *h, int version=1) |
| Restore saved table header state. | |
Static utility for persisting UI widget state via QSettings.
All methods use QSettings("OreStudio", "OreStudio") and store values under the given group name. Methods are composable — callers may save and restore only the subset of state they need.
Typical usage:
|
static |
Save table header state (column widths, order, visibility) to settings.
| version | Bump this when the column layout changes to invalidate old state. |
|
static |
Restore saved table header state.