Class: Qt::Point

Inherits:
Base show all
Defined in:
lib/Qt/qtruby4.rb,
ext/ruby/qtruby/test/opoverloading.rb

Instance Method Summary collapse

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, #|, #~

Instance Method Details

#inspectObject



1609
1610
1611
1612
# File 'lib/Qt/qtruby4.rb', line 1609

def inspect
  str = super
  str.sub(/>$/, " x=%d, y=%d>" % [self.x, self.y])
end

#pretty_print(pp) ⇒ Object



1614
1615
1616
1617
# File 'lib/Qt/qtruby4.rb', line 1614

def pretty_print(pp)
  str = to_s
  pp.text str.sub(/>$/, "\n x=%d,\n y=%d>" % [self.x, self.y])
end

#to_sObject



4
5
6
# File 'ext/ruby/qtruby/test/opoverloading.rb', line 4

def to_s
   "(#{x}, #{y})"
end