Changeset 4573 in ntrip for trunk/BNC/src/rinex/graphwin.cpp
- Timestamp:
- Aug 29, 2012, 11:36:03 AM (12 years ago)
- File:
-
- 1 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;
Note:
See TracChangeset
for help on using the changeset viewer.