Skip to content

Commit

Permalink
Start documenting each Parameter with an image
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Jackson <mike.jackson@bluequartz.net>
  • Loading branch information
imikejackson authored and joeykleingers committed May 24, 2024
1 parent 5f773bd commit 7e3d784
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 8 deletions.
25 changes: 17 additions & 8 deletions src/Plugins/TestOne/src/TestOne/Filters/ExampleFilter2Filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "simplnx/Parameters/DynamicTableParameter.hpp"
#include "simplnx/Parameters/GeometrySelectionParameter.hpp"
#include "simplnx/Parameters/MultiArraySelectionParameter.hpp"
#include "simplnx/Parameters/AttributeMatrixSelectionParameter.hpp"
#include <any>

using namespace nx::core;
Expand All @@ -30,6 +31,7 @@ constexpr StringLiteral k_Param10 = "param10_path";
constexpr StringLiteral k_Param11 = "param11_path";
constexpr StringLiteral k_Param12 = "param12s";
constexpr StringLiteral k_Param13 = "param13";
constexpr StringLiteral k_Param30 = "param30";

} // namespace

Expand Down Expand Up @@ -81,6 +83,19 @@ Parameters ExampleFilter2Filter::parameters() const
params.insert(std::make_unique<DynamicTableParameter>(k_Param13, "Dynamic Table Parameter", "DynamicTableParameter Example Help Text", defaultTable, tableInfo));

// These should show up under the "Required Objects" Section in the GUI

Check failure on line 85 in src/Plugins/TestOne/src/TestOne/Filters/ExampleFilter2Filter.cpp

View workflow job for this annotation

GitHub Actions / clang_format_pr

code should be clang-formatted [-Wclang-format-violations]


// params.linkParameters(k_Param3, k_Param10, std::make_any<ChoicesParameter::ValueType>(0));
// params.linkParameters(k_Param3, k_Param6, std::make_any<ChoicesParameter::ValueType>(1));
// params.linkParameters(k_Param3, k_Param11, std::make_any<ChoicesParameter::ValueType>(2));

// These should show up under the "Created Objects" section in the GUI

params.insertSeparator(Parameters::Separator{"Data Object Parameters"});

params.insert(std::make_unique<DataGroupCreationParameter>(k_Param8, "DataGroup Creation Parameter", "Example data group creation help text", DataPath{}));
params.insert(std::make_unique<ArrayCreationParameter>(k_Param5, "Array Creation", "Example array creation help text", ArrayCreationParameter::ValueType{}));

params.insert(std::make_unique<DataGroupSelectionParameter>(k_Param9, "DataGroup Selection Parameter", "Example data group selection help text", DataPath{},
DataGroupSelectionParameter::AllowedTypes{BaseGroup::GroupType::DataGroup}));
params.insert(std::make_unique<DataPathSelectionParameter>(k_Param10, "DataPath Selection Parameter", "Example data path selection help text", DataPath{}));
Expand All @@ -89,16 +104,10 @@ Parameters ExampleFilter2Filter::parameters() const
std::make_unique<GeometrySelectionParameter>(k_Param11, "Geometry Selection Parameter", "Example geometry selection help text", DataPath{}, GeometrySelectionParameter::AllowedTypes{}));
params.insert(std::make_unique<MultiArraySelectionParameter>(k_Param12, "MultiArray Selection Parameter", "Example multiarray selection help text", MultiArraySelectionParameter::ValueType{},
MultiArraySelectionParameter::AllowedTypes{IArray::ArrayType::Any}, nx::core::GetAllDataTypes()));
params.insert(std::make_unique<AttributeMatrixSelectionParameter>(k_Param30, "Attribute Matrix Selection", "Example Help Text", DataPath{}));

Check failure on line 107 in src/Plugins/TestOne/src/TestOne/Filters/ExampleFilter2Filter.cpp

View workflow job for this annotation

GitHub Actions / clang_format_pr

code should be clang-formatted [-Wclang-format-violations]

params.linkParameters(k_Param7, k_Param9, std::make_any<BoolParameter::ValueType>(true));

