summaryrefslogtreecommitdiffstats
path: root/korundum/rubylib/templates
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 15:55:57 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-05 15:55:57 -0600
commit9ba04742771370f59740e32e11c5f3a1e6a1b70a (patch)
treec81c34dae2b3b1ea73801bf18a960265dc4207f7 /korundum/rubylib/templates
parent1a96c45b22d01378202d9dc7ed9c47acd30f966e (diff)
downloadtdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.tar.gz
tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.zip
Initial TQt conversion
Diffstat (limited to 'korundum/rubylib/templates')
-rw-r--r--korundum/rubylib/templates/annotated/basicapp.rb8
-rw-r--r--korundum/rubylib/templates/annotated/menuapp1.rb36
-rw-r--r--korundum/rubylib/templates/annotated/menuapp2.rb12
-rw-r--r--korundum/rubylib/templates/annotated/menuapp3.rb2
-rw-r--r--korundum/rubylib/templates/annotated/minimal.rb6
-rw-r--r--korundum/rubylib/templates/annotated/systray1.rb4
-rw-r--r--korundum/rubylib/templates/basic/basicapp.rb2
-rw-r--r--korundum/rubylib/templates/basic/menuapp1.rb34
-rw-r--r--korundum/rubylib/templates/basic/menuapp2.rb6
-rw-r--r--korundum/rubylib/templates/basic/menuapp3.rb2
-rw-r--r--korundum/rubylib/templates/basic/minimal.rb2
-rw-r--r--korundum/rubylib/templates/basic/systray1.rb2
12 files changed, 58 insertions, 58 deletions
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
diff --git a/korundum/rubylib/templates/basic/basicapp.rb b/korundum/rubylib/templates/basic/basicapp.rb
index 3ef34150..e3d100b4 100644
--- a/korundum/rubylib/templates/basic/basicapp.rb
+++ b/korundum/rubylib/templates/basic/basicapp.rb
@@ -31,7 +31,7 @@ dealings in this Software without prior written authorization from the
copyright holder.
=end
-require 'Korundum'
+retquire 'Korundum'
class MainWin < KDE::MainWindow
def initialize(*args)
diff --git a/korundum/rubylib/templates/basic/menuapp1.rb b/korundum/rubylib/templates/basic/menuapp1.rb
index 027dd3b2..1b51fc30 100644
--- a/korundum/rubylib/templates/basic/menuapp1.rb
+++ b/korundum/rubylib/templates/basic/menuapp1.rb
@@ -41,7 +41,7 @@ copyright holder.
=end
-require 'Korundum'
+retquire 'Korundum'
class MainWin < KDE::MainWindow
TOOLBAR_NEW = 1
@@ -68,34 +68,34 @@ class MainWin < KDE::MainWindow
end
def initMenus()
- fileMenu = Qt::PopupMenu.new(self)
+ fileMenu = TQt::PopupMenu.new(self)
# "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()))
fileMenu.insertItem(i18n("SaveAs"), self, SLOT('slotSaveAs()'))
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()))
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()))
menuBar().insertItem(i18n("&Edit"), editMenu)
@@ -150,7 +150,7 @@ class MainWin < KDE::MainWindow
end
def slotQuit()
- notImpl("Qt::uit")
+ notImpl("TQt::uit")
end
def slotUndo()
diff --git a/korundum/rubylib/templates/basic/menuapp2.rb b/korundum/rubylib/templates/basic/menuapp2.rb
index 63430fd0..50216e50 100644
--- a/korundum/rubylib/templates/basic/menuapp2.rb
+++ b/korundum/rubylib/templates/basic/menuapp2.rb
@@ -36,7 +36,7 @@ copyright holder.
=end
-require 'Korundum'
+retquire 'Korundum'
@@ -83,7 +83,7 @@ class MainWin < KDE::MainWindow
end
def initMenus()
- fileMenu = Qt::PopupMenu.new(self)
+ fileMenu = TQt::PopupMenu.new(self)
@newAction.plug(fileMenu)
@openAction.plug(fileMenu)
fileMenu.insertSeparator()
@@ -95,7 +95,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/basic/menuapp3.rb b/korundum/rubylib/templates/basic/menuapp3.rb
index 7751e847..5f47a177 100644
--- a/korundum/rubylib/templates/basic/menuapp3.rb
+++ b/korundum/rubylib/templates/basic/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/basic/minimal.rb b/korundum/rubylib/templates/basic/minimal.rb
index aca58cc7..47fbe505 100644
--- a/korundum/rubylib/templates/basic/minimal.rb
+++ b/korundum/rubylib/templates/basic/minimal.rb
@@ -31,7 +31,7 @@ dealings in this Software without prior written authorization from the
copyright holder.
=end
-require 'Korundum'
+retquire 'Korundum'
diff --git a/korundum/rubylib/templates/basic/systray1.rb b/korundum/rubylib/templates/basic/systray1.rb
index b1e5e09b..32aa0078 100644
--- a/korundum/rubylib/templates/basic/systray1.rb
+++ b/korundum/rubylib/templates/basic/systray1.rb
@@ -31,7 +31,7 @@ dealings in this Software without prior written authorization from the
copyright holder.
=end
-require 'Korundum'
+retquire 'Korundum'
class MainWin < KDE::MainWindow
slots 'slotQuitSelected()'