Changeset 4573 in ntrip
- Timestamp:
- Aug 29, 2012, 11:36:03 AM (12 years ago)
- Location:
- trunk/BNC/src/rinex
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/rinex/graphwin.cpp
r4565 r4573 49 49 t_graphWin::t_graphWin(QWidget* parent, const QString& fileName, 50 50 const QVector<QWidget*>& plots, 51 const QByteArray &scaleTitle,52 const QwtInterval scaleInterval) : QDialog(parent) {51 const QByteArray* scaleTitle, 52 const QwtInterval* scaleInterval) : QDialog(parent) { 53 53 54 54 _fileName = fileName; … … 73 73 // Color Scale 74 74 // ----------- 75 _colorScale = new QwtScaleWidget( this ); 76 _colorScale->setAlignment( QwtScaleDraw::RightScale ); 77 _colorScale->setColorBarEnabled( true ); 78 79 QwtText title(scaleTitle); 80 QFont font = _colorScale->font(); 81 font.setBold( true ); 82 title.setFont( font ); 83 _colorScale->setTitle( title ); 84 85 _colorScale->setColorMap(scaleInterval, new t_colorMap()); 86 87 QwtLinearScaleEngine scaleEngine; 88 _colorScale->setScaleDiv(scaleEngine.transformation(), 89 scaleEngine.divideScale(scaleInterval.minValue(), 90 scaleInterval.maxValue(), 91 8, 5)); 75 if (scaleTitle && scaleInterval) { 76 _colorScale = new QwtScaleWidget( this ); 77 _colorScale->setAlignment( QwtScaleDraw::RightScale ); 78 _colorScale->setColorBarEnabled( true ); 79 80 QwtText title(*scaleTitle); 81 QFont font = _colorScale->font(); 82 font.setBold( true ); 83 title.setFont( font ); 84 _colorScale->setTitle( title ); 85 86 _colorScale->setColorMap(*scaleInterval, new t_colorMap()); 87 88 QwtLinearScaleEngine scaleEngine; 89 _colorScale->setScaleDiv(scaleEngine.transformation(), 90 scaleEngine.divideScale(scaleInterval->minValue(), 91 scaleInterval->maxValue(), 92 8, 5)); 93 } 94 else { 95 _colorScale = 0; 96 } 92 97 93 98 // Layout … … 98 103 plotLayout->addWidget(plots[ip]); 99 104 } 100 plotLayout->addWidget(_colorScale); 105 if (_colorScale) { 106 plotLayout->addWidget(_colorScale); 107 } 101 108 102 109 QHBoxLayout* buttonLayout = new QHBoxLayout; -
trunk/BNC/src/rinex/graphwin.h
r4565 r4573 53 53 public: 54 54 t_graphWin(QWidget* parent, const QString& fileName, 55 const QVector<QWidget*>& plots, const QByteArray &scaleTitle,56 const QwtInterval scaleInterval);55 const QVector<QWidget*>& plots, const QByteArray* scaleTitle, 56 const QwtInterval* scaleInterval); 57 57 ~t_graphWin(); 58 58 -
trunk/BNC/src/rinex/reqcanalyze.cpp
r4572 r4573 156 156 157 157 t_graphWin* graphWin = new t_graphWin(0, fileName, plots, 158 scaleTitle,scaleInterval);158 &scaleTitle, &scaleInterval); 159 159 160 160 graphWin->show(); … … 425 425 } 426 426 } 427 428 dataL1 << int(firstEpoch.gpssec()); 427 429 428 430 if (slipFlag) { … … 483 485 (*dataSNR2) << (new t_polarPoint(az, zen, SNR2)); 484 486 485 dataL1 << int(firstEpoch.gpssec());486 487 487 if (_log) { 488 488 _log->setRealNumberNotation(QTextStream::FixedNotation); … … 509 509 QMap<QString, QVector<int> >* prnAvail){ 510 510 511 } 511 qDebug() << fileName << title; 512 513 QMapIterator<QString, QVector<int> > it(*prnAvail); 514 while (it.hasNext()) { 515 it.next(); 516 const QString& prn = it.key(); 517 const QVector<int>& epochs = it.value(); 518 qDebug() << prn << epochs.size(); 519 } 520 521 bncApp* app = dynamic_cast<bncApp*>(qApp); 522 if (app->GUIenabled()) { 523 524 QVector<QWidget*> plots; 525 526 t_graphWin* graphWin = new t_graphWin(0, fileName, plots, 0, 0); 527 528 graphWin->show(); 529 530 bncSettings settings; 531 QString dirName = settings.value("reqcPlotDir").toString(); 532 if (!dirName.isEmpty()) { 533 QByteArray ext = "_AVAIL.png"; 534 graphWin->savePNG(dirName, ext); 535 } 536 } 537 }
Note:
See TracChangeset
for help on using the changeset viewer.