diff --git a/Htmldocs/release_notes.html b/Htmldocs/release_notes.html
index 481cc656..1c8703f5 100644
--- a/Htmldocs/release_notes.html
+++ b/Htmldocs/release_notes.html
@@ -23,7 +23,7 @@
[new] Add support for new settings codes in recently manufactured 700X110 DreamStations.
[new] Add 95% flow limitation to Therapy Efficacy section on Statistics page.
- [new] Improve appearance and operation of event types and graphs comboboxes on Daily page.
+ [new] Improve appearance and operation of event types and graphs comboboxes on Daily and Overview pages.
[fix] Correct SleepStyle machines sometimes identified as Icon machines.
[fix] Improve event flag position in flow graph for DV6 machines.
[fix] --datadir option now allows fully qualified paths on Mac and Linux.
diff --git a/oscar/overview.cpp b/oscar/overview.cpp
index 81e6fdc2..e1375378 100644
--- a/oscar/overview.cpp
+++ b/oscar/overview.cpp
@@ -131,6 +131,8 @@ Overview::Overview(QWidget *parent, gGraphView *shared) :
icon_on = new QIcon(":/icons/session-on.png");
icon_off = new QIcon(":/icons/session-off.png");
+ icon_up_down = new QIcon(":/icons/up-down.png");
+ icon_warning = new QIcon(":/icons/warning.png");
GraphView->resetLayout();
GraphView->SaveDefaultSettings();
@@ -328,11 +330,33 @@ void Overview::ReloadGraphs()
on_rangeCombo_activated(ui->rangeCombo->currentIndex());
}
+void Overview::setGraphText () {
+ int numOff = 0;
+ int numTotal = 0;
+
+ gGraph *g;
+ for (int i=0;isize();i++) {
+ g=(*GraphView)[i];
+ if (!g->isEmpty()) {
+ numTotal++;
+ if (!g->visible()) {
+ numOff++;
+ }
+ }
+ }
+ ui->graphCombo->setItemIcon(0, numOff ? *icon_warning : *icon_up_down);
+ QString graphText;
+ if (numOff == 0) graphText = QObject::tr("%1 Charts").arg(numTotal);
+ else graphText = QObject::tr("%1 of %2 Charts").arg(numTotal-numOff).arg(numTotal);
+ ui->graphCombo->setItemText(0, graphText);
+}
+
void Overview::updateGraphCombo()
{
ui->graphCombo->clear();
gGraph *g;
+ ui->graphCombo->addItem(*icon_up_down, tr("10 of 10 Charts"), true); // Translation only to define space required
for (int i = 0; i < GraphView->size(); i++) {
g = (*GraphView)[i];
@@ -346,6 +370,7 @@ void Overview::updateGraphCombo()
}
ui->graphCombo->setCurrentIndex(0);
+ setGraphText();
updateCube();
}
@@ -591,22 +616,25 @@ void Overview::on_graphCombo_activated(int index)
return;
}
- gGraph *g;
- QString s;
- s = ui->graphCombo->currentText();
- bool b = !ui->graphCombo->itemData(index, Qt::UserRole).toBool();
- ui->graphCombo->setItemData(index, b, Qt::UserRole);
+ if (index > 0 ) {
+ gGraph *g;
+ QString s;
+ s = ui->graphCombo->currentText();
+ bool b = !ui->graphCombo->itemData(index, Qt::UserRole).toBool();
+ ui->graphCombo->setItemData(index, b, Qt::UserRole);
- if (b) {
- ui->graphCombo->setItemIcon(index, *icon_on);
- } else {
- ui->graphCombo->setItemIcon(index, *icon_off);
- }
-
- g = GraphView->findGraphTitle(s);
- g->setVisible(b);
+ if (b) {
+ ui->graphCombo->setItemIcon(index, *icon_on);
+ } else {
+ ui->graphCombo->setItemIcon(index, *icon_off);
+ }
+ g = GraphView->findGraphTitle(s);
+ g->setVisible(b);
+}
+ ui->graphCombo->setCurrentIndex(0);
updateCube();
+ setGraphText();
GraphView->updateScale();
GraphView->redraw();
}
diff --git a/oscar/overview.h b/oscar/overview.h
index b790f3f4..ce543905 100644
--- a/oscar/overview.h
+++ b/oscar/overview.h
@@ -116,7 +116,7 @@ class Overview : public QWidget
void on_LineCursorUpdate(double time);
void on_RangeUpdate(double minx, double maxx);
-
+ void setGraphText ();
private:
void CreateAllGraphs();
@@ -128,6 +128,8 @@ class Overview : public QWidget
gGraphView *m_shared;
QIcon *icon_on;
QIcon *icon_off;
+ QIcon *icon_up_down;
+ QIcon *icon_warning;
MyLabel *dateLabel;
bool customMode=false;