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:
@@ -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 << ")";
|
||||
|
||||
Reference in New Issue
Block a user