Changeset 8447:0efb7362265c in orange


Ignore:
Timestamp:
07/25/11 15:01:33 (3 years ago)
Author:
Noughmad <Noughmad@…>
Branch:
default
Convert:
669e2e3baf2838d19e08bd8bdfd3958c9f5d297f
Message:

Replace use of qreal with double

Location:
source/orangeplot
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/orangeplot/curve.cpp

    r8444 r8447  
    113113} 
    114114 
    115 Point* Curve::point_item(qreal x, qreal y, int size, QGraphicsItem* parent) 
     115Point* Curve::point_item(double x, double y, int size, QGraphicsItem* parent) 
    116116{ 
    117117  if (size == 0) 
     
    133133} 
    134134 
    135 void Curve::set_data(const QList< qreal > x_data, const QList< qreal > y_data) 
     135void Curve::set_data(const QList< double > x_data, const QList< double > y_data) 
    136136{ 
    137137  Q_ASSERT(x_data.size() == y_data.size()); 
  • source/orangeplot/curve.h

    r8444 r8447  
    1212struct DataPoint 
    1313{ 
    14   qreal x; 
    15   qreal y; 
     14  double x; 
     15  double y; 
    1616}; 
    1717 
    1818struct ScaleUpdater 
    1919{ 
    20     ScaleUpdater(qreal scale) {m_scale = scale;} 
     20    ScaleUpdater(double scale) {m_scale = scale;} 
    2121    void operator()(QGraphicsItem* item) {item->setScale(m_scale);} 
    2222     
    2323private: 
    24     qreal m_scale; 
     24    double m_scale; 
    2525}; 
    2626 
    2727struct PointUpdater 
    2828{ 
    29     PointUpdater(int symbol, QColor color, int size, Point::DisplayMode mode, qreal scale) 
     29    PointUpdater(int symbol, QColor color, int size, Point::DisplayMode mode, double scale) 
    3030    { 
    3131        m_symbol = symbol; 
     
    5050     int m_size; 
    5151     Point::DisplayMode m_mode; 
    52      qreal m_scale; 
     52     double m_scale; 
    5353}; 
    5454 
    5555struct Updater 
    5656{ 
    57     Updater(qreal scale, const QPen& pen, const QBrush& brush, const QPainterPath& path) 
     57    Updater(double scale, const QPen& pen, const QBrush& brush, const QPainterPath& path) 
    5858    { 
    5959        m_scale = scale; 
     
    7171    } 
    7272     
    73     qreal m_scale; 
     73    double m_scale; 
    7474    QPen m_pen; 
    7575    QBrush m_brush; 
     
    119119   virtual void update_properties(); 
    120120   
    121   Point* point_item(qreal x, qreal y, int size = 0, QGraphicsItem* parent = 0); 
     121  Point* point_item(double x, double y, int size = 0, QGraphicsItem* parent = 0); 
    122122   
    123123  QColor color() const; 
     
    140140 
    141141  Data data() const; 
    142   void set_data(const QList<qreal> x_data, const QList<qreal> y_data); 
     142  void set_data(const QList<double> x_data, const QList<double> y_data); 
    143143   
    144144  virtual QTransform graph_transform() const; 
     
    157157  void set_zoom_factor(double factor); 
    158158   
    159   qreal max_x_value() const; 
    160   qreal min_x_value() const; 
    161   qreal max_y_value() const; 
    162   qreal min_y_value() const; 
     159  double max_x_value() const; 
     160  double min_x_value() const; 
     161  double max_y_value() const; 
     162  double min_y_value() const; 
    163163     
    164164  enum UpdateFlag 
Note: See TracChangeset for help on using the changeset viewer.