Package pygtk_chart :: Module line_chart :: Class Grid
[hide private]
[frames] | no frames]

Class Grid

source code


A class representing the grid of the chart. It is used by the LineChart widget internally, there is no need to create an instance yourself.

Instance Methods [hide private]
 
__init__(self, range_calc)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
do_get_property(self, property) source code
 
do_set_property(self, property, value) source code
 
_do_draw(self, context, rect)
A derived class should override this method.
source code
 
set_draw_horizontal_lines(self, draw)
Set whether to draw horizontal grid lines.
source code
 
get_draw_horizontal_lines(self)
Returns True if horizontal grid lines are drawn.
source code
 
set_draw_vertical_lines(self, draw)
Set whether to draw vertical grid lines.
source code
 
get_draw_vertical_lines(self)
Returns True if vertical grid lines are drawn.
source code
 
set_color(self, color)
Set the color of the grid.
source code
 
get_color(self)
Returns the color of the grid.
source code

Inherited from chart.ChartObject: draw, get_antialias, get_visible, set_antialias, set_visible

Inherited from unreachable.GObject: __cmp__, __copy__, __deepcopy__, __delattr__, __gdoc__, __gobject_init__, __hash__, __new__, __repr__, __setattr__, chain, connect, connect_after, connect_object, connect_object_after, disconnect, disconnect_by_func, emit, emit_stop_by_name, freeze_notify, get_data, get_properties, get_property, handler_block, handler_block_by_func, handler_disconnect, handler_is_connected, handler_unblock, handler_unblock_by_func, notify, props, set_data, set_properties, set_property, stop_emission, thaw_notify, weak_ref

Inherited from object: __getattribute__, __reduce__, __reduce_ex__, __str__

Class Variables [hide private]
  __gproperties__ = {"show-horizontal":(gobject.TYPE_BOOLEAN, "s...
  __gtype__ = <GType pygtk_chart+line_chart+Grid (169113928)>

Inherited from chart.ChartObject: __gsignals__

Properties [hide private]

Inherited from unreachable.GObject: __grefcount__

Inherited from object: __class__

Method Details [hide private]

__init__(self, range_calc)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

do_get_property(self, property)

source code 
Overrides: chart.ChartObject.do_get_property

do_set_property(self, property, value)

source code 
Overrides: chart.ChartObject.do_set_property

_do_draw(self, context, rect)

source code 

A derived class should override this method. The drawing stuff should happen here.

Parameters:
  • context - The context to draw on.
  • rect - A rectangle representing the charts area.
Overrides: chart.ChartObject._do_draw
(inherited documentation)

set_draw_horizontal_lines(self, draw)

source code 

Set whether to draw horizontal grid lines.

Parameters:
  • draw (boolean.)

get_draw_horizontal_lines(self)

source code 

Returns True if horizontal grid lines are drawn.

Returns:
boolean.

set_draw_vertical_lines(self, draw)

source code 

Set whether to draw vertical grid lines.

Parameters:
  • draw (boolean.)

get_draw_vertical_lines(self)

source code 

Returns True if vertical grid lines are drawn.

Returns:
boolean.

set_color(self, color)

source code 

Set the color of the grid.

Parameters:
  • color (a color) - The new color of the grid.

get_color(self)

source code 

Returns the color of the grid.

Returns:
a color.

Class Variable Details [hide private]

__gproperties__

Value:
{"show-horizontal":(gobject.TYPE_BOOLEAN, "show horizontal lines", "Se\
t whether to draw horizontal lines.", True, gobject.PARAM_READWRITE), \
"show-vertical":(gobject.TYPE_BOOLEAN, "show vertical lines", "Set whe\
ther to draw vertical lines.", True, gobject.PARAM_READWRITE), "color"\
:(gobject.TYPE_PYOBJECT, "grid color", "The color of the grid in (r,g,\
b) format. r,g,b in [0,1]", gobject.PARAM_READWRITE)}