Changeset 4329 in ntrip


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

Legend:

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

    r4310 r4329  
    4040
    4141#include "graphwin.h"
     42#include "qwt_scale_widget.h"
    4243
    4344using namespace std;
     
    6162  connect(_buttonOK, SIGNAL(clicked()), this, SLOT(slotOK()));
    6263
     64  // Color Scale
     65  // -----------
     66  _colorScale = new QwtScaleWidget( this );
     67  _colorScale->setAlignment( QwtScaleDraw::RightScale );
     68  _colorScale->setColorBarEnabled( true );
     69
     70   QwtText title( "Intensity" );
     71   QFont font = _colorScale->font();
     72   font.setBold( true );
     73   title.setFont( font );
     74   _colorScale->setTitle( title );
     75
     76   _colorScale->setColorMap(QwtInterval(0.0, 1.0), new t_colorMap());
     77
    6378  // Layout
    6479  // ------
     
    6782    plotLayout->addWidget(plots[ip]);
    6883  }
     84  plotLayout->addWidget(_colorScale);
    6985
    7086  QHBoxLayout* buttonLayout = new QHBoxLayout;
  • trunk/BNC/src/rinex/graphwin.h

    r4310 r4329  
    2828#include <QtCore>
    2929#include <QtGui>
     30#include <qwt_color_map.h>
    3031
     32class QwtScaleWidget;
     33
     34//
     35//////////////////////////////////////////////////////////////////////////////
     36class t_colorMap: public QwtLinearColorMap {
     37 public:
     38  t_colorMap() : QwtLinearColorMap(Qt::darkBlue, Qt::yellow) {
     39    addColorStop(0.05, Qt::blue);
     40    addColorStop(0.30, Qt::cyan);
     41    addColorStop(0.60, Qt::green);
     42    addColorStop(0.98, Qt::red);
     43  }
     44};
     45
     46//
     47//////////////////////////////////////////////////////////////////////////////
    3148class t_graphWin : public QDialog {
    3249
     
    4663
    4764 private:
    48   QPushButton* _buttonOK;
     65  QPushButton*    _buttonOK;
     66  QwtScaleWidget* _colorScale;
    4967};
    5068
  • trunk/BNC/src/rinex/polarplot.cpp

    r4328 r4329  
    2323
    2424#include "polarplot.h"
     25#include "graphwin.h"
    2526
    2627// Draw Symbols (virtual) - change symbol's color
     
    108109  grid->attach(this);
    109110
    110   _colorMap = new t_colorMap();
    111   QwtScaleWidget* colorScale = new QwtScaleWidget(this);
    112   colorScale->setAlignment(QwtScaleDraw::RightScale);
    113   colorScale->setColorBarEnabled(true);
    114   colorScale->setColorMap(QwtInterval(0.0,1.0), _colorMap);
    115 
    116111  // Curves
    117112  // ------
  • trunk/BNC/src/rinex/polarplot.h

    r4328 r4329  
    55#include <qwt_polar_plot.h>
    66#include <qwt_polar_curve.h>
    7 #include <qwt_color_map.h>
    8 
    9 //
    10 //////////////////////////////////////////////////////////////////////////////
    11 class t_colorMap: public QwtLinearColorMap {
    12  public:
    13   t_colorMap() : QwtLinearColorMap(Qt::darkBlue, Qt::yellow) {
    14     addColorStop(0.05, Qt::blue);
    15     addColorStop(0.30, Qt::cyan);
    16     addColorStop(0.60, Qt::green);
    17     addColorStop(0.98, Qt::red);
    18   }
    19 };
    20 
    217//
    228//////////////////////////////////////////////////////////////////////////////
     
    6955 private:
    7056  t_polarCurve* createCurve() const;
    71   t_colorMap*   _colorMap;
    7257};
    7358
Note: See TracChangeset for help on using the changeset viewer.