Class: Qt::Time

Inherits:
Base show all
Defined in:
lib/Qt/qtruby4.rb

Instance Method Summary collapse

Methods inherited from Base

#%, #&, #*, #**, #+, #-, #[email protected], #/, #<, #<<, #<=, #==, #>, #>=, #>>, #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


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

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


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

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

#pretty_print(pp) ⇒ Object


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

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