diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-05 15:55:57 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-05 15:55:57 -0600 |
commit | 9ba04742771370f59740e32e11c5f3a1e6a1b70a (patch) | |
tree | c81c34dae2b3b1ea73801bf18a960265dc4207f7 /qtruby/rubylib/examples/qt-examples/chart/element.rb | |
parent | 1a96c45b22d01378202d9dc7ed9c47acd30f966e (diff) | |
download | tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.tar.gz tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.zip |
Initial TQt conversion
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 |