| 1164 | } |
| 1165 | |
| 1166 | void MacroActionVariableEdit::UpdateEntryData() |
| 1167 | { |
| 1168 | if (!_entryData) { |
| 1169 | return; |
| 1170 | } |
| 1171 | |
| 1172 | _variables->SetVariable(_entryData->_variable); |
| 1173 | _variables2->SetVariable(_entryData->_variable2); |
| 1174 | _actions->setCurrentIndex( |
| 1175 | _actions->findData(static_cast<int>(_entryData->_action))); |
| 1176 | _strValue->setPlainText(_entryData->_strValue); |
| 1177 | _numValue->SetValue(_entryData->_numValue); |
| 1178 | _segmentIdx->SetValue(_entryData->GetSegmentIndexValue() + 1); |
| 1179 | _segmentIdx->SetMacro(_entryData->GetMacro()); |
| 1180 | _segmentIdx->SetType( |
| 1181 | _entryData->_action == |
| 1182 | MacroActionVariable::Action::SET_CONDITION_VALUE |
| 1183 | ? MacroSegmentSelection::Type::CONDITION |
| 1184 | : MacroSegmentSelection::Type::ACTION); |
| 1185 | _subStringStart->SetValue(_entryData->_subStringStart); |
| 1186 | _subStringSize->SetValue(_entryData->_subStringSize); |
| 1187 | _subStringRegex->SetRegexConfig(_entryData->_subStringRegex); |
| 1188 | _findRegex->SetRegexConfig(_entryData->_findRegex); |
| 1189 | _regexPattern->setPlainText( |
| 1190 | QString::fromStdString(_entryData->_regexPattern)); |
| 1191 | _regexMatchIdx->SetValue(_entryData->_regexMatchIdx); |
| 1192 | _findStr->setPlainText(_entryData->_findStr); |
| 1193 | _replaceStr->setPlainText(_entryData->_replaceStr); |
| 1194 | _mathExpression->setText(_entryData->_mathExpression); |
| 1195 | _useCustomPrompt->setChecked(_entryData->_useCustomPrompt); |
| 1196 | _inputPrompt->setText(_entryData->_inputPrompt); |
| 1197 | _useInputPlaceholder->setChecked(_entryData->_useInputPlaceholder); |
| 1198 | _inputPlaceholder->setText(_entryData->_inputPlaceholder); |
| 1199 | _envVariable->setText(_entryData->_envVariableName); |
| 1200 | _scenes->SetScene(_entryData->_scene); |
| 1201 | _tempVars->SetVariable(_entryData->_tempVar); |
| 1202 | _sceneItemIndex->SetValue(_entryData->_sceneItemIndex); |
| 1203 | _direction->setCurrentIndex(static_cast<int>(_entryData->_direction)); |
| 1204 | _stringLength->SetValue(_entryData->_stringLength); |
| 1205 | _paddingCharSelection->setText( |
| 1206 | QChar::fromLatin1(_entryData->_paddingChar)); |
| 1207 | _caseType->setCurrentIndex( |
| 1208 | _caseType->findData(static_cast<int>(_entryData->_caseType))); |
| 1209 | _randomNumberStart->SetValue(_entryData->_randomNumberStart); |
| 1210 | _randomNumberEnd->SetValue(_entryData->_randomNumberEnd); |
| 1211 | _generateInteger->setChecked(_entryData->_generateInteger); |
| 1212 | _allowRepeatValues->setChecked(_entryData->_allowRepeatValues); |
| 1213 | _randomValues->SetStringList(_entryData->_randomValues); |
| 1214 | _jsonQuery->setText(_entryData->_jsonQuery); |
| 1215 | _jsonIndex->SetValue(_entryData->_jsonIndex); |
| 1216 | _jsonExtractSingle->setChecked(_entryData->_jsonQueryExtractSingle); |
| 1217 | |
| 1218 | SetWidgetVisibility(); |
| 1219 | } |
| 1220 | |
| 1221 | void MacroActionVariableEdit::VariableChanged(const QString &text) |
| 1222 | { |
nothing calls this directly
no test coverage detected