mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-10-25 19:20:53 +01:00
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>
33 lines
803 B
C++
33 lines
803 B
C++
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QTreeView>
|
|
|
|
class GameListModel;
|
|
|
|
class GameTree : public QTreeView {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit GameTree(QWidget* parent = nullptr);
|
|
|
|
void SetModel(GameListModel* model);
|
|
|
|
QString GetLastFilterResultItem() const;
|
|
int FilterClosedResultCount(GameListModel* model);
|
|
void ApplyFilter(const QString& edit_filter_text, GameListModel* model);
|
|
|
|
void SaveInterfaceLayout();
|
|
void LoadInterfaceLayout();
|
|
|
|
void UpdateColumnVisibility(GameListModel* model);
|
|
|
|
signals:
|
|
void ItemExpandedChanged(const QModelIndex& item);
|
|
void FilterResultReady(int visible, int total);
|
|
|
|
private slots:
|
|
void OnItemExpanded(const QModelIndex& item);
|
|
};
|