blob: 388224d65fdf0e1b1652a26d8b265b6f3175ee48 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#pragma once
#include <QSet>
#include <QString>
#include <QFile>
#include "multimc_logic_export.h"
class MULTIMC_LOGIC_EXPORT FtbPrivatePackManager
{
public:
~FtbPrivatePackManager()
{
save();
}
void load();
void save() const;
bool empty() const
{
return currentPacks.empty();
}
const QSet<QString> &getCurrentPackCodes() const
{
return currentPacks;
}
void add(const QString &code)
{
currentPacks.insert(code);
dirty = true;
}
void remove(const QString &code)
{
currentPacks.remove(code);
dirty = true;
}
private:
QSet<QString> currentPacks;
QString m_filename = "private_packs.txt";
mutable bool dirty = false;
};
|