Skip to content

Commit e1d7023

Browse files
committed
improves NodeValidationState struct
1 parent 129d414 commit e1d7023

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

include/QtNodes/internal/NodeDelegateModel.hpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@ namespace QtNodes {
1919
struct NodeValidationState
2020
{
2121
enum class State : int {
22-
Valid, /// All required inputs are present and correct.
23-
Warning, /// Some inputs are missing or questionable, processing may be unreliable.
24-
Error /// Inputs or settings are invalid, preventing successful computation.
22+
Valid = 0, ///< All required inputs are present and correct.
23+
Warning = 1, ///< Some inputs are missing or questionable, processing may be unreliable.
24+
Error = 2, ///< Inputs or settings are invalid, preventing successful computation.
2525
};
26+
bool isValid() { return _state == State::Valid; };
27+
QString const message() { return _stateMessage; }
28+
State state() { return _state; }
29+
2630
State _state{State::Valid};
2731
QString _stateMessage{""};
2832
};

0 commit comments

Comments
 (0)