Class: Qt::Time

Inherits:
Base show all
Defined in:
lib/Qt/qtruby4.rb,
ext/ruby/qtruby/src/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.



2073
2074
2075
2076
2077
2078
2079
# File 'lib/Qt/qtruby4.rb', line 2073

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



2081
2082
2083
2084
# File 'lib/Qt/qtruby4.rb', line 2081

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

#pretty_print(pp) ⇒ Object



2086
2087
2088
2089
# File 'lib/Qt/qtruby4.rb', line 2086

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