MCPcopy Create free account
hub / github.com/Project-LemonLime/Project_LemonLime / editButtonClicked

Method editButtonClicked

src/environmentvariablesdialog.cpp:69–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69void EnvironmentVariablesDialog::editButtonClicked() {
70 int index = ui->valueViewer->currentRow();
71 auto *dialog = new EditVariableDialog(this);
72 dialog->setWindowTitle(tr("Edit Variable"));
73 dialog->setVariableName(ui->valueViewer->item(index, 0)->text());
74 dialog->setVariableValue(ui->valueViewer->item(index, 1)->text());
75
76 if (dialog->exec() == QDialog::Accepted) {
77 ui->valueViewer->setItem(index, 0, new QTableWidgetItem(dialog->getVariableName()));
78 ui->valueViewer->setItem(index, 1, new QTableWidgetItem(dialog->getVariableValue()));
79 }
80
81 delete dialog;
82}
83
84void EnvironmentVariablesDialog::deleteButtonClicked() {
85 int index = ui->valueViewer->currentRow();

Callers

nothing calls this directly

Calls 4

setVariableNameMethod · 0.80
setVariableValueMethod · 0.80
getVariableNameMethod · 0.80
getVariableValueMethod · 0.80

Tested by

no test coverage detected