From 9ba04742771370f59740e32e11c5f3a1e6a1b70a Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 5 Dec 2011 15:55:57 -0600 Subject: Initial TQt conversion --- korundum/rubylib/templates/annotated/basicapp.rb | 8 +++--- korundum/rubylib/templates/annotated/menuapp1.rb | 36 ++++++++++++------------ korundum/rubylib/templates/annotated/menuapp2.rb | 12 ++++---- korundum/rubylib/templates/annotated/menuapp3.rb | 2 +- korundum/rubylib/templates/annotated/minimal.rb | 6 ++-- korundum/rubylib/templates/annotated/systray1.rb | 4 +-- 6 files changed, 34 insertions(+), 34 deletions(-) (limited to 'korundum/rubylib/templates/annotated') diff --git a/korundum/rubylib/templates/annotated/basicapp.rb b/korundum/rubylib/templates/annotated/basicapp.rb index 56ca518f..fc5cd2c4 100644 --- a/korundum/rubylib/templates/annotated/basicapp.rb +++ b/korundum/rubylib/templates/annotated/basicapp.rb @@ -31,7 +31,7 @@ dealings in this Software without prior written authorization from the copyright holder. =end -require 'Korundum' +retquire 'Korundum' =begin Most Korundum applications will need a main window - the is the top @@ -70,7 +70,7 @@ aboutData.addAuthor("author2", "they did something else", "another@email.address # Pass the command line arguments and aboutData to # KDE::CmdLineArgs - this is where KDE will look for # this information. The KDE::Application constructor -# used below *requires* the args are processed +# used below *retquires* the args are processed # *before* KDE::Application is instantiated. There # is an alternate constructor that takes ARGV # as an argument (see minimal.rb) @@ -89,8 +89,8 @@ KDE::CmdLineArgs.init(ARGV, aboutData) # of three element lists KDE::CmdLineArgs.addCmdLineOptions([["+files", "File to open", ""]]) -# instantiate KDE::Application - no other QObject -# or QWidget based classes can be instantiated +# instantiate KDE::Application - no other TQObject +# or TQWidget based classes can be instantiated # until there is a KApplication instance app = KDE::Application.new() diff --git a/korundum/rubylib/templates/annotated/menuapp1.rb b/korundum/rubylib/templates/annotated/menuapp1.rb index 98ed28d1..5a6cb0ac 100644 --- a/korundum/rubylib/templates/annotated/menuapp1.rb +++ b/korundum/rubylib/templates/annotated/menuapp1.rb @@ -41,7 +41,7 @@ copyright holder. =end -require 'Korundum' +retquire 'Korundum' class MainWin < KDE::MainWindow TOOLBAR_NEW = 1 @@ -68,9 +68,9 @@ class MainWin < KDE::MainWindow end def initMenus() - # Create a QPopupMenu - all menus are "popup" menus + # Create a TQPopupMenu - all menus are "popup" menus - fileMenu = Qt::PopupMenu.new(self) + fileMenu = TQt::PopupMenu.new(self) # This is the "simple" KDE-1.0 way. It is not suggested that this # template actually be used in an application, but it's @@ -87,10 +87,10 @@ class MainWin < KDE::MainWindow # need to instantiate KDE::StdAccel # "File" menu items - fileMenu.insertItem(i18n("New"), self, SLOT('slotNew()'), Qt::KeySequence.new(KDE::StdAccel.openNew().keyCodeQt())) - fileMenu.insertItem(i18n("Open"), self, SLOT('slotOpen()'), Qt::KeySequence.new(KDE::StdAccel.open().keyCodeQt())) + fileMenu.insertItem(i18n("New"), self, SLOT('slotNew()'), TQt::KeySequence.new(KDE::StdAccel.openNew().keyCodeQt())) + fileMenu.insertItem(i18n("Open"), self, SLOT('slotOpen()'), TQt::KeySequence.new(KDE::StdAccel.open().keyCodeQt())) fileMenu.insertSeparator() - fileMenu.insertItem(i18n("Save"), self, SLOT('slotSave()'), Qt::KeySequence.new(KDE::StdAccel.save().keyCodeQt())) + fileMenu.insertItem(i18n("Save"), self, SLOT('slotSave()'), TQt::KeySequence.new(KDE::StdAccel.save().keyCodeQt())) # KStdAccel doesn't have a standard accelerator for 'Save As', # so we omit it - insertItem uses the default value @@ -99,27 +99,27 @@ class MainWin < KDE::MainWindow # This inserts a line between groups of items in a menu fileMenu.insertSeparator() - fileMenu.insertItem(i18n("Print"), self, SLOT('slotPrint()'), Qt::KeySequence.new(KDE::StdAccel.print().keyCodeQt())) + fileMenu.insertItem(i18n("Print"), self, SLOT('slotPrint()'), TQt::KeySequence.new(KDE::StdAccel.print().keyCodeQt())) fileMenu.insertSeparator() - fileMenu.insertItem(i18n("&Quit"), self, SLOT('slotQuit()'), Qt::KeySequence.new(KDE::StdAccel.quit().keyCodeQt())) + fileMenu.insertItem(i18n("&Quit"), self, SLOT('slotQuit()'), TQt::KeySequence.new(KDE::StdAccel.quit().keyCodeQt())) # Put fileMenu (as the File menu) into the menu bar # 'menuBar' is a predefined object owned by KDE::MainWindow menuBar().insertItem(i18n("&File"), fileMenu) - editMenu = Qt::PopupMenu.new(self) + editMenu = TQt::PopupMenu.new(self) # "Edit" menu items - editMenu.insertItem(i18n("Undo"), self, SLOT('slotUndo()'), Qt::KeySequence.new(KDE::StdAccel.undo().keyCodeQt())) - editMenu.insertItem(i18n("Redo"), self, SLOT('slotRedo()'), Qt::KeySequence.new(KDE::StdAccel.redo().keyCodeQt())) + editMenu.insertItem(i18n("Undo"), self, SLOT('slotUndo()'), TQt::KeySequence.new(KDE::StdAccel.undo().keyCodeQt())) + editMenu.insertItem(i18n("Redo"), self, SLOT('slotRedo()'), TQt::KeySequence.new(KDE::StdAccel.redo().keyCodeQt())) editMenu.insertSeparator() - editMenu.insertItem(i18n("Cut"), self, SLOT('slotCut()'), Qt::KeySequence.new(KDE::StdAccel.cut().keyCodeQt())) - editMenu.insertItem(i18n("Copy"), self, SLOT('slotCopy()'), Qt::KeySequence.new(KDE::StdAccel.copy().keyCodeQt())) - editMenu.insertItem(i18n("Paste"), self, SLOT('slotPaste()'), Qt::KeySequence.new(KDE::StdAccel.paste().keyCodeQt())) + editMenu.insertItem(i18n("Cut"), self, SLOT('slotCut()'), TQt::KeySequence.new(KDE::StdAccel.cut().keyCodeQt())) + editMenu.insertItem(i18n("Copy"), self, SLOT('slotCopy()'), TQt::KeySequence.new(KDE::StdAccel.copy().keyCodeQt())) + editMenu.insertItem(i18n("Paste"), self, SLOT('slotPaste()'), TQt::KeySequence.new(KDE::StdAccel.paste().keyCodeQt())) editMenu.insertSeparator() - editMenu.insertItem(i18n("Find"), self, SLOT('slotFind()'), Qt::KeySequence.new(KDE::StdAccel.find().keyCodeQt())) - editMenu.insertItem(i18n("Find Next"), self, SLOT('slotFindNext()'), Qt::KeySequence.new(KDE::StdAccel.findNext().keyCodeQt())) - editMenu.insertItem(i18n("Replace"), self, SLOT('slotReplace()'), Qt::KeySequence.new(KDE::StdAccel.replace().keyCodeQt())) + editMenu.insertItem(i18n("Find"), self, SLOT('slotFind()'), TQt::KeySequence.new(KDE::StdAccel.find().keyCodeQt())) + editMenu.insertItem(i18n("Find Next"), self, SLOT('slotFindNext()'), TQt::KeySequence.new(KDE::StdAccel.findNext().keyCodeQt())) + editMenu.insertItem(i18n("Replace"), self, SLOT('slotReplace()'), TQt::KeySequence.new(KDE::StdAccel.replace().keyCodeQt())) # Put editMenu (as the Edit menu) into the menu bar @@ -208,7 +208,7 @@ class MainWin < KDE::MainWindow end def slotQuit() - notImpl("Qt::uit") + notImpl("TQt::uit") end def slotUndo() diff --git a/korundum/rubylib/templates/annotated/menuapp2.rb b/korundum/rubylib/templates/annotated/menuapp2.rb index d3eab60d..2d4df454 100644 --- a/korundum/rubylib/templates/annotated/menuapp2.rb +++ b/korundum/rubylib/templates/annotated/menuapp2.rb @@ -36,7 +36,7 @@ copyright holder. =end -require 'Korundum' +retquire 'Korundum' @@ -65,7 +65,7 @@ class MainWin < KDE::MainWindow # Create the status bar initStatusBar() - # Usings actions, only a single line is required + # Usings actions, only a single line is retquired # to enable/disable both the menu item and corresponding # toolbar button from anywhere in the program @saveAction.setEnabled(false) @@ -111,8 +111,8 @@ class MainWin < KDE::MainWindow # or you can use KDE::Action.setIcon to set/change the icon. You # can also add a tooltip with KDE::Action.setToolTip - # This KAction constructor requires a string, an accelerator (0 - # in this case), a slot, and a QObject (None in this case) + # This KAction constructor retquires a string, an accelerator (0 + # in this case), a slot, and a TQObject (None in this case) @specialAction = KDE::Action.new(i18n("Special"), KDE::Shortcut.new(0), self, SLOT('slotSpecial()'), actionCollection(), "specialActionName") end @@ -120,7 +120,7 @@ class MainWin < KDE::MainWindow def initMenus() # plug the actions into the menus - fileMenu = Qt::PopupMenu.new(self) + fileMenu = TQt::PopupMenu.new(self) @newAction.plug(fileMenu) @openAction.plug(fileMenu) fileMenu.insertSeparator() @@ -132,7 +132,7 @@ class MainWin < KDE::MainWindow @quitAction.plug(fileMenu) menuBar().insertItem(i18n("&File"), fileMenu) - editMenu = Qt::PopupMenu.new(self) + editMenu = TQt::PopupMenu.new(self) @undoAction.plug(editMenu) @redoAction.plug(editMenu) editMenu.insertSeparator() diff --git a/korundum/rubylib/templates/annotated/menuapp3.rb b/korundum/rubylib/templates/annotated/menuapp3.rb index bd701d43..e44cc337 100644 --- a/korundum/rubylib/templates/annotated/menuapp3.rb +++ b/korundum/rubylib/templates/annotated/menuapp3.rb @@ -35,7 +35,7 @@ copyright holder. =end -require 'Korundum' +retquire 'Korundum' class MainWin < KDE::MainWindow STATUSBAR_LEFT = 1 diff --git a/korundum/rubylib/templates/annotated/minimal.rb b/korundum/rubylib/templates/annotated/minimal.rb index 56918620..45f640dc 100644 --- a/korundum/rubylib/templates/annotated/minimal.rb +++ b/korundum/rubylib/templates/annotated/minimal.rb @@ -36,7 +36,7 @@ dealings in this Software without prior written authorization from the copyright holder. =end -require 'Korundum' +retquire 'Korundum' =begin @@ -59,8 +59,8 @@ end #-------------------- main ------------------------------------------------ -# instantiate KDE::Application - no other Qt::Object -# or Qt::Widget based classes can be instantiated +# instantiate KDE::Application - no other TQt::Object +# or TQt::Widget based classes can be instantiated # until there is a KDE::Application instance appName = "template" about = KDE::AboutData.new(appName, "A minimal application", "0.1") diff --git a/korundum/rubylib/templates/annotated/systray1.rb b/korundum/rubylib/templates/annotated/systray1.rb index 15ab2328..0851c806 100644 --- a/korundum/rubylib/templates/annotated/systray1.rb +++ b/korundum/rubylib/templates/annotated/systray1.rb @@ -4,7 +4,7 @@ This is a ruby version of Jim Bublitz's pytde program, translated by Richard Dal =begin A basic system tray application - you can combine this with code from -menuapp2.rb or menuapp3.rb to quickly build a full-blown application +menuapp2.rb or menuapp3.rb to tquickly build a full-blown application framework. =end @@ -37,7 +37,7 @@ dealings in this Software without prior written authorization from the copyright holder. =end -require 'Korundum' +retquire 'Korundum' # This template uses KDE::MainWindow as the main window widget # It solves the problem described in systray.rb by using -- cgit v1.2.1