Class: OutputItemController

Inherits:
Shirka::Qt::TreeItemController show all
Defined in:
lib/troshka/output_item/controller.rb

Instance Attribute Summary

Attributes inherited from Shirka::Controller

#app, #components, #data, #parent

Instance Method Summary collapse

Methods inherited from Shirka::Qt::TreeItemController

#add_item, #id, #initialize, #item_controller_class, #on_component_adding, #on_double_clicked, #view_class

Methods inherited from Shirka::Controller

#add_component, #add_item, #initialize, #item_controller_class, #on_component_added, #on_component_adding, #view_class

Methods included from Shirka::Eventalk

#add_watcher, #fire, #forward, #watch, #watchers

Constructor Details

This class inherits a constructor from Shirka::Qt::TreeItemController

Instance Method Details

#init(data) ⇒ Object



2
3
4
5
6
7
8
9
10
# File 'lib/troshka/output_item/controller.rb', line 2

def init(data)
  add_item data[:code], OutputItemCodeController
  if data[:exception].nil?
    add_item data[:obj].inspect, OutputItemObjController
    add_item data[:output], OutputItemOutputController unless data[:output].to_s.empty?
  else
    add_item data[:exception], OutputItemExceptionController        
  end
end

#viewObject



12
13
14
# File 'lib/troshka/output_item/controller.rb', line 12

def view
  @view ||= view_class.new self, data[:time]
end