class Qt::MetaObject
Public Instance Methods
enumerators(inherits = false)
click to toggle source
# File lib/Qt/qtruby4.rb, line 1512 def enumerators(inherits = false) res = [] if inherits for e in 0...enumeratorCount() res.push enumerator(e) end else for e in enumeratorOffset()...enumeratorCount() res.push enumerator(e) end end return res end
inspect()
click to toggle source
Calls superclass method
# File lib/Qt/qtruby4.rb, line 1526 def inspect str = super str.sub!(/>$/, "") str << " className=%s," % className str << " propertyNames=Array (%d element(s))," % propertyNames.length unless propertyNames.length == 0 str << " signalNames=Array (%d element(s))," % signalNames.length unless signalNames.length == 0 str << " slotNames=Array (%d element(s))," % slotNames.length unless slotNames.length == 0 str << " enumerators=Array (%d element(s))," % enumerators.length unless enumerators.length == 0 str << " superClass=%s," % superClass.inspect unless superClass == nil str.chop! str << ">" end
method(*args)
click to toggle source
Calls superclass method
# File lib/Qt/qtruby4.rb, line 1447 def method(*args) if args.length == 1 && args[0].kind_of?(Symbol) super(*args) else method_missing(:method, *args) end end
pretty_print(pp)
click to toggle source
# File lib/Qt/qtruby4.rb, line 1539 def pretty_print(pp) str = to_s str.sub!(/>$/, "") str << "\n className=%s," % className str << "\n propertyNames=Array (%d element(s))," % propertyNames.length unless propertyNames.length == 0 str << "\n signalNames=Array (%d element(s))," % signalNames.length unless signalNames.length == 0 str << "\n slotNames=Array (%d element(s))," % slotNames.length unless slotNames.length == 0 str << "\n enumerators=Array (%d element(s))," % enumerators.length unless enumerators.length == 0 str << "\n superClass=%s," % superClass.inspect unless superClass == nil str << "\n methodCount=%d," % methodCount str << "\n methodOffset=%d," % methodOffset str << "\n propertyCount=%d," % propertyCount str << "\n propertyOffset=%d," % propertyOffset str << "\n enumeratorCount=%d," % enumeratorCount str << "\n enumeratorOffset=%d," % enumeratorOffset str.chop! str << ">" pp.text str end
propertyNames(inherits = false)
click to toggle source
Add three methods, 'propertyNames()', 'slotNames()' and 'signalNames()' from Qt3, as they are very useful when debugging
# File lib/Qt/qtruby4.rb, line 1458 def propertyNames(inherits = false) res = [] if inherits for p in 0...propertyCount() res.push property(p).name end else for p in propertyOffset()...propertyCount() res.push property(p).name end end return res end
signalNames(inherits = false)
click to toggle source
# File lib/Qt/qtruby4.rb, line 1492 def signalNames(inherits = false) res = [] if inherits for m in 0...methodCount() if method(m).methodType == Qt::MetaMethod::Signal res.push "%s %s" % [method(m).typeName == "" ? "void" : method(m).typeName, method(m).signature] end end else for m in methodOffset()...methodCount() if method(m).methodType == Qt::MetaMethod::Signal res.push "%s %s" % [method(m).typeName == "" ? "void" : method(m).typeName, method(m).signature] end end end return res end
slotNames(inherits = false)
click to toggle source
# File lib/Qt/qtruby4.rb, line 1472 def slotNames(inherits = false) res = [] if inherits for m in 0...methodCount() if method(m).methodType == Qt::MetaMethod::Slot res.push "%s %s" % [method(m).typeName == "" ? "void" : method(m).typeName, method(m).signature] end end else for m in methodOffset()...methodCount() if method(m).methodType == Qt::MetaMethod::Slot res.push "%s %s" % [method(m).typeName == "" ? "void" : method(m).typeName, method(m).signature] end end end return res end