diff options
Diffstat (limited to 'qtruby/rubylib/examples/qt-examples/chart/element.rb')
-rw-r--r-- | qtruby/rubylib/examples/qt-examples/chart/element.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/qtruby/rubylib/examples/qt-examples/chart/element.rb b/qtruby/rubylib/examples/qt-examples/chart/element.rb index ba135632..bc6c0d51 100644 --- a/qtruby/rubylib/examples/qt-examples/chart/element.rb +++ b/qtruby/rubylib/examples/qt-examples/chart/element.rb @@ -12,10 +12,10 @@ class Element attr_accessor :value, :valueColor, :valuePattern, :label, :labelColor - def initialize( value = INVALID, valueColor = Qt::gray, - valuePattern = Qt::SolidPattern, + def initialize( value = INVALID, valueColor = TQt::gray, + valuePattern = TQt::SolidPattern, label = nil, - labelColor = Qt::black ) + labelColor = TQt::black ) init( value, valueColor, valuePattern, label, labelColor ) @propoints = [] for i in 0...MAX_PROPOINTS * 2 @@ -30,24 +30,24 @@ class Element label, labelColor ) @value = value @valueColor = valueColor - if Qt::SolidPattern >= valuePattern || Qt::DiagCrossPattern <= valuePattern - valuePattern = Qt::SolidPattern + if TQt::SolidPattern >= valuePattern || TQt::DiagCrossPattern <= valuePattern + valuePattern = TQt::SolidPattern end @valuePattern = valuePattern @label = label @labelColor = labelColor end - def set( value = INVALID, valueColor = Qt::gray, - valuePattern = Qt::SolidPattern, + def set( value = INVALID, valueColor = TQt::gray, + valuePattern = TQt::SolidPattern, label = nil, - labelColor = Qt::black ) + labelColor = TQt::black ) init( value, valueColor, valuePattern, label, labelColor ) end def setValuePattern( valuePattern ) - if valuePattern < Qt::SolidPattern.to_i || valuePattern > Qt::DiagCrossPattern.to_i - valuePattern = Qt::SolidPattern + if valuePattern < TQt::SolidPattern.to_i || valuePattern > TQt::DiagCrossPattern.to_i + valuePattern = TQt::SolidPattern end @valuePattern = valuePattern end @@ -74,7 +74,7 @@ class Element end -class Qt::TextStream +class TQt::TextStream alias op_write << @@ -117,7 +117,7 @@ class Qt::TextStream if value.nil? errors += 1 end - valueColor = Qt::Color.new( fields[1] ) + valueColor = TQt::Color.new( fields[1] ) if !valueColor.isValid() errors += 1 end @@ -125,7 +125,7 @@ class Qt::TextStream if valuePattern.nil? errors += 1 end - labelColor = Qt::Color.new( fields[3] ) + labelColor = TQt::Color.new( fields[3] ) if !labelColor.isValid() errors += 1 end |