QSettingsStore.h header
#include <ew/app/QSettingsStore.h>
Namespace ew::app
QSettingsStore class
class ew::app::QSettingsStore
A persistent Settings implementation backed by QSettings, so application preferences – window geometry, dock layout, the recent-projects list, AI configuration, and so on – survive across runs. The default constructor uses the platform's native per-user store for the current QCoreApplication organization and application names; the file constructor targets an explicit INI file, which tests use for isolation and which also enables a portable configuration.
Members
ew::app::QSettingsStore::QSettingsStore()
Opens the platform's native per-user settings for the running application's organization and application names (set on the QCoreApplication).
ew::app::QSettingsStore::QSettingsStore(const QString &filePath)
Opens settings backed by the INI file at filePath, created on first write.
std::optional< QString > ew::app::QSettingsStore::value(QStringView key) const override
Returns the value stored for key, or std::nullopt if none is set.
void ew::app::QSettingsStore::setValue(QStringView key, const QString &value) override
Stores value under key, replacing any existing value.
bool ew::app::QSettingsStore::contains(QStringView key) const override
Returns true if a value is stored for key.
void ew::app::QSettingsStore::remove(QStringView key) override
Removes the value stored for key, if any.
void ew::app::QSettingsStore::sync()
Flushes any pending writes to persistent storage. QSettings also syncs on destruction and periodically; call this to force a write immediately (for example before a screenshot test reopens the same file).