Class: Adjustor
- Defined in:
- ext/ruby/qtruby/examples/ruboids/ruboids/CameraDialog.rb
Instance Attribute Summary collapse
-
#num ⇒ Object
Returns the value of attribute num.
-
#origValue ⇒ Object
Returns the value of attribute origValue.
-
#slider ⇒ Object
Returns the value of attribute slider.
Instance Method Summary collapse
-
#initialize(slider, num, origValue = 0) ⇒ Adjustor
constructor
A new instance of Adjustor.
- #reset ⇒ Object
- #set(val) ⇒ Object
- #setNum(val) ⇒ Object
- #setSlider(val) ⇒ Object
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(, num, origValue = 0) @slider = @num = num @origValue = origValue end |
Instance Attribute Details
#num ⇒ Object
Returns the value of attribute num.
13 14 15 |
# File 'ext/ruby/qtruby/examples/ruboids/ruboids/CameraDialog.rb', line 13 def num @num end |
#origValue ⇒ Object
Returns the value of attribute origValue.
13 14 15 |
# File 'ext/ruby/qtruby/examples/ruboids/ruboids/CameraDialog.rb', line 13 def origValue @origValue end |
#slider ⇒ Object
Returns the value of attribute slider.
13 14 15 |
# File 'ext/ruby/qtruby/examples/ruboids/ruboids/CameraDialog.rb', line 13 def @slider end |
Instance Method Details
#reset ⇒ Object
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 |