params.linkParameters(k_Param3, k_Param10, std::make_any<ChoicesParameter::ValueType>(0));
params.linkParameters(k_Param3, k_Param6, std::make_any<ChoicesParameter::ValueType>(1));
params.linkParameters(k_Param3, k_Param11, std::make_any<ChoicesParameter::ValueType>(2));

// These should show up under the "Created Objects" section in the GUI
params.insert(std::make_unique<DataGroupCreationParameter>(k_Param8, "DataGroup Creation Parameter", "Example data group creation help text", DataPath{}));
params.insert(std::make_unique<ArrayCreationParameter>(k_Param5, "Array Creation", "Example array creation help text", ArrayCreationParameter::ValueType{}));
params.linkParameters(k_Param7, k_Param9, std::make_any<BoolParameter::ValueType>(true));

return params;
}
Expand Down
46 changes: 46 additions & 0 deletions wrapping/python/docs/source/Developer_API.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ General Parameters
.. _ArrayCreationParameter:
.. py:class:: ArrayCreationParameter
The figure shows what the parameter looks like in the user interface.

.. figure:: Images/ArrayCreationParameter.png
:alt: Array Creation Parameter


Declaration
~~~~~~~~~~~
Expand Down Expand Up @@ -49,6 +54,12 @@ General Parameters
.. _ArraySelectionParameter:
.. py:class:: ArraySelectionParameter
The figure shows what the parameter looks like in the user interface.

.. figure:: Images/ArraySelectionParameter.png
:alt: Array Creation Parameter


Declaration
~~~~~~~~~~~
.. code-block:: python
Expand Down Expand Up @@ -102,6 +113,11 @@ General Parameters
.. _ArrayThresholdsParameter:
.. py:class:: ArrayThresholdsParameter
The figure shows what the parameter looks like in the user interface.

.. figure:: Images/ArrayThresholdsParameter.png
:alt: Array Creation Parameter

Declaration
~~~~~~~~~~~
.. code-block:: python
Expand Down Expand Up @@ -220,6 +236,11 @@ General Parameters
.. _AttributeMatrixSelectionParameter:
.. py:class:: AttributeMatrixSelectionParameter
The figure shows what the parameter looks like in the user interface.

.. figure:: Images/AttributeMatrixSelectionParameter.png
:alt: Array Creation Parameter

Declaration
~~~~~~~~~~~
.. code-block:: python
Expand Down Expand Up @@ -260,6 +281,11 @@ General Parameters
.. _BoolParameter:
.. py:class:: BoolParameter
The figure shows what the parameter looks like in the user interface.

.. figure:: Images/BoolParameter.png
:alt: Array Creation Parameter

Declaration
~~~~~~~~~~~
.. code-block:: python
Expand Down Expand Up @@ -315,6 +341,11 @@ General Parameters
.. _CalculatorParameter:
.. py:class:: CalculatorParameter
The figure shows what the parameter looks like in the user interface.

.. figure:: Images/CalculatorParameter.png
:alt: Array Creation Parameter

Declaration
~~~~~~~~~~~
.. code-block:: python
Expand Down Expand Up @@ -368,6 +399,11 @@ General Parameters
.. _ChoicesParameter:
.. py:class:: ChoicesParameter
The figure shows what the parameter looks like in the user interface.

.. figure:: Images/ChoicesParameter.png
:alt: Array Creation Parameter

Declaration
~~~~~~~~~~~
.. code-block:: python
Expand Down Expand Up @@ -425,6 +461,11 @@ General Parameters
.. _DataGroupCreationParameter:
.. py:class:: DataGroupCreationParameter
The figure shows what the parameter looks like in the user interface.

.. figure:: Images/DataGroupCreationParameter.png
:alt: Array Creation Parameter

Declaration
~~~~~~~~~~~
.. code-block:: python
Expand Down Expand Up @@ -465,6 +506,11 @@ General Parameters
.. _DataGroupSelectionParameter:
.. py:class:: DataGroupSelectionParameter
The figure shows what the parameter looks like in the user interface.

.. figure:: Images/DataGroupSelectionParameter.png
:alt: Array Creation Parameter

Declaration
~~~~~~~~~~~
.. code-block:: python
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7e3d784

Please sign in to comment.