mirror of
https://github.com/huderlem/porymap.git
synced 2026-08-12 11:55:44 -05:00
Header tab and new map dialog share UI setup
This commit is contained in:
56
include/ui/mapheaderform.h
Normal file
56
include/ui/mapheaderform.h
Normal file
@@ -0,0 +1,56 @@
|
||||
#ifndef MAPHEADERFORM_H
|
||||
#define MAPHEADERFORM_H
|
||||
|
||||
#include "project.h"
|
||||
#include "map.h"
|
||||
#include "ui_mapheaderform.h"
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
/*
|
||||
This is the UI class used to edit the fields in a map's header.
|
||||
It's intended to be used anywhere the UI needs to present an editor for a map's header,
|
||||
e.g. for the current map in the main editor or in the new map dialog.
|
||||
*/
|
||||
|
||||
namespace Ui {
|
||||
class MapHeaderForm;
|
||||
}
|
||||
|
||||
class MapHeaderForm : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit MapHeaderForm(QWidget *parent = nullptr);
|
||||
~MapHeaderForm();
|
||||
|
||||
void setProject(Project * project);
|
||||
void setMap(Map * map);
|
||||
|
||||
void clearDisplay();
|
||||
void clear();
|
||||
|
||||
void refreshLocationsComboBox();
|
||||
|
||||
Ui::MapHeaderForm *ui;
|
||||
|
||||
private:
|
||||
QPointer<Map> map = nullptr;
|
||||
QPointer<Project> project = nullptr;
|
||||
|
||||
private slots:
|
||||
void on_comboBox_Song_currentTextChanged(const QString &);
|
||||
void on_comboBox_Location_currentTextChanged(const QString &);
|
||||
void on_comboBox_Weather_currentTextChanged(const QString &);
|
||||
void on_comboBox_Type_currentTextChanged(const QString &);
|
||||
void on_comboBox_BattleScene_currentTextChanged(const QString &);
|
||||
void on_checkBox_RequiresFlash_stateChanged(int);
|
||||
void on_checkBox_ShowLocationName_stateChanged(int);
|
||||
void on_checkBox_AllowRunning_stateChanged(int);
|
||||
void on_checkBox_AllowBiking_stateChanged(int);
|
||||
void on_checkBox_AllowEscaping_stateChanged(int);
|
||||
void on_spinBox_FloorNumber_valueChanged(int);
|
||||
};
|
||||
|
||||
#endif // MAPHEADERFORM_H
|
||||
Reference in New Issue
Block a user