class RobotTorso
Public Class Methods
new(parent)
click to toggle source
Calls superclass method
RobotPart.new
# File examples/graphicsview/dragdroprobot/robot.rb, line 100 def initialize(parent) super(parent) end
Public Instance Methods
boundingRect()
click to toggle source
# File examples/graphicsview/dragdroprobot/robot.rb, line 104 def boundingRect return Qt::RectF.new(-30, -20, 60, 60) end
paint(painter, option, widget)
click to toggle source
# File examples/graphicsview/dragdroprobot/robot.rb, line 108 def paint(painter, option, widget) painter.brush = Qt::Brush.new(@dragOver ? @color.light(130) : @color) painter.drawRoundRect(-20, -20, 40, 60) painter.drawEllipse(-25, -20, 20, 20) painter.drawEllipse(5, -20, 20, 20) painter.drawEllipse(-20, 22, 20, 20) painter.drawEllipse(0, 22, 20, 20) end