1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-20 19:57:45 +00:00
astra/src/settingswindow.cpp

21 lines
653 B
C++
Raw Normal View History

2021-11-01 13:14:00 -04:00
#include "settingswindow.h"
#include <QFormLayout>
#include <QPushButton>
#include <QDesktopServices>
#include "xivlauncher.h"
SettingsWindow::SettingsWindow(LauncherWindow& window, QWidget* parent) : window(window), QWidget(parent) {
setWindowTitle("Settings");
setWindowModality(Qt::WindowModality::ApplicationModal);
auto layout = new QFormLayout(this);
setLayout(layout);
auto gameDirectoryButton = new QPushButton("Open Game Directory");
connect(gameDirectoryButton, &QPushButton::pressed, [this] {
QDesktopServices::openUrl("file://" + this->window.gamePath);
});
layout->addRow(gameDirectoryButton);
}