class Qt::Enum
If a C++ enum was converted to an ordinary ruby Integer, the name of the type is lost. The enum type name is needed for overloaded method resolution when two methods differ only by an enum type.
Attributes
type[RW]
value[RW]
Public Class Methods
new(n, enum_type)
click to toggle source
# File lib/Qt/qtruby4.rb, line 325 def initialize(n, enum_type) @value = n @type = enum_type end
Public Instance Methods
%(n)
click to toggle source
# File lib/Qt/qtruby4.rb, line 342 def %(n) return @value % n.to_i end
&(n)
click to toggle source
# File lib/Qt/qtruby4.rb, line 352 def &(n) return Enum.new(@value & n.to_i, @type) end
*(n)
click to toggle source
# File lib/Qt/qtruby4.rb, line 336 def *(n) return @value * n.to_i end
**(n)
click to toggle source
# File lib/Qt/qtruby4.rb, line 345 def **(n) return @value ** n.to_i end
+(n)
click to toggle source
# File lib/Qt/qtruby4.rb, line 330 def +(n) return @value + n.to_i end
-(n)
click to toggle source
# File lib/Qt/qtruby4.rb, line 333 def -(n) return @value - n.to_i end
/(n)
click to toggle source
# File lib/Qt/qtruby4.rb, line 339 def /(n) return @value / n.to_i end
<(n)
click to toggle source
# File lib/Qt/qtruby4.rb, line 361 def <(n) return @value < n.to_i end
<<(n)
click to toggle source
# File lib/Qt/qtruby4.rb, line 373 def <<(n) return Enum.new(@value << n.to_i, @type) end
<=(n)
click to toggle source
# File lib/Qt/qtruby4.rb, line 364 def <=(n) return @value <= n.to_i end
==(n)
click to toggle source
# File lib/Qt/qtruby4.rb, line 380 def ==(n) return @value == n.to_i end
>(n)
click to toggle source
# File lib/Qt/qtruby4.rb, line 367 def >(n) return @value > n.to_i end
>=(n)
click to toggle source
# File lib/Qt/qtruby4.rb, line 370 def >=(n) return @value >= n.to_i end
>>(n)
click to toggle source
# File lib/Qt/qtruby4.rb, line 376 def >>(n) return Enum.new(@value >> n.to_i, @type) end
^(n)
click to toggle source
# File lib/Qt/qtruby4.rb, line 355 def ^(n) return Enum.new(@value ^ n.to_i, @type) end
coerce(n)
click to toggle source
# File lib/Qt/qtruby4.rb, line 386 def coerce(n) [n, @value] end
inspect()
click to toggle source
# File lib/Qt/qtruby4.rb, line 390 def inspect to_s end
pretty_print(pp)
click to toggle source
# File lib/Qt/qtruby4.rb, line 394 def pretty_print(pp) pp.text "#<%s:0x%8.8x @type=%s, @value=%d>" % [self.class.name, object_id, type, value] end
to_f()
click to toggle source
# File lib/Qt/qtruby4.rb, line 383 def to_f() return @value.to_f end
to_i()
click to toggle source
# File lib/Qt/qtruby4.rb, line 381 def to_i() return @value end
to_s()
click to toggle source
# File lib/Qt/qtruby4.rb, line 384 def to_s() return @value.to_s end
|(n)
click to toggle source
# File lib/Qt/qtruby4.rb, line 349 def |(n) return Enum.new(@value | n.to_i, @type) end
~()
click to toggle source
# File lib/Qt/qtruby4.rb, line 358 def ~() return ~ @value end