| 148 | QString valu; |
| 149 | |
| 150 | foreach (QString paramName, scriptParams) |
| 151 | { |
| 152 | valu = scriptEngine->globalObject().property(paramName).toString(); |
| 153 | qDebug() << paramName << " - " << valu; |
| 154 | bool found = false; |
| 155 | for (int i = 0; i < widget->rowCount(); i++) |
| 156 | { |
| 157 | if (widget->item(i, 0) && widget->item(i, 0)->text().compare(paramName) == 0) |
| 158 | { |
| 159 | found = true; |
| 160 | if (!widget->item(i, 1)->isSelected()) |
| 161 | { |
| 162 | widget->item(i,1)->setText(valu); |
| 163 | } |
| 164 | break; |
| 165 | } |
| 166 | } |
| 167 | if (!found) |
| 168 | { |
| 169 | int row = widget->rowCount(); |
| 170 | widget->insertRow(widget->rowCount()); |
| 171 | QTableWidgetItem *item; |
| 172 | item = new QTableWidgetItem(); |
| 173 | item->setText(paramName); |
| 174 | item->setFlags(Qt::ItemIsEnabled); |
| 175 | widget->setItem(row, 0, item); |
| 176 | item = new QTableWidgetItem(); |
| 177 | item->setText(valu); |
| 178 | widget->setItem(row, 1, item); |
| 179 | } |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | void ScriptContainer::updateParameter(QString name, QString value) |
nothing calls this directly
no test coverage detected