Class: Cosmos::PacketLogFrameListWidget

Inherits:
Qt::ListWidget
  • Object
show all
Defined in:
lib/cosmos/gui/widgets/packet_log_frame.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#delete_callbackObject

Returns the value of attribute delete_callback.



18
19
20
# File 'lib/cosmos/gui/widgets/packet_log_frame.rb', line 18

def delete_callback
  @delete_callback
end

Instance Method Details

#keyPressEvent(event) ⇒ Object



20
21
22
23
24
25
26
# File 'lib/cosmos/gui/widgets/packet_log_frame.rb', line 20

def keyPressEvent(event)
  case event.key
  when Qt::Key_Delete, Qt::Key_Backspace
    @delete_callback.call if @delete_callback
  end
  super(event)
end