Class: Object

Inherits:
BasicObject
Defined in:
lib/qt/qtruby4.rb

Overview

Qt

Instance Method Summary collapse

Instance Method Details

#emit(signal) ⇒ Object



2650
2651
2652
# File 'lib/qt/qtruby4.rb', line 2650

def emit(signal)
	return signal
end

#instance_exec(*arguments, &block) ⇒ Object

See the discussion here: eigenclass.org/hiki.rb?instance_exec about implementations of the ruby 1.9 method instance_exec(). This version is the one from Rails. It isn’t thread safe, but that doesn’t matter for the intended use in invoking blocks as Qt slots.



2661
2662
2663
# File 'lib/qt/qtruby4.rb', line 2661

def instance_exec(*arguments, &block)
	block.bind(self)[*arguments]
end

#QT_TR_NOOP(x) ⇒ Object



2654
# File 'lib/qt/qtruby4.rb', line 2654

def QT_TR_NOOP(x) x end

#QT_TRANSLATE_NOOP(scope, x) ⇒ Object



2655
# File 'lib/qt/qtruby4.rb', line 2655

def QT_TRANSLATE_NOOP(scope, x) x end

#SIGNAL(signal) ⇒ Object



2634
2635
2636
2637
2638
2639
2640
# File 'lib/qt/qtruby4.rb', line 2634

def SIGNAL(signal)
	if signal.kind_of? Symbol
		return "2" + signal.to_s + "()"
	else
		return "2" + signal
	end
end

#SLOT(slot) ⇒ Object



2642
2643
2644
2645
2646
2647
2648
# File 'lib/qt/qtruby4.rb', line 2642

def SLOT(slot)
	if slot.kind_of? Symbol
		return "1" + slot.to_s + "()"
	else
		return "1" + slot
	end
end