Class: Qt::Base::Signal

Inherits:
Object show all
Defined in:
lib/rui/toolkits/qtbase/qt.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(signal, types) ⇒ Signal

Returns a new instance of Signal.



250
251
252
253
254
# File 'lib/rui/toolkits/qtbase/qt.rb', line 250

def initialize(signal, types)
  raise "Only symbols are supported as signals" unless signal.is_a?(Symbol)
  @symbol = signal
  @types = types
end

Instance Attribute Details

#symbolObject (readonly)

Returns the value of attribute symbol.



248
249
250
# File 'lib/rui/toolkits/qtbase/qt.rb', line 248

def symbol
  @symbol
end

Class Method Details

.create(signal, types) ⇒ Object



256
257
258
259
260
261
262
# File 'lib/rui/toolkits/qtbase/qt.rb', line 256

def self.create(signal, types)
  if signal.is_a?(self)
    signal
  else
    new(signal, types)
  end
end

Instance Method Details

#to_sObject



264
265
266
# File 'lib/rui/toolkits/qtbase/qt.rb', line 264

def to_s
  @symbol.to_s
end