Refactor MaskItems to remove the SessionItem mechanism (Major change)
The following modifications are made to remove the SessionItem
mechanism from MaskItems
.
The SessionItem-Tags and SessionItem-Properties are replaced by simple data members. The most complicated part is replacing the T_MASKS
and T_POINTS
SessionItem-Tags.
-
MaskItem
:P_IS_VISIBLE => bool
P_MASK_VALUE => bool
- rm unused method
maskValueItem
-
MaskContainerItem
:T_MASKS => QVector<MaskItem*>
-
PolygonItem
:T_POINTS => QVector<PolygonPointItem*>
P_ISCLOSED => bool
-
RectangleItem
:xLow, xUp, yLow, yUp => double
-
VerticalLineItem
:P_POSX => double
-
EllipseItem
:P_XCENTER, P_YCENTER, P_XRADIUS, P_YRADIUS, P_ANGLE => double
-
PolygonPointItem
:P_POSX, P_POSY => double
-
HorizontalLineItem
:P_POSY => double
-
MaskGraphicsScene
:updateViews
andprocessPolygonItem
refactored according to the new implementation ofPolygonItem
. -
MaskItems
refactored according to the new implementation ofMaskContainerItem
. -
ItemizeSimulation
: Correct the mask appending mechanism. -
TestMapperForItem
: DisabledTwoWidgetsSubscription
because the test works only with theSessionItem
mechanism, but theSessionItem
mechanism is removed fromHorizontalLineItem
. Hence, the test is disabled.
The serialization mechanism is also corrected.
Known bug: Bringing a polygon mask forward/backward leads to a crash. Yet this is related to the SessionModel
, which is out of the scope of the current refactoring stage. See the TODO note for MaskEditorActions::changeMaskStackingOrder
.
Related to issue #89 (closed)