Currently a filter can report an error with their configuration (at best called when they're refreshed) through AddErrorMessage(title, message).
I suggest more generic approach with different Message severity.
- Info (green)
- Warning (yellow)
- Error (red)
Perhaps the UI could expose a switch what minimum severity to display.
I suppose a forth lowest option "Debug" (blue) could also be an option.
That change would require the following adjustment.
- Creation of a
FlowGraphNodeMessage struct containing the attributes title, message, severity
- Removing the current m_errorLog and m_errorTitle members in FlowGraphNode.
- Adding a
m_messages of type std::vector<FlowGraphNodeMessage> I don't see many messages in one single node requiring a more sophisticated data structure
- Remove GetErrorLog and GetErrorTitle and instead implement
GetMostUrgentMessage(), which goes through the messages and returns the most urgent one
- Propably another Helper for GetHighestMessageSeverity(), which acts on the severity of GetMostUrgentMessage. Can be used for the drawing code in FilterGraphEditor.
- A Base method for AddMessage to the FlowGraphNode, which takes a created FlowGraphNodeMessage and then respective specializations for each severity, which only require a title and message following the current implementation of
AddErrorMessage
- Modify the FilterGraphEditor ngscopeclient drawing to take the highest severity message and simply adjust the color.
- Modify the Errors-Pane in ngscopeclient to the new API
Further work would then include extending the Errors-Pane in ngscopeclient to include a column severity and the option to sort by that.
Currently a filter can report an error with their configuration (at best called when they're refreshed) through AddErrorMessage(title, message).
I suggest more generic approach with different Message severity.
Perhaps the UI could expose a switch what minimum severity to display.
I suppose a forth lowest option "Debug" (blue) could also be an option.
That change would require the following adjustment.
FlowGraphNodeMessagestruct containing the attributes title, message, severitym_messagesof typestd::vector<FlowGraphNodeMessage>I don't see many messages in one single node requiring a more sophisticated data structureGetMostUrgentMessage(), which goes through the messages and returns the most urgent oneAddErrorMessageFurther work would then include extending the Errors-Pane in ngscopeclient to include a column severity and the option to sort by that.