1 # Copyright (c) 2009 Paolo Capriotti <p.capriotti@gmail.com>
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2 of the License, or
6 # (at your option) any later version.
14 "#<#{self.class.name}:#{name}>"
21 def initialize(name, &blk)
34 def initialize(name, length, before, animation, after = nil, opts = { })
37 @animation = animation
42 @easing = opts[:easing]
44 @easing = Qt::EasingCurve.new(Qt::EasingCurve::Linear)
54 i = (t - @start).to_f / @length
55 i = @easing.valueForProgress(i)
69 def initialize(interval, timer_class = Qt::Timer)
71 @timer = timer_class.every(interval) {|t| tick(t) }
77 @actions.reject! do |action|