diff options
| author | 2016-11-03 17:37:58 +0100 | |
|---|---|---|
| committer | 2016-11-03 17:37:58 +0100 | |
| commit | 3469ef7a412d82c2ea8c341ea58aa9b3d8aba22e (patch) | |
| tree | 8c8185f7dcfaabd492cee10643a0cb6398ac4ad3 /booleancondition.cpp | |
| parent | 9d389e561339e4fd7a68d60f593ad233e3941d13 (diff) | |
| download | OneRoll-3469ef7a412d82c2ea8c341ea58aa9b3d8aba22e.tar.gz OneRoll-3469ef7a412d82c2ea8c341ea58aa9b3d8aba22e.zip | |
-Add differentThan logical operator
Diffstat (limited to 'booleancondition.cpp')
| -rw-r--r-- | booleancondition.cpp | 8 |
1 files changed, 8 insertions, 0 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; } } |