MinetestLauncher/profile.h

34 lines
602 B
C
Raw Permalink Normal View History

2016-02-05 18:32:20 -08:00
#ifndef PROFILE_H
#define PROFILE_H
#include <QString>
#include <QDir>
#include <QJsonObject>
2016-05-16 14:42:05 -07:00
#include <QTabWidget>
#include "processui.h"
2016-02-05 18:32:20 -08:00
using namespace std;
class Profile
{
public:
Profile(QString, QString);
2016-05-16 20:28:44 -07:00
static Profile fromJson(QJsonValue);
2016-05-16 14:42:05 -07:00
QJsonObject toJson();
2016-02-05 18:32:20 -08:00
QDir getPath();
QString getName() { return name; }
QString getVersion() { return version; }
2016-05-16 14:42:05 -07:00
void play(QTabWidget*);
2016-02-05 18:32:20 -08:00
private:
2016-05-16 14:42:05 -07:00
void build();
void start();
bool created = false;
2016-02-05 18:32:20 -08:00
QDir prefix = QDir(QDir::home().filePath(".minetest"));
QString name, version;
};
#endif // PROFILE_H