Base: Move App::Color to Base

Every basic data type is stored in Base module, color is standing out as
one that does not. Moving it to Base opens possibilities to integrate it
better with the rest of FreeCAD.
This commit is contained in:
Kacper Donat
2025-02-15 22:58:19 +01:00
parent 145af5cddc
commit a72a63232a
215 changed files with 1057 additions and 1054 deletions

View File

@@ -142,7 +142,7 @@ QString MaterialProperty::getYAMLString() const
return _valuePtr->getYAMLString();
}
App::Color MaterialProperty::getColor() const
Base::Color MaterialProperty::getColor() const
{
auto colorString = getValue().toString();
std::stringstream stream(colorString.toStdString());
@@ -163,7 +163,7 @@ App::Color MaterialProperty::getColor() const
stream >> alpha;
}
App::Color color(red, green, blue, alpha);
Base::Color color(red, green, blue, alpha);
return color;
}
@@ -410,7 +410,7 @@ void MaterialProperty::setURL(const QString& value)
_valuePtr->setValue(QVariant(value));
}
void MaterialProperty::setColor(const App::Color& value)
void MaterialProperty::setColor(const Base::Color& value)
{
std::stringstream ss;
ss << "(" << value.r << ", " << value.g << ", " << value.b << ", " << value.a << ")";