[qt] remove deprecated pixmap calls
This commit is contained in:
parent
f803854da3
commit
fe20326953
@ -280,8 +280,8 @@ void PylonRecorder::saveAs() {
|
||||
|
||||
|
||||
void PylonRecorder::print() {
|
||||
QPixmap map = imageLabel->pixmap(Qt::ReturnByValue);
|
||||
Q_ASSERT(!map.isNull());
|
||||
const QPixmap *map = imageLabel->pixmap();
|
||||
Q_ASSERT(!map->isNull());
|
||||
#if defined(QT_PRINTSUPPORT_LIB) && QT_CONFIG(printdialog)
|
||||
|
||||
QPrintDialog dialog(&printer, this);
|
||||
@ -289,11 +289,11 @@ void PylonRecorder::print() {
|
||||
if (dialog.exec()) {
|
||||
QPainter painter(&printer);
|
||||
QRect rect = painter.viewport();
|
||||
QSize size = map.size();
|
||||
QSize size = map->size();
|
||||
size.scale(rect.size(), Qt::KeepAspectRatio);
|
||||
painter.setViewport(rect.x(), rect.y(), size.width(), size.height());
|
||||
painter.setWindow(map.rect());
|
||||
painter.drawPixmap(0, 0, map);
|
||||
painter.setWindow(map->rect());
|
||||
painter.drawPixmap(0, 0, *map);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@ -570,10 +570,10 @@ void PylonRecorder::cameraIDAccepted() {
|
||||
}
|
||||
|
||||
void PylonRecorder::scaleImage(double factor) {
|
||||
QPixmap map = imageLabel->pixmap(Qt::ReturnByValue);
|
||||
Q_ASSERT(!map.isNull());
|
||||
const QPixmap *map = imageLabel->pixmap();
|
||||
Q_ASSERT(!map->isNull());
|
||||
scaleFactor *= factor;
|
||||
imageLabel->resize(scaleFactor * map.size());
|
||||
imageLabel->resize(scaleFactor * map->size());
|
||||
|
||||
adjustScrollBar(scrollArea->horizontalScrollBar(), factor);
|
||||
adjustScrollBar(scrollArea->verticalScrollBar(), factor);
|
||||
@ -584,7 +584,7 @@ void PylonRecorder::scaleImage(double factor) {
|
||||
|
||||
|
||||
void PylonRecorder::applyScaling(){
|
||||
imageLabel->resize(scaleFactor * imageLabel->pixmap(Qt::ReturnByValue).size());
|
||||
imageLabel->resize(scaleFactor * imageLabel->pixmap()->size());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user