|
|
|
|
@ -345,20 +345,20 @@ void GameCheatSettingsWidget::onCheatListContextMenuRequested(const QPoint& pos)
|
|
|
|
|
|
|
|
|
|
QMenu context_menu(m_ui.cheatList);
|
|
|
|
|
|
|
|
|
|
QAction* add = context_menu.addAction(QIcon::fromTheme("add-line"), tr("Add Cheat..."));
|
|
|
|
|
QAction* add = context_menu.addAction(QIcon::fromTheme(QStringLiteral("add-line")), tr("Add Cheat..."));
|
|
|
|
|
connect(add, &QAction::triggered, this, &GameCheatSettingsWidget::newCode);
|
|
|
|
|
QAction* edit = context_menu.addAction(QIcon::fromTheme("mag-line"), tr("Edit Cheat..."));
|
|
|
|
|
QAction* edit = context_menu.addAction(QIcon::fromTheme(QStringLiteral("mag-line")), tr("Edit Cheat..."));
|
|
|
|
|
edit->setEnabled(selected != nullptr);
|
|
|
|
|
connect(edit, &QAction::triggered, this, [this, &selected_code]() { editCode(selected_code); });
|
|
|
|
|
QAction* remove = context_menu.addAction(QIcon::fromTheme("minus-line"), tr("Remove Cheat"));
|
|
|
|
|
QAction* remove = context_menu.addAction(QIcon::fromTheme(QStringLiteral("minus-line")), tr("Remove Cheat"));
|
|
|
|
|
remove->setEnabled(selected != nullptr);
|
|
|
|
|
connect(remove, &QAction::triggered, this, [this, &selected_code]() { removeCode(selected_code, true); });
|
|
|
|
|
context_menu.addSeparator();
|
|
|
|
|
|
|
|
|
|
QAction* disable_all = context_menu.addAction(QIcon::fromTheme("chat-off-line"), tr("Disable All Cheats"));
|
|
|
|
|
QAction* disable_all = context_menu.addAction(QIcon::fromTheme(QStringLiteral("chat-off-line")), tr("Disable All Cheats"));
|
|
|
|
|
connect(disable_all, &QAction::triggered, this, &GameCheatSettingsWidget::disableAllCheats);
|
|
|
|
|
|
|
|
|
|
QAction* reload = context_menu.addAction(QIcon::fromTheme("refresh-line"), tr("Reload Cheats"));
|
|
|
|
|
QAction* reload = context_menu.addAction(QIcon::fromTheme(QStringLiteral("refresh-line")), tr("Reload Cheats"));
|
|
|
|
|
connect(reload, &QAction::triggered, this, &GameCheatSettingsWidget::onReloadClicked);
|
|
|
|
|
|
|
|
|
|
context_menu.exec(m_ui.cheatList->mapToGlobal(pos));
|
|
|
|
|
|