color: QDebug implementation

Makes debugging color values easier.
This commit is contained in:
itsmattkc
2020-04-04 04:18:06 +11:00
parent 87b8713b5e
commit 30be89ac2d
2 changed files with 11 additions and 0 deletions
+6
View File
@@ -181,3 +181,9 @@ QColor Color::toQColor() const
return c;
}
QDebug operator<<(QDebug debug, const Color &r)
{
debug.nospace() << "[R: " << r.red() << ", G: " << r.green() << ", B: " << r.blue() << ", A: " << r.alpha() << "]";
return debug.space();
}