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.)
 
(40 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{cleanup}}
 
{{cleanup}}
  
 
== '''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.
 
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.
Line 8: Line 6:
 
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.
 
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.
  
[[File:BackupRestore.jpg|thumb|left|500px|User Setting Backup]]<br />
+
Triggering
The user can
+
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.
 +
<br />
 +
The user can<br/>
 
1. Create Backup with current settings and user's description<br/>
 
1. Create Backup with current settings and user's description<br/>
 
2. Restore current graph settings from a Backup<br/>
 
2. Restore current graph settings from a Backup<br/>
Line 16: Line 20:
 
5. Delete a Backup <br/>
 
5. Delete a Backup <br/>
  
This feature is called Backup File Management.
+
This feature is called Save Layout Settings.
  
  
Line 32: Line 36:
 
4. Update an existing Backup file with current settings
 
4. Update an existing Backup file with current settings
 
5. Delete Backup file
 
5. Delete Backup file
 +
 +
 +
 +
 +
[[File:layoutSettingPicture.jpg|thumb|center|1000px|Layout Settings Manager]]<br />
 +
 +
 +
 +
 +
<p><b><center>Oscar's embedded Help Menu </center></b></p>
 +
 +
<div style="background:#f4f4f4; border:2px solid green; padding:10px; min-width: 40em; max_width:43em">
 +
 +
    <h4>Help Menu - Manage Layout Settings</h4>
 +
 +
    <p style="color:black;"> 
 +
      This feature manages the saving and restoring of Layout Settings.
 +
      <br>
 +
      Layout Settings control the layout of a graph or chart.
 +
      <br>
 +
      Different Layouts Settings can be saved and later restored.
 +
      <br>
 +
    </p>
 +
    <table width="100%">
 +
        <tr><td><b>Button</b></td>
 +
            <td><b>Description</b></td></tr>
 +
        <tr><td valign="top">Add</td>
 +
<td>Creates a copy of the current Layout Settings. <br>
 +
The default description is the current date. <br>
 +
The description may be changed. <br>
 +
The Add button will be greyed out when maximum number is reached.</td></tr>
 +
                <br>
 +
        <tr><td><i><u>Other Buttons</u> </i></td> 
 +
            <td>Greyed out when there are no selections</td></tr>
 +
        <tr><td>Restore</td>
 +
<td>Loads the Layout Settings from the selection. Automatically exits. </td></tr>
 +
        <tr><td>Rename </td>       
 +
<td>Modify the description of the selection. Same as a double click.</td></tr>
 +
        <tr><td valign="top">Update</td><td> Saves the current Layout Settings to the selection.<br>
 +
        Prompts for confirmation.</td></tr>
 +
        <tr><td valign="top">Delete</td>
 +
<td>Deletes the selecton. <br>
 +
    Prompts for confirmation.</td></tr>
 +
        <tr><td><i><u>Control</u> </i></td> 
 +
            <td></td></tr>
 +
        <tr><td>Exit </td>
 +
<td>(Red circle with a white "X".) Returns to OSCAR menu.</td></tr>
 +
        <tr><td>Return</td>
 +
<td>Next to Exit icon. Only in Help Menu. Returns to Layout menu.</td></tr>
 +
        <tr><td>Escape Key</td>
 +
<td>Exit the Help or Layout menu.</td></tr>
 +
      </table> 
 +
      <p><b>Layout Settings</b></p>
 +
      <table width="100%"> 
 +
        <tr>
 +
<td>* Name</td>
 +
<td>* Pinning</td>
 +
<td>* Plots Enabled </td>
 +
<td>* Height</td>
 +
</tr>
 +
        <tr>
 +
<td>* Order</td>
 +
<td>* Event Flags</td>
 +
<td>* Dotted Lines</td>
 +
<td>* Height Options</td>
 +
</tr>
 +
      </table> 
 +
      <p><b>General Information</b></p>
 +
  <ul style=margin-left="20"; > 
 +
<li> Maximum description size = 80 characters. </li> 
 +
<li> Maximum Saved Layout Settings = 30. </li> 
 +
<li> Saved Layout Settings can be accessed by all profiles. 
 +
<li> Layout Settings only control the layout of a graph or chart. <br> 
 +
            They do not contain any other data. <br>
 +
            They do not control if a graph is displayed or not. </li>
 +
<li> Layout Settings for daily and overview are managed independantly. </li>
 +
  </ul> 
 +
</div>
 +
  
 
User Interface
 
User Interface

Latest revision as of 16:02, 8 March 2024

Cleanup.png


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 Save Layout Settings.


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



Layout Settings Manager



Oscar's embedded Help Menu

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.
The description may be changed.

The Add button will be greyed out when maximum number is reached.
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.


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