Changeset 11158 in ntrip for trunk/BNC/src/rinex/graphwin.cpp


Ignore:
Timestamp:
Nov 3, 2026, 10:53:35 AM (4 days ago)
Author:
stuerze
Message:

deprecated functions exchanged libs updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/rinex/graphwin.cpp

    r11023 r11158  
    4141#include <qwt_scale_widget.h>
    4242#include <qwt_scale_engine.h>
     43#include <qwt_interval.h>
    4344
    4445#include <QDir>
    4546#include <QFileInfo>
     47#include <QPainter>
    4648#include <QHBoxLayout>
    4749#include <QVBoxLayout>
    … …  
    174176    QPainter painter;
    175177    painter.begin(&printer);
    176     double xscale = printer.pageRect().width()/double(_canvas->width());
    177     double yscale = printer.pageRect().height()/double(_canvas->height());
     178    QRect pageRect  = printer.pageLayout().paintRectPixels(printer.resolution());
     179    QRect paperRect = printer.pageLayout().fullRectPixels(printer.resolution());
     180    double xscale = pageRect.width()/double(_canvas->width());
     181    double yscale = pageRect.height()/double(_canvas->height());
    178182    double scale  = qMin(xscale, yscale);
    179     painter.translate(printer.paperRect().x() + printer.pageRect().width()/2,
    180                       printer.paperRect().y() + printer.pageRect().height()/2);
     183    painter.translate(paperRect.x() + pageRect.width()/2,
     184                      paperRect.y() + pageRect.height()/2);
    181185    painter.scale(scale, scale);
    182186    painter.translate(-width()/2, -height()/2);
Note: See TracChangeset for help on using the changeset viewer.