48 lines
1.3 KiB
C++
48 lines
1.3 KiB
C++
#ifndef SETTINGS_H
|
|
#define SETTINGS_H
|
|
|
|
#include <QXmlStreamReader>
|
|
#include <QFile>
|
|
#include <QMessageBox>
|
|
#include <QSet>
|
|
#include <QDebug>
|
|
#include <QSettings>
|
|
|
|
#include "medialibrary.h"
|
|
#include "audiowidget.h"
|
|
#include "defines.h"
|
|
|
|
class Settings : public QSettings
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
Settings(QObject *parent = nullptr);
|
|
~Settings();
|
|
static Settings *getInstance(QObject *parent = nullptr);
|
|
inline QSet<int> getUniverses() { return m_universe; }
|
|
inline QString getPathMedia() { return m_pathmedia; }
|
|
inline void setPathMedia(QString new_path) { m_pathmedia = new_path; };
|
|
inline QList<dmxSetting> getDmxSettings() { return m_settings; }
|
|
inline int getLayersNumber() { return m_layersNumber; }
|
|
inline uint *getAudioDeviceId() { return m_audioDeviceId; }
|
|
inline uint getAudioDeviceQty() { return m_audioDeviceQty; }
|
|
inline bool getShowUi() { return m_ui; }
|
|
void readFile();
|
|
void readFromFile(QString file);
|
|
void printSettings();
|
|
void settingsLoader();
|
|
void settingsSaver();
|
|
|
|
private:
|
|
static Settings *_instance;
|
|
QList<dmxSetting> m_settings;
|
|
QString m_pathmedia;
|
|
uint m_audioDeviceId[MAX_AUDIODEVICES];
|
|
uint m_audioDeviceQty;
|
|
QSet<int> m_universe;
|
|
int m_layersNumber;
|
|
bool m_ui;
|
|
};
|
|
|
|
#endif // SETTINGS_H
|