Trees | Indices | Help |
|
---|
|
object --+ | sip.simplewrapper --+ | sip.wrapper --+ | PyQt4.QtCore.QObject --+ | object --+ | | | sip.simplewrapper --+ | | | PyQt4.QtGui.QPaintDevice --+ | PyQt4.QtGui.QWidget --+ | PyQt4.QtGui.QFrame --+ | JobInputFrame
An application input source selection widget. Allows the user to choose the source of the job input: Project Table, files, or Workspace (which is not included entries, just the Workspace ct). Configuration options set via constructor keywords are... filetypes - If file input allowed, the file filters used in the askopenfilename. List of tuples. Default is [('Maestro Files', '*.mae')]. initialdir - If file input allowed, the default initial directory in the askopenfilename. Default is '.'. file - Allow an external file as an input source. Default is True. selected_entries - Allow the selected Project Table entries to be used as an input source. Maestro only. Default is True. included_entries - Allow the included Project Table entries to be used as an input source. Maestro only. Default is False. included_entry - Allow the single included Project Table entry to be used as an input source. An error is presented if more than one entry is included. Properties are preserved. Maestro only. Default is False. workspace - Allow the Workspace structure as an input source. If more than one entry is included, they are merged and CT-level properties are dropped. Maestro only. Default is True. Consider using the 'included_entries' or 'included_entry' instead. default_source - What the default source should be. Must be one of: "file", "selected_entries", "included_entries", "included_entry", or "workspace". Default is "selected_entries", if enabled; if not, then "file" (if enabled) writefile - Automatically generate the '<jobname>.<ext>' file from WS/PT/FILE source. Default is True. If True: The written file name is stored as 'inputstrucfile' in the JobParameters object. For FILE source, original file path is also stored as 'inputstrucorigfile'. If False: For FILE source, store file path to "inputstrucfile" For WORKSPACE and INCLUDED_ENTRY sources, store structure to "inputstruc". For SELECTED_ENTRIES and INCLUDED_ENTRIES sources, nothing is stored. It is user's job then use this information as desired. label_text - Default is: 'Use structures from:' file_text - Default is: "File name:" / "File names:" tracking - Track whether structures selected for input have changed. Type of changes tracked: User changes input type (File/Workspace/Etc.) User selects a new file (via Browse or typing) PT inclusion/selection changes when those are the selected input Workspace changes when Workspace is the selected input When one of these changes occur, the JobInputFrame object emits an input_changed signal. Workspace changes are only tracked if the selected input is Workspace, unless extra_ws_tracking is set to True. If selected_entries is chosen as the input source, changes in the inclusion state of a selected entry will emit the only_inclusion_changed signal rather than the input_changed signal. Tracking will only occur if the panel is currently shown The default is tracking=False because this adds overhead to every workspace change and project update. extra_ws_tracking - Track workspace changes when the selected input is PT selection or WS inclusion. This will emit a input _changed signal whenever one of the selected entries is in the workspace and Maestro calls the workspaceChanged callback with WORKSPACE_CHANGED_EVERYTHING, WORKSPACE_CHANGED_APPEND, or WORKSPACE_CHANGED_CONNECTIVITY Without setting this to True, no signal is emitted if the input selected is PT selection or inclusion, and the user edits one of the input structures in the WS. This will result in multiple input_changed signal emissions for a single change in inclusion - one for the project update and multiple emits because Maestro calls the callback multiple times for each (un)inclusion. No signal will be emitted for workspace changes if none of the selected entries are currently included in the Workspace. The default is extra_ws_tracking=False due to the extra overhead of this signal. Job parameters passed out in the getParams() JobInputParams object are... state - The input source type, FILE, SELECTED_ENTRIES, INCLUDED_ENTRIES, INCLUDED_ENTRY, or WORKSPACE fileselection - The file name if FILE source These are not JobParameters attributes, and the input structure file is not written by this class. JobInputFrame does that work.
|
|||
Inherited from Inherited from Inherited from |
|
|||
|
|||
|
|||
Iterator of structure.Structure |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
int |
|
||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from Inherited from Inherited from |
|
|||
ERROR = 1
|
|||
FILE =
|
|||
FILE_STATES =
|
|||
INCLUDED_ENTRIES =
|
|||
INCLUDED_ENTRY =
|
|||
INCLUDED_STATES =
|
|||
OK = 0 hash(x) |
|||
PROJECT_TABLE =
|
|||
SELECTED_ENTRIES =
|
|||
WORKSPACE =
|
|||
_FILES =
|
|||
Inherited from Inherited from Inherited from Inherited from |
|
|||
|
See class docstring. Raises an Exception if no input source is allowed.
|
Return an iterator of structures in the user-selected file, honoring the range, is specified.
|
Add a callback for a method - quietly do nothing if such callback already exists. Example: self.addCallback(maestro.workspace_changed_function_add, self.wsChanged) This method tracks callbacks that are added for easy removal later. This tracking is done because Maestro prints an uncatchable WARNING to the terminal if we try to remove a callback that has not been added.
|
Callback method of the file browse button. Pops up a askopenfilename file selector and places the selected file name into the file text field |
Return the contents of the filename entry field. Returns "" if this is called while file input is not allowed. |
Return the list of file names from the file entry field. This is a true list, not a comma-separated list. |
If the current GUI state isn't valid, pop up an error message and return None. Otherwise, return a JobInputParams object with the input source type and filename (if FILE source). |
Track the selected entries and emit input_changed if the set of selected entries changes. Also emit only_inclusion_changed if the set of selected entries remains the same but the inclusion state of some of the selected entries changes. |
Deregister callbacks when the panel hides itself so that we are not monitoring changes when the panel is inactive.
|
Remove any previously added callbacks. We need to track callbacks in this manner because Maestro prints a WARNING message to the terminal if a non-registered callback is attempted to be removed. |
Remove a callback that may have been registered previously - silently do nothing if the callback isn't registered. We need to track callbacks in this manner because Maestro prints a WARNING message to the terminal if a non-registered callback is attempted to be removed.
|
Select the specified filename in the input selector. To specify multiple files, separate them using commas. "File" or "Files" will be selected as the input source as appropriate.
|
Set the input type.
|
This method serializes the input structure(s) to disk and stores the name of the file in the jobparam instance. Returns False (i.e., aborts the setup cascade) if no input structure file is written. Otherwise, returns True. Job parameters set by this method are... inputstrucsource - The input source type that was used (FILE, SELECTED_ENTRIES, INCLUDED_ENTIRES, INCLUDED_ENTRY, or WORKSPACE). If "writefile" is True (default): If "multiplefiles" is True: inputstrucfiles - The names of the created structure files when multiplefiles is False. If source is FILE, then it's the original paths specified by the user. If "multiplefiles" is False: inputstrucfile - The name of the created structure file ( <jobname>.<ext> ) when multiple files is False inputstrucorigfile - For FILE source, the path to the original structure file selected. NOTE: if "copyfile" is set to False, the "inputstrucfile" is set to the same value as the "inputstrucorigfile" If "writefile" is False: inputstruc - Structure object if source is WORKSPACE or INCLUDED_ENTRY. inputstrucfile - Path to specified structures if source is FILE and multiplefiles is False. inputstrucfiles - List of paths to specified structure files, if source is FILE and multiplefiles is True. Unused parameters are set to None. |
Make sure the proper signals are emitted and proper callbacks are registered when the panel shows itself
|
A generator that returns the user-specified input structures one at a time. API Example: # appframework1 for struct in self._if.structures(): do something # appframework2 for struct in self.input_selector.structures(): do something
|
Callback method of the input option menu. Disables the file selector and entry field if that is not the source chosen. If tracking is on, this also checks to see if the set of structures selected for input has changed and sets up callbacks to continue tracking this information.
|
Validate that the JobInputFrame is in a consistent and complete state. Pops up a warning dialog and returns ERROR if the input is empty or invalid.
|
Emit input_changed if the Workspace change merits is
|
Write selected Project Table entries to 'filename'. append - If True, the structures will be appended to an existing file; otherwise, the existing file is overwritten. warn - Obsolete. Warning is no longer issued when the file exists Raises a RuntimeError on error. Returns False if the user cancelled. Returns True on success. |
For backwards-compatability. Use the writePTEntries() method instead. |
|
INCLUDED_STATES
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Apr 26 05:42:22 2016 | http://epydoc.sourceforge.net |