Class: MetaBuilder::Qt4MB::GenericInputWidget
- Inherits:
-
Qt::LineEdit
- Object
- Qt::LineEdit
- MetaBuilder::Qt4MB::GenericInputWidget
- Defined in:
- lib/MetaBuilder/Qt4/parameter.rb
Overview
THIS MUST BE REWRITTEN TO COMPLY WITH THE NEW SPECS !!! A generic input for the types. Based on Qt::LineEdit.
Instance Method Summary collapse
-
#initialize(parent, type) ⇒ GenericInputWidget
constructor
Creates a Generic widget.
- #text=(t) ⇒ Object
-
#value ⇒ Object
Returns the value currently displayed.
-
#value=(val) ⇒ Object
Sets the display.
Constructor Details
#initialize(parent, type) ⇒ GenericInputWidget
Creates a Generic widget. type is the ParameterType child instance for whom we should do conversion.
100 101 102 103 104 105 |
# File 'lib/MetaBuilder/Qt4/parameter.rb', line 100 def initialize(parent, type) super(parent) @type = type connect(self, SIGNAL('editingFinished()'), SIGNAL('value_changed()')) end |
Instance Method Details
#text=(t) ⇒ Object
107 108 109 |
# File 'lib/MetaBuilder/Qt4/parameter.rb', line 107 def text=(t) setText(t) end |
#value ⇒ Object
Returns the value currently displayed
112 113 114 |
# File 'lib/MetaBuilder/Qt4/parameter.rb', line 112 def value return @type.string_to_type(text) end |
#value=(val) ⇒ Object
Sets the display.
117 118 119 |
# File 'lib/MetaBuilder/Qt4/parameter.rb', line 117 def value=(val) self.text = @type.type_to_string(val) end |