2024-09-29 17:29:10 +03:00
|
|
|
#pragma once
|
|
|
|
|
2024-10-05 00:03:50 +03:00
|
|
|
#include <QList>
|
|
|
|
#include <QString>
|
|
|
|
|
2024-09-29 17:29:10 +03:00
|
|
|
#include "library.hpp"
|
|
|
|
#include "ui_prefs.hpp"
|
|
|
|
|
|
|
|
class KotoConfig {
|
2024-10-05 00:03:50 +03:00
|
|
|
public:
|
|
|
|
KotoConfig();
|
|
|
|
static KotoConfig& instance();
|
|
|
|
static KotoConfig* create() { return &instance(); }
|
|
|
|
void save();
|
|
|
|
|
|
|
|
QString getConfigDirPath();
|
|
|
|
QList<KotoLibraryConfig*> getLibraries();
|
|
|
|
KotoUiPreferences* getUiPreferences();
|
2024-09-29 17:29:10 +03:00
|
|
|
|
2024-10-05 00:03:50 +03:00
|
|
|
private:
|
|
|
|
void bootstrap();
|
|
|
|
void parseConfigFile(std::string filePath);
|
2024-09-29 17:29:10 +03:00
|
|
|
|
2024-10-05 00:03:50 +03:00
|
|
|
QString i_configDirPath;
|
|
|
|
QString i_configPath;
|
|
|
|
QList<KotoLibraryConfig*> i_libraries;
|
|
|
|
KotoUiPreferences* i_uiPreferences;
|
2024-09-29 17:29:10 +03:00
|
|
|
};
|