MCPcopy Create free account
hub / github.com/deskflow/deskflow / editAction

Method editAction

src/lib/gui/dialogs/ServerConfigDialog.cpp:285–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285void ServerConfigDialog::editAction()
286{
287 int hotkeyRow = ui->listHotkeys->currentRow();
288 if (hotkeyRow < 0 || hotkeyRow >= serverConfig().hotkeys().size()) {
289 qDebug() << "Attempt to edit action from out of bounds hotkey row: " << hotkeyRow;
290 return;
291 }
292 Hotkey &hotkey = serverConfig().hotkeys()[hotkeyRow];
293
294 int actionRow = ui->listActions->currentRow();
295 if (actionRow < 0 || actionRow >= hotkey.actions().size()) {
296 qDebug() << "Attempt to remove out of bounds action row: " << actionRow;
297 return;
298 }
299 Action &action = hotkey.actions()[actionRow];
300
301 ActionDialog dlg(this, serverConfig(), hotkey, action);
302 if (dlg.exec() == QDialog::Accepted) {
303 ui->listActions->currentItem()->setText(action.text());
304 onChange();
305 }
306}
307
308void ServerConfigDialog::removeAction()
309{

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.80
setTextMethod · 0.80
textMethod · 0.45

Tested by

no test coverage detected