Skip to content

Commit

Permalink
deploy: f0b0de6
Browse files Browse the repository at this point in the history
  • Loading branch information
ghutchis committed Nov 16, 2023
1 parent 29bdeea commit 0bfcf0f
Show file tree
Hide file tree
Showing 22 changed files with 25 additions and 6 deletions.
Binary file modified .doctrees/develop/scripts/example1.doctree
Binary file not shown.
Binary file modified .doctrees/develop/scripts/interface.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file added _images/image-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/image-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/image-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/image-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/image-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/image-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _images/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion _sources/develop/scripts/example1.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,9 @@ def getOptions():
return opts
```
The getOptions function is used to specify the [script Interfaces](https://two.avogadro.cc/scripts/inte**rface.html#script-interfaces) or **the pop-up menu** for the script. For each option in the userOptions list, Avogadro will create appropriate labels, menus, text boxes, check boxes, etc.
It is called when `--print-options` is given as the input argument.
Interface will look something like this:

<img src="../../_static/image-6.png" alt="7th">

It is called in the command line when `--print-options` is given as the input argument.

13 changes: 10 additions & 3 deletions _sources/develop/scripts/interface.md.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ be specified in the `userOptions` block as:
}
}
```
<img src="../../_static/image.png" alt="1st">

Here, "Parameter Name" is the default label that will be displayed in
the GUI as a label next to the combo box. If you wish to have the label
Expand All @@ -38,6 +39,7 @@ differ from the JSON key, you can add a "label" key pair:
}
}
```
<img src="../../_static/image-1.png" alt="2nd">

Use of the "label" is optional, but encouraged, since it greatly
facilitates translation and localization (e.g., "color" vs. "colour").
Expand All @@ -62,10 +64,11 @@ optimization) via:
}
}
```

This will add a blank text box to the GUI, initialized with the text
specified by default.

<img src="../../_static/image-2.png" alt="3rd">

## Existing files

A script can ask for the absolute path to an existing file using the
Expand All @@ -81,10 +84,11 @@ following option block:
}
}
```

This will add an option to select a file to the GUI, initialized to the
file pointed to by default.

<img src="../../_static/image-3.png" alt="4th">

## Integer Values

Scripts may request integer values from a specified range by adding a
Expand All @@ -104,9 +108,10 @@ user-option of the following form:
}
}
```

This block will result in a QSpinBox, configured as follows:

<img src="../../_static/image-4.png" alt="5th">

- minimum and maximum indicate the valid range of integers for the
parameter.
- default is the integer value that will be shown initially.
Expand Down Expand Up @@ -154,3 +159,5 @@ requested:

This will result in a check box in the dynamically generated GUI, with
the initial check state shown in default.

<img src="../../_static/image-5.png" alt="6th">
Binary file added _static/image-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/image-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/image-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/image-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/image-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/image-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion develop/scripts/example1.html
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,9 @@ <h2>getOptions() Function<a class="headerlink" href="#getoptions-function" title
</pre></div>
</div>
<p>The getOptions function is used to specify the <a class="reference external" href="https://two.avogadro.cc/scripts/inte**rface.html#script-interfaces">script Interfaces</a> or <strong>the pop-up menu</strong> for the script. For each option in the userOptions list, Avogadro will create appropriate labels, menus, text boxes, check boxes, etc.
It is called when <code class="docutils literal notranslate"><span class="pre">--print-options</span></code> is given as the input argument.</p>
Interface will look something like this:</p>
<img alt="7th" src="../../_images/image-6.png" />
<p>It is called in the command line when <code class="docutils literal notranslate"><span class="pre">--print-options</span></code> is given as the input argument.</p>
</section>
</section>

Expand Down
6 changes: 6 additions & 0 deletions develop/scripts/interface.html
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ <h2>Fixed String Lists (Pop-up menus)<a class="headerlink" href="#fixed-string-l
<span class="p">}</span>
</pre></div>
</div>
<img alt="1st" src="../../_images/image.png" />
<p>Here, “Parameter Name” is the default label that will be displayed in
the GUI as a label next to the combo box. If you wish to have the label
differ from the JSON key, you can add a “label” key pair:</p>
Expand All @@ -536,6 +537,7 @@ <h2>Fixed String Lists (Pop-up menus)<a class="headerlink" href="#fixed-string-l
<span class="p">}</span>
</pre></div>
</div>
<img alt="2nd" src="../../_images/image-1.png" />
<p>Use of the “label” is optional, but encouraged, since it greatly
facilitates translation and localization (e.g., “color” vs. “colour”).</p>
<p>The array of strings in values will be used as the available entries in
Expand All @@ -559,6 +561,7 @@ <h2>Short Free-Form Text Parameters<a class="headerlink" href="#short-free-form-
</div>
<p>This will add a blank text box to the GUI, initialized with the text
specified by default.</p>
<img alt="3rd" src="../../_images/image-2.png" />
</section>
<section id="existing-files">
<h2>Existing files<a class="headerlink" href="#existing-files" title="Link to this heading">#</a></h2>
Expand All @@ -576,6 +579,7 @@ <h2>Existing files<a class="headerlink" href="#existing-files" title="Link to th
</div>
<p>This will add an option to select a file to the GUI, initialized to the
file pointed to by default.</p>
<img alt="4th" src="../../_images/image-3.png" />
</section>
<section id="integer-values">
<h2>Integer Values<a class="headerlink" href="#integer-values" title="Link to this heading">#</a></h2>
Expand All @@ -596,6 +600,7 @@ <h2>Integer Values<a class="headerlink" href="#integer-values" title="Link to th
</pre></div>
</div>
<p>This block will result in a QSpinBox, configured as follows:</p>
<img alt="5th" src="../../_images/image-4.png" />
<ul class="simple">
<li><p>minimum and maximum indicate the valid range of integers for the
parameter.</p></li>
Expand Down Expand Up @@ -642,6 +647,7 @@ <h2>Boolean Parameters<a class="headerlink" href="#boolean-parameters" title="Li
</div>
<p>This will result in a check box in the dynamically generated GUI, with
the initial check state shown in default.</p>
<img alt="6th" src="../../_images/image-5.png" />
</section>
</section>

Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 0bfcf0f

Please sign in to comment.