--- a/qmlfrontend/gameconfig.h Sun Dec 24 00:44:16 2017 +0100
+++ b/qmlfrontend/gameconfig.h Sun Dec 24 16:56:22 2017 +0100
@@ -1,17 +1,27 @@
#ifndef GAMECONFIG_H
#define GAMECONFIG_H
-#include <QObject>
+#include <QList>
+#include <QVector>
-class GameConfig : public QObject
-{
- Q_OBJECT
+class GameConfig {
public:
- explicit GameConfig(QObject *parent = nullptr);
+ explicit GameConfig();
+
+ const char** argv() const;
+ int argc() const;
+ const QList<QByteArray> config();
-signals:
+ void clear();
+ void cmdSeed(const QByteArray& seed);
+ void cmdMapgen(int mapgen);
-public slots:
+private:
+ mutable QVector<const char*> m_argv;
+ QList<QByteArray> m_arguments;
+ QList<QByteArray> m_cfg;
+
+ void cfgAppend(const QByteArray& cmd);
};
-#endif // GAMECONFIG_H
\ No newline at end of file
+#endif // GAMECONFIG_H