Move serialization and deserialization into NvApp class

This commit is contained in:
Cameron Gutman
2020-05-07 19:54:36 -07:00
parent 350c7d7081
commit dc3c565ec0
5 changed files with 58 additions and 38 deletions
+30
View File
@@ -0,0 +1,30 @@
#pragma once
#include <QSettings>
class NvApp
{
public:
NvApp() {}
explicit NvApp(QSettings& settings);
bool operator==(const NvApp& other) const
{
return id == other.id;
}
bool isInitialized()
{
return id != 0 && !name.isEmpty();
}
void
serialize(QSettings& settings) const;
int id = 0;
QString name;
bool hdrSupported = false;
bool isAppCollectorGame = false;
};
Q_DECLARE_METATYPE(NvApp)