From d1c0f2f2f0ebe3a7914558b0c926973c5d95c1c9 Mon Sep 17 00:00:00 2001 From: vocx-fc Date: Sat, 29 Feb 2020 18:19:56 -0600 Subject: [PATCH] Draft: docstrings for the submodules --- src/Mod/Draft/draftguitools/__init__.py | 6 ++++++ src/Mod/Draft/draftobjects/__init__.py | 8 ++++++++ src/Mod/Draft/drafttaskpanels/__init__.py | 7 +++++++ src/Mod/Draft/drafttests/__init__.py | 8 +++++++- src/Mod/Draft/draftutils/__init__.py | 6 ++++++ src/Mod/Draft/draftviewproviders/__init__.py | 7 +++++++ 6 files changed, 41 insertions(+), 1 deletion(-) diff --git a/src/Mod/Draft/draftguitools/__init__.py b/src/Mod/Draft/draftguitools/__init__.py index e69de29bb2d1..5566380aa14c 100644 --- a/src/Mod/Draft/draftguitools/__init__.py +++ b/src/Mod/Draft/draftguitools/__init__.py @@ -0,0 +1,6 @@ +"""Commands that require the graphical user interface to work. + +These GUI commands are called by buttons, menus, contextual menus, +toolbars, or other ways that require graphical widgets. +They are normally loaded in the workbench's `InitGui.py`. +""" diff --git a/src/Mod/Draft/draftobjects/__init__.py b/src/Mod/Draft/draftobjects/__init__.py index e69de29bb2d1..418915c82b51 100644 --- a/src/Mod/Draft/draftobjects/__init__.py +++ b/src/Mod/Draft/draftobjects/__init__.py @@ -0,0 +1,8 @@ +"""Functions and classes that define custom scripted objects. + +These classes define a custom object which is based on one of the core +objects defined in C++. The custom object inherits some basic properties, +and new properties are added. + +Most Draft objects are based on Part::Part2DObject. +""" diff --git a/src/Mod/Draft/drafttaskpanels/__init__.py b/src/Mod/Draft/drafttaskpanels/__init__.py index e69de29bb2d1..ca18b3c1936c 100644 --- a/src/Mod/Draft/drafttaskpanels/__init__.py +++ b/src/Mod/Draft/drafttaskpanels/__init__.py @@ -0,0 +1,7 @@ +"""Classes that define the task panels of GUI commands. + +These classes load `.ui` files that will be used in the task panel +of the graphical commands. +The classes define the behavior and callbacks of the different widgets +included in the `.ui` file. +""" diff --git a/src/Mod/Draft/drafttests/__init__.py b/src/Mod/Draft/drafttests/__init__.py index 4287ca861797..058cb96aefad 100644 --- a/src/Mod/Draft/drafttests/__init__.py +++ b/src/Mod/Draft/drafttests/__init__.py @@ -1 +1,7 @@ -# \ No newline at end of file +"""Classes and functions used to test the workbench. + +These classes are called by the unit test launcher +that is defined in `Init.py` and `InitGui.py`. + +The unit tests are based on the standard `unittest` module. +""" diff --git a/src/Mod/Draft/draftutils/__init__.py b/src/Mod/Draft/draftutils/__init__.py index e69de29bb2d1..b086fa4c12ff 100644 --- a/src/Mod/Draft/draftutils/__init__.py +++ b/src/Mod/Draft/draftutils/__init__.py @@ -0,0 +1,6 @@ +"""Utility functions that do not require the graphical user interface. + +These functions are used throughout the Draft Workbench. +They can be called from any module, whether it uses the graphical +user interface or not. +""" diff --git a/src/Mod/Draft/draftviewproviders/__init__.py b/src/Mod/Draft/draftviewproviders/__init__.py index e69de29bb2d1..f634964578a2 100644 --- a/src/Mod/Draft/draftviewproviders/__init__.py +++ b/src/Mod/Draft/draftviewproviders/__init__.py @@ -0,0 +1,7 @@ +"""Classes that define the viewproviders of custom scripted objects. + +These classes define viewproviders for the custom objects +defined in `draftobjects`. +The viewproviders can be used only when the graphical interface +is available; in console mode the viewproviders are not available. +"""