class Qt::Base
Public Class Methods
ancestors()
click to toggle source
Calls superclass method
# File lib/Qt/qtruby4.rb, line 184 def self.ancestors klass = self classid = nil loop do classid = Qt::Internal::find_pclassid(klass.name) break if classid.index klass = klass.superclass if klass.nil? return super end end klasses = super klasses.delete(Qt::Base) klasses.delete(self) ids = [] Qt::Internal::getAllParents(classid, ids) return [self] + ids.map {|id| Qt::Internal.find_class(Qt::Internal.classid2name(id))} + klasses end
private_slots(*slot_list)
click to toggle source
# File lib/Qt/qtruby4.rb, line 75 def self.private_slots(*slot_list) meta = Qt::Meta[self.name] || Qt::MetaInfo.new(self) meta.add_slots(slot_list, Internal::MethodSlot | Internal::AccessPrivate) meta.changed = true end
q_classinfo(key, value)
click to toggle source
# File lib/Qt/qtruby4.rb, line 93 def self.q_classinfo(key, value) meta = Qt::Meta[self.name] || Qt::MetaInfo.new(self) meta.add_classinfo(key, value) meta.changed = true end
q_signal(signal)
click to toggle source
# File lib/Qt/qtruby4.rb, line 81 def self.q_signal(signal) meta = Qt::Meta[self.name] || Qt::MetaInfo.new(self) meta.add_signals([signal], Internal::MethodSignal | Internal::AccessProtected) meta.changed = true end
q_slot(slot)
click to toggle source
# File lib/Qt/qtruby4.rb, line 87 def self.q_slot(slot) meta = Qt::Meta[self.name] || Qt::MetaInfo.new(self) meta.add_slots([slot], Internal::MethodSlot | Internal::AccessPublic) meta.changed = true end
signals(*signal_list)
click to toggle source
# File lib/Qt/qtruby4.rb, line 63 def self.signals(*signal_list) meta = Qt::Meta[self.name] || Qt::MetaInfo.new(self) meta.add_signals(signal_list, Internal::MethodSignal | Internal::AccessProtected) meta.changed = true end
slots(*slot_list)
click to toggle source
# File lib/Qt/qtruby4.rb, line 69 def self.slots(*slot_list) meta = Qt::Meta[self.name] || Qt::MetaInfo.new(self) meta.add_slots(slot_list, Internal::MethodSlot | Internal::AccessPublic) meta.changed = true end
Public Instance Methods
%(a)
click to toggle source
# File lib/Qt/qtruby4.rb, line 120 def %(a) return Qt::%(self, a) end
&(a)
click to toggle source
# File lib/Qt/qtruby4.rb, line 129 def &(a) return Qt::&(self, a) end
*(a)
click to toggle source
# File lib/Qt/qtruby4.rb, line 114 def *(a) return Qt::*(self, a) end
**(a)
click to toggle source
# File lib/Qt/qtruby4.rb, line 99 def **(a) return Qt::**(self, a) end
+(a)
click to toggle source
# File lib/Qt/qtruby4.rb, line 102 def +(a) return Qt::+(self, a) end
-(a)
click to toggle source
# File lib/Qt/qtruby4.rb, line 111 def -(a) return Qt::-(self, a) end
-@()
click to toggle source
# File lib/Qt/qtruby4.rb, line 108 def -@() return Qt::-(self) end
/(a)
click to toggle source
# File lib/Qt/qtruby4.rb, line 117 def /(a) return Qt::/(self, a) #/ end
<(a)
click to toggle source
Module has '<', '<=', '>' and '>=' operator instance methods, so pretend they don't exist by calling method_missing() explicitly
Calls superclass method
# File lib/Qt/qtruby4.rb, line 141 def <(a) begin Qt::method_missing(:<, self, a) rescue super(a) end end
<<(a)
click to toggle source
# File lib/Qt/qtruby4.rb, line 126 def <<(a) return Qt::<<(self, a) end
<=(a)
click to toggle source
Calls superclass method
# File lib/Qt/qtruby4.rb, line 149 def <=(a) begin Qt::method_missing(:<=, self, a) rescue super(a) end end
==(a)
click to toggle source
Object has a '==' operator instance method, so pretend it don't exist by calling method_missing() explicitly
Calls superclass method
# File lib/Qt/qtruby4.rb, line 175 def ==(a) return false if a.nil? begin Qt::method_missing(:==, self, a) rescue super(a) end end
>(a)
click to toggle source
Calls superclass method
# File lib/Qt/qtruby4.rb, line 157 def >(a) begin Qt::method_missing(:>, self, a) rescue super(a) end end
>=(a)
click to toggle source
Calls superclass method
# File lib/Qt/qtruby4.rb, line 165 def >=(a) begin Qt::method_missing(:>=, self, a) rescue super(a) end end
>>(a)
click to toggle source
# File lib/Qt/qtruby4.rb, line 123 def >>(a) return Qt::>>(self, a) end
QCOMPARE(actual, expected)
click to toggle source
# File ext/ruby/qttest/qttest.rb, line 134 def QCOMPARE(actual, expected) file, line = caller(1)[0].split(':') if !Qt::Test.qCompare(eval(actual, Qt::Test.current_binding), eval(expected, Qt::Test.current_binding), actual, expected, file, line.to_i) return eval('return', Qt::Test.current_binding) end end
QEXPECT_FAIL(dataIndex, comment, mode)
click to toggle source
# File ext/ruby/qttest/qttest.rb, line 147 def QEXPECT_FAIL(dataIndex, comment, mode) file, line = caller(1)[0].split(':') if !Qt::Test.qExpectFail(dataIndex, comment, mode, file, line.to_i) return eval('return', Qt::Test.current_binding) end end
QFAIL(message)
click to toggle source
# File ext/ruby/qttest/qttest.rb, line 115 def QFAIL(message) file, line = caller(1)[0].split(':') Qt::Test.qFail(message, file, line.to_i) return eval('return', Qt::Test.current_binding) end
QSKIP(statement, mode)
click to toggle source
# File ext/ruby/qttest/qttest.rb, line 141 def QSKIP(statement, mode) file, line = caller(1)[0].split(':') Qt::Test.qSkip(statement, mode, file, line.to_i) return eval('return', Qt::Test.current_binding) end
QTEST(actual, testElement)
click to toggle source
# File ext/ruby/qttest/qttest.rb, line 154 def QTEST(actual, testElement) file, line = caller(1)[0].split(':') if !Qt::Test.qTest(eval(actual, Qt::Test.current_binding), eval(testElement, Qt::Test.current_binding), actual, testElement, file, line.to_i) return eval('return', Qt::Test.current_binding) end end
QVERIFY(statement)
click to toggle source
# File ext/ruby/qttest/qttest.rb, line 108 def QVERIFY(statement) file, line = caller(1)[0].split(':') if !Qt::Test.qVerify(eval(statement, Qt::Test.current_binding), statement, "", file, line.to_i) return eval('return', Qt::Test.current_binding) end end
QVERIFY2(statement, description)
click to toggle source
# File ext/ruby/qttest/qttest.rb, line 121 def QVERIFY2(statement, description) file, line = caller(1)[0].split(':') if eval(statement, Qt::Test.current_binding) if !Qt::Test.qVerify(true, statement, description, file, line.to_i) return eval('return', Qt::Test.current_binding) end else if !Qt::Test.qVerify(false, statement, description, file, line.to_i) return eval('return', Qt::Test.current_binding) end end end
QWARN(msg)
click to toggle source
# File ext/ruby/qttest/qttest.rb, line 161 def QWARN(msg) Qt::Test.qWarn(msg) end
^(a)
click to toggle source
# File lib/Qt/qtruby4.rb, line 132 def ^(a) return Qt::^(self, a) end
is_a?(mod)
click to toggle source
Change the behaviors of is_a? and kind_of? (alias of is_a?) to use above self.ancestors method Note: this definition also affects Object#===
Calls superclass method
# File lib/Qt/qtruby4.rb, line 207 def is_a?(mod) super || self.class.ancestors.include?(mod) end
Also aliased as: kind_of?
methods(regular=true)
click to toggle source
Calls superclass method
# File lib/Qt/qtruby4.rb, line 212 def methods(regular=true) if !regular return singleton_methods end qt_methods(super, 0x0) end
protected_methods(all=true)
click to toggle source
Calls superclass method
# File lib/Qt/qtruby4.rb, line 220 def protected_methods(all=true) # From smoke.h, Smoke::mf_protected 0x80 qt_methods(super, 0x80) end
public_methods(all=true)
click to toggle source
# File lib/Qt/qtruby4.rb, line 225 def public_methods(all=true) methods end
singleton_methods(all=true)
click to toggle source
Calls superclass method
# File lib/Qt/qtruby4.rb, line 229 def singleton_methods(all=true) # From smoke.h, Smoke::mf_static 0x01 qt_methods(super, 0x01) end
|(a)
click to toggle source
# File lib/Qt/qtruby4.rb, line 135 def |(a) return Qt::|(self, a) end
~(a)
click to toggle source
# File lib/Qt/qtruby4.rb, line 105 def ~(a) return Qt::~(self, a) end