mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-08 04:00:44 +00:00
adds preference for Enables SessionBar in Event Flags Graph
This commit is contained in:
parent
7291d9ef04
commit
5fbdcece56
@ -231,7 +231,7 @@ void gFlagsGroup::paint(QPainter &painter, gGraph &g, const QRegion ®ion)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// graph each session at top
|
// graph each session at top
|
||||||
if (m_sessions.size()>1 ) {
|
if ( AppSetting->eventFlagSessionBar() && m_sessions.size()>1 ) {
|
||||||
QRect sessBox(0,g.top,0,sessionBarHeight());
|
QRect sessBox(0,g.top,0,sessionBarHeight());
|
||||||
double adjustment = width/(double)m_duration;
|
double adjustment = width/(double)m_duration;
|
||||||
for (const auto & sess : m_sessions) {
|
for (const auto & sess : m_sessions) {
|
||||||
|
@ -27,6 +27,7 @@ AppWideSetting::AppWideSetting(Preferences *pref) : PrefSettings(pref)
|
|||||||
// initPref(STR_AS_GraphSnapshots, true);
|
// initPref(STR_AS_GraphSnapshots, true);
|
||||||
initPref(STR_AS_IncludeSerial, false);
|
initPref(STR_AS_IncludeSerial, false);
|
||||||
initPref(STR_AS_MonochromePrinting, false);
|
initPref(STR_AS_MonochromePrinting, false);
|
||||||
|
initPref(STR_AS_EventFlagSessionBar, true);
|
||||||
initPref(STR_AS_ShowPieChart, false);
|
initPref(STR_AS_ShowPieChart, false);
|
||||||
m_animations = initPref(STR_AS_Animations, true).toBool();
|
m_animations = initPref(STR_AS_Animations, true).toBool();
|
||||||
m_squareWavePlots = initPref(STR_AS_SquareWave, false).toBool();
|
m_squareWavePlots = initPref(STR_AS_SquareWave, false).toBool();
|
||||||
|
@ -46,6 +46,7 @@ const QString STR_AS_UsePixmapCaching = "UsePixmapCaching";
|
|||||||
const QString STR_AS_AllowYAxisScaling = "AllowYAxisScaling";
|
const QString STR_AS_AllowYAxisScaling = "AllowYAxisScaling";
|
||||||
const QString STR_AS_IncludeSerial = "IncludeSerial";
|
const QString STR_AS_IncludeSerial = "IncludeSerial";
|
||||||
const QString STR_AS_MonochromePrinting = "PrintBW";
|
const QString STR_AS_MonochromePrinting = "PrintBW";
|
||||||
|
const QString STR_AS_EventFlagSessionBar = "EventFlagSessionBar";
|
||||||
const QString STR_AS_GraphTooltips = "GraphTooltips";
|
const QString STR_AS_GraphTooltips = "GraphTooltips";
|
||||||
const QString STR_AS_LineThickness = "LineThickness";
|
const QString STR_AS_LineThickness = "LineThickness";
|
||||||
const QString STR_AS_LineCursorMode = "LineCursorMode";
|
const QString STR_AS_LineCursorMode = "LineCursorMode";
|
||||||
@ -137,6 +138,7 @@ public:
|
|||||||
bool includeSerial() const { return getPref(STR_AS_IncludeSerial).toBool(); }
|
bool includeSerial() const { return getPref(STR_AS_IncludeSerial).toBool(); }
|
||||||
//! \brief Whether to print reports in black and white, which can be more legible on non-color printers
|
//! \brief Whether to print reports in black and white, which can be more legible on non-color printers
|
||||||
bool monochromePrinting() const { return getPref(STR_AS_MonochromePrinting).toBool(); }
|
bool monochromePrinting() const { return getPref(STR_AS_MonochromePrinting).toBool(); }
|
||||||
|
bool eventFlagSessionBar() const { return getPref(STR_AS_EventFlagSessionBar).toBool(); }
|
||||||
//! \Allow disabling of sessions
|
//! \Allow disabling of sessions
|
||||||
//! \brief Whether to show graph tooltips
|
//! \brief Whether to show graph tooltips
|
||||||
inline bool graphTooltips() const { return m_graphTooltips; }
|
inline bool graphTooltips() const { return m_graphTooltips; }
|
||||||
@ -197,6 +199,7 @@ public:
|
|||||||
void setIncludeSerial(bool b) { setPref(STR_AS_IncludeSerial, b); }
|
void setIncludeSerial(bool b) { setPref(STR_AS_IncludeSerial, b); }
|
||||||
//! \brief Sets whether to print reports in black and white, which can be more legible on non-color printers
|
//! \brief Sets whether to print reports in black and white, which can be more legible on non-color printers
|
||||||
void setMonochromePrinting(bool b) { setPref(STR_AS_MonochromePrinting, b); }
|
void setMonochromePrinting(bool b) { setPref(STR_AS_MonochromePrinting, b); }
|
||||||
|
void setEventFlagSessionBar(bool b) { setPref(STR_AS_EventFlagSessionBar, b); }
|
||||||
//! \brief Sets whether to allow double clicking on Y-Axis labels to change vertical scaling mode
|
//! \brief Sets whether to allow double clicking on Y-Axis labels to change vertical scaling mode
|
||||||
void setGraphTooltips(bool b) { setPref(STR_AS_GraphTooltips, m_graphTooltips=b); }
|
void setGraphTooltips(bool b) { setPref(STR_AS_GraphTooltips, m_graphTooltips=b); }
|
||||||
//! \brief Sets the type of overlay flags (which are displayed over the Flow Waveform)
|
//! \brief Sets the type of overlay flags (which are displayed over the Flow Waveform)
|
||||||
|
@ -241,6 +241,7 @@ PreferencesDialog::PreferencesDialog(QWidget *parent, Profile *_profile) :
|
|||||||
ui->allowYAxisScaling->setChecked(AppSetting->allowYAxisScaling());
|
ui->allowYAxisScaling->setChecked(AppSetting->allowYAxisScaling());
|
||||||
ui->includeSerial->setChecked(AppSetting->includeSerial());
|
ui->includeSerial->setChecked(AppSetting->includeSerial());
|
||||||
ui->monochromePrinting->setChecked(AppSetting->monochromePrinting());
|
ui->monochromePrinting->setChecked(AppSetting->monochromePrinting());
|
||||||
|
ui->eventFlagSessionBar->setChecked(AppSetting->eventFlagSessionBar());
|
||||||
ui->complianceHours->setValue(profile->cpap->complianceHours());
|
ui->complianceHours->setValue(profile->cpap->complianceHours());
|
||||||
ui->clinicalMode->setChecked(profile->cpap->clinicalMode());
|
ui->clinicalMode->setChecked(profile->cpap->clinicalMode());
|
||||||
ui->clinicalTextEdit->setPlainText(clinicalHelp());
|
ui->clinicalTextEdit->setPlainText(clinicalHelp());
|
||||||
@ -857,6 +858,7 @@ bool PreferencesDialog::Save()
|
|||||||
AppSetting->setAllowYAxisScaling(ui->allowYAxisScaling->isChecked());
|
AppSetting->setAllowYAxisScaling(ui->allowYAxisScaling->isChecked());
|
||||||
AppSetting->setIncludeSerial(ui->includeSerial->isChecked());
|
AppSetting->setIncludeSerial(ui->includeSerial->isChecked());
|
||||||
AppSetting->setMonochromePrinting(ui->monochromePrinting->isChecked());
|
AppSetting->setMonochromePrinting(ui->monochromePrinting->isChecked());
|
||||||
|
AppSetting->setEventFlagSessionBar(ui->eventFlagSessionBar->isChecked());
|
||||||
p_profile->cpap->setClinicalMode(ui->clinicalMode->isChecked());
|
p_profile->cpap->setClinicalMode(ui->clinicalMode->isChecked());
|
||||||
AppSetting->setGraphTooltips(ui->graphTooltips->isChecked());
|
AppSetting->setGraphTooltips(ui->graphTooltips->isChecked());
|
||||||
|
|
||||||
|
@ -2887,6 +2887,16 @@ Try it and see if you like it.</string>
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="eventFlagSessionBar">
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>For multiple sessions, displays a thin gray line for each session at the top of the Event Flag graph.</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Enables SessionBar in Event Flags Graph</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<spacer name="verticalSpacer">
|
<spacer name="verticalSpacer">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
|
Loading…
Reference in New Issue
Block a user