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 | |
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')
52 files changed, 250 insertions, 250 deletions
diff --git a/qtruby/bin/rbqtsh b/qtruby/bin/rbqtsh index 413a037f..ae52df4e 100755 --- a/qtruby/bin/rbqtsh +++ b/qtruby/bin/rbqtsh @@ -317,13 +317,13 @@ class QtShellControl < TQt::MainWindow @helpExampleAction.addTo(helpMenu) @menubar.insertItem(trUtf8("&Help"), helpMenu) - connect(@fileOpenAction, SIGNAL('activated()'), self, SLOT('fileOpen()')) - connect(@fileSaveAction, SIGNAL('activated()'), self, SLOT('fileSave()')) - connect(@fileSaveAsAction, SIGNAL('activated()'), self, SLOT('fileSaveAs()')) - connect(@filePrintAction, SIGNAL('activated()'), self, SLOT('filePrint()')) - connect(@fileExitAction, SIGNAL('activated()'), self, SLOT('fileExit()')) - connect(@runAction, SIGNAL('activated()'), self, SLOT('runSelection()')) - connect(@helpExampleAction, SIGNAL('activated()'), self, SLOT('helpExample()')) + connect(@fileOpenAction, TQ_SIGNAL('activated()'), self, TQ_SLOT('fileOpen()')) + connect(@fileSaveAction, TQ_SIGNAL('activated()'), self, TQ_SLOT('fileSave()')) + connect(@fileSaveAsAction, TQ_SIGNAL('activated()'), self, TQ_SLOT('fileSaveAs()')) + connect(@filePrintAction, TQ_SIGNAL('activated()'), self, TQ_SLOT('filePrint()')) + connect(@fileExitAction, TQ_SIGNAL('activated()'), self, TQ_SLOT('fileExit()')) + connect(@runAction, TQ_SIGNAL('activated()'), self, TQ_SLOT('runSelection()')) + connect(@helpExampleAction, TQ_SIGNAL('activated()'), self, TQ_SLOT('helpExample()')) @executedLines = [] end @@ -497,13 +497,13 @@ def initialize(*k) self.show @shellWindow.show - connect(@shellWindow.comboBox.lineEdit, SIGNAL('returnPressed()'), self, SLOT('evalInput()')) + connect(@shellWindow.comboBox.lineEdit, TQ_SIGNAL('returnPressed()'), self, TQ_SLOT('evalInput()')) @prompt = '<b><font color="blue">$></font></b>' self.setCaption("MainWindow - this") @shellWindow.sessionLog.setText("Ready.<br>") - connect(@shellWindow, SIGNAL('fileNeedsEval(TQString)'), self, SLOT('evalFile(TQString)')) - connect(@shellWindow, SIGNAL('selection(TQString)'), self, SLOT('evalSelection(TQString)')) + connect(@shellWindow, TQ_SIGNAL('fileNeedsEval(TQString)'), self, TQ_SLOT('evalFile(TQString)')) + connect(@shellWindow, TQ_SIGNAL('selection(TQString)'), self, TQ_SLOT('evalSelection(TQString)')) end def logAppend(str) @@ -620,7 +620,7 @@ self.resize(220,240) @vbox.show @sample = TQt::PopupMenu.new(self) $ slots 'there()' [email protected]("&There", self, SLOT('there()')) [email protected]("&There", self, TQ_SLOT('there()')) self.menuBar.insertItem("&Here", sample) $ def there; statusBar.message("There...", 2000); end EXAMPLE diff --git a/qtruby/rubylib/designer/examples/colortool/mainform.ui.rb b/qtruby/rubylib/designer/examples/colortool/mainform.ui.rb index 3f4f5945..e83207d9 100644 --- a/qtruby/rubylib/designer/examples/colortool/mainform.ui.rb +++ b/qtruby/rubylib/designer/examples/colortool/mainform.ui.rb @@ -321,8 +321,8 @@ end def editFind() if ! @findForm @findForm = FindForm.new( self ) - connect( @findForm, SIGNAL( 'lookfor(const TQString&)' ), - self, SLOT( 'lookfor(const TQString&)' ) ) + connect( @findForm, TQ_SIGNAL( 'lookfor(const TQString&)' ), + self, TQ_SLOT( 'lookfor(const TQString&)' ) ) end @findForm.show() end diff --git a/qtruby/rubylib/designer/rbuic/form.cpp b/qtruby/rubylib/designer/rbuic/form.cpp index 45aa9435..2eb8e45a 100644 --- a/qtruby/rubylib/designer/rbuic/form.cpp +++ b/qtruby/rubylib/designer/rbuic/form.cpp @@ -751,7 +751,7 @@ void Uic::createFormImpl( const TQDomElement &e ) receiver = "self"; out << indent << "TQt::Object.connect(" << sender - << ", TQT_SIGNAL(\"" << signal << "\"), "<< receiver << ", TQT_SLOT(\"" << slot << "\") )" << endl; + << ", TQ_SIGNAL(\"" << signal << "\"), "<< receiver << ", TQ_SLOT(\"" << slot << "\") )" << endl; } } else if ( n.tagName() == "tabstops" ) { // setup tab order diff --git a/qtruby/rubylib/designer/uilib/test/test.rb b/qtruby/rubylib/designer/uilib/test/test.rb index ff3570cc..e089c735 100644 --- a/qtruby/rubylib/designer/uilib/test/test.rb +++ b/qtruby/rubylib/designer/uilib/test/test.rb @@ -15,6 +15,6 @@ if ARGV.length == 2 exit
end
w.show()
- a.connect( a, SIGNAL('lastWindowClosed()'), a, SLOT('quit()') )
+ a.connect( a, TQ_SIGNAL('lastWindowClosed()'), a, TQ_SLOT('quit()') )
a.exec()
end
diff --git a/qtruby/rubylib/examples/base/rui.rb b/qtruby/rubylib/examples/base/rui.rb index ad14bc11..8f1df3c8 100644 --- a/qtruby/rubylib/examples/base/rui.rb +++ b/qtruby/rubylib/examples/base/rui.rb @@ -11,7 +11,7 @@ def build_actions(actions) } else qt_action = $kIcons.make_qt_action(self, a.text_with_accel, a.icon_type) - connect(qt_action, SIGNAL('activated()'), a.rec, a.slot) + connect(qt_action, TQ_SIGNAL('activated()'), a.rec, a.slot) a.included_in.each { |to| qt_action.addTo(to) } diff --git a/qtruby/rubylib/examples/canvastest/canvastest.rb b/qtruby/rubylib/examples/canvastest/canvastest.rb index b695505c..5c07875b 100644 --- a/qtruby/rubylib/examples/canvastest/canvastest.rb +++ b/qtruby/rubylib/examples/canvastest/canvastest.rb @@ -43,11 +43,11 @@ class MyWidget < TQt::MainWindow fileMenu = TQt::PopupMenu.new(self) actions = [ - RAction.new("&New", Icons::FILE_NEW, self, SLOT('new()'), [fileTools, fileMenu]), - RAction.new("&Open...", Icons::FILE_OPEN, self, SLOT('open()'), [fileTools, fileMenu]), - @save = RAction.new("Save &As...", Icons::FILE_SAVE_AS, self, SLOT('save_as()'), [fileTools, fileMenu]), + RAction.new("&New", Icons::FILE_NEW, self, TQ_SLOT('new()'), [fileTools, fileMenu]), + RAction.new("&Open...", Icons::FILE_OPEN, self, TQ_SLOT('open()'), [fileTools, fileMenu]), + @save = RAction.new("Save &As...", Icons::FILE_SAVE_AS, self, TQ_SLOT('save_as()'), [fileTools, fileMenu]), RSeperator.new([fileMenu]), - RAction.new("E&xit", Icons::EXIT, $qApp, SLOT('quit()'), [fileMenu]) + RAction.new("E&xit", Icons::EXIT, $qApp, TQ_SLOT('quit()'), [fileMenu]) ] build_actions(actions) diff --git a/qtruby/rubylib/examples/network/clientserver/client/client.rb b/qtruby/rubylib/examples/network/clientserver/client/client.rb index 1272adf0..85e769cb 100644 --- a/qtruby/rubylib/examples/network/clientserver/client/client.rb +++ b/qtruby/rubylib/examples/network/clientserver/client/client.rb @@ -12,20 +12,20 @@ class Client < TQt::VBox close = TQt::PushButton.new( tr("Close connection") , self ) quit = TQt::PushButton.new( tr("Quit") , self ) - connect( send, SIGNAL('clicked()'), SLOT('sendToServer()') ) - connect( close, SIGNAL('clicked()'), SLOT('closeConnection()') ) - connect( quit, SIGNAL('clicked()'), $qApp, SLOT('quit()') ) + connect( send, TQ_SIGNAL('clicked()'), TQ_SLOT('sendToServer()') ) + connect( close, TQ_SIGNAL('clicked()'), TQ_SLOT('closeConnection()') ) + connect( quit, TQ_SIGNAL('clicked()'), $qApp, TQ_SLOT('quit()') ) # create the socket and connect various of its signals @socket = TQt::Socket.new( self ) - connect( @socket, SIGNAL('connected()'), - SLOT('socketConnected()') ) - connect( @socket, SIGNAL('connectionClosed()'), - SLOT('socketConnectionClosed()') ) - connect( @socket, SIGNAL('readyRead()'), - SLOT('socketReadyRead()') ) - connect( @socket, SIGNAL('error(int)'), - SLOT('socketError(int)') ) + connect( @socket, TQ_SIGNAL('connected()'), + TQ_SLOT('socketConnected()') ) + connect( @socket, TQ_SIGNAL('connectionClosed()'), + TQ_SLOT('socketConnectionClosed()') ) + connect( @socket, TQ_SIGNAL('readyRead()'), + TQ_SLOT('socketReadyRead()') ) + connect( @socket, TQ_SIGNAL('error(int)'), + TQ_SLOT('socketError(int)') ) # connect to the server @infoText.append( tr("Trying to connect to the server\n") ) @@ -41,8 +41,8 @@ class Client < TQt::VBox @socket.close() if @socket.state() == TQt::Socket::Closing # We have a delayed close. - connect( @socket, SIGNAL('delayedCloseFinished()'), - SLOT('socketClosed()') ) + connect( @socket, TQ_SIGNAL('delayedCloseFinished()'), + TQ_SLOT('socketClosed()') ) else # The socket is closed. socketClosed() diff --git a/qtruby/rubylib/examples/network/clientserver/server/server.rb b/qtruby/rubylib/examples/network/clientserver/server/server.rb index 4a53fbf0..2454115f 100644 --- a/qtruby/rubylib/examples/network/clientserver/server/server.rb +++ b/qtruby/rubylib/examples/network/clientserver/server/server.rb @@ -9,10 +9,10 @@ class ClientSocket < TQt::Socket def initialize(sock, parent=nil, name=nil) super( parent, name ) @line = 0 - connect( self, SIGNAL('readyRead()'), - SLOT('readClient()') ) - connect( self, SIGNAL('connectionClosed()'), - SLOT('deleteLater()') ) + connect( self, TQ_SIGNAL('readyRead()'), + TQ_SLOT('readClient()') ) + connect( self, TQ_SIGNAL('connectionClosed()'), + TQ_SLOT('deleteLater()') ) setSocket( sock ) end @@ -84,20 +84,20 @@ class ServerInfo < TQt::VBox # See the comment above about why the 'ClientSocket*' # type cannot be used - connect( @server, SIGNAL('newConnect(TQSocket*)'), - SLOT('newConnect(TQSocket*)') ) - connect( quit, SIGNAL('clicked()'), $qApp, - SLOT('quit()') ) + connect( @server, TQ_SIGNAL('newConnect(TQSocket*)'), + TQ_SLOT('newConnect(TQSocket*)') ) + connect( quit, TQ_SIGNAL('clicked()'), $qApp, + TQ_SLOT('quit()') ) end slots 'newConnect(TQSocket*)', 'connectionClosed()' def newConnect( s ) @infoText.append( tr("New connection\n") ) - connect( s, SIGNAL('logText(const TQString&)'), - @infoText, SLOT('append(const TQString&)') ) - connect( s, SIGNAL('connectionClosed()'), - SLOT('connectionClosed()') ) + connect( s, TQ_SIGNAL('logText(const TQString&)'), + @infoText, TQ_SLOT('append(const TQString&)') ) + connect( s, TQ_SIGNAL('connectionClosed()'), + TQ_SLOT('connectionClosed()') ) end def connectionClosed() diff --git a/qtruby/rubylib/examples/passivepopup/passivepopup.rb b/qtruby/rubylib/examples/passivepopup/passivepopup.rb index 5cc2b4ea..ae3e1374 100644 --- a/qtruby/rubylib/examples/passivepopup/passivepopup.rb +++ b/qtruby/rubylib/examples/passivepopup/passivepopup.rb @@ -19,7 +19,7 @@ class PassiveWindow < TQt::Frame TQt::Label.new(message, self) quit=TQt::PushButton.new(tr("Close"), self) - connect(quit, SIGNAL("clicked()"), SLOT("close()")) + connect(quit, TQ_SIGNAL("clicked()"), TQ_SLOT("close()")) end def show diff --git a/qtruby/rubylib/examples/qt-examples/aclock/aclock.rb b/qtruby/rubylib/examples/qt-examples/aclock/aclock.rb index 618b7d76..0e6a13d0 100644 --- a/qtruby/rubylib/examples/qt-examples/aclock/aclock.rb +++ b/qtruby/rubylib/examples/qt-examples/aclock/aclock.rb @@ -11,7 +11,7 @@ class AnalogClock < TQt::Widget @time = TQt::Time::currentTime @internalTimer = TQt::Timer.new(self) - connect(@internalTimer, SIGNAL('timeout()'), self, SLOT('timeout()')) + connect(@internalTimer, TQ_SIGNAL('timeout()'), self, TQ_SLOT('timeout()')) @internalTimer.start(5000) end 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" ) diff --git a/qtruby/rubylib/examples/qt-examples/checklists/checklists.rb b/qtruby/rubylib/examples/qt-examples/checklists/checklists.rb index 458dc127..9c428c12 100644 --- a/qtruby/rubylib/examples/qt-examples/checklists/checklists.rb +++ b/qtruby/rubylib/examples/qt-examples/checklists/checklists.rb @@ -55,8 +55,8 @@ class CheckLists < TQt::Widget copy1 = TQt::PushButton.new(' -> ', self) tmp.addWidget(copy1) copy1.setMaximumWidth(copy1.sizeHint.width) - # connect the SIGNAL clicked() of the pushbutton with the SLOT copy1to2() - connect(copy1, SIGNAL('clicked()'), self, SLOT('copy1to2()')) + # connect the TQ_SIGNAL clicked() of the pushbutton with the TQ_SLOT copy1to2() + connect(copy1, TQ_SIGNAL('clicked()'), self, TQ_SLOT('copy1to2()')) # another widget for layouting vbox2 = TQt::VBoxLayout.new(lay) @@ -79,8 +79,8 @@ class CheckLists < TQt::Widget copy2 = TQt::PushButton.new(' -> ', self) lay.addWidget( copy2 ) copy2.setMaximumWidth(copy2.sizeHint.width) - # ...and connect its clicked() SIGNAL to the copy2to3() SLOT - connect(copy2, SIGNAL('clicked()'), self, SLOT('copy2to3()')) + # ...and connect its clicked() TQ_SIGNAL to the copy2to3() TQ_SLOT + connect(copy2, TQ_SIGNAL('clicked()'), self, TQ_SLOT('copy2to3()')) tmp = TQt::VBoxLayout.new(lay) tmp.setMargin(5) @@ -90,7 +90,7 @@ class CheckLists < TQt::Widget tmp.addWidget(@label) end - # SLOT copy1to2() + # TQ_SLOT copy1to2() # # Copies all checked ListViewItems from the first ListView to # the second one, and inserts them as Radio-ListViewItem. @@ -121,7 +121,7 @@ class CheckLists < TQt::Widget end - # SLOT copy2to3() + # TQ_SLOT copy2to3() # # Copies the checked item of the second ListView into the # Label at the right. diff --git a/qtruby/rubylib/examples/qt-examples/fonts/simple-qfont-demo/viewer.rb b/qtruby/rubylib/examples/qt-examples/fonts/simple-qfont-demo/viewer.rb index feed96f0..17fb43ef 100644 --- a/qtruby/rubylib/examples/qt-examples/fonts/simple-qfont-demo/viewer.rb +++ b/qtruby/rubylib/examples/qt-examples/fonts/simple-qfont-demo/viewer.rb @@ -27,16 +27,16 @@ class Viewer < TQt::Widget @defaultButton = TQt::PushButton.new('Default', self, 'pushbutton1') @defaultButton.setFont(TQt::Font.new('times')) - connect(@defaultButton, SIGNAL('clicked()'), self, SLOT('setDefault()')) + connect(@defaultButton, TQ_SIGNAL('clicked()'), self, TQ_SLOT('setDefault()')) @sansSerifButton = TQt::PushButton.new('Sans Serif', self, 'pushbutton2') @sansSerifButton.setFont(TQt::Font.new('Helvetica', 12)) - connect(@sansSerifButton, SIGNAL('clicked()'), self, SLOT('setSansSerif()')) + connect(@sansSerifButton, TQ_SIGNAL('clicked()'), self, TQ_SLOT('setSansSerif()')) @italicsButton = TQt::PushButton.new('Italics', self, 'pushbutton1') @italicsButton.setFont(TQt::Font.new('lucida', 12, TQt::Font.Bold, true)) - connect(@italicsButton, SIGNAL('clicked()'), self, SLOT('setItalics()')) + connect(@italicsButton, TQ_SIGNAL('clicked()'), self, TQ_SLOT('setItalics()')) layout end diff --git a/qtruby/rubylib/examples/qt-examples/forever/forever.rb b/qtruby/rubylib/examples/qt-examples/forever/forever.rb index 8cbf9754..1ef42a71 100755 --- a/qtruby/rubylib/examples/qt-examples/forever/forever.rb +++ b/qtruby/rubylib/examples/qt-examples/forever/forever.rb @@ -26,8 +26,8 @@ class Forever < TQt::Widget @rectangles = 0 startTimer( 0 ) # run continuous timer counter = TQt::Timer.new( self ) - connect( counter, SIGNAL("timeout()"), - self, SLOT("updateCaption()") ) + connect( counter, TQ_SIGNAL("timeout()"), + self, TQ_SLOT("updateCaption()") ) counter.start( 1000 ) end diff --git a/qtruby/rubylib/examples/qt-examples/hello/hello.rb b/qtruby/rubylib/examples/qt-examples/hello/hello.rb index ef70154f..4fbb6b69 100644 --- a/qtruby/rubylib/examples/qt-examples/hello/hello.rb +++ b/qtruby/rubylib/examples/qt-examples/hello/hello.rb @@ -13,7 +13,7 @@ class Hello < TQt::Widget @text = text @sin_tbl = [0, 38, 71, 92, 100, 92, 71, 38, 0, -38, -71, -92, -100, -92, -71, -38] timer = TQt::Timer.new(self); - connect(timer, SIGNAL('timeout()'), SLOT('animate()')) + connect(timer, TQ_SIGNAL('timeout()'), TQ_SLOT('animate()')) timer.start(40); resize(260, 130) diff --git a/qtruby/rubylib/examples/qt-examples/hello/main.rb b/qtruby/rubylib/examples/qt-examples/hello/main.rb index 5be3ce68..1b310551 100755 --- a/qtruby/rubylib/examples/qt-examples/hello/main.rb +++ b/qtruby/rubylib/examples/qt-examples/hello/main.rb @@ -14,7 +14,7 @@ end h = Hello.new(s) h.setCaption('QtRuby says hello') -h.connect(h, SIGNAL('clicked()'), a, SLOT('quit()')) +h.connect(h, TQ_SIGNAL('clicked()'), a, TQ_SLOT('quit()')) h.setFont(TQt::Font.new('times', 32, TQt::Font.Bold)) # default font h.setBackgroundColor(TQt::white) # default bg color a.setMainWidget(h) diff --git a/qtruby/rubylib/examples/qt-examples/progress/progress.rb b/qtruby/rubylib/examples/qt-examples/progress/progress.rb index 1ec02614..3b0b11f8 100644 --- a/qtruby/rubylib/examples/qt-examples/progress/progress.rb +++ b/qtruby/rubylib/examples/qt-examples/progress/progress.rb @@ -118,18 +118,18 @@ class CPUWaster < TQt::Widget FIRST_DRAW_ITEM.upto(LAST_DRAW_ITEM) { |i| file.insertItem( "#{drawItemRects(i)} Rectangles", i) } - connect( menubar, SIGNAL('activated(int)'), self, SLOT('doMenuItem(int)') ) + connect( menubar, TQ_SIGNAL('activated(int)'), self, TQ_SLOT('doMenuItem(int)') ) @file.insertSeparator - @file.insertItem("Quit", $qApp, SLOT('quit()')) + @file.insertItem("Quit", $qApp, TQ_SLOT('quit()')) @options = TQt::PopupMenu.new @menubar.insertItem("&Options", options) - @td_id = options.insertItem("Timer driven", self, SLOT('timerDriven()')) - @ld_id = options.insertItem("Loop driven", self, SLOT('loopDriven()')) + @td_id = options.insertItem("Timer driven", self, TQ_SLOT('timerDriven()')) + @ld_id = options.insertItem("Loop driven", self, TQ_SLOT('loopDriven()')) @options.insertSeparator - @dl_id = options.insertItem("Default label", self, SLOT('defaultLabel()')) - @cl_id = options.insertItem("Custom label", self, SLOT('customLabel()')) + @dl_id = options.insertItem("Default label", self, TQ_SLOT('defaultLabel()')) + @cl_id = options.insertItem("Custom label", self, TQ_SLOT('customLabel()')) @options.insertSeparator - @md_id = options.insertItem("No minimum duration", self, SLOT('toggleMinimumDuration()')) + @md_id = options.insertItem("No minimum duration", self, TQ_SLOT('toggleMinimumDuration()')) @options.setCheckable true loopDriven @@ -239,7 +239,7 @@ class CPUWaster < TQt::Widget @rects = n @pb = newProgressDialog("Drawing rectangles.\nUsing timer event.", n, false) @pb.setCaption("Please Wait") - connect(@pb, SIGNAL('cancelled()'), self, SLOT('stopDrawing()')) + connect(@pb, TQ_SIGNAL('cancelled()'), self, TQ_SLOT('stopDrawing()')) enableDrawingItems(false) startTimer(0) @got_stop = false diff --git a/qtruby/rubylib/examples/qt-examples/tictac/tictac.rb b/qtruby/rubylib/examples/qt-examples/tictac/tictac.rb index 1b8bbe35..f16585af 100644 --- a/qtruby/rubylib/examples/qt-examples/tictac/tictac.rb +++ b/qtruby/rubylib/examples/qt-examples/tictac/tictac.rb @@ -48,7 +48,7 @@ class TicTacGameBoard < TQt::Widget ttb = TicTacButton.new(self) ttb.setPalette(p) ttb.setEnabled(false) - connect(ttb, SIGNAL('clicked()'), self, SLOT('buttonClicked()')) + connect(ttb, TQ_SIGNAL('clicked()'), self, TQ_SLOT('buttonClicked()')) grid.addWidget(ttb, i % @nBoard, i / @nBoard) @buttons[i] = ttb @btArray[i] = TicTacButton::Blank @@ -262,7 +262,7 @@ class TicTacToe < TQt::Widget # Create the game board and connect the signal finished() # to this/self gameOver() slot @board = TicTacGameBoard.new(boardSize, self) - connect(@board, SIGNAL('finished()'), self, SLOT('gameOver()')); + connect(@board, TQ_SIGNAL('finished()'), self, TQ_SLOT('gameOver()')); l.addWidget(@board) # Create a horizontal frame line @@ -279,9 +279,9 @@ class TicTacToe < TQt::Widget # Create the push buttons and connect their signals to the right slots @newGame = TQt::PushButton.new('Play!', self) - connect(@newGame, SIGNAL('clicked()'), self, SLOT('newGameClicked()')) + connect(@newGame, TQ_SIGNAL('clicked()'), self, TQ_SLOT('newGameClicked()')) @quit = TQt::PushButton.new('Quit', self) - connect(@quit, SIGNAL('clicked()'), $qApp, SLOT('quit()')) + connect(@quit, TQ_SIGNAL('clicked()'), $qApp, TQ_SLOT('quit()')) b = TQt::HBoxLayout.new l.addLayout(b) b.addWidget(@newGame) diff --git a/qtruby/rubylib/examples/qtscribble/scribble.rb b/qtruby/rubylib/examples/qtscribble/scribble.rb index 0ba2a4b4..a2ce927b 100644 --- a/qtruby/rubylib/examples/qtscribble/scribble.rb +++ b/qtruby/rubylib/examples/qtscribble/scribble.rb @@ -26,7 +26,7 @@ require 'Qt' # create a pop-up menu @_popupmenu = TQt::PopupMenu.new() - @_popupmenu.insertItem( "&Clear", self, SLOT( "slotClearArea()" ) ) + @_popupmenu.insertItem( "&Clear", self, TQ_SLOT( "slotClearArea()" ) ) end # @@ -159,10 +159,10 @@ class ScribbleWindow < TQt::Widget # The next lines build the menu bar. We first create the menus # one by one, then add them to the menu bar. # @_filemenu = TQt::PopupMenu.new() # create a file menu - @_filemenu.insertItem( "&Load", self, SLOT( "slotLoad()" ) ) - @_filemenu.insertItem( "&Save", self, SLOT( "slotSave()" ) ) + @_filemenu.insertItem( "&Load", self, TQ_SLOT( "slotLoad()" ) ) + @_filemenu.insertItem( "&Save", self, TQ_SLOT( "slotSave()" ) ) @_filemenu.insertSeparator() - @_filemenu.insertItem( "&Quit", $qApp, SLOT( "quit()" ) ) + @_filemenu.insertItem( "&Quit", $qApp, TQ_SLOT( "quit()" ) ) @_colormenu = TQt::PopupMenu.new() # create a color menu @_colormenu.insertItem( "B&lack", COLOR_MENU_ID_BLACK) @@ -170,12 +170,12 @@ class ScribbleWindow < TQt::Widget @_colormenu.insertItem( "&Blue", COLOR_MENU_ID_BLUE) @_colormenu.insertItem( "&Green", COLOR_MENU_ID_GREEN) @_colormenu.insertItem( "&Yellow", COLOR_MENU_ID_YELLOW) - TQt::Object.connect( @_colormenu, SIGNAL( "activated( int )" ), - self, SLOT( "slotColorMenu( int )" ) ) + TQt::Object.connect( @_colormenu, TQ_SIGNAL( "activated( int )" ), + self, TQ_SLOT( "slotColorMenu( int )" ) ) @_helpmenu = TQt::PopupMenu.new() # create a help menu - @_helpmenu.insertItem( "&About QtScribble", self, SLOT( "slotAbout()" ) ) - @_helpmenu.insertItem( "&About Qt", self, SLOT( "slotAboutQt()" ) ) + @_helpmenu.insertItem( "&About QtScribble", self, TQ_SLOT( "slotAbout()" ) ) + @_helpmenu.insertItem( "&About Qt", self, TQ_SLOT( "slotAboutQt()" ) ) @_menubar = TQt::MenuBar.new( self, "" ) # create a menu bar @_menubar.insertItem( "&File", @_filemenu ) @@ -190,12 +190,12 @@ class ScribbleWindow < TQt::Widget @_scribblearea = ScribbleArea.new() @_scribblearea.setGeometry( 0, 0, 1000, 1000 ) @_scrollview.addChild( @_scribblearea ) - TQt::Object.connect( self, SIGNAL( "colorChanged(TQColor)" ), - @_scribblearea, SLOT( "setColor(TQColor)" ) ) - TQt::Object.connect( self, SIGNAL( "save(const TQString&)" ), - @_scribblearea, SLOT( "slotSave(const TQString&)" ) ) - TQt::Object.connect( self, SIGNAL( "load(const TQString&)" ), - @_scribblearea, SLOT( "slotLoad(const TQString&)" ) ) + TQt::Object.connect( self, TQ_SIGNAL( "colorChanged(TQColor)" ), + @_scribblearea, TQ_SLOT( "setColor(TQColor)" ) ) + TQt::Object.connect( self, TQ_SIGNAL( "save(const TQString&)" ), + @_scribblearea, TQ_SLOT( "slotSave(const TQString&)" ) ) + TQt::Object.connect( self, TQ_SIGNAL( "load(const TQString&)" ), + @_scribblearea, TQ_SLOT( "slotLoad(const TQString&)" ) ) end def resizeEvent( event ) diff --git a/qtruby/rubylib/examples/ruboids/ruboids/CameraDialog.rb b/qtruby/rubylib/examples/ruboids/ruboids/CameraDialog.rb index 623abe4b..6ac04192 100644 --- a/qtruby/rubylib/examples/ruboids/ruboids/CameraDialog.rb +++ b/qtruby/rubylib/examples/ruboids/ruboids/CameraDialog.rb @@ -96,14 +96,14 @@ class CameraDialog < TQt::Dialog # The Close button button = TQt::PushButton.new('Close', self, 'Dialog Close') - connect(button, SIGNAL('clicked()'), self, SLOT('close()')) + connect(button, TQ_SIGNAL('clicked()'), self, TQ_SLOT('close()')) button.setDefault(true) button.setFixedSize(button.sizeHint()) buttonLayout.addWidget(button) # The Close button button = TQt::PushButton.new('Reset', self, 'Dialog Reset') - connect(button, SIGNAL('clicked()'), self, SLOT('slotReset()')) + connect(button, TQ_SIGNAL('clicked()'), self, TQ_SLOT('slotReset()')) button.setFixedSize(button.sizeHint()) buttonLayout.addWidget(button) @@ -133,7 +133,7 @@ class CameraDialog < TQt::Dialog layout.addWidget(slider, row, 1) # Connection from slider signal to our slot - connect(slider, SIGNAL('valueChanged(int)'), self, SLOT(slot)) + connect(slider, TQ_SIGNAL('valueChanged(int)'), self, TQ_SLOT(slot)) # Number display num = TQt::Label.new('XXXXX', box) diff --git a/qtruby/rubylib/examples/ruboids/ruboids/World.rb b/qtruby/rubylib/examples/ruboids/ruboids/World.rb index 4bd56d88..6c6e8e34 100644 --- a/qtruby/rubylib/examples/ruboids/ruboids/World.rb +++ b/qtruby/rubylib/examples/ruboids/ruboids/World.rb @@ -51,7 +51,7 @@ class World < TQt::Object } @clock = TQt::Timer.new() - connect(@clock, SIGNAL('timeout()'), self, SLOT('slotMove()')) + connect(@clock, TQ_SIGNAL('timeout()'), self, TQ_SLOT('slotMove()')) @camera = Camera.new # Reads values from params setupTranslation() diff --git a/qtruby/rubylib/examples/ruboids/ruboids/WorldWindow.rb b/qtruby/rubylib/examples/ruboids/ruboids/WorldWindow.rb index 56459729..4ce389be 100644 --- a/qtruby/rubylib/examples/ruboids/ruboids/WorldWindow.rb +++ b/qtruby/rubylib/examples/ruboids/ruboids/WorldWindow.rb @@ -31,7 +31,7 @@ class WorldWindow < TQt::MainWindow # Create and populate file menu menu = TQt::PopupMenu.new(self) - menu.insertItem("Exit", $qApp, SLOT("quit()"), TQt::KeySequence.new(CTRL+Key_Q)) + menu.insertItem("Exit", $qApp, TQ_SLOT("quit()"), TQt::KeySequence.new(CTRL+Key_Q)) # Add file menu to menu bar menuBar.insertItem("&File", menu) @@ -42,7 +42,7 @@ class WorldWindow < TQt::MainWindow # Add options menu to menu bar and link it to method below menuBar.insertItem("&Options", menu) - connect(menu, SIGNAL("activated(int)"), self, SLOT('slotMenuActivated(int)')) + connect(menu, TQ_SIGNAL("activated(int)"), self, TQ_SLOT('slotMenuActivated(int)')) end diff --git a/qtruby/rubylib/examples/testcases/bugs.rb b/qtruby/rubylib/examples/testcases/bugs.rb index 92bb8e80..215aea19 100644 --- a/qtruby/rubylib/examples/testcases/bugs.rb +++ b/qtruby/rubylib/examples/testcases/bugs.rb @@ -21,7 +21,7 @@ def bug3 @file.insertSeparator TQt::debug_level = TQt::DebugLevel::High p $qApp - @file.insertItem("Quit", $qApp, SLOT('quit()')) + @file.insertItem("Quit", $qApp, TQ_SLOT('quit()')) @file.exec end #bug3 diff --git a/qtruby/rubylib/examples/textedit/textedit.rb b/qtruby/rubylib/examples/textedit/textedit.rb index 1f80cb7a..bb67fed7 100644 --- a/qtruby/rubylib/examples/textedit/textedit.rb +++ b/qtruby/rubylib/examples/textedit/textedit.rb @@ -40,7 +40,7 @@ class MyTextEditor < TQt::TextEdit end def createPopupMenu(pos) # virtual pm = TQt::PopupMenu.new - pm.insertItem("Insert Image!", self, SLOT('insert_icon()')) + pm.insertItem("Insert Image!", self, TQ_SLOT('insert_icon()')) pm end def has_metadata @@ -111,18 +111,18 @@ class MyWidget < TQt::MainWindow def initialize() super @editor = MyTextEditor.new(self) - connect(@editor, SIGNAL('textChanged()'), self, SLOT('text_changed()')) - connect(@editor, SIGNAL('saved()'), self, SLOT('saved()')) + connect(@editor, TQ_SIGNAL('textChanged()'), self, TQ_SLOT('text_changed()')) + connect(@editor, TQ_SIGNAL('saved()'), self, TQ_SLOT('saved()')) fileTools = TQt::ToolBar.new(self, "file operations") fileMenu = TQt::PopupMenu.new(self) actions = [ - RAction.new("&New", Icons::FILE_NEW, @editor, SLOT('new()'), [fileTools, fileMenu]), - RAction.new("&Open...", Icons::FILE_OPEN, @editor, SLOT('open()'), [fileTools, fileMenu]), - @save = RAction.new("Save &As...", Icons::FILE_SAVE_AS, @editor, SLOT('save_as()'), [fileTools, fileMenu]), + RAction.new("&New", Icons::FILE_NEW, @editor, TQ_SLOT('new()'), [fileTools, fileMenu]), + RAction.new("&Open...", Icons::FILE_OPEN, @editor, TQ_SLOT('open()'), [fileTools, fileMenu]), + @save = RAction.new("Save &As...", Icons::FILE_SAVE_AS, @editor, TQ_SLOT('save_as()'), [fileTools, fileMenu]), RSeperator.new([fileMenu]), - RAction.new("E&xit", Icons::EXIT, $qApp, SLOT('quit()'), [fileMenu]) + RAction.new("E&xit", Icons::EXIT, $qApp, TQ_SLOT('quit()'), [fileMenu]) ] build_actions(actions) diff --git a/qtruby/rubylib/qtruby/lib/Qt/qtruby.rb b/qtruby/rubylib/qtruby/lib/Qt/qtruby.rb index 4197e9f6..bbbb92e3 100644 --- a/qtruby/rubylib/qtruby/lib/Qt/qtruby.rb +++ b/qtruby/rubylib/qtruby/lib/Qt/qtruby.rb @@ -277,13 +277,13 @@ module TQt def inspect str = super str.sub(/>$/, " memberName=%s, memberType=%s, object=%s>" % - [memberName.inspect, memberType == 1 ? "SLOT" : "SIGNAL", object.inspect] ) + [memberName.inspect, memberType == 1 ? "TQ_SLOT" : "TQ_SIGNAL", object.inspect] ) end def pretty_print(pp) str = to_s pp.text str.sub(/>$/, "\n memberName=%s,\n memberType=%s,\n object=%s>" % - [memberName.inspect, memberType == 1 ? "SLOT" : "SIGNAL", object.inspect] ) + [memberName.inspect, memberType == 1 ? "TQ_SLOT" : "TQ_SIGNAL", object.inspect] ) end end @@ -1758,7 +1758,7 @@ module TQt return TQt::Object.connect( src, signal, TQt::BlockInvocation.new(target, block, signature), - SLOT("invoke(#{signature})") ) + TQ_SLOT("invoke(#{signature})") ) end def Internal.signal_connect(src, signal, block) @@ -1766,7 +1766,7 @@ module TQt return TQt::Object.connect( src, signal, TQt::SignalBlockInvocation.new(src, block, signature), - SLOT("invoke(#{signature})") ) + TQ_SLOT("invoke(#{signature})") ) end end # TQt::Internal @@ -1878,7 +1878,7 @@ module TQt end # Qt class Object - def SIGNAL(signal) + def TQ_SIGNAL(signal) if signal.kind_of? Symbol return "2" + signal.to_s + "()" else @@ -1886,7 +1886,7 @@ class Object end end - def SLOT(slot) + def TQ_SLOT(slot) if slot.kind_of? Symbol return "1" + slot.to_s + "()" else diff --git a/qtruby/rubylib/tutorial/t10/lcdrange.rb b/qtruby/rubylib/tutorial/t10/lcdrange.rb index 85ed3c0b..98e80fbd 100644 --- a/qtruby/rubylib/tutorial/t10/lcdrange.rb +++ b/qtruby/rubylib/tutorial/t10/lcdrange.rb @@ -10,8 +10,8 @@ class LCDRange < TQt::VBox @slider = TQt::Slider.new(TQt::VBox::Horizontal, self, 'slider') @slider.setRange(0, 99) @slider.setValue(0) - connect(@slider, SIGNAL('valueChanged(int)'), lcd, SLOT('display(int)')) - connect(@slider, SIGNAL('valueChanged(int)'), SIGNAL('valueChanged(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), lcd, TQ_SLOT('display(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), TQ_SIGNAL('valueChanged(int)')) setFocusProxy(@slider) end diff --git a/qtruby/rubylib/tutorial/t10/t10.rb b/qtruby/rubylib/tutorial/t10/t10.rb index b86c9e1b..99b0cd96 100755 --- a/qtruby/rubylib/tutorial/t10/t10.rb +++ b/qtruby/rubylib/tutorial/t10/t10.rb @@ -11,7 +11,7 @@ class MyWidget < TQt::Widget quit = TQt::PushButton.new('Quit', self, 'quit') quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold)) - connect(quit, SIGNAL('clicked()'), $qApp, SLOT('quit()')) + connect(quit, TQ_SIGNAL('clicked()'), $qApp, TQ_SLOT('quit()')) angle = LCDRange.new( self, 'angle' ) angle.setRange( 5, 70 ) @@ -21,15 +21,15 @@ class MyWidget < TQt::Widget cannonField = CannonField.new( self, 'cannonField' ) - connect( angle, SIGNAL('valueChanged(int)'), - cannonField, SLOT('setAngle(int)') ) - connect( cannonField, SIGNAL('angleChanged(int)'), - angle, SLOT('setValue(int)') ) + connect( angle, TQ_SIGNAL('valueChanged(int)'), + cannonField, TQ_SLOT('setAngle(int)') ) + connect( cannonField, TQ_SIGNAL('angleChanged(int)'), + angle, TQ_SLOT('setValue(int)') ) - connect( force, SIGNAL('valueChanged(int)'), - cannonField, SLOT('setForce(int)') ) - connect( cannonField, SIGNAL('forceChanged(int)'), - force, SLOT('setValue(int)') ) + connect( force, TQ_SIGNAL('valueChanged(int)'), + cannonField, TQ_SLOT('setForce(int)') ) + connect( cannonField, TQ_SIGNAL('forceChanged(int)'), + force, TQ_SLOT('setValue(int)') ) grid = TQt::GridLayout.new( self, 2, 2, 10 ) grid.addWidget( quit, 0, 0 ) diff --git a/qtruby/rubylib/tutorial/t11/cannon.rb b/qtruby/rubylib/tutorial/t11/cannon.rb index 89a2ca24..8429159b 100644 --- a/qtruby/rubylib/tutorial/t11/cannon.rb +++ b/qtruby/rubylib/tutorial/t11/cannon.rb @@ -12,8 +12,8 @@ class CannonField < TQt::Widget @f = 0 @timerCount = 0; @autoShootTimer = TQt::Timer.new( self, 'movement handler' ) - connect( @autoShootTimer, SIGNAL('timeout()'), - self, SLOT('moveShot()') ); + connect( @autoShootTimer, TQ_SIGNAL('timeout()'), + self, TQ_SLOT('moveShot()') ); @shoot_ang = 0 @shoot_f = 0 setPalette( TQt::Palette.new( TQt::Color.new( 250, 250, 200) ) ) diff --git a/qtruby/rubylib/tutorial/t11/lcdrange.rb b/qtruby/rubylib/tutorial/t11/lcdrange.rb index 85ed3c0b..98e80fbd 100644 --- a/qtruby/rubylib/tutorial/t11/lcdrange.rb +++ b/qtruby/rubylib/tutorial/t11/lcdrange.rb @@ -10,8 +10,8 @@ class LCDRange < TQt::VBox @slider = TQt::Slider.new(TQt::VBox::Horizontal, self, 'slider') @slider.setRange(0, 99) @slider.setValue(0) - connect(@slider, SIGNAL('valueChanged(int)'), lcd, SLOT('display(int)')) - connect(@slider, SIGNAL('valueChanged(int)'), SIGNAL('valueChanged(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), lcd, TQ_SLOT('display(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), TQ_SIGNAL('valueChanged(int)')) setFocusProxy(@slider) end diff --git a/qtruby/rubylib/tutorial/t11/t11.rb b/qtruby/rubylib/tutorial/t11/t11.rb index 4b400026..d7ed74c9 100755 --- a/qtruby/rubylib/tutorial/t11/t11.rb +++ b/qtruby/rubylib/tutorial/t11/t11.rb @@ -11,7 +11,7 @@ class MyWidget < TQt::Widget quit = TQt::PushButton.new('Quit', self, 'quit') quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold)) - connect(quit, SIGNAL('clicked()'), $qApp, SLOT('quit()')) + connect(quit, TQ_SIGNAL('clicked()'), $qApp, TQ_SLOT('quit()')) angle = LCDRange.new( self, 'angle' ) angle.setRange( 5, 70 ) @@ -21,20 +21,20 @@ class MyWidget < TQt::Widget cannonField = CannonField.new( self, 'cannonField' ) - connect( angle, SIGNAL('valueChanged(int)'), - cannonField, SLOT('setAngle(int)') ) - connect( cannonField, SIGNAL('angleChanged(int)'), - angle, SLOT('setValue(int)') ) + connect( angle, TQ_SIGNAL('valueChanged(int)'), + cannonField, TQ_SLOT('setAngle(int)') ) + connect( cannonField, TQ_SIGNAL('angleChanged(int)'), + angle, TQ_SLOT('setValue(int)') ) - connect( force, SIGNAL('valueChanged(int)'), - cannonField, SLOT('setForce(int)') ) - connect( cannonField, SIGNAL('forceChanged(int)'), - force, SLOT('setValue(int)') ) + connect( force, TQ_SIGNAL('valueChanged(int)'), + cannonField, TQ_SLOT('setForce(int)') ) + connect( cannonField, TQ_SIGNAL('forceChanged(int)'), + force, TQ_SLOT('setValue(int)') ) shoot = TQt::PushButton.new( '&Shoot', self, 'shoot' ) shoot.setFont( TQt::Font.new( 'Times', 18, TQt::Font::Bold ) ) - connect( shoot, SIGNAL('clicked()'), cannonField, SLOT('shoot()') ) + connect( shoot, TQ_SIGNAL('clicked()'), cannonField, TQ_SLOT('shoot()') ) grid = TQt::GridLayout.new( self, 2, 2, 10 ) grid.addWidget( quit, 0, 0 ) diff --git a/qtruby/rubylib/tutorial/t12/cannon.rb b/qtruby/rubylib/tutorial/t12/cannon.rb index 0d17f880..c4c35432 100644 --- a/qtruby/rubylib/tutorial/t12/cannon.rb +++ b/qtruby/rubylib/tutorial/t12/cannon.rb @@ -12,8 +12,8 @@ class CannonField < TQt::Widget @f = 0 @timerCount = 0; @autoShootTimer = TQt::Timer.new( self, 'movement handler' ) - connect( @autoShootTimer, SIGNAL('timeout()'), - self, SLOT('moveShot()') ); + connect( @autoShootTimer, TQ_SIGNAL('timeout()'), + self, TQ_SLOT('moveShot()') ); @shoot_ang = 0 @shoot_f = 0 @target = TQt::Point.new(0, 0) diff --git a/qtruby/rubylib/tutorial/t12/lcdrange.rb b/qtruby/rubylib/tutorial/t12/lcdrange.rb index 54654165..77b81384 100644 --- a/qtruby/rubylib/tutorial/t12/lcdrange.rb +++ b/qtruby/rubylib/tutorial/t12/lcdrange.rb @@ -17,8 +17,8 @@ class LCDRange < TQt::VBox @slider.setValue(0) @label = TQt::Label.new( ' ', self, 'label' ) @label.setAlignment( TQt::AlignCenter ) - connect(@slider, SIGNAL('valueChanged(int)'), lcd, SLOT('display(int)')) - connect(@slider, SIGNAL('valueChanged(int)'), SIGNAL('valueChanged(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), lcd, TQ_SLOT('display(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), TQ_SIGNAL('valueChanged(int)')) setFocusProxy(@slider) end diff --git a/qtruby/rubylib/tutorial/t12/t12.rb b/qtruby/rubylib/tutorial/t12/t12.rb index 47f81f3b..c836b750 100755 --- a/qtruby/rubylib/tutorial/t12/t12.rb +++ b/qtruby/rubylib/tutorial/t12/t12.rb @@ -12,7 +12,7 @@ class MyWidget < TQt::Widget quit = TQt::PushButton.new('&Quit', self, 'quit') quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold)) - connect(quit, SIGNAL('clicked()'), $qApp, SLOT('quit()')) + connect(quit, TQ_SIGNAL('clicked()'), $qApp, TQ_SLOT('quit()')) angle = LCDRange.new( 'ANGLE', self, 'angle' ) angle.setRange( 5, 70 ) @@ -22,20 +22,20 @@ class MyWidget < TQt::Widget cannonField = CannonField.new( self, 'cannonField' ) - connect( angle, SIGNAL('valueChanged(int)'), - cannonField, SLOT('setAngle(int)') ) - connect( cannonField, SIGNAL('angleChanged(int)'), - angle, SLOT('setValue(int)') ) + connect( angle, TQ_SIGNAL('valueChanged(int)'), + cannonField, TQ_SLOT('setAngle(int)') ) + connect( cannonField, TQ_SIGNAL('angleChanged(int)'), + angle, TQ_SLOT('setValue(int)') ) - connect( force, SIGNAL('valueChanged(int)'), - cannonField, SLOT('setForce(int)') ) - connect( cannonField, SIGNAL('forceChanged(int)'), - force, SLOT('setValue(int)') ) + connect( force, TQ_SIGNAL('valueChanged(int)'), + cannonField, TQ_SLOT('setForce(int)') ) + connect( cannonField, TQ_SIGNAL('forceChanged(int)'), + force, TQ_SLOT('setValue(int)') ) shoot = TQt::PushButton.new( '&Shoot', self, 'shoot' ) shoot.setFont( TQt::Font.new( 'Times', 18, TQt::Font::Bold ) ) - connect( shoot, SIGNAL('clicked()'), cannonField, SLOT('shoot()') ) + connect( shoot, TQ_SIGNAL('clicked()'), cannonField, TQ_SLOT('shoot()') ) grid = TQt::GridLayout.new( self, 2, 2, 10 ) grid.addWidget( quit, 0, 0 ) diff --git a/qtruby/rubylib/tutorial/t13/cannon.rb b/qtruby/rubylib/tutorial/t13/cannon.rb index 315760f0..75b637f9 100644 --- a/qtruby/rubylib/tutorial/t13/cannon.rb +++ b/qtruby/rubylib/tutorial/t13/cannon.rb @@ -16,8 +16,8 @@ class CannonField < TQt::Widget @f = 0 @timerCount = 0; @autoShootTimer = TQt::Timer.new( self, "movement handler" ) - connect( @autoShootTimer, SIGNAL('timeout()'), - self, SLOT('moveShot()') ); + connect( @autoShootTimer, TQ_SIGNAL('timeout()'), + self, TQ_SLOT('moveShot()') ); @shoot_ang = 0 @shoot_f = 0 @target = TQt::Point.new(0, 0) diff --git a/qtruby/rubylib/tutorial/t13/gamebrd.rb b/qtruby/rubylib/tutorial/t13/gamebrd.rb index 938dfd49..9a2f475a 100644 --- a/qtruby/rubylib/tutorial/t13/gamebrd.rb +++ b/qtruby/rubylib/tutorial/t13/gamebrd.rb @@ -11,7 +11,7 @@ class GameBoard < TQt::Widget quit = TQt::PushButton.new('&Quit', self, 'quit') quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold)) - connect(quit, SIGNAL('clicked()'), $qApp, SLOT('quit()')) + connect(quit, TQ_SIGNAL('clicked()'), $qApp, TQ_SLOT('quit()')) angle = LCDRange.new( 'ANGLE', self, 'angle' ) angle.setRange( 5, 70 ) @@ -21,32 +21,32 @@ class GameBoard < TQt::Widget @cannonField = CannonField.new( self, 'cannonField' ) - connect( angle, SIGNAL('valueChanged(int)'), - @cannonField, SLOT('setAngle(int)') ) - connect( @cannonField, SIGNAL('angleChanged(int)'), - angle, SLOT('setValue(int)') ) + connect( angle, TQ_SIGNAL('valueChanged(int)'), + @cannonField, TQ_SLOT('setAngle(int)') ) + connect( @cannonField, TQ_SIGNAL('angleChanged(int)'), + angle, TQ_SLOT('setValue(int)') ) - connect( force, SIGNAL('valueChanged(int)'), - @cannonField, SLOT('setForce(int)') ) - connect( @cannonField, SIGNAL('forceChanged(int)'), - force, SLOT('setValue(int)') ) + connect( force, TQ_SIGNAL('valueChanged(int)'), + @cannonField, TQ_SLOT('setForce(int)') ) + connect( @cannonField, TQ_SIGNAL('forceChanged(int)'), + force, TQ_SLOT('setValue(int)') ) - connect( @cannonField, SIGNAL('hit()'), - self, SLOT('hit()') ) - connect( @cannonField, SIGNAL('missed()'), - self, SLOT('missed()') ) + connect( @cannonField, TQ_SIGNAL('hit()'), + self, TQ_SLOT('hit()') ) + connect( @cannonField, TQ_SIGNAL('missed()'), + self, TQ_SLOT('missed()') ) shoot = TQt::PushButton.new( '&Shoot', self, 'shoot' ) shoot.setFont( TQt::Font.new( 'Times', 18, TQt::Font::Bold ) ) - connect( shoot, SIGNAL('clicked()'), SLOT('fire()') ) - connect( @cannonField, SIGNAL('canShoot(bool)'), - shoot, SLOT('setEnabled(bool)') ) + connect( shoot, TQ_SIGNAL('clicked()'), TQ_SLOT('fire()') ) + connect( @cannonField, TQ_SIGNAL('canShoot(bool)'), + shoot, TQ_SLOT('setEnabled(bool)') ) restart = TQt::PushButton.new( '&New Game', self, 'newgame' ) restart.setFont( TQt::Font.new( 'Times', 18, TQt::Font::Bold ) ) - connect( restart, SIGNAL('clicked()'), self, SLOT('newGame()') ) + connect( restart, TQ_SIGNAL('clicked()'), self, TQ_SLOT('newGame()') ) @hits = TQt::LCDNumber.new( 2, self, 'hits' ) @shotsLeft = TQt::LCDNumber.new( 2, self, 'shotsleft' ) diff --git a/qtruby/rubylib/tutorial/t13/lcdrange.rb b/qtruby/rubylib/tutorial/t13/lcdrange.rb index 39eb9b1d..50f9a6fb 100644 --- a/qtruby/rubylib/tutorial/t13/lcdrange.rb +++ b/qtruby/rubylib/tutorial/t13/lcdrange.rb @@ -19,8 +19,8 @@ class LCDRange < TQt::Widget @label = TQt::Label.new( ' ', self, 'label' ) @label.setAlignment( TQt::AlignCenter ) - connect(@slider, SIGNAL('valueChanged(int)'), @lcd, SLOT('display(int)')) - connect(@slider, SIGNAL('valueChanged(int)'), SIGNAL('valueChanged(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), @lcd, TQ_SLOT('display(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), TQ_SIGNAL('valueChanged(int)')) setFocusProxy(@slider) diff --git a/qtruby/rubylib/tutorial/t14/cannon.rb b/qtruby/rubylib/tutorial/t14/cannon.rb index c2147714..33d0478d 100644 --- a/qtruby/rubylib/tutorial/t14/cannon.rb +++ b/qtruby/rubylib/tutorial/t14/cannon.rb @@ -15,8 +15,8 @@ class CannonField < TQt::Widget @f = 0 @timerCount = 0; @autoShootTimer = TQt::Timer.new( self, 'movement handler' ) - connect( @autoShootTimer, SIGNAL('timeout()'), - self, SLOT('moveShot()') ) + connect( @autoShootTimer, TQ_SIGNAL('timeout()'), + self, TQ_SLOT('moveShot()') ) @shoot_ang = 0 @shoot_f = 0 @target = TQt::Point.new(0, 0) diff --git a/qtruby/rubylib/tutorial/t14/gamebrd.rb b/qtruby/rubylib/tutorial/t14/gamebrd.rb index 27c403b0..e8ed3096 100644 --- a/qtruby/rubylib/tutorial/t14/gamebrd.rb +++ b/qtruby/rubylib/tutorial/t14/gamebrd.rb @@ -10,7 +10,7 @@ class GameBoard < TQt::Widget quit = TQt::PushButton.new('&Quit', self, 'quit') quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold)) - connect(quit, SIGNAL('clicked()'), $qApp, SLOT('quit()')) + connect(quit, TQ_SIGNAL('clicked()'), $qApp, TQ_SLOT('quit()')) angle = LCDRange.new( 'ANGLE', self, 'angle' ) angle.setRange( 5, 70 ) @@ -22,32 +22,32 @@ class GameBoard < TQt::Widget box.setFrameStyle( TQt::Frame::WinPanel | TQt::Frame::Sunken ) @cannonField = CannonField.new( box, 'cannonField' ) - connect( angle, SIGNAL('valueChanged(int)'), - @cannonField, SLOT('setAngle(int)') ) - connect( @cannonField, SIGNAL('angleChanged(int)'), - angle, SLOT('setValue(int)') ) + connect( angle, TQ_SIGNAL('valueChanged(int)'), + @cannonField, TQ_SLOT('setAngle(int)') ) + connect( @cannonField, TQ_SIGNAL('angleChanged(int)'), + angle, TQ_SLOT('setValue(int)') ) - connect( force, SIGNAL('valueChanged(int)'), - @cannonField, SLOT('setForce(int)') ) - connect( @cannonField, SIGNAL('forceChanged(int)'), - force, SLOT('setValue(int)') ) + connect( force, TQ_SIGNAL('valueChanged(int)'), + @cannonField, TQ_SLOT('setForce(int)') ) + connect( @cannonField, TQ_SIGNAL('forceChanged(int)'), + force, TQ_SLOT('setValue(int)') ) - connect( @cannonField, SIGNAL('hit()'), - self, SLOT('hit()') ) - connect( @cannonField, SIGNAL('missed()'), - self, SLOT('missed()') ) + connect( @cannonField, TQ_SIGNAL('hit()'), + self, TQ_SLOT('hit()') ) + connect( @cannonField, TQ_SIGNAL('missed()'), + self, TQ_SLOT('missed()') ) shoot = TQt::PushButton.new( '&Shoot', self, 'shoot' ) shoot.setFont( TQt::Font.new( 'Times', 18, TQt::Font::Bold ) ) - connect( shoot, SIGNAL('clicked()'), SLOT('fire()') ) - connect( @cannonField, SIGNAL('canShoot(bool)'), - shoot, SLOT('setEnabled(bool)') ) + connect( shoot, TQ_SIGNAL('clicked()'), TQ_SLOT('fire()') ) + connect( @cannonField, TQ_SIGNAL('canShoot(bool)'), + shoot, TQ_SLOT('setEnabled(bool)') ) restart = TQt::PushButton.new( '&New Game', self, 'newgame' ) restart.setFont( TQt::Font.new( 'Times', 18, TQt::Font::Bold ) ) - connect( restart, SIGNAL('clicked()'), self, SLOT('newGame()') ) + connect( restart, TQ_SIGNAL('clicked()'), self, TQ_SLOT('newGame()') ) @hits = TQt::LCDNumber.new( 2, self, 'hits' ) @shotsLeft = TQt::LCDNumber.new( 2, self, 'shotsleft' ) @@ -56,11 +56,11 @@ class GameBoard < TQt::Widget accel = TQt::Accel.new( self ) accel.connectItem( accel.insertItem( TQt::KeySequence.new(Key_Enter) ), - self, SLOT('fire()') ) + self, TQ_SLOT('fire()') ) accel.connectItem( accel.insertItem( TQt::KeySequence.new(Key_Return) ), - self, SLOT('fire()') ) + self, TQ_SLOT('fire()') ) accel.connectItem( accel.insertItem( TQt::KeySequence.new(CTRL+Key_Q) ), - $qApp, SLOT('quit()') ) + $qApp, TQ_SLOT('quit()') ) grid = TQt::GridLayout.new( self, 2, 2, 10 ) grid.addWidget( quit, 0, 0 ) diff --git a/qtruby/rubylib/tutorial/t14/lcdrange.rb b/qtruby/rubylib/tutorial/t14/lcdrange.rb index 9cb54b39..e0817103 100644 --- a/qtruby/rubylib/tutorial/t14/lcdrange.rb +++ b/qtruby/rubylib/tutorial/t14/lcdrange.rb @@ -19,8 +19,8 @@ class LCDRange < TQt::Widget @label = TQt::Label.new( ' ', self, 'label' ) @label.setAlignment( TQt::AlignCenter ) - connect(@slider, SIGNAL('valueChanged(int)'), @lcd, SLOT('display(int)')) - connect(@slider, SIGNAL('valueChanged(int)'), SIGNAL('valueChanged(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), @lcd, TQ_SLOT('display(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), TQ_SIGNAL('valueChanged(int)')) setFocusProxy(@slider) diff --git a/qtruby/rubylib/tutorial/t2/t2.rb b/qtruby/rubylib/tutorial/t2/t2.rb index b5e62bca..813eb78f 100755 --- a/qtruby/rubylib/tutorial/t2/t2.rb +++ b/qtruby/rubylib/tutorial/t2/t2.rb @@ -9,7 +9,7 @@ quit = TQt::PushButton.new('Quit', nil) quit.resize(75, 30) quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold)) -TQt::Object.connect(quit, SIGNAL('clicked()'), a, SLOT('quit()')) +TQt::Object.connect(quit, TQ_SIGNAL('clicked()'), a, TQ_SLOT('quit()')) a.setMainWidget(quit) quit.show diff --git a/qtruby/rubylib/tutorial/t3/t3.rb b/qtruby/rubylib/tutorial/t3/t3.rb index 9a6b32d2..2c1d6b76 100755 --- a/qtruby/rubylib/tutorial/t3/t3.rb +++ b/qtruby/rubylib/tutorial/t3/t3.rb @@ -11,7 +11,7 @@ box.resize(200, 120) quit = TQt::PushButton.new('Quit', box) quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold)) -a.connect(quit, SIGNAL('clicked()'), SLOT('quit()')) +a.connect(quit, TQ_SIGNAL('clicked()'), TQ_SLOT('quit()')) a.setMainWidget(box) box.show diff --git a/qtruby/rubylib/tutorial/t4/t4.rb b/qtruby/rubylib/tutorial/t4/t4.rb index dc254a8d..b4f36b78 100755 --- a/qtruby/rubylib/tutorial/t4/t4.rb +++ b/qtruby/rubylib/tutorial/t4/t4.rb @@ -13,7 +13,7 @@ def initialize(parent = nil, name = nil) quit = TQt::PushButton.new('Quit', self, 'quit') quit.setGeometry(62, 40, 75, 30) quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold)) - connect(quit, SIGNAL('clicked()'), $qApp, SLOT('quit()')) + connect(quit, TQ_SIGNAL('clicked()'), $qApp, TQ_SLOT('quit()')) end end diff --git a/qtruby/rubylib/tutorial/t5/t5.rb b/qtruby/rubylib/tutorial/t5/t5.rb index 56b50d17..72625321 100755 --- a/qtruby/rubylib/tutorial/t5/t5.rb +++ b/qtruby/rubylib/tutorial/t5/t5.rb @@ -10,7 +10,7 @@ def initialize() quit = TQt::PushButton.new('Quit', self, 'quit') quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold)) - connect(quit, SIGNAL('clicked()'), $qApp, SLOT('quit()')) + connect(quit, TQ_SIGNAL('clicked()'), $qApp, TQ_SLOT('quit()')) lcd = TQt::LCDNumber.new(2, self, 'lcd') @@ -18,7 +18,7 @@ def initialize() slider.setRange(0, 99) slider.setValue(0) - connect(slider, SIGNAL('valueChanged(int)'), lcd, SLOT('display(int)')) + connect(slider, TQ_SIGNAL('valueChanged(int)'), lcd, TQ_SLOT('display(int)')) end end diff --git a/qtruby/rubylib/tutorial/t6/t6.rb b/qtruby/rubylib/tutorial/t6/t6.rb index 7d6b4b42..f0bd1afb 100755 --- a/qtruby/rubylib/tutorial/t6/t6.rb +++ b/qtruby/rubylib/tutorial/t6/t6.rb @@ -13,7 +13,7 @@ def initialize(grid) slider.setRange(0, 99) slider.setValue(0) - lcd.connect(slider, SIGNAL('valueChanged(int)'), SLOT('display(int)')) + lcd.connect(slider, TQ_SIGNAL('valueChanged(int)'), TQ_SLOT('display(int)')) end end @@ -25,7 +25,7 @@ def initialize() quit = TQt::PushButton.new('Quit', self, 'quit') quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold)) - connect(quit, SIGNAL('clicked()'), $qApp, SLOT('quit()')) + connect(quit, TQ_SIGNAL('clicked()'), $qApp, TQ_SLOT('quit()')) grid = TQt::Grid.new( 4, self ) for c in 0..3 diff --git a/qtruby/rubylib/tutorial/t7/lcdrange.rb b/qtruby/rubylib/tutorial/t7/lcdrange.rb index 0c673284..4e9e7616 100644 --- a/qtruby/rubylib/tutorial/t7/lcdrange.rb +++ b/qtruby/rubylib/tutorial/t7/lcdrange.rb @@ -11,8 +11,8 @@ class LCDRange < TQt::VBox @slider = TQt::Slider.new(TQt::VBox::Horizontal, self, 'slider') @slider.setRange(0, 99) @slider.setValue(0) - connect(@slider, SIGNAL('valueChanged(int)'), lcd, SLOT('display(int)')) - connect(@slider, SIGNAL('valueChanged(int)'), SIGNAL('valueChanged(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), lcd, TQ_SLOT('display(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), TQ_SIGNAL('valueChanged(int)')) end def value() diff --git a/qtruby/rubylib/tutorial/t7/t7.rb b/qtruby/rubylib/tutorial/t7/t7.rb index f1d56b20..97cfe8d0 100755 --- a/qtruby/rubylib/tutorial/t7/t7.rb +++ b/qtruby/rubylib/tutorial/t7/t7.rb @@ -11,7 +11,7 @@ def initialize() quit = TQt::PushButton.new('Quit', self, 'quit') quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold)) - connect(quit, SIGNAL('clicked()'), $qApp, SLOT('quit()')) + connect(quit, TQ_SIGNAL('clicked()'), $qApp, TQ_SLOT('quit()')) grid = TQt::Grid.new( 4, self ) previous = nil @@ -19,8 +19,8 @@ def initialize() for r in 0..3 lr = LCDRange.new(grid) if previous != nil - connect( lr, SIGNAL('valueChanged(int)'), - previous, SLOT('setValue(int)') ) + connect( lr, TQ_SIGNAL('valueChanged(int)'), + previous, TQ_SLOT('setValue(int)') ) end previous = lr end diff --git a/qtruby/rubylib/tutorial/t8/lcdrange.rb b/qtruby/rubylib/tutorial/t8/lcdrange.rb index 4e3d856f..32481913 100644 --- a/qtruby/rubylib/tutorial/t8/lcdrange.rb +++ b/qtruby/rubylib/tutorial/t8/lcdrange.rb @@ -10,8 +10,8 @@ class LCDRange < TQt::VBox @slider = TQt::Slider.new(TQt::VBox::Horizontal, self, 'slider') @slider.setRange(0, 99) @slider.setValue(0) - connect(@slider, SIGNAL('valueChanged(int)'), lcd, SLOT('display(int)')) - connect(@slider, SIGNAL('valueChanged(int)'), SIGNAL('valueChanged(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), lcd, TQ_SLOT('display(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), TQ_SIGNAL('valueChanged(int)')) setFocusProxy(@slider) end diff --git a/qtruby/rubylib/tutorial/t8/t8.rb b/qtruby/rubylib/tutorial/t8/t8.rb index fad11dd0..bc6a468a 100755 --- a/qtruby/rubylib/tutorial/t8/t8.rb +++ b/qtruby/rubylib/tutorial/t8/t8.rb @@ -11,17 +11,17 @@ class MyWidget < TQt::Widget quit = TQt::PushButton.new('Quit', self, 'quit') quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold)) - connect(quit, SIGNAL('clicked()'), $qApp, SLOT('quit()')) + connect(quit, TQ_SIGNAL('clicked()'), $qApp, TQ_SLOT('quit()')) angle = LCDRange.new( self, 'angle' ) angle.setRange( 5, 70 ) cannonField = CannonField.new( self, 'cannonField' ) - connect( angle, SIGNAL('valueChanged(int)'), - cannonField, SLOT('setAngle(int)') ) - connect( cannonField, SIGNAL('angleChanged(int)'), - angle, SLOT('setValue(int)') ) + connect( angle, TQ_SIGNAL('valueChanged(int)'), + cannonField, TQ_SLOT('setAngle(int)') ) + connect( cannonField, TQ_SIGNAL('angleChanged(int)'), + angle, TQ_SLOT('setValue(int)') ) grid = TQt::GridLayout.new( self, 2, 2, 10 ) # 2x2, 10 pixel border diff --git a/qtruby/rubylib/tutorial/t9/lcdrange.rb b/qtruby/rubylib/tutorial/t9/lcdrange.rb index 208650f3..dddbc381 100644 --- a/qtruby/rubylib/tutorial/t9/lcdrange.rb +++ b/qtruby/rubylib/tutorial/t9/lcdrange.rb @@ -10,8 +10,8 @@ class LCDRange < TQt::VBox @slider = TQt::Slider.new(TQt::VBox::Horizontal, self, 'slider') @slider.setRange(0, 99) @slider.setValue(0) - connect(@slider, SIGNAL('valueChanged(int)'), lcd, SLOT('display(int)')) - connect(@slider, SIGNAL('valueChanged(int)'), SIGNAL('valueChanged(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), lcd, TQ_SLOT('display(int)')) + connect(@slider, TQ_SIGNAL('valueChanged(int)'), TQ_SIGNAL('valueChanged(int)')) setFocusProxy(@slider) end diff --git a/qtruby/rubylib/tutorial/t9/t9.rb b/qtruby/rubylib/tutorial/t9/t9.rb index 8a9cf81d..090fc9b0 100755 --- a/qtruby/rubylib/tutorial/t9/t9.rb +++ b/qtruby/rubylib/tutorial/t9/t9.rb @@ -11,17 +11,17 @@ class MyWidget < TQt::Widget quit = TQt::PushButton.new('Quit', self, 'quit') quit.setFont(TQt::Font.new('Times', 18, TQt::Font::Bold)) - connect(quit, SIGNAL('clicked()'), $qApp, SLOT('quit()')) + connect(quit, TQ_SIGNAL('clicked()'), $qApp, TQ_SLOT('quit()')) angle = LCDRange.new( self, 'angle' ) angle.setRange( 5, 70 ) cannonField = CannonField.new( self, 'cannonField' ) - connect( angle, SIGNAL('valueChanged(int)'), - cannonField, SLOT('setAngle(int)') ) - connect( cannonField, SIGNAL('angleChanged(int)'), - angle, SLOT('setValue(int)') ) + connect( angle, TQ_SIGNAL('valueChanged(int)'), + cannonField, TQ_SLOT('setAngle(int)') ) + connect( cannonField, TQ_SIGNAL('angleChanged(int)'), + angle, TQ_SLOT('setValue(int)') ) grid = TQt::GridLayout.new( self, 2, 2, 10 ) # 2x2, 10 pixel border |