From 35fbd60457d1e51e6a0df5d181d1a0f00ad75a2c Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 14 Jan 2024 14:24:33 +0900 Subject: Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines Signed-off-by: Michele Calgaro --- languages/ruby/app_templates/kapp/app.rb | 24 ++++++++++---------- languages/ruby/app_templates/kapp/appview.rb | 8 +++---- languages/ruby/app_templates/kxt/app.rb | 18 +++++++-------- languages/ruby/app_templates/qtrubyapp/main.rb | 2 +- .../ruby/app_templates/qtrubyapp/qtrubyapp.rb | 26 +++++++++++----------- 5 files changed, 39 insertions(+), 39 deletions(-) (limited to 'languages/ruby/app_templates') diff --git a/languages/ruby/app_templates/kapp/app.rb b/languages/ruby/app_templates/kapp/app.rb index af807fe9..8d135b19 100644 --- a/languages/ruby/app_templates/kapp/app.rb +++ b/languages/ruby/app_templates/kapp/app.rb @@ -41,10 +41,10 @@ class %{APPNAMESC} < KDE::MainWindow setupGUI(); # allow the view to change the statusbar and caption - connect(@view, SIGNAL('signalChangeStatusbar(const TQString&)'), - self, SLOT('changeStatusbar(const TQString&)')) - connect(@view, SIGNAL('signalChangeCaption(const TQString&)'), - self, SLOT('changeCaption(const TQString&)')) + connect(@view, TQ_SIGNAL('signalChangeStatusbar(const TQString&)'), + self, TQ_SLOT('changeStatusbar(const TQString&)')) + connect(@view, TQ_SIGNAL('signalChangeCaption(const TQString&)'), + self, TQ_SLOT('changeCaption(const TQString&)')) end @@ -74,19 +74,19 @@ class %{APPNAMESC} < KDE::MainWindow end def setupActions() - KDE::StdAction.openNew(self, SLOT('fileNew()'), actionCollection()) - KDE::StdAction.open(self, SLOT('fileOpen()'), actionCollection()) - KDE::StdAction.save(self, SLOT('fileSave()'), actionCollection()) - KDE::StdAction.saveAs(self, SLOT('fileSaveAs()'), actionCollection()) - KDE::StdAction.print(self, SLOT('filePrint()'), actionCollection()) - KDE::StdAction.quit($kapp, SLOT('quit()'), actionCollection()) + KDE::StdAction.openNew(self, TQ_SLOT('fileNew()'), actionCollection()) + KDE::StdAction.open(self, TQ_SLOT('fileOpen()'), actionCollection()) + KDE::StdAction.save(self, TQ_SLOT('fileSave()'), actionCollection()) + KDE::StdAction.saveAs(self, TQ_SLOT('fileSaveAs()'), actionCollection()) + KDE::StdAction.print(self, TQ_SLOT('filePrint()'), actionCollection()) + KDE::StdAction.quit($kapp, TQ_SLOT('quit()'), actionCollection()) - KDE::StdAction.preferences(self, SLOT('optionsPreferences()'), actionCollection()) + KDE::StdAction.preferences(self, TQ_SLOT('optionsPreferences()'), actionCollection()) # this doesn't do anything useful. it's just here to illustrate # how to insert a custom menu and menu item custom = KDE::Action.new(i18n("Cus&tom Menuitem"), KDE::Shortcut.new(), - self, SLOT('optionsPreferences()'), + self, TQ_SLOT('optionsPreferences()'), actionCollection(), "custom_action") end diff --git a/languages/ruby/app_templates/kapp/appview.rb b/languages/ruby/app_templates/kapp/appview.rb index 3fed1ce1..b81155b0 100644 --- a/languages/ruby/app_templates/kapp/appview.rb +++ b/languages/ruby/app_templates/kapp/appview.rb @@ -71,10 +71,10 @@ class %{APPNAMESC}View < TQt::Widget return end - connect(@html, SIGNAL('setWindowCaption(const TQString&)'), - self, SLOT('slotSetTitle(const TQString&)')) - connect(@html, SIGNAL('setStatusBarText(const TQString&)'), - self, SLOT('slotOnURL(const TQString&)')) + connect(@html, TQ_SIGNAL('setWindowCaption(const TQString&)'), + self, TQ_SLOT('slotSetTitle(const TQString&)')) + connect(@html, TQ_SIGNAL('setStatusBarText(const TQString&)'), + self, TQ_SLOT('slotOnURL(const TQString&)')) end diff --git a/languages/ruby/app_templates/kxt/app.rb b/languages/ruby/app_templates/kxt/app.rb index 59a7c266..f7a18399 100644 --- a/languages/ruby/app_templates/kxt/app.rb +++ b/languages/ruby/app_templates/kxt/app.rb @@ -40,23 +40,23 @@ class %{APPNAMESC} < KDE::MainWindow setupGUI(); # allow the view to change the statusbar and caption - connect(@view, SIGNAL('signalChangeStatusbar(const TQString&)'), - self, SLOT('changeStatusbar(const TQString&)')) - connect(@view, SIGNAL('signalChangeCaption(const TQString&)'), - self, SLOT('changeCaption(const TQString&)')) + connect(@view, TQ_SIGNAL('signalChangeStatusbar(const TQString&)'), + self, TQ_SLOT('changeStatusbar(const TQString&)')) + connect(@view, TQ_SIGNAL('signalChangeCaption(const TQString&)'), + self, TQ_SLOT('changeCaption(const TQString&)')) end def setupActions() - KDE::StdAction.openNew(self, SLOT('fileNew()'), actionCollection()) - KDE::StdAction.quit($kapp, SLOT('quit()'), actionCollection()) + KDE::StdAction.openNew(self, TQ_SLOT('fileNew()'), actionCollection()) + KDE::StdAction.quit($kapp, TQ_SLOT('quit()'), actionCollection()) - KDE::StdAction.preferences(self, SLOT('optionsPreferences()'), actionCollection()) + KDE::StdAction.preferences(self, TQ_SLOT('optionsPreferences()'), actionCollection()) # this doesn't do anything useful. it's just here to illustrate # how to insert a custom menu and menu item custom = KDE::Action.new(i18n("Swi&tch Colors"), KDE::Shortcut.new(), - @view, SLOT('switchColors()'), + @view, TQ_SLOT('switchColors()'), actionCollection(), "switch_action") end @@ -76,7 +76,7 @@ class %{APPNAMESC} < KDE::MainWindow # to the names of the variables in the .kcfg file dialog = KDE::ConfigDialog.new(self, "settings", Settings.instance, KDE::DialogBase::Swallow) dialog.addPage(Prefs.new(), i18n("General"), "package_settings") - connect(dialog, SIGNAL('settingsChanged()'), @view, SLOT('settingsChanged()')) + connect(dialog, TQ_SIGNAL('settingsChanged()'), @view, TQ_SLOT('settingsChanged()')) dialog.show() end diff --git a/languages/ruby/app_templates/qtrubyapp/main.rb b/languages/ruby/app_templates/qtrubyapp/main.rb index 431ea442..f76c9dac 100644 --- a/languages/ruby/app_templates/qtrubyapp/main.rb +++ b/languages/ruby/app_templates/qtrubyapp/main.rb @@ -5,6 +5,6 @@ a = TQt::Application.new( ARGV ) mw = %{APPNAMESC}.new mw.caption = "%{APPNAMESC}" mw.show -a.connect( a, SIGNAL('lastWindowClosed()'), a, SLOT('quit()') ) +a.connect( a, TQ_SIGNAL('lastWindowClosed()'), a, TQ_SLOT('quit()') ) a.exec diff --git a/languages/ruby/app_templates/qtrubyapp/qtrubyapp.rb b/languages/ruby/app_templates/qtrubyapp/qtrubyapp.rb index df98824d..1f399323 100644 --- a/languages/ruby/app_templates/qtrubyapp/qtrubyapp.rb +++ b/languages/ruby/app_templates/qtrubyapp/qtrubyapp.rb @@ -18,15 +18,15 @@ class %{APPNAMESC} < TQt::MainWindow openIcon = TQt::Pixmap.new( "fileopen.xpm" ) fileOpen = TQt::ToolButton.new( TQt::IconSet.new(openIcon), tr("Open File"), nil, - self, SLOT('choose()'), fileTools, "open file" ) + self, TQ_SLOT('choose()'), fileTools, "open file" ) saveIcon = TQt::Pixmap.new( "filesave.xpm" ) fileSave = TQt::ToolButton.new( TQt::IconSet.new(saveIcon), tr("Save File"), nil, - self, SLOT('save()'), fileTools, "save file" ) + self, TQ_SLOT('save()'), fileTools, "save file" ) printIcon = TQt::Pixmap.new( "fileprint.xpm" ) filePrint = TQt::ToolButton.new( TQt::IconSet.new(printIcon), tr("Print File"), nil, - self, SLOT('print()'), fileTools, "print file" ) + self, TQ_SLOT('print()'), fileTools, "print file" ) TQt::WhatsThis.whatsThisButton( fileTools ) @@ -58,40 +58,40 @@ class %{APPNAMESC} < TQt::MainWindow menuBar().insertItem( tr("&File"), file ) - file.insertItem( tr("&New"), self, SLOT('newDoc()'), TQt::KeySequence.new(CTRL+Key_N) ) + file.insertItem( tr("&New"), self, TQ_SLOT('newDoc()'), TQt::KeySequence.new(CTRL+Key_N) ) id = file.insertItem( TQt::IconSet.new(openIcon), tr("&Open..."), - self, SLOT('choose()'), TQt::KeySequence.new(CTRL+Key_O) ) + self, TQ_SLOT('choose()'), TQt::KeySequence.new(CTRL+Key_O) ) file.setWhatsThis( id, fileOpenText ) id = file.insertItem( TQt::IconSet.new(saveIcon), tr("&Save"), - self, SLOT('save()'), TQt::KeySequence.new(CTRL+Key_S) ) + self, TQ_SLOT('save()'), TQt::KeySequence.new(CTRL+Key_S) ) file.setWhatsThis( id, fileSaveText ) - id = file.insertItem( tr("Save &As..."), self, SLOT('saveAs()') ) + id = file.insertItem( tr("Save &As..."), self, TQ_SLOT('saveAs()') ) file.setWhatsThis( id, fileSaveText ) file.insertSeparator() id = file.insertItem( TQt::IconSet.new(printIcon), tr("&Print..."), - self, SLOT('print()'), TQt::KeySequence.new(CTRL+Key_P) ) + self, TQ_SLOT('print()'), TQt::KeySequence.new(CTRL+Key_P) ) file.setWhatsThis( id, filePrintText ) file.insertSeparator() - file.insertItem( tr("&Close"), self, SLOT('close()'), TQt::KeySequence.new(CTRL+Key_W) ) + file.insertItem( tr("&Close"), self, TQ_SLOT('close()'), TQt::KeySequence.new(CTRL+Key_W) ) - file.insertItem( tr("&Quit"), $tqApp, SLOT( 'closeAllWindows()' ), TQt::KeySequence.new(CTRL+Key_Q) ) + file.insertItem( tr("&Quit"), $tqApp, TQ_SLOT( 'closeAllWindows()' ), TQt::KeySequence.new(CTRL+Key_Q) ) menuBar().insertSeparator() help = TQt::PopupMenu.new( self ) menuBar().insertItem( tr("&Help"), help ) - help.insertItem( tr("&About"), self, SLOT('about()'), TQt::KeySequence.new(Key_F1) ) - help.insertItem( tr("About &Qt"), self, SLOT('aboutQt()') ) + help.insertItem( tr("&About"), self, TQ_SLOT('about()'), TQt::KeySequence.new(Key_F1) ) + help.insertItem( tr("About &Qt"), self, TQ_SLOT('aboutQt()') ) help.insertSeparator() - help.insertItem( tr("What's &This"), self, SLOT('whatsThis()'), TQt::KeySequence.new(SHIFT+Key_F1) ) + help.insertItem( tr("What's &This"), self, TQ_SLOT('whatsThis()'), TQt::KeySequence.new(SHIFT+Key_F1) ) @e = TQt::TextEdit.new( self, "editor" ) @e.setFocus() -- cgit v1.2.1