Skip to content

Commit

Permalink
added pseudo-optional outputs
Browse files Browse the repository at this point in the history
switched to rst-based help files

git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@175 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information
volayaf committed May 9, 2012
1 parent fe0e48b commit 45f5618
Show file tree
Hide file tree
Showing 69 changed files with 6,638 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sextante/SextantePlugin.py
Expand Up @@ -120,7 +120,7 @@ def openAbout(self):
dlg.exec_()

def openHelp(self):
filename = os.path.dirname(__file__) + "/manual.pdf"
filename = os.path.dirname(__file__) + "/help/index.html"
if os.name == "nt":
os.startfile(filename)
elif sys.platform == "darwin":
Expand Down
1 change: 1 addition & 0 deletions src/sextante/gui/ParametersDialog.py
Expand Up @@ -95,6 +95,7 @@ def setParamValues(self):
if output.hidden:
continue
output.value = self.paramTable.valueItems[output.name].getValue()
output.open = self.paramTable.checkBoxes[output.name].isChecked()

return True

Expand Down
11 changes: 11 additions & 0 deletions src/sextante/gui/ParametersPanel.py
Expand Up @@ -24,6 +24,10 @@
from sextante.gui.FileSelectionPanel import FileSelectionPanel
from sextante.parameters.ParameterCrs import ParameterCrs
from sextante.gui.CrsSelectionPanel import CrsSelectionPanel
from sextante.outputs.OutputHTML import OutputHTML
from sextante.outputs.OutputRaster import OutputRaster
from sextante.outputs.OutputTable import OutputTable
from sextante.outputs.OutputVector import OutputVector

class ParametersPanel(QtGui.QWidget):

Expand All @@ -36,6 +40,7 @@ def __init__(self, alg, paramDialog):
self.valueItems = {}
self.labels = {}
self.widgets = {}
self.checkBoxes = {}
self.dependentItems = {}
self.iterateButtons = {}
self.showAdvanced = False
Expand Down Expand Up @@ -118,6 +123,12 @@ def initGUI(self):
widget = OutputSelectionPanel(output,self.alg)
self.verticalLayout.addWidget(label)
self.verticalLayout.addWidget(widget)
if isinstance(output, (OutputRaster, OutputVector, OutputTable, OutputHTML)):
check = QtGui.QCheckBox()
check.setText("Open output file after running algorithm")
check.setChecked(True)
self.verticalLayout.addWidget(check)
self.checkBoxes[output.name] = check
self.valueItems[output.name] = widget

self.verticalLayout.addStretch(1000)
Expand Down
2 changes: 1 addition & 1 deletion src/sextante/gui/SextantePostprocessing.py
Expand Up @@ -15,7 +15,7 @@ class SextantePostprocessing:
def handleAlgorithmResults(alg, showResults = True):
htmlResults = False;
for out in alg.outputs:
if out.hidden:
if out.hidden or not out.open:
continue
if isinstance(out, (OutputRaster, OutputVector, OutputTable)):
try:
Expand Down
4 changes: 4 additions & 0 deletions src/sextante/help/.buildinfo
@@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 6f83281448af5e7105c17657cf4ed8c5
tags: fbb0d17656682115ca4d033fb2f83ba1
406 changes: 406 additions & 0 deletions src/sextante/help/3rdParty.html

Large diffs are not rendered by default.

Binary file added src/sextante/help/_images/batch_processing.png
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.
Binary file added src/sextante/help/_images/extent.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/sextante/help/_images/extent_drag.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/sextante/help/_images/extent_list.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/sextante/help/_images/fixed_table.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/sextante/help/_images/help_edition.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/sextante/help/_images/history.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/sextante/help/_images/modeler_canvas.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/sextante/help/_images/models.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/sextante/help/_images/models_parameters.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/sextante/help/_images/models_parameters2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/sextante/help/_images/models_parameters3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/sextante/help/_images/models_parameters4.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/sextante/help/_images/models_parameters5.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/sextante/help/_images/multiple_selection.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/sextante/help/_images/number_selector.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/sextante/help/_images/parameters_dialog.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/sextante/help/_images/rendering_styles.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/sextante/help/_images/toolbox.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
342 changes: 342 additions & 0 deletions src/sextante/help/_sources/3rdParty.txt

Large diffs are not rendered by default.

99 changes: 99 additions & 0 deletions src/sextante/help/_sources/batch.txt
@@ -0,0 +1,99 @@
The SEXTANTE batch processing interface
=======================================

Introduction
------------

SEXTANTE algorithms (including models) can be executed as a batch
process. That is, they can be executed using not a single set of inputs,
but several of them, executing the algorithm as many times as needed.
This is useful when processing large amounts of data, since it is not
necessary to launch the algorithm many times from the toolbox.

To execute an algorithm as a batch process, right-click on its name in
the toolbox and select the *Execute as batch process* option in the
pop-up menu that will appear

.. image:: batch_processing_right_click.png
:align: center

The parameters table
--------------------

Executing a batch process is similar to performing a single execution of
an algorithm. Parameter values have to be defined, but in this case we
need not just a single value for each parameter, but a set of them
instead, one for each time the algorithm has to be executed. Values are
introduced using a table like the one shown next.

.. image:: batch_processing.png
:align: center

Each line of this table represents a single execution of the algorithm,
and each cell contains the value of one of the parameters. It is similar
to the parameters dialog that you see when executing an algorithm from
the toolbox, but with a different arrangement.

By default, the table contains just two rows. You can add or remove rows
using the buttons on the lower part of the window.

Once the size of the table has been set, it has to be filled with the
desired values

Filling the parameters table
----------------------------

For most parameters, setting its value is trivial. Just type the value
or select it from the list of available options, depending on the
parameter type.

The main differences are found for parameters representing layers or
tables, and for output filepaths. Regarding input layers and tables,
when an algorithm is executed as part of a batch process those input
data objects are taken directly from files, and not from the set of them
already opened in QGIS. For this reason, any algorithm can be executed
as a batch process even if no data objects at all are opened and the
algorithm cannot be run from the toolbox.

Filenames for input data objects are introduced directly typing or, more
conveniently, clicking on the button on the right hand of the cell,
which shows a typical file chooser dialog. Multiple files can be
selected at once. If the input parameter represents a single data object
and several files are selected, each one of them will be put in a
separate row, adding new ones if needed. If it represents a multiple
input, all the selected files will be added to a single cell, separated
by semicolons.

Output data objects are always saved to a file and, unlike when
executing an algorithm from the toolbox, saving to a temporary one is
not permitted. You can type the name directly or use the file chooser
dialog that appears when clicking on the accompanying button.

Once you select the file, a new dialog is shown to allow for
autocompletion of other cells in the same column (same parameter).

.. image:: batch_processing_save.png
:align: center

If the default value (*Do not autocomplete*) is selected, SEXTANTE will
just put the selected filename in the selected cell from the parameters
table. If any of the other options is selected, all the cells below the
selected one will be automatically filled based on a defined criteria.
This way, it is much easier to fill the table, and the batch process can
be defined with less effort.

Automatic filling can be done simply adding correlative numbers to the
selected filepath, or appending the value of another field at the same
row. This is particularly useful for naming output data object according
to input ones.

.. image:: batch_processing_filepath.png
:align: center

Executing the batch process
---------------------------

To execute the batch process once you have introduced all the necessary
values, just click on *OK*. SEXTANTE will show the progress of the
global batch process in the progress bar in the lower part of the
dialog.

0 comments on commit 45f5618

Please sign in to comment.