18 def __init__(self, start = 0, end = 0, value = ''):
20 @param self this object 37 @param self this object 52 @param self this object 67 @param self this object 75 diff = a.start - b.start
98 @param self this object 107 @param self this object 109 @return index if found or -1 if not found 115 if key >= self.
ranges[i].start
and key <= self.
ranges[i].end:
117 elif key < self.
ranges[i].start:
125 @param self this object 132 @param self this object 137 """! Get selected ranges 138 @param self this object 139 @param start range start 141 @return the range or and empty list 145 if s == -1
and e == -1:
148 return self.
ranges[0:e + 1]
152 return self.
ranges[s:e + 1]
154 """! Get ranges bounds 155 @param self this object 156 @param start range start 162 if s == -1
and e == -1:
172 @param self this object 178 @param self this object 194 """! Get ranges bounds 195 @param self this object 203 @param self this object 211 if key == self.
events[i].at:
213 elif key < self.
events[i].at:
221 @param self this object 222 @param event event to add 228 @param self this object 229 @param start starting event 230 @param end ending event 235 return self.
events[s:e + 1]
237 """! Get Events Bounds 238 @param self this object 239 @param start starting event 240 @param end ending event 248 @param self this object 254 @param self this object 276 @param self this object 286 @param self this object 291 if range.name == name:
294 self.
ranges.append(timeline)
297 """! Get Event String 298 @param self this object 300 @return the event string 303 if event_str.name == name:
310 @param self this object 315 if event_int.name == name:
322 @param self this object 327 """! Get Events string 328 @param self this object 334 @param self this object 339 """! Sort the ranges and events 340 @param self this object 351 @param self this object 357 (range_lo, range_hi) = range.get_bounds()
363 (ev_lo, ev_hi) = event_str.get_bounds()
369 (ev_lo, ev_hi) = event_int.get_bounds()
382 @param self: this object 387 @param self this object 389 @return the timeline for the name 392 if timeline.name == name:
398 """! Get All Timeline 399 @param self this object 400 @return all timelines 404 """! Sort the timelines 405 @param self this object 412 @param self this object 413 @return the bounds for all timelines 418 (t_lo, t_hi) = timeline.get_bounds()
426 @param self this object 427 @return the keys for all ranges 431 for ranges
in timeline.get_ranges():
432 for ran
in ranges.get_all():
433 range_values[ran.value] = 1
434 return range_values.keys()
446 @param self: this object 457 @param self: this object 474 default_colors = [
Color(1, 0, 0),
Color(0, 1, 0),
Color(0, 0, 1),
Color(1, 1, 0),
Color(1, 0, 1),
Color(0, 1, 1)]
477 @param self this object 481 def add(self, name, color):
483 @param self this object 484 @param name name of the color 485 @param color color value 491 @param self this object 513 @param self this object 519 @param self this object 520 @param padding padding 526 @param self this object 527 @param legends legends 535 @param self this object 540 surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 1, 1)
541 ctx = cairo.Context(surface)
546 (t_width, t_height) = ctx.text_extents(legend)[2:4]
549 if item_height > line_height:
550 line_height = item_height
551 if line_used + item_width > self.
__width:
553 total_height += line_height
555 line_used += item_width
556 x = line_used - item_width
557 total_height += line_height
562 @param self this object 568 @param self this object 577 (t_width, t_height) = ctx.text_extents(legend)[2:4]
580 if item_height > line_height:
581 line_height = item_height
582 if line_used + item_width > self.
__width:
584 total_height += line_height
586 line_used += item_width
587 x = line_used - item_width
589 ctx.set_source_rgb(0, 0, 0)
590 ctx.set_line_width(2)
591 ctx.stroke_preserve()
592 ctx.set_source_rgb(self.
__colors[i].r,
596 ctx.move_to(x + self.
__padding*2, total_height + t_height)
597 ctx.set_source_rgb(0, 0, 0)
598 ctx.show_text(legend)
629 @param self this object 636 @param self this object 642 @param self this object 643 @param timelines timelines 650 """! Set Render Range 651 @param self this object 659 """! Get Data X Start 660 @param self: this object 665 """! Get Data X Start 666 @param self this object 670 surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 1, 1)
671 ctx = cairo.Context(surface)
672 max_text_height = ctx.text_extents(
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcedefghijklmnopqrstuvwxyz0123456789")[3]
680 for timeline
in self.
timelines.get_all():
682 t_width = ctx.text_extents(timeline.name)[2]
683 left_width =
max(left_width, t_width)
684 for rang
in timeline.get_ranges():
685 t_width = ctx.text_extents(rang.name)[2]
686 right_width =
max(right_width, t_width)
688 for events_int
in timeline.get_events_int():
689 t_width = ctx.text_extents(events_int.name)[2]
690 right_width =
max(right_width, t_width)
692 for events_str
in timeline.get_events_str():
693 t_width = ctx.text_extents(events_str.name)[2]
694 right_width =
max(right_width, t_width)
697 left_height = left_n_lines * max_text_height + (left_n_lines - 1) * self.
padding 698 right_n_lines = range_n + eventint_n + eventstr_n
699 right_height = (right_n_lines - 1) * self.
padding + right_n_lines * max_text_height
700 right_data_height = (eventint_n + eventstr_n) * (max_text_height + 5) + range_n * 10
701 right_data_height += (right_n_lines - 1) * self.
padding 703 height =
max(left_height, right_height)
704 height =
max(height, right_data_height)
713 @param self this object 722 ctx.rel_line_to(width, height)
724 ctx.set_operator(cairo.OPERATOR_SOURCE)
725 ctx.set_line_width(1.0)
726 ctx.set_source_rgb(0, 0, 0)
730 @param self this object 740 ctx.rectangle(x, y - self.
padding / 2,
742 ctx.set_source_rgb(0.9, 0.9, 0.9)
744 last_x_drawn = int(x)
745 (lo, hi) = events.get_events_bounds(self.
start, self.
end)
746 for event
in events.events[lo:hi]:
747 real_x = int(x + (event.at - self.
start) * width / (self.
end - self.
start))
748 if real_x > last_x_drawn + 2:
749 ctx.rectangle(real_x, y, 1, 1)
750 ctx.set_source_rgb(1, 0, 0)
753 ctx.set_source_rgb(0, 0, 0)
754 ctx.show_text(str(event.value))
755 last_x_drawn = real_x
759 @param self this object 769 ctx.rectangle(x, y - self.
padding / 2,
771 ctx.set_source_rgb(0.9, 0.9, 0.9)
773 last_x_drawn = int(x - 1)
774 (lo, hi) = ranges.get_ranges_bounds(self.
start, self.
end)
775 for data_range
in ranges.ranges[lo:hi]:
776 s =
max(data_range.start, self.
start)
777 e =
min(data_range.end, self.
end)
778 x_start = int(x + (s - self.
start) * width / (self.
end - self.
start))
779 x_end = int(x + (e - self.
start) * width / (self.
end - self.
start))
780 if x_end > last_x_drawn:
781 ctx.rectangle(x_start, y, x_end - x_start, 10)
782 ctx.set_source_rgb(0, 0, 0)
783 ctx.stroke_preserve()
784 color = self.
colors.lookup(data_range.value)
785 ctx.set_source_rgb(color.r, color.g, color.b)
793 @param self this object 799 left_x_start = self.
padding / 2
801 right_x_start = left_x_end + self.
padding 803 data_x_start = right_x_end + self.
padding / 2
804 data_x_end = self.
width 805 data_width = data_x_end - data_x_start
809 for timeline
in self.
timelines.get_all():
810 (y_bearing, t_width, t_height) = ctx.text_extents(timeline.name)[1:4]
811 ctx.move_to(left_x_start, cur_y + self.
max_text_height - (t_height + y_bearing))
812 ctx.show_text(timeline.name);
813 for events_int
in timeline.get_events_int():
814 (y_bearing, t_width, t_height) = ctx.text_extents(events_int.name)[1:4]
815 ctx.move_to(right_x_start, cur_y + self.
max_text_height - (t_height + y_bearing))
816 ctx.show_text(events_int.name)
822 for events_str
in timeline.get_events_str():
823 (y_bearing, t_width, t_height) = ctx.text_extents(events_str.name)[1:4]
824 ctx.move_to(right_x_start, cur_y + self.
max_text_height - (t_height + y_bearing))
825 ctx.show_text(events_str.name)
830 for ranges
in timeline.get_ranges():
831 (y_bearing, t_width, t_height) = ctx.text_extents(ranges.name)[1:4]
832 ctx.move_to(right_x_start, cur_y + self.
max_text_height - (t_height + y_bearing))
833 ctx.show_text(ranges.name)
834 self.
draw_ranges(ctx, ranges, data_x_start, cur_y, data_width, 10)
840 bot_y = cur_y - self.
padding / 2
865 @param self this object 872 @param self this object 881 @param self this object 889 @param self this object 895 @param self this object 901 @param self this object 905 surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 1, 1)
906 ctx = cairo.Context(surface)
911 while (closest*10) < data_delta:
913 if (data_delta / closest) == 0:
915 elif(data_delta / closest) == 1:
919 start = self.
__lo - (self.
__lo % delta) + delta
920 end = self.
__hi - (self.
__hi % delta)
926 max_text_height = ctx.text_extents(
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcedefghijklmnopqrstuvwxyz0123456789")[3]
928 height = max_text_height + 10
933 @param self: this object 939 @param self this object 944 start = self.
__lo - (self.
__lo % delta) + delta
945 end = self.
__hi - (self.
__hi % delta)
952 ctx.set_source_rgb(0, 0, 0)
953 ctx.set_line_width(1.0)
954 ticks = range(int(start), int(end + delta), int(delta))
957 ctx.move_to(real_x, 0)
958 ctx.line_to(real_x, 5*s)
961 (t_y_bearing, t_width, t_height) = ctx.text_extents(str(x))[1:4]
963 text_delta = t_height + t_y_bearing
965 text_delta = -t_y_bearing
966 ctx.move_to(real_x - t_width / 2, (5 + 5 + text_delta)*s)
967 ctx.show_text(str(x))
971 start = self.
__lo - (self.
__lo % delta) + delta
972 end = self.
__hi - (self.
__hi % delta)
973 for x
in range(int(start), int(end + delta), int(delta)):
975 ctx.move_to(real_x, 0)
976 ctx.line_to(real_x, 3*s)
1007 @param self this object 1023 @param self: this object 1029 @param self this object 1035 """! Get Data Rectangle 1036 @param self this object 1040 x_start = self.
__data.get_data_x_start()
1043 """! Get Data Rectangle 1044 @param self this object 1048 x_start = self.
__data.get_data_x_start()
1053 """! Get Selection Rectangle 1054 @param self this object 1061 return(x_start, y_start, x_end - x_start, y_height)
1063 """! Scale Selection 1064 @param self this object 1072 @param self this object 1083 self.
__data.set_render_range(start, end)
1088 @param self this object 1094 @param self this object 1101 @param self this object 1102 @param top_legend The legend 1108 @param self this object 1110 @param height height 1123 @param self this object 1133 @param self this object 1139 ctx.set_source_rgb(1, 1, 1)
1140 ctx.set_operator(cairo.OPERATOR_SOURCE)
1151 ctx.move_to(0, top_legend_height)
1152 ctx.line_to(self.
__width, top_legend_height)
1154 ctx.set_line_width(2)
1155 ctx.set_source_rgb(0, 0, 0)
1167 ctx.translate(self.
__data.get_data_x_start(),
1175 ctx.move_to(self.
__data.get_data_x_start(), height_used)
1178 ctx.set_source_rgb(0, 0, 0)
1179 ctx.set_line_width(2)
1183 ctx.move_to(0, height_used)
1184 ctx.line_to(self.
__width, height_used)
1186 ctx.set_line_width(2)
1187 ctx.set_source_rgb(0, 0, 0)
1194 ctx.move_to(0, height_used);
1195 ctx.line_to(self.
__data.get_data_x_start(), height_used)
1196 ctx.line_to(select_start, height_used + 20)
1197 ctx.line_to(0, height_used + 20)
1198 ctx.line_to(0, height_used)
1199 ctx.set_source_rgb(0, 0, 0)
1200 ctx.set_line_width(1)
1201 ctx.stroke_preserve()
1202 ctx.set_source_rgb(0.9, 0.9, 0.9)
1206 ctx.move_to(self.
__width, height_used)
1207 ctx.line_to(self.
__width, height_used + 20)
1208 ctx.line_to(select_end, height_used + 20)
1209 ctx.line_to(self.
__width, height_used)
1210 ctx.set_source_rgb(0, 0, 0)
1211 ctx.set_line_width(1)
1212 ctx.stroke_preserve()
1213 ctx.set_source_rgb(0.9, 0.9, 0.9)
1222 ctx.rectangle(0, height_used,
1225 ctx.rectangle(unused_end,
1229 ctx.set_source_rgb(0.9, 0.9, 0.9)
1233 ctx.move_to(unused_end, height_used)
1234 ctx.line_to(self.
__width, height_used)
1235 ctx.line_to(self.
__width, height_used + unused_height)
1236 ctx.line_to(0, height_used + unused_height)
1237 ctx.line_to(0, height_used)
1238 ctx.line_to(unused_start, height_used)
1240 ctx.set_line_width(2)
1241 ctx.set_source_rgb(0, 0, 0)
1243 ctx.move_to(unused_start, height_used)
1244 ctx.line_to(unused_end, height_used)
1246 ctx.set_line_width(1)
1247 ctx.set_source_rgb(0.9, 0.9, 0.9)
1252 ctx.move_to(
max(unused_start, 2), height_used)
1253 ctx.rel_line_to(0, unused_height)
1254 ctx.move_to(
min(unused_end, self.
__width - 2), height_used)
1255 ctx.rel_line_to(0, unused_height)
1256 ctx.set_dash([5], 0)
1257 ctx.set_source_rgb(0, 0, 0)
1258 ctx.set_line_width(1)
1264 ctx.translate(0, height_used)
1302 @param self this object 1306 super(GtkGraphicRenderer, self).
__init__()
1313 self.add_events(gtk.gdk.POINTER_MOTION_MASK)
1314 self.add_events(gtk.gdk.BUTTON_PRESS_MASK)
1315 self.add_events(gtk.gdk.BUTTON_RELEASE_MASK)
1316 self.connect(
"expose_event", self.
expose)
1322 """! Set Smaller Zoom 1323 @param self this object 1326 (start, end) = self.
__data.get_range()
1327 self.
__data.set_range(start, start + (end - start)*2)
1331 """! Set Bigger Zoom 1332 @param self this object 1335 (start, end) = self.
__data.get_range()
1336 self.
__data.set_range(start, start + (end - start) / 2)
1341 @param self this object 1342 @param filename file name 1345 surface = cairo.ImageSurface(cairo.FORMAT_ARGB32,
1347 self.
__data.get_height())
1350 surface.write_to_png(filename)
1353 @param self this object 1354 @param widget widget 1356 @return true if button has been pressed otherwise false 1358 (x, y, width, height) = self.
__data.get_selection_rectangle()
1359 (d_x, d_y, d_width, d_height) = self.
__data.get_data_rectangle()
1360 if event.y > y
and event.y < y + height:
1361 if abs(event.x - x) < 5:
1364 if abs(event.x - (x + width)) < 5:
1367 if event.x > x
and event.x < x + width:
1372 if event.y > d_y
and event.y < (d_y + d_height):
1373 if event.x > d_x
and event.x < (d_x + d_width):
1381 @param self this object 1382 @param widget widget 1384 @return true if button was released otherwise false 1389 right = self.
__data.get_range()[1]
1390 self.
__data.set_range(left, right)
1397 left = self.
__data.get_range()[0]
1398 self.
__data.set_range(left, right)
1405 (left, right) = self.
__data.get_range()
1406 self.
__data.set_range(left + delta, right + delta)
1415 @param self this object 1416 @param widget widget 1418 @return true if moving otherwise false 1420 (x, y, width, height) = self.
__data.get_selection_rectangle()
1424 elif event.x >= x + width:
1428 self.queue_draw_area(0, int(y), int(self.
__width), int(height))
1437 self.queue_draw_area(0, int(y), int(self.
__width), int(height))
1444 elif event.x > cur_e:
1448 self.queue_draw_area(0, int(y), int(self.
__width), int(height))
1453 (left, right) = self.
__data.get_range()
1454 self.
__data.set_range(left + delta, right + delta)
1459 (d_x, d_y, d_width, d_height) = self.
__data.get_data_rectangle()
1460 if event.y > y
and event.y < y + height:
1461 if abs(event.x - x) < 5
or abs(event.x - (x + width)) < 5:
1462 widget.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.SB_H_DOUBLE_ARROW))
1464 if event.x > x
and event.x < x + width:
1465 widget.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.FLEUR))
1467 if event.y > d_y
and event.y < (d_y + d_height):
1468 if event.x > d_x
and event.x < (d_x + d_width):
1469 widget.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.FLEUR))
1471 widget.window.set_cursor(
None)
1475 @param self this object 1476 @param widget widget 1477 @param allocation allocation 1482 self.
__data.layout(allocation.width, allocation.height)
1487 @param self this object 1488 @param widget widget 1495 self.
__data.get_height())
1499 ctx = widget.window.cairo_create()
1500 ctx.rectangle(event.area.x, event.area.y,
1501 event.area.width, event.area.height)
1505 (x, y, width, height) = self.
__data.get_selection_rectangle()
1508 ctx.rel_line_to(0, height)
1510 ctx.set_line_width(1)
1511 ctx.set_source_rgb(0, 0, 0)
1515 ctx.rel_line_to(0, height)
1517 ctx.set_line_width(1)
1518 ctx.set_source_rgb(0, 0, 0)
1522 left_x = x + delta_x
1523 ctx.move_to(x + delta_x, y)
1524 ctx.rel_line_to(0, height)
1526 ctx.move_to(x + width + delta_x, y)
1527 ctx.rel_line_to(0, height)
1529 ctx.set_source_rgb(0, 0, 0)
1530 ctx.set_line_width(1)
1544 @param self this object 1550 @param self this object 1551 @param graphic graphic 1554 window = gtk.Window()
1556 window.set_default_size(200, 200)
1561 vbox.pack_end(render,
True,
True, 0)
1563 vbox.pack_start(hbox,
False,
False, 0)
1564 smaller_zoom = gtk.Button(
"Zoom Out")
1566 hbox.pack_start(smaller_zoom)
1567 bigger_zoom = gtk.Button(
"Zoom In")
1569 hbox.pack_start(bigger_zoom)
1570 output_png = gtk.Button(
"Output Png")
1572 hbox.pack_start(output_png)
1573 window.connect(
'destroy', gtk.main_quit)
1578 """! Set Smaller Callback 1579 @param self this object 1580 @param widget widget 1585 """! Set Bigger Callback 1586 @param self this object 1587 @param widget widget 1592 """! Output PNG Callback 1593 @param self this object 1594 @param widget widget 1597 dialog = gtk.FileChooserDialog(
"Output Png", self.
__window,
1598 gtk.FILE_CHOOSER_ACTION_SAVE, (
"Save", 1))
1600 dialog.set_default_response(1)
1605 """! Dialog Response Callback 1606 @param self this object 1607 @param widget widget 1608 @param response response 1612 filename = self.
__dialog.get_filename()
1623 m1 = re.compile(
'range ([^ ]+) ([^ ]+) ([^ ]+) ([0-9]+) ([0-9]+)')
1624 m2 = re.compile(
'event-str ([^ ]+) ([^ ]+) ([^ ]+) ([0-9]+)')
1625 m3 = re.compile(
'event-int ([^ ]+) ([^ ]+) ([0-9]+) ([0-9]+)')
1626 m4 = re.compile(
'color ([^ ]+) #([a-fA-F0-9]{2,2})([a-fA-F0-9]{2,2})([a-fA-F0-9]{2,2})')
1627 for line
in fh.readlines():
1630 line_name = m.group(1)
1631 timeline = timelines.get(m.group(1))
1632 rang = timeline.get_range(m.group(2))
1634 data_range.value = m.group(3)
1635 data_range.start = int(m.group(4))
1636 data_range.end = int(m.group(5))
1637 rang.add_range(data_range)
1641 line_name = m.group(1)
1642 timeline = timelines.get(m.group(1))
1643 ev = timeline.get_event_str(m.group(2))
1645 event.value = m.group(3)
1646 event.at = int(m.group(4))
1651 line_name = m.group(1)
1652 timeline = timelines.get(m.group(1))
1653 ev = timeline.get_event_int(m.group(2))
1655 event.value = int(m.group(3))
1656 event.at = int(m.group(4))
1662 r = int(m.group(2), 16)
1663 g = int(m.group(3), 16)
1664 b = int(m.group(4), 16)
1665 color =
Color(r / 255, g / 255, b / 255)
1666 colors.add(m.group(1), color)
1669 return (colors, timelines)
1674 (colors, timelines) =
read_data(sys.argv[1])
1675 (lower_bound, upper_bound) = timelines.get_bounds()
1678 range_values = timelines.get_all_range_values()
1680 for range_value
in range_values:
1681 range_colors.append(colors.lookup(range_value))
1682 top_legend.set_legends(range_values,
1684 graphic.set_top_legend(top_legend)
1686 data.set_timelines(timelines, colors)
1687 graphic.set_data(data)
1690 range_mid = (upper_bound - lower_bound) / 2
1691 range_width = (upper_bound - lower_bound) / 10
1692 range_lo = range_mid - range_width / 2
1693 range_hi = range_mid + range_width / 2
1694 graphic.set_range(range_lo, range_hi)
1697 main_window.run(graphic)
def __init__(self, at=0, value=0.0)
Initializer.
def __init__(self)
Initializer.
def sort(self)
Sort ranges.
def __init__(self)
Initializer.
def get_ranges(self, start, end)
Get selected ranges.
max_text_height
maximum text height
def expose(self, widget, event)
Expose.
def lookup(self, name)
Lookup name.
def set_bounds(self, lo, hi)
Set Bounds.
def get_bounds(self)
Get bounds.
def scale_data(self, x)
Get Data Rectangle.
def __init__(self, at=0, value='')
Initializer.
def draw_events(self, ctx, events, x, y, width, height)
Draw Event.
def get_all(self)
Get All Timeline.
def layout(self, width)
Layout.
def set_range(self, start, end)
Set Range.
def get_width(self)
Get Width.
def layout(self, width)
Get Data X Start.
def layout(self, width)
Set padding.
def get_height(self)
Set padding.
def __init__(self, at=0, value=0.0)
Initializer.
__moving_right_cur
moving right cur
__moving_top_start
moving top start
def get_data_x_start(self)
Get Data X Start.
def set_top_legend(self, top_legend)
Set Top Legend.
def get_height(self)
Get Height.
def set_render_range(self, start, end)
Set Render Range.
def get_all(self)
Get all ranges.
list default_colors
default colors XXX add more
def get_ranges_bounds(self, start, end)
Get ranges bounds.
def __x_pixel(self, x, width)
X Pixel.
def __init__(self, start=0, end=0, value='')
Initializer.
def add_range(self, range)
Add range.
def get_ranges(self)
Get Ranges.
def get(self, name)
Get Timeline.
def __init__(self, data)
Initializer.
def get_events_str(self)
Get Events string.
def set_legends(self, legends, colors)
Set padding.
def scale_selection(self, x)
Scale Selection.
def __search(self, key)
Search.
def get_range(self)
Get Range.
__moving_both_cur
moving both cur
def set_smaller_zoom(self)
Set Smaller Zoom.
__moving_top_cur
moving top cur
def get_events_int(self)
Get Events int.
def get_data_rectangle(self)
Get Data Rectangle.
def set_bounds(x1, y1, x2, y2)
def __init__(self, name='')
Initializer.
def get_bounds(self)
Get Bounds.
def __dialog_response_cb(self, widget, response)
Dialog Response Callback.
def __init__(self)
Initializer.
__moving_right
moving right
def set(self, r, g, b)
Set color.
def get_all_range_values(self)
Get All Ranges.
def set_top(self)
Set Top.
def draw_ranges(self, ctx, ranges, x, y, width, height)
Draw Ranges.
def get_event_int(self, name)
Get Event Int.
def add(self, name, color)
Add.
def draw(self, ctx)
Set padding.
def sort(self)
Sort the ranges and events.
def __init__(self, start, end)
Initializer.
__moving_left_cur
moving left cur
grey_background
grey background
def __output_png_cb(self, widget)
Output PNG Callback.
def sort(self)
Sort function.
def get_events(self, start, end)
Get Events.
def button_press(self, widget, event)
Button Press.
def set_timelines(self, timelines, colors)
Set Timelines.
def get_events_bounds(self, start, end)
Get Events Bounds.
def __init__(self)
Initializer.
def motion_notify(self, widget, event)
Motion Notify.
def sort(self)
Sort the timelines.
def __init__(self, r=0.0, g=0.0, b=0.0)
Initializer.
def __set_smaller_cb(self, widget)
Set Smaller Callback.
def set_padding(self, padding)
Set padding.
__force_full_redraw
full redraw
def output_png(self, filename)
Output PNG.
def button_release(self, widget, event)
Button Release.
GtkGraphicRenderer class.
def set_bigger_zoom(self)
Set Bigger Zoom.
__buffer_surface
buffer surface
def __search(self, key)
Search function.
def add_event(self, event)
Add Event.
def __init__(self)
Initializer.
def get_event_str(self, name)
Get Event String.
def __init__(self, name='')
Get ranges bounds.
def layout(self, width, height)
Set Layout.
def run(self, graphic)
Run function.
def __init__(self, name='')
Initializer.
def set_data(self, data)
Set Date.
def draw_line(self, ctx, x, y, width, height)
Draw Line.
def get_selection_rectangle(self)
Get Selection Rectangle.
def size_allocate(self, widget, allocation)
Size Allocate.
def set_bot(self)
Set Bottom.
def get_height(self)
Get Height.
def get_bounds(self)
Get Bounds.
def get_height(self)
Get Height.
def get_bounds(self)
Get Bounds.
max_text_height
maximum text height
def get_range(self, name)
Get range.
def read_data(filename)
read_data function
def get_position(self, x)
Get Position.
__moving_both_start
moving both start
def __set_bigger_cb(self, widget)
Set Bigger Callback.