class RobotLimb
Public Class Methods
new(parent)
click to toggle source
Calls superclass method
RobotPart.new
# File examples/graphicsview/dragdroprobot/robot.rb, line 120 def initialize(parent) super(parent) end
Public Instance Methods
boundingRect()
click to toggle source
# File examples/graphicsview/dragdroprobot/robot.rb, line 124 def boundingRect return Qt::RectF.new(-5, -5, 40, 10) end
paint(painter, option, widget)
click to toggle source
# File examples/graphicsview/dragdroprobot/robot.rb, line 128 def paint(painter, option, widget) painter.brush = Qt::Brush.new(@dragOver ? @color.light(130) : @color) painter.drawRoundRect(boundingRect(), 50, 50) painter.drawEllipse(-5, -5, 10, 10) end