Changeset 4349 in ntrip for trunk/BNC/src
- Timestamp:
- Jun 24, 2012, 4:57:03 PM (12 years ago)
- Location:
- trunk/BNC/src/rinex
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/graphwin.cpp
r4348 r4349 83 83 84 84 QwtLinearScaleEngine scaleEngine; 85 85 _colorScale->setScaleDiv(scaleEngine.transformation(), 86 86 scaleEngine.divideScale(interval.minValue(), interval.maxValue(), 8, 5)); 87 87 88 88 // Layout 89 89 // ------ 90 QHBoxLayout* plotLayout = new QHBoxLayout; 90 _canvas = new QWidget(this); 91 QHBoxLayout* plotLayout = new QHBoxLayout(_canvas); 91 92 for (int ip = 0; ip < plots.size(); ip++) { 92 93 plotLayout->addWidget(plots[ip]); … … 99 100 100 101 QVBoxLayout* mainLayout = new QVBoxLayout(this); 101 mainLayout->add Layout(plotLayout);102 mainLayout->addWidget(_canvas); 102 103 mainLayout->addLayout(buttonLayout); 103 104 } … … 133 134 QPainter painter; 134 135 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()); 138 138 double scale = qMin(xscale, yscale); 139 139 painter.translate(printer.paperRect().x() + printer.pageRect().width()/2, … … 141 141 painter.scale(scale, scale); 142 142 painter.translate(-width()/2, -height()/2); 143 prtWidget->render(&painter);143 _canvas->render(&painter); 144 144 } 145 145 } -
trunk/BNC/src/rinex/graphwin.h
r4348 r4349 64 64 65 65 private: 66 QWidget* _canvas; 66 67 QPushButton* _buttonClose; 67 68 QPushButton* _buttonPrint;
Note:
See TracChangeset
for help on using the changeset viewer.