pcsx2/pcsx2-qt/ShortcutCreationDialog.h
2025-10-28 00:11:09 +01:00

30 lines
879 B
C++

// SPDX-FileCopyrightText: 2002-2025 PCSX2 Dev Team
// SPDX-License-Identifier: GPL-3.0+
#pragma once
#include "ui_ShortcutCreationDialog.h"
#include <QtWidgets/QDialog>
class ShortcutCreationDialog final : public QDialog
{
Q_OBJECT
public:
ShortcutCreationDialog(QWidget* parent, const QString& title, const QString& path);
~ShortcutCreationDialog() = default;
/// Create desktop shortcut for games
void CreateShortcut(const std::string name, const std::string game_path, std::vector<std::string> passed_cli_args, std::string custom_args, bool is_desktop);
/// Escapes the given string for use with command line arguments.
/// Returns a bool that indicates whether the escaping operation are lossless or not.
bool EscapeShortcutCommandLine(std::string* cmdline);
protected:
QString m_title;
QString m_path;
bool m_desktop;
Ui::ShortcutCreationDialog m_ui;
};