-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.h
42 lines (37 loc) · 1.05 KB
/
settings.h
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
41
42
#ifndef SETTINGS_H
#define SETTINGS_H
#include <QMap>
#include <QObject>
class Settings : public QObject
{
Q_OBJECT
public:
explicit Settings(QObject *parent = nullptr);
bool readConfig();
const QString &getDataDir() const;
const QString &getTempDir() const;
const QString &getRedisIP() const;
int getRedisPort() const;
const QString &getDatabaseName() const;
const QString &getDatabaseUser() const;
const QString &getDatabaseHost() const;
const QString &getDatabasePass() const;
int getSpjTimeLimit() const;
int getcompileTimeLimit() const;
bool checkLanguage(const QString &) const;
const QString &getExt(const QString &) const;
const QString &getCommand(const QString &) const;
private:
QString dataDir;
QString tempDir;
QString redisIP;
int redisPort;
QString databaseName;
QString databaseUser;
QString databaseHost;
QString databasePass;
int spjTimeLimit;
int compileTimeLimit;
QMap<QString, QPair<QString, QString>> compilers;
};
#endif // SETTINGS_H