Shortcuts for adding/removing plots

This commit is contained in:
Jan Käberich 2023-10-24 14:04:31 +02:00
parent 59f3057dd9
commit ccb71f9650
16 changed files with 397 additions and 71 deletions

View file

@ -659,19 +659,19 @@ void EyeDiagramPlot::draw(QPainter &p)
} else {
qDebug() << "Empty eye data, displaydata:" << displayData;
}
if(dropPending) {
p.setOpacity(0.5);
p.setBrush(Qt::white);
p.setPen(Qt::white);
if(dropPending && supported(dropTrace)) {
p.setOpacity(dropOpacity);
p.setBrush(dropBackgroundColor);
p.setPen(dropForegroundColor);
// show drop area over whole plot
p.drawRect(plotRect);
p.drawRect(getDropRect());
auto font = p.font();
font.setPixelSize(20);
p.setFont(font);
p.setOpacity(1.0);
p.setPen(Qt::white);
p.setPen(dropSection == DropSection::OnPlot ? dropHighlightColor : dropForegroundColor);
auto text = "Drop here to add\n" + dropTrace->name() + "\nto eye diagram";
p.drawText(plotRect, Qt::AlignCenter, text);
p.drawText(getDropRect(), Qt::AlignCenter, text);
}
}