Changeset 4349 in ntrip for trunk/BNC/src


Ignore:
Timestamp:
Jun 24, 2012, 4:57:03 PM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src/rinex
Files:
2 edited

Legend:

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

    r4348 r4349  
    8383
    8484   QwtLinearScaleEngine scaleEngine;
    85     _colorScale->setScaleDiv(scaleEngine.transformation(),
     85   _colorScale->setScaleDiv(scaleEngine.transformation(),
    8686      scaleEngine.divideScale(interval.minValue(), interval.maxValue(), 8, 5));
    8787
    8888  // Layout
    8989  // ------
    90   QHBoxLayout* plotLayout = new QHBoxLayout;
     90  _canvas = new QWidget(this);
     91  QHBoxLayout* plotLayout = new QHBoxLayout(_canvas);
    9192  for (int ip = 0; ip < plots.size(); ip++) {
    9293    plotLayout->addWidget(plots[ip]);
     
    99100
    100101  QVBoxLayout* mainLayout = new QVBoxLayout(this);
    101   mainLayout->addLayout(plotLayout);
     102  mainLayout->addWidget(_canvas);
    102103  mainLayout->addLayout(buttonLayout);
    103104}
     
    133134    QPainter painter;
    134135    painter.begin(&printer);
    135     QWidget* prtWidget = this; // TODO: only a part of it?
    136     double xscale = printer.pageRect().width()/double(prtWidget->width());
    137     double yscale = printer.pageRect().height()/double(prtWidget->height());
     136    double xscale = printer.pageRect().width()/double(_canvas->width());
     137    double yscale = printer.pageRect().height()/double(_canvas->height());
    138138    double scale  = qMin(xscale, yscale);
    139139    painter.translate(printer.paperRect().x() + printer.pageRect().width()/2,
     
    141141    painter.scale(scale, scale);
    142142    painter.translate(-width()/2, -height()/2);
    143     prtWidget->render(&painter);
     143    _canvas->render(&painter);
    144144  }
    145145}
  • trunk/BNC/src/rinex/graphwin.h

    r4348 r4349  
    6464
    6565 private:
     66  QWidget*        _canvas;
    6667  QPushButton*    _buttonClose;
    6768  QPushButton*    _buttonPrint;
Note: See TracChangeset for help on using the changeset viewer.