Support Apnea Board & OSCAR  

Difference between revisions of "LoudSnorer:Sandbox"

From Apnea Board Wiki
Jump to: navigation, search

(User Backups for overview and daily settings.)
(User Backups for Overview and Daily settings.)
Line 3: Line 3:
  
 
== '''User Backups for Overview and Daily settings.''' ==
 
== '''User Backups for Overview and Daily settings.''' ==
 +
 +
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.
  
  
 
This feature is called Backup File Management.
 
This feature is called Backup File Management.
  
The current implementation has one backup file for overview and daily
 
  
 
setting that is saved when OSCAR exits and is restored when OSCAR  
 
setting that is saved when OSCAR exits and is restored when OSCAR  

Revision as of 01:40, 28 December 2022

Cleanup.png


User Backups for Overview and Daily settings.

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.


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