Ticket #262 (closed: fixed)
Create dynamic property validators
Reported by: | Russell Taylor | Owned by: | Janik Zikovsky |
---|---|---|---|
Priority: | minor | Milestone: | Iteration 30 |
Component: | Mantid | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Martyn Gigg |
Description
At present, the NormaliseToMonitor algorithm requires that you enter the spectrum number relating to the monitor you wish to use. It would be much nicer, particularly when using MantidPlot, to give the name of the monitor instead. But this isn't known until the input workspace has been set, so we would need to find a way in which the setting of the input workspace fired an event that the monitor property could catch and update itself.
Change History
comment:3 Changed 12 years ago by Nick Draper
- Milestone changed from Iteration 15 to Iteration 16
Batch move uncompleted tickes to next iteration
comment:5 Changed 9 years ago by Janik Zikovsky
- Owner changed from Russell Taylor to Janik Zikovsky
- Status changed from new to accepted
- Component set to Mantid
comment:6 Changed 9 years ago by Janik Zikovsky
Hello all,
I have a suggestion concerning the algorithm's auto-generated GUIs: it would be nice to implement a few extra methods (on either Algorithm or IPropertyManager) so as to support more sophisticated auto-generated GUIs. It would be used to:
- Hide or disable a property based on the current setting on another property. For example:
- Show some properties only when a checkbox is checked (or unchecked)
- Show some properties only when another property's value is/ is NOT the default.
- Group some properties together, so that they are rendered inside a QGroupBox with a name.
- If an algorithm has 2+ ways to specify a single value (e.g. LoadCalFile has 3 ways to choose an instrument) it might show each option as a radio button and only allow one to be filled at a time.
I would probably want the methods to be relatively simple, e.g.:
alg->setPropertyEnabledWhen("ThisPropertyName", "BoolPropertyName", IS_CHECKED); alg->setPropertyVisibleWhen("ThisPropertyName", "IntPropertyName", IS_NOT_DEFAULT_VALUE); alg->addPropertyToGroup("ThisPropertyName", "Name of My group"); alg->makeGroupRadioButtons("Name of My group");
I wouldn't want the system to grow into a full-fledged GUI writing toolkit so I think these 3 situations would handle most of the GUI improvements most algorithms would need to greatly increase usability. Not having to make as many custom widgets will make it much easier to maintain these algorithms. Anything more complicated would still need a custom GUI.
Comments?
Sincerely,
Janik Zikovsky
comment:10 Changed 9 years ago by Janik Zikovsky
In [14253]:
comment:11 Changed 9 years ago by Janik Zikovsky
In [14254]:
comment:12 Changed 9 years ago by Janik Zikovsky
In [14261]:
comment:13 Changed 9 years ago by Janik Zikovsky
In [14264]:
comment:14 Changed 9 years ago by Janik Zikovsky
In [14266]:
comment:15 Changed 9 years ago by Janik Zikovsky
In [14268]:
comment:16 Changed 9 years ago by Janik Zikovsky
In [14302]:
comment:18 Changed 9 years ago by Janik Zikovsky
Problem: Validator seems to only fail the FIRST bad property upon start-up and when clicking Run.
Also: Look for bad scrollbar choice when the algo has hidden entries.
Also: space out the title of a group more for windows
comment:19 Changed 9 years ago by Janik Zikovsky
In [14366]:
comment:20 Changed 9 years ago by Janik Zikovsky
In [14388]:
comment:21 Changed 9 years ago by Janik Zikovsky
In [14391]:
comment:22 Changed 9 years ago by Janik Zikovsky
- Status changed from accepted to verify
- Resolution set to fixed
In [14392]:
comment:23 Changed 9 years ago by Martyn Gigg
- Status changed from verify to verifying
- Tester set to Martyn Gigg
comment:24 Changed 9 years ago by Martyn Gigg
- Status changed from verifying to closed
Confirmed functionality that is currently used in LoadMD and BinToMDHistoWorkspace. Controls seem to be enabled/disabled correctly depending on other values.
I'm not sure this actually addresses the original ticket issue though so I've created another, #3763.
comment:25 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 1110