Changeset 8659:30b1f490d677 in orange


Ignore:
Timestamp:
08/11/11 10:28:11 (3 years ago)
Author:
Noughmad <Noughmad@…>
Branch:
default
Convert:
d21f8d1b31541cc7b1db9b0a66d4086fd513087b
Message:

Add documentation for the OWPoint class

Location:
orange
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • orange/OrangeWidgets/plot/owcurve.py

    r8628 r8659  
    136136             
    137137        .. attribute:: name 
    138             :type: str 
    139138 
    140139            The name of the curve, used in the legend or in tooltips.  
     
    155154            self.setToolTip(tooltip) 
    156155        self.name = '' 
     156         
     157OWMultiCurve = orangeplot.MultiCurve 
    157158 
    158159             
  • orange/OrangeWidgets/plot/owplot.py

    r8658 r8659  
    693693            .. note:: This function does not add items to the legend automatically.  
    694694                      You will have to add them yourself with :meth:`.OWLegend.add_item`.  
     695                       
     696            .. seealso:: :obj:`.OWMultiCurve`, :obj:`.OWPoint` 
    695697        """ 
    696698        if not self.main_curve: 
    697             self.main_curve = orangeplot.MultiCurve([], []) 
     699            self.main_curve = OWMultiCurve([], []) 
    698700 
    699701        c = self.main_curve 
  • orange/OrangeWidgets/plot/owpoint.py

    r8658 r8659  
     1""" 
     2##################### 
     3Point (``owpoint``) 
     4##################### 
     5 
     6.. class:: OWPoint 
     7 
     8    Represents a point on the plot, usually a part of a curve, or in a legend item.  
     9     
     10    The point is identified with its symbol, color, size, label, and state, where the state can be ether unselected (default),  
     11    marker, or selected. All these attributes can be changed and retrieved after the point is constructed.  
     12    For example, color can be set with :meth:`set_color`, while the current color is returned by :meth:`color`.  
     13    There are similarily named function for the other attributes.  
     14 
     15    .. method:: __init__(symbol, color, size) 
     16     
     17        :param symbol: The point symbol.  
     18        :type symbol: int 
     19         
     20        :param color: The point color.  
     21        :type color: QColor 
     22         
     23        :param size: The point size.  
     24        :type size: int 
     25         
     26    .. method:: set_color(color) 
     27         
     28        Sets the point's color to ``color`` 
     29         
     30    .. method:: color() 
     31     
     32        :returns: the point's color 
     33         
     34    .. method:: set_size(size) 
     35         
     36        Sets the point's size to ``size`` 
     37         
     38    .. method:: size() 
     39     
     40        :returns: the point's size 
     41         
     42    .. method:: set_symbol(symbol) 
     43         
     44        Sets the point's symbol to ``symbol`` 
     45         
     46    .. method:: symbol() 
     47     
     48        :returns: the point's symbol 
     49         
     50    .. method:: set_selected(selected) 
     51     
     52        Sets the point's selected state to ``selected`` 
     53         
     54    .. method:: is_selected() 
     55     
     56        :returns: ``True`` if the point is selected, ``False`` otherwise.  
     57         
     58    .. method:: set_marked(marked) 
     59     
     60        Sets the point's marked state to ``marked`` 
     61         
     62    .. method:: is_marked() 
     63     
     64        :returns: ``True`` if the point is marked, ``False`` otherwise.  
     65         
     66    .. method:: set_label(label) 
     67     
     68        Sets the point's label to ``label``.  
     69        The label is displayed under the symbol.  
     70         
     71    .. method:: label() 
     72     
     73        :returns: The point`s label, set with :meth:`set_label` 
     74        :rtype: str 
     75""" 
    176 
    277from PyQt4.QtGui import QGraphicsPathItem, QPen, QBrush 
Note: See TracChangeset for help on using the changeset viewer.