Difference between revisions of "LoudSnorer:Sandbox"
LoudSnorer (talk | contribs) |
LoudSnorer (talk | contribs) |
||
Line 78: | Line 78: | ||
Triggering | Triggering | ||
− | |||
− | |||
− | |||
− | |||
The following picture illustrates a restore operation is almost executed. | The following picture illustrates a restore operation is almost executed. | ||
Notice: | Notice: |
Revision as of 22:02, 17 January 2023
Help Menu - Manage Layout Settings
This feature manages the saving and restoring of Layout Settings.
Layout Settings control the layout of a graph or chart.
Different Layouts Settings can be saved and later restored.
Button | Description |
Add | Creates a copy of the current Layout Settings. The default description is the current date. |
Other Buttons | Greyed out when there are no selections |
Restore | Loads the Layout Settings from the selection. Automatically exits. |
Rename | Modify the description of the selection. Same as a double click. |
Update | Saves the current Layout Settings to the selection. Prompts for confirmation. |
Delete | Deletes the selecton. Prompts for confirmation. |
Control | |
Exit | (Red circle with a white "X".) Returns to OSCAR menu. |
Return | Next to Exit icon. Only in Help Menu. Returns to Layout menu. |
Escape Key | Exit the Help or Layout menu. |
Layout Settings
* Name | * Pinning | * Plots Enabled | * Height |
* Order | * Event Flags | * Dotted Lines | * Height Options |
General Information
- Maximum description size = 80 characters.
- Maximum Saved Layout Settings = 30.
- Saved Layout Settings can be accessed by all profiles.
- Layout Settings only control the layout of a graph or chart.
They do not contain any other data.
They do not control if a graph is displayed or not. - Layout Settings for daily and overview are managed independantly.
The overview and daily tabs each have one session backup file for graph settings. When OSCAR starts the session backup file is read. and when OSCAR exits the current settings are saved to the session backup file.
Users can also save graph settings as a user backup file. Each tab (Daily and Overview) supports 10 user defined setting backups. Each backup supports a user defined description in any language.
Triggering The following picture illustrates a restore operation is almost executed. Notice:
- The default description is the current time and date in the local format.
- Support for multiple languages
- Add button is greyed because the maximum backups have been reached.
The user can
1. Create Backup with current settings and user's description
2. Restore current graph settings from a Backup
3. Rename a Backup description
4. Update an existing Backup with current settings
5. Delete a Backup
This feature is called Backup File Management.
setting that is saved when OSCAR exits and is restored when OSCAR
starts.
The Backup File Management feature allows for multiple backups files. Each backup will have a user defined description.
User Requirements
1. Create Backup file with current settings and user's description 2. Restore current settings from Backup file 3. Rename Backup file description 4. Update an existing Backup file with current settings 5. Delete Backup file
User Interface
Trigger Backup File Management
There will be a new push Button at the bottom of the daily and overview
windows in the lower right hand corner - to the left of the graph combo
box.
Pressing the Backup push button will trigger all Backup File Management functionality.
Backup File Management
The Backup File Management remains uninitialized until triggered by Backup push Button.
When activate a dialog box will be displayed.
There are 5 push Buttons - add, restore, rename, update, and delete, each with its own icons and tool-tips.
When a new backup is added, it will be given a default description using the current date-time. The description will be put in an edit mode so that the user can rename the description. The description must be a single line in any language.
The UI can display up to 10 backups.
Pictures
The Backup File Management UI with no backups and a tooltip for the Add button.
Selecting a backup to be restored. Displays Unicode backup names.
Selecting a backup to be deleted. Notice the confirmation message box.
Detailed view of Icons created.
Button Actions
Add
The Add button saves the current graph settings into a new backup file. The file's description is also saved. The description field is highlighted. The user can then change the description.
When the backup file limit is reached, the the tooltip will be changed and the button will be greyed out. If the user presses the add button when full then an error message box will be displayed. The delete button frees up space so that new backup can be made.
Restore
The Restore button loads the saved graphs settings and then exits.
Update
The Update button save the current graph settings in the selected backup file.
The user is prompted to cancel or continue the update operation.
Rename
The Rename button puts the selected backup into the edit mode so that the description can be changed. This is the same as a double click on backup file.
Delete
The Delete button deletes the selected backup.
The user is prompted to cancel or continue the delete operation.
Details
All the code for the Backup File Management is contained in a new class BackupFiles.
The daily and overview menus are responsible for creating an instance of BackupFiles and calling a method when the Backup button is activated.
The backup files are created/read using loadSettings and saveSettings methods in gGraphView. The settings filename name is the only parameter. There are no changes made to gGraphView.
User Descriptions
The user description is a set of characters up to a maximum length of 60 characters.
It must be a single line.
White white space is trimmed from string.
Cut and paste work with QT so multi-line strings can be added. The first line of the multi-line string is used.
Empty descriptions (all white space) will not change the previous description.
Backup Files
The file name used is GraphTitle.backupNNN.
where GraphTitle is either "daily" or "overview"
and NNN is a 3 digit decimal integer - ( 0 <= NNN < limit ).
This description is NOT a part the real file name but is stored as name value pair (filename : description). This allows for the description independent from the file name.
Backup descriptions are saved in an descriptions.txt file where the backup file name is associated with the user description.
Each backup has a single line entry in the form
backupNNN:<Description>. The Description can use unicode characters.
backup name examples:
- backup001:My Primary layout - backup002:已成功删除 عذرا ، لا يمكن تحديد موقع ملف. 删除 - backup004:/ ? ~ : any character
Currently, the same description can be used for multiple backups.
If the description file is corrupted then the backup file name will be used.
"eg. backup002"
file name examples
- overview.backup008.shg file name used for 1st backup file - overview.descriptions.txt file name used descriptions.
Translations
Translations are required for button labels, tooltip, and message Boxes.
icons are used on pushButtons.
PushButton Labels
- Add - Restore - Rename - Update - Delete - Cancel - Yes
Tooltips
- Add has been inhibited. The maximum number of backups have been exceeded. - Adds new Backup with current settings. - Restores settings from the selected Backup. - Rename the selected Backup. Must edit existing name then press enter. - Update the selected Backup with current settings. - Delete the selected Backup. - Closes the dialog menu. Returns to previous menu.
Message Box
- Ok to Update? - Ok To Delete? - Maximum number of Backups exceeded.
Donate to Apnea Board