This includes `array`, `base`, `bezcurve`, `block`, `bspline`,
`circle`, `clone`, `dimension`, `draft_annotation`, `draftlink`,
`drawingview`, `ellipse`, `facebinder`, `fillet`, `label`,
`patharray`, `point`, `pointarray`, `polygon`, `rectangle`,
`shape2dview`, `shapestring`, `text`, `wire`, `wwproxy`.
These are added to the `draftobjects` Doxygen group
so that the functions and classes contained in each module
are listed appropriately in the automatically generated
documentation.
When `LabelType` is `'Custom'`, the `Target` property
is hidden and `CustomText` is shown.
For other values of `LabelType`, `Target` is shown,
and in turn `CustomText` is hidden.
This avoids showing unused information in the property editor.
We use smaller functions to return a list of strings corresponding
to each basic value of `LabelType`. Then the final `Text` value
can be defined as a simple value, or as the concatenation
of two smaller lists, depending on the value of `LabelType`.
Since we have 8 basic values, we could return up to 8^2
combinations, but at the moment we only return 8 basic
values and 5 simple combinations, which are the ones
that make the most sense.
In the future we could define new properties, say, `LabelType2`
and `LabelType3`, to be able to combine two or three types
of strings in an arbitrary fashion. At the moment, the possible
combinations are hard coded in `LabelType`.
Instead of placing the entire code in the `execute` method,
a `return_info` function is used to return the specific string
that we wish to display depending on the `Target` object,
the `LabelType`, and subelement in `Target`, if any.
We also make the code more readable by using smaller variables,
and avoiding notations with lists of lists (`variable[0][1][6:]`).
There are three general types of properties, target, leader,
and label; so we set the 9 properties using three functions,
and provide better documentation in the tooltips
for each property.
Also perform several improvements such as PEP8 cleanup,
writing complete docstrings, type checking the input arguments,
and deprecating the older call.
Update `Draft.py`, the Gui Command, the unit test, and test script
as well.
- corrected super() methods to be Py2 compatible
- further cleanup of the code.
further cleanup
changed again to avoid super method
updated super() functions
updated to correct the parent classess targeted by super()