Class: Qt::Application
Instance Attribute Summary collapse
-
#thread_fix ⇒ Object
readonly
Returns the value of attribute thread_fix.
Class Method Summary collapse
Instance Method Summary collapse
- #disable_threading ⇒ Object
-
#exec ⇒ Object
Delete the underlying C++ instance after exec returns Otherwise, rb_gc_call_finalizer_at_exit() can delete stuff that Qt::Application still needs for its cleanup.
-
#initialize(*args) ⇒ Application
constructor
A new instance of Application.
- #type(*args) ⇒ Object
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(*args) ⇒ Application
Returns a new instance of Application.
460 461 462 463 464 465 466 467 468 |
# File 'lib/Qt/qtruby4.rb', line 460 def initialize(*args) if args.length == 1 && args[0].kind_of?(Array) super(args.length + 1, [$0] + args[0]) else super(*args) end $qApp = self @thread_fix = RubyThreadFix.new end |
Instance Attribute Details
#thread_fix ⇒ Object (readonly)
Returns the value of attribute thread_fix.
458 459 460 |
# File 'lib/Qt/qtruby4.rb', line 458 def thread_fix @thread_fix end |
Class Method Details
.translate(*args) ⇒ Object
490 491 492 493 494 495 496 |
# File 'lib/Qt/qtruby4.rb', line 490 def self.translate(*args) if args[3] and args[3].value == Qt::Application::UnicodeUTF8.value return method_missing(:translate,*args).force_encoding('utf-8') else return method_missing(:translate,*args) end end |
Instance Method Details
#disable_threading ⇒ Object
470 471 472 473 |
# File 'lib/Qt/qtruby4.rb', line 470 def disable_threading @thread_fix.stop if @thread_fix @thread_fix = nil end |
#exec ⇒ Object
Delete the underlying C++ instance after exec returns Otherwise, rb_gc_call_finalizer_at_exit() can delete stuff that Qt::Application still needs for its cleanup.
478 479 480 481 482 483 484 |
# File 'lib/Qt/qtruby4.rb', line 478 def exec result = method_missing(:exec) disable_threading() self.dispose Qt::Internal.application_terminated = true result end |
#type(*args) ⇒ Object
486 487 488 |
# File 'lib/Qt/qtruby4.rb', line 486 def type(*args) method_missing(:type, *args) end |