Class: Qt::MethodInvocation

Inherits:
Object show all
Defined in:
lib/Qt/qtruby4.rb

Instance Method Summary collapse

Methods inherited from Base

#%, #&, #*, #**, #+, #-, #-@, #/, #<, #<<, #<=, #==, #>, #>=, #>>, #QCOMPARE, #QEXPECT_FAIL, #QFAIL, #QSKIP, #QTEST, #QVERIFY, #QVERIFY2, #QWARN, #^, ancestors, #is_a?, #methods, private_slots, #protected_methods, #public_methods, q_classinfo, q_signal, q_slot, signals, #singleton_methods, slots, #|, #~

Constructor Details

#initialize(target, method, signature) ⇒ MethodInvocation

Returns a new instance of MethodInvocation.



2446
2447
2448
2449
2450
2451
2452
2453
2454
# File 'lib/Qt/qtruby4.rb', line 2446

def initialize(target, method, signature)
  super(target)
  if metaObject.indexOfSlot(signature) == -1
    self.class.slots signature
  end
  @target = target
  method = method.intern unless method.is_a?Symbol
  @method = method
end

Instance Method Details

#invoke(*args) ⇒ Object



2456
2457
2458
# File 'lib/Qt/qtruby4.rb', line 2456

def invoke(*args)
  @target.send @method, *args
end