]> Shamusworld >> Repos - architektonas/blobdiff - src/object.cpp
Various fixes to Container/Group handling, added DrawArcAction.
[architektonas] / src / object.cpp
index 925d9b4ceeeae7f6ef816da797d697bbf1327887..fc8d834cf08fddeac06add6323008458647f26c8 100644 (file)
@@ -26,10 +26,16 @@ int Object::viewportHeight = 0;
 bool Object::deleteActive = false;
 bool Object::dimensionActive = false;
 bool Object::snapToGrid = true;
+//snapToPoints all well here?
+bool Object::ignoreClicks = false;
+bool Object::dontMove = false;
+bool Object::selectionInProgress = false;
+QRectF Object::selection;
 
 
-Object::Object(): position(Vector(0, 0)), parent(0), state(OSInactive), oldState(OSInactive),
-       needUpdate(false)//, attachedDimension(0)
+Object::Object(): position(Vector(0, 0)), parent(0), type(OTObject),
+       state(OSInactive), oldState(OSInactive), needUpdate(false)
+       //, attachedDimension(0)
 {
 }
 
@@ -81,6 +87,12 @@ printf("Object: Destroyed!\n");
 }
 
 
+/*virtual*/ bool Object::HitTest(Point)
+{
+       return false;
+}
+
+
 // This is intended to be overridden by the Container class, for object morphing
 /*virtual*/ void Object::Transmute(Object *, Object *)
 {
@@ -162,6 +174,37 @@ printf("Object: Destroyed!\n");
 }
 
 
+/*virtual*/ QRectF Object::Extents(void)
+{
+       // Generic object returns an empty rect...
+       return QRectF();
+}
+
+
+#if 0
+/*virtual*/ ObjectType Object::Type(void)
+{
+       return OTObject;
+}
+#endif
+
+
+/*virtual*/ void Object::Translate(Vector amount)
+{
+       position += amount;
+}
+
+
+/*virtual*/ void Object::Rotate(Vector, double)
+{
+}
+
+
+/*virtual*/ void Object::Scale(Vector, double)
+{
+}
+
+
 ObjectState Object::GetState(void)
 {
        return state;