/* * aboutproject_moc.cpp, part of VCMI engine * * Authors: listed in file AUTHORS in main folder * * License: GNU General Public License v2.0 or later * Full text of license available in license.txt file, in main folder * */ #include "StdInc.h" #include "aboutproject_moc.h" #include "ui_aboutproject_moc.h" #include "../updatedialog_moc.h" #include "../../lib/GameConstants.h" #include "../../lib/VCMIDirs.h" AboutProjectView::AboutProjectView(QWidget * parent) : QWidget(parent) , ui(new Ui::AboutProjectView) { ui->setupUi(this); ui->lineEditUserDataDir->setText(pathToQString(VCMIDirs::get().userDataPath())); ui->lineEditGameDir->setText(pathToQString(VCMIDirs::get().binaryPath())); ui->lineEditTempDir->setText(pathToQString(VCMIDirs::get().userLogsPath())); ui->lineEditBuildVersion->setText(QString::fromStdString(GameConstants::VCMI_VERSION)); } void AboutProjectView::on_updatesButton_clicked() { UpdateDialog::showUpdateDialog(true); } void AboutProjectView::on_openGameDataDir_clicked() { QDesktopServices::openUrl(QUrl::fromLocalFile(QFileInfo(ui->lineEditGameDir->text()).absoluteFilePath())); } void AboutProjectView::on_openUserDataDir_clicked() { QDesktopServices::openUrl(QUrl::fromLocalFile(QFileInfo(ui->lineEditUserDataDir->text()).absoluteFilePath())); } void AboutProjectView::on_openTempDir_clicked() { QDesktopServices::openUrl(QUrl::fromLocalFile(QFileInfo(ui->lineEditTempDir->text()).absoluteFilePath())); } void AboutProjectView::on_pushButtonDiscord_clicked() { QDesktopServices::openUrl(QUrl("https://discord.gg/chBT42V")); } void AboutProjectView::on_pushButtonSlack_clicked() { QDesktopServices::openUrl(QUrl("https://slack.vcmi.eu/")); } void AboutProjectView::on_pushButtonGithub_clicked() { QDesktopServices::openUrl(QUrl("https://github.com/vcmi/vcmi")); }