diff options
author | Michele Calgaro <[email protected]> | 2024-01-13 11:29:06 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-01-13 11:45:40 +0900 |
commit | faf33629bb6562a6f43f930afafe4b22e9cdb60b (patch) | |
tree | 8fc6dc6d999a3a039ace28db2fe5b96712fa18e0 /qtruby/rubylib/examples/qt-examples/chart | |
parent | 0ff7d227c65fecb4fb7482ecd679acb594ef5cf7 (diff) | |
download | tdebindings-faf33629bb6562a6f43f930afafe4b22e9cdb60b.tar.gz tdebindings-faf33629bb6562a6f43f930afafe4b22e9cdb60b.zip |
Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'qtruby/rubylib/examples/qt-examples/chart')
3 files changed, 34 insertions, 34 deletions
diff --git a/qtruby/rubylib/examples/qt-examples/chart/chartform.rb b/qtruby/rubylib/examples/qt-examples/chart/chartform.rb index 0ebff47e..dd3523fd 100644 --- a/qtruby/rubylib/examples/qt-examples/chart/chartform.rb +++ b/qtruby/rubylib/examples/qt-examples/chart/chartform.rb @@ -42,41 +42,41 @@ class ChartForm < TQt::MainWindow fileNewAction = TQt::Action.new( "New Chart", TQt::IconSet.new(TQt::Pixmap.new( "images/file_new.xpm" )), "&New", TQt::KeySequence.new(CTRL+Key_N), self, "new" ) - connect( fileNewAction, SIGNAL( 'activated()' ), self, SLOT( 'fileNew()' ) ) + connect( fileNewAction, TQ_SIGNAL( 'activated()' ), self, TQ_SLOT( 'fileNew()' ) ) fileOpenAction = TQt::Action.new( "Open Chart", TQt::IconSet.new(TQt::Pixmap.new( "images/file_open.xpm" )), "&Open...", TQt::KeySequence.new(CTRL+Key_O), self, "open" ) - connect( fileOpenAction, SIGNAL( 'activated()' ), self, SLOT( 'fileOpen()' ) ) + connect( fileOpenAction, TQ_SIGNAL( 'activated()' ), self, TQ_SLOT( 'fileOpen()' ) ) fileSaveAction = TQt::Action.new( "Save Chart", TQt::IconSet.new(TQt::Pixmap.new( "images/file_save.xpm" )), "&Save", TQt::KeySequence.new(CTRL+Key_S), self, "save" ) - connect( fileSaveAction, SIGNAL( 'activated()' ), self, SLOT( 'fileSave()' ) ) + connect( fileSaveAction, TQ_SIGNAL( 'activated()' ), self, TQ_SLOT( 'fileSave()' ) ) fileSaveAsAction = TQt::Action.new( "Save Chart As", TQt::IconSet.new(TQt::Pixmap.new( "images/file_save.xpm" )), "Save &As...", TQt::KeySequence.new(0), self, "save as" ) - connect( fileSaveAsAction, SIGNAL( 'activated()' ), - self, SLOT( 'fileSaveAs()' ) ) + connect( fileSaveAsAction, TQ_SIGNAL( 'activated()' ), + self, TQ_SLOT( 'fileSaveAs()' ) ) fileSaveAsPixmapAction = TQt::Action.new( "Save Chart As Bitmap", TQt::IconSet.new(TQt::Pixmap.new( "images/file_save.xpm" )), "Save As &Bitmap...", TQt::KeySequence.new(CTRL+Key_B), self, "save as bitmap" ) - connect( fileSaveAsPixmapAction, SIGNAL( 'activated()' ), - self, SLOT( 'fileSaveAsPixmap()' ) ) + connect( fileSaveAsPixmapAction, TQ_SIGNAL( 'activated()' ), + self, TQ_SLOT( 'fileSaveAsPixmap()' ) ) filePrintAction = TQt::Action.new( "Print Chart", TQt::IconSet.new(TQt::Pixmap.new( "images/file_print.xpm" )), "&Print Chart...", TQt::KeySequence.new(CTRL+Key_P), self, "print chart" ) - connect( filePrintAction, SIGNAL( 'activated()' ), - self, SLOT( 'filePrint()' ) ) + connect( filePrintAction, TQ_SIGNAL( 'activated()' ), + self, TQ_SLOT( 'filePrint()' ) ) optionsSetDataAction = TQt::Action.new( "Set Data", TQt::IconSet.new(TQt::Pixmap.new( "images/options_setdata.xpm" )), "Set &Data...", TQt::KeySequence.new(CTRL+Key_D), self, "set data" ) - connect( optionsSetDataAction, SIGNAL( 'activated()' ), - self, SLOT( 'optionsSetData()' ) ) + connect( optionsSetDataAction, TQ_SIGNAL( 'activated()' ), + self, TQ_SLOT( 'optionsSetData()' ) ) chartGroup = TQt::ActionGroup.new( self ) # Connected later @@ -102,17 +102,17 @@ class ChartForm < TQt::MainWindow optionsSetFontAction = TQt::Action.new( "Set Font", TQt::IconSet.new(TQt::Pixmap.new( "images/options_setfont.xpm" )), "Set &Font...", TQt::KeySequence.new(CTRL+Key_F), self, "set font" ) - connect( optionsSetFontAction, SIGNAL( 'activated()' ), - self, SLOT( 'optionsSetFont()' ) ) + connect( optionsSetFontAction, TQ_SIGNAL( 'activated()' ), + self, TQ_SLOT( 'optionsSetFont()' ) ) optionsSetOptionsAction = TQt::Action.new( "Set Options", TQt::IconSet.new(TQt::Pixmap.new( "images/options_setoptions.xpm" )), "Set &Options...", TQt::KeySequence.new(0), self, "set options" ) - connect( optionsSetOptionsAction, SIGNAL( 'activated()' ), - self, SLOT( 'optionsSetOptions()' ) ) + connect( optionsSetOptionsAction, TQ_SIGNAL( 'activated()' ), + self, TQ_SLOT( 'optionsSetOptions()' ) ) fileQuitAction = TQt::Action.new( "Quit", "&Quit", TQt::KeySequence.new(CTRL+Key_Q), self, "quit" ) - connect( fileQuitAction, SIGNAL( 'activated()' ), self, SLOT( 'fileQuit()' ) ) + connect( fileQuitAction, TQ_SIGNAL( 'activated()' ), self, TQ_SLOT( 'fileQuit()' ) ) fileTools = TQt::ToolBar.new( self, "file operations" ) @@ -164,9 +164,9 @@ class ChartForm < TQt::MainWindow helpMenu = TQt::PopupMenu.new( self ) menuBar().insertItem( "&Help", helpMenu ) - helpMenu.insertItem( "&Help", self, SLOT('helpHelp()'), TQt::KeySequence.new(Key_F1) ) - helpMenu.insertItem( "&About", self, SLOT('helpAbout()') ) - helpMenu.insertItem( "About &Qt", self, SLOT('helpAboutQt()') ) + helpMenu.insertItem( "&Help", self, TQ_SLOT('helpHelp()'), TQt::KeySequence.new(Key_F1) ) + helpMenu.insertItem( "&About", self, TQ_SLOT('helpAbout()') ) + helpMenu.insertItem( "About &Qt", self, TQ_SLOT('helpAboutQt()') ) @printer = nil @@ -198,8 +198,8 @@ class ChartForm < TQt::MainWindow # Connect *after* we've set the chart type on so we don't call # drawElements() prematurely. - connect( chartGroup, SIGNAL( 'selected(TQAction*)' ), - self, SLOT( 'updateChartType(TQAction*)' ) ) + connect( chartGroup, TQ_SIGNAL( 'selected(TQAction*)' ), + self, TQ_SLOT( 'updateChartType(TQAction*)' ) ) resize( windowWidth, windowHeight ) if windowX != -1 || windowY != -1 @@ -336,7 +336,7 @@ class ChartForm < TQt::MainWindow end if i < @recentFiles.length() @fileMenu.insertItem( "&%d %s" % [i + 1, @recentFiles[i]], - self, SLOT( 'fileOpenRecent(int)' ), + self, TQ_SLOT( 'fileOpenRecent(int)' ), TQt::KeySequence.new(0), i ) end end diff --git a/qtruby/rubylib/examples/qt-examples/chart/optionsform.rb b/qtruby/rubylib/examples/qt-examples/chart/optionsform.rb index 35c2aea8..a83fe828 100644 --- a/qtruby/rubylib/examples/qt-examples/chart/optionsform.rb +++ b/qtruby/rubylib/examples/qt-examples/chart/optionsform.rb @@ -94,9 +94,9 @@ class OptionsForm < TQt::Dialog @buttonsLayout.addWidget( @cancelPushButton ) @optionsFormLayout.addLayout( @buttonsLayout ) - connect( @fontPushButton, SIGNAL( 'clicked()' ), self, SLOT( 'chooseFont()' ) ) - connect( @okPushButton, SIGNAL( 'clicked()' ), self, SLOT( 'accept()' ) ) - connect( @cancelPushButton, SIGNAL( 'clicked()' ), self, SLOT( 'reject()' ) ) + connect( @fontPushButton, TQ_SIGNAL( 'clicked()' ), self, TQ_SLOT( 'chooseFont()' ) ) + connect( @okPushButton, TQ_SIGNAL( 'clicked()' ), self, TQ_SLOT( 'accept()' ) ) + connect( @cancelPushButton, TQ_SIGNAL( 'clicked()' ), self, TQ_SLOT( 'reject()' ) ) @chartTypeTextLabel.setBuddy( @chartTypeComboBox ) @decimalPlacesTextLabel.setBuddy( @decimalPlacesSpinBox ) diff --git a/qtruby/rubylib/examples/qt-examples/chart/setdataform.rb b/qtruby/rubylib/examples/qt-examples/chart/setdataform.rb index 3f361061..5ef31f45 100644 --- a/qtruby/rubylib/examples/qt-examples/chart/setdataform.rb +++ b/qtruby/rubylib/examples/qt-examples/chart/setdataform.rb @@ -64,15 +64,15 @@ class SetDataForm < TQt::Dialog @tableButtonBox.addLayout( @buttonBox ) - 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)' ) ) - connect( @table, SIGNAL( 'valueChanged(int,int)' ), - self, SLOT( 'valueChanged(int,int)' ) ) - connect( @colorPushButton, SIGNAL( 'clicked()' ), self, SLOT( 'setColor()' ) ) - connect( okPushButton, SIGNAL( 'clicked()' ), self, SLOT( 'accept()' ) ) - connect( cancelPushButton, SIGNAL( 'clicked()' ), self, SLOT( 'reject()' ) ) + connect( @table, TQ_SIGNAL( 'clicked(int,int,int,const TQPoint&)' ), + self, TQ_SLOT( 'setChosenColor(int,int)' ) ) + connect( @table, TQ_SIGNAL( 'currentChanged(int,int)' ), + self, TQ_SLOT( 'currentChanged(int,int)' ) ) + connect( @table, TQ_SIGNAL( 'valueChanged(int,int)' ), + self, TQ_SLOT( 'valueChanged(int,int)' ) ) + connect( @colorPushButton, TQ_SIGNAL( 'clicked()' ), self, TQ_SLOT( 'setColor()' ) ) + connect( okPushButton, TQ_SIGNAL( 'clicked()' ), self, TQ_SLOT( 'accept()' ) ) + connect( cancelPushButton, TQ_SIGNAL( 'clicked()' ), self, TQ_SLOT( 'reject()' ) ) patterns = Array.new(MAX_PATTERNS) patterns[0] = TQt::Pixmap.new( "images/pattern01.xpm" ) |