Improve keyboard navigation in game list (#1132)

* Improve keyboard navigation

* don't start game in elf viewer mode or gridview mode with empty item selected

* fix eventFilter return
This commit is contained in:
tGecko 2024-09-28 20:04:47 +02:00 committed by GitHub
parent 7b5d66e5c1
commit dc96338c2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 67 additions and 38 deletions

View file

@ -20,7 +20,9 @@ Q_SIGNALS:
public Q_SLOTS:
void SetGridBackgroundImage(int row, int column);
void RefreshGridBackgroundImage();
void PlayBackgroundMusic(QTableWidgetItem* item);
void PlayBackgroundMusic(QString path);
void onCurrentCellChanged(int currentRow, int currentColumn, int previousRow,
int previousColumn);
private:
QImage backgroundImage;
@ -28,10 +30,12 @@ private:
GuiContextMenus m_gui_context_menus;
std::shared_ptr<GameInfoClass> m_game_info;
std::shared_ptr<QVector<GameInfo>> m_games_shared;
bool validCellSelected = false;
public:
explicit GameGridFrame(std::shared_ptr<GameInfoClass> game_info_get, QWidget* parent = nullptr);
void PopulateGameGrid(QVector<GameInfo> m_games, bool fromSearch);
bool IsValidCellSelected();
bool cellClicked = false;
int icon_size;