Skip to content

Refactor PropertiesWindow to handle different Shape types #98

@synapticvoid

Description

@synapticvoid

Several things to consider:

  • we should have a "generic" code in PropertiesWindow displaying different widgets based on the Shape type. Each of these widget should handle their sole properties and take for granted that the right ShapeType is used. I think that this is important because the PropertiesWindow class will grow into a monster after we added a few dozen properties.
  • Right now we have ShapeType, from the PropertiesWindow viewpoint, it doesn't matter that we are working with a Canvas/Rectangle/Ellipse. What matters is that it's a ShapeBezier or a ShapeText.

A possible solution could be to used a bitfield to store ShapeBezier and ShapeCanvas. The test would look like:

if(shapeType & ShapeType::Bezier) {
...
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions