improvement for RDR 2 support, some code reworks

This commit is contained in:
Syping 2023-10-05 16:39:10 +02:00
parent 9c0cc39b4f
commit 51f9cffddf
8 changed files with 65 additions and 78 deletions

View File

@ -64,10 +64,10 @@ QString AppEnv::getGameFolder(bool *ok)
} }
} }
#ifdef Q_OS_WIN #ifdef Q_OS_UNIX
// TODO: Try to locate the Steam Proton GTA V folder
const QString GTAV_defaultFolder = StandardPaths::documentsLocation() % "/Rockstar Games/GTA V"; const QString GTAV_defaultFolder = StandardPaths::documentsLocation() % "/Rockstar Games/GTA V";
#else #else
// TODO: Try to locate the Steam Proton GTA V folder
const QString GTAV_defaultFolder = StandardPaths::documentsLocation() % "/Rockstar Games/GTA V"; const QString GTAV_defaultFolder = StandardPaths::documentsLocation() % "/Rockstar Games/GTA V";
#endif #endif
QString GTAV_returnFolder = GTAV_defaultFolder; QString GTAV_returnFolder = GTAV_defaultFolder;

View File

@ -84,11 +84,12 @@ ImportDialog::ImportDialog(QString profileName, QWidget *parent) :
ui->cmdBackgroundWipe->setVisible(false); ui->cmdBackgroundWipe->setVisible(false);
// Snapmatic Resolution // Snapmatic Resolution
ui->cbResolution->addItem("GTA V", QSize(960, 536)); ui->cbResolution->addItem("GTA V (536p)", QSize(960, 536));
ui->cbResolution->addItem("FiveM", QSize(1920, 1072)); ui->cbResolution->addItem("FiveM (1072p)", QSize(1920, 1072));
ui->cbResolution->addItem("1280x720", QSize(1280, 720)); ui->cbResolution->addItem("RDR 2 (1080p)", QSize(1920, 1080));
ui->cbResolution->addItem("1920x1080", QSize(1920, 1080)); ui->cbResolution->addItem("Preset (720p)", QSize(1280, 720));
ui->cbResolution->addItem("2560x1440", QSize(2560, 1440)); ui->cbResolution->addItem("Preset (1440p)", QSize(2560, 1440));
ui->cbResolution->addItem("Preset (2160p)", QSize(3840, 2160));
// Set Import Settings // Set Import Settings
QSettings settings(GTA5SYNC_APPVENDOR, GTA5SYNC_APPSTR); QSettings settings(GTA5SYNC_APPVENDOR, GTA5SYNC_APPSTR);

View File

@ -1,6 +1,6 @@
/***************************************************************************** /*****************************************************************************
* gta5view Grand Theft Auto V Profile Viewer * gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2022 Syping * Copyright (C) 2016-2023 Syping
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
/***************************************************************************** /*****************************************************************************
* gta5view Grand Theft Auto V Profile Viewer * gta5view Grand Theft Auto V Profile Viewer
* Copyright (C) 2016-2017 Syping * Copyright (C) 2016-2023 Syping
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -28,7 +28,6 @@
SavegameCopy::SavegameCopy() SavegameCopy::SavegameCopy()
{ {
} }
void SavegameCopy::copySavegame(QWidget *parent, QString sgdPath) void SavegameCopy::copySavegame(QWidget *parent, QString sgdPath)
@ -48,13 +47,17 @@ fileDialogPreSave: //Work?
fileDialog.setOption(QFileDialog::DontUseNativeDialog, dontUseNativeDialog); fileDialog.setOption(QFileDialog::DontUseNativeDialog, dontUseNativeDialog);
fileDialog.setOption(QFileDialog::DontConfirmOverwrite, true); fileDialog.setOption(QFileDialog::DontConfirmOverwrite, true);
fileDialog.setDefaultSuffix(""); fileDialog.setDefaultSuffix("");
fileDialog.setWindowFlags(fileDialog.windowFlags()^Qt::WindowContextHelpButtonHint); fileDialog.setWindowFlag(Qt::WindowContextHelpButtonHint, false);
fileDialog.setWindowTitle(SavegameWidget::tr(("Export Savegame..."))); fileDialog.setWindowTitle(SavegameWidget::tr(("Export Savegame...")));
fileDialog.setLabelText(QFileDialog::Accept, SavegameWidget::tr("Export")); fileDialog.setLabelText(QFileDialog::Accept, SavegameWidget::tr("Export"));
QStringList filters; QStringList filters;
filters << SavegameWidget::tr("Savegame files (SGTA*)"); const QString fileName = sgdFileInfo.fileName();
filters << SavegameWidget::tr("All files (**)"); if (fileName.startsWith("SGTA5"))
filters << SavegameWidget::tr("GTA V Savegames files (%1)").arg("SGTA5*");
else if (fileName.startsWith("SRDR3"))
filters << SavegameWidget::tr("RDR 2 Savegames files (%1)").arg("SRDR3*");
filters << SavegameWidget::tr("All files (%1)").arg("**");
fileDialog.setNameFilters(filters); fileDialog.setNameFilters(filters);
QList<QUrl> sidebarUrls = SidebarGenerator::generateSidebarUrls(fileDialog.sidebarUrls()); QList<QUrl> sidebarUrls = SidebarGenerator::generateSidebarUrls(fileDialog.sidebarUrls());
@ -64,38 +67,30 @@ fileDialogPreSave: //Work?
fileDialog.restoreGeometry(settings.value(parent->objectName() % "+Geometry", "").toByteArray()); fileDialog.restoreGeometry(settings.value(parent->objectName() % "+Geometry", "").toByteArray());
fileDialog.selectFile(sgdFileInfo.fileName()); fileDialog.selectFile(sgdFileInfo.fileName());
if (fileDialog.exec()) if (fileDialog.exec()) {
{
QStringList selectedFiles = fileDialog.selectedFiles(); QStringList selectedFiles = fileDialog.selectedFiles();
if (selectedFiles.length() == 1) if (selectedFiles.length() == 1) {
{
QString selectedFile = selectedFiles.at(0); QString selectedFile = selectedFiles.at(0);
if (QFile::exists(selectedFile)) if (QFile::exists(selectedFile)) {
{ if (QMessageBox::Yes == QMessageBox::warning(parent, SavegameWidget::tr("Export Savegame"), SavegameWidget::tr("Overwrite %1 with current Savegame?").arg("\""+selectedFile+"\""), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)) {
if (QMessageBox::Yes == QMessageBox::warning(parent, SavegameWidget::tr("Export Savegame"), SavegameWidget::tr("Overwrite %1 with current Savegame?").arg("\""+selectedFile+"\""), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)) if (!QFile::remove(selectedFile)) {
{
if (!QFile::remove(selectedFile))
{
QMessageBox::warning(parent, SavegameWidget::tr("Export Savegame"), SavegameWidget::tr("Failed to overwrite %1 with current Savegame").arg("\""+selectedFile+"\"")); QMessageBox::warning(parent, SavegameWidget::tr("Export Savegame"), SavegameWidget::tr("Failed to overwrite %1 with current Savegame").arg("\""+selectedFile+"\""));
goto fileDialogPreSave; //Work? goto fileDialogPreSave; //Work?
} }
} }
else else {
{
goto fileDialogPreSave; //Work? goto fileDialogPreSave; //Work?
} }
} }
bool isCopied = QFile::copy(sgdPath, selectedFile); bool isCopied = QFile::copy(sgdPath, selectedFile);
if (!isCopied) if (!isCopied) {
{
QMessageBox::warning(parent, SavegameWidget::tr("Export Savegame"), SavegameWidget::tr("Failed to export current Savegame")); QMessageBox::warning(parent, SavegameWidget::tr("Export Savegame"), SavegameWidget::tr("Failed to export current Savegame"));
goto fileDialogPreSave; //Work? goto fileDialogPreSave; //Work?
} }
} }
else else {
{
QMessageBox::warning(parent, SavegameWidget::tr("Export Savegame"), SavegameWidget::tr("No valid file is selected")); QMessageBox::warning(parent, SavegameWidget::tr("Export Savegame"), SavegameWidget::tr("No valid file is selected"));
goto fileDialogPreSave; //Work? goto fileDialogPreSave; //Work?
} }

View File

@ -920,13 +920,13 @@ void SnapmaticPicture::initialise(uint32_t photoFormat)
t_jsonObject["crewid"] = 0; t_jsonObject["crewid"] = 0;
t_jsonObject["districtname"] = 0; t_jsonObject["districtname"] = 0;
t_jsonObject["drctr"] = false; t_jsonObject["drctr"] = false;
t_jsonObject["inphotomode"] = true;
boost::json::object t_locObject; boost::json::object t_locObject;
t_locObject["x"] = 0; t_locObject["x"] = 0;
t_locObject["y"] = 0; t_locObject["y"] = 0;
t_locObject["z"] = 0; t_locObject["z"] = 0;
t_jsonObject["inphotomode"] = true;
t_jsonObject["loc"] = t_locObject; t_jsonObject["loc"] = t_locObject;
t_jsonObject["meme"] = false; t_jsonObject["meme"] = false;
t_jsonObject["mid"] = ""; t_jsonObject["mid"] = "";

View File

@ -317,15 +317,11 @@ void UserInterface::setupDirEnv(bool showFolderDialog)
bool folderExists; bool folderExists;
GTAV_Folder = AppEnv::getGameFolder(&folderExists); GTAV_Folder = AppEnv::getGameFolder(&folderExists);
if (folderExists) { if (!folderExists && showFolderDialog) {
QDir::setCurrent(GTAV_Folder);
}
else if (showFolderDialog) {
const QString GTAV_Folder_Temp = QFileDialog::getExistingDirectory(this, tr("Select GTA V Folder..."), StandardPaths::documentsLocation(), QFileDialog::ShowDirsOnly); const QString GTAV_Folder_Temp = QFileDialog::getExistingDirectory(this, tr("Select GTA V Folder..."), StandardPaths::documentsLocation(), QFileDialog::ShowDirsOnly);
if (!GTAV_Folder_Temp.isEmpty() && QDir(GTAV_Folder_Temp).exists()) { if (!GTAV_Folder_Temp.isEmpty() && QDir(GTAV_Folder_Temp).exists()) {
GTAV_Folder = GTAV_Folder_Temp; GTAV_Folder = GTAV_Folder_Temp;
folderExists = true; folderExists = true;
QDir::setCurrent(GTAV_Folder);
AppEnv::setGameFolder(GTAV_Folder); AppEnv::setGameFolder(GTAV_Folder);
// First time folder selection save // First time folder selection save
@ -351,17 +347,16 @@ void UserInterface::setupDirEnv(bool showFolderDialog)
if (folderExists) { if (folderExists) {
QDir GTAV_ProfilesDir; QDir GTAV_ProfilesDir;
GTAV_ProfilesFolder = GTAV_Folder % "/Profiles"; GTAV_ProfilesDir.setPath(GTAV_Folder % "/Profiles");
GTAV_ProfilesDir.setPath(GTAV_ProfilesFolder);
GTAV_Profiles = GTAV_ProfilesDir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::NoSort); GTAV_Profiles = GTAV_ProfilesDir.entryList(QDir::Dirs | QDir::NoDotAndDotDot, QDir::NoSort);
setupProfileUi(); setupProfileUi();
if (GTAV_Profiles.length() == 1) { if (GTAV_Profiles.length() == 1) {
openProfile(GTAV_Profiles.at(0)); openProfile(GTAV_Profiles.at(0), RagePhoto::PhotoFormat::GTA5);
} }
else if(GTAV_Profiles.contains(defaultProfile)) { else if(GTAV_Profiles.contains(defaultProfile)) {
openProfile(defaultProfile); openProfile(defaultProfile, RagePhoto::PhotoFormat::GTA5);
} }
} }
else { else {
@ -415,21 +410,24 @@ void UserInterface::on_cmdReload_clicked()
void UserInterface::profileButton_clicked() void UserInterface::profileButton_clicked()
{ {
QPushButton *profileBtn = (QPushButton*)sender(); QPushButton *profileBtn = (QPushButton*)sender();
openProfile(profileBtn->objectName()); openProfile(profileBtn->objectName(), RagePhoto::PhotoFormat::GTA5);
} }
void UserInterface::openProfile(const QString &profileName_) void UserInterface::openProfile(const QString &profileName_, quint32 gameFormat)
{ {
profileOpen = true; profileOpen = true;
profileName = profileName_; profileName = profileName_;
profileUI = new ProfileInterface(profileDB, crewDB, threadDB); profileUI = new ProfileInterface(profileDB, crewDB, threadDB);
ui->swProfile->addWidget(profileUI); ui->swProfile->addWidget(profileUI);
ui->swProfile->setCurrentWidget(profileUI); ui->swProfile->setCurrentWidget(profileUI);
profileUI->setProfileFolder(GTAV_ProfilesFolder % "/" % profileName, profileName, RagePhoto::PhotoFormat::GTA5); // TODO: do not assume GTA V if (gameFormat == RagePhoto::PhotoFormat::GTA5)
profileUI->setProfileFolder(GTAV_Folder % "/Profiles/" % profileName, profileName, gameFormat);
else if (gameFormat == RagePhoto::PhotoFormat::RDR2)
profileUI->setProfileFolder(RDR2_Folder % "/Profiles/" % profileName, profileName, gameFormat);
profileUI->settingsApplied(contentMode, false); profileUI->settingsApplied(contentMode, false);
profileUI->setupProfileInterface(); profileUI->setupProfileInterface();
QObject::connect(profileUI, SIGNAL(profileClosed()), this, SLOT(closeProfile())); QObject::connect(profileUI, &ProfileInterface::profileClosed, this, &UserInterface::closeProfile);
QObject::connect(profileUI, SIGNAL(profileLoaded()), this, SLOT(profileLoaded())); QObject::connect(profileUI, &ProfileInterface::profileLoaded, this, &UserInterface::profileLoaded);
setWindowTitle(defaultWindowTitle.arg(profileName)); setWindowTitle(defaultWindowTitle.arg(profileName));
} }
@ -817,7 +815,6 @@ void UserInterface::on_actionSelect_GTA_Folder_triggered()
closeProfile_p(); closeProfile_p();
} }
GTAV_Folder = GTAV_Folder_Temp; GTAV_Folder = GTAV_Folder_Temp;
QDir::setCurrent(GTAV_Folder);
AppEnv::setGameFolder(GTAV_Folder); AppEnv::setGameFolder(GTAV_Folder);
on_cmdReload_clicked(); on_cmdReload_clicked();
} }

View File

@ -105,10 +105,11 @@ private:
QString language; QString language;
QString defaultWindowTitle; QString defaultWindowTitle;
QString GTAV_Folder; QString GTAV_Folder;
QString GTAV_ProfilesFolder; QString RDR2_Folder;
QStringList GTAV_Profiles; QStringList GTAV_Profiles;
QStringList RDR2_Profiles;
void setupProfileUi(); void setupProfileUi();
void openProfile(const QString &profileName); void openProfile(const QString &profileName, quint32 gameFormat);
void closeProfile_p(); void closeProfile_p();
void openSelectProfile(); void openSelectProfile();
void retranslateUi(); void retranslateUi();

View File

@ -54,7 +54,7 @@
#endif #endif
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
#include "windows.h" #include <windows.h>
#include <iostream> #include <iostream>
#endif #endif
@ -131,21 +131,22 @@ int main(int argc, char *argv[])
bool telemetryWindowLaunched = settings.value("PersonalUsageDataWindowLaunched", false).toBool(); bool telemetryWindowLaunched = settings.value("PersonalUsageDataWindowLaunched", false).toBool();
bool pushUsageData = settings.value("PushUsageData", false).toBool(); bool pushUsageData = settings.value("PushUsageData", false).toBool();
if (!telemetryWindowLaunched && !pushUsageData) { if (!telemetryWindowLaunched && !pushUsageData) {
QDialog *telemetryDialog = new QDialog(); QDialog telemetryDialog;
telemetryDialog->setObjectName(QStringLiteral("TelemetryDialog")); telemetryDialog.setObjectName(QStringLiteral("TelemetryDialog"));
telemetryDialog->setWindowTitle(QString("%1 %2").arg(GTA5SYNC_APPSTR, GTA5SYNC_APPVER)); telemetryDialog.setWindowTitle(QString("%1 %2").arg(GTA5SYNC_APPSTR, GTA5SYNC_APPVER));
telemetryDialog->setWindowFlags(telemetryDialog->windowFlags()^Qt::WindowContextHelpButtonHint^Qt::WindowCloseButtonHint); telemetryDialog.setWindowFlag(Qt::WindowContextHelpButtonHint, false);
telemetryDialog->setWindowIcon(IconLoader::loadingAppIcon()); telemetryDialog.setWindowFlag(Qt::WindowCloseButtonHint, false);
QVBoxLayout *telemetryLayout = new QVBoxLayout(telemetryDialog); telemetryDialog.setWindowIcon(IconLoader::loadingAppIcon());
QVBoxLayout *telemetryLayout = new QVBoxLayout(&telemetryDialog);
telemetryLayout->setObjectName(QStringLiteral("TelemetryLayout")); telemetryLayout->setObjectName(QStringLiteral("TelemetryLayout"));
telemetryDialog->setLayout(telemetryLayout); telemetryDialog.setLayout(telemetryLayout);
UiModLabel *telemetryLabel = new UiModLabel(telemetryDialog); UiModLabel *telemetryLabel = new UiModLabel(&telemetryDialog);
telemetryLabel->setObjectName(QStringLiteral("TelemetryLabel")); telemetryLabel->setObjectName(QStringLiteral("TelemetryLabel"));
telemetryLabel->setText(QString("<h4>%2</h4>%1").arg( telemetryLabel->setText(QString("<h4>%2</h4>%1").arg(
QApplication::translate("TelemetryDialog", "You want help %1 to improve in the future by including personal usage data in your submission?").arg(GTA5SYNC_APPSTR), QApplication::translate("TelemetryDialog", "You want help %1 to improve in the future by including personal usage data in your submission?").arg(GTA5SYNC_APPSTR),
QApplication::translate("TelemetryDialog", "%1 User Statistics").arg(GTA5SYNC_APPSTR))); QApplication::translate("TelemetryDialog", "%1 User Statistics").arg(GTA5SYNC_APPSTR)));
telemetryLayout->addWidget(telemetryLabel); telemetryLayout->addWidget(telemetryLabel);
QCheckBox *telemetryCheckBox = new QCheckBox(telemetryDialog); QCheckBox *telemetryCheckBox = new QCheckBox(&telemetryDialog);
telemetryCheckBox->setObjectName(QStringLiteral("TelemetryCheckBox")); telemetryCheckBox->setObjectName(QStringLiteral("TelemetryCheckBox"));
telemetryCheckBox->setText(QApplication::translate("TelemetryDialog", "Yes, I want include personal usage data.")); telemetryCheckBox->setText(QApplication::translate("TelemetryDialog", "Yes, I want include personal usage data."));
telemetryLayout->addWidget(telemetryCheckBox); telemetryLayout->addWidget(telemetryCheckBox);
@ -154,14 +155,14 @@ int main(int argc, char *argv[])
telemetryLayout->addLayout(telemetryButtonLayout); telemetryLayout->addLayout(telemetryButtonLayout);
QSpacerItem *telemetryButtonSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); QSpacerItem *telemetryButtonSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum);
telemetryButtonLayout->addSpacerItem(telemetryButtonSpacer); telemetryButtonLayout->addSpacerItem(telemetryButtonSpacer);
QPushButton *telemetryButton = new QPushButton(telemetryDialog); QPushButton *telemetryButton = new QPushButton(&telemetryDialog);
telemetryButton->setObjectName(QStringLiteral("TelemetryButton")); telemetryButton->setObjectName(QStringLiteral("TelemetryButton"));
telemetryButton->setText(QApplication::translate("TelemetryDialog", "&OK")); telemetryButton->setText(QApplication::translate("TelemetryDialog", "&OK"));
telemetryButtonLayout->addWidget(telemetryButton); telemetryButtonLayout->addWidget(telemetryButton);
QObject::connect(telemetryButton, SIGNAL(clicked(bool)), telemetryDialog, SLOT(close())); QObject::connect(telemetryButton, &QPushButton::clicked, &telemetryDialog, &QDialog::close);
telemetryDialog->setFixedSize(telemetryDialog->sizeHint()); telemetryDialog.setFixedSize(telemetryDialog.sizeHint());
telemetryDialog->exec(); telemetryDialog.exec();
QObject::disconnect(telemetryButton, SIGNAL(clicked(bool)), telemetryDialog, SLOT(close())); QObject::disconnect(telemetryButton, &QPushButton::clicked, &telemetryDialog, &QDialog::close);
if (telemetryCheckBox->isChecked()) { if (telemetryCheckBox->isChecked()) {
QSettings telemetrySettings(GTA5SYNC_APPVENDOR, GTA5SYNC_APPSTR); QSettings telemetrySettings(GTA5SYNC_APPVENDOR, GTA5SYNC_APPSTR);
telemetrySettings.beginGroup("Telemetry"); telemetrySettings.beginGroup("Telemetry");
@ -173,20 +174,19 @@ int main(int argc, char *argv[])
Telemetry->work(); Telemetry->work();
} }
settings.setValue("PersonalUsageDataWindowLaunched", true); settings.setValue("PersonalUsageDataWindowLaunched", true);
delete telemetryDialog;
} }
#endif #endif
settings.endGroup(); settings.endGroup();
for (const QString &currentArg : applicationArgs) { for (const QString &currentArg : applicationArgs) {
QString reworkedArg; QString reworkedArg;
if (currentArg.left(9) == "-showpic=" && selectedAction == "") { if (currentArg.startsWith("-showpic=") && selectedAction == "") {
reworkedArg = QString(currentArg).remove(0,9); reworkedArg = QString(currentArg).remove(0, 9);
arg1 = reworkedArg; arg1 = reworkedArg;
selectedAction = "showpic"; selectedAction = "showpic";
} }
else if (currentArg.left(9) == "-showsgd=" && selectedAction == "") { else if (currentArg.startsWith("-showsgd=") && selectedAction == "") {
reworkedArg = QString(currentArg).remove(0,9); reworkedArg = QString(currentArg).remove(0, 9);
arg1 = reworkedArg; arg1 = reworkedArg;
selectedAction = "showsgd"; selectedAction = "showsgd";
} }
@ -194,19 +194,16 @@ int main(int argc, char *argv[])
QFile argumentFile(currentArg); QFile argumentFile(currentArg);
QFileInfo argumentFileInfo(argumentFile); QFileInfo argumentFileInfo(argumentFile);
if (argumentFile.exists()) { if (argumentFile.exists()) {
QString argumentFileName = argumentFileInfo.fileName(); const QString argumentFileName = argumentFileInfo.fileName();
QString argumentFileType = argumentFileName.left(4); if (argumentFileName.startsWith("PGTA5") || argumentFileName.startsWith("PRDR3") || argumentFileName.endsWith(".g5e")) {
QString argumentFileExt = argumentFileName.right(4);
if (argumentFileType == "PGTA" || argumentFileExt == ".g5e") {
arg1 = currentArg; arg1 = currentArg;
selectedAction = "showpic"; selectedAction = "showpic";
} }
else if (argumentFileType == "SGTA") { else if (argumentFileName.startsWith("SGTA5") || argumentFileName.startsWith("SRDR3")) {
arg1 = currentArg; arg1 = currentArg;
selectedAction = "showsgd"; selectedAction = "showsgd";
} }
else if (argumentFileType == "MISR") { else if (argumentFileName.startsWith("MISREP")) {
arg1 = currentArg; arg1 = currentArg;
selectedAction = "showsgd"; selectedAction = "showsgd";
} }
@ -295,11 +292,7 @@ int main(int argc, char *argv[])
#else #else
uiWindow.setupDirEnv(); uiWindow.setupDirEnv();
#endif #endif
#ifdef Q_OS_ANDROID
uiWindow.showMaximized();
#else
uiWindow.show(); uiWindow.show();
#endif
return a.exec(); return a.exec();
} }