Class: Object
- Inherits:
- BasicObject
- Defined in:
- lib/Qt/qtruby4.rb
Overview
Qt
Instance Method Summary collapse
- #emit(signal) ⇒ Object
-
#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().
- #QT_TR_NOOP(x) ⇒ Object
- #QT_TRANSLATE_NOOP(scope, x) ⇒ Object
- #SIGNAL(signal) ⇒ Object
- #SLOT(slot) ⇒ Object
Instance Method Details
#emit(signal) ⇒ Object
3128 3129 3130 |
# File 'lib/Qt/qtruby4.rb', line 3128 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.
3139 3140 3141 |
# File 'lib/Qt/qtruby4.rb', line 3139 def instance_exec(*arguments, &block) block.bind(self)[*arguments] end |
#QT_TR_NOOP(x) ⇒ Object
3132 |
# File 'lib/Qt/qtruby4.rb', line 3132 def QT_TR_NOOP(x) x end |
#QT_TRANSLATE_NOOP(scope, x) ⇒ Object
3133 |
# File 'lib/Qt/qtruby4.rb', line 3133 def QT_TRANSLATE_NOOP(scope, x) x end |
#SIGNAL(signal) ⇒ Object
3112 3113 3114 3115 3116 3117 3118 |
# File 'lib/Qt/qtruby4.rb', line 3112 def SIGNAL(signal) if signal.kind_of? Symbol return "2" + signal.to_s + "()" else return "2" + signal end end |
#SLOT(slot) ⇒ Object
3120 3121 3122 3123 3124 3125 3126 |
# File 'lib/Qt/qtruby4.rb', line 3120 def SLOT(slot) if slot.kind_of? Symbol return "1" + slot.to_s + "()" else return "1" + slot end end |