Class: MetaBuilder::Qt4MB::IntegerInputWidget
- Inherits:
-
Qt::SpinBox
- Object
- Qt::SpinBox
- MetaBuilder::Qt4MB::IntegerInputWidget
- Defined in:
- lib/MetaBuilder/Qt4/Parameters/numbers.rb
Overview
A spinbox to choose Integers.
Instance Method Summary collapse
-
#initialize(parent, type) ⇒ IntegerInputWidget
constructor
Creates a Generic widget.
- #text ⇒ Object
- #text=(t) ⇒ Object
Constructor Details
#initialize(parent, type) ⇒ IntegerInputWidget
Creates a Generic widget. type
is the ParameterType child instance for whom we should do conversion.
46 47 48 49 50 51 52 |
# File 'lib/MetaBuilder/Qt4/Parameters/numbers.rb', line 46 def initialize(parent, type) super(parent) @type = type connect(self, SIGNAL('valueChanged(int)'), SIGNAL('value_changed()')) set_range(-(2**30), 2**30) end |
Instance Method Details
#text ⇒ Object
54 55 56 |
# File 'lib/MetaBuilder/Qt4/Parameters/numbers.rb', line 54 def text return @type.type_to_string(value) end |
#text=(t) ⇒ Object
58 59 60 |
# File 'lib/MetaBuilder/Qt4/Parameters/numbers.rb', line 58 def text=(t) self.value=(@type.string_to_type(t)) end |