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.



2039
2040
2041
2042
2043
2044
2045
# File 'lib/Qt/qtruby4.rb', line 2039

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



2047
2048
2049
2050
# File 'lib/Qt/qtruby4.rb', line 2047

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

#pretty_print(pp) ⇒ Object



2052
2053
2054
2055
# File 'lib/Qt/qtruby4.rb', line 2052

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