mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-15 11:08:56 +02:00
Some genius decided to put the entire MainWindow class into main.h and main.cpp, which is not only horrific practice but also completely destroys clangd beyond repair. Please, just don't do this. (this will probably merge conflict to hell and back) Also, fixes a bunch of issues with Ryujinx save data link: - Paths with spaces would cause mklink to fail - Add support for portable directories - Symlink detection was incorrect sometimes(????) - Some other stuff I'm forgetting Furthermore, when selecting "From Eden" and attempting to save in Ryujinx, Ryujinx would destroy the link for... some reason? So to get around this we just copy the Eden data to Ryujinx then treat it like a "From Ryujinx" op Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2929 Reviewed-by: Lizzie <lizzie@eden-emu.dev> Reviewed-by: CamilleLaVey <camillelavey99@gmail.com>
45 lines
1.5 KiB
C++
45 lines
1.5 KiB
C++
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
// SPDX-FileCopyrightText: 2015 Citra Emulator Project
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <filesystem>
|
|
#include <QFont>
|
|
#include <QString>
|
|
#include "common/uuid.h"
|
|
|
|
/// Returns a QFont object appropriate to use as a monospace font for debugging widgets, etc.
|
|
[[nodiscard]] QFont GetMonospaceFont();
|
|
|
|
/// Convert a size in bytes into a readable format (KiB, MiB, etc.)
|
|
[[nodiscard]] QString ReadableByteSize(qulonglong size);
|
|
|
|
/**
|
|
* Creates a circle pixmap from a specified color
|
|
* @param color The color the pixmap shall have
|
|
* @return QPixmap circle pixmap
|
|
*/
|
|
[[nodiscard]] QPixmap CreateCirclePixmapFromColor(const QColor& color);
|
|
|
|
/**
|
|
* Saves a windows icon to a file
|
|
* @param path The icons path
|
|
* @param image The image to save
|
|
* @return bool If the operation succeeded
|
|
*/
|
|
[[nodiscard]] bool SaveIconToFile(const std::filesystem::path& icon_path, const QImage& image);
|
|
|
|
/**
|
|
* Prompt the user for a profile ID. If there is only one valid profile, returns that profile.
|
|
* @return The selected profile, or an std::nullopt if none were selected
|
|
*/
|
|
const std::optional<Common::UUID> GetProfileID();
|
|
|
|
/**
|
|
* Prompt the user for a profile ID. If there is only one valid profile, returns that profile.
|
|
* @return A string representation of the selected profile, or an empty string if none were seleeced
|
|
*/
|
|
std::string GetProfileIDString();
|