Class: Roby::Log::ChronicleDisplay::Line

Inherits:
Struct
  • Object
show all
Defined in:
lib/roby/log/chronicle.rb,
lib/roby/log/chronicle.rb

Overview

y

the Y of this line in the graphics scene

item

the main item, either a free event or a task

graphic_items

the array of graphic items

graphics_group

a Qt::GraphicsGroup object holding all graphic objects for this line

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#graphic_groupObject

Returns the value of attribute graphic_group

Returns:

  • (Object)

    the current value of graphic_group



13
14
15
# File 'lib/roby/log/chronicle.rb', line 13

def graphic_group
  @graphic_group
end

#graphic_itemsObject

Returns the value of attribute graphic_items

Returns:

  • (Object)

    the current value of graphic_items



13
14
15
# File 'lib/roby/log/chronicle.rb', line 13

def graphic_items
  @graphic_items
end

#itemObject

Returns the value of attribute item

Returns:

  • (Object)

    the current value of item



13
14
15
# File 'lib/roby/log/chronicle.rb', line 13

def item
  @item
end

#start_timeObject

Returns the value of attribute start_time

Returns:

  • (Object)

    the current value of start_time



13
14
15
# File 'lib/roby/log/chronicle.rb', line 13

def start_time
  @start_time
end

#yObject

Returns the value of attribute y

Returns:

  • (Object)

    the current value of y



13
14
15
# File 'lib/roby/log/chronicle.rb', line 13

def y
  @y
end

Instance Method Details

#add(graphic_item, time) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/roby/log/chronicle.rb', line 15

def add(graphic_item, time)
    class << graphic_item; attr_accessor :time end
    graphic_item.time = time
    graphic_group.add_to_group graphic_item

    if graphic_items.empty?
  self.start_time = time
    end
    graphic_items << graphic_item
end