Skip to content

Commit

Permalink
Merge branch 'main' into feature/view-setting-config
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacZhangzhuo committed Dec 17, 2023
2 parents 1e1a2e9 + ded5714 commit ec9abb7
Show file tree
Hide file tree
Showing 11 changed files with 49 additions and 102 deletions.
19 changes: 19 additions & 0 deletions docs/_templates/class_noinheritance.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{{ objname | escape | underline }}

.. currentmodule:: {{ module }}

.. autoclass:: {{ objname }}

{% block methods %}
.. rubric:: Methods

.. autosummary::
:toctree:
:nosignatures:
{% for item in methods %}
{% if item not in inherited_members %}
~{{ name }}.{{ item }}
{% endif %}
{%- endfor %}

{% endblock %}
1 change: 1 addition & 0 deletions docs/api/compas_view2.forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Classes
.. autosummary::
:toctree: generated/
:nosignatures:
:template: class_noinheritance.rst

Form
PropertyForm
Expand Down
103 changes: 20 additions & 83 deletions docs/api/compas_view2.objects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,98 +4,35 @@ compas_view2.objects

.. currentmodule:: compas_view2.objects

Bases
=====
Classes
=======

.. autosummary::
:toctree: generated/
:nosignatures:

Object
ArrowObject
BoxObject
BufferObject


Geometry
========

0-dimensional
-------------

.. autosummary::
:toctree: generated/
:nosignatures:

PointObject
VectorObject
PlaneObject
FrameObject

1-dimensional
-------------

.. autosummary::
:toctree: generated/
:nosignatures:

LineObject
PolylineObject

2-dimensional
-------------

.. autosummary::
:toctree: generated/
:nosignatures:

CapsuleObject
CircleObject
CollectionObject
ConeObject
CylinderObject
EllipseObject
PolygonObject
FrameObject
LineObject
MeshObject
NetworkObject
NurbsSurfaceObject

3-dimensional
-------------

.. autosummary::
:toctree: generated/
:nosignatures:

BoxObject
SphereObject
TorusObject
CylinderObject
ConeObject
CapsuleObject
Object
PlaneObject
PointObject
PolygonObject
PolyhedronObject
PolylineObject
PointcloudObject


Datastructures
==============

.. autosummary::
:toctree: generated/
:nosignatures:

NetworkObject
MeshObject


Collections
===========

.. autosummary::
:toctree: generated/
:nosignatures:

CollectionObject


Special
=======

.. autosummary::
:toctree: generated/
:nosignatures:

ArrowObject
SphereObject
TextObject
TorusObject
VectorObject
1 change: 1 addition & 0 deletions docs/api/compas_view2.ui.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Classes
.. autosummary::
:toctree: generated/
:nosignatures:
:template: class_noinheritance.rst

Button
Checkbox
Expand Down
1 change: 1 addition & 0 deletions docs/api/compas_view2.views.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Classes
.. autosummary::
:toctree: generated/
:nosignatures:
:template: class_noinheritance.rst

View
View120
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

master_doc = "index"
source_suffix = {".rst": "restructuredtext", ".md": "markdown"}
templates_path = sphinx_compas2_theme.get_autosummary_templates_path()
templates_path = sphinx_compas2_theme.get_autosummary_templates_path() + ["_templates"]
exclude_patterns = sphinx_compas2_theme.default_exclude_patterns
add_module_names = False
language = "en"
Expand Down
2 changes: 1 addition & 1 deletion docs/developer_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Developer Guide


Contributing More Actions
======
=========================

Coming soon ...

Expand Down
8 changes: 4 additions & 4 deletions src/compas_view2/app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class App:
The viewport of the OpenGL view. It will override the value in the config file.
show_grid : bool, optional
Show the XY plane. It will override the value in the config file.
config: dict | filepath, optional
config : dict | filepath, optional
A configuration dict for the App, or a path to a JSON file containing such a dict.
Default is None, in which case the default configuration (a `Rhino-like` preference) is used.
More configuration options can be found in the `example-control` of the page.
Expand All @@ -89,14 +89,14 @@ class App:
Attributes
----------
window: :class:`PySide2.QtWidgets.QMainWindow`
window : :class:`PySide2.QtWidgets.QMainWindow`
The main window of the application.
This window contains the view and any other UI components
such as the menu, toolbar, statusbar, ...
view: :class:`compas_view2.View`
view : :class:`compas_view2.View`
Instance of OpenGL view.
This view is the central widget of the main window.
controller: :class:`compas_view2.app.Controller`
controller : :class:`compas_view2.app.Controller`
The action controller of the app.
Notes
Expand Down
9 changes: 0 additions & 9 deletions src/compas_view2/objects/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,6 @@ class Object(ABC):
otype : class
The data class of the object.
Class Attributes
----------------
default_color_points : :class:`compas.color.Color`
The default color of the points with value rgb(0.2, 0.2, 0.2).
default_color_lines : :class:`compas.color.Color`
The default color of the lines with value rgb(0.4, 0.4, 0.4).
default_color_faces : :class:`compas.color.Color`
The default color of the faces with value rgb(0.8, 0.8, 0.8).
"""

default_color_points = Color(0.2, 0.2, 0.2)
Expand Down
2 changes: 1 addition & 1 deletion src/compas_view2/objects/pointcloudobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class PointcloudObject(BufferObject):
list of point colors
Raises
-------
------
ValueError
If number of colors does not equal to number of points.
Expand Down
3 changes: 0 additions & 3 deletions src/compas_view2/ui/slider.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@ class Slider:
The actual slider widget.
value : float
The current value of the slider.
Class Attributes
----------------
STYLE : str
Stylesheet for the visual appearance of the groove and handle of the slider.
Expand Down

0 comments on commit ec9abb7

Please sign in to comment.