mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-07 04:33:24 +00:00
[desktop] Add basic carousel view (#4112)
Adds a basic carousel view, or essentially a horizontal list a la Android/Qt Quick. Lacks a lot of niceties like autoscroll, smooth shifts, etc. Will work on those later Also fixed a bug introduced recently that capped game icon size to 8 at the low end, breaking the None option Signed-off-by: crueter <crueter@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4112 Reviewed-by: MaranBr <maranbr@eden-emu.dev> Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev> Reviewed-by: Lizzie <lizzie@eden-emu.dev>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QListView>
|
||||
#include <QString>
|
||||
|
||||
class GameCard;
|
||||
class GameListModel;
|
||||
class QResizeEvent;
|
||||
|
||||
class GameCarousel : public QListView {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit GameCarousel(QWidget* parent = nullptr);
|
||||
|
||||
void SetModel(GameListModel* model);
|
||||
void ApplyFilter(const QString& edit_filter_text, GameListModel* model);
|
||||
void UpdateIconSize();
|
||||
|
||||
QModelIndex indexAt(const QPoint& point) const override;
|
||||
|
||||
private:
|
||||
GameCard* m_gameCard = nullptr;
|
||||
};
|
||||
Reference in New Issue
Block a user