Fix item delegates in Event/Waveform preferences

This commit is contained in:
Mark Watkins 2014-09-19 01:33:50 +10:00
parent e636094e1f
commit 964d6b8862
3 changed files with 9 additions and 5 deletions

View File

@ -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());

View File

@ -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++) {