Changeset 8347:c7eb946d9893 in orange


Ignore:
Timestamp:
07/03/11 09:30:12 (3 years ago)
Author:
Noughmad <Noughmad@…>
Branch:
default
Convert:
e236325e815cc288c0c9990f6a65532cfb9d1bd2
Message:

Add necessary /Transfer/ annotation to .sip files and a private copy constructor to PlotItem

Location:
source/orangegraph
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • source/orangegraph/graph.cpp

    r8342 r8347  
    2020{ 
    2121    qDebug() << "Adding item" << item << "in C++"; 
     22    if (m_items.contains(item)) 
     23    { 
     24        qWarning() << "Item is already in this graph"; 
     25        return; 
     26    } 
    2227    item->m_graph = this; 
    2328    item->setParentItem(graph_item); 
     
    3237        scene()->removeItem(item); 
    3338        m_items.removeAll(item); 
    34         delete item; 
    3539    } 
    3640    else 
  • source/orangegraph/graph.sip

    r8335 r8347  
    3535    virtual ~Graph(); 
    3636     
    37     void addItem(PlotItem* item); 
     37    void addItem(PlotItem* item /Transfer/); 
    3838    void removeItem(PlotItem* item); 
    3939    void removeAllItems(); 
  • source/orangegraph/plotitem.h

    r8334 r8347  
    3030     
    3131private: 
     32    Q_DISABLE_COPY(PlotItem) 
    3233     
    3334    Graph* m_graph; 
  • source/orangegraph/plotitem.sip

    r8346 r8347  
    1414    virtual QRectF dataRect() const; 
    1515     
    16     void attach(Graph* graph); 
     16    void attach(Graph* graph /TransferThis/); 
    1717    void detach(); 
    1818     
     
    2323     
    2424    QPair<int, int> axes() const; 
    25     void setAxes(int x_axis, int y_axis);     
     25    void setAxes(int x_axis, int y_axis);   
     26 
     27private: 
     28    PlotItem(const PlotItem &); 
    2629}; 
Note: See TracChangeset for help on using the changeset viewer.