These changes are added by carlopav in pull request #3102.
We add them in this commit already so that this branch and
that branch are easier to rebase and merge.
Previously it was placed in the `annotation` category
but since it creates a group of shapes, it is better
in the `creation` category.
Also small fixes in the menu text and tooltip.
Small spacing fixes like imports in separate lines
for more clarity, and the position of the license.
Added many docstrings to clarify the methods, and spaces
after commas in order to comply with Python PEP8 style.
Also break many lines so that they are shorter than 80 characters.
Small spacing fixes like imports in separate lines
for more clarity, the module docstrings,
and the position of the license.
Remove unnecessary check for the graphical interface
as this command should be imported when the interface
is already up and running.
Use proper `ToDo` class instead of importing `DraftGui`.
Small spacing fixes like imports in separate lines
for more clarity, the module docstring,
and the position of the license.
Remove unnecessary check for the graphical interface
as this command should be imported when the interface
is already up and running.
Use proper `ToDo` class instead of importing `DraftGui`.
Small spacing fixes like imports in separate lines
for more clarity, the module docstring,
the position of the license, and trailing spaces.
Remove unnecessary check for the graphical interface
as this command should be imported when the interface
is already up and running.
Properly import `gui_trackers` module and use tracker
classes prefixed accordingly.
Small spacing fixes like imports in separate lines
for more clarity, the module docstring,
and the position of the license.
Remove unnecessary check for the graphical interface
as this command should be imported when the interface
is already up and running.
Use proper `ToDo` class instead of importing `DraftGui`.
Small spacing fixes like imports in separate lines
for more clarity, the module docstring,
and the position of the license.
Remove unused imports. And use proper `ToDo` class
instead of importing `DraftGui`.
Small spacing fixes like imports in separate lines
for more clarity, and the position of the license.
Also fix copying of a list in order to keep compatibility
with Python 2.
Small spacing fixes like imports in separate lines
for more clarity, and the position of the license.
Cleaned up the class docstring, so it is in only one place
below the class definition. Also small fixes
in the docstrings of the class methods.
The class is now in upper case `Plane` to conform with Python
guidelines. An alias in lowercase `plane` is still provided
for compatibility purposes; this will be deprecated
in the future.
Small spacing fixes like imports in separate lines
for more clarity, and the position of the license.
Also use the new `messages` module to provide the functions
to print text to the console.
Also use `Matrix` prefixed by the `FreeCAD` module.
Small spacing fixes like imports in separate lines
for more clarity, and the position of the license.
Also use the `ToDo` class with this new name
following Python guidelines.
Small spacing fixes like imports in separate lines
for more clarity, and the position of the license.
Also use the new `messages` module to provide
the functions to print text to the console.
Use two `DEBUG` variables to print information about
the `ToDo` class in order to see the scheduled commands
when the graphical commands are executed.
Small spacing fixes like imports in separate lines
for more clarity, and the position of the license.
Also use the new `messages` module to provide the functions
to print text to the console.
Small spacing fixes like imports in separate lines
for more clarity, and the position of the license.
Also use the new `messages` module to provide the functions
to print text to the console.
Small spacing fixes like imports in separate lines for
more clarity, and the position of the license.
Also use the class name `ToDo` in `CamelCase`,
as it is indicated in Python guidelines for classes.
==========================================================
Changes:
- Move multIcon structure to be internal to TaskSketcherElements class
- Change Caps to MultIcon for consistency
- Move tamperIcon from TaskSketcherElements to MultIcon struct
- Change tamperIcon method to be the constructor of MultIcon and change from struct to class
- Update the tamperIcon algorithm, so that only the point that is not marked in green as selected
is made pink.
Bug fix:
UpdateIcons and SlotElementsChanged are methods sharing code (they could benefit from a refactoring), but
they are conceptually different and are called in very different circumnstances.
UpdateIcons preserves selection. This means that one may select the stating point of line1, press z to switch
to edges, select the edge of line 2 and do a point on object constraint all without touching the 3D view.
SlotElementsChanged occurs when there are additions or removals in the number of geometry elements of the widget.
Warning:
This code requires QT 5.6 because of function pixelColour(int, int):
https://doc.qt.io/qt-5/qimage.html#pixelColor-1
Travis without QT5 complains with:
/home/travis/build/FreeCAD/FreeCAD/src/Mod/Sketcher/Gui/TaskSketcherElements.cpp:1120:31: error: ‘class QImage’ has no member named ‘pixelColor’; did you mean ‘setColor’?