Class: Qt::MetaInfo
Instance Attribute Summary collapse
-
#changed ⇒ Object
Returns the value of attribute changed.
-
#classinfos ⇒ Object
Returns the value of attribute classinfos.
-
#dbus ⇒ Object
Returns the value of attribute dbus.
-
#metaobject ⇒ Object
Returns the value of attribute metaobject.
-
#mocargs ⇒ Object
Returns the value of attribute mocargs.
-
#signals ⇒ Object
Returns the value of attribute signals.
-
#slots ⇒ Object
Returns the value of attribute slots.
Instance Method Summary collapse
- #add_classinfo(key, value) ⇒ Object
- #add_signals(signal_list, access) ⇒ Object
- #add_slots(slot_list, access) ⇒ Object
-
#get_signals ⇒ Object
Return a list of signals, including inherited ones.
-
#initialize(klass) ⇒ MetaInfo
constructor
A new instance of MetaInfo.
Constructor Details
#initialize(klass) ⇒ MetaInfo
Returns a new instance of MetaInfo.
3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 |
# File 'lib/Qt/qtruby4.rb', line 3070 def initialize(klass) Meta[klass.name] = self @klass = klass @metaobject = nil @signals = [] @slots = [] @classinfos = [] @dbus = false @changed = false Internal.addMetaObjectMethods(klass) end |
Instance Attribute Details
#changed ⇒ Object
Returns the value of attribute changed.
3068 3069 3070 |
# File 'lib/Qt/qtruby4.rb', line 3068 def changed @changed end |
#classinfos ⇒ Object
Returns the value of attribute classinfos.
3068 3069 3070 |
# File 'lib/Qt/qtruby4.rb', line 3068 def classinfos @classinfos end |
#dbus ⇒ Object
Returns the value of attribute dbus.
3068 3069 3070 |
# File 'lib/Qt/qtruby4.rb', line 3068 def dbus @dbus end |
#metaobject ⇒ Object
Returns the value of attribute metaobject.
3068 3069 3070 |
# File 'lib/Qt/qtruby4.rb', line 3068 def @metaobject end |
#mocargs ⇒ Object
Returns the value of attribute mocargs.
3068 3069 3070 |
# File 'lib/Qt/qtruby4.rb', line 3068 def mocargs @mocargs end |
#signals ⇒ Object
Returns the value of attribute signals.
3068 3069 3070 |
# File 'lib/Qt/qtruby4.rb', line 3068 def signals @signals end |
#slots ⇒ Object
Returns the value of attribute slots.
3068 3069 3070 |
# File 'lib/Qt/qtruby4.rb', line 3068 def slots @slots end |
Instance Method Details
#add_classinfo(key, value) ⇒ Object
3135 3136 3137 3138 3139 3140 |
# File 'lib/Qt/qtruby4.rb', line 3135 def add_classinfo(key, value) @classinfos.push [key, value] if key == 'D-Bus Interface' @dbus = true end end |
#add_signals(signal_list, access) ⇒ Object
3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 |
# File 'lib/Qt/qtruby4.rb', line 3082 def add_signals(signal_list, access) signal_names = [] signal_list.each do |signal| if signal.kind_of? Symbol signal = signal.to_s + "()" end signal = Qt::MetaObject.normalizedSignature(signal).to_s if signal =~ /^(([\w,<>:]*)\s+)?([^\s]*)\((.*)\)/ @signals.push QObjectMember.new( $3, $3 + "(" + $4 + ")", $4, ($2 == 'void' || $2.nil?) ? "" : $2, access ) signal_names << $3 else qWarning( "#{@klass.name}: Invalid signal format: '#{signal}'" ) end end Internal.addSignalMethods(@klass, signal_names) end |
#add_slots(slot_list, access) ⇒ Object
3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 |
# File 'lib/Qt/qtruby4.rb', line 3117 def add_slots(slot_list, access) slot_list.each do |slot| if slot.kind_of? Symbol slot = slot.to_s + "()" end slot = Qt::MetaObject.normalizedSignature(slot).to_s if slot =~ /^(([\w,<>:]*)\s+)?([^\s]*)\((.*)\)/ @slots.push QObjectMember.new( $3, $3 + "(" + $4 + ")", $4, ($2 == 'void' || $2.nil?) ? "" : $2, access ) else qWarning( "#{@klass.name}: Invalid slot format: '#{slot}'" ) end end end |
#get_signals ⇒ Object
Return a list of signals, including inherited ones
3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 |
# File 'lib/Qt/qtruby4.rb', line 3104 def get_signals all_signals = [] current = @klass while current != Qt::Base = Meta[current.name] if !.nil? all_signals.concat .signals end current = current.superclass end return all_signals end |