Skip to content

Commit

Permalink
need separate enum for polyline/polygon
Browse files Browse the repository at this point in the history
  • Loading branch information
keenanlang committed Aug 5, 2024
1 parent ca06625 commit 264113e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions gestalt/convert/qt/QtGenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
"Dashed" : Enum("caGraphics::Dash"),
}

line_conversion = {
"Solid" : Enum("caPolyLine::Solid"),
"Dashed" : Enum("caPolyLine::Dash"),
}

class QtGenerator(GestaltGenerator):
def generateWidget(self, original, macros={}):
return QtWidget(original.classname, node=original, macros=macros)
Expand Down Expand Up @@ -185,7 +190,7 @@ def generatePolygon(self, node, macros={}):
output.link("foreground", "background")
output.link("lineSize", "border-width")
output.link("lineColor", "border-color")
output.link("linestyle", "border-style", conversion=border_conversion)
output.link("linestyle", "border-style", conversion=line_conversion)

output["polystyle"] = Enum("caPolyLine::Polygon")
output["fillstyle"] = Enum("caPolyLine::Filled")
Expand All @@ -211,7 +216,7 @@ def generatePolyline(self, node, macros={}):

output.link("lineSize", "border-width")
output.link("lineColor", "border-color")
output.link("linestyle", "border-style", conversion=border_conversion)
output.link("linestyle", "border-style", conversion=line_conversion)

output["polystyle"] = Enum("caPolyLine::Polyline")
output["fillstyle"] = Enum("caPolyLine::Outline")
Expand Down

0 comments on commit 264113e

Please sign in to comment.