diff options
| author | crueter <crueter@eden-emu.dev> | 2026-06-02 04:08:24 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2026-06-02 04:08:24 +0200 |
| commit | cc8451f764979db23208dd5a55884cd62fd8b673 (patch) | |
| tree | 5fe5dc8e28322f897492639e7c895d226f9bcdc5 /src/yuzu/util | |
| parent | 27189f39d2bf78c924475ac6ea2a79c3d6ec6d8a (diff) | |
[desktop] Rework game list to use MVP architecture (#4042)
Closes #3480
moves the game list model/worker/private stuff to qt_common for later
use in QML
- `qt_common/game_list/model.{cpp,h}` is the model
- `yuzu/game/game_{grid,tree}.*` are the views
- `yuzu/game/game_list.cpp` is the presenter
This was done very lazily in a manner that "works" while largely
maintaining existing structure as much as possible. Most of it is
copy-paste, with some bonus reworks/cleanups thrown in.
Signed-off-by: crueter <crueter@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4042
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Reviewed-by: Lizzie <lizzie@eden-emu.dev>
Diffstat (limited to 'src/yuzu/util')
| -rw-r--r-- | src/yuzu/util/util.cpp | 18 | ||||
| -rw-r--r-- | src/yuzu/util/util.h | 10 |
2 files changed, 0 insertions, 28 deletions
diff --git a/src/yuzu/util/util.cpp b/src/yuzu/util/util.cpp index e37d9d03e4..eb6583b358 100644 --- a/src/yuzu/util/util.cpp +++ b/src/yuzu/util/util.cpp @@ -4,14 +4,11 @@ // SPDX-FileCopyrightText: 2015 Citra Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -#include <cmath> #include <QPainter> #include "applets/qt_profile_select.h" -#include "common/logging.h" #include "core/frontend/applets/profile_select.h" #include "core/hle/service/acc/profile_manager.h" -#include "frontend_common/data_manager.h" #include "qt_common/qt_common.h" #include "yuzu/util/util.h" @@ -28,21 +25,6 @@ QFont GetMonospaceFont() { return font; } -QString ReadableByteSize(qulonglong size) { - return QString::fromStdString(FrontendCommon::DataManager::ReadableBytesSize(size)); -} - -QPixmap CreateCirclePixmapFromColor(const QColor& color) { - QPixmap circle_pixmap(16, 16); - circle_pixmap.fill(Qt::transparent); - QPainter painter(&circle_pixmap); - painter.setRenderHint(QPainter::Antialiasing); - painter.setPen(color); - painter.setBrush(color); - painter.drawEllipse({circle_pixmap.width() / 2.0, circle_pixmap.height() / 2.0}, 7.0, 7.0); - return circle_pixmap; -} - const std::optional<Common::UUID> GetProfileID() { // if there's only a single profile, the user probably wants to use that... right? const auto& profiles = QtCommon::system->GetProfileManager().FindExistingProfileUUIDs(); diff --git a/src/yuzu/util/util.h b/src/yuzu/util/util.h index 9c3d5aa84a..2e4e325e22 100644 --- a/src/yuzu/util/util.h +++ b/src/yuzu/util/util.h @@ -13,16 +13,6 @@ /// 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); - /** * 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 |
