rpcsx/rpcs3/rpcs3qt/game_list_grid.h
Megamouse f115032095 Qt: implement flow layout game grid
This will allow us to properly style the grid and also remove the need to refresh the whole grid on a window resize
2023-05-06 06:31:58 +02:00

38 lines
940 B
C++

#pragma once
#include "game_list_base.h"
#include "flow_widget.h"
#include <QKeyEvent>
class game_list_grid : public flow_widget, public game_list_base
{
Q_OBJECT
public:
explicit game_list_grid();
void clear_list() override;
void populate(
const std::vector<game_info>& game_data,
const QMap<QString, QString>& notes_map,
const QMap<QString, QString>& title_map,
const std::string& selected_item_id,
bool play_hover_movies) override;
void repaint_icons(QList<game_info>& game_data, const QColor& icon_color, const QSize& icon_size, qreal device_pixel_ratio) override;
bool eventFilter(QObject* watched, QEvent* event) override;
void keyPressEvent(QKeyEvent* event) override;
public Q_SLOTS:
void FocusAndSelectFirstEntryIfNoneIs();
Q_SIGNALS:
void FocusToSearchBar();
void ItemDoubleClicked(const game_info& game);
void ItemSelectionChanged(const game_info& game);
void IconReady(const game_info& game);
};