Class: Adjustor

Inherits:
Object show all
Defined in:
ext/ruby/qtruby/examples/ruboids/ruboids/CameraDialog.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(slider, num, origValue = 0) ⇒ Adjustor

Returns a new instance of Adjustor.



14
15
16
17
18
# File 'ext/ruby/qtruby/examples/ruboids/ruboids/CameraDialog.rb', line 14

def initialize(slider, num, origValue = 0)
    @slider = slider
    @num = num
    @origValue = origValue
end

Instance Attribute Details

#numObject

Returns the value of attribute num.



13
14
15
# File 'ext/ruby/qtruby/examples/ruboids/ruboids/CameraDialog.rb', line 13

def num
  @num
end

#origValueObject

Returns the value of attribute origValue.



13
14
15
# File 'ext/ruby/qtruby/examples/ruboids/ruboids/CameraDialog.rb', line 13

def origValue
  @origValue
end

#sliderObject

Returns the value of attribute slider.



13
14
15
# File 'ext/ruby/qtruby/examples/ruboids/ruboids/CameraDialog.rb', line 13

def slider
  @slider
end

Instance Method Details

#resetObject



25
26
27
28
# File 'ext/ruby/qtruby/examples/ruboids/ruboids/CameraDialog.rb', line 25

def reset
    set(@origValue)
    return @origValue
end

#set(val) ⇒ Object



21
22
23
24
# File 'ext/ruby/qtruby/examples/ruboids/ruboids/CameraDialog.rb', line 21

def set(val)
    setSlider(val)
    setNum(val)
end

#setNum(val) ⇒ Object



20
# File 'ext/ruby/qtruby/examples/ruboids/ruboids/CameraDialog.rb', line 20

def setNum(val); @num.setNum(val); end

#setSlider(val) ⇒ Object



19
# File 'ext/ruby/qtruby/examples/ruboids/ruboids/CameraDialog.rb', line 19

def setSlider(val); @slider.setValue(val); end