diff options
| -rw-r--r-- | booleancondition.cpp | 8 | ||||
| -rw-r--r-- | booleancondition.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/booleancondition.cpp b/booleancondition.cpp index 83076e0..585620a 100644 --- a/booleancondition.cpp +++ b/booleancondition.cpp @@ -58,6 +58,9 @@ qint64 BooleanCondition::hasValid(Die* b,bool recursive,bool unhighlight) const case LesserOrEqual: sum+= (value<=m_value)?1:0; break; + case Different: + sum+= (value!=m_value)?1:0; + break; } } if((unhighlight)&&(sum==0)) @@ -101,6 +104,9 @@ QString BooleanCondition::toString() case LesserOrEqual: str.append(QStringLiteral("<=")); break; + case Different: + str.append(QStringLiteral("!=")); + break; } return QStringLiteral("[%1%2]").arg(str).arg(m_value); } @@ -118,5 +124,7 @@ quint64 BooleanCondition::getValidRangeSize(quint64 faces) const return faces-(m_value-1); case LesserOrEqual: return m_value; + case Different: + return faces-1; } } diff --git a/booleancondition.h b/booleancondition.h index 55a6b12..fa178b2 100644 --- a/booleancondition.h +++ b/booleancondition.h @@ -31,7 +31,7 @@ class BooleanCondition : public Validator { public: - enum LogicOperator { Equal, GreaterThan, LesserThan, GreaterOrEqual, LesserOrEqual}; + enum LogicOperator { Equal, GreaterThan, LesserThan, GreaterOrEqual, LesserOrEqual, Different}; BooleanCondition(); virtual qint64 hasValid(Die* b,bool recursive, bool unhighlight = false) const; |