mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-09 20:50:43 +00:00
Fix item delegates in Event/Waveform preferences
This commit is contained in:
parent
e636094e1f
commit
964d6b8862
@ -898,7 +898,7 @@ void gSessionTimesChart::paint(QPainter &painter, gGraph &graph, const QRegion &
|
|||||||
float s2 = double(slice.end - slice.start) / 3600000.0;
|
float s2 = double(slice.end - slice.start) / 3600000.0;
|
||||||
|
|
||||||
QColor col = (slice.status == EquipmentOn) ? goodcolor : Qt::black;
|
QColor col = (slice.status == EquipmentOn) ? goodcolor : Qt::black;
|
||||||
QString txt = QObject::tr("%1\nLength:%3\nStart:%2\n").arg(it.key().toString(Qt::SystemLocaleDate)).arg(st.time().toString("hh:mm:ss")).arg(s2,0,'f',2);
|
QString txt = QObject::tr("%1\nLength: %3\nStart: %2\n").arg(it.key().toString(Qt::SystemLocaleDate)).arg(st.time().toString("hh:mm:ss")).arg(s2,0,'f',2);
|
||||||
|
|
||||||
txt += (slice.status == EquipmentOn) ? QObject::tr("Mask On") : QObject::tr("Mask Off");
|
txt += (slice.status == EquipmentOn) ? QObject::tr("Mask On") : QObject::tr("Mask Off");
|
||||||
slices.append(SummaryChartSlice(&calcitems[0], s1, s2, txt, col));
|
slices.append(SummaryChartSlice(&calcitems[0], s1, s2, txt, col));
|
||||||
@ -911,7 +911,7 @@ void gSessionTimesChart::paint(QPainter &painter, gGraph &graph, const QRegion &
|
|||||||
|
|
||||||
float s2 = sess->hours();
|
float s2 = sess->hours();
|
||||||
|
|
||||||
QString txt = QObject::tr("%1\nLength:%3\nStart:%2").arg(it.key().toString(Qt::SystemLocaleDate)).arg(st.time().toString("hh:mm:ss")).arg(s2,0,'f',2);
|
QString txt = QObject::tr("%1\nLength: %3\nStart: %2").arg(it.key().toString(Qt::SystemLocaleDate)).arg(st.time().toString("hh:mm:ss")).arg(s2,0,'f',2);
|
||||||
|
|
||||||
slices.append(SummaryChartSlice(&calcitems[0], s1, s2, txt, goodcolor));
|
slices.append(SummaryChartSlice(&calcitems[0], s1, s2, txt, goodcolor));
|
||||||
}
|
}
|
||||||
|
@ -387,6 +387,10 @@ void Overview::RebuildGraphs(bool reset)
|
|||||||
G->AddLayer(sc);
|
G->AddLayer(sc);
|
||||||
} else if (chan->type() == schema::WAVEFORM) {
|
} else if (chan->type() == schema::WAVEFORM) {
|
||||||
G->AddLayer(new gSummaryChart(code, chan->machtype()));
|
G->AddLayer(new gSummaryChart(code, chan->machtype()));
|
||||||
|
} else if (chan->type() == schema::UNKNOWN) {
|
||||||
|
gSummaryChart * sc = new gSummaryChart(chan->code(), MT_CPAP);
|
||||||
|
sc->addCalc(code, ST_CPH, schema::channel[code].defaultColor());
|
||||||
|
G->AddLayer(sc);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -473,7 +477,7 @@ void Overview::on_LineCursorUpdate(double time)
|
|||||||
} else dateLabel->setText(QString(GraphView->emptyText()));
|
} else dateLabel->setText(QString(GraphView->emptyText()));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Overview::on_RangeUpdate(double minx, double maxx)
|
void Overview::on_RangeUpdate(double minx, double /* maxx */)
|
||||||
{
|
{
|
||||||
if (minx > 1) {
|
if (minx > 1) {
|
||||||
dateLabel->setText(GraphView->getRangeString());
|
dateLabel->setText(GraphView->getRangeString());
|
||||||
|
@ -405,7 +405,7 @@ void PreferencesDialog::InitChanInfo()
|
|||||||
|
|
||||||
ComboBoxDelegate * combobox = new ComboBoxDelegate(ui->waveView);
|
ComboBoxDelegate * combobox = new ComboBoxDelegate(ui->waveView);
|
||||||
|
|
||||||
ui->chanView->setItemDelegateForColumn(2,combobox);
|
ui->chanView->setItemDelegateForColumn(3,combobox);
|
||||||
|
|
||||||
int row = 0;
|
int row = 0;
|
||||||
for (ci = schema::channel.names.begin(); ci != schema::channel.names.end(); ci++) {
|
for (ci = schema::channel.names.begin(); ci != schema::channel.names.end(); ci++) {
|
||||||
@ -536,8 +536,8 @@ void PreferencesDialog::InitWaveInfo()
|
|||||||
|
|
||||||
SpinBoxDelegate * spinbox = new SpinBoxDelegate(ui->waveView);
|
SpinBoxDelegate * spinbox = new SpinBoxDelegate(ui->waveView);
|
||||||
|
|
||||||
ui->waveView->setItemDelegateForColumn(2,spinbox);
|
|
||||||
ui->waveView->setItemDelegateForColumn(3,spinbox);
|
ui->waveView->setItemDelegateForColumn(3,spinbox);
|
||||||
|
ui->waveView->setItemDelegateForColumn(4,spinbox);
|
||||||
|
|
||||||
int row = 0;
|
int row = 0;
|
||||||
for (ci = schema::channel.names.begin(); ci != schema::channel.names.end(); ci++) {
|
for (ci = schema::channel.names.begin(); ci != schema::channel.names.end(); ci++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user