Changeset 8651:9847f6a4848f in orange


Ignore:
Timestamp:
08/10/11 15:58:45 (3 years ago)
Author:
miha <miha.stajdohar@…>
Branch:
default
Convert:
cb5a71a7af379a67dfd45da20ae7df4b30830d34
Message:

Added marked_nodes, marked_to_selected, delected_to_marked.

Location:
source/orangeplot
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • source/orangeplot/plot.cpp

    r8627 r8651  
    269269} 
    270270 
     271QList< Point* > Plot::marked_points() 
     272{ 
     273    QList<Point*> list; 
     274    foreach (const PointHash& hash, m_point_hash) 
     275    { 
     276        foreach (Point* point, hash) 
     277        { 
     278            if (point->is_marked()) 
     279            { 
     280                list.append(point); 
     281            } 
     282        } 
     283    } 
     284    return list; 
     285} 
     286 
    271287Point* Plot::selected_point_at(const DataPoint& pos) 
    272288{ 
     
    382398} 
    383399 
     400void Plot::selected_to_marked() 
     401{ 
     402    foreach (const PointHash& hash, m_point_hash) 
     403    { 
     404        foreach (Point* point, hash) 
     405        { 
     406            point->set_marked(point->is_selected()); 
     407            point->set_selected(false); 
     408        } 
     409    } 
     410    emit selection_changed(); 
     411} 
     412 
     413void Plot::marked_to_selected() 
     414{ 
     415    foreach (const PointHash& hash, m_point_hash) 
     416    { 
     417        foreach (Point* point, hash) 
     418        { 
     419            point->set_selected(point->is_marked()); 
     420            point->set_marked(false); 
     421        } 
     422    } 
     423} 
     424 
    384425 
    385426#include "plot.moc" 
  • source/orangeplot/plot.h

    r8626 r8651  
    5858    QList< int > selected_points(const QList< double > x_data, const QList< double > y_data); 
    5959    QList< Point*> selected_points(); 
     60    QList< Point*> marked_points(); 
    6061     
    6162    Point* nearest_point(const QPointF& pos); 
     
    7374    void unselect_all_points(); 
    7475    void unmark_all_points(); 
     76    void selected_to_marked(); 
     77    void marked_to_selected(); 
    7578     
    7679Q_SIGNALS: 
  • source/orangeplot/plot.sip

    r8626 r8651  
    6767    void unmark_all_points(); 
    6868     
     69    void selected_to_marked(); 
     70    void marked_to_selected(); 
     71     
    6972    QList< int > selected_points(const QList< double > x_data, const QList< double > y_data); 
    7073    QList< Point* > selected_points(); 
     74    QList< Point*> marked_points(); 
    7175    Point* nearest_point(const QPointF& pos); 
    7276    Point* point_at(const DataPoint& pos); 
Note: See TracChangeset for help on using the changeset viewer.