mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-21 03:55:32 +00:00
Add Q_EMITs and clean up a couple signals.
This commit is contained in:
parent
5543441618
commit
6648084c64
7 changed files with 16 additions and 17 deletions
|
@ -121,7 +121,7 @@ void debugger_frame::SaveSettings()
|
|||
void debugger_frame::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
QDockWidget::closeEvent(event);
|
||||
DebugFrameClosed();
|
||||
Q_EMIT DebugFrameClosed();
|
||||
}
|
||||
|
||||
void debugger_frame::showEvent(QShowEvent * event)
|
||||
|
|
|
@ -222,16 +222,16 @@ game_list_frame::game_list_frame(std::shared_ptr<gui_settings> settings, const R
|
|||
connect(m_xgrid, &QTableWidget::doubleClicked, this, &game_list_frame::doubleClickedSlot);
|
||||
connect(m_xgrid, &QTableWidget::customContextMenuRequested, this, &game_list_frame::ShowContextMenu);
|
||||
|
||||
connect(m_Slider_Size, &QSlider::valueChanged, [=](int value) { RequestIconSizeActSet(value); });
|
||||
connect(m_Slider_Size, &QSlider::valueChanged, this, &game_list_frame::RequestIconSizeActSet);
|
||||
|
||||
connect(m_modeActs, &QActionGroup::triggered, [=](QAction* act) {
|
||||
RequestListModeActSet(act == m_modeActList.action);
|
||||
Q_EMIT RequestListModeActSet(act == m_modeActList.action);
|
||||
m_modeActList.action->setIcon(m_isListLayout ? m_modeActList.colored : m_modeActList.gray);
|
||||
m_modeActGrid.action->setIcon(m_isListLayout ? m_modeActGrid.gray : m_modeActGrid.colored);
|
||||
});
|
||||
|
||||
connect(m_categoryActs, &QActionGroup::triggered, [=](QAction* act) {
|
||||
RequestCategoryActSet(m_categoryActs->actions().indexOf(act));
|
||||
Q_EMIT RequestCategoryActSet(m_categoryActs->actions().indexOf(act));
|
||||
});
|
||||
|
||||
for (int col = 0; col < columnActs.count(); ++col)
|
||||
|
@ -549,7 +549,7 @@ void game_list_frame::doubleClickedSlot(const QModelIndex& index)
|
|||
|
||||
if (1)
|
||||
{
|
||||
RequestIconPathSet(m_game_data[i].info.path);
|
||||
Q_EMIT RequestIconPathSet(m_game_data[i].info.path);
|
||||
|
||||
Emu.Stop();
|
||||
|
||||
|
@ -560,7 +560,7 @@ void game_list_frame::doubleClickedSlot(const QModelIndex& index)
|
|||
else
|
||||
{
|
||||
LOG_SUCCESS(LOADER, "Boot from gamelist per doubleclick: done");
|
||||
RequestAddRecentGame(q_string_pair(qstr(Emu.GetBoot()), qstr("[" + m_game_data[i].info.serial + "] " + m_game_data[i].info.name)));
|
||||
Q_EMIT RequestAddRecentGame(q_string_pair(qstr(Emu.GetBoot()), qstr("[" + m_game_data[i].info.serial + "] " + m_game_data[i].info.name)));
|
||||
Refresh(true);
|
||||
}
|
||||
}
|
||||
|
@ -682,7 +682,7 @@ void game_list_frame::ShowSpecifiedContextMenu(const QPoint &pos, int row)
|
|||
|
||||
void game_list_frame::Boot(int row)
|
||||
{
|
||||
RequestIconPathSet(m_game_data[row].info.path);
|
||||
Q_EMIT RequestIconPathSet(m_game_data[row].info.path);
|
||||
|
||||
Emu.Stop();
|
||||
|
||||
|
@ -694,7 +694,7 @@ void game_list_frame::Boot(int row)
|
|||
else
|
||||
{
|
||||
LOG_SUCCESS(LOADER, "Boot from gamelist per Boot: done");
|
||||
RequestAddRecentGame(q_string_pair(qstr(Emu.GetBoot()), qstr("[" + m_game_data[row].info.serial + "] " + m_game_data[row].info.name)));
|
||||
Q_EMIT RequestAddRecentGame(q_string_pair(qstr(Emu.GetBoot()), qstr("[" + m_game_data[row].info.serial + "] " + m_game_data[row].info.name)));
|
||||
Refresh(true);
|
||||
}
|
||||
}
|
||||
|
@ -819,7 +819,7 @@ void game_list_frame::RepaintToolBarIcons()
|
|||
void game_list_frame::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
QDockWidget::closeEvent(event);
|
||||
game_list_frameClosed();
|
||||
Q_EMIT GameListFrameClosed();
|
||||
}
|
||||
|
||||
void game_list_frame::resizeEvent(QResizeEvent *event)
|
||||
|
|
|
@ -201,12 +201,11 @@ private Q_SLOTS:
|
|||
void Boot(int row);
|
||||
void RemoveCustomConfiguration(int row);
|
||||
void OnColClicked(int col);
|
||||
|
||||
void ShowContextMenu(const QPoint &pos);
|
||||
void ShowSpecifiedContextMenu(const QPoint &pos, int index); // Different name because the notation for overloaded connects is messy
|
||||
void doubleClickedSlot(const QModelIndex& index);
|
||||
Q_SIGNALS:
|
||||
void game_list_frameClosed();
|
||||
void GameListFrameClosed();
|
||||
void RequestIconPathSet(const std::string path);
|
||||
void RequestAddRecentGame(const q_string_pair& entry);
|
||||
void RequestIconSizeActSet(const int& idx);
|
||||
|
|
|
@ -413,5 +413,5 @@ void log_frame::UpdateUI()
|
|||
void log_frame::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
QDockWidget::closeEvent(event);
|
||||
log_frameClosed();
|
||||
Q_EMIT LogFrameClosed();
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
/** Loads from settings. Public so that main_window can call this easily. */
|
||||
void LoadSettings();
|
||||
Q_SIGNALS:
|
||||
void log_frameClosed();
|
||||
void LogFrameClosed();
|
||||
protected:
|
||||
/** Override inherited method from Qt to allow signalling when close happened.*/
|
||||
void closeEvent(QCloseEvent* event);
|
||||
|
|
|
@ -109,7 +109,7 @@ void main_window::Init()
|
|||
setWindowTitle(QString::fromStdString("RPCS3 v" + rpcs3::version.to_string()));
|
||||
!appIcon.isNull() ? setWindowIcon(appIcon) : LOG_WARNING(GENERAL, "AppImage could not be loaded!");
|
||||
|
||||
RequestGlobalStylesheetChange(guiSettings->GetCurrentStylesheetPath());
|
||||
Q_EMIT RequestGlobalStylesheetChange(guiSettings->GetCurrentStylesheetPath());
|
||||
ConfigureGuiFromSettings(true);
|
||||
|
||||
if (!utils::has_ssse3())
|
||||
|
@ -1237,7 +1237,7 @@ void main_window::CreateDockWindows()
|
|||
m_mw->setDockNestingEnabled(true);
|
||||
setCentralWidget(m_mw);
|
||||
|
||||
connect(logFrame, &log_frame::log_frameClosed, [=]()
|
||||
connect(logFrame, &log_frame::LogFrameClosed, [=]()
|
||||
{
|
||||
if (ui->showLogAct->isChecked())
|
||||
{
|
||||
|
@ -1252,7 +1252,7 @@ void main_window::CreateDockWindows()
|
|||
guiSettings->SetValue(GUI::mw_debugger, false);
|
||||
}
|
||||
});
|
||||
connect(gameListFrame, &game_list_frame::game_list_frameClosed, [=]()
|
||||
connect(gameListFrame, &game_list_frame::GameListFrameClosed, [=]()
|
||||
{
|
||||
if (ui->showGameListAct->isChecked())
|
||||
{
|
||||
|
|
|
@ -83,7 +83,7 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> xSettings, const
|
|||
}
|
||||
std::vector<std::string> selected_ls = std::vector<std::string>(selectedlle.begin(), selectedlle.end());
|
||||
xemu_settings->SaveSelectedLibraries(selected_ls);
|
||||
ToolBarRepaintRequest();
|
||||
Q_EMIT ToolBarRepaintRequest();
|
||||
});
|
||||
connect(ui->okButton, &QAbstractButton::clicked, xemu_settings.get(), &emu_settings::SaveSettings);
|
||||
connect(ui->okButton, &QAbstractButton::clicked, this, &QDialog::accept);
|
||||
|
|
Loading…
Add table
Reference in a new issue