Gui Command: Difference between revisions
No edit summary |
(Marked this version for translation) |
||
(42 intermediate revisions by 15 users not shown) | |||
Line 1: | Line 1: | ||
<languages/> |
|||
The GuiCommand is one of the most important functions of FreeCAD |
|||
{{TOCright}} |
|||
in the main interaction point of the user. Every time the user |
|||
<translate> |
|||
selects a menu item or presses a toolbar button it activates a |
|||
GuiCommand. Some of the attributes of a GuiCommand are: |
|||
<!--T:1--> |
|||
The GuiCommand is one of the most important functions of FreeCAD in the main interaction point of the user. Every time the user selects a menu item or presses a toolbar button it activates a GuiCommand. Some of the attributes of a GuiCommand are: |
|||
* Defines a name |
* Defines a name |
||
* Contains an icon |
* Contains an icon |
||
Line 9: | Line 11: | ||
* Opens and controls dialogs |
* Opens and controls dialogs |
||
* Macro recording |
* Macro recording |
||
* and |
* and others. |
||
== Naming == <!--T:19--> |
|||
The GuiCommand is named in a certain way: ''ModuleName_CommandName'' |
|||
e.g "Base_Open" this is the Open Gui Command in the Base system. |
|||
The GuiCommand in a certain module is named with the module name |
|||
in front e.g. "Part_Cylinder". |
|||
<!--T:2--> |
|||
⚫ | |||
The GuiCommand is named in a standard way: ''ModuleName_CommandName'' e.g., "[[Base_Open|Base_Open]]" this is the Open Gui Command in the Base system. The GuiCommand in a certain module is named with the module name in front e.g., "[[Part_Cylinder|Part_Cylinder]]". |
|||
Every GuiCommand has to have a help page. The help page is hosted in the |
|||
FreeCAD docu wiki. The article has the same name as the GuiCommand, e.g. [[Part_Cylinder]]. |
|||
<!--T:3--> |
|||
⚫ | |||
If the documentation is not finished use [[Template:UnfinishedDocu]]. |
|||
[[GuiCommand model]] |
|||
⚫ | |||
<!--T:4--> |
|||
Every GuiCommand has to have a help page. The help page is hosted on the FreeCAD documentation wiki. The article has the same name as the GuiCommand, e.g. [[Draft_ShapeString|Draft ShapeString]]. |
|||
<!--T:5--> |
|||
⚫ | |||
<!--T:6--> |
|||
Example: |
Example: |
||
* [[Draft_ShapeString|Draft ShapeString]] |
|||
* [[Part_Cylinder]] |
|||
* [[ |
* [[Draft_Line|Draft Line]] |
||
⚫ | |||
<!--T:21--> |
|||
⚫ | |||
<!--T:8--> |
|||
⚫ | |||
<!--T:9--> |
|||
All icons should be created in [[SVG|SVG]] format with a vector image application, such as [http://inkscape.org Inkscape]. This makes it easier to apply changes and derive additional icons in the same application space. |
|||
===Icons color coding chart=== <!--T:10--> |
|||
<!--T:11--> |
|||
[[Image:Colorchart.png|200px]] |
|||
<!--T:12--> |
|||
⚫ | |||
We try as much as possible to respect this chart, so the color of the icons has a direct meaning. |
|||
⚫ | |||
⚫ | |||
</translate> |
|||
=== Quality requirements === |
|||
{{Powerdocnavi{{#translation:}}}} |
|||
There are a lot of GuiCommands (Features) in FreeCAD which are experimental |
|||
or used shortly for implementation purposes. These GuiCommands are mostly in |
|||
the dedicated workbenches like Part, Mesh or Cam. |
|||
To ensure a good user experience the workbench ''Complete'' was created. This |
|||
is the default start workbench of FreeCAD and incorporates all GuiCommands |
|||
which meet certain '''Quality requirements''' which are described here: |
Latest revision as of 09:05, 16 August 2022
The GuiCommand is one of the most important functions of FreeCAD in the main interaction point of the user. Every time the user selects a menu item or presses a toolbar button it activates a GuiCommand. Some of the attributes of a GuiCommand are:
- Defines a name
- Contains an icon
- Defines the scope for an undo/redo
- Has a help page
- Opens and controls dialogs
- Macro recording
- and others.
Naming
The GuiCommand is named in a standard way: ModuleName_CommandName e.g., "Base_Open" this is the Open Gui Command in the Base system. The GuiCommand in a certain module is named with the module name in front e.g., "Part_Cylinder".
If the documentation is not finished use Template:UnfinishedDocu.
Help page
Every GuiCommand has to have a help page. The help page is hosted on the FreeCAD documentation wiki. The article has the same name as the GuiCommand, e.g. Draft ShapeString.
To create your own help pages you can use the template GuiCommand model
Example:
Icons
Every GuiCommand has to have an icon. We use the Tango icon set and its guidelines. On the right side you see the tango color palette.
All icons should be created in SVG format with a vector image application, such as Inkscape. This makes it easier to apply changes and derive additional icons in the same application space.
Icons color coding chart
We try as much as possible to respect this chart, so the color of the icons has a direct meaning.
- FreeCAD scripting: Python, Introduction to Python, Python scripting tutorial, FreeCAD Scripting Basics
- Modules: Builtin modules, Units, Quantity
- Workbenches: Workbench creation, Gui Commands, Commands, Installing more workbenches
- Meshes and Parts: Mesh Scripting, Topological data scripting, Mesh to Part, PythonOCC
- Parametric objects: Scripted objects, Viewproviders (Custom icon in tree view)
- Scenegraph: Coin (Inventor) scenegraph, Pivy
- Graphical interface: Interface creation, Interface creation completely in Python (1, 2, 3, 4, 5), PySide, PySide examples beginner, intermediate, advanced
- Macros: Macros, How to install macros
- Embedding: Embedding FreeCAD, Embedding FreeCADGui
- Other: Expressions, Code snippets, Line drawing function, FreeCAD vector math library (deprecated)
- Hubs: User hub, Power users hub, Developer hub