Add header API prototypes
This commit is contained in:
parent
fd88184b47
commit
690e19e05a
2 changed files with 149 additions and 0 deletions
|
@ -181,6 +181,29 @@ public:
|
|||
Q_INVOKABLE void setMainTab(int index);
|
||||
Q_INVOKABLE int getMapViewTab();
|
||||
Q_INVOKABLE void setMapViewTab(int index);
|
||||
bool gameStringToBool(QString s);
|
||||
Q_INVOKABLE QString getSong();
|
||||
Q_INVOKABLE void setSong(QString song);
|
||||
Q_INVOKABLE QString getLocation();
|
||||
Q_INVOKABLE void setLocation(QString location);
|
||||
Q_INVOKABLE bool getRequiresFlash();
|
||||
Q_INVOKABLE void setRequiresFlash(bool require);
|
||||
Q_INVOKABLE QString getWeather();
|
||||
Q_INVOKABLE void setWeather(QString weather);
|
||||
Q_INVOKABLE QString getType();
|
||||
Q_INVOKABLE void setType(QString type);
|
||||
Q_INVOKABLE QString getBattleScene();
|
||||
Q_INVOKABLE void setBattleScene(QString battleScene);
|
||||
Q_INVOKABLE bool getShowLocationName();
|
||||
Q_INVOKABLE void setShowLocationName(bool show);
|
||||
Q_INVOKABLE bool getAllowRunning();
|
||||
Q_INVOKABLE void setAllowRunning(bool allow);
|
||||
Q_INVOKABLE bool getAllowBiking();
|
||||
Q_INVOKABLE void setAllowBiking(bool allow);
|
||||
Q_INVOKABLE bool getAllowEscaping();
|
||||
Q_INVOKABLE void setAllowEscaping(bool allow);
|
||||
Q_INVOKABLE int getFloorNumber();
|
||||
Q_INVOKABLE void setFloorNumber(int floorNumber);
|
||||
|
||||
|
||||
private slots:
|
||||
|
|
|
@ -1050,3 +1050,129 @@ void MainWindow::setMapViewTab(int index) {
|
|||
return;
|
||||
this->on_mapViewTab_tabBarClicked(index);
|
||||
}
|
||||
|
||||
bool MainWindow::gameStringToBool(QString s) {
|
||||
return (s.toInt() > 0 || s == "TRUE");
|
||||
}
|
||||
|
||||
QString MainWindow::getSong() {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return QString();
|
||||
return this->editor->map->song;
|
||||
}
|
||||
|
||||
void MainWindow::setSong(QString song) {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return;
|
||||
}
|
||||
|
||||
QString MainWindow::getLocation() {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return QString();
|
||||
return this->editor->map->location;
|
||||
}
|
||||
|
||||
void MainWindow::setLocation(QString location) {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return;
|
||||
}
|
||||
|
||||
bool MainWindow::getRequiresFlash() {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return false;
|
||||
return this->gameStringToBool(this->editor->map->requiresFlash);
|
||||
}
|
||||
|
||||
void MainWindow::setRequiresFlash(bool require) {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return;
|
||||
}
|
||||
|
||||
QString MainWindow::getWeather() {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return QString();
|
||||
return this->editor->map->weather;
|
||||
}
|
||||
|
||||
void MainWindow::setWeather(QString weather) {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return;
|
||||
}
|
||||
|
||||
QString MainWindow::getType() {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return QString();
|
||||
return this->editor->map->type;
|
||||
}
|
||||
|
||||
void MainWindow::setType(QString type) {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return;
|
||||
}
|
||||
|
||||
QString MainWindow::getBattleScene() {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return QString();
|
||||
return this->editor->map->battle_scene;
|
||||
}
|
||||
|
||||
void MainWindow::setBattleScene(QString battleScene) {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return;
|
||||
}
|
||||
|
||||
bool MainWindow::getShowLocationName() {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return false;
|
||||
return this->gameStringToBool(this->editor->map->show_location);
|
||||
}
|
||||
|
||||
void MainWindow::setShowLocationName(bool show) {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return;
|
||||
}
|
||||
|
||||
bool MainWindow::getAllowRunning() {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return false;
|
||||
return this->gameStringToBool(this->editor->map->allowRunning);
|
||||
}
|
||||
|
||||
void MainWindow::setAllowRunning(bool allow) {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return;
|
||||
}
|
||||
|
||||
bool MainWindow::getAllowBiking() {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return false;
|
||||
return this->gameStringToBool(this->editor->map->allowBiking);
|
||||
}
|
||||
|
||||
void MainWindow::setAllowBiking(bool allow) {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return;
|
||||
}
|
||||
|
||||
bool MainWindow::getAllowEscaping() {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return false;
|
||||
return this->gameStringToBool(this->editor->map->allowEscapeRope);
|
||||
}
|
||||
|
||||
void MainWindow::setAllowEscaping(bool allow) {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return;
|
||||
}
|
||||
|
||||
int MainWindow::getFloorNumber() {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return 0;
|
||||
return this->editor->map->floorNumber;
|
||||
}
|
||||
|
||||
void MainWindow::setFloorNumber(int floorNumber) {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue