Popped-out graphs no longer can have their height adjusted by pulling on dock or widget window.
This is a work-around to a problem when popping-out multiple graphs, heights of early graphs
were increased and heights of the latter graphs were too small.
Daily page: total hours was elapsed time of all machines, including large blocks that are not CPAP. Now just MT_CPAP time.
Welcome page: Same problem with total hours reporting, and AHI was calculated as events/total hours instead of events/CPAP hours.
Statistics page: Same problems as on Welcome page -- total hours and index calculations. Changed to using total CPAP hours.
Evidently gcc doesn't recognize inline forward declaration, but clang does.
I wonder who is right?
This was previously addressed by adding an #include. Instead, this patch
adds a standalone forward declaration of the QXmlStreamReader/Writer classes.
This has been tested and verified to compile with gcc and clang.
Also immediately emit debug messages to console even before the UI is
initialized.
And present a useful error if the OSCAR data folder can't be created.
This is transparent to the user and is recorded into a log directory within
the OSCAR_Data directory.
Also add log rotation so that these logs don't grow forever.
The only code change was to move XmlReplayEvent::s_factories into
a local static variable accessed by XmlReplayEvent::factories() to
ensure that it will be initialized before it is used.
Otherwise there is no guarantee in C++11 that global variables
in different source files (translation units) will be initialized
in any particular order.
This is significant now because it will allow accurate recording of
multiple simultaneous connections.
This is important for the future because it establishes the
necessary infrastructure for recording downloaded sessions into their
own files so that they can be saved as backups.
Now a replayed read() will return the response that follows the
matching write().
When calls are made in the same order as they were during recording,
this will have no effect, and the original ordering will be replayed.
However, minor changes to the code should still result in sensible
replay until a new recording can be made.
Calling openConnection will return an open connection or nullptr.
Deleting the connection will close it.
SerialPort now uses this under the hood, while still presenting
the QSerialPort-compatible interface.