Class: Qt::DateTime

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

Instance Method Summary collapse

Methods inherited from Base

#%, #&, #*, #**, #+, #-, #-@, #/, #<, #<<, #<=, #==, #>, #>=, #>>, #^, #methods, #protected_methods, #public_methods, q_classinfo, q_signal, q_slot, signals, #singleton_methods, slots, #|, #~

Constructor Details

#initialize(*args) ⇒ DateTime

Returns a new instance of DateTime.



399
400
401
402
403
404
405
406
# File 'lib/qt/qtruby4.rb', line 399

def initialize(*args)
	if args.size == 1 && args[0].class.name == "DateTime"
		return super(	Qt::Date.new(args[0].year, args[0].month, args[0].day), 
						Qt::Time.new(args[0].hour, args[0].min, args[0].sec) )
	else
		return super(*args)
	end
end

Instance Method Details

#inspectObject



408
409
410
411
# File 'lib/qt/qtruby4.rb', line 408

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

#pretty_print(pp) ⇒ Object



413
414
415
416
# File 'lib/qt/qtruby4.rb', line 413

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