src/objecttypes/modelobject.cpp

changeset 13
6e838748867b
parent 8
44679e468ba9
--- a/src/objecttypes/modelobject.cpp	Sun Nov 03 17:57:21 2019 +0200
+++ b/src/objecttypes/modelobject.cpp	Sun Nov 03 18:09:47 2019 +0200
@@ -18,27 +18,27 @@
 	return id;
 }
 
-modelobjects::BaseObject::BaseObject() :
+linetypes::Object::Object() :
 	id {getIdForNewObject()}
 {
 }
 
-modelobjects::BaseObject::~BaseObject()
+linetypes::Object::~Object()
 {
 }
 
-bool modelobjects::BaseObject::hasColor() const
+bool linetypes::Object::hasColor() const
 {
 	return false;
 }
 
-QVariant modelobjects::BaseObject::getProperty(Property id) const
+QVariant linetypes::Object::getProperty(Property id) const
 {
 	Q_UNUSED(id);
 	return {};
 }
 
-auto modelobjects::BaseObject::setProperty(Property id, const QVariant& value)
+auto linetypes::Object::setProperty(Property id, const QVariant& value)
 	-> SetPropertyResult
 {
 	Q_UNUSED(id)
@@ -46,43 +46,43 @@
 	return SetPropertyResult::PropertyNotHandled;
 }
 
-QBrush modelobjects::BaseObject::textRepresentationForeground() const
+QBrush linetypes::Object::textRepresentationForeground() const
 {
 	return {};
 }
 
-QBrush modelobjects::BaseObject::textRepresentationBackground() const
+QBrush linetypes::Object::textRepresentationBackground() const
 {
 	return {};
 }
 
-QFont modelobjects::BaseObject::textRepresentationFont() const
+QFont linetypes::Object::textRepresentationFont() const
 {
 	return {};
 }
 
-modelobjects::ColoredBaseObject::ColoredBaseObject(const Color color_index) :
-	color_index{color_index}
+linetypes::ColoredObject::ColoredObject(const Color color_index) :
+	colorIndex{color_index}
 {
 }
 
-bool modelobjects::ColoredBaseObject::hasColor() const
+bool linetypes::ColoredObject::hasColor() const
 {
 	return true;
 }
 
-QVariant modelobjects::ColoredBaseObject::getProperty(Property id) const
+QVariant linetypes::ColoredObject::getProperty(Property id) const
 {
 	switch (id)
 	{
 	case Property::Color:
-		return color_index.index;
+		return colorIndex.index;
 	default:
-		return BaseObject::getProperty(id);
+		return Object::getProperty(id);
 	}
 }
 
-auto modelobjects::ColoredBaseObject::setProperty(Property id, const QVariant& value)
+auto linetypes::ColoredObject::setProperty(Property id, const QVariant& value)
 	-> SetPropertyResult
 {
 	switch (id)
@@ -93,7 +93,7 @@
 			const int value_int = value.toInt(&ok);
 			if (ok)
 			{
-				color_index.index = value_int;
+				colorIndex.index = value_int;
 				return SetPropertyResult::Success;
 			}
 			else
@@ -102,11 +102,11 @@
 			}
 		}
 	default:
-		return BaseObject::setProperty(id, value);
+		return Object::setProperty(id, value);
 	}
 }
 
-QString modelobjects::Empty::textRepresentation() const
+QString linetypes::Empty::textRepresentation() const
 {
 	return "";
 }

mercurial