Connect EditSingleParamDialog with ValueColorEdit
closes #194 (closed)
Beside connecting EditSingleParamDialog with ValueColorEdit, this MR has the following changes:
- Combine 'description' with 'instruction' in plot_type_info to remove redundancy.
- Add check in ValueColors string for number of valueColor, duplicated value, order of value
- Show error when checking ValueColors string the first time ValueColorEdit is created to help developer check if ValueColors that are added into DB not from the GUI are valid.
Edited by Lan Dam
Merge request reports
Activity
Filter activity
assigned to @ldam
requested review from @kienle
- Resolved by Kien Le
added 6 commits
- 9ce60789 - remove from plot_type key 'instruction' and combine its content to description...
- 956111f6 - implement validate_value_color_str() and its unittest
- 8aa82970 - apply validate_value_color_str in ParamDialog
- 086c655f - modify edit_single_param_dialog so it replace ValueColorEdit instead of...
- a560b371 - apply validate_value_color_str in value_color_edit and remove plot_type...
- c89cdfbd - docstring
Toggle commit listadded 6 commits
- 8b78603a - add parameter in header of error message, header is only used in Param Dialog,...
- fd2a0643 - add to ValueColorEdit arguments: is_first_created, row_id, param; print...
- 115dc5dd - add to EditSingleParamDialog is_value_color_first_created param
- 98b4105a - ParamDialog: add param is_value_color_first_created; add in arguments passed...
- 4aa1f8ec - modify some pattern to accept empty string
- 13c73c9f - fix unittest to match with changes
Toggle commit listremoved review request for @kienle
requested review from @kienle
added 4 commits
- 669b5d61 - remove self.is_value_color_first_created, correct param sent to...
- d3e2c41d - remove is_value_color_first_created, correct para passed to ValueColorEdit,...
- b2c8a832 - remove is_first_created in value_color_edit
- ee81ceb2 - validate_value_color_str: remove arguments rowid and param, remove header in...
Toggle commit listremoved review request for @kienle
requested review from @kienle
227 225 f"when no Plot Type is selected.") 228 226 else: 229 msg = (f"Row {row_id}: No ValueColors is required for " 227 msg = (f"{header}No ValueColors is required for " 230 228 f"Plot Type {plot_type}.") 231 229 return False, msg 232 230 return True, '' 233 231 232 def validate_database_content(self): 233 for row_id, row_content in enumerate(self.database_rows): 234 is_row_valid, msg = self.validate_row(row_id, row_content) 235 if not is_row_valid: 236 QMessageBox.critical( 237 self, f'Validation Failed on {row_content[0]}', msg) 238 print(msg) # Show on terminal to track back later. 239 return True, '' changed this line in version 8 of the diff