#include "tycho.h" #include "mapprops.h" #include "menu.h" #include "../ui/ui_menu.h" #include "../ui/ui_about.h" #include "bindings.h" #include #include extern "C" void Ma_test_fn(char const *fname); Menu::Menu(QWidget *parent) : QMainWindow(parent), ui(new Ui::Menu) { ui->setupUi(this); } Menu::~Menu() { dbgPrintFunc(); } void Menu::mapNew() { Project obj{this}; } void Menu::mapOpen() { auto fname = QFileDialog::getOpenFileName( this, tr("Open Map File"), QString(), tr("Marathon Map files (*.scen *.sceA Map)")); Ma_test_fn(qUtf8Printable(fname)); } void Menu::openAbout() { QDialog dlg{this}; Ui::About about{}; about.setupUi(&dlg); about.labelVer->setText(tr(TYCHO_VERSION)); about.labelAuthors->setText(tr(TYCHO_AUTHORS)); dlg.exec(); } void Menu::openMapProperties() { MapProps props{this}; props.exec(); } // EOF