qmlfrontend/gameconfig.h
author unc0rr
Wed, 10 Jan 2018 23:49:47 +0100
branchqmlfrontend
changeset 12890 9c259fb4d405
parent 12863 fe16fa088b69
permissions -rw-r--r--
Pass mouse movements to engine, warp cursor in frontend
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12858
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
     1
#ifndef GAMECONFIG_H
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
     2
#define GAMECONFIG_H
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
     3
12859
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
     4
#include <QList>
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
     5
#include <QVector>
12858
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
     6
12863
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12861
diff changeset
     7
#include "team.h"
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12861
diff changeset
     8
12859
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
     9
class GameConfig {
12858
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
    10
public:
12859
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    11
    explicit GameConfig();
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    12
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    13
    const char** argv() const;
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    14
    int argc() const;
12860
e33bcb9d5e9c Preview rendering seems to work now
unc0rr
parents: 12859
diff changeset
    15
    const QList<QByteArray> config() const;
12858
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
    16
12859
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    17
    void clear();
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    18
    void cmdSeed(const QByteArray& seed);
12863
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12861
diff changeset
    19
    void cmdTheme(const QByteArray& theme);
12859
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    20
    void cmdMapgen(int mapgen);
12863
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12861
diff changeset
    21
    void cmdTeam(const Team& team);
12858
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
    22
12863
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12861
diff changeset
    23
    bool isPreview() const;
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12861
diff changeset
    24
    void setPreview(bool isPreview);
12861
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12860
diff changeset
    25
12859
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    26
private:
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    27
    mutable QVector<const char*> m_argv;
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    28
    QList<QByteArray> m_arguments;
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    29
    QList<QByteArray> m_cfg;
12863
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12861
diff changeset
    30
    QList<Team> m_teams;
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12861
diff changeset
    31
    bool m_isPreview;
12859
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    32
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    33
    void cfgAppend(const QByteArray& cmd);
12858
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
    34
};
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents:
diff changeset
    35
12859
a03f245243b0 And more refactoring...
unc0rr
parents: 12858
diff changeset
    36
#endif // GAMECONFIG_H