Ticket #7853 (closed)
Refactor MuonAnalysisOptionTab
Reported by: | Arturs Bekasovs | Owned by: | Arturs Bekasovs |
---|---|---|---|
Priority: | minor | Milestone: | Release 3.2 |
Component: | Muon | Keywords: | Maintenance |
Cc: | Blocked By: | ||
Blocking: | Tester: | Anders Markvardsen |
Description (last modified by Arturs Bekasovs) (diff)
Part of the MuonAnalysis::loadAutoSavedValues responsible for restoring values of the settings tab should be moved to MuonAnalysisOptionTab and methods exposed just because this code was outside should be removed or hid. (Information Expert)
No need to create QSettings and start the group every time we need to store something. This breaks the purpose of beginGroup().
Move connect for "Manage User Directories" to the MuonAnalysis.
Validators for double input values.
Change History
comment:4 Changed 7 years ago by Arturs Bekasovs
- Status changed from new to inprogress
Refs #7853. Add new class for dealing with auto-saving values.
Changeset: 9a8f8d85bba9ddb6d990a770a18b6601a3417593
comment:5 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Add auto-saver to Options Tab code.
Changeset: 9c02b9c6e66bd8b2360920baec24216f535f8e9f
comment:6 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Move simplest save signals to auto-saver.
Changeset: d18d8c8fd3cf59a24d4ef5b1473ff49d4bc5a0f3
comment:7 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Move validator creation function to helper source.
Changeset: 153097e859c07a1424ece931362c8bfea2ec5a12
comment:8 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Use validators instead of manual validation.
Changeset: f879b0be531b5f78052a9c5d230281a524d66c57
comment:9 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Replace more saving slots with auto-saver.
Changeset: a7e27b7e8d800a873e14ef4308c5f2462fa16d72
comment:10 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Move more auto-saving to auto-saver.
Changeset: a4040bd4605374486d10cb91da3089aa84be5066
comment:11 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Fix auto-saver declaration.
Changeset: 645eebb6cc003d844e07a41601bca9acc751e8be
comment:12 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Move last widgets to auto-saver.
Changeset: f3bb79e43331573f4df287baf14083ee9f1624c9
comment:13 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Remove another redundant slot.
Changeset: 2a1b1ddfa37f955001e4b5ebfb16c0007e22adb3
comment:14 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Fix names and docs of slots which are here to stay.
Plus some other style improvement here and there.
Changeset: e71575730baa41ac59e0d2fd99aa7f2155eaf37e
comment:15 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Make it possible to enabled auto-saving later.
So that we can e.g. load saved values before auto-saving is enabled.
Changeset: 8079dad56642a0460b388f5a86352eb4b1ce476b
comment:16 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Add methods to load values and use them on the tab.
Remove code to load settings tab widgets from MuonAnalysis source.
Changeset: 387d815f39a431a4108a9967e933bf73d1a66918
comment:17 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Add method to enabled/disable saving for one widget only.
Changeset: 42180843cd83e4a8cdf3a54569cd6cb24a93aca9
comment:18 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Refactor time axis slot.
Changeset: bf965ed5b3d4343569a55c08a8d45c64e506861e
comment:19 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Refactor autoscale slot.
Changeset: e2f95a1c2c23bc3c22389fbc5d975cc5e29b9ff0
comment:20 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Remove unused members.
Changeset: 6f26132169d09bf803d3248bb0cb6758b8bc84c2
comment:21 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Change the way check-box values are saved.
Boolean type seems more natural.
Changeset: cf42bebf8f7b3b120e2db2c16f5fea6739d6b8e5
comment:22 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Call slots manually after loading saved values.
Changeset: f510a03cbe5d5dfd5b3917fadb23ad23a6a0f4f6
comment:23 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Move irrelevant slots out of the tab class.
Changeset: 3fe89833184922b83754d1596534bccd0401edc6
comment:24 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Clean-up includes.
Changeset: 9a53a866f4b1d77750d00f928c8a4cd3e0b52ac7
comment:25 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Better name for settings group.
Changeset: 731f6eedd55ad37bcb4ca04551a3394343fb7bef
comment:26 Changed 7 years ago by Arturs Bekasovs
Refs #7853. Documentation and proper variable names.
Changeset: 7776bffdaf9d938704d6318deb4a98bd375aba75
comment:27 Changed 7 years ago by Arturs Bekasovs
Tester:
This contains quite a lot of changes, but they are all localised to a Settings tab (apart from minor code movements in the MuonAnalysis.cpp). So the task is to check that the tab functions correctly, in terms of auto-saving/restoring values, validating inputs and synchronizing a few widgets.
1. Default values
Let's simulate the case when user have just installed Mantid and doesn't have any auto-saved form values. On Linux, it's as easy as renaming ~/.config/Mantid/MantidPlot.conf to e.g. MantidPlot.conf.bak (rename it back afterwards to get your settings back).
When you've done that, open the MuonAnalysis interface and load some data. Default settings should be sensible, i.e. the plot should look all right.
2. Widget synchronisation
There are a only a few widget synchronisation cases:
- For Time axis of:
- Start at First Good Data: Start box disabled and equal to the value of First Good Data on the Home tab (try changing it on the Home tab).
- Start at Time Zero: Start box disabled and equal to 0.
- Custom value: Start box enabled.
- If Y-Axis Autoscale is checked, both Y-Axis boxes should be disabled and have "N/A" values in them.
- Rebin data:
- None: Nothing is shown on the right
- Fixed: Input for number of steps on the right
- Variable: Input for variable bin boundaries on the right
3. Saving/restoring values
Now verify that all the settings on the tab are remembered correctly. It is easy to do by setting all of them to non-default values, making a screenshot of the interface, re-opening it and verifying that values set on start-up are the same as the ones on the screenshot.
You might want to play a bit more with 3 widgets described in previous section, to make sure any kinds of selections are saved properly.
4. Input validation
There are 5 validated boxes on the tab:
- Time axis Start and Finish
- Y-axis Minimum and Maximum
- Steps for Fixed binning.
Make sure I are not able to put anything apart from valid floating-point values in them.
5. Auto-update
When auto-update is enabled, changing values of combo-boxes or pressing Return in input fields should cause the current plot to be updated.
comment:28 Changed 7 years ago by Arturs Bekasovs
- Status changed from inprogress to verify
- Resolution set to fixed
Please let me know, if you get a merge conflict when merging to master.
comment:29 Changed 7 years ago by Anders Markvardsen
- Status changed from verify to verifying
- Tester set to Anders Markvardsen
comment:30 Changed 7 years ago by Anders Markvardsen
- Status changed from verifying to reopened
- Resolution fixed deleted
Please note I got the following message when git test start 7853:
ERROR: Branch 'feature/7853_muon_refactor_settings_tab' has not been fully merge d to develop, meaning it is not possible to know whether the code is valid on all environments .
Contact Arturs Bekasovs on arturs.bekasovs@… (or via skype) and ask the m to merge the code to develop using 'git checkbuild' from their branch feature/7853_muon_refactor_s ettings_tab and let you know when it passes testing on the buildservers so you can start testing.
comment:31 Changed 7 years ago by Arturs Bekasovs
- Status changed from reopened to inprogress
Commits disappeared from develop. Probably as a consequence of resent develop branch resets. Pushed them back again.
comment:32 Changed 7 years ago by Arturs Bekasovs
- Status changed from inprogress to verify
- Resolution set to fixed
comment:34 Changed 7 years ago by Samuel Jackson
- Status changed from verifying to reopened
- Resolution fixed deleted
comment:35 Changed 7 years ago by Anders Markvardsen
- Status changed from reopened to closed
Merge remote-tracking branch 'origin/feature/7853_muon_refactor_settings_tab'
Full changeset: 3d39e2498f4c657c59393d126d8df615ca193d09
comment:36 Changed 7 years ago by Anders Markvardsen
Played around with option tab and all seem to work
comment:37 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 8698