Class: Qt::Time

Inherits:
Base show all
Defined in:
lib/Qt/qtruby4.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, #|, #~

Constructor Details

#initialize(*args) ⇒ Time

Returns a new instance of Time.



2110
2111
2112
2113
2114
2115
2116
# File 'lib/Qt/qtruby4.rb', line 2110

def initialize(*args)
  if args.size == 1 && args[0].class.name == "Time"
    return super(args[0].hour, args[0].min, args[0].sec)
  else
    return super(*args)
  end
end

Instance Method Details

#inspectObject



2118
2119
2120
2121
# File 'lib/Qt/qtruby4.rb', line 2118

def inspect
  str = super
  str.sub(/>$/, " %s>" % toString)
end

#pretty_print(pp) ⇒ Object



2123
2124
2125
2126
# File 'lib/Qt/qtruby4.rb', line 2123

def pretty_print(pp)
  str = to_s
  pp.text str.sub(/>$/, " %s>" % toString)
end