Merge pull request #375 from notgonnaleo/main
qt_gui: Added feature to toggle (show/hide) game list view
This commit is contained in:
commit
95c89ca6a9
|
@ -179,6 +179,7 @@ void MainWindow::CreateConnects() {
|
|||
connect(ui->mw_searchbar, &QLineEdit::textChanged, this, &MainWindow::SearchGameTable);
|
||||
connect(ui->exitAct, &QAction::triggered, this, &QWidget::close);
|
||||
connect(ui->refreshGameListAct, &QAction::triggered, this, &MainWindow::RefreshGameTable);
|
||||
connect(ui->showGameListAct, &QAction::triggered, this, &MainWindow::ShowGameList);
|
||||
connect(this, &MainWindow::ExtractionFinished, this, &MainWindow::RefreshGameTable);
|
||||
|
||||
connect(ui->sizeSlider, &QSlider::valueChanged, this, [this](int value) {
|
||||
|
@ -445,6 +446,15 @@ void MainWindow::SearchGameTable(const QString& text) {
|
|||
}
|
||||
}
|
||||
|
||||
void MainWindow::ShowGameList() {
|
||||
if (ui->showGameListAct->isChecked()) {
|
||||
RefreshGameTable();
|
||||
} else {
|
||||
m_game_grid_frame->clearContents();
|
||||
m_game_list_frame->clearContents();
|
||||
}
|
||||
};
|
||||
|
||||
void MainWindow::RefreshGameTable() {
|
||||
// m_game_info->m_games.clear();
|
||||
m_game_info->GetGameInfo(this);
|
||||
|
|
|
@ -45,6 +45,7 @@ private Q_SLOTS:
|
|||
void ConfigureGuiFromSettings();
|
||||
void SaveWindowState() const;
|
||||
void SearchGameTable(const QString& text);
|
||||
void ShowGameList();
|
||||
void RefreshGameTable();
|
||||
void HandleResize(QResizeEvent* event);
|
||||
|
||||
|
|
Loading…
Reference in New Issue