summaryrefslogtreecommitdiffstats
path: root/qtruby/rubylib/examples/qt-examples/chart/setdataform.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qtruby/rubylib/examples/qt-examples/chart/setdataform.rb')
-rw-r--r--qtruby/rubylib/examples/qt-examples/chart/setdataform.rb62
1 files changed, 31 insertions, 31 deletions
diff --git a/qtruby/rubylib/examples/qt-examples/chart/setdataform.rb b/qtruby/rubylib/examples/qt-examples/chart/setdataform.rb
index 81a9403b..3f361061 100644
--- a/qtruby/rubylib/examples/qt-examples/chart/setdataform.rb
+++ b/qtruby/rubylib/examples/qt-examples/chart/setdataform.rb
@@ -1,4 +1,4 @@
-class SetDataForm < Qt::Dialog
+class SetDataForm < TQt::Dialog
slots 'setColor()',
'setChosenColor( int, int )',
@@ -20,9 +20,9 @@ class SetDataForm < Qt::Dialog
setCaption( "Chart -- Set Data" )
resize( 540, 440 )
- @tableButtonBox = Qt::VBoxLayout.new( self, 11, 6, "@table button box layout" )
+ @tableButtonBox = TQt::VBoxLayout.new( self, 11, 6, "@table button box layout" )
- @table = Qt::Table.new( self, "data @table" )
+ @table = TQt::Table.new( self, "data @table" )
@table.setNumCols( 5 )
@table.setNumRows( ChartForm::MAX_ELEMENTS )
@table.setColumnReadOnly( 1, true )
@@ -41,30 +41,30 @@ class SetDataForm < Qt::Dialog
th.setLabel( 4, "Color" )
@tableButtonBox.addWidget( @table )
- @buttonBox = Qt::HBoxLayout.new( nil, 0, 6, "button box layout" )
+ @buttonBox = TQt::HBoxLayout.new( nil, 0, 6, "button box layout" )
- @colorPushButton = Qt::PushButton.new( self, "color button" )
+ @colorPushButton = TQt::PushButton.new( self, "color button" )
@colorPushButton.setText( "&Color..." )
@colorPushButton .setEnabled( false )
@buttonBox.addWidget( @colorPushButton )
- spacer = Qt::SpacerItem.new( 0, 0, Qt::SizePolicy::Expanding,
- Qt::SizePolicy::Minimum )
+ spacer = TQt::SpacerItem.new( 0, 0, TQt::SizePolicy::Expanding,
+ TQt::SizePolicy::Minimum )
@buttonBox.addItem( spacer )
- okPushButton = Qt::PushButton.new( self, "ok button" )
+ okPushButton = TQt::PushButton.new( self, "ok button" )
okPushButton.setText( "OK" )
okPushButton.setDefault( true )
@buttonBox.addWidget( okPushButton )
- cancelPushButton = Qt::PushButton.new( self, "cancel button" )
+ cancelPushButton = TQt::PushButton.new( self, "cancel button" )
cancelPushButton.setText( "Cancel" )
- cancelPushButton.setAccel( Qt::KeySequence.new(Key_Escape) )
+ cancelPushButton.setAccel( TQt::KeySequence.new(Key_Escape) )
@buttonBox.addWidget( cancelPushButton )
@tableButtonBox.addLayout( @buttonBox )
- connect( @table, SIGNAL( 'clicked(int,int,int,const QPoint&)' ),
+ connect( @table, SIGNAL( 'clicked(int,int,int,const TQPoint&)' ),
self, SLOT( 'setChosenColor(int,int)' ) )
connect( @table, SIGNAL( 'currentChanged(int,int)' ),
self, SLOT( 'currentChanged(int,int)' ) )
@@ -75,23 +75,23 @@ class SetDataForm < Qt::Dialog
connect( cancelPushButton, SIGNAL( 'clicked()' ), self, SLOT( 'reject()' ) )
patterns = Array.new(MAX_PATTERNS)
- patterns[0] = Qt::Pixmap.new( "images/pattern01.xpm" )
- patterns[1] = Qt::Pixmap.new( "images/pattern02.xpm" )
- patterns[2] = Qt::Pixmap.new( "images/pattern03.xpm" )
- patterns[3] = Qt::Pixmap.new( "images/pattern04.xpm" )
- patterns[4] = Qt::Pixmap.new( "images/pattern05.xpm" )
- patterns[5] = Qt::Pixmap.new( "images/pattern06.xpm" )
- patterns[6] = Qt::Pixmap.new( "images/pattern07.xpm" )
- patterns[7] = Qt::Pixmap.new( "images/pattern08.xpm" )
- patterns[8] = Qt::Pixmap.new( "images/pattern09.xpm" )
- patterns[9] = Qt::Pixmap.new( "images/pattern10.xpm" )
- patterns[10] = Qt::Pixmap.new( "images/pattern11.xpm" )
- patterns[11] = Qt::Pixmap.new( "images/pattern12.xpm" )
- patterns[12] = Qt::Pixmap.new( "images/pattern13.xpm" )
- patterns[13] = Qt::Pixmap.new( "images/pattern14.xpm" )
+ patterns[0] = TQt::Pixmap.new( "images/pattern01.xpm" )
+ patterns[1] = TQt::Pixmap.new( "images/pattern02.xpm" )
+ patterns[2] = TQt::Pixmap.new( "images/pattern03.xpm" )
+ patterns[3] = TQt::Pixmap.new( "images/pattern04.xpm" )
+ patterns[4] = TQt::Pixmap.new( "images/pattern05.xpm" )
+ patterns[5] = TQt::Pixmap.new( "images/pattern06.xpm" )
+ patterns[6] = TQt::Pixmap.new( "images/pattern07.xpm" )
+ patterns[7] = TQt::Pixmap.new( "images/pattern08.xpm" )
+ patterns[8] = TQt::Pixmap.new( "images/pattern09.xpm" )
+ patterns[9] = TQt::Pixmap.new( "images/pattern10.xpm" )
+ patterns[10] = TQt::Pixmap.new( "images/pattern11.xpm" )
+ patterns[11] = TQt::Pixmap.new( "images/pattern12.xpm" )
+ patterns[12] = TQt::Pixmap.new( "images/pattern13.xpm" )
+ patterns[13] = TQt::Pixmap.new( "images/pattern14.xpm" )
rect = @table.cellRect( 0, 1 )
- pix = Qt::Pixmap.new( rect.width(), rect.height() )
+ pix = TQt::Pixmap.new( rect.width(), rect.height() )
for i in 0...ChartForm::MAX_ELEMENTS
element = @elements[i]
@@ -105,7 +105,7 @@ class SetDataForm < Qt::Dialog
@table.setPixmap( i, 1, pix )
@table.setText( i, 1, color.name() )
- combobox = Qt::ComboBox.new
+ combobox = TQt::ComboBox.new
for j in 0...MAX_PATTERNS
combobox.insertItem( patterns[j] )
end
@@ -151,8 +151,8 @@ class SetDataForm < Qt::Dialog
return
end
- color = Qt::ColorDialog.getColor(
- Qt::Color.new( @table.text( row, col ) ),
+ color = TQt::ColorDialog.getColor(
+ TQt::Color.new( @table.text( row, col ) ),
self, "color dialog" )
if color.isValid()
pix = @table.pixmap( row, col )
@@ -172,10 +172,10 @@ class SetDataForm < Qt::Dialog
else
element.value = Element::INVALID
end
- element.valueColor = Qt::Color.new( @table.text( i, 1 ) )
+ element.valueColor = TQt::Color.new( @table.text( i, 1 ) )
element.valuePattern = (@table.cellWidget( i, 2 )).currentItem() + 1
element.label = @table.text( i, 3 )
- element.labelColor = Qt::Color.new( @table.text( i, 4 ) )
+ element.labelColor = TQt::Color.new( @table.text( i, 4 ) )
end
super