Module: Roby::GUI::RelationsCanvasPlan

Included in:
Plan
Defined in:
lib/roby/gui/relations_view/relations_canvas.rb

Constant Summary collapse

PLAN_STROKE_WIDTH =
5

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#depthObject (readonly)

The plan depth, i.e. its distance from the root plan



290
291
292
# File 'lib/roby/gui/relations_view/relations_canvas.rb', line 290

def depth
  @depth
end

#max_depthObject (readonly)

The max depth of the plan tree in this branch



292
293
294
# File 'lib/roby/gui/relations_view/relations_canvas.rb', line 292

def max_depth
  @max_depth
end

Instance Method Details

#display(display, item) ⇒ Object



307
308
# File 'lib/roby/gui/relations_view/relations_canvas.rb', line 307

def display(display, item)
end

#display_create(display) ⇒ Object



294
295
296
297
298
299
300
301
302
# File 'lib/roby/gui/relations_view/relations_canvas.rb', line 294

def display_create(display)
    scene = display.scene
    pen            = Qt::Pen.new
    pen.width      = PLAN_STROKE_WIDTH
    pen.style      = Qt::SolidLine
    pen.cap_style  = Qt::SquareCap
    pen.join_style = Qt::RoundJoin
    scene.add_rect Qt::RectF.new(0, 0, 0, 0), pen
end

#display_name(display) ⇒ Object



309
310
311
# File 'lib/roby/gui/relations_view/relations_canvas.rb', line 309

def display_name(display)
    ""
end

#display_parentObject



303
304
305
306
# File 'lib/roby/gui/relations_view/relations_canvas.rb', line 303

def display_parent
    if respond_to?(:plan) then plan
    end
end