View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0000477||FreeCAD||Feature||public||2011-11-10 15:28||2021-02-06 06:49|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Summary||0000477: Proper interface for edit modes of view provider|
|Tags||No tags attached.|
There is a new class ActionFunction which allows you to connect a QAction with a standard C++ member function of a class that is not inherited from QObject.
So, this makes it quite easy to use with the view providers. There is an example for MeshGui::ViewProvider.
In the setupContextMenu method you get a pointer to a QMenu instance where you can add further items with addAction. The returned QAction instance then can be connected with a member function of the view provider using the ActionFunction class.
Since you can use arbitrary member functions (but the argument and return type must be void) this solution can be considered as an alternative to the setEdit function.
||See also: https://forum.freecadweb.org/viewtopic.php?f=22&t=21330|
||Also see wmayer's comment 0001954:0007874|
||This ticket has been migrated to GitHub as issue 5546.|
FreeCAD: master 9ce46db8
2015-03-31 01:02:16Details Diff
|+ extend ActionFunction and use in mesh view provider||
|mod - src/Gui/ActionFunction.cpp||Diff File|
|mod - src/Gui/ActionFunction.h||Diff File|
|mod - src/Mod/Mesh/Gui/ViewProvider.cpp||Diff File|
|mod - src/Mod/Mesh/Gui/ViewProvider.h||Diff File|
FreeCAD: master 048da480
Committer: wmayer Details Diff
|Part: activate Part_ColorPerFace in the menu and toolbar
According to the source this command was deactivated until issue 0000477
and hence 0001954 could be solved. However, since those issues
haven't been addressed the command has remained hidden for a long time.
This command does not work with objects that reimplement
their edit modes, meaning that it may work with Part and PartDesign
created objects but not with Draft and Arch objects.
The command is added to the standard `View` menu,
and to one `Part tools` toolbar so that it is no longer hidden.
The limitations of the command can be described in the documentation,
and then somebody else can help solve the problem
with the edit modes.
A new icon for the command is also provided.
|mod - src/Mod/Part/Gui/Command.cpp||Diff File|
|mod - src/Mod/Part/Gui/Resources/Part.qrc||Diff File|
|add - src/Mod/Part/Gui/Resources/icons/tools/Part_ColorFace.svg||Diff File|
|mod - src/Mod/Part/Gui/Workbench.cpp||Diff File|
|2011-11-10 15:28||wmayer||New Issue|
|2011-11-10 18:01||wmayer||Target Version||=> 0.13|
||Note Added: 0001337|
||Assigned To||=> Jriegel|
||Status||new => acknowledged|
||Target Version||0.13 => 0.14|
|2014-06-25 12:09||wmayer||Target Version||0.14 => 0.15|
|2014-12-31 19:37||normandc||Description Updated|
|2015-01-25 16:14||yorik||Target Version||0.15 =>|
|2015-03-31 08:20||wmayer||Changeset attached||=> FreeCAD Master master 9ce46db8|
|2015-03-31 08:38||wmayer||Note Added: 0005958|
|2017-01-19 12:20||wmayer||Relationship added||related to 0001954|
|2017-03-20 13:52||wmayer||Note Added: 0008659|
|2017-06-30 12:14||Kunda1||Note Added: 0009622|
|2018-06-13 13:25||Kunda1||Assigned To||Jriegel =>|
|2018-06-13 13:25||Kunda1||Note Added: 0011421|
|2020-10-13 12:30||wmayer||Changeset attached||=> FreeCAD master 048da480|
|2021-02-06 06:49||abdullah||Target Version||=> 0.20|