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.



2093
2094
2095
2096
2097
2098
2099
# File 'lib/Qt/qtruby4.rb', line 2093

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



2101
2102
2103
2104
# File 'lib/Qt/qtruby4.rb', line 2101

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

#pretty_print(pp) ⇒ Object



2106
2107
2108
2109
# File 'lib/Qt/qtruby4.rb', line 2106

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