source: orange/orange/OrangeWidgets/plot/owpoint.py @ 8172:442f361f4e58

Revision 8172:442f361f4e58, 2.2 KB checked in by Noughmad <Noughmad@…>, 3 years ago (diff)

Copy the plot module to trunk

Line 
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"""
76
77from PyQt4.QtGui import QGraphicsPathItem, QPen, QBrush
78from PyQt4.QtCore import Qt, QPointF
79
80import orangeqt
81
82OWPoint = orangeqt.Point
Note: See TracBrowser for help on using the repository browser.