class LogControl::CloseAllFilter

Public Class Methods

new(obj) click to toggle source
Calls superclass method
# File lib/vizkit/widgets/log_control/log_control.rb, line 16
def initialize(obj)
    @obj = obj
    super
end

Public Instance Methods

eventFilter(obj,event) click to toggle source
# File lib/vizkit/widgets/log_control/log_control.rb, line 21
def eventFilter(obj,event)
  if event.is_a?(Qt::CloseEvent)
     # close all is not compatible with ubuntu 10.04
     # hole qt ruby will freeze
     # $qApp.closeAllWindows
     
     #workaround to stop a running rock-replay
     @obj.instance_variable_set(:@replay_on,false)
     @stop_all_timer = StopAllTimer.new
     $qApp.installEventFilter(@stop_all_timer)
     $qApp.quit
  end
  return false
end