Changeset 8868:79ccf6004de6 in orange


Ignore:
Timestamp:
09/01/11 09:36:13 (3 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
0f342afe7d67f6e4e20543df139c26d389f6f25d
Message:

Added move_selected_points.

Location:
source/orangeqt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • source/orangeqt/plot.cpp

    r8858 r8868  
    474474} 
    475475 
     476void Plot::move_selected_points(const DataPoint& d) 
     477{ 
     478    foreach (Point* p, all_points()) 
     479    { 
     480        if (p->is_selected()) 
     481        { 
     482            DataPoint c = p->coordinates(); 
     483            c.x += d.x; 
     484            c.y += d.y; 
     485            p->set_coordinates(c); 
     486        } 
     487    } 
     488} 
     489 
    476490QList< Point* > Plot::all_points() 
    477491{ 
  • source/orangeqt/plot.h

    r8735 r8868  
    9999    void marked_to_selected(); 
    100100     
     101    void move_selected_points(const DataPoint& d); 
     102 
    101103    bool animate_points; 
    102104     
  • source/orangeqt/plot.sip

    r8735 r8868  
    8989    void remove_all_points(PlotItem* parent); 
    9090     
     91    void move_selected_points(const DataPoint& d); 
     92     
    9193    bool animate_points; 
    9294 
Note: See TracChangeset for help on using the changeset viewer.