summaryrefslogtreecommitdiffstats
path: root/qtruby/rubylib/examples/qt-examples/chart/optionsform.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qtruby/rubylib/examples/qt-examples/chart/optionsform.rb')
-rw-r--r--qtruby/rubylib/examples/qt-examples/chart/optionsform.rb68
1 files changed, 34 insertions, 34 deletions
diff --git a/qtruby/rubylib/examples/qt-examples/chart/optionsform.rb b/qtruby/rubylib/examples/qt-examples/chart/optionsform.rb
index 6b2eeac4..35c2aea8 100644
--- a/qtruby/rubylib/examples/qt-examples/chart/optionsform.rb
+++ b/qtruby/rubylib/examples/qt-examples/chart/optionsform.rb
@@ -1,4 +1,4 @@
-class OptionsForm < Qt::Dialog
+class OptionsForm < TQt::Dialog
slots 'chooseFont()'
attr_reader :chartTypeComboBox,
@@ -14,65 +14,65 @@ class OptionsForm < Qt::Dialog
setCaption( "Chart -- Options" )
resize( 320, 290 )
- @optionsFormLayout = Qt::VBoxLayout.new( self, 11, 6 )
+ @optionsFormLayout = TQt::VBoxLayout.new( self, 11, 6 )
- @chartTypeLayout = Qt::HBoxLayout.new( nil, 0, 6 )
+ @chartTypeLayout = TQt::HBoxLayout.new( nil, 0, 6 )
- @chartTypeTextLabel = Qt::Label.new( "&Chart Type", self )
+ @chartTypeTextLabel = TQt::Label.new( "&Chart Type", self )
@chartTypeLayout.addWidget( @chartTypeTextLabel )
- @chartTypeComboBox = Qt::ComboBox.new( false, self )
- @chartTypeComboBox.insertItem( Qt::Pixmap.new( "images/options_piechart.xpm" ), "Pie Chart" )
- @chartTypeComboBox.insertItem( Qt::Pixmap.new( "images/options_verticalbarchart.xpm" ),
+ @chartTypeComboBox = TQt::ComboBox.new( false, self )
+ @chartTypeComboBox.insertItem( TQt::Pixmap.new( "images/options_piechart.xpm" ), "Pie Chart" )
+ @chartTypeComboBox.insertItem( TQt::Pixmap.new( "images/options_verticalbarchart.xpm" ),
"Vertical Bar Chart" )
- @chartTypeComboBox.insertItem( Qt::Pixmap.new( "images/options_horizontalbarchart.xpm" ),
+ @chartTypeComboBox.insertItem( TQt::Pixmap.new( "images/options_horizontalbarchart.xpm" ),
"Horizontal Bar Chart" )
@chartTypeLayout.addWidget( @chartTypeComboBox )
@optionsFormLayout.addLayout( @chartTypeLayout )
- @fontLayout = Qt::HBoxLayout.new( nil, 0, 6 )
+ @fontLayout = TQt::HBoxLayout.new( nil, 0, 6 )
- @fontPushButton = Qt::PushButton.new( "&Font...", self )
+ @fontPushButton = TQt::PushButton.new( "&Font...", self )
@fontLayout.addWidget( @fontPushButton )
- @spacer = Qt::SpacerItem.new( 0, 0, Qt::SizePolicy::Expanding,
- Qt::SizePolicy::Minimum )
+ @spacer = TQt::SpacerItem.new( 0, 0, TQt::SizePolicy::Expanding,
+ TQt::SizePolicy::Minimum )
@fontLayout.addItem( @spacer )
- @fontTextLabel = Qt::Label.new( self ) # Must be set by caller via setFont()
+ @fontTextLabel = TQt::Label.new( self ) # Must be set by caller via setFont()
@fontLayout.addWidget( @fontTextLabel )
@optionsFormLayout.addLayout( @fontLayout )
- @addValuesFrame = Qt::Frame.new( self )
- @addValuesFrame.setFrameShape( Qt::Frame::StyledPanel )
- @addValuesFrame.setFrameShadow( Qt::Frame::Sunken )
- @addValuesFrameLayout = Qt::VBoxLayout.new( @addValuesFrame, 11, 6 )
+ @addValuesFrame = TQt::Frame.new( self )
+ @addValuesFrame.setFrameShape( TQt::Frame::StyledPanel )
+ @addValuesFrame.setFrameShadow( TQt::Frame::Sunken )
+ @addValuesFrameLayout = TQt::VBoxLayout.new( @addValuesFrame, 11, 6 )
- @addValuesButtonGroup = Qt::ButtonGroup.new( "Show Values", @addValuesFrame )
- @addValuesButtonGroup.setColumnLayout(0, Qt::Vertical )
+ @addValuesButtonGroup = TQt::ButtonGroup.new( "Show Values", @addValuesFrame )
+ @addValuesButtonGroup.setColumnLayout(0, TQt::Vertical )
@addValuesButtonGroup.layout().setSpacing( 6 )
@addValuesButtonGroup.layout().setMargin( 11 )
- @addValuesButtonGroupLayout = Qt::VBoxLayout.new(
+ @addValuesButtonGroupLayout = TQt::VBoxLayout.new(
@addValuesButtonGroup.layout() )
- @addValuesButtonGroupLayout.setAlignment( Qt::AlignTop )
+ @addValuesButtonGroupLayout.setAlignment( TQt::AlignTop )
- @noRadioButton = Qt::RadioButton.new( "&No", @addValuesButtonGroup )
+ @noRadioButton = TQt::RadioButton.new( "&No", @addValuesButtonGroup )
@noRadioButton.setChecked( true )
@addValuesButtonGroupLayout.addWidget( @noRadioButton )
- @yesRadioButton = Qt::RadioButton.new( "&Yes", @addValuesButtonGroup )
+ @yesRadioButton = TQt::RadioButton.new( "&Yes", @addValuesButtonGroup )
@addValuesButtonGroupLayout.addWidget( @yesRadioButton )
- @asPercentageRadioButton = Qt::RadioButton.new( "As &Percentage",
+ @asPercentageRadioButton = TQt::RadioButton.new( "As &Percentage",
@addValuesButtonGroup )
@addValuesButtonGroupLayout.addWidget( @asPercentageRadioButton )
@addValuesFrameLayout.addWidget( @addValuesButtonGroup )
- @decimalPlacesLayout = Qt::HBoxLayout.new( nil, 0, 6 )
+ @decimalPlacesLayout = TQt::HBoxLayout.new( nil, 0, 6 )
- @decimalPlacesTextLabel = Qt::Label.new( "&Decimal Places", @addValuesFrame )
+ @decimalPlacesTextLabel = TQt::Label.new( "&Decimal Places", @addValuesFrame )
@decimalPlacesLayout.addWidget( @decimalPlacesTextLabel )
- @decimalPlacesSpinBox = Qt::SpinBox.new( @addValuesFrame )
+ @decimalPlacesSpinBox = TQt::SpinBox.new( @addValuesFrame )
@decimalPlacesSpinBox.setMinValue( 0 )
@decimalPlacesSpinBox.setMaxValue( 9 )
@decimalPlacesLayout.addWidget( @decimalPlacesSpinBox )
@@ -81,16 +81,16 @@ class OptionsForm < Qt::Dialog
@optionsFormLayout.addWidget( @addValuesFrame )
- @buttonsLayout = Qt::HBoxLayout.new( nil, 0, 6 )
- @spacer = Qt::SpacerItem.new( 0, 0,
- Qt::SizePolicy::Expanding, Qt::SizePolicy::Minimum )
+ @buttonsLayout = TQt::HBoxLayout.new( nil, 0, 6 )
+ @spacer = TQt::SpacerItem.new( 0, 0,
+ TQt::SizePolicy::Expanding, TQt::SizePolicy::Minimum )
@buttonsLayout.addItem( @spacer )
- @okPushButton = Qt::PushButton.new( "OK", self )
+ @okPushButton = TQt::PushButton.new( "OK", self )
@okPushButton.setDefault( true )
@buttonsLayout.addWidget( @okPushButton )
- @cancelPushButton = Qt::PushButton.new( "Cancel", self )
+ @cancelPushButton = TQt::PushButton.new( "Cancel", self )
@buttonsLayout.addWidget( @cancelPushButton )
@optionsFormLayout.addLayout( @buttonsLayout )
@@ -104,8 +104,8 @@ class OptionsForm < Qt::Dialog
def chooseFont()
- ok = Qt::Boolean.new
- font = Qt::FontDialog.getFont( ok, @font, self )
+ ok = TQt::Boolean.new
+ font = TQt::FontDialog.getFont( ok, @font, self )
if !ok.nil?
setFont( font )
end