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

Method addButtonClicked

src/environmentvariablesdialog.cpp:54–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void EnvironmentVariablesDialog::addButtonClicked() {
55 auto *dialog = new EditVariableDialog(this);
56 dialog->setWindowTitle(tr("Add New Variable"));
57
58 if (dialog->exec() == QDialog::Accepted) {
59 ui->valueViewer->setRowCount(ui->valueViewer->rowCount() + 1);
60 ui->valueViewer->setItem(ui->valueViewer->rowCount() - 1, 0,
61 new QTableWidgetItem(dialog->getVariableName()));
62 ui->valueViewer->setItem(ui->valueViewer->rowCount() - 1, 1,
63 new QTableWidgetItem(dialog->getVariableValue()));
64 }
65
66 delete dialog;
67}
68
69void EnvironmentVariablesDialog::editButtonClicked() {
70 int index = ui->valueViewer->currentRow();

Callers

nothing calls this directly

Calls 2

getVariableNameMethod · 0.80
getVariableValueMethod · 0.80

Tested by

no test coverage detected