Class: QML::ListModelAccess Private
- Inherits:
-
Object
- Object
- QML::ListModelAccess
- Includes:
- Access
- Defined in:
- lib/qml/data/list_model_access.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary
Constants included from Access
Instance Attribute Summary collapse
- #model ⇒ Object private
Class Method Summary collapse
- .create(model) ⇒ QML::JSWrapper private
Instance Method Summary collapse
- #columns ⇒ Object private
- #count ⇒ Object private
- #data(index, column) ⇒ Object private
Methods included from Access
Methods included from Access::ClassMethods
#meta_object, #register_to_qml, #register_to_qml_impl
Methods included from Reactive
Methods included from Reactive::ClassMethods
#properties, #property_infos, #signal_infos, #signals
Instance Attribute Details
#model ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/qml/data/list_model_access.rb', line 16 def model @model end |
Class Method Details
.create(model) ⇒ QML::JSWrapper
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
33 34 35 36 37 38 39 40 41 42 |
# File 'lib/qml/data/list_model_access.rb', line 33 def self.create(model) @component ||= QML::Component.new(data: <<-QML) import RubyQml 1.0 ListModelAccess {} QML @component.create.tap do |access| access.unwrap.model = model end end |
Instance Method Details
#columns ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
18 19 20 |
# File 'lib/qml/data/list_model_access.rb', line 18 def columns @model.columns.to_qml end |
#count ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
26 27 28 |
# File 'lib/qml/data/list_model_access.rb', line 26 def count @model.count end |
#data(index, column) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 |
# File 'lib/qml/data/list_model_access.rb', line 22 def data(index, column) @model[index.to_i][column.to_sym].to_qml end |