| 50 | } |
| 51 | |
| 52 | void HistogramView::setScalePixmap(const QString& file) { |
| 53 | // scene rect is 1000*100 where upper 1000*80 is for histogram graph |
| 54 | // and lower 1000*20 is for histogram scale |
| 55 | auto* pixmap = new QGraphicsPixmapItem(QPixmap(file).scaled(1000, 20, Qt::IgnoreAspectRatio), nullptr); |
| 56 | pixmap->setZValue(-1); |
| 57 | pixmap->setPos(0, 90); |
| 58 | m_scene->addItem(pixmap); |
| 59 | } |
| 60 | |
| 61 | void HistogramView::setSpan(int l, int h) { |
| 62 | l = l * 1000 / m_range; |
no test coverage detected