Class: QML::QtPropertyBase
- Inherits:
-
Object
- Object
- QML::QtPropertyBase
- Defined in:
- lib/qml/class_builder.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#changed ⇒ Object
readonly
Returns the value of attribute changed.
Instance Method Summary collapse
-
#initialize(metaobj, objptr, name) ⇒ QtPropertyBase
constructor
A new instance of QtPropertyBase.
- #value ⇒ Object
- #value=(newval) ⇒ Object
Constructor Details
#initialize(metaobj, objptr, name) ⇒ QtPropertyBase
Returns a new instance of QtPropertyBase.
11 12 13 14 15 16 17 |
# File 'lib/qml/class_builder.rb', line 11 def initialize(, objptr, name) super() @metaobj = @objptr = objptr @name = name @changed = QtSignal.new(, objptr, @metaobj.notify_signal(@name)) end |
Instance Attribute Details
#changed ⇒ Object (readonly)
Returns the value of attribute changed.
9 10 11 |
# File 'lib/qml/class_builder.rb', line 9 def changed @changed end |
Instance Method Details
#value ⇒ Object
23 24 25 |
# File 'lib/qml/class_builder.rb', line 23 def value @metaobj.get_property(@objptr, @name) end |
#value=(newval) ⇒ Object
19 20 21 |
# File 'lib/qml/class_builder.rb', line 19 def value=(newval) @metaobj.set_property(@objptr, @name, newval) end |