Class: Object

Inherits:
BasicObject
Defined in:
lib/Qt/qtruby4.rb,
ext/ruby/qtruby/src/lib/Qt/qtruby4.rb

Overview

Qt

Instance Method Summary collapse

Instance Method Details

#emit(signal) ⇒ Object



3091
3092
3093
# File 'lib/Qt/qtruby4.rb', line 3091

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.



3102
3103
3104
# File 'lib/Qt/qtruby4.rb', line 3102

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

#QT_TR_NOOP(x) ⇒ Object



3095
# File 'lib/Qt/qtruby4.rb', line 3095

def QT_TR_NOOP(x) x end

#QT_TRANSLATE_NOOP(scope, x) ⇒ Object



3096
# File 'lib/Qt/qtruby4.rb', line 3096

def QT_TRANSLATE_NOOP(scope, x) x end

#SIGNAL(signal) ⇒ Object



3075
3076
3077
3078
3079
3080
3081
# File 'lib/Qt/qtruby4.rb', line 3075

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

#SLOT(slot) ⇒ Object



3083
3084
3085
3086
3087
3088
3089
# File 'lib/Qt/qtruby4.rb', line 3083

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