summaryrefslogtreecommitdiffstats
path: root/korundum
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-05 15:55:57 -0600
committerTimothy Pearson <[email protected]>2011-12-05 15:55:57 -0600
commit9ba04742771370f59740e32e11c5f3a1e6a1b70a (patch)
treec81c34dae2b3b1ea73801bf18a960265dc4207f7 /korundum
parent1a96c45b22d01378202d9dc7ed9c47acd30f966e (diff)
downloadtdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.tar.gz
tdebindings-9ba04742771370f59740e32e11c5f3a1e6a1b70a.zip
Initial TQt conversion
Diffstat (limited to 'korundum')
-rw-r--r--korundum/AUTHORS2
-rw-r--r--korundum/ChangeLog106
-rw-r--r--korundum/README32
-rwxr-xr-xkorundum/rubylib/examples/RubberDoc.rb190
-rwxr-xr-xkorundum/rubylib/examples/dcop/dcopcall.rb4
-rwxr-xr-xkorundum/rubylib/examples/dcop/dcoppredicate.rb2
-rwxr-xr-xkorundum/rubylib/examples/dcop/dcopsend.rb6
-rwxr-xr-xkorundum/rubylib/examples/dcop/dcopsignal.rb6
-rwxr-xr-xkorundum/rubylib/examples/dcop/dcopslot.rb18
-rwxr-xr-xkorundum/rubylib/examples/dcop/dcoptest.rb4
-rwxr-xr-xkorundum/rubylib/examples/dcop/petshop.rb6
-rw-r--r--korundum/rubylib/examples/kludgeror.rb34
-rw-r--r--korundum/rubylib/examples/kurldemo.rb2
-rw-r--r--korundum/rubylib/examples/menudemo.rb12
-rw-r--r--korundum/rubylib/examples/mimetype.rb90
-rw-r--r--korundum/rubylib/examples/rbKHTMLPart.rb2
-rw-r--r--korundum/rubylib/examples/rbtestimage.pngbin36928 -> 36930 bytes
-rw-r--r--korundum/rubylib/examples/systray.rb2
-rw-r--r--korundum/rubylib/examples/uikmdi.rb12
-rw-r--r--korundum/rubylib/examples/uimodules/uidialogs.rb62
-rw-r--r--korundum/rubylib/examples/uimodules/uimenus.rb6
-rw-r--r--korundum/rubylib/examples/uimodules/uimisc.rb72
-rw-r--r--korundum/rubylib/examples/uimodules/uiwidgets.rb164
-rw-r--r--korundum/rubylib/examples/uimodules/uixml.rb4
-rw-r--r--korundum/rubylib/examples/uisampler.rb50
-rwxr-xr-xkorundum/rubylib/examples/xmlgui.rb6
-rw-r--r--korundum/rubylib/examples/xmlmenudemo.rb10
-rw-r--r--korundum/rubylib/korundum/Korundum.cpp210
-rw-r--r--korundum/rubylib/korundum/kdehandlers.cpp112
-rw-r--r--korundum/rubylib/korundum/lib/KDE/Korundum.rb2
-rw-r--r--korundum/rubylib/korundum/lib/KDE/korundum.rb34
-rw-r--r--korundum/rubylib/rbkconfig_compiler/README.dox6
-rw-r--r--korundum/rubylib/rbkconfig_compiler/autoexample.rb8
-rw-r--r--korundum/rubylib/rbkconfig_compiler/example.kcfg2
-rw-r--r--korundum/rubylib/rbkconfig_compiler/example.rb4
-rw-r--r--korundum/rubylib/rbkconfig_compiler/general_base.ui8
-rw-r--r--korundum/rubylib/rbkconfig_compiler/kcfg.xsd6
-rw-r--r--korundum/rubylib/rbkconfig_compiler/myoptions_base.ui6
-rw-r--r--korundum/rubylib/rbkconfig_compiler/rbkconfig_compiler.cpp472
-rw-r--r--korundum/rubylib/rbkconfig_compiler/tests/test1.kcfg2
-rw-r--r--korundum/rubylib/rbkconfig_compiler/tests/test1main.rb4
-rw-r--r--korundum/rubylib/rbkconfig_compiler/tests/test2main.rb6
-rw-r--r--korundum/rubylib/rbkconfig_compiler/tests/test3main.rb4
-rw-r--r--korundum/rubylib/rbkconfig_compiler/tests/test4.kcfg2
-rw-r--r--korundum/rubylib/rbkconfig_compiler/tests/test4main.rb4
-rw-r--r--korundum/rubylib/rbkconfig_compiler/tests/test5.kcfg2
-rw-r--r--korundum/rubylib/rbkconfig_compiler/tests/test5main.rb4
-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
-rw-r--r--korundum/rubylib/tutorials/p1/p1.rb8
-rw-r--r--korundum/rubylib/tutorials/p2/p2.rb4
-rw-r--r--korundum/rubylib/tutorials/p3/p3.rb6
-rw-r--r--korundum/rubylib/tutorials/p4/p4.rb8
-rw-r--r--korundum/rubylib/tutorials/p5/p5.rb12
-rw-r--r--korundum/rubylib/tutorials/p6/p6.rb4
-rw-r--r--korundum/rubylib/tutorials/p7/p7.rb12
-rw-r--r--korundum/rubylib/tutorials/p8/p8.rb10
-rw-r--r--korundum/rubylib/tutorials/p9/p9.rb8
68 files changed, 995 insertions, 995 deletions
diff --git a/korundum/AUTHORS b/korundum/AUTHORS
index 0756dc66..b547d7dc 100644
--- a/korundum/AUTHORS
+++ b/korundum/AUTHORS
@@ -19,7 +19,7 @@ QtRuby is a ruby version of the PerlQt/Smoke project, written by:
Germain Garand
David Faure
-Equipment
+Etquipment
800 Mhz iBook with Yellow Dog 3.0, Macally Micro 3 button mouse
Books
diff --git a/korundum/ChangeLog b/korundum/ChangeLog
index a80e9dd7..99a1be50 100644
--- a/korundum/ChangeLog
+++ b/korundum/ChangeLog
@@ -1,6 +1,6 @@
2007-03-05 Richard Dale <[email protected]>
- * Added a marshaller for QValueList<WId>& as requested by volty on #qtruby
+ * Added a marshaller for TQValueList<WId>& as requested by volty on #qtruby
2007-07-06 Richard Dale <[email protected]>
@@ -17,7 +17,7 @@
* Made KDE::ListView, KDE::ListViewItem Enumerable with implementations
of each() so they don't need to use the Qt External iterators like
- Qt::ListViewItemIterator anymore. For instance:
+ TQt::ListViewItemIterator anymore. For instance:
lv = KDE::ListView.new do
["one", "two", "three", "four"].each do |label|
@@ -35,7 +35,7 @@
2006-10-22 Richard Dale <[email protected]>
- * Special case QValueList<int> as a DCOPRef return type. Fixes problem
+ * Special case TQValueList<int> as a DCOPRef return type. Fixes problem
reported by Brian Bart.
2006-08-18 Richard Dale <[email protected]>
@@ -46,7 +46,7 @@
2006-06-05 Richard Dale <[email protected]>
* The metaObject methods for slots and signals are no longer added when
- a Qt::Object is constructed, but when slots or signals are added to
+ a TQt::Object is constructed, but when slots or signals are added to
a class. This means that signals as well as slots can be added to an
existing instance.
@@ -72,7 +72,7 @@
@konsole.autoStartShell = true
@konsole.startProgram("/bin/echo", ["echo", "-n"])
- @konsole.showShellInDir( Qt::Dir.home.path )
+ @konsole.showShellInDir( TQt::Dir.home.path )
@konsole.sendInput( "puts 'hello there konsole'" )
* Fixes problem reported by Ranjan Ghosh
@@ -102,7 +102,7 @@
2005-10-05 Richard Dale <[email protected]>
- * Changed DCOP code now that Qt::ByteArray class is in the Smoke library
+ * Changed DCOP code now that TQt::ByteArray class is in the Smoke library
* Fixed some examples derived from PyKDE with 0 or 1 passed as a
boolean instead of true or false for Ruby. A bug in the overloaded
method resolution meant it worked when it shouldn't have.
@@ -121,7 +121,7 @@
2005-05-29 Richard Dale <[email protected]>
- * At the moment require 'Qt' and require 'Korundum' statements can't appear
+ * At the moment retquire 'Qt' and retquire 'Korundum' statements can't appear
in the same ruby program. Suitable fatal error messages are now displayed
to indicate the cause of the problem. Fixes bug reported by Caleb Tennis
and Dave M
@@ -163,9 +163,9 @@
2005-01-20 Richard Dale <[email protected]>
- * The rbkconfig_compiler now uses Qt::Variants to hold the values in KDE::ConfigSkeleton
+ * The rbkconfig_compiler now uses TQt::Variants to hold the values in KDE::ConfigSkeleton
instance variables.
- * The values of the KDE::ConfigSkeletonItems are then set as properties with the Qt::Variants.
+ * The values of the KDE::ConfigSkeletonItems are then set as properties with the TQt::Variants.
It wasn't possible to handle references to primitive types such as 'int&' via ruby, so properties are
a more 'scripting language' oriented approach.
* The embedded code in the .kcfg examples was converted from C++ to ruby
@@ -209,7 +209,7 @@
* Fixed crashes in the KURL::List marshalling. A copy is now made of each KURL item
in the list when being marshalled to a ruby Array. When a KURL::List is deleted the
- contents are all deleted too as it's a QValueList. Hence, the need to make copies.
+ contents are all deleted too as it's a TQValueList. Hence, the need to make copies.
2004-10-20 Richard Dale <[email protected]>
@@ -231,7 +231,7 @@ CCMAIL: [email protected]
2004-10-08 Richard Dale <[email protected]>
- * Reverted recent fix for crash on exit, as it only occured with a Qt::Application and
+ * Reverted recent fix for crash on exit, as it only occured with a TQt::Application and
seems to introduce a crash in KDE apps where none existed before.
@@ -242,14 +242,14 @@ CCMAIL: [email protected]
* When a Korundum application exits, the top level widgets are now destroyed
as well as the KDE::Application itself. This fixes a problem where the ruby garbage
collection frees instances in an arbitrary order afer the program has exited, and
- destroys a Hash containing QMetaData info needed for tidying up.
+ destroys a Hash containing TQMetaData info needed for tidying up.
2004-10-04 Richard Dale <[email protected]>
* When a ruby app exits, rb_gc_call_finalizer_at_exit() is called and all the ruby
instances are garbage collected. The problem is that this is done in an arbitrary
order, and KDE::Application was occasionally crashing in its destructor because
- QMetaObject info it still needed was being deleted before then.
+ TQMetaObject info it still needed was being deleted before then.
* Fixes problem reported by Thibauld Favre
@@ -278,7 +278,7 @@ CCMAIL: [email protected]
2004-09-18 Richard Dale <[email protected]>
- * Added marshallers for KPluginInfo::List and QPtrList<KParts::Plugin>
+ * Added marshallers for KPluginInfo::List and TQPtrList<KParts::Plugin>
2004-09-16 Richard Dale <[email protected]>
@@ -338,15 +338,15 @@ CCMAIL: [email protected]
2004-07-30 Richard Dale <[email protected]>
- * Removed the various Q_INT32 etc types from the Smoke stack <--> QDataStream
+ * Removed the various Q_INT32 etc types from the Smoke stack <--> TQDataStream
marshalling. This was because the code generated by the dcopidl2cpp tool
doesn't have them. So if a machine has native 64 bit ints, then that width
will be used rather than Q_INT32.
2004-07-28 Richard Dale <[email protected]>
- * Added a couple of template methods for marshalling QValueLists and QMaps.
- * Included a quite a few new marshaller functions for QPtrLists, as well as
+ * Added a couple of template methods for marshalling TQValueLists and TQMaps.
+ * Included a quite a few new marshaller functions for TQPtrLists, as well as
the two types above.
2004-07-28 Richard Dale <[email protected]>
@@ -355,7 +355,7 @@ CCMAIL: [email protected]
2004-07-27 Richard Dale <[email protected]>
- * Replaced QString casts to 'const char *' with latin1() calls
+ * Replaced TQString casts to 'const char *' with latin1() calls
2004-07-27 Richard Dale <[email protected]>
@@ -367,7 +367,7 @@ CCMAIL: [email protected]
2004-07-26 Richard Dale <[email protected]>
- * Added QMap<QCString,DCOPRef> marshalling to and from Smoke as well as dcop
+ * Added TQMap<TQCString,DCOPRef> marshalling to and from Smoke as well as dcop
2004-07-24 Richard Dale <[email protected]>
@@ -378,7 +378,7 @@ CCMAIL: [email protected]
2004-07-24 Richard Dale <[email protected]>
- * Added QMap<QString,DCOPRef> ruby <--> dcop marshalling
+ * Added TQMap<TQString,DCOPRef> ruby <--> dcop marshalling
2004-07-23 Richard Dale <[email protected]>
@@ -396,27 +396,27 @@ CCMAIL: [email protected]
2004-07-21 Richard Dale <[email protected]>
- * QDataStream temporary variables added for the Q_INT32 etc types when
- writing to a Smoke stack from a QDataStream.
+ * TQDataStream temporary variables added for the Q_INT32 etc types when
+ writing to a Smoke stack from a TQDataStream.
2004-07-21 Richard Dale <[email protected]>
* Added casts to the various macros like 'Q_INT32' when writing a Smoke
- stack to a QDataStream
+ stack to a TQDataStream
2004-07-21 Richard Dale <[email protected]>
- * Added QValueList<QCString> marshalling ruby <--> dcop
+ * Added TQValueList<TQCString> marshalling ruby <--> dcop
2004-07-21 Richard Dale <[email protected]>
* Ruby dcop slots can now return actionMaps and windowLists as
- 'QMap<QString,DCOPRef>' and 'QValueList<DCOPRef>' types
+ 'TQMap<TQString,DCOPRef>' and 'TQValueList<DCOPRef>' types
2004-07-20 Richard Dale <[email protected]>
- * Added missing 'QMap<QString,DCOPRef>' dcop reply marshalling
- * The recently added dcop reply type 'QValueList<DCOPRef>' now works
+ * Added missing 'TQMap<TQString,DCOPRef>' dcop reply marshalling
+ * The recently added dcop reply type 'TQValueList<DCOPRef>' now works
* The parsing of a dcop function type signature to add it to the cache
was wrong if the reply type contained angle brackets or commas
@@ -434,29 +434,29 @@ CCMAIL: [email protected]
2004-07-17 Richard Dale <[email protected]>
- * More missing DCOP marshallers - QStringList and QCStringList
+ * More missing DCOP marshallers - TQStringList and TQCStringList
* A class with a 'k_dcop' slots declaration can now be an instance
of DCOPObject
* Converted the 'petshop' DCOP server example from pytde python
2004-07-16 Richard Dale <[email protected]>
- * Added missing QCString DCOP marshalling
+ * Added missing TQCString DCOP marshalling
2004-07-16 Richard Dale <[email protected]>
- * Removed the recently added QValueList<DCOPRef> marshaller as no '<<'
- or '<<' QDataStream marshallers are in the Smoke runtime
- * Added missing primitive type marshalling to and from a DCOP QByteArray
+ * Removed the recently added TQValueList<DCOPRef> marshaller as no '<<'
+ or '<<' TQDataStream marshallers are in the Smoke runtime
+ * Added missing primitive type marshalling to and from a DCOP TQByteArray
2004-07-15 Richard Dale <[email protected]>
* Fixed completely non-working DCOP call reply marshalling. An instance wasn't
- being constructed to read the QByteArray containing the reply via a QDataStream.
+ being constructed to read the TQByteArray containing the reply via a TQDataStream.
2004-07-15 Richard Dale <[email protected]>
- * Added QValueList<DCOPRef> marshalling
+ * Added TQValueList<DCOPRef> marshalling
2004-07-14 Richard Dale <[email protected]>
@@ -484,32 +484,32 @@ CCMAIL: [email protected]
dcopRef = KDE::DCOPRef.new("dcopslot", "MyWidget")
There are three different ways to specify the call:
- 1) res = dcopRef.call("getPoint(QString)", "Hello from dcopsend")
+ 1) res = dcopRef.call("getPoint(TQString)", "Hello from dcopsend")
2) res = dcopRef.call("getPoint", "Hello from dcopsend")
3) res = dcopRef.getPoint("Hello from dcopsend")
puts "result class: #{res.class.name} x: #{res.x} y: #{res.y}"
* Send to a DCOPRef is similar:
- 1) dcopRef.send("mySlot(QString)", "Hello from dcopsend")
+ 1) dcopRef.send("mySlot(TQString)", "Hello from dcopsend")
2) dcopRef.send("mySlot", "Hello from dcopsend")
* If the type signature of the target dcop slot is ommited it is derived
from the ruby argument types:
- String => QString
+ String => TQString
Float => double
Integer => int
- Qt::Widget etc => QWidget
+ TQt::Widget etc => TQWidget
KDE::URL etc => KURL
- [] => QStringList
+ [] => TQStringList
2004-07-08 Richard Dale <[email protected]>
- * Reverted fix for QChar args being passed as ruby strings after
- discussion with Germain Garand. A QChar arg is now passed like this:
+ * Reverted fix for TQChar args being passed as ruby strings after
+ discussion with Germain Garand. A TQChar arg is now passed like this:
- cs = KDE::CharSelect.new(self, "chselect", nil, Qt::Char.new(0), 0)
+ cs = KDE::CharSelect.new(self, "chselect", nil, TQt::Char.new(0), 0)
This will no longer work for now:
@@ -540,7 +540,7 @@ CCMAIL: [email protected]
* DCOP Signals now work, they are defined like this:
- k_dcop_signals 'void testEmitSignal(QString)'
+ k_dcop_signals 'void testEmitSignal(TQString)'
def doit()
puts "In doit.."
@@ -550,7 +550,7 @@ CCMAIL: [email protected]
* Connect slot 'mySlot' to a DCOP signal like this:
res = slottest.connectDCOPSignal("dcopsignal", "SenderWidget",
- "testEmitSignal(QString)", "mySlot(QString)",
+ "testEmitSignal(TQString)", "mySlot(TQString)",
true)
2004-06-30 Richard Dale <[email protected]>
@@ -558,23 +558,23 @@ CCMAIL: [email protected]
* Added DCOPRef.call() and send() support.
* Define a dcop slot like this in one ruby program:
- k_dcop 'QPoint getPoint(QString)'
+ k_dcop 'TQPoint getPoint(TQString)'
def getPoint(msg)
puts "message: #{msg}"
- return Qt::Point.new(50, 100)
+ return TQt::Point.new(50, 100)
end
* Call it from another program and print the reply, like this:
dcopRef = KDE::DCOPRef.new("dcopslot", "MyWidget")
- res = dcopRef.call("QPoint getPoint(QString)", "Hello from dcopsend")
+ res = dcopRef.call("TQPoint getPoint(TQString)", "Hello from dcopsend")
puts "result class: #{res.class.name} x: #{res.x} y: #{res.y}"
* Send to a DCOPRef is similar:
dcopRef = KDE::DCOPRef.new("dcopslot", "MyWidget")
- dcopRef.send("mySlot(QString)", "Hello from dcopsend")
+ dcopRef.send("mySlot(TQString)", "Hello from dcopsend")
* Note that the full type signature of the target dcop slot must be
specified at present.
@@ -587,7 +587,7 @@ CCMAIL: [email protected]
2004-03-03 Richard Dale <[email protected]>
* If the DCOP reply type is 'void' or 'ASYNC', it isn't marshalled into the
- QByteArray 'replyData' arg of DCOPObject::process().
+ TQByteArray 'replyData' arg of DCOPObject::process().
2004-03-02 Richard Dale <[email protected]>
@@ -602,20 +602,20 @@ CCMAIL: [email protected]
* Ruby DCOP support now working - here is some example code:
- require 'Korundum'
+ retquire 'Korundum'
class MyWidget < KDE::PushButton
- k_dcop 'QPoint mySlot(int,QString)'
+ k_dcop 'TQPoint mySlot(int,TQString)'
def initialize(parent, name)
super
end
def mySlot(counter,greeting)
- return Qt::Point.new(50, 100)
+ return TQt::Point.new(50, 100)
end
end
- - This slot is passed an integer and a string, and returns a Qt::Point.
+ - This slot is passed an integer and a string, and returns a TQt::Point.
- Note that the class doesn't have to inherit from DCOPObject. If you
include a 'k_dcop' slots declaration a 'listener' dcop object instance
is created automatically.
diff --git a/korundum/README b/korundum/README
index 1ee34155..9c64ba72 100644
--- a/korundum/README
+++ b/korundum/README
@@ -2,7 +2,7 @@ Please see tdebindings/qtruby/README
KDE Specific Infomation:
- - Instead of require 'Qt', use require 'Korundum' for KDE programs.
+ - Instead of retquire 'Qt', use retquire 'Korundum' for KDE programs.
- The KDE K* classes such as KApplication are renamed as KDE::Application.
The other KDE classes are in the KParts::, KIO:: or DOM:: namespaces,
@@ -19,21 +19,21 @@ KDE Specific Infomation:
- DCOP Support. Here is a minimal ruby dcop slot implementation:
- require 'Korundum'
+ retquire 'Korundum'
class MyWidget < KDE::PushButton
- k_dcop 'QPoint mySlot(int,QString)'
+ k_dcop 'TQPoint mySlot(int,TQString)'
def initialize(parent, name)
super
end
def mySlot(counter,greeting)
- return Qt::Point.new(50, 100)
+ return TQt::Point.new(50, 100)
end
end
- This slot is passed an integer and a string, and returns a Qt::Point.
+ This slot is passed an integer and a string, and returns a TQt::Point.
Note that the class doesn't have to inherit from DCOPObject. If you
include a 'k_dcop' slots declaration a 'listener' dcop object
@@ -59,11 +59,11 @@ KDE Specific Infomation:
- Define a dcop slot like this in one ruby program:
- k_dcop 'QPoint getPoint(QString)'
+ k_dcop 'TQPoint getPoint(TQString)'
def getPoint(msg)
puts "message: #{msg}"
- return Qt::Point.new(50, 100)
+ return TQt::Point.new(50, 100)
end
- Call it from another program and print the reply, like this:
@@ -71,7 +71,7 @@ KDE Specific Infomation:
dcopRef = KDE::DCOPRef.new("dcopslot", "MyWidget")
There are three different ways to specify a DCOP call:
- 1) res = dcopRef.call("getPoint(QString)", "Hello from dcopsend")
+ 1) res = dcopRef.call("getPoint(TQString)", "Hello from dcopsend")
2) res = dcopRef.call("getPoint", "Hello from dcopsend")
3) res = dcopRef.getPoint("Hello from dcopsend")
@@ -127,7 +127,7 @@ KDE Specific Infomation:
- Send to a DCOPRef:
There are two different ways to specify a DCOP send:
- 1) res = dcopRef.send("mySlot(QString)", "Hello from dcopsend")
+ 1) res = dcopRef.send("mySlot(TQString)", "Hello from dcopsend")
2) res = dcopRef.send("mySlot", "Hello from dcopsend")
The result will either be true or false (but not nil for fail like the
@@ -139,21 +139,21 @@ KDE Specific Infomation:
argument types are used to derive a type signature, in order to resolve
the call like this:
- String => QString
+ String => TQString
Float => double
Integer => int
TrueClass|FalseClass (ie 'true' or 'false') => bool
- Qt::Widget etc => QWidget
+ TQt::Widget etc => TQWidget
KDE::URL etc => KURL
- Array => QStringList
+ Array => TQStringList
Specify the full C++ type signature using the form
- 'dcopRef.call("getPoint(int,QString)", 5, "foobar")' if these rules fail
+ 'dcopRef.call("getPoint(int,TQString)", 5, "foobar")' if these rules fail
to pick the right method.
- DCOP Signals are defined like this:
- k_dcop_signals 'void testEmitSignal(QString)'
+ k_dcop_signals 'void testEmitSignal(TQString)'
def doit()
emit testEmitSignal("Hello DCOP Slot")
@@ -162,10 +162,10 @@ KDE Specific Infomation:
- Connect slot 'mySlot' to a DCOP signal like this:
res = slottest.connectDCOPSignal("dcopsignal", "SenderWidget",
- "testEmitSignal(QString)", "mySlot(QString)",
+ "testEmitSignal(TQString)", "mySlot(TQString)",
true)
- - Use the '-kde' option with the rbuic tool to require the 'Korundum'
+ - Use the '-kde' option with the rbuic tool to retquire the 'Korundum'
extension rather than the 'Qt' one. If the '-x' option is used in
conjunction, it generates a KDE top level. For example:
diff --git a/korundum/rubylib/examples/RubberDoc.rb b/korundum/rubylib/examples/RubberDoc.rb
index 604a9492..50bdc653 100755
--- a/korundum/rubylib/examples/RubberDoc.rb
+++ b/korundum/rubylib/examples/RubberDoc.rb
@@ -1,13 +1,13 @@
#!/usr/bin/env ruby
-require 'Korundum'
+retquire 'Korundum'
about = KDE::AboutData.new("one", "two", "three")
KDE::CmdLineArgs.init(ARGV, about)
app = KDE::Application.new()
-# Qt.debug_level = Qt::DebugLevel::High
-# Qt.debug_level = Qt::DebugLevel::Extensive
+# Qt.debug_level = TQt::DebugLevel::High
+# Qt.debug_level = TQt::DebugLevel::Extensive
# TODO
# improve appearence of sidebar massively
@@ -145,8 +145,8 @@ end
module LoggedDebug
def init_logger parent
- @logger = Qt::TextEdit.new parent
- @logger.setTextFormat Qt::LogText
+ @logger = TQt::TextEdit.new parent
+ @logger.setTextFormat TQt::LogText
end
def log s
@@ -164,32 +164,32 @@ end
module MyGui
def init_gui
- buttons = Qt::HBox.new self
- @panes = Qt::Splitter.new self
- @panes.setOrientation Qt::Splitter::Horizontal
+ buttons = TQt::HBox.new self
+ @panes = TQt::Splitter.new self
+ @panes.setOrientation TQt::Splitter::Horizontal
setStretchFactor @panes, 10
- @results_pane = Qt::VBox.new @panes
+ @results_pane = TQt::VBox.new @panes
- @rightpane = Qt::Splitter.new @panes
- @rightpane.setOrientation Qt::Splitter::Vertical
+ @rightpane = TQt::Splitter.new @panes
+ @rightpane.setOrientation TQt::Splitter::Vertical
@viewed = KDE::HTMLPart.new @rightpane
init_logger @rightpane
- @listbox = Qt::ListBox.new @results_pane
+ @listbox = TQt::ListBox.new @results_pane
- @label = Qt::Label.new self
+ @label = TQt::Label.new self
- Qt::Object.connect @listbox, SIGNAL("clicked(QListBoxItem*)"),
- self, SLOT("clicked_result(QListBoxItem*)")
- Qt::Object.connect @viewed, SIGNAL("completed()"),
+ TQt::Object.connect @listbox, SIGNAL("clicked(TQListBoxItem*)"),
+ self, SLOT("clicked_result(TQListBoxItem*)")
+ TQt::Object.connect @viewed, SIGNAL("completed()"),
self, SLOT("khtml_part_init_complete()")
- Qt::Object::connect @viewed, SIGNAL("setWindowCaption(const QString&)"),
+ TQt::Object::connect @viewed, SIGNAL("setWindowCaption(const TQString&)"),
@viewed.widget.topLevelWidget,
- SLOT("setCaption(const QString&)")
+ SLOT("setCaption(const TQString&)")
- Qt::Object::connect @viewed.browserExtension,
+ TQt::Object::connect @viewed.browserExtension,
SIGNAL("openURLRequest(const KURL&, const KParts::URLArgs&)"),
self, SLOT("open_url(const KURL&)")
@@ -198,23 +198,23 @@ module MyGui
KDE::Action.new "&Index-All", KDE::Shortcut.new(),
self, SLOT("index_all()"), @main.actionCollection, "index_all"
@back = \
- KDE::Action.new "&Back", "back", KDE::Shortcut.new(Qt::ALT + Qt::Key_Left),
+ KDE::Action.new "&Back", "back", KDE::Shortcut.new(TQt::ALT + TQt::Key_Left),
self, SLOT("go_back()"), @main.actionCollection, "back"
@forward = \
- KDE::Action.new "&Forward", "forward", KDE::Shortcut.new(Qt::ALT + Qt::Key_Right),
+ KDE::Action.new "&Forward", "forward", KDE::Shortcut.new(TQt::ALT + TQt::Key_Right),
self, SLOT("go_forward()"), @main.actionCollection, "forward"
- KDE::Action.new "&Home", "gohome", KDE::Shortcut.new(Qt::Key_Home),
+ KDE::Action.new "&Home", "gohome", KDE::Shortcut.new(TQt::Key_Home),
self, SLOT("go_home()"), @main.actionCollection, "home"
- KDE::Action.new "&Prev Match", "previous",KDE::Shortcut.new(Qt::CTRL + Qt::Key_P),
+ KDE::Action.new "&Prev Match", "previous",KDE::Shortcut.new(TQt::CTRL + TQt::Key_P),
self, SLOT("goto_prev_match()"), @main.actionCollection, "prev_match"
- KDE::Action.new "&Next Match", "next", KDE::Shortcut.new(Qt::CTRL + Qt::Key_N),
+ KDE::Action.new "&Next Match", "next", KDE::Shortcut.new(TQt::CTRL + TQt::Key_N),
self, SLOT("goto_next_match()"), @main.actionCollection, "next_match"
- KDE::Action.new "&Follow Match","down", KDE::Shortcut.new(Qt::Key_Return),
+ KDE::Action.new "&Follow Match","down", KDE::Shortcut.new(TQt::Key_Return),
self, SLOT("goto_current_match_link()"), @main.actionCollection, "open_match"
- KDE::Action.new "Search", "find", KDE::Shortcut.new(Qt::Key_F6),
+ KDE::Action.new "Search", "find", KDE::Shortcut.new(TQt::Key_F6),
self, SLOT("focus_search()"), @main.actionCollection, "focus_search"
- KDE::Action.new "New Search", "find", KDE::Shortcut.new(Qt::CTRL + Qt::Key_Slash),
+ KDE::Action.new "New Search", "find", KDE::Shortcut.new(TQt::CTRL + TQt::Key_Slash),
self, SLOT("focus_and_clear_search()"), @main.actionCollection, "focus_and_clear_search"
KDE::Action.new "&Create", "new", KDE::Shortcut.new(),
@@ -226,22 +226,22 @@ module MyGui
self, SLOT("clear_location()"), @main.actionCollection, "clear_location"
clearLocation.setWhatsThis "Clear Location bar<p>Clears the content of the location bar."
- @searchlabel = Qt::Label.new @main
+ @searchlabel = TQt::Label.new @main
@searchlabel.setText "Search: "
@searchcombo = KDE::HistoryCombo.new @main
focus_search
- Qt::Object.connect @searchcombo, SIGNAL("returnPressed()"),
+ TQt::Object.connect @searchcombo, SIGNAL("returnPressed()"),
self, SLOT("goto_search()")
- Qt::Object.connect @searchcombo, SIGNAL("textChanged(const QString&)"),
- self, SLOT("search(const QString&)")
+ TQt::Object.connect @searchcombo, SIGNAL("textChanged(const TQString&)"),
+ self, SLOT("search(const TQString&)")
- KDE::WidgetAction.new @searchlabel, "Search: ", KDE::Shortcut.new(Qt::Key_F6), nil, nil, @main.actionCollection, "location_label"
+ KDE::WidgetAction.new @searchlabel, "Search: ", KDE::Shortcut.new(TQt::Key_F6), nil, nil, @main.actionCollection, "location_label"
@searchlabel.setBuddy @searchcombo
ca = KDE::WidgetAction.new @searchcombo, "Search", KDE::Shortcut.new, nil, nil, @main.actionCollection, "toolbar_url_combo"
ca.setAutoSized true
- Qt::WhatsThis::add @searchcombo, "Search<p>Enter a search term."
+ TQt::WhatsThis::add @searchcombo, "Search<p>Enter a search term."
end
def focus_search
@@ -270,7 +270,7 @@ module MyGui
def gui_init_proportions
# todo - save these settings
- desktop = Qt::Application::desktop
+ desktop = TQt::Application::desktop
sx = (desktop.width * (2.0/3.0)).to_i
sy = (desktop.height * (2.0/3.0)).to_i
@@ -282,10 +282,10 @@ module MyGui
@rightpane.setSizes [sy-logsize, logsize]
@panes.setSizes [resultssize, sx-resultssize]
- @rightpane.setResizeMode @logger, Qt::Splitter::KeepSize
+ @rightpane.setResizeMode @logger, TQt::Splitter::KeepSize
- @panes.setResizeMode @results_pane, Qt::Splitter::KeepSize
- @panes.setResizeMode @rightpane, Qt::Splitter::KeepSize
+ @panes.setResizeMode @results_pane, TQt::Splitter::KeepSize
+ @panes.setResizeMode @rightpane, TQt::Splitter::KeepSize
end
end
@@ -314,7 +314,7 @@ module IndexStorage
def load_indexes
return false unless File.exists? index_fname
- Qt::Application::setOverrideCursor(Qt::Cursor.new Qt::WaitCursor)
+ TQt::Application::setOverrideCursor(TQt::Cursor.new TQt::WaitCursor)
File.open(index_fname, "r") {
|file|
w = Marshal.load file rescue nil
@@ -328,7 +328,7 @@ module IndexStorage
@indexed_more = false
true
}
- Qt::Application::restoreOverrideCursor
+ TQt::Application::restoreOverrideCursor
end
def save_indexes
@@ -413,7 +413,7 @@ module HTMLIndexer
|node|
text << node.nodeValue.string if node.nodeType == DOM::Node::TEXT_NODE
}
- link = Qt::Internal::cast_object_to f, DOM::HTMLLinkElement
+ link = TQt::Internal::cast_object_to f, DOM::HTMLLinkElement
if should_follow? link.href.string
title_map[link.href.string] = text
urlonly, = uri_anchor_split link.href.string
@@ -463,7 +463,7 @@ module HTMLIndexer
def index_current_document
return if @id2depth[@shown_doc_id] >= IndexDepths::Partial
- Qt::Application::setOverrideCursor(Qt::Cursor.new Qt::WaitCursor)
+ TQt::Application::setOverrideCursor(TQt::Cursor.new TQt::WaitCursor)
@indexed_more = true
@label.setText "Scanning : #{@url.prettyURL}"
log "indexing url #{@viewed.htmlDocument.URL.string.sub(@pref,"")}"
@@ -474,12 +474,12 @@ module HTMLIndexer
}
@id2depth[@shown_doc_id] = IndexDepths::Partial
@label.setText "Ready"
- Qt::Application::restoreOverrideCursor
+ TQt::Application::restoreOverrideCursor
end
def preload_text
return if @id2depth[@shown_doc_id] >= IndexDepths::Node
- Qt::Application::setOverrideCursor(Qt::Cursor.new Qt::WaitCursor)
+ TQt::Application::setOverrideCursor(TQt::Cursor.new TQt::WaitCursor)
@indexed_more = true
index_current_document
log "deep indexing url #{@viewed.htmlDocument.URL.string.sub(@pref,"")}"
@@ -496,7 +496,7 @@ module HTMLIndexer
}
@id2depth[@shown_doc_id] = IndexDepths::Node
@label.setText "Ready"
- Qt::Application::restoreOverrideCursor
+ TQt::Application::restoreOverrideCursor
end
end
@@ -544,7 +544,7 @@ module TermHighlighter
@last_highlighted_doc_id = @shown_doc_id
@to_undo = []
return if highlighted_nodes.empty?
- Qt::Application::setOverrideCursor(Qt::Cursor.new Qt::WaitCursor)
+ TQt::Application::setOverrideCursor(TQt::Cursor.new TQt::WaitCursor)
cursor_override = true
@current_matching_node_index = 0 if @current_matching_node_index.nil?
@current_matching_node_index = @current_matching_node_index.modulo highlighted_nodes.length
@@ -569,7 +569,7 @@ module TermHighlighter
|n|
next unless n.elementId == IDS::A
# link = DOM::HTMLLinkElement.new n # WTF? why doesn't this work???
- link = Qt::Internal::cast_object_to n, "DOM::HTMLLinkElement"
+ link = TQt::Internal::cast_object_to n, "DOM::HTMLLinkElement"
@current_matched_href = link.href.string
}
end
@@ -591,10 +591,10 @@ module TermHighlighter
rate = (count > 50) ? 50 : 10
allow_user_input = ((count+=1) % rate == 0)
if allow_user_input
- Qt::Application::restoreOverrideCursor if cursor_override
+ TQt::Application::restoreOverrideCursor if cursor_override
cursor_override = false
@in_node_highlight = true
- Qt::Application::eventLoop.processEvents Qt::EventLoop::AllEvents, 10
+ TQt::Application::eventLoop.processEvents TQt::EventLoop::AllEvents, 10
@in_node_highlight = false
if @skipped_highlight_requests
@timer.start 50, true
@@ -606,7 +606,7 @@ module TermHighlighter
if @skipped_highlight_requests
@timer.start 50, true
end
- Qt::Application::restoreOverrideCursor if cursor_override
+ TQt::Application::restoreOverrideCursor if cursor_override
end
def undo_highlight to_undo
@@ -638,7 +638,7 @@ class SmallIconSet
end
end
-class ProjectEditDialog < Qt::Object
+class ProjectEditDialog < TQt::Object
slots "select_file()", "slot_ok()"
@@ -650,24 +650,24 @@ class ProjectEditDialog < Qt::Object
@dialog = KDE::DialogBase.new(parent,name, true, caption,
KDE::DialogBase::Ok|KDE::DialogBase::Cancel, KDE::DialogBase::Ok, false)
- vbox = Qt::VBox.new @dialog
+ vbox = TQt::VBox.new @dialog
- grid = Qt::Grid.new 2, Qt::Horizontal, vbox
+ grid = TQt::Grid.new 2, TQt::Horizontal, vbox
- titlelabel = Qt::Label.new "Name:", grid
+ titlelabel = TQt::Label.new "Name:", grid
@title = KDE::LineEdit.new grid
titlelabel.setBuddy @title
- urllabel = Qt::Label.new "Location:", grid
- lochbox = Qt::HBox.new grid
+ urllabel = TQt::Label.new "Location:", grid
+ lochbox = TQt::HBox.new grid
@url = KDE::LineEdit.new lochbox
urllabel.setBuddy @url
- locselc = Qt::PushButton.new lochbox
+ locselc = TQt::PushButton.new lochbox
locselc.setIconSet SmallIconSet["up"]
- blub = Qt::HBox.new vbox
- Qt::Label.new "Is main one?:", blub
- @cb = Qt::CheckBox.new blub
+ blub = TQt::HBox.new vbox
+ TQt::Label.new "Is main one?:", blub
+ @cb = TQt::CheckBox.new blub
enabled = @parent.projects_data.project_list.empty?
@@ -680,10 +680,10 @@ class ProjectEditDialog < Qt::Object
@cb.setChecked true if enabled
- Qt::Object.connect @dialog, SIGNAL("okClicked()"),
+ TQt::Object.connect @dialog, SIGNAL("okClicked()"),
self, SLOT("slot_ok()")
- Qt::Object.connect locselc, SIGNAL("clicked()"),
+ TQt::Object.connect locselc, SIGNAL("clicked()"),
self, SLOT("select_file()")
@title.setFocus
@@ -694,7 +694,7 @@ class ProjectEditDialog < Qt::Object
end
def select_file
- s = Qt::FileDialog::getOpenFileName ENV["HOME"], "HTML Files (*.html)",
+ s = TQt::FileDialog::getOpenFileName ENV["HOME"], "HTML Files (*.html)",
@parent, "open file dialog", "Choose a file"
@url.setText s unless s.nil?
end
@@ -724,7 +724,7 @@ class ProjectEditDialog < Qt::Object
end
-class ProjectSelectDialog < Qt::Object
+class ProjectSelectDialog < TQt::Object
slots "edit_selected_project()", "delete_selected_project()", "project_create_button()", "project_selected()"
@@ -735,27 +735,27 @@ class ProjectSelectDialog < Qt::Object
@dialog = KDE::DialogBase.new parent,name, true, caption,
KDE::DialogBase::Ok|KDE::DialogBase::Cancel, KDE::DialogBase::Ok, false
- vbox = Qt::VBox.new @dialog
+ vbox = TQt::VBox.new @dialog
- @listbox = Qt::ListBox.new vbox
+ @listbox = TQt::ListBox.new vbox
fill_listbox
- hbox = Qt::HBox.new vbox
- button_new = Qt::PushButton.new "New...", hbox
- button_del = Qt::PushButton.new "Delete", hbox
- button_edit = Qt::PushButton.new "Edit...", hbox
+ hbox = TQt::HBox.new vbox
+ button_new = TQt::PushButton.new "New...", hbox
+ button_del = TQt::PushButton.new "Delete", hbox
+ button_edit = TQt::PushButton.new "Edit...", hbox
- Qt::Object.connect button_new, SIGNAL("clicked()"),
+ TQt::Object.connect button_new, SIGNAL("clicked()"),
self, SLOT("project_create_button()")
- Qt::Object.connect button_del, SIGNAL("clicked()"),
+ TQt::Object.connect button_del, SIGNAL("clicked()"),
self, SLOT("delete_selected_project()")
- Qt::Object.connect button_edit, SIGNAL("clicked()"),
+ TQt::Object.connect button_edit, SIGNAL("clicked()"),
self, SLOT("edit_selected_project()")
- Qt::Object.connect @listbox, SIGNAL("doubleClicked(QListBoxItem *)"),
+ TQt::Object.connect @listbox, SIGNAL("doubleClicked(TQListBoxItem *)"),
self, SLOT("project_selected()")
@dialog.setMainWidget vbox
@@ -774,8 +774,8 @@ class ProjectSelectDialog < Qt::Object
|name|
enabled = (name == @parent.projects_data.enabled_name)
icon = enabled ? "forward" : "down"
- pm = SmallIconSet[icon].pixmap(Qt::IconSet::Automatic, Qt::IconSet::Normal)
- it = Qt::ListBoxPixmap.new pm, name
+ pm = SmallIconSet[icon].pixmap(TQt::IconSet::Automatic, TQt::IconSet::Normal)
+ it = TQt::ListBoxPixmap.new pm, name
@listbox.insertItem it
}
end
@@ -827,7 +827,7 @@ module ProjectManager
end
end
- require 'yaml'
+ retquire 'yaml'
def yamlfname
ENV["HOME"] + "/.rubberdocs/projects.yaml"
@@ -863,12 +863,12 @@ module ProjectManager
end
-class RubberDoc < Qt::VBox
+class RubberDoc < TQt::VBox
slots "khtml_part_init_complete()",
"go_back()", "go_forward()", "go_home()", "goto_url()",
- "goto_search()", "clicked_result(QListBoxItem*)",
- "search(const QString&)", "update_highlight()",
+ "goto_search()", "clicked_result(TQListBoxItem*)",
+ "search(const TQString&)", "update_highlight()",
"quit()", "open_url(const KURL&)", "index_all()",
"goto_prev_match()", "goto_next_match()", "clear_location()", "activated()",
"goto_current_match_link()", "focus_search()", "focus_and_clear_search()",
@@ -914,8 +914,8 @@ class RubberDoc < Qt::VBox
init_gui
gui_init_proportions
- @timer = Qt::Timer.new self
- Qt::Object.connect @timer, SIGNAL("timeout()"),
+ @timer = TQt::Timer.new self
+ TQt::Object.connect @timer, SIGNAL("timeout()"),
self, SLOT("update_highlight()")
@viewed.openURL KDE::URL.new("about:blank")
@@ -934,7 +934,7 @@ class RubberDoc < Qt::VBox
end
def khtml_part_init_complete
- Qt::Object.disconnect @viewed, SIGNAL("completed()"),
+ TQt::Object.disconnect @viewed, SIGNAL("completed()"),
self, SLOT("khtml_part_init_complete()") if @init_connected
@pref = File.dirname first_url.url.gsub("file:","")
@@ -973,7 +973,7 @@ class RubberDoc < Qt::VBox
@viewed.document.load DOM::DOMString.new @url.url
@viewed.setUserStyleSheet "span.searchword { background-color: yellow }
span.foundword { background-color: green }"
- Qt::Application::eventLoop.processEvents Qt::EventLoop::ExcludeUserInput
+ TQt::Application::eventLoop.processEvents TQt::EventLoop::ExcludeUserInput
end
attr_accessor :current_project_name
@@ -1021,25 +1021,25 @@ class RubberDoc < Qt::VBox
}
end
- class ResultItem < Qt::ListBoxItem
+ class ResultItem < TQt::ListBoxItem
def initialize header, text
super()
@text, @header = text, header
- @font = Qt::Font.new("Helvetica", 8)
- @flags = Qt::AlignLeft | Qt::WordBreak
+ @font = TQt::Font.new("Helvetica", 8)
+ @flags = TQt::AlignLeft | TQt::WordBreak
end
def paint painter
w, h = width(listBox), height(listBox)
header_height = (text_height @font, @header) + 5
painter.setFont @font
- painter.fillRect 5, 5, w - 10, header_height, Qt::Brush.new(Qt::Color.new 150,100,150)
+ painter.fillRect 5, 5, w - 10, header_height, TQt::Brush.new(TQt::Color.new 150,100,150)
painter.drawText 5, 5, w - 10, header_height, @flags, @header
- painter.fillRect 5, header_height, w - 10, h - 10, Qt::Brush.new(Qt::Color.new 100,150,150)
+ painter.fillRect 5, header_height, w - 10, h - 10, TQt::Brush.new(TQt::Color.new 100,150,150)
painter.setFont @font
painter.drawText 5, header_height + 2, w - 10, h - 10, @flags, @text
end
def text_height font, text
- fm = Qt::FontMetrics.new font
+ fm = TQt::FontMetrics.new font
br = fm.boundingRect 0, 0, width(listBox) - 20, 8192, @flags, text
br.height
end
@@ -1226,11 +1226,11 @@ w.begin
=> crashes badly
(RECHECK)
-./kde.rb:29:in `method_missing': Cannot handle 'const QIconSet&' as argument to QTabWidget::changeTab (ArgumentError)
+./kde.rb:29:in `method_missing': Cannot handle 'const TQIconSet&' as argument to TQTabWidget::changeTab (ArgumentError)
from ./kde.rb:29:in `initialize'
from ./kde.rb:92:in `new'
from ./kde.rb:92
-for param nil given to param const QIconSet &
+for param nil given to param const TQIconSet &
occurs frequently
dum di dum
@@ -1238,10 +1238,10 @@ dum di dum
can't get tabwidget working. umm... wonder what i'm messing up... (RECHECK)
tabwidget = KDE::TabWidget.new browser
- tabwidget.setTabPosition Qt::TabWidget::Top
+ tabwidget.setTabPosition TQt::TabWidget::Top
@viewed = KDE::HTMLPart.new tabwidget
w2 = KDE::HTMLPart.new tabwidget
- tabwidget.changeTab @viewed, Qt::IconSet.new, "blah blah"
+ tabwidget.changeTab @viewed, TQt::IconSet.new, "blah blah"
tabwidget.showPage @viewed
tabwidget.show
@viewed.show
@@ -1249,7 +1249,7 @@ can't get tabwidget working. umm... wonder what i'm messing up... (RECHECK)
# possible BUG DOM::Text.new(node).data.string # strange that this one doesn't work... (RECHECK)
wierd khtml bug
- @rightpane.setResizeMode @viewed, Qt::Splitter::KeepSize
+ @rightpane.setResizeMode @viewed, TQt::Splitter::KeepSize
in order to use KURL's as constants one must place this KApplication init
at the top of the file otherwise KInstance isn't init'ed before KURL usage
@@ -1262,4 +1262,4 @@ class ProjectSelectDialog < KDE::DialogBase
end
end
-# painter.fillRect 5, 5, width(listBox) - 10, height(listBox) - 10, Qt::Color.new(255,0,0)
+# painter.fillRect 5, 5, width(listBox) - 10, height(listBox) - 10, TQt::Color.new(255,0,0)
diff --git a/korundum/rubylib/examples/dcop/dcopcall.rb b/korundum/rubylib/examples/dcop/dcopcall.rb
index f3b532ef..3676525c 100755
--- a/korundum/rubylib/examples/dcop/dcopcall.rb
+++ b/korundum/rubylib/examples/dcop/dcopcall.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-require 'Korundum'
+retquire 'Korundum'
include KDE
class SenderWidget < PushButton
@@ -15,7 +15,7 @@ class SenderWidget < PushButton
dcopRef = DCOPRef.new("dcopslot", "MyWidget")
#
# Note that there are three different ways to make a DCOP call():
- # 1) result = dcopRef.call("getPoint(QString)", "Hello from dcopcall")
+ # 1) result = dcopRef.call("getPoint(TQString)", "Hello from dcopcall")
# 2) result = dcopRef.call("getPoint", "Hello from dcopcall")
# 3) result = dcopRef.getPoint("Hello from dcopcall")
#
diff --git a/korundum/rubylib/examples/dcop/dcoppredicate.rb b/korundum/rubylib/examples/dcop/dcoppredicate.rb
index 82a9c8b4..6117643f 100755
--- a/korundum/rubylib/examples/dcop/dcoppredicate.rb
+++ b/korundum/rubylib/examples/dcop/dcoppredicate.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-require 'Korundum'
+retquire 'Korundum'
include KDE
class SenderWidget < PushButton
diff --git a/korundum/rubylib/examples/dcop/dcopsend.rb b/korundum/rubylib/examples/dcop/dcopsend.rb
index 9365473b..6511e246 100755
--- a/korundum/rubylib/examples/dcop/dcopsend.rb
+++ b/korundum/rubylib/examples/dcop/dcopsend.rb
@@ -1,11 +1,11 @@
#!/usr/bin/env ruby
-require 'Korundum'
+retquire 'Korundum'
class SenderWidget < KDE::PushButton
def initialize(parent, name)
super
- Qt::Object::connect(self, SIGNAL('clicked()'), self, SLOT('doit()'))
+ TQt::Object::connect(self, SIGNAL('clicked()'), self, SLOT('doit()'))
end
slots 'doit()'
@@ -13,7 +13,7 @@ class SenderWidget < KDE::PushButton
def doit()
#
# Note that there are three different ways to make a DCOP send():
- # 1) dcopRef.send("mySlot(QString)", "Hello from dcopsend")
+ # 1) dcopRef.send("mySlot(TQString)", "Hello from dcopsend")
# 2) dcopRef.send("mySlot", "Hello from dcopsend")
#
dcopRef = KDE::DCOPRef.new("dcopslot", "MyWidget")
diff --git a/korundum/rubylib/examples/dcop/dcopsignal.rb b/korundum/rubylib/examples/dcop/dcopsignal.rb
index 07a6dfee..f123a62d 100755
--- a/korundum/rubylib/examples/dcop/dcopsignal.rb
+++ b/korundum/rubylib/examples/dcop/dcopsignal.rb
@@ -1,13 +1,13 @@
#!/usr/bin/env ruby
-require 'Korundum'
+retquire 'Korundum'
class SenderWidget < KDE::PushButton
- k_dcop_signals 'void testEmitSignal(QString)'
+ k_dcop_signals 'void testEmitSignal(TQString)'
def initialize(parent, name)
super
- Qt::Object::connect(self, SIGNAL('clicked()'), self, SLOT('doit()'))
+ TQt::Object::connect(self, SIGNAL('clicked()'), self, SLOT('doit()'))
end
slots 'doit()'
diff --git a/korundum/rubylib/examples/dcop/dcopslot.rb b/korundum/rubylib/examples/dcop/dcopslot.rb
index e600dfdb..99fd6fef 100755
--- a/korundum/rubylib/examples/dcop/dcopslot.rb
+++ b/korundum/rubylib/examples/dcop/dcopslot.rb
@@ -1,6 +1,6 @@
#!/usr/bin/env ruby
-require 'Korundum'
+retquire 'Korundum'
# This is an example of a KDE class that has 'k_dcop' slots declarations, but
# isn't a subclass of DCOPObject. The following four methods are added to your
@@ -21,11 +21,11 @@ require 'Korundum'
#
class MyWidget < KDE::PushButton
- k_dcop 'void mySlot(QString)',
- 'QPoint getPoint(QString)',
- 'QMap<QCString,DCOPRef> actionMap()',
- 'QValueList<DCOPRef> windowList()',
- 'QValueList<QCString> propertyNames(bool)',
+ k_dcop 'void mySlot(TQString)',
+ 'TQPoint getPoint(TQString)',
+ 'TQMap<TQCString,DCOPRef> actionMap()',
+ 'TQValueList<DCOPRef> windowList()',
+ 'TQValueList<TQCString> propertyNames(bool)',
'KURL::List urlList()',
'bool isFoo()',
'bool hasBar()'
@@ -40,7 +40,7 @@ class MyWidget < KDE::PushButton
def getPoint(msg)
puts "message: #{msg}"
- return Qt::Point.new(50, 100)
+ return TQt::Point.new(50, 100)
end
def actionMap()
@@ -80,9 +80,9 @@ a = KDE::UniqueApplication.new()
slottest = MyWidget.new(nil, "mywidget") { setText "DCOP Slot Test" }
a.mainWidget = slottest
slottest.caption = a.makeStdCaption("DCOP Slot Test")
-result = slottest.connectDCOPSignal("dcopsignal", "SenderWidget", "testEmitSignal(QString)", "mySlot(QString)", true)
+result = slottest.connectDCOPSignal("dcopsignal", "SenderWidget", "testEmitSignal(TQString)", "mySlot(TQString)", true)
puts "result: #{result}"
slottest.show()
-# Qt::Internal::setDebug Qt::QtDebugChannel::QTDB_ALL
+# TQt::Internal::setDebug TQt::QtDebugChannel::TQTDB_ALL
a.exec()
diff --git a/korundum/rubylib/examples/dcop/dcoptest.rb b/korundum/rubylib/examples/dcop/dcoptest.rb
index 1a3a37e7..c0654fd8 100755
--- a/korundum/rubylib/examples/dcop/dcoptest.rb
+++ b/korundum/rubylib/examples/dcop/dcoptest.rb
@@ -33,7 +33,7 @@ copyright holder.
=end
-require 'Korundum'
+retquire 'Korundum'
module DCOPTest
@@ -100,7 +100,7 @@ puts "Start a kwrite instance"
error = ""
dcopService = ""
-pid = Qt::Integer.new
+pid = TQt::Integer.new
errcode = KDE::Application.startServiceByDesktopName("kwrite", "", error, dcopService, pid)
dcopService = "kwrite-" + pid.to_s
diff --git a/korundum/rubylib/examples/dcop/petshop.rb b/korundum/rubylib/examples/dcop/petshop.rb
index a3f960c1..5847c1f7 100755
--- a/korundum/rubylib/examples/dcop/petshop.rb
+++ b/korundum/rubylib/examples/dcop/petshop.rb
@@ -5,15 +5,15 @@
# derived from server.py example in tdebindings written by Torben Weis
# and Julian Rockey
-require 'Korundum'
+retquire 'Korundum'
# An object with DCOP slots needn't be a subclass of DCOPObject, but
# this DeadParrotObject is one
class DeadParrotObject < KDE::DCOPObject
- k_dcop 'QString getParrotType()', 'void setParrotType(QString)',
- 'QString squawk()', 'QStringList adjectives()',
+ k_dcop 'TQString getParrotType()', 'void setParrotType(TQString)',
+ 'TQString squawk()', 'TQStringList adjectives()',
'int age()', 'void setAge(int)'
def initialize(id = 'dead parrot')
diff --git a/korundum/rubylib/examples/kludgeror.rb b/korundum/rubylib/examples/kludgeror.rb
index 535936b2..ca805306 100644
--- a/korundum/rubylib/examples/kludgeror.rb
+++ b/korundum/rubylib/examples/kludgeror.rb
@@ -1,10 +1,10 @@
#!/usr/bin/env ruby
-# A quick and dirty web browser demonstrating the direct instantiation
+# A tquick and dirty web browser demonstrating the direct instantiation
# of a KHTML part. Needless to say: this is NOT a programming paragon :)
# -- gg.
# AK - ported to ruby
-require 'Korundum'
+retquire 'Korundum'
opt = [ [ "+[url]", "An URL to open at startup.", "" ],
[ "z", "A dummy binary option.", "" ],
@@ -12,8 +12,8 @@ opt = [ [ "+[url]", "An URL to open at startup.", ""
[ "boz <file>", "Same as above with default value", "default.txt" ],
]
-#Qt::Internal::setDebug Qt::QtDebugChannel::QTDB_ALL
-# Qt.debug_level = Qt::DebugLevel::High
+#TQt::Internal::setDebug TQt::QtDebugChannel::TQTDB_ALL
+# Qt.debug_level = TQt::DebugLevel::High
about = KDE::AboutData.new("kludgeror", "Kludgeror", "0.1", "A basic web browser")
KDE::CmdLineArgs::init(ARGV, about)
@@ -22,9 +22,9 @@ args = KDE::CmdLineArgs::parsedArgs
a = KDE::Application.new # BUG, application shouldn't be needed at the top, lets fix this...
-class PartHolder < Qt::Object
- signals "setLocBarText(const QString&)"
- slots "reload()", "goToURL(const QString&)", "back()", "openURL(const KURL&)" # BUG - the slots should be normalize wrt spaces by the lib
+class PartHolder < TQt::Object
+ signals "setLocBarText(const TQString&)"
+ slots "reload()", "goToURL(const TQString&)", "back()", "openURL(const KURL&)" # BUG - the slots should be normalize wrt spaces by the lib
attr_accessor :part, :history
@@ -73,7 +73,7 @@ doc = KDE::HTMLPart.new toplevel, nil, toplevel, nil, 1
# doc = KDE::HTMLPart.new toplevel, nil, toplevel, nil, 1 # KDE::HTMLPart::BrowserViewGUI
ph = PartHolder.new doc
-Qt::Object::connect doc.browserExtension, SIGNAL("openURLRequest(const KURL&, const KParts::URLArgs&)"),
+TQt::Object::connect doc.browserExtension, SIGNAL("openURLRequest(const KURL&, const KParts::URLArgs&)"),
ph, SLOT("openURL(const KURL&)") # BUG this slot must be screwing up wrt marshalling?
ph.openURL url
@@ -103,7 +103,7 @@ begin
d.documentElement.appendChild locBar
end
-a1 = KDE::Action.new( "Reload", "reload", KDE::Shortcut.new(Qt::Key_F5), ph, SLOT("reload()"), doc.actionCollection, "reload" )
+a1 = KDE::Action.new( "Reload", "reload", KDE::Shortcut.new(TQt::Key_F5), ph, SLOT("reload()"), doc.actionCollection, "reload" )
a2 = KDE::Action.new( "Exit", "exit", KDE::Shortcut.new(0), a, SLOT("quit()"), doc.actionCollection, "exit" )
toplevel.guiFactory.addClient doc
@@ -111,7 +111,7 @@ toplevel.guiFactory.addClient doc
locBar = toplevel.toolBar("locationBar");
locBar.insertButton "back", BACK_B, SIGNAL("clicked()"),
ph, SLOT("back()"), true, "Go back"
-locBar.insertLined url.url, LOC_ED, SIGNAL("returnPressed(const QString&)"), ph, SLOT("goToURL(const QString&)"), true, "Location"
+locBar.insertLined url.url, LOC_ED, SIGNAL("returnPressed(const TQString&)"), ph, SLOT("goToURL(const TQString&)"), true, "Location"
locBar.insertButton "locationbar_erase", ERASE_B, SIGNAL("clicked()"),
locBar.getLined(LOC_ED), SLOT("clear()"), true, "Erase the location bar's content", 2
locBar.setItemAutoSized LOC_ED, true
@@ -119,20 +119,20 @@ locBar.getLined(LOC_ED).createPopupMenu
comp = locBar.getLined(LOC_ED).completionObject
comp.setCompletionMode KDE::GlobalSettings::CompletionPopupAuto
-Qt::Object::connect(locBar.getLined(LOC_ED), SIGNAL("returnPressed(const QString&)"),
- comp, SLOT("addItem(const QString&)"))
-Qt::Object::connect(ph, SIGNAL("setLocBarText(const QString&)"), # BUG - once again...
- locBar.getLined(LOC_ED), SLOT("setText(const QString&)"))
+TQt::Object::connect(locBar.getLined(LOC_ED), SIGNAL("returnPressed(const TQString&)"),
+ comp, SLOT("addItem(const TQString&)"))
+TQt::Object::connect(ph, SIGNAL("setLocBarText(const TQString&)"), # BUG - once again...
+ locBar.getLined(LOC_ED), SLOT("setText(const TQString&)"))
doc.setJScriptEnabled true
doc.setJavaEnabled true
doc.setPluginsEnabled true
-doc.setURLCursor Qt::Cursor.new(Qt::PointingHandCursor)
+doc.setURLCursor TQt::Cursor.new(TQt::PointingHandCursor)
a.setTopWidget doc.widget
-Qt::Object::connect doc, SIGNAL("setWindowCaption(const QString&)"),
- doc.widget.topLevelWidget, SLOT("setCaption(const QString&)")
+TQt::Object::connect doc, SIGNAL("setWindowCaption(const TQString&)"),
+ doc.widget.topLevelWidget, SLOT("setCaption(const TQString&)")
toplevel.show
a.exec
diff --git a/korundum/rubylib/examples/kurldemo.rb b/korundum/rubylib/examples/kurldemo.rb
index 1cd41879..b3d13407 100644
--- a/korundum/rubylib/examples/kurldemo.rb
+++ b/korundum/rubylib/examples/kurldemo.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/examples/menudemo.rb b/korundum/rubylib/examples/menudemo.rb
index d966c40c..a6ecada5 100644
--- a/korundum/rubylib/examples/menudemo.rb
+++ b/korundum/rubylib/examples/menudemo.rb
@@ -38,7 +38,7 @@ dealings in this Software without prior written authorization from the
copyright holder.
=end
-require 'Korundum'
+retquire 'Korundum'
include KDE
class MainWin < MainWindow
@@ -98,7 +98,7 @@ class MainWin < MainWindow
# Need to assign an icon to actionMenu below
icons = IconLoader.new()
- iconSet = Qt::IconSet.new(icons.loadIcon("viewmag", Icon::Toolbar))
+ iconSet = TQt::IconSet.new(icons.loadIcon("viewmag", Icon::Toolbar))
# Nested menus using KActions (also nested on toolbar)
@actionMenu = ActionMenu.new("Action Menu")
@@ -116,7 +116,7 @@ class MainWin < MainWindow
end
def initMenus()
- fileMenu = Qt::PopupMenu.new(self)
+ fileMenu = TQt::PopupMenu.new(self)
@newAction.plug(fileMenu)
@openAction.plug(fileMenu)
fileMenu.insertSeparator()
@@ -128,7 +128,7 @@ class MainWin < 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()
@@ -143,7 +143,7 @@ class MainWin < MainWindow
@specialAction.plug(editMenu)
menuBar().insertItem(i18n("&Edit"), editMenu)
- demoMenu = Qt::PopupMenu.new(self)
+ demoMenu = TQt::PopupMenu.new(self)
@toggle1Action.plug(demoMenu)
@toggle2Action.plug(demoMenu)
@separateAction.plug(demoMenu)
@@ -196,7 +196,7 @@ class MainWin < MainWindow
# to the full width of the toolbar when the window is
# maximized (comment out the next two lines to see
# what happens)
- stretchlbl = Qt::Label.new("", toolBar())
+ stretchlbl = TQt::Label.new("", toolBar())
toolBar().setStretchableWidget(stretchlbl)
# toolBar().setHorizontalStretchable(false)
diff --git a/korundum/rubylib/examples/mimetype.rb b/korundum/rubylib/examples/mimetype.rb
index 24c2d11f..492bd886 100644
--- a/korundum/rubylib/examples/mimetype.rb
+++ b/korundum/rubylib/examples/mimetype.rb
@@ -41,7 +41,7 @@ dealings in this Software without prior written authorization from the
copyright holder.
=end
-require 'Korundum'
+retquire 'Korundum'
include KDE
class MainWin < MainWindow
@@ -63,15 +63,15 @@ class MainWin < MainWindow
end
-class OfferListTab < Qt::Widget
+class OfferListTab < TQt::Widget
def initialize(parent, name = "")
super(parent, name)
setGeometry(0, 0, 500, 370)
- lvLbl = Qt::Label.new("Offers - text/html", self)
+ lvLbl = TQt::Label.new("Offers - text/html", self)
lvLbl.setGeometry(10, 10, 150, 20)
- lv = Qt::ListView.new(self)
+ lv = TQt::ListView.new(self)
lv.setSorting(-1)
lv.addColumn("type", 75)
lv.addColumn("name", 100)
@@ -83,30 +83,30 @@ class OfferListTab < Qt::Widget
# insert list items in reverse order
pref = KDE::ServiceTypeProfile.preferredService("Application", "image/jpeg")
- Qt::ListViewItem.new(lv, pref.type(), pref.name(), pref.exec(), pref.library())
- Qt::ListViewItem.new(lv, "Preferred", "--------", "", "")
- Qt::ListViewItem.new(lv, "", "", "", "")
+ TQt::ListViewItem.new(lv, pref.type(), pref.name(), pref.exec(), pref.library())
+ TQt::ListViewItem.new(lv, "Preferred", "--------", "", "")
+ TQt::ListViewItem.new(lv, "", "", "", "")
trader = KDE::Trader.self()
slist = trader.query("image/jpeg", "Type == 'Application'")
# print "KTrader returned:" + slist
slist.each do |s|
- lvi = Qt::ListViewItem.new(lv, s.type(), s.name(), s.exec(), s.library())
+ lvi = TQt::ListViewItem.new(lv, s.type(), s.name(), s.exec(), s.library())
end
lv.show()
end
end
-class KServiceTypeTab < Qt::Widget
+class KServiceTypeTab < TQt::Widget
def initialize(parent, name = "")
super(parent, name)
setGeometry(0, 0, 500, 370)
- lvLbl = Qt::Label.new("All Service Types", self)
+ lvLbl = TQt::Label.new("All Service Types", self)
lvLbl.setGeometry(10, 10, 250, 20)
- lv = Qt::ListView.new(self)
+ lv = TQt::ListView.new(self)
lv.addColumn("name", 150)
lv.addColumn("desktopEntryPath", 300)
lv.setGeometry(10, 30, 500, 300)
@@ -115,14 +115,14 @@ class KServiceTypeTab < Qt::Widget
slist = KDE::ServiceType.allServiceTypes()
slist.each do |s|
- lvi = Qt::ListViewItem.new(lv, s.name(), s.desktopEntryPath())
+ lvi = TQt::ListViewItem.new(lv, s.name(), s.desktopEntryPath())
end
lv.show()
end
end
-class KSycocaEntryTab < Qt::Widget
+class KSycocaEntryTab < TQt::Widget
def initialize(parent, name = "")
super(parent, name)
@@ -131,10 +131,10 @@ class KSycocaEntryTab < Qt::Widget
return
end
setGeometry(0, 0, 500, 370)
- lvLbl = Qt::Label.new("Entries - 'screensavers': " + grp.name(), self)
+ lvLbl = TQt::Label.new("Entries - 'screensavers': " + grp.name(), self)
lvLbl.setGeometry(10, 10, 250, 20)
- lv = Qt::ListView.new(self)
+ lv = TQt::ListView.new(self)
lv.addColumn("name", 150)
lv.addColumn("entryPath", 300)
lv.setGeometry(10, 30, 500, 300)
@@ -143,22 +143,22 @@ class KSycocaEntryTab < Qt::Widget
slist = grp.entries(false, false)
slist.each do |s|
- lvi = Qt::ListViewItem.new(lv, s.name(), s.entryPath())
+ lvi = TQt::ListViewItem.new(lv, s.name(), s.entryPath())
end
lv.show()
end
end
-class KServiceTab < Qt::Widget
+class KServiceTab < TQt::Widget
def initialize(parent, name = "")
super(parent, name)
setGeometry(0, 0, 500, 370)
- lvLbl = Qt::Label.new("All Services", self)
+ lvLbl = TQt::Label.new("All Services", self)
lvLbl.setGeometry(10, 10, 150, 20)
- lv = Qt::ListView.new(self)
+ lv = TQt::ListView.new(self)
lv.addColumn("type", 75)
lv.addColumn("name", 100)
lv.addColumn("exec", 200)
@@ -168,7 +168,7 @@ class KServiceTab < Qt::Widget
slist = KDE::Service.allServices()
slist.each do |s|
- lvi = Qt::ListViewItem.new(lv, s.type(), s.name(), s.exec(), s.library())
+ lvi = TQt::ListViewItem.new(lv, s.type(), s.name(), s.exec(), s.library())
end
lv.show()
@@ -183,12 +183,12 @@ end
# print svc.library ()
-class KMimeTypeTab < Qt::Widget
+class KMimeTypeTab < TQt::Widget
def initialize(parent, name = "")
super(parent, name)
setGeometry(0, 0, 500, 370)
- lbLbl = Qt::Label.new("All Mimetypes", self)
+ lbLbl = TQt::Label.new("All Mimetypes", self)
lbLbl.setGeometry(10, 10, 150, 20)
lb = KDE::ListBox.new(self)
lb.setGeometry(10, 30, 200, 300)
@@ -207,62 +207,62 @@ class KMimeTypeTab < Qt::Widget
y = 10
mt = KDE::MimeType.mimeType("text/plain")
- mtlbl = Qt::Label.new("KMimeType.mimeType('text/plain')", self)
+ mtlbl = TQt::Label.new("KMimeType.mimeType('text/plain')", self)
mtlbl.setGeometry(x, y, 250, 20)
- mtnamelbl = Qt::Label.new("name", self)
+ mtnamelbl = TQt::Label.new("name", self)
mtnamelbl.setGeometry(x + 15, y + 20, 100, 20)
- mtname = Qt::Label.new(mt.name(), self)
+ mtname = TQt::Label.new(mt.name(), self)
mtname.setGeometry(x + 120, y + 20, 100, 20)
- mtdesklbl = Qt::Label.new("desktopEntryPath", self)
+ mtdesklbl = TQt::Label.new("desktopEntryPath", self)
mtdesklbl.setGeometry(x + 15, y + 40, 100, 20)
- mtdesk = Qt::Label.new(mt.desktopEntryPath(), self)
+ mtdesk = TQt::Label.new(mt.desktopEntryPath(), self)
mtdesk.setGeometry(x + 120, y + 40, 150, 20)
y = y + 80
fp = KDE::MimeType.findByPath("mimetype.rb")
- fplbl = Qt::Label.new("KDE::MimeType.findByPath('mimetype.rb')", self)
+ fplbl = TQt::Label.new("KDE::MimeType.findByPath('mimetype.rb')", self)
fplbl.setGeometry(x, y, 250, 20)
- fpnamelbl = Qt::Label.new("name", self)
+ fpnamelbl = TQt::Label.new("name", self)
fpnamelbl.setGeometry(x + 15, y + 20, 100, 20)
- fpname = Qt::Label.new(fp.name(), self)
+ fpname = TQt::Label.new(fp.name(), self)
fpname.setGeometry(x + 120, y + 20, 100, 20)
- fpdesklbl = Qt::Label.new("desktopEntryPath", self)
+ fpdesklbl = TQt::Label.new("desktopEntryPath", self)
fpdesklbl.setGeometry(x + 15, y + 40, 100, 20)
- fpdesk = Qt::Label.new(fp.desktopEntryPath(), self)
+ fpdesk = TQt::Label.new(fp.desktopEntryPath(), self)
fpdesk.setGeometry(x + 120, y + 40, 150, 20)
y = y + 80
fu = KDE::MimeType.findByURL(KDE::URL.new("file://mimetype.rb"))
- fulbl = Qt::Label.new("KDE::MimeType.findByURL('file://mimetype.rb')", self)
+ fulbl = TQt::Label.new("KDE::MimeType.findByURL('file://mimetype.rb')", self)
fulbl.setGeometry(x, y, 250, 20)
- funamelbl = Qt::Label.new("name", self)
+ funamelbl = TQt::Label.new("name", self)
funamelbl.setGeometry(x + 15, y + 20, 100, 20)
- funame = Qt::Label.new(fu.name(), self)
+ funame = TQt::Label.new(fu.name(), self)
funame.setGeometry(x + 120, y + 20, 100, 20)
- fudesklbl = Qt::Label.new("desktopEntryPath", self)
+ fudesklbl = TQt::Label.new("desktopEntryPath", self)
fudesklbl.setGeometry(x + 15, y + 40, 100, 20)
- fudesk = Qt::Label.new(fu.desktopEntryPath(), self)
+ fudesk = TQt::Label.new(fu.desktopEntryPath(), self)
fudesk.setGeometry(x + 120, y + 40, 150, 20)
y = y + 80
- acc = Qt::Integer.new(0) # Create a mutable integer value to pass as an 'int*' arg
+ acc = TQt::Integer.new(0) # Create a mutable integer value to pass as an 'int*' arg
fc = KDE::MimeType.findByFileContent("mimetype.rb", acc)
- fclbl = Qt::Label.new("KDE::MimeType.findByFileContent('mimetype.rb')", self)
+ fclbl = TQt::Label.new("KDE::MimeType.findByFileContent('mimetype.rb')", self)
fclbl.setGeometry(x, y, 250, 20)
- fcnamelbl = Qt::Label.new("name", self)
+ fcnamelbl = TQt::Label.new("name", self)
fcnamelbl.setGeometry(x + 15, y + 20, 100, 20)
- fcname = Qt::Label.new(fc.name(), self)
+ fcname = TQt::Label.new(fc.name(), self)
fcname.setGeometry(x + 120, y + 20, 100, 20)
- fcdesklbl = Qt::Label.new("desktopEntryPath", self)
+ fcdesklbl = TQt::Label.new("desktopEntryPath", self)
fcdesklbl.setGeometry(x + 15, y + 40, 100, 20)
- fcdesk = Qt::Label.new(fc.desktopEntryPath(), self)
+ fcdesk = TQt::Label.new(fc.desktopEntryPath(), self)
fcdesk.setGeometry(x + 120, y + 40, 100, 20)
- fcacclbl = Qt::Label.new("accuracy", self)
+ fcacclbl = TQt::Label.new("accuracy", self)
fcacclbl.setGeometry(x + 15, y + 60, 100, 20)
- fcacc = Qt::Label.new(acc.to_s, self)
+ fcacc = TQt::Label.new(acc.to_s, self)
fcacc.setGeometry(x + 120, y + 60, 150, 20)
end
end
diff --git a/korundum/rubylib/examples/rbKHTMLPart.rb b/korundum/rubylib/examples/rbKHTMLPart.rb
index 8d28e303..8fff04c5 100644
--- a/korundum/rubylib/examples/rbKHTMLPart.rb
+++ b/korundum/rubylib/examples/rbKHTMLPart.rb
@@ -42,7 +42,7 @@ lifted from the KDE classref.
=end
-require 'Korundum'
+retquire 'Korundum'
# Note that we use KParts.MainWindow, not KMainWindow as the superclass
# (KParts.MainWindow subclasses KMainWindow). Also, be sure the 'apply'
diff --git a/korundum/rubylib/examples/rbtestimage.png b/korundum/rubylib/examples/rbtestimage.png
index 550371b1..8ca4166e 100644
--- a/korundum/rubylib/examples/rbtestimage.png
+++ b/korundum/rubylib/examples/rbtestimage.png
Binary files differ
diff --git a/korundum/rubylib/examples/systray.rb b/korundum/rubylib/examples/systray.rb
index b09f0408..04d1aa08 100644
--- a/korundum/rubylib/examples/systray.rb
+++ b/korundum/rubylib/examples/systray.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/examples/uikmdi.rb b/korundum/rubylib/examples/uikmdi.rb
index df7d0e1d..0846388c 100644
--- a/korundum/rubylib/examples/uikmdi.rb
+++ b/korundum/rubylib/examples/uikmdi.rb
@@ -32,14 +32,14 @@ All is not rosy, however:
=end
-require 'Korundum'
+retquire 'Korundum'
include KDE
class KmdiExample < KDE::MdiMainFrm
slots 'closeChild(KMdiChildView*)',
'syncFromChildView(KMdiChildView*)',
- 'syncFromMainTool(QListBoxItem*)',
+ 'syncFromMainTool(TQListBoxItem*)',
'activatedMessage(KMdiChildView*)',
'newView()', 'close()', 'closeActiveChild()'
@@ -84,7 +84,7 @@ class KmdiExample < KDE::MdiMainFrm
connect(self, SIGNAL('viewActivated(KMdiChildView*)'), self, SLOT('activatedMessage(KMdiChildView*)'))
connect(self, SIGNAL('viewActivated(KMdiChildView*)'), self, SLOT('syncFromChildView(KMdiChildView*)'))
- connect(@maintool, SIGNAL('selectionChanged(QListBoxItem*)'), self, SLOT('syncFromMainTool(QListBoxItem*)'))
+ connect(@maintool, SIGNAL('selectionChanged(TQListBoxItem*)'), self, SLOT('syncFromMainTool(TQListBoxItem*)'))
syncFromChildView(activeWindow())
end
@@ -120,11 +120,11 @@ class KmdiExample < KDE::MdiMainFrm
view = MdiChildView.new(label, self)
@childs[label] = view
view.setIcon(getIcon(icon))
- layout = Qt::VBoxLayout.new(view)
+ layout = TQt::VBoxLayout.new(view)
layout.setAutoAdd(true)
- lbl = Qt::Label.new(i18n("Label for a view with an icon named #{text}"), view)
- pxm = Qt::Label.new('', view)
+ lbl = TQt::Label.new(i18n("Label for a view with an icon named #{text}"), view)
+ pxm = TQt::Label.new('', view)
pxm.setPixmap(getIcon(icon, Icon::NoGroup, KDE::Icon::SizeLarge))
addWindow(view)
@mainToolWidget.insertItem(label)
diff --git a/korundum/rubylib/examples/uimodules/uidialogs.rb b/korundum/rubylib/examples/uimodules/uidialogs.rb
index 524cc73a..72f1ca80 100644
--- a/korundum/rubylib/examples/uimodules/uidialogs.rb
+++ b/korundum/rubylib/examples/uimodules/uidialogs.rb
@@ -2,7 +2,7 @@
This is a ruby version of Jim Bublitz's pytde program, translated by Richard Dale
=end
-require 'Korundum'
+retquire 'Korundum'
module UIDialogs
@@ -16,15 +16,15 @@ class CustomDlg < KDE::Dialog
x = 20
y = 10
- rLbl = Qt::Label.new("r", self)
- gLbl = Qt::Label.new("g", self)
- bLbl = Qt::Label.new("b", self)
- @rEd = Qt::LineEdit.new("64", self)
- @gEd = Qt::LineEdit.new("64", self)
- @bEd = Qt::LineEdit.new("64", self)
- dlgBtn = Qt::PushButton.new("Set/Get Color", self)
- okBtn = Qt::PushButton.new("OK", self)
- canBtn = Qt::PushButton.new("Cancel", self)
+ rLbl = TQt::Label.new("r", self)
+ gLbl = TQt::Label.new("g", self)
+ bLbl = TQt::Label.new("b", self)
+ @rEd = TQt::LineEdit.new("64", self)
+ @gEd = TQt::LineEdit.new("64", self)
+ @bEd = TQt::LineEdit.new("64", self)
+ dlgBtn = TQt::PushButton.new("Set/Get Color", self)
+ okBtn = TQt::PushButton.new("OK", self)
+ canBtn = TQt::PushButton.new("Cancel", self)
rLbl.setGeometry(x, y, 25, 20)
gLbl.setGeometry(x + 30, y, 25, 20)
@@ -50,8 +50,8 @@ class CustomDlg < KDE::Dialog
green = @gEd.text().to_i
blue = @bEd.text().to_I
- # convert the numbers to a Qt::Color
- color = Qt::Color.new(red, green, blue)
+ # convert the numbers to a TQt::Color
+ color = TQt::Color.new(red, green, blue)
# invoke the dialog(getColor is a 'static' call)
# initialize with the colors from above(in color)
@@ -62,7 +62,7 @@ class CustomDlg < KDE::Dialog
# get the numerical color values back
# red, green, blue = color.rgb()
- # update the Qt::LineEdits in the original dialog
+ # update the TQt::LineEdits in the original dialog
@rEd.setText(red.to_s)
@gEd.setText(green.to_s)
@bEd.setText(blue.to_s)
@@ -89,15 +89,15 @@ class MessageDlg < KDE::Dialog
n = buttons.length
- grp = Qt::ButtonGroup.new(n, Qt::Vertical, "MessageBoxes", self, "button grp")
+ grp = TQt::ButtonGroup.new(n, TQt::Vertical, "MessageBoxes", self, "button grp")
grp.setGeometry(10, 10, 200, 30*n)
- (0...n).each { |i| Qt::RadioButton.new(buttons[i], grp) }
+ (0...n).each { |i| TQt::RadioButton.new(buttons[i], grp) }
connect(grp, SIGNAL("clicked(int)"), SLOT('launch(int)'))
end
def launch(which)
- which += 1 # Qt::ButtonGroup id's start at 0, but the KDE::MessageBox enum starts at 1
+ which += 1 # TQt::ButtonGroup id's start at 0, but the KDE::MessageBox enum starts at 1
if which == KDE::MessageBox::QuestionYesNo
KDE::MessageBox.questionYesNo(self, "This is a questionYesNo message box\nThere is also a list version of this dialog",\
@@ -133,7 +133,7 @@ end
def UIDialogs.dlgKAboutDialog(parent)
dlg = KDE::AboutDialog.new(parent, 'about dialog', false)
- dlg.setLogo(Qt::Pixmap.new("rbtestimage.png"))
+ dlg.setLogo(TQt::Pixmap.new("rbtestimage.png"))
dlg.setTitle("UISampler for Korundum")
dlg.setAuthor("Jim Bublitz", "[email protected]", "http://www.riverbankcomputing.co.uk",
"\n\nPyKDE -- Python bindings\n\tfor KDE")
@@ -175,17 +175,17 @@ def UIDialogs.dlgKDialogBase(parent)
# making 'page' the parent inserts the widgets in
# the VBox created above
- label = Qt::Label.new( caption, page, "caption" );
+ label = TQt::Label.new( caption, page, "caption" );
- lineedit = Qt::LineEdit.new(text_, page, "lineedit" );
+ lineedit = TQt::LineEdit.new(text_, page, "lineedit" );
lineedit.setMinimumWidth(dlg.fontMetrics().maxWidth()*20);
- label0 = Qt::Label.new("Border widths", page)
+ label0 = TQt::Label.new("Border widths", page)
# widths = dlg.getBorderWidths()
-# labelA = Qt::Label.new("Upper Left X: " + widths[0].to_s, page)
-# labelB = Qt::Label.new("Upper Left Y: " + widths[0].to_s, page)
-# labelC = Qt::Label.new("Lower Right X: " + str(c), page)
-# labelD = Qt::Label.new("Lower Right Y: " + str(d), page)
+# labelA = TQt::Label.new("Upper Left X: " + widths[0].to_s, page)
+# labelB = TQt::Label.new("Upper Left Y: " + widths[0].to_s, page)
+# labelC = TQt::Label.new("Lower Right X: " + str(c), page)
+# labelD = TQt::Label.new("Lower Right Y: " + str(d), page)
dlg.show()
end
@@ -204,7 +204,7 @@ def UIDialogs.dlgKKeyDialog(parent)
end
def UIDialogs.dlgKInputDialog(parent)
- ok = Qt::Boolean.new
+ ok = TQt::Boolean.new
result = KDE::InputDialog.getText("Enter text", "", "<Your input here>", ok)
# puts "result: %s" % result
# puts "ok: %s" % ok
@@ -231,14 +231,14 @@ end
def UIDialogs.dlgKWizard(parent)
wiz = KDE::Wizard.new(parent)
- page1 = Qt::Widget.new(wiz)
- p1Lbl = Qt::Label.new("This is page 1", page1)
+ page1 = TQt::Widget.new(wiz)
+ p1Lbl = TQt::Label.new("This is page 1", page1)
p1Lbl.setGeometry(20, 20, 100, 20)
- page2 = Qt::Widget.new(wiz)
- p2Lbl = Qt::Label.new("This is page 2", page2)
+ page2 = TQt::Widget.new(wiz)
+ p2Lbl = TQt::Label.new("This is page 2", page2)
p2Lbl.setGeometry(50, 20, 100, 20)
- page3 = Qt::Widget.new(wiz)
- p3Lbl = Qt::Label.new("This is page 3", page3)
+ page3 = TQt::Widget.new(wiz)
+ p3Lbl = TQt::Label.new("This is page 3", page3)
p3Lbl.setGeometry(80, 20, 100, 20)
wiz.addPage(page1, "Page 1")
diff --git a/korundum/rubylib/examples/uimodules/uimenus.rb b/korundum/rubylib/examples/uimodules/uimenus.rb
index 8bd1b83b..b213d7e8 100644
--- a/korundum/rubylib/examples/uimodules/uimenus.rb
+++ b/korundum/rubylib/examples/uimodules/uimenus.rb
@@ -2,7 +2,7 @@
This is a ruby version of Jim Bublitz's pytde program, translated by Richard Dale
=end
-require 'Korundum'
+retquire 'Korundum'
module UIMenus
@@ -13,7 +13,7 @@ class PageLaunch
x = 10
y = 10
- launchLbl = Qt::Label.new("Launching application ... please wait\n\nClose launched application to continue", page)
+ launchLbl = TQt::Label.new("Launching application ... please wait\n\nClose launched application to continue", page)
launchLbl.setGeometry(x, y, 300, 80)
launchLbl.show()
@@ -31,7 +31,7 @@ class PageNotImpl
x = 10
y = 10
- niLbl = Qt::Label.new("Nothing is currently implemented for this widget", page)
+ niLbl = TQt::Label.new("Nothing is currently implemented for this widget", page)
niLbl.setGeometry(x, y, 300, 20)
niLbl.show()
end
diff --git a/korundum/rubylib/examples/uimodules/uimisc.rb b/korundum/rubylib/examples/uimodules/uimisc.rb
index b5d10fc1..dad78f5d 100644
--- a/korundum/rubylib/examples/uimodules/uimisc.rb
+++ b/korundum/rubylib/examples/uimodules/uimisc.rb
@@ -2,11 +2,11 @@
This is a ruby version of Jim Bublitz's pytde program, translated by Richard Dale
=end
-require 'Korundum'
+retquire 'Korundum'
module UIMisc
-class Page3 < Qt::Object
+class Page3 < TQt::Object
slots 'ivChanged()', 'fvChanged()', 'dvChanged()'
def initialize(parent)
@@ -15,33 +15,33 @@ class Page3 < Qt::Object
x = 10
y = 15
- green = Qt::Color.new(0, 255, 0)
- yellow = Qt::Color.new(255, 255, 0)
- red = Qt::Color.new(255, 0, 0)
+ green = TQt::Color.new(0, 255, 0)
+ yellow = TQt::Color.new(255, 255, 0)
+ red = TQt::Color.new(255, 0, 0)
- ivLbl = Qt::Label.new("KIntValidator", page)
+ ivLbl = TQt::Label.new("KIntValidator", page)
ivLbl.setGeometry(x, y, 100, 20)
ivLbl.show()
@iv = KDE::LineEdit.new(page)
@iv.setGeometry(x, y + 20, 100, 20)
@iv.show()
- connect(@iv, SIGNAL("textChanged(const QString&)"), SLOT('ivChanged()'))
+ connect(@iv, SIGNAL("textChanged(const TQString&)"), SLOT('ivChanged()'))
@ivVal = KDE::IntValidator.new(page)
@ivVal.setRange(20, 50)
- ivRngLbl = Qt::Label.new("Range is 20 - 50", page)
+ ivRngLbl = TQt::Label.new("Range is 20 - 50", page)
ivRngLbl.setGeometry(x, y + 45, 100, 20)
ivRngLbl.show()
- ivAccLbl = Qt::Label.new("Acceptable", page)
+ ivAccLbl = TQt::Label.new("Acceptable", page)
ivAccLbl.setGeometry(x + 125, y + 45, 85, 20)
ivAccLbl.show()
- ivInterLbl = Qt::Label.new("Intermediate", page)
+ ivInterLbl = TQt::Label.new("Intermediate", page)
ivInterLbl.setGeometry(x + 125, y + 20, 85, 20)
ivInterLbl.show()
- ivInvalLbl = Qt::Label.new("Invalid", page)
+ ivInvalLbl = TQt::Label.new("Invalid", page)
ivInvalLbl.setGeometry(x + 125, y - 5, 85, 20)
ivInvalLbl.show()
@ivInvalLed = KDE::Led.new(red, KDE::Led::Off, KDE::Led::Sunken, KDE::Led::Circular,page)
@@ -56,29 +56,29 @@ class Page3 < Qt::Object
y = y + 100
- fvLbl = Qt::Label.new("KDoubleValidator", page)
+ fvLbl = TQt::Label.new("KDoubleValidator", page)
fvLbl.setGeometry(x, y, 100, 20)
fvLbl.show()
@fv = KDE::LineEdit.new(page)
@fv.setGeometry(x, y + 20, 100, 20)
@fv.show()
- connect(@fv, SIGNAL("textChanged(const QString&)"), SLOT('fvChanged()'))
+ connect(@fv, SIGNAL("textChanged(const TQString&)"), SLOT('fvChanged()'))
@fvVal = KDE::DoubleValidator.new(page)
@fvVal.setRange(10.0, 40.0)
- fvRngLbl = Qt::Label.new("Range is 10.0 - 40.0", page)
+ fvRngLbl = TQt::Label.new("Range is 10.0 - 40.0", page)
fvRngLbl.setGeometry(x, y + 45, 100, 20)
fvRngLbl.show()
- fvAccLbl = Qt::Label.new("Acceptable", page)
+ fvAccLbl = TQt::Label.new("Acceptable", page)
fvAccLbl.setGeometry(x + 125, y + 45, 85, 20)
fvAccLbl.show()
- fvInterLbl = Qt::Label.new("Intermediate", page)
+ fvInterLbl = TQt::Label.new("Intermediate", page)
fvInterLbl.setGeometry(x + 125, y + 20, 95, 20)
fvInterLbl.show()
- fvInvalLbl = Qt::Label.new("Invalid", page)
+ fvInvalLbl = TQt::Label.new("Invalid", page)
fvInvalLbl.setGeometry(x + 125, y - 5, 85, 20)
fvInvalLbl.show()
@fvInvalLed = KDE::Led.new(red, KDE::Led::Off, KDE::Led::Sunken, KDE::Led::Circular,page)
@@ -93,38 +93,38 @@ class Page3 < Qt::Object
y = y + 100
- dvLbl = Qt::Label.new("KDateValidator", page)
+ dvLbl = TQt::Label.new("KDateValidator", page)
dvLbl.setGeometry(x, y, 100, 20)
dvLbl.show()
@dv = KDE::LineEdit.new(page)
@dv.setGeometry(x, y + 20, 100, 20)
@dv.show()
-# connect(dv, SIGNAL("textChanged(const QString&)"), SLOT('dvChanged()'))
+# connect(dv, SIGNAL("textChanged(const TQString&)"), SLOT('dvChanged()'))
@dvVal = KDE::DateValidator.new(page)
# dvVal.setRange(10.0, 40.0)
-# dvRngLbl = Qt::Label.new("Range is 10.0 - 40.0", page)
+# dvRngLbl = TQt::Label.new("Range is 10.0 - 40.0", page)
# dvRngLbl.setGeometry(x, y + 45, 100, 20)
# dvRngLbl.show()
- dvBtn = Qt::PushButton.new("Validate", page)
+ dvBtn = TQt::PushButton.new("Validate", page)
dvBtn.setGeometry(x, y + 45, 60, 22)
dvBtn.show()
connect(dvBtn, SIGNAL("clicked()"), SLOT('dvChanged()'))
- dvNoteLbl = Qt::Label.new("Format is locale dependent\nShort date only\nTry DD-MM-YY", page)
+ dvNoteLbl = TQt::Label.new("Format is locale dependent\nShort date only\nTry DD-MM-YY", page)
dvNoteLbl.setGeometry(x, y + 70, 150, 60)
dvNoteLbl.show()
- dvAccLbl = Qt::Label.new("Acceptable", page)
+ dvAccLbl = TQt::Label.new("Acceptable", page)
dvAccLbl.setGeometry(x + 125, y + 45, 85, 20)
dvAccLbl.show()
- dvInterLbl = Qt::Label.new("Intermediate", page)
+ dvInterLbl = TQt::Label.new("Intermediate", page)
dvInterLbl.setGeometry(x + 125, y + 20, 85, 20)
dvInterLbl.show()
- dvInvalLbl = Qt::Label.new("Invalid", page)
+ dvInvalLbl = TQt::Label.new("Invalid", page)
dvInvalLbl.setGeometry(x + 125, y - 5, 85, 20)
dvInvalLbl.show()
@dvInvalLed = KDE::Led.new(red, KDE::Led::Off, KDE::Led::Sunken, KDE::Led::Circular,page)
@@ -143,12 +143,12 @@ class Page3 < Qt::Object
@ivInterLed.off()
@ivAccLed.off()
- i = Qt::Integer.new(0)
+ i = TQt::Integer.new(0)
state = @ivVal.validate(@iv.text(), i)
- if state == Qt::Validator::Acceptable
+ if state == TQt::Validator::Acceptable
@ivAccLed.on()
- elsif state == Qt::Validator::Intermediate
+ elsif state == TQt::Validator::Intermediate
@ivInterLed.on()
else
@ivInvalLed.on()
@@ -160,12 +160,12 @@ class Page3 < Qt::Object
@fvInterLed.off()
@fvAccLed.off()
- i = Qt::Integer.new(0)
+ i = TQt::Integer.new(0)
state = @fvVal.validate(@fv.text(), i)
- if state == Qt::Validator::Acceptable
+ if state == TQt::Validator::Acceptable
@fvAccLed.on()
- elsif state == Qt::Validator::Intermediate
+ elsif state == TQt::Validator::Intermediate
@fvInterLed.on()
else
@fvInvalLed.on()
@@ -177,12 +177,12 @@ class Page3 < Qt::Object
@dvInterLed.off()
@dvAccLed.off()
- i = Qt::Integer.new(0)
+ i = TQt::Integer.new(0)
state = @dvVal.validate(@dv.text(), i)
- if state == Qt::Validator::Acceptable
+ if state == TQt::Validator::Acceptable
@dvAccLed.on()
- elsif state == Qt::Validator::Intermediate
+ elsif state == TQt::Validator::Intermediate
@dvInterLed.on()
else
@dvInvalLed.on()
@@ -197,7 +197,7 @@ class PageNotImpl
x = 10
y = 10
- niLbl = Qt::Label.new("Nothing is currently implemented for this widget", page)
+ niLbl = TQt::Label.new("Nothing is currently implemented for this widget", page)
niLbl.setGeometry(x, y, 300, 20)
niLbl.show()
end
@@ -259,7 +259,7 @@ def UIMisc.miscKThemeBase(parent)
parent.currentPageObj = PageNotImpl.new(parent)
end
-def UIMisc.miscQXEmbed(parent)
+def UIMisc.miscTQXEmbed(parent)
parent.currentPageObj = PageNotImpl.new(parent)
end
diff --git a/korundum/rubylib/examples/uimodules/uiwidgets.rb b/korundum/rubylib/examples/uimodules/uiwidgets.rb
index 47e9599b..cc2d9a98 100644
--- a/korundum/rubylib/examples/uimodules/uiwidgets.rb
+++ b/korundum/rubylib/examples/uimodules/uiwidgets.rb
@@ -2,11 +2,11 @@
This is a ruby version of Jim Bublitz's pytde program, translated by Richard Dale
=end
-require 'Korundum'
+retquire 'Korundum'
module UIWidgets
-class Page1 < Qt::Object
+class Page1 < TQt::Object
slots 'restrict(int)'
def initialize(parent)
@@ -16,7 +16,7 @@ class Page1 < Qt::Object
x = 10
y = 10
- editLbl = Qt::Label.new("KTextEdit", page)
+ editLbl = TQt::Label.new("KTextEdit", page)
editLbl.setGeometry(x, y, 50, 20)
editLbl.show()
@@ -33,9 +33,9 @@ class Page1 < Qt::Object
parent.edit.show()
y = y + 125
- searchBtn = Qt::PushButton.new("Search", page)
- replaceBtn = Qt::PushButton.new("Replace", page)
- gotoBtn = Qt::PushButton.new("GoTo Line", page)
+ searchBtn = TQt::PushButton.new("Search", page)
+ replaceBtn = TQt::PushButton.new("Replace", page)
+ gotoBtn = TQt::PushButton.new("GoTo Line", page)
searchBtn.setGeometry(x, y, 60, 22)
replaceBtn.setGeometry(x + 90, y, 60, 22)
@@ -51,7 +51,7 @@ class Page1 < Qt::Object
y = y + 35
- lineeditLbl = Qt::Label.new("KLineEdit", page)
+ lineeditLbl = TQt::Label.new("KLineEdit", page)
lineeditLbl.setGeometry(x, y, 70, 20)
lineeditLbl.show()
@@ -59,7 +59,7 @@ class Page1 < Qt::Object
lineedit.setGeometry(x, y + 20, 100, 20)
lineedit.show()
- intLbl = Qt::Label.new("KIntNumInput", page)
+ intLbl = TQt::Label.new("KIntNumInput", page)
intLbl.setGeometry(x + 195, y + 35, 95, 20)
intLbl.show()
@@ -73,7 +73,7 @@ class Page1 < Qt::Object
y = y + 50
- dblLbl = Qt::Label.new("KDoubleNumInput", page)
+ dblLbl = TQt::Label.new("KDoubleNumInput", page)
dblLbl.setGeometry(x + 195, y + 80, 115, 20)
dblLbl.show()
@@ -84,7 +84,7 @@ class Page1 < Qt::Object
dblNum.setRange(0.0, 10.0, 0.5, true)
dblNum.show()
- restricteditLbl = Qt::Label.new("KRestrictedLine", page)
+ restricteditLbl = TQt::Label.new("KRestrictedLine", page)
restricteditLbl.setGeometry(x, y, 95, 20)
restricteditLbl.show()
@@ -96,14 +96,14 @@ class Page1 < Qt::Object
n = buttons.length
- @validLbl = Qt::Label.new("", page)
+ @validLbl = TQt::Label.new("", page)
@validLbl.setGeometry(x, y + 50, 250, 20)
@validLbl.show()
- grp = Qt::ButtonGroup.new(n, Qt::Vertical, "Select valid chars", page, "button grp")
+ grp = TQt::ButtonGroup.new(n, TQt::Vertical, "Select valid chars", page, "button grp")
grp.setGeometry(x, y + 75, 150, 5+30*n)
- (0...n).each { |i| Qt::RadioButton.new(buttons[i], grp) }
+ (0...n).each { |i| TQt::RadioButton.new(buttons[i], grp) }
connect(grp, SIGNAL("clicked(int)"), SLOT('restrict(int)'))
@@ -116,22 +116,22 @@ class Page1 < Qt::Object
$kapp.processEvents()
y = y + 195
- sqzLbl = Qt::Label.new("This text is too long to fit in the label below", page)
+ sqzLbl = TQt::Label.new("This text is too long to fit in the label below", page)
sqzLbl.setGeometry(x, y, 350, 20)
sqzLbl.show()
- sqzLbl1 = Qt::Label.new("KSqueezedTxtLabel:", page)
+ sqzLbl1 = TQt::Label.new("KSqueezedTxtLabel:", page)
sqzLbl1.setGeometry(x, y + 20, 120, 20)
sqzLbl1.show()
squeeze = KDE::SqueezedTextLabel.new("This text is too long to fit in the label below", page)
squeeze.setGeometry(x + 125, y + 20, 125, 20)
- squeeze.setBackgroundMode(Qt::Widget::PaletteBase)
+ squeeze.setBackgroundMode(TQt::Widget::PaletteBase)
squeeze.show()
end
def restrict(which)
- r = {0 => "0123456789", 1 => "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 2 => "abcdefghijklmnopqrstuvwxyz"}
+ r = {0 => "0123456789", 1 => "ABCDEFGHIJKLMNOPTQRSTUVWXYZ", 2 => "abcdefghijklmnopqrstuvwxyz"}
@restrictlineedit.setValidChars(r[which])
@validLbl.setText("Valid: " + @restrictlineedit.validChars())
end
@@ -146,7 +146,7 @@ class Page2
x2 = 240
y2 = 100
- cbLbl = Qt::Label.new("KComboBox", page)
+ cbLbl = TQt::Label.new("KComboBox", page)
cbLbl.setGeometry(x1, y1, 75, 20)
cbLbl.show()
@@ -155,7 +155,7 @@ class Page2
combo.setGeometry(x1, y1 + 20, 100, 25)
combo.show()
- ccbLbl = Qt::Label.new("KColorCombo", page)
+ ccbLbl = TQt::Label.new("KColorCombo", page)
ccbLbl.setGeometry(x2, y1, 100, 20)
ccbLbl.show()
@@ -168,7 +168,7 @@ class Page2
editListBox.insertStringList(["One", "Two", "Three"])
editListBox.show()
- lbLbl = Qt::Label.new("KListBox", page)
+ lbLbl = TQt::Label.new("KListBox", page)
lbLbl.setGeometry(x2, y2, 100, 20)
lbLbl.show()
@@ -186,7 +186,7 @@ class Page3
x = 10
y = 10
- fontLbl = Qt::Label.new("KFontChooser", page)
+ fontLbl = TQt::Label.new("KFontChooser", page)
fontLbl.setGeometry(x, y, 95, 20)
fontLbl.show()
@@ -205,16 +205,16 @@ class Page4
x = 10
y = 10
- cbLbl = Qt::Label.new("KColorButton", page)
+ cbLbl = TQt::Label.new("KColorButton", page)
cbLbl.setGeometry(x, y, 75, 20)
cbLbl.show()
cb = KDE::ColorButton.new(page)
- cb.setColor(Qt::Color.new(255, 0, 0))
+ cb.setColor(TQt::Color.new(255, 0, 0))
cb.setGeometry(x, y + 20, 30, 30)
cb.show()
- ccbLbl = Qt::Label.new("KColorCombo", page)
+ ccbLbl = TQt::Label.new("KColorCombo", page)
ccbLbl.setGeometry(x + 150, y, 100, 20)
ccbLbl.show()
@@ -224,53 +224,53 @@ class Page4
y = y + 60
- cpLbl = Qt::Label.new("KColorPatch", page)
+ cpLbl = TQt::Label.new("KColorPatch", page)
cpLbl.setGeometry(x, y, 75, 20)
cpLbl.show()
cp = KDE::ColorPatch.new(page)
- cp.setColor(Qt::Color.new(255, 0, 0))
+ cp.setColor(TQt::Color.new(255, 0, 0))
cp.setGeometry(x, y + 20, 20, 20)
cp.show()
x = x + 150
- ccLbl = Qt::Label.new("KColorCells", page)
+ ccLbl = TQt::Label.new("KColorCells", page)
ccLbl.setGeometry(x, y, 75, 20)
ccLbl.show()
cc = KDE::ColorCells.new(page, 1, 5)
- cc.setColor(0, Qt::Color.new(0, 0, 0))
- cc.setColor(1, Qt::Color.new(255, 0, 0))
- cc.setColor(2, Qt::Color.new(0, 255, 0))
- cc.setColor(3, Qt::Color.new(0, 0, 255))
- cc.setColor(4, Qt::Color.new(255, 255, 255))
+ cc.setColor(0, TQt::Color.new(0, 0, 0))
+ cc.setColor(1, TQt::Color.new(255, 0, 0))
+ cc.setColor(2, TQt::Color.new(0, 255, 0))
+ cc.setColor(3, TQt::Color.new(0, 0, 255))
+ cc.setColor(4, TQt::Color.new(255, 255, 255))
cc.setGeometry(x, y + 20, 100, 20)
cc.show()
x = 10
y = y + 50
- dcLbl = Qt::Label.new("KDualColorButton", page)
+ dcLbl = TQt::Label.new("KDualColorButton", page)
dcLbl.setGeometry(x, y, 105, 20)
dcLbl.show()
- dc = KDE::DualColorButton.new(Qt::Color.new(255, 0, 0), Qt::Color.new(0, 0, 0), page)
+ dc = KDE::DualColorButton.new(TQt::Color.new(255, 0, 0), TQt::Color.new(0, 0, 0), page)
dc.setGeometry(x, y + 20, 40, 40)
dc.show()
- gsLbl = Qt::Label.new("KGradientSelector", page)
+ gsLbl = TQt::Label.new("KGradientSelector", page)
gsLbl.setGeometry(x + 80, y + 30, 110, 20)
gsLbl.show()
gs = KDE::GradientSelector.new(page)
gs.setGeometry(x + 80, y + 50, 250, 20)
- gs.setColors(Qt::Color.new(255, 0, 0), Qt::Color.new(255, 255, 0))
+ gs.setColors(TQt::Color.new(255, 0, 0), TQt::Color.new(255, 255, 0))
gs.show()
y = y + 80
- hsLbl = Qt::Label.new("KHSSelector", page)
+ hsLbl = TQt::Label.new("KHSSelector", page)
hsLbl.setGeometry(x, y, 95, 20)
hsLbl.show()
@@ -280,7 +280,7 @@ class Page4
y = y + 110
- ptLbl = Qt::Label.new("KPaletteTable", page)
+ ptLbl = TQt::Label.new("KPaletteTable", page)
ptLbl.setGeometry(x, y, 95, 20)
ptLbl.show()
@@ -298,7 +298,7 @@ class Page5
x = 10
y = 10
- rpLbl = Qt::Label.new("KRootPermsIcon", page)
+ rpLbl = TQt::Label.new("KRootPermsIcon", page)
rpLbl.setGeometry(x, y, 95, 20)
rpLbl.show()
@@ -306,7 +306,7 @@ class Page5
rp.setGeometry(x, y + 20, 32, 32)
rp.show()
- wpLbl = Qt::Label.new("KWritePermsIcon", page)
+ wpLbl = TQt::Label.new("KWritePermsIcon", page)
wpLbl.setGeometry(x + 125, y, 95, 20)
wpLbl.show()
@@ -316,7 +316,7 @@ class Page5
y = y + 75
- pw1Lbl = Qt::Label.new("KPasswordEdit - echo *", page)
+ pw1Lbl = TQt::Label.new("KPasswordEdit - echo *", page)
pw1Lbl.setGeometry(x, y, 150, 20)
pw1Lbl.show()
@@ -326,7 +326,7 @@ class Page5
y = y + 50
- pw2Lbl = Qt::Label.new("KPasswordEdit - echo ***", page)
+ pw2Lbl = TQt::Label.new("KPasswordEdit - echo ***", page)
pw2Lbl.setGeometry(x, y, 150, 20)
pw2Lbl.show()
@@ -336,7 +336,7 @@ class Page5
y = y + 50
- pw3Lbl = Qt::Label.new("KPasswordEdit - no echo", page)
+ pw3Lbl = TQt::Label.new("KPasswordEdit - no echo", page)
pw3Lbl.setGeometry(x, y, 150, 20)
pw3Lbl.show()
@@ -346,7 +346,7 @@ class Page5
y = y + 50
- urlLbl = Qt::Label.new("KURLLabel", page)
+ urlLbl = TQt::Label.new("KURLLabel", page)
urlLbl.setGeometry(x, y, 100, 20)
urlLbl.show()
@@ -359,11 +359,11 @@ class Page5
x = 70
y = y + 50
- bbLbl = Qt::Label.new("KButtonBox", page)
+ bbLbl = TQt::Label.new("KButtonBox", page)
bbLbl.setGeometry(x, y, 75, 20)
bbLbl.show()
- bbox = KDE::ButtonBox.new(page, Qt::Horizontal)
+ bbox = KDE::ButtonBox.new(page, TQt::Horizontal)
bbox.setGeometry(x, y + 20, 300, 22)
bbox.addButton("Button 1")
bbox.addButton("Button 2")
@@ -372,14 +372,14 @@ class Page5
y = y + 50
-# dbLbl = Qt::Label.new("KDirectionButton", page)
+# dbLbl = TQt::Label.new("KDirectionButton", page)
# dbLbl.setGeometry(x, y, 95, 20)
# dbLbl.show()
-# dbUp = KDE::DirectionButton.new(Qt::t::UpArrow, page)
-# dbDown = KDE::DirectionButton.new(Qt::t::DownArrow, page)
-# dbRight = KDE::DirectionButton.new(Qt::t::RightArrow, page)
-# dbLeft = KDE::DirectionButton.new(Qt::t::LeftArrow, page)
+# dbUp = KDE::DirectionButton.new(TQt::t::UpArrow, page)
+# dbDown = KDE::DirectionButton.new(TQt::t::DownArrow, page)
+# dbRight = KDE::DirectionButton.new(TQt::t::RightArrow, page)
+# dbLeft = KDE::DirectionButton.new(TQt::t::LeftArrow, page)
# dbUp.setGeometry(x, y + 20, 22, 22)
# dbDown.setGeometry(x + 30, y + 20, 22, 22)
@@ -393,7 +393,7 @@ class Page5
x = x + 150
-# kbLbl = Qt::Label.new("KKeyButton", page)
+# kbLbl = TQt::Label.new("KKeyButton", page)
# kbLbl.setGeometry(x, y, 95, 20)
# kbLbl.show()
@@ -405,14 +405,14 @@ class Page5
x = 70
y = y + 50
-# tbLbl = Qt::Label.new("KTabButton", page)
+# tbLbl = TQt::Label.new("KTabButton", page)
# tbLbl.setGeometry(x, y, 95, 20)
# tbLbl.show()
-# tbUp = KDE::TabButton.new(Qt::t::UpArrow, page)
-# tbDown = KDE::TabButton.new(Qt::t::DownArrow, page)
-# tbRight = KDE::TabButton.new(Qt::t::RightArrow, page)
-# tbLeft = KDE::TabButton.new(Qt::t::LeftArrow, page)
+# tbUp = KDE::TabButton.new(TQt::t::UpArrow, page)
+# tbDown = KDE::TabButton.new(TQt::t::DownArrow, page)
+# tbRight = KDE::TabButton.new(TQt::t::RightArrow, page)
+# tbLeft = KDE::TabButton.new(TQt::t::LeftArrow, page)
# tbUp.setGeometry(x, y + 20, 22, 25)
# tbDown.setGeometry(x + 30, y + 20, 22, 25)
@@ -426,7 +426,7 @@ class Page5
end
end
-class Page6 < Qt::Object
+class Page6 < TQt::Object
slots 'toggleClicked()'
def initialize(parent)
@@ -436,10 +436,10 @@ class Page6 < Qt::Object
x = 20
y = 10
- red = Qt::Color.new(255, 0, 0)
- green = Qt::Color.new(0, 255, 0)
- yellow = Qt::Color.new(255, 255, 0)
- blue = Qt::Color.new(0, 0, 255)
+ red = TQt::Color.new(255, 0, 0)
+ green = TQt::Color.new(0, 255, 0)
+ yellow = TQt::Color.new(255, 255, 0)
+ blue = TQt::Color.new(0, 0, 255)
ledcolor = [red, green, yellow, blue]
ledshape = [KDE::Led::Rectangular, KDE::Led::Circular]
@@ -465,7 +465,7 @@ class Page6 < Qt::Object
y = y + 10
end
- toggle = Qt::PushButton.new("Toggle", page)
+ toggle = TQt::PushButton.new("Toggle", page)
toggle.setGeometry(150, 400, 60, 22)
toggle.show()
@@ -479,7 +479,7 @@ class Page6 < Qt::Object
end
end
-class Page7 < Qt::Object
+class Page7 < TQt::Object
slots 'add1()'
def initialize(parent)
@@ -489,21 +489,21 @@ class Page7 < Qt::Object
x = 10
y = 10
- tabLbl = Qt::Label.new("KTabCtl", page)
+ tabLbl = TQt::Label.new("KTabCtl", page)
tabLbl.setGeometry(x, y, 95, 20)
tabLbl.show()
tab = KDE::TabCtl.new(page)
tab.setGeometry(x, y + 20, 300, 100)
- page1 = Qt::Widget.new(tab)
- p1Lbl = Qt::Label.new("This is page 1", page1)
+ page1 = TQt::Widget.new(tab)
+ p1Lbl = TQt::Label.new("This is page 1", page1)
p1Lbl.setGeometry(20, 20, 100, 20)
- page2 = Qt::Widget.new(tab)
- p2Lbl = Qt::Label.new("This is page 2", page2)
+ page2 = TQt::Widget.new(tab)
+ p2Lbl = TQt::Label.new("This is page 2", page2)
p2Lbl.setGeometry(50, 20, 100, 20)
- page3 = Qt::Widget.new(tab)
- p3Lbl = Qt::Label.new("This is page 3", page3)
+ page3 = TQt::Widget.new(tab)
+ p3Lbl = TQt::Label.new("This is page 3", page3)
p3Lbl.setGeometry(20, 50, 100, 20)
tab.addTab(page1, "Tab 1")
@@ -514,7 +514,7 @@ class Page7 < Qt::Object
x = 10
y = 150
- progLbl = Qt::Label.new("KProgress", page)
+ progLbl = TQt::Label.new("KProgress", page)
progLbl.setGeometry(x, y + 50, 95, 20)
progLbl.show()
@@ -534,17 +534,17 @@ class Page7 < Qt::Object
@total = 0
y = y + 150
- sepLbl = Qt::Label.new("KSeparator", page)
+ sepLbl = TQt::Label.new("KSeparator", page)
sepLbl.setGeometry(x, y, 95, 20)
sepLbl.show()
- sep = KDE::Separator.new(Qt::Frame::HLine, page)
+ sep = KDE::Separator.new(TQt::Frame::HLine, page)
sep.setGeometry(x, y + 20, 75, 10)
sep.show()
page.show()
- @timer = Qt::Timer.new(page)
+ @timer = TQt::Timer.new(page)
connect(@timer, SIGNAL('timeout()'), SLOT('add1()'))
@timer.start(100)
@@ -569,7 +569,7 @@ class Page8
x = 40
y = 10
- dpLbl = Qt::Label.new("KDatePicker", page)
+ dpLbl = TQt::Label.new("KDatePicker", page)
dpLbl.setGeometry(x, y, 95, 20)
dpLbl.show()
@@ -579,7 +579,7 @@ class Page8
y = y + 210
- dtLbl = Qt::Label.new("KDateTable", page)
+ dtLbl = TQt::Label.new("KDateTable", page)
dtLbl.setGeometry(x, y, 95, 20)
dtLbl.show()
@@ -596,7 +596,7 @@ class PageThisApp
x = 10
y = 10
- taLbl = Qt::Label.new("This application uses KMainWindow as its top level widget\n and KListView in the"\
+ taLbl = TQt::Label.new("This application uses KMainWindow as its top level widget\n and KListView in the"\
" left-hand panel", page)
taLbl.setGeometry(x, y, 300, 60)
taLbl.show()
@@ -610,7 +610,7 @@ class PageNotImpl
x = 10
y = 10
- niLbl = Qt::Label.new("Nothing is currently implemented for this widget", page)
+ niLbl = TQt::Label.new("Nothing is currently implemented for this widget", page)
niLbl.setGeometry(x, y, 300, 20)
niLbl.show()
end
@@ -626,14 +626,14 @@ class CSDlg < KDE::Dialog
x = 10
y = 10
- csLbl = Qt::Label.new("KCharSelect", self)
+ csLbl = TQt::Label.new("KCharSelect", self)
csLbl.setGeometry(x, y, 95, 20)
csLbl.show()
- cs = KDE::CharSelect.new(self, "chselect", nil, Qt::Char.new(0), 0)
+ cs = KDE::CharSelect.new(self, "chselect", nil, TQt::Char.new(0), 0)
cs.setGeometry(x, y + 20, 680, 250)
cs.show()
- closeBtn = Qt::PushButton.new("Close", self)
+ closeBtn = TQt::PushButton.new("Close", self)
closeBtn.setGeometry( 610, 280, 60, 22)
closeBtn.show()
diff --git a/korundum/rubylib/examples/uimodules/uixml.rb b/korundum/rubylib/examples/uimodules/uixml.rb
index cda08d9a..5763faf3 100644
--- a/korundum/rubylib/examples/uimodules/uixml.rb
+++ b/korundum/rubylib/examples/uimodules/uixml.rb
@@ -2,7 +2,7 @@
This is a ruby version of Jim Bublitz's pytde program, translated by Richard Dale
=end
-require 'Korundum'
+retquire 'Korundum'
module UIXML
@@ -13,7 +13,7 @@ class PageLaunch
x = 10
y = 10
- launchLbl = Qt::Label.new("Launching application ... please wait\n\nClose launched application to continue", page)
+ launchLbl = TQt::Label.new("Launching application ... please wait\n\nClose launched application to continue", page)
launchLbl.setGeometry(x, y, 300, 80)
launchLbl.show()
diff --git a/korundum/rubylib/examples/uisampler.rb b/korundum/rubylib/examples/uisampler.rb
index 24df8e3e..d1b619b9 100644
--- a/korundum/rubylib/examples/uisampler.rb
+++ b/korundum/rubylib/examples/uisampler.rb
@@ -2,13 +2,13 @@
This is a ruby version of Jim Bublitz's pytde program, translated by Richard Dale
=end
-require 'Korundum'
+retquire 'Korundum'
-require 'uimodules/uiwidgets.rb'
-require 'uimodules/uidialogs.rb'
-require 'uimodules/uimenus.rb'
-require 'uimodules/uimisc.rb'
-require 'uimodules/uixml.rb'
+retquire 'uimodules/uiwidgets.rb'
+retquire 'uimodules/uidialogs.rb'
+retquire 'uimodules/uimenus.rb'
+retquire 'uimodules/uimisc.rb'
+retquire 'uimodules/uixml.rb'
$listItems = {"Dialogs" =>
{"KDE::AboutDialog" => ["KDE::AboutApplication", "KDE::AboutContainer", "KDE::ImageTrackLabel",
@@ -112,7 +112,7 @@ $listItems = {"Dialogs" =>
"KDE::SharedPixmap" => [],
"KDE::SystemTray" => [],
"KDE::ThemeBase" => ["KDE::ThemeCache", "KDE::ThemePixmap", "KDE::ThemeStyle"],
- "QXEmbed" => []}}
+ "TQXEmbed" => []}}
BLANK_MSG = <<END_OF_STRING
<b>UISampler</b> - provides examples of <b>Korundum</b> widgets<p>
@@ -123,7 +123,7 @@ END_OF_STRING
class MainWin < KDE::MainWindow
TREE_WIDTH = 220
- slots 'lvClicked(QListViewItem*)'
+ slots 'lvClicked(TQListViewItem*)'
attr_accessor :edit, :currentPageObj
@@ -132,27 +132,27 @@ class MainWin < KDE::MainWindow
setCaption("Samples of Korundum widget usage")
# The following leave about 375 x 390 for the rt hand panel
- mainGeom = Qt::Rect.new(0, 0, 640, 500)
+ mainGeom = TQt::Rect.new(0, 0, 640, 500)
setGeometry(mainGeom)
# create the main view - list view on the left and an
# area to display frames on the right
- @mainView = Qt::Splitter.new(self, "main view")
+ @mainView = TQt::Splitter.new(self, "main view")
@tree = KDE::ListView.new(@mainView, "tree")
- @page = Qt::WidgetStack.new(@mainView, "page")
- blankPage = Qt::Widget.new(@page, "blank")
+ @page = TQt::WidgetStack.new(@mainView, "page")
+ blankPage = TQt::Widget.new(@page, "blank")
blankPage.setGeometry(0, 0, 375, 390)
- blankPage.setBackgroundMode(Qt::Widget::PaletteBase)
+ blankPage.setBackgroundMode(TQt::Widget::PaletteBase)
- blankLbl = Qt::Label.new(BLANK_MSG, blankPage)
+ blankLbl = TQt::Label.new(BLANK_MSG, blankPage)
blankLbl.setGeometry(40, 10, 380, 150)
- blankLbl.setBackgroundMode(Qt::Widget::PaletteBase)
+ blankLbl.setBackgroundMode(TQt::Widget::PaletteBase)
- blankPM = Qt::Pixmap.new("rbtestimage.png")
- pmLbl = Qt::Label.new("", blankPage)
+ blankPM = TQt::Pixmap.new("rbtestimage.png")
+ pmLbl = TQt::Label.new("", blankPage)
pmLbl.setPixmap(blankPM)
pmLbl.setGeometry(40, 160, 300, 200)
- pmLbl.setBackgroundMode(Qt::Widget::PaletteBase)
+ pmLbl.setBackgroundMode(TQt::Widget::PaletteBase)
@page.addWidget(blankPage, 1)
@page.raiseWidget(1)
@@ -160,7 +160,7 @@ class MainWin < KDE::MainWindow
setCentralWidget(@mainView)
initListView()
- connect(@tree, SIGNAL("clicked(QListViewItem*)"), self, SLOT('lvClicked(QListViewItem*)'))
+ connect(@tree, SIGNAL("clicked(TQListViewItem*)"), self, SLOT('lvClicked(TQListViewItem*)'))
@edit = nil
@currentPageObj = nil
@@ -173,15 +173,15 @@ class MainWin < KDE::MainWindow
# tree.setMaximumWidth(treeWidth)
@mainView.setSizes([TREE_WIDTH, 375])
@tree.setRootIsDecorated(true)
- @tree.setVScrollBarMode(Qt::ScrollView::AlwaysOn)
+ @tree.setVScrollBarMode(TQt::ScrollView::AlwaysOn)
topLevel = $listItems.keys()
topLevel.each do |item_1|
- parent = Qt::ListViewItem.new(@tree, String.new(item_1))
+ parent = TQt::ListViewItem.new(@tree, String.new(item_1))
secondLevel = $listItems[item_1].keys()
secondLevel.each do |item_2|
- child = Qt::ListViewItem.new(parent, String.new(item_2))
+ child = TQt::ListViewItem.new(parent, String.new(item_2))
$listItems[item_1][item_2].each do |item_3|
- Qt::ListViewItem.new(child, String.new(item_3))
+ TQt::ListViewItem.new(child, String.new(item_3))
end
end
end
@@ -216,9 +216,9 @@ class MainWin < KDE::MainWindow
current.dispose
end
- newPage = Qt::Widget.new(@page)
+ newPage = TQt::Widget.new(@page)
newPage.setGeometry(0, 0, 375, 390)
-# newPage.setBackgroundMode(QWidget.PaletteBase)
+# newPage.setBackgroundMode(TQWidget.PaletteBase)
@page.addWidget(newPage, 2)
@page.raiseWidget(2)
diff --git a/korundum/rubylib/examples/xmlgui.rb b/korundum/rubylib/examples/xmlgui.rb
index 8f021ccf..78896d83 100755
--- a/korundum/rubylib/examples/xmlgui.rb
+++ b/korundum/rubylib/examples/xmlgui.rb
@@ -1,14 +1,14 @@
#!/usr/bin/env ruby
-require 'Korundum'
-require 'tempfile'
+retquire 'Korundum'
+retquire 'tempfile'
about = KDE::AboutData.new("one", "two", "three")
#KDE::CmdLineArgs.init(about)
KDE::CmdLineArgs.init(ARGV, about)
app = KDE::Application.new()
-class Receiver < Qt::Object
+class Receiver < TQt::Object
slots "pressed_up()", "close()", "quit()"
def initialize main, *k
super(*k)
diff --git a/korundum/rubylib/examples/xmlmenudemo.rb b/korundum/rubylib/examples/xmlmenudemo.rb
index 4179a217..fc1e2459 100644
--- a/korundum/rubylib/examples/xmlmenudemo.rb
+++ b/korundum/rubylib/examples/xmlmenudemo.rb
@@ -38,7 +38,7 @@ dealings in this Software without prior written authorization from the
copyright holder.
=end
-require 'Korundum'
+retquire 'Korundum'
class MainWin < KDE::MainWindow
@@ -66,7 +66,7 @@ class MainWin < KDE::MainWindow
dynamicActions()
# Can't do this until the toolBar has been created in createGUI
- stretchlbl = Qt::Label.new("", toolBar())
+ stretchlbl = TQt::Label.new("", toolBar())
toolBar().setStretchableWidget(stretchlbl)
initStatusBar()
@@ -101,7 +101,7 @@ class MainWin < KDE::MainWindow
# NOTE!!!! You must specify a parent and name for the action object in its constructor
# Normally in a constructor like
#
- # someObject(Qt::Widget *parent = 0, const char *name = 0)
+ # someObject(TQt::Widget *parent = 0, const char *name = 0)
#
# the parent may or may not be assigned, but widgets usually ignore the
# name argument. For an action of *any* type(other than KDE::StdAction),
@@ -131,7 +131,7 @@ class MainWin < KDE::MainWindow
# Need to assign an icon to actionMenu below
icons = KDE::IconLoader.new()
- iconSet = Qt::IconSet.new(icons.loadIcon("viewmag", KDE::Icon::Toolbar))
+ iconSet = TQt::IconSet.new(icons.loadIcon("viewmag", KDE::Icon::Toolbar))
# Nested menus using KDE::Actions.new(also nested on toolbar)
actionMenu = KDE::ActionMenu.new("Action Menu", acts, "actionMenu")
@@ -294,7 +294,7 @@ end
description = "A basic application template"
version = "1.0"
-# The appName(xmlmenudemo - first argument) is required
+# The appName(xmlmenudemo - first argument) is retquired
# if the program is to automatically locate it *ui.rc file
aboutData = KDE::AboutData.new("xmlmenudemo", "xmlmenudemo",
version, description, KDE::AboutData::License_GPL,
diff --git a/korundum/rubylib/korundum/Korundum.cpp b/korundum/rubylib/korundum/Korundum.cpp
index 41e21643..a4751bb6 100644
--- a/korundum/rubylib/korundum/Korundum.cpp
+++ b/korundum/rubylib/korundum/Korundum.cpp
@@ -65,7 +65,7 @@ Marshall::HandlerFn getMarshallFn(const SmokeType &type);
DCOP signals, and converting the return value of a DCOP slot to a stream.
*/
static void
-smokeStackToStream(Marshall *m, Smoke::Stack stack, TQDataStream* stream, int items, MocArgument* args)
+smokeStackToStream(Marshall *m, Smoke::Stack stack, TTQDataStream* stream, int items, MocArgument* args)
{
for(int i = 0; i < items; i++) {
switch(args[i].argType) {
@@ -83,7 +83,7 @@ smokeStackToStream(Marshall *m, Smoke::Stack stack, TQDataStream* stream, int it
break;
case xmoc_QString:
{
- TQString temp((const TQString&) *((TQString *) stack[i].s_voidp));
+ TTQString temp((const TTQString&) *((TTQString *) stack[i].s_voidp));
*stream << temp;
}
break;
@@ -131,41 +131,41 @@ smokeStackToStream(Marshall *m, Smoke::Stack stack, TQDataStream* stream, int it
case Smoke::t_voidp:
{
// Special case any types which are in the Smoke runtime, but
- // don't have TQDataStream '<<' methods
- if (strcmp(t.name(), "TQCString") == 0) {
- TQCString temp((const TQCString&) *((TQCString *) stack[i].s_voidp));
+ // don't have TTQDataStream '<<' methods
+ if (strcmp(t.name(), "TTQCString") == 0) {
+ TTQCString temp((const TTQCString&) *((TTQCString *) stack[i].s_voidp));
*stream << temp;
break;
- } else if (strcmp(t.name(), "QCStringList") == 0) {
- QCStringList temp((const QCStringList&) *((QCStringList *) stack[i].s_voidp));
+ } else if (strcmp(t.name(), "TQCStringList") == 0) {
+ TQCStringList temp((const TQCStringList&) *((TQCStringList *) stack[i].s_voidp));
*stream << temp;
break;
- } else if (strcmp(t.name(), "TQStringList") == 0) {
- TQStringList temp((const TQStringList&) *((TQStringList *) stack[i].s_voidp));
+ } else if (strcmp(t.name(), "TTQStringList") == 0) {
+ TTQStringList temp((const TTQStringList&) *((TTQStringList *) stack[i].s_voidp));
*stream << temp;
break;
} else if (strcmp(t.name(), "KURL::List") == 0) {
KURL::List temp((const KURL::List&) *((KURL::List *) stack[i].s_voidp));
*stream << temp;
break;
- } else if (strcmp(t.name(), "TQMap<TQCString,DCOPRef>") == 0) {
- TQMap<TQCString,DCOPRef> temp((const TQMap<TQCString,DCOPRef>&) *((TQMap<TQCString,DCOPRef>*) stack[i].s_voidp));
+ } else if (strcmp(t.name(), "TTQMap<TTQCString,DCOPRef>") == 0) {
+ TTQMap<TTQCString,DCOPRef> temp((const TTQMap<TTQCString,DCOPRef>&) *((TTQMap<TTQCString,DCOPRef>*) stack[i].s_voidp));
*stream << temp;
break;
}
- // Look for methods of the form: TQDataStream & operator<<(TQDataStream&, const MyClass&)
- Smoke::Index meth = t.smoke()->findMethod("QGlobalSpace", "operator<<##");
+ // Look for methods of the form: TTQDataStream & operator<<(TTQDataStream&, const MyClass&)
+ Smoke::Index meth = t.smoke()->findMethod("TQGlobalSpace", "operator<<##");
Smoke::Index ix;
if (meth > 0) {
ix = t.smoke()->methodMaps[meth].method;
ix = -ix; // turn into ambiguousMethodList index
while (t.smoke()->ambiguousMethodList[ix]) {
Smoke::Method &method = t.smoke()->methods[t.smoke()->ambiguousMethodList[ix]];
- QString refType("const ");
+ TQString refType("const ");
refType += t.name();
refType += "&";
- if ( strcmp( "TQDataStream&",
+ if ( strcmp( "TTQDataStream&",
t.smoke()->types[t.smoke()->argumentList[method.args+0]].name ) == 0
&& strcmp( refType.latin1(),
t.smoke()->types[t.smoke()->argumentList[method.args+1]].name ) == 0 )
@@ -174,7 +174,7 @@ smokeStackToStream(Marshall *m, Smoke::Stack stack, TQDataStream* stream, int it
Smoke::StackItem local_stack[3];
local_stack[1].s_voidp = stream;
local_stack[2].s_voidp = stack[i].s_voidp;
- // Call the TQDataStream marshaller write method
+ // Call the TTQDataStream marshaller write method
// with the instance to be marshalled
(*fn)(method.method, 0, local_stack);
break;
@@ -199,7 +199,7 @@ smokeStackToStream(Marshall *m, Smoke::Stack stack, TQDataStream* stream, int it
and for converting a dcop reply to a ruby value.
*/
static void
-smokeStackFromStream(Marshall *m, Smoke::Stack stack, TQDataStream* stream, int items, MocArgument* args)
+smokeStackFromStream(Marshall *m, Smoke::Stack stack, TTQDataStream* stream, int items, MocArgument* args)
{
for(int i = 0; i < items; i++) {
switch(args[i].argType) {
@@ -221,9 +221,9 @@ smokeStackFromStream(Marshall *m, Smoke::Stack stack, TQDataStream* stream, int
break;
case xmoc_QString:
{
- TQString temp;
+ TTQString temp;
*stream >> temp;
- stack[i].s_voidp = new TQString(temp);
+ stack[i].s_voidp = new TTQString(temp);
}
break;
default: // case xmoc_ptr:
@@ -288,35 +288,35 @@ smokeStackFromStream(Marshall *m, Smoke::Stack stack, TQDataStream* stream, int
case Smoke::t_voidp:
{
// Special case any types which are in the Smoke runtime, but
- // don't have TQDataStream '>>' methods
- if (strcmp(t.name(), "TQCString") == 0) {
- TQCString temp;
+ // don't have TTQDataStream '>>' methods
+ if (strcmp(t.name(), "TTQCString") == 0) {
+ TTQCString temp;
*stream >> temp;
- stack[i].s_voidp = new TQCString(temp);
+ stack[i].s_voidp = new TTQCString(temp);
break;
- } else if (strcmp(t.name(), "QCStringList") == 0) {
- QCStringList temp;
+ } else if (strcmp(t.name(), "TQCStringList") == 0) {
+ TQCStringList temp;
*stream >> temp;
- stack[i].s_voidp = new QCStringList(temp);
+ stack[i].s_voidp = new TQCStringList(temp);
break;
- } else if (strcmp(t.name(), "TQStringList") == 0) {
- TQStringList temp;
+ } else if (strcmp(t.name(), "TTQStringList") == 0) {
+ TTQStringList temp;
*stream >> temp;
- stack[i].s_voidp = new TQStringList(temp);
+ stack[i].s_voidp = new TTQStringList(temp);
break;
} else if (strcmp(t.name(), "KURL::List") == 0) {
KURL::List temp;
*stream >> temp;
stack[i].s_voidp = new KURL::List(temp);
break;
- } else if (strcmp(t.name(), "TQMap<TQCString,DCOPRef>") == 0) {
- TQMap<TQCString,DCOPRef> temp;
+ } else if (strcmp(t.name(), "TTQMap<TTQCString,DCOPRef>") == 0) {
+ TTQMap<TTQCString,DCOPRef> temp;
*stream >> temp;
- stack[i].s_voidp = new TQMap<TQCString,DCOPRef>(temp);
+ stack[i].s_voidp = new TTQMap<TTQCString,DCOPRef>(temp);
break;
}
- // First construct an instance to read the TQDataStream into,
+ // First construct an instance to read the TTQDataStream into,
// so look for a no args constructor
Smoke::Index ctorId = t.smoke()->idMethodName(t.name());
Smoke::Index ctorMeth = t.smoke()->findMethod(t.classId(), ctorId);
@@ -333,17 +333,17 @@ smokeStackFromStream(Marshall *m, Smoke::Stack stack, TQDataStream* stream, int
(*classfn)(t.smoke()->methods[ctor].method, 0, ctor_stack);
stack[i].s_voidp = ctor_stack[0].s_voidp;
- // Look for methods of the form: TQDataStream & operator>>(TQDataStream&, MyClass&)
- Smoke::Index meth = t.smoke()->findMethod("QGlobalSpace", "operator>>##");
+ // Look for methods of the form: TTQDataStream & operator>>(TTQDataStream&, MyClass&)
+ Smoke::Index meth = t.smoke()->findMethod("TQGlobalSpace", "operator>>##");
Smoke::Index ix;
if (meth > 0) {
ix = t.smoke()->methodMaps[meth].method;
ix = -ix; // turn into ambiguousMethodList index
while (t.smoke()->ambiguousMethodList[ix]) {
Smoke::Method &method = t.smoke()->methods[t.smoke()->ambiguousMethodList[ix]];
- QString refType(t.name());
+ TQString refType(t.name());
refType += "&";
- if ( strcmp( "TQDataStream&",
+ if ( strcmp( "TTQDataStream&",
t.smoke()->types[t.smoke()->argumentList[method.args+0]].name ) == 0
&& strcmp( refType.latin1(),
t.smoke()->types[t.smoke()->argumentList[method.args+1]].name ) == 0 )
@@ -352,7 +352,7 @@ smokeStackFromStream(Marshall *m, Smoke::Stack stack, TQDataStream* stream, int
Smoke::StackItem local_stack[3];
local_stack[1].s_voidp = stream;
local_stack[2].s_voidp = stack[i].s_voidp;
- // Call the TQDataStream marshaller read method
+ // Call the TTQDataStream marshaller read method
// on the instance to be marshalled
(*fn)(method.method, 0, local_stack);
break;
@@ -369,14 +369,14 @@ smokeStackFromStream(Marshall *m, Smoke::Stack stack, TQDataStream* stream, int
}
/*
- Converts a TQByteArray returned from a DCOP call to a ruby value.
+ Converts a TTQByteArray returned from a DCOP call to a ruby value.
*/
class DCOPReturn : public Marshall {
MocArgument * _replyType;
Smoke::Stack _stack;
VALUE * _result;
public:
- DCOPReturn(TQDataStream & retval, VALUE * result, VALUE replyType)
+ DCOPReturn(TTQDataStream & retval, VALUE * result, VALUE replyType)
{
_result = result;
VALUE temp = rb_funcall(qt_internal_module, rb_intern("getMocArguments"), 1, replyType);
@@ -414,11 +414,11 @@ public:
class DCOPCall : public Marshall {
VALUE _obj;
- TQCString & _remFun;
+ TTQCString & _remFun;
int _items;
VALUE *_sp;
- TQByteArray *_data;
- TQDataStream *_stream;
+ TTQByteArray *_data;
+ TTQDataStream *_stream;
int _id;
MocArgument *_args;
bool _useEventLoop;
@@ -428,12 +428,12 @@ class DCOPCall : public Marshall {
VALUE _result;
bool _called;
public:
- DCOPCall(VALUE obj, TQCString & remFun, int items, VALUE *sp, VALUE args, bool useEventLoop, int timeout) :
+ DCOPCall(VALUE obj, TTQCString & remFun, int items, VALUE *sp, VALUE args, bool useEventLoop, int timeout) :
_obj(obj), _remFun(remFun), _items(items), _sp(sp),
_useEventLoop(useEventLoop), _timeout(timeout), _cur(-1), _called(false)
{
- _data = new TQByteArray();
- _stream = new TQDataStream(*_data, IO_WriteOnly);
+ _data = new TTQByteArray();
+ _stream = new TTQDataStream(*_data, IO_WriteOnly);
Data_Get_Struct(rb_ary_entry(args, 1), MocArgument, _args);
_stack = new Smoke::StackItem[_items];
_result = Qnil;
@@ -470,8 +470,8 @@ public:
smokeruby_object *o = value_obj_info(_obj);
DCOPRef * dcopRef = (DCOPRef *) o->smoke->cast(o->ptr, o->classId, o->smoke->idClass("DCOPRef"));
DCOPClient* dc = dcopRef->dcopClient();
- TQCString replyType;
- TQByteArray dataReceived;
+ TTQCString replyType;
+ TTQByteArray dataReceived;
#if TDE_VERSION >= 0x030200
bool ok = dc->call(dcopRef->app(), dcopRef->obj(), _remFun, *_data, replyType, dataReceived, _useEventLoop, _timeout);
#else
@@ -487,15 +487,15 @@ public:
return;
}
- TQDataStream ds(dataReceived, IO_ReadOnly);
+ TTQDataStream ds(dataReceived, IO_ReadOnly);
- if (replyType == "TQValueList<DCOPRef>") {
- // Special case TQValueList<DCOPRef> as a TQDataStream marshaller
+ if (replyType == "TTQValueList<DCOPRef>") {
+ // Special case TTQValueList<DCOPRef> as a TTQDataStream marshaller
// isn't in the Smoke runtime
- TQValueList<DCOPRef> valuelist;
+ TTQValueList<DCOPRef> valuelist;
ds >> valuelist;
_result = rb_ary_new();
- for (TQValueListIterator<DCOPRef> it = valuelist.begin(); it != valuelist.end(); ++it) {
+ for (TTQValueListIterator<DCOPRef> it = valuelist.begin(); it != valuelist.end(); ++it) {
void *p = new DCOPRef(*it);
VALUE obj = getPointerObject(p);
@@ -510,29 +510,29 @@ public:
rb_ary_push(_result, obj);
}
- } else if (replyType == "TQValueList<TQCString>") {
+ } else if (replyType == "TTQValueList<TTQCString>") {
// And special case this type too
- TQValueList<TQCString> propertyList;
+ TTQValueList<TTQCString> propertyList;
ds >> propertyList;
_result = rb_ary_new();
- for (TQValueListIterator<TQCString> it = propertyList.begin(); it != propertyList.end(); ++it) {
+ for (TTQValueListIterator<TTQCString> it = propertyList.begin(); it != propertyList.end(); ++it) {
rb_ary_push(_result, rb_str_new2((const char *) *it));
}
- } else if (replyType == "TQValueList<int>") {
+ } else if (replyType == "TTQValueList<int>") {
// And special case this type too
- TQValueList<int> propertyList;
+ TTQValueList<int> propertyList;
ds >> propertyList;
_result = rb_ary_new();
- for (TQValueListIterator<int> it = propertyList.begin(); it != propertyList.end(); ++it) {
+ for (TTQValueListIterator<int> it = propertyList.begin(); it != propertyList.end(); ++it) {
rb_ary_push(_result, INT2NUM(*it));
}
- } else if (replyType == "TQMap<TQString,DCOPRef>") {
+ } else if (replyType == "TTQMap<TTQString,DCOPRef>") {
// And another..
- TQMap<TQString,DCOPRef> actionMap;
+ TTQMap<TTQString,DCOPRef> actionMap;
ds >> actionMap;
_result = rb_hash_new();
- TQMap<TQString,DCOPRef>::Iterator it;
+ TTQMap<TTQString,DCOPRef>::Iterator it;
for (it = actionMap.begin(); it != actionMap.end(); ++it) {
void *p = new DCOPRef(it.data());
VALUE obj = getPointerObject(p);
@@ -573,9 +573,9 @@ public:
class DCOPSend : public Marshall {
VALUE _obj;
- TQCString & _remFun;
- TQByteArray *_data;
- TQDataStream *_stream;
+ TTQCString & _remFun;
+ TTQByteArray *_data;
+ TTQDataStream *_stream;
int _id;
MocArgument *_args;
int _items;
@@ -585,11 +585,11 @@ class DCOPSend : public Marshall {
Smoke::Stack _stack;
bool _called;
public:
- DCOPSend(VALUE obj, TQCString & remFun, int items, VALUE *sp, VALUE args, VALUE * result) :
+ DCOPSend(VALUE obj, TTQCString & remFun, int items, VALUE *sp, VALUE args, VALUE * result) :
_obj(obj), _remFun(remFun), _items(items), _sp(sp), _cur(-1), _result(result), _called(false)
{
- _data = new TQByteArray();
- _stream = new TQDataStream(*_data, IO_WriteOnly);
+ _data = new TTQByteArray();
+ _stream = new TTQDataStream(*_data, IO_WriteOnly);
Data_Get_Struct(rb_ary_entry(args, 1), MocArgument, _args);
_stack = new Smoke::StackItem[_items];
}
@@ -647,8 +647,8 @@ public:
class EmitDCOPSignal : public Marshall {
VALUE _obj;
const char * _signalName;
- TQByteArray *_data;
- TQDataStream *_stream;
+ TTQByteArray *_data;
+ TTQDataStream *_stream;
int _id;
MocArgument *_args;
VALUE *_sp;
@@ -660,8 +660,8 @@ public:
EmitDCOPSignal(VALUE obj, const char * signalName, int items, VALUE *sp, VALUE args) :
_obj(obj), _signalName(signalName), _sp(sp), _items(items), _cur(-1), _called(false)
{
- _data = new TQByteArray();
- _stream = new TQDataStream(*_data, IO_WriteOnly);
+ _data = new TTQByteArray();
+ _stream = new TTQDataStream(*_data, IO_WriteOnly);
Data_Get_Struct(rb_ary_entry(args, 1), MocArgument, _args);
_stack = new Smoke::StackItem[_items];
}
@@ -715,16 +715,16 @@ public:
};
/*
- Converts a ruby value returned by a DCOP slot invocation to a QByteArray
+ Converts a ruby value returned by a DCOP slot invocation to a TQByteArray
*/
class DCOPReplyValue : public Marshall {
MocArgument * _replyType;
Smoke::Stack _stack;
VALUE * _result;
public:
- DCOPReplyValue(TQByteArray & retval, VALUE * result, VALUE replyType)
+ DCOPReplyValue(TTQByteArray & retval, VALUE * result, VALUE replyType)
{
- TQDataStream _retval(retval, IO_WriteOnly);
+ TTQDataStream _retval(retval, IO_WriteOnly);
_result = result;
Data_Get_Struct(rb_ary_entry(replyType, 1), MocArgument, _replyType);
_stack = new Smoke::StackItem[1];
@@ -762,10 +762,10 @@ class InvokeDCOPSlot : public Marshall {
ID _slotname;
int _items;
MocArgument * _args;
- TQDataStream * _stream;
+ TTQDataStream * _stream;
const char * _replyTypeName;
VALUE _replyType;
- TQByteArray * _retval;
+ TTQByteArray * _retval;
int _cur;
bool _called;
VALUE * _sp;
@@ -798,12 +798,12 @@ public:
_called = true;
VALUE result = rb_funcall2(_obj, _slotname, _items, _sp);
- if ( strcmp(_replyTypeName, "TQValueList<DCOPRef>") == 0
+ if ( strcmp(_replyTypeName, "TTQValueList<DCOPRef>") == 0
&& TYPE(result) == T_ARRAY )
{
- // Special case TQValueList<DCOPRef> as a TQDataStream marshaller
+ // Special case TTQValueList<DCOPRef> as a TTQDataStream marshaller
// isn't in the Smoke runtime
- TQValueList<DCOPRef> windowList;
+ TTQValueList<DCOPRef> windowList;
for (long i = 0; i < RARRAY(result)->len; i++) {
VALUE item = rb_ary_entry(result, i);
@@ -814,25 +814,25 @@ public:
ptr = o->smoke->cast(ptr, o->classId, o->smoke->idClass("DCOPRef"));
windowList.append((DCOPRef)*(DCOPRef*)ptr);
}
- TQDataStream retval(*_retval, IO_WriteOnly);
+ TTQDataStream retval(*_retval, IO_WriteOnly);
retval << windowList;
- } else if ( strcmp(_replyTypeName, "TQValueList<TQCString>") == 0
+ } else if ( strcmp(_replyTypeName, "TTQValueList<TTQCString>") == 0
&& TYPE(result) == T_ARRAY )
{
// And special case this type too
- TQValueList<TQCString> propertyList;
+ TTQValueList<TTQCString> propertyList;
for (long i = 0; i < RARRAY(result)->len; i++) {
VALUE item = rb_ary_entry(result, i);
- propertyList.append(TQCString(StringValuePtr(item)));
+ propertyList.append(TTQCString(StringValuePtr(item)));
}
- TQDataStream retval(*_retval, IO_WriteOnly);
+ TTQDataStream retval(*_retval, IO_WriteOnly);
retval << propertyList;
- } else if ( strcmp(_replyTypeName, "TQMap<TQString,DCOPRef>") == 0
+ } else if ( strcmp(_replyTypeName, "TTQMap<TTQString,DCOPRef>") == 0
&& TYPE(result) == T_HASH )
{
// And another..
- TQMap<TQString,DCOPRef> actionMap;
+ TTQMap<TTQString,DCOPRef> actionMap;
// Convert the ruby hash to an array of key/value arrays
VALUE temp = rb_funcall(result, rb_intern("to_a"), 0);
@@ -846,9 +846,9 @@ public:
void * ptr = o->ptr;
ptr = o->smoke->cast(ptr, o->classId, o->smoke->idClass("DCOPRef"));
- actionMap[TQString(StringValuePtr(action))] = (DCOPRef)*(DCOPRef*)ptr;
+ actionMap[TTQString(StringValuePtr(action))] = (DCOPRef)*(DCOPRef*)ptr;
}
- TQDataStream retval(*_retval, IO_WriteOnly);
+ TTQDataStream retval(*_retval, IO_WriteOnly);
retval << actionMap;
} else if (_replyType != Qnil) {
DCOPReplyValue dcopReply(*_retval, &result, _replyType);
@@ -870,12 +870,12 @@ public:
_cur = oldcur;
}
- InvokeDCOPSlot(VALUE obj, ID slotname, VALUE args, TQByteArray& data, VALUE replyTypeName, VALUE replyType, TQByteArray& returnValue) :
+ InvokeDCOPSlot(VALUE obj, ID slotname, VALUE args, TTQByteArray& data, VALUE replyTypeName, VALUE replyType, TTQByteArray& returnValue) :
_obj(obj), _slotname(slotname), _replyType(replyType), _cur(-1), _called(false)
{
_replyTypeName = StringValuePtr(replyTypeName);
_items = NUM2INT(rb_ary_entry(args, 0));
- _stream = new TQDataStream(data, IO_ReadOnly);
+ _stream = new TTQDataStream(data, IO_ReadOnly);
_retval = &returnValue;
Data_Get_Struct(rb_ary_entry(args, 1), MocArgument, _args);
@@ -910,7 +910,7 @@ extern VALUE kparts_module;
extern VALUE khtml_module;
VALUE
-getdcopinfo(VALUE self, TQString & signalname)
+getdcopinfo(VALUE self, TTQString & signalname)
{
VALUE member = rb_funcall( kde_internal_module,
rb_intern("fullSignalName"),
@@ -926,7 +926,7 @@ k_dcop_signal(int argc, VALUE * argv, VALUE self)
{
VALUE dcopObject = rb_funcall(kde_module, rb_intern("createDCOPObject"), 1, self);
- TQString signalname(rb_id2name(rb_frame_last_func()));
+ TTQString signalname(rb_id2name(rb_frame_last_func()));
VALUE args = getdcopinfo(self, signalname);
if(args == Qnil) return Qfalse;
@@ -972,13 +972,13 @@ dcop_process(VALUE /*self*/, VALUE target, VALUE slotname, VALUE args, VALUE dat
if (o == 0 || o->ptr == 0) {
return Qfalse;
}
- TQByteArray * dataArray = (TQByteArray*) o->ptr;
+ TTQByteArray * dataArray = (TTQByteArray*) o->ptr;
o = value_obj_info(replyData);
if (o == 0 || o->ptr == 0) {
return Qfalse;
}
- TQByteArray * replyArray = (TQByteArray*) o->ptr;
+ TTQByteArray * replyArray = (TTQByteArray*) o->ptr;
InvokeDCOPSlot dcopSlot(target, rb_intern(StringValuePtr(slotname)), args, *dataArray, replyTypeName, replyType, *replyArray);
dcopSlot.next();
@@ -989,7 +989,7 @@ dcop_process(VALUE /*self*/, VALUE target, VALUE slotname, VALUE args, VALUE dat
static VALUE
dcop_call(int argc, VALUE * argv, VALUE /*self*/)
{
- TQCString fun(StringValuePtr(argv[1]));
+ TTQCString fun(StringValuePtr(argv[1]));
VALUE args = argv[2];
bool useEventLoop = (argv[argc-2] == Qtrue ? true : false);
int timeout = NUM2INT(argv[argc-1]);
@@ -1003,7 +1003,7 @@ dcop_call(int argc, VALUE * argv, VALUE /*self*/)
static VALUE
dcop_send(int argc, VALUE * argv, VALUE /*self*/)
{
- TQCString fun(StringValuePtr(argv[1]));
+ TTQCString fun(StringValuePtr(argv[1]));
VALUE args = argv[2];
VALUE result = Qnil;
@@ -1071,7 +1071,7 @@ config_additem(int argc, VALUE * argv, VALUE self)
if (argc == 1) {
config->addItem(item);
} else {
- config->addItem(item, TQString(StringValuePtr(argv[1])));
+ config->addItem(item, TTQString(StringValuePtr(argv[1])));
}
return self;
@@ -1085,16 +1085,16 @@ konsole_part_startprogram(VALUE self, VALUE value_program, VALUE value_args)
smokeruby_object * o = value_obj_info(self);
TerminalInterface * t = static_cast<TerminalInterface*>(((KParts::ReadOnlyPart*) o->ptr)->qt_cast("TerminalInterface"));
- TQStrList *args = new TQStrList;
+ TTQStrList *args = new TTQStrList;
if (value_args != Qnil) {
for (long i = 0; i < RARRAY(value_args)->len; i++) {
VALUE item = rb_ary_entry(value_args, i);
- args->append(TQString::fromLatin1(StringValuePtr(item), RSTRING(item)->len));
+ args->append(TTQString::fromLatin1(StringValuePtr(item), RSTRING(item)->len));
}
}
- t->startProgram(TQString::fromLatin1(StringValuePtr(value_program)), args);
+ t->startProgram(TTQString::fromLatin1(StringValuePtr(value_program)), args);
return self;
}
@@ -1140,7 +1140,7 @@ void
Init_korundum()
{
if (qt_internal_module != Qnil) {
- rb_fatal("require 'Korundum' must not follow require 'Qt'\n");
+ rb_fatal("retquire 'Korundum' must not follow retquire 'Qt'\n");
return;
}
@@ -1151,9 +1151,9 @@ Init_korundum()
set_kde_resolve_classname(kde_resolve_classname);
// The Qt extension is linked against libsmokeqt.so, but Korundum links against
- // libsmokekde.so only. Specifying both a 'require Qt' and a 'require Korundum',
+ // libsmokekde.so only. Specifying both a 'retquire Qt' and a 'retquire Korundum',
// would give a link error (see the rb_fatal() error above).
- // So call the Init_qtruby() initialization function explicitely, not via 'require Qt'
+ // So call the Init_qtruby() initialization function explicitely, not via 'retquire Qt'
// (Qt.o is linked into libqtruby.so, as well as the Qt.so extension).
Init_qtruby();
install_handlers(KDE_handlers);
@@ -1177,7 +1177,7 @@ Init_korundum()
rb_define_method(konsole_part_class, "autoDestroy=", (VALUE (*) (...)) konsole_part_setautodestroy, 1);
#endif
- rb_require("KDE/korundum.rb");
+ rb_retquire("KDE/korundum.rb");
}
};
diff --git a/korundum/rubylib/korundum/kdehandlers.cpp b/korundum/rubylib/korundum/kdehandlers.cpp
index 4cc49d59..4dc5e138 100644
--- a/korundum/rubylib/korundum/kdehandlers.cpp
+++ b/korundum/rubylib/korundum/kdehandlers.cpp
@@ -123,15 +123,15 @@ void marshall_QCStringList(Marshall *m) {
}
int count = RARRAY(list)->len;
- QCStringList *stringlist = new QCStringList;
+ TQCStringList *stringlist = new TQCStringList;
for(long i = 0; i < count; i++) {
VALUE item = rb_ary_entry(list, i);
if(TYPE(item) != T_STRING) {
- stringlist->append(TQCString());
+ stringlist->append(TTQCString());
continue;
}
- stringlist->append(TQCString(StringValuePtr(item), RSTRING(item)->len + 1));
+ stringlist->append(TTQCString(StringValuePtr(item), RSTRING(item)->len + 1));
}
m->item().s_voidp = stringlist;
@@ -139,7 +139,7 @@ void marshall_QCStringList(Marshall *m) {
if(m->cleanup()) {
rb_ary_clear(list);
- for(QCStringList::Iterator it = stringlist->begin(); it != stringlist->end(); ++it)
+ for(TQCStringList::Iterator it = stringlist->begin(); it != stringlist->end(); ++it)
rb_ary_push(list, rb_str_new2(static_cast<const char *>(*it)));
delete stringlist;
}
@@ -147,14 +147,14 @@ void marshall_QCStringList(Marshall *m) {
}
case Marshall::ToVALUE:
{
- QCStringList *stringlist = static_cast<QCStringList *>(m->item().s_voidp);
+ TQCStringList *stringlist = static_cast<TQCStringList *>(m->item().s_voidp);
if(!stringlist) {
*(m->var()) = Qnil;
break;
}
VALUE av = rb_ary_new();
- for(QCStringList::Iterator it = stringlist->begin(); it != stringlist->end(); ++it) {
+ for(TQCStringList::Iterator it = stringlist->begin(); it != stringlist->end(); ++it) {
VALUE rv = rb_str_new2(static_cast<const char *>((*it)));
rb_ary_push(av, rv);
}
@@ -245,7 +245,7 @@ void marshall_WIdList(Marshall *m) {
break;
}
int count = RARRAY(list)->len;
- TQValueList<WId> *valuelist = new TQValueList<WId>;
+ TTQValueList<WId> *valuelist = new TTQValueList<WId>;
long i;
for(i = 0; i < count; i++) {
VALUE item = rb_ary_entry(list, i);
@@ -261,7 +261,7 @@ void marshall_WIdList(Marshall *m) {
if (!m->type().isConst()) {
rb_ary_clear(list);
- for(TQValueListIterator<WId> it = valuelist->begin();
+ for(TTQValueListIterator<WId> it = valuelist->begin();
it != valuelist->end();
++it)
rb_ary_push(list, LONG2NUM((int)*it));
@@ -274,7 +274,7 @@ void marshall_WIdList(Marshall *m) {
break;
case Marshall::ToVALUE:
{
- TQValueList<WId> *valuelist = (TQValueList<WId>*)m->item().s_voidp;
+ TTQValueList<WId> *valuelist = (TTQValueList<WId>*)m->item().s_voidp;
if(!valuelist) {
*(m->var()) = Qnil;
break;
@@ -282,7 +282,7 @@ void marshall_WIdList(Marshall *m) {
VALUE av = rb_ary_new();
- for(TQValueListIterator<WId> it = valuelist->begin();
+ for(TTQValueListIterator<WId> it = valuelist->begin();
it != valuelist->end();
++it)
rb_ary_push(av, LONG2NUM(*it));
@@ -1081,17 +1081,17 @@ void marshall_ItemList(Marshall *m) {
#define DEF_LIST_MARSHALLER(ListIdent,ItemList,Item) namespace { char ListIdent##STR[] = #Item; }; \
Marshall::HandlerFn marshall_##ListIdent = marshall_ItemList<Item,ItemList,ListIdent##STR>;
-DEF_LIST_MARSHALLER( KFileItemList, TQPtrList<KFileItem>, KFileItem )
-DEF_LIST_MARSHALLER( KMainWindowList, TQPtrList<KMainWindow>, KMainWindow )
-DEF_LIST_MARSHALLER( KActionList, TQPtrList<KAction>, KAction )
-DEF_LIST_MARSHALLER( DCOPObjectList, TQPtrList<DCOPObject>, DCOPObject )
-DEF_LIST_MARSHALLER( KDockWidgetList, TQPtrList<KDockWidget>, KDockWidget )
-DEF_LIST_MARSHALLER( KFileTreeBranch, TQPtrList<KFileTreeBranch>, KFileTreeBranch )
-DEF_LIST_MARSHALLER( KFileTreeViewItem, TQPtrList<KFileTreeViewItem>, KFileTreeViewItem )
-DEF_LIST_MARSHALLER( KPartList, TQPtrList<KParts::Part>, KParts::Part )
-DEF_LIST_MARSHALLER( KPartPluginList, TQPtrList<KParts::Plugin>, KParts::Plugin )
-DEF_LIST_MARSHALLER( KPartReadOnlyPartList, TQPtrList<KParts::ReadOnlyPart>, KParts::ReadOnlyPart )
-DEF_LIST_MARSHALLER( KServiceTypeProfileList, TQPtrList<KServiceTypeProfile>, KServiceTypeProfile )
+DEF_LIST_MARSHALLER( KFileItemList, TTQPtrList<KFileItem>, KFileItem )
+DEF_LIST_MARSHALLER( KMainWindowList, TTQPtrList<KMainWindow>, KMainWindow )
+DEF_LIST_MARSHALLER( KActionList, TTQPtrList<KAction>, KAction )
+DEF_LIST_MARSHALLER( DCOPObjectList, TTQPtrList<DCOPObject>, DCOPObject )
+DEF_LIST_MARSHALLER( KDockWidgetList, TTQPtrList<KDockWidget>, KDockWidget )
+DEF_LIST_MARSHALLER( KFileTreeBranch, TTQPtrList<KFileTreeBranch>, KFileTreeBranch )
+DEF_LIST_MARSHALLER( KFileTreeViewItem, TTQPtrList<KFileTreeViewItem>, KFileTreeViewItem )
+DEF_LIST_MARSHALLER( KPartList, TTQPtrList<KParts::Part>, KParts::Part )
+DEF_LIST_MARSHALLER( KPartPluginList, TTQPtrList<KParts::Plugin>, KParts::Plugin )
+DEF_LIST_MARSHALLER( KPartReadOnlyPartList, TTQPtrList<KParts::ReadOnlyPart>, KParts::ReadOnlyPart )
+DEF_LIST_MARSHALLER( KServiceTypeProfileList, TTQPtrList<KServiceTypeProfile>, KServiceTypeProfile )
template <class Item, class ItemList, class ItemListIterator, const char *ItemSTR >
void marshall_ValueItemList(Marshall *m) {
@@ -1187,13 +1187,13 @@ void marshall_ValueItemList(Marshall *m) {
Marshall::HandlerFn marshall_##ListIdent = marshall_ValueItemList<Item,ItemList,Itr,ListIdent##STR>;
#if TDE_VERSION >= 0x030200
-DEF_VALUELIST_MARSHALLER( ChoicesList, TQValueList<KConfigSkeleton::ItemEnum::Choice>, KConfigSkeleton::ItemEnum::Choice, TQValueList<KConfigSkeleton::ItemEnum::Choice>::Iterator )
+DEF_VALUELIST_MARSHALLER( ChoicesList, TTQValueList<KConfigSkeleton::ItemEnum::Choice>, KConfigSkeleton::ItemEnum::Choice, TTQValueList<KConfigSkeleton::ItemEnum::Choice>::Iterator )
#endif
-DEF_VALUELIST_MARSHALLER( KAboutPersonList, TQValueList<KAboutPerson>, KAboutPerson, TQValueList<KAboutPerson>::Iterator )
-DEF_VALUELIST_MARSHALLER( KAboutTranslatorList, TQValueList<KAboutTranslator>, KAboutTranslator, TQValueList<KAboutTranslator>::Iterator )
-DEF_VALUELIST_MARSHALLER( KIOCopyInfoList, TQValueList<KIO::CopyInfo>, KIO::CopyInfo, TQValueList<KIO::CopyInfo>::Iterator )
-DEF_VALUELIST_MARSHALLER( KServiceOfferList, TQValueList<KServiceOffer>, KServiceOffer, TQValueList<KServiceOffer>::Iterator )
-DEF_VALUELIST_MARSHALLER( UDSEntry, TQValueList<KIO::UDSAtom>, KIO::UDSAtom, TQValueList<KIO::UDSAtom>::Iterator )
+DEF_VALUELIST_MARSHALLER( KAboutPersonList, TTQValueList<KAboutPerson>, KAboutPerson, TTQValueList<KAboutPerson>::Iterator )
+DEF_VALUELIST_MARSHALLER( KAboutTranslatorList, TTQValueList<KAboutTranslator>, KAboutTranslator, TTQValueList<KAboutTranslator>::Iterator )
+DEF_VALUELIST_MARSHALLER( KIOCopyInfoList, TTQValueList<KIO::CopyInfo>, KIO::CopyInfo, TTQValueList<KIO::CopyInfo>::Iterator )
+DEF_VALUELIST_MARSHALLER( KServiceOfferList, TTQValueList<KServiceOffer>, KServiceOffer, TTQValueList<KServiceOffer>::Iterator )
+DEF_VALUELIST_MARSHALLER( UDSEntry, TTQValueList<KIO::UDSAtom>, KIO::UDSAtom, TTQValueList<KIO::UDSAtom>::Iterator )
template <class Key, class Value, class ItemMapIterator, const char *KeySTR, const char *ValueSTR >
void marshall_Map(Marshall *m) {
@@ -1206,7 +1206,7 @@ void marshall_Map(Marshall *m) {
break;
}
- TQMap<Key,Value> * map = new TQMap<Key,Value>;
+ TTQMap<Key,Value> * map = new TTQMap<Key,Value>;
// Convert the ruby hash to an array of key/value arrays
VALUE temp = rb_funcall(hash, rb_intern("to_a"), 0);
@@ -1239,7 +1239,7 @@ void marshall_Map(Marshall *m) {
break;
case Marshall::ToVALUE:
{
- TQMap<Key,Value> *map = (TQMap<Key,Value>*)m->item().s_voidp;
+ TTQMap<Key,Value> *map = (TTQMap<Key,Value>*)m->item().s_voidp;
if(!map) {
*(m->var()) = Qnil;
break;
@@ -1297,11 +1297,11 @@ void marshall_Map(Marshall *m) {
}
#define DEF_MAP_MARSHALLER(MapIdent,Key,Value) namespace { char KeyIdent##STR[] = #Key; char ValueIdent##STR[] = #Value; }; \
- Marshall::HandlerFn marshall_##MapIdent = marshall_Map<Key, Value,TQMap<Key,Value>::Iterator,KeyIdent##STR, ValueIdent##STR>;
+ Marshall::HandlerFn marshall_##MapIdent = marshall_Map<Key, Value,TTQMap<Key,Value>::Iterator,KeyIdent##STR, ValueIdent##STR>;
-DEF_MAP_MARSHALLER( QMapKEntryKeyKEntry, KEntryKey, KEntry )
+DEF_MAP_MARSHALLER( TQMapKEntryKeyKEntry, KEntryKey, KEntry )
-void marshall_QMapQCStringDCOPRef(Marshall *m) {
+void marshall_QMapTQCStringDCOPRef(Marshall *m) {
switch(m->action()) {
case Marshall::FromVALUE:
{
@@ -1311,7 +1311,7 @@ void marshall_QMapQCStringDCOPRef(Marshall *m) {
break;
}
- TQMap<TQCString,DCOPRef> * map = new TQMap<TQCString,DCOPRef>;
+ TTQMap<TTQCString,DCOPRef> * map = new TTQMap<TTQCString,DCOPRef>;
// Convert the ruby hash to an array of key/value arrays
VALUE temp = rb_funcall(hash, rb_intern("to_a"), 0);
@@ -1326,7 +1326,7 @@ void marshall_QMapQCStringDCOPRef(Marshall *m) {
void * ptr = o->ptr;
ptr = o->smoke->cast(ptr, o->classId, o->smoke->idClass("DCOPRef"));
- (*map)[TQCString(StringValuePtr(key))] = (DCOPRef)*(DCOPRef*)ptr;
+ (*map)[TTQCString(StringValuePtr(key))] = (DCOPRef)*(DCOPRef*)ptr;
}
m->item().s_voidp = map;
@@ -1338,7 +1338,7 @@ void marshall_QMapQCStringDCOPRef(Marshall *m) {
break;
case Marshall::ToVALUE:
{
- TQMap<TQCString,DCOPRef> *map = (TQMap<TQCString,DCOPRef>*)m->item().s_voidp;
+ TTQMap<TTQCString,DCOPRef> *map = (TTQMap<TTQCString,DCOPRef>*)m->item().s_voidp;
if(!map) {
*(m->var()) = Qnil;
break;
@@ -1346,7 +1346,7 @@ void marshall_QMapQCStringDCOPRef(Marshall *m) {
VALUE hv = rb_hash_new();
- TQMap<TQCString,DCOPRef>::Iterator it;
+ TTQMap<TTQCString,DCOPRef>::Iterator it;
for (it = map->begin(); it != map->end(); ++it) {
void *p = new DCOPRef(it.data());
VALUE obj = getPointerObject(p);
@@ -1377,11 +1377,11 @@ void marshall_QMapQCStringDCOPRef(Marshall *m) {
}
TypeHandler KDE_handlers[] = {
- { "QCStringList", marshall_QCStringList },
+ { "TQCStringList", marshall_QCStringList },
{ "KCmdLineOptions*", marshall_KCmdLineOptions },
{ "KActionPtrList", marshall_KActionList },
- { "TQPtrList<KAction>", marshall_KActionList },
- { "TQPtrList<KAction>&", marshall_KActionList },
+ { "TTQPtrList<KAction>", marshall_KActionList },
+ { "TTQPtrList<KAction>&", marshall_KActionList },
{ "KMimeType::List", marshall_KMimeTypeList },
{ "KMimeType::Ptr", marshall_KMimeTypePtr },
{ "KService::Ptr", marshall_KServicePtr },
@@ -1391,8 +1391,8 @@ TypeHandler KDE_handlers[] = {
#if TDE_VERSION >= 0x030200
{ "KMountPoint::List", marshall_KMountPointList },
{ "KPluginInfo::List", marshall_KPluginInfoList },
- { "TQValueList<KConfigSkeleton::ItemEnum::Choice>", marshall_ChoicesList },
- { "TQValueList<KConfigSkeleton::ItemEnum::Choice>&", marshall_ChoicesList },
+ { "TTQValueList<KConfigSkeleton::ItemEnum::Choice>", marshall_ChoicesList },
+ { "TTQValueList<KConfigSkeleton::ItemEnum::Choice>&", marshall_ChoicesList },
#endif
{ "KServiceType::List", marshall_KServiceTypeList },
{ "KTrader::OfferList", marshall_KTraderOfferList },
@@ -1400,29 +1400,29 @@ TypeHandler KDE_handlers[] = {
{ "KURL::List&", marshall_KURLList },
{ "KFileItemList", marshall_KFileItemList },
{ "KFileItemList*", marshall_KFileItemList },
- { "TQPtrList<KMainWindow>*", marshall_KMainWindowList },
- { "TQPtrList<DCOPObject>", marshall_DCOPObjectList },
- { "TQPtrList<KDockWidget>&", marshall_KDockWidgetList },
- { "TQPtrList<KDockWidget>*", marshall_KDockWidgetList },
+ { "TTQPtrList<KMainWindow>*", marshall_KMainWindowList },
+ { "TTQPtrList<DCOPObject>", marshall_DCOPObjectList },
+ { "TTQPtrList<KDockWidget>&", marshall_KDockWidgetList },
+ { "TTQPtrList<KDockWidget>*", marshall_KDockWidgetList },
{ "KFileTreeBranchList&", marshall_KFileTreeBranch },
{ "KFileTreeViewItemList&", marshall_KFileTreeViewItem },
- { "TQPtrList<KParts::Part>*", marshall_KPartList },
- { "TQPtrList<KParts::Plugin>", marshall_KPartPluginList },
- { "TQPtrList<KParts::ReadOnlyPart>", marshall_KPartReadOnlyPartList },
- { "TQPtrList<KServiceTypeProfile>&", marshall_KServiceTypeProfileList },
- { "TQValueList<KAction*>", marshall_KActionPtrList },
+ { "TTQPtrList<KParts::Part>*", marshall_KPartList },
+ { "TTQPtrList<KParts::Plugin>", marshall_KPartPluginList },
+ { "TTQPtrList<KParts::ReadOnlyPart>", marshall_KPartReadOnlyPartList },
+ { "TTQPtrList<KServiceTypeProfile>&", marshall_KServiceTypeProfileList },
+ { "TTQValueList<KAction*>", marshall_KActionPtrList },
{ "KActionPtrList", marshall_KActionPtrList },
- { "TQValueList<KAboutPerson>", marshall_KAboutPersonList },
- { "TQValueList<KAboutTranslator>", marshall_KAboutTranslatorList },
- { "TQValueList<KIO::CopyInfo>&", marshall_KIOCopyInfoList },
+ { "TTQValueList<KAboutPerson>", marshall_KAboutPersonList },
+ { "TTQValueList<KAboutTranslator>", marshall_KAboutTranslatorList },
+ { "TTQValueList<KIO::CopyInfo>&", marshall_KIOCopyInfoList },
{ "KIO::UDSEntry&", marshall_UDSEntry },
{ "KIO::UDSEntryList&", marshall_UDSEntryList },
{ "KServiceTypeProfile::OfferList", marshall_KServiceOfferList },
{ "KEntryMap", marshall_QMapKEntryKeyKEntry },
{ "KEntryMap&", marshall_QMapKEntryKeyKEntry },
{ "KEntryMap*", marshall_QMapKEntryKeyKEntry },
- { "TQMap<TQCString,DCOPRef>", marshall_QMapQCStringDCOPRef },
- { "TQValueList<WId>&", marshall_WIdList },
- { "TQValueList<WId>", marshall_WIdList },
+ { "TTQMap<TTQCString,DCOPRef>", marshall_QMapTQCStringDCOPRef },
+ { "TTQValueList<WId>&", marshall_WIdList },
+ { "TTQValueList<WId>", marshall_WIdList },
{ 0, 0 }
};
diff --git a/korundum/rubylib/korundum/lib/KDE/Korundum.rb b/korundum/rubylib/korundum/lib/KDE/Korundum.rb
index 101d3e30..4b504579 100644
--- a/korundum/rubylib/korundum/lib/KDE/Korundum.rb
+++ b/korundum/rubylib/korundum/lib/KDE/Korundum.rb
@@ -1 +1 @@
-require 'korundum'
+retquire 'korundum'
diff --git a/korundum/rubylib/korundum/lib/KDE/korundum.rb b/korundum/rubylib/korundum/lib/KDE/korundum.rb
index 40c87260..3e4d9a8c 100644
--- a/korundum/rubylib/korundum/lib/KDE/korundum.rb
+++ b/korundum/rubylib/korundum/lib/KDE/korundum.rb
@@ -22,10 +22,10 @@ module KDE
# An entry for each dcop signal or slot
# Example
- # int foobar(QString,bool)
+ # int foobar(TQString,bool)
# :name is 'foobar'
- # :full_name is 'foobar(QString,bool)'
- # :arg_types is 'QString,bool'
+ # :full_name is 'foobar(TQString,bool)'
+ # :arg_types is 'TQString,bool'
# :reply_type is 'int'
DCOPMember = Struct.new :name, :full_name, :arg_types, :reply_type
@@ -114,10 +114,10 @@ module KDE
replyType << dcop_slot.reply_type
KDE::dcop_process( @client,
dcop_slot.name,
- Qt::Internal::getMocArguments(fun),
+ TQt::Internal::getMocArguments(fun),
data,
replyType,
- (replyType == 'void' or replyType == 'ASYNC') ? nil : Qt::Internal::getMocArguments(replyType),
+ (replyType == 'void' or replyType == 'ASYNC') ? nil : TQt::Internal::getMocArguments(replyType),
replyData )
end
@@ -187,7 +187,7 @@ module KDE
return meta.dcop_object
end
- class DCOPRef < Qt::Base
+ class DCOPRef < TQt::Base
def method_missing(*k)
# Enables DCOPRef calls to be made like this:
#
@@ -266,17 +266,17 @@ module KDE
elsif arg.kind_of? Float
typeNames << "double,"
elsif arg.kind_of? Array
- typeNames << "QStringList,"
+ typeNames << "TQStringList,"
elsif arg.kind_of? String
- typeNames << "QString,"
- elsif arg.kind_of? Qt::Base
+ typeNames << "TQString,"
+ elsif arg.kind_of? TQt::Base
typeNames << arg.class.name + ","
elsif arg.instance_of? FalseClass or arg.instance_of? TrueClass
typeNames << "bool,"
end
end
typeNames.sub!(/,$/, '')
- typeNames.gsub!(/Qt::/, 'Q')
+ typeNames.gsub!(/TQt::/, 'Q')
typeNames.gsub!(/KDE::/, 'K')
typeNames << ")"
return typeNames
@@ -309,7 +309,7 @@ module KDE
end
return KDE::dcop_call( self,
full_name,
- Qt::Internal::getMocArguments(full_name),
+ TQt::Internal::getMocArguments(full_name),
*k )
end
@@ -332,7 +332,7 @@ module KDE
end
return KDE::dcop_send( self,
fun,
- Qt::Internal::getMocArguments(sig),
+ TQt::Internal::getMocArguments(sig),
*k )
end
@@ -498,7 +498,7 @@ module KDE
def exec
method_missing(:exec)
self.dispose
- Qt::Internal.application_terminated = true
+ TQt::Internal.application_terminated = true
end
end
@@ -602,7 +602,7 @@ module KDE
include Enumerable
def each
- it = Qt::ListViewItemIterator.new(self)
+ it = TQt::ListViewItemIterator.new(self)
while it.current
yield it.current
it += 1
@@ -618,7 +618,7 @@ module KDE
include Enumerable
def each
- it = Qt::ListViewItemIterator.new(self)
+ it = TQt::ListViewItemIterator.new(self)
while it.current
yield it.current
it += 1
@@ -979,7 +979,7 @@ module KDE
def exec
method_missing(:exec)
self.dispose
- Qt::Internal.application_terminated = true
+ TQt::Internal.application_terminated = true
end
end
@@ -1376,7 +1376,7 @@ class Object
def I18N_NOOP2(comment, x) x end
end
-class Qt::Base
+class TQt::Base
def self.k_dcop_signals(*signal_list)
meta = KDE::DCOPMeta[self.name] || KDE::DCOPMetaInfo.new(self)
meta.add_signals(signal_list)
diff --git a/korundum/rubylib/rbkconfig_compiler/README.dox b/korundum/rubylib/rbkconfig_compiler/README.dox
index 97da4dc9..75f6d826 100644
--- a/korundum/rubylib/rbkconfig_compiler/README.dox
+++ b/korundum/rubylib/rbkconfig_compiler/README.dox
@@ -25,7 +25,7 @@ all spaces from \<key\>.
An entry must also have a type. The list of allowable types is
specified in the DTD and loosely follows the list of types supported
-by the Qt::Variant with exception of the clearly binary types
+by the TQt::Variant with exception of the clearly binary types
(e.g. Pixmap, Image...) which are not supported. Besides those basic
type the following special types are supported:
@@ -40,7 +40,7 @@ type the following special types are supported:
compatibility.
- IntList This indicates a list of integers. This information is provided
- to the application as an Array of Integers. Useful for storing Qt::Splitter
+ to the application as an Array of Integers. Useful for storing TQt::Splitter
geometries.
An entry can optionally have a default value which is used as default when
@@ -86,7 +86,7 @@ The following options are read from the kcfgc file:
<td><b>ClassName</b></td>
<td>string</td>
<td>-</td>
- <td>Name of generated class (required)</td>
+ <td>Name of generated class (retquired)</td>
</tr>
<tr>
<td><b>Inherits</b></td>
diff --git a/korundum/rubylib/rbkconfig_compiler/autoexample.rb b/korundum/rubylib/rbkconfig_compiler/autoexample.rb
index 8526c93d..c6c942cb 100644
--- a/korundum/rubylib/rbkconfig_compiler/autoexample.rb
+++ b/korundum/rubylib/rbkconfig_compiler/autoexample.rb
@@ -19,10 +19,10 @@
Boston, MA 02110-1301, USA.
=end
-require 'Korundum'
-require 'exampleprefs_base.rb'
-require 'general_base.rb'
-require 'myoptions_base.rb'
+retquire 'Korundum'
+retquire 'exampleprefs_base.rb'
+retquire 'general_base.rb'
+retquire 'myoptions_base.rb'
aboutData = KDE::AboutData.new( "example", I18N_NOOP("autoconfig example"), "0.1" )
aboutData.addAuthor( "Cornelius Schumacher", nil, "[email protected]" )
diff --git a/korundum/rubylib/rbkconfig_compiler/example.kcfg b/korundum/rubylib/rbkconfig_compiler/example.kcfg
index 89d1e646..055958b4 100644
--- a/korundum/rubylib/rbkconfig_compiler/example.kcfg
+++ b/korundum/rubylib/rbkconfig_compiler/example.kcfg
@@ -35,7 +35,7 @@
</entry>
<entry name="MyPath" type="Path">
<label>This is a path</label>
- <default code="true">Qt::Dir.homeDirPath()+".hidden_file"</default>
+ <default code="true">TQt::Dir.homeDirPath()+".hidden_file"</default>
</entry>
<entry name="AnotherOption2" type="Int" key="Another Option">
<label>Another option</label>
diff --git a/korundum/rubylib/rbkconfig_compiler/example.rb b/korundum/rubylib/rbkconfig_compiler/example.rb
index d7ef38b1..61e3eb41 100644
--- a/korundum/rubylib/rbkconfig_compiler/example.rb
+++ b/korundum/rubylib/rbkconfig_compiler/example.rb
@@ -19,8 +19,8 @@
Boston, MA 02110-1301, USA.
=end
-require 'Korundum'
-require 'exampleprefs_base.rb'
+retquire 'Korundum'
+retquire 'exampleprefs_base.rb'
aboutData = KDE::AboutData.new( "example", I18N_NOOP("cfgc example"), "0.1" )
aboutData.addAuthor( "Cornelius Schumacher", nil, "[email protected]" )
diff --git a/korundum/rubylib/rbkconfig_compiler/general_base.ui b/korundum/rubylib/rbkconfig_compiler/general_base.ui
index 9b41370c..4a76cc34 100644
--- a/korundum/rubylib/rbkconfig_compiler/general_base.ui
+++ b/korundum/rubylib/rbkconfig_compiler/general_base.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>GeneralBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>GeneralBase</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="1">
+ <widget class="TQCheckBox" row="0" column="1">
<property name="name">
<cstring>kcfg_OneOption</cstring>
</property>
@@ -27,12 +27,12 @@
<string>OneOption</string>
</property>
</widget>
- <widget class="QSpinBox" row="1" column="1">
+ <widget class="TQSpinBox" row="1" column="1">
<property name="name">
<cstring>kcfg_AnotherOption2</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
diff --git a/korundum/rubylib/rbkconfig_compiler/kcfg.xsd b/korundum/rubylib/rbkconfig_compiler/kcfg.xsd
index 61450d25..943282b9 100644
--- a/korundum/rubylib/rbkconfig_compiler/kcfg.xsd
+++ b/korundum/rubylib/rbkconfig_compiler/kcfg.xsd
@@ -88,7 +88,7 @@
<xsd:element minOccurs="0" name="label" type="xsd:string"/>
<xsd:element minOccurs="0" name="whatsthis" type="xsd:string"/>
</xsd:all>
- <xsd:attribute name="name" use="required" type="xsd:string"/>
+ <xsd:attribute name="name" use="retquired" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
@@ -136,7 +136,7 @@
</xsd:complexType>
</xsd:element>
</xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string"/>
+ <xsd:attribute name="name" use="retquired" type="xsd:string"/>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
@@ -176,7 +176,7 @@
</xsd:complexType>
</xsd:element>
</xsd:sequence>
- <xsd:attribute name="name" use="required" type="xsd:string"/>
+ <xsd:attribute name="name" use="retquired" type="xsd:string"/>
<xsd:attribute name="type" use="optional" type="kcfg:datatype" />
<xsd:attribute name="max" use="optional" type="xsd:positiveInteger"/>
</xsd:complexType>
diff --git a/korundum/rubylib/rbkconfig_compiler/myoptions_base.ui b/korundum/rubylib/rbkconfig_compiler/myoptions_base.ui
index 3c0c2e6c..aa3148a4 100644
--- a/korundum/rubylib/rbkconfig_compiler/myoptions_base.ui
+++ b/korundum/rubylib/rbkconfig_compiler/myoptions_base.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>MyOptionsBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>MyOptionsBase</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -24,7 +24,7 @@
<string>MyString:</string>
</property>
</widget>
- <widget class="QLineEdit" row="0" column="1">
+ <widget class="TQLineEdit" row="0" column="1">
<property name="name">
<cstring>kcfg_MyString</cstring>
</property>
diff --git a/korundum/rubylib/rbkconfig_compiler/rbkconfig_compiler.cpp b/korundum/rubylib/rbkconfig_compiler/rbkconfig_compiler.cpp
index ee11862e..a3ff32d7 100644
--- a/korundum/rubylib/rbkconfig_compiler/rbkconfig_compiler.cpp
+++ b/korundum/rubylib/rbkconfig_compiler/rbkconfig_compiler.cpp
@@ -51,23 +51,23 @@ static const KCmdLineOptions options[] =
bool globalEnums;
bool itemAccessors;
-TQStringList allNames;
-TQRegExp *validNameRegexp;
+TTQStringList allNames;
+TTQRegExp *validNameRegexp;
class CfgEntry
{
public:
struct Choice
{
- TQString name;
- TQString label;
- TQString whatsThis;
+ TTQString name;
+ TTQString label;
+ TTQString whatsThis;
};
- CfgEntry( const TQString &group, const TQString &type, const TQString &key,
- const TQString &name, const TQString &label,
- const TQString &whatsThis, const TQString &code,
- const TQString &defaultValue, const TQValueList<Choice> &choices,
+ CfgEntry( const TTQString &group, const TTQString &type, const TTQString &key,
+ const TTQString &name, const TTQString &label,
+ const TTQString &whatsThis, const TTQString &code,
+ const TTQString &defaultValue, const TTQValueList<Choice> &choices,
bool hidden )
: mGroup( group ), mType( type ), mKey( key ), mName( name ),
mLabel( label ), mWhatsThis( whatsThis ), mCode( code ),
@@ -76,53 +76,53 @@ class CfgEntry
{
}
- void setGroup( const TQString &group ) { mGroup = group; }
- TQString group() const { return mGroup; }
+ void setGroup( const TTQString &group ) { mGroup = group; }
+ TTQString group() const { return mGroup; }
- void setType( const TQString &type ) { mType = type; }
- TQString type() const { return mType; }
+ void setType( const TTQString &type ) { mType = type; }
+ TTQString type() const { return mType; }
- void setKey( const TQString &key ) { mKey = key; }
- TQString key() const { return mKey; }
+ void setKey( const TTQString &key ) { mKey = key; }
+ TTQString key() const { return mKey; }
- void setName( const TQString &name ) { mName = name; }
- TQString name() const { return mName; }
+ void setName( const TTQString &name ) { mName = name; }
+ TTQString name() const { return mName; }
- void setLabel( const TQString &label ) { mLabel = label; }
- TQString label() const { return mLabel; }
+ void setLabel( const TTQString &label ) { mLabel = label; }
+ TTQString label() const { return mLabel; }
- void setWhatsThis( const TQString &whatsThis ) { mWhatsThis = whatsThis; }
- TQString whatsThis() const { return mWhatsThis; }
+ void setWhatsThis( const TTQString &whatsThis ) { mWhatsThis = whatsThis; }
+ TTQString whatsThis() const { return mWhatsThis; }
- void setDefaultValue( const TQString &d ) { mDefaultValue = d; }
- TQString defaultValue() const { return mDefaultValue; }
+ void setDefaultValue( const TTQString &d ) { mDefaultValue = d; }
+ TTQString defaultValue() const { return mDefaultValue; }
- void setCode( const TQString &d ) { mCode = d; }
- TQString code() const { return mCode; }
+ void setCode( const TTQString &d ) { mCode = d; }
+ TTQString code() const { return mCode; }
- void setMinValue( const TQString &d ) { mMin = d; }
- TQString minValue() const { return mMin; }
+ void setMinValue( const TTQString &d ) { mMin = d; }
+ TTQString minValue() const { return mMin; }
- void setMaxValue( const TQString &d ) { mMax = d; }
- TQString maxValue() const { return mMax; }
+ void setMaxValue( const TTQString &d ) { mMax = d; }
+ TTQString maxValue() const { return mMax; }
- void setParam( const TQString &d ) { mParam = d; }
- TQString param() const { return mParam; }
+ void setParam( const TTQString &d ) { mParam = d; }
+ TTQString param() const { return mParam; }
- void setParamName( const TQString &d ) { mParamName = d; }
- TQString paramName() const { return mParamName; }
+ void setParamName( const TTQString &d ) { mParamName = d; }
+ TTQString paramName() const { return mParamName; }
- void setParamType( const TQString &d ) { mParamType = d; }
- TQString paramType() const { return mParamType; }
+ void setParamType( const TTQString &d ) { mParamType = d; }
+ TTQString paramType() const { return mParamType; }
- void setChoices( const TQValueList<Choice> &d ) { mChoices = d; }
- TQValueList<Choice> choices() const { return mChoices; }
+ void setChoices( const TTQValueList<Choice> &d ) { mChoices = d; }
+ TTQValueList<Choice> choices() const { return mChoices; }
- void setParamValues( const TQStringList &d ) { mParamValues = d; }
- TQStringList paramValues() const { return mParamValues; }
+ void setParamValues( const TTQStringList &d ) { mParamValues = d; }
+ TTQStringList paramValues() const { return mParamValues; }
- void setParamDefaultValues( const TQStringList &d ) { mParamDefaultValues = d; }
- TQString paramDefaultValue(int i) const { return mParamDefaultValues[i]; }
+ void setParamDefaultValues( const TTQStringList &d ) { mParamDefaultValues = d; }
+ TTQString paramDefaultValue(int i) const { return mParamDefaultValues[i]; }
void setParamMax( int d ) { mParamMax = d; }
int paramMax() const { return mParamMax; }
@@ -155,73 +155,73 @@ class CfgEntry
}
private:
- TQString mGroup;
- TQString mType;
- TQString mKey;
- TQString mName;
- TQString mLabel;
- TQString mWhatsThis;
- TQString mCode;
- TQString mDefaultValue;
- TQString mParam;
- TQString mParamName;
- TQString mParamType;
- TQValueList<Choice> mChoices;
- TQStringList mParamValues;
- TQStringList mParamDefaultValues;
+ TTQString mGroup;
+ TTQString mType;
+ TTQString mKey;
+ TTQString mName;
+ TTQString mLabel;
+ TTQString mWhatsThis;
+ TTQString mCode;
+ TTQString mDefaultValue;
+ TTQString mParam;
+ TTQString mParamName;
+ TTQString mParamType;
+ TTQValueList<Choice> mChoices;
+ TTQStringList mParamValues;
+ TTQStringList mParamDefaultValues;
int mParamMax;
bool mHidden;
- TQString mMin;
- TQString mMax;
+ TTQString mMin;
+ TTQString mMax;
};
-static TQString varName(const TQString &n)
+static TTQString varName(const TTQString &n)
{
- TQString result = "@"+n;
+ TTQString result = "@"+n;
result[1] = result[1].lower();
return result;
}
-static TQString enumName(const TQString &n)
+static TTQString enumName(const TTQString &n)
{
- TQString result = "Enum"+n;
+ TTQString result = "Enum"+n;
result[4] = result[4].upper();
return result;
}
-static TQString enumValue(const TQString &n)
+static TTQString enumValue(const TTQString &n)
{
- TQString result = n;
+ TTQString result = n;
result[0] = result[0].upper();
return result;
}
-static TQString setFunction(const TQString &n)
+static TTQString setFunction(const TTQString &n)
{
- TQString result = "set"+n;
+ TTQString result = "set"+n;
result[3] = result[3].upper();
return result;
}
-static TQString getFunction(const TQString &n)
+static TTQString getFunction(const TTQString &n)
{
- TQString result = n;
+ TTQString result = n;
result[0] = result[0].lower();
return result;
}
-static void addQuotes( TQString &s )
+static void addQuotes( TTQString &s )
{
if ( s.left( 1 ) != "\"" ) s.prepend( "\"" );
if ( s.right( 1 ) != "\"" ) s.append( "\"" );
}
-static TQString quoteString( const TQString &s )
+static TTQString quoteString( const TTQString &s )
{
- TQString r = s;
+ TTQString r = s;
r.replace( "\\", "\\\\" );
r.replace( "\"", "\\\"" );
r.replace( "\r", "" );
@@ -229,7 +229,7 @@ static TQString quoteString( const TQString &s )
return "\"" + r + "\"";
}
-static TQString literalString( const TQString &s )
+static TTQString literalString( const TTQString &s )
{
bool isAscii = true;
for(int i = s.length(); i--;)
@@ -238,15 +238,15 @@ static TQString literalString( const TQString &s )
return quoteString(s);
// if (isAscii)
-// return "TQString::fromLatin1( " + quoteString(s) + " )";
+// return "TTQString::fromLatin1( " + quoteString(s) + " )";
// else
-// return "TQString::fromUtf8( " + quoteString(s) + " )";
+// return "TTQString::fromUtf8( " + quoteString(s) + " )";
}
-static TQString dumpNode(const TQDomNode &node)
+static TTQString dumpNode(const TTQDomNode &node)
{
- TQString msg;
- TQTextStream s(&msg, IO_WriteOnly );
+ TTQString msg;
+ TTQTextStream s(&msg, IO_WriteOnly );
node.save(s, 0);
msg = msg.simplifyWhiteSpace();
@@ -255,7 +255,7 @@ static TQString dumpNode(const TQDomNode &node)
return msg;
}
-static TQString filenameOnly(TQString path)
+static TTQString filenameOnly(TTQString path)
{
int i = path.findRev('/');
if (i >= 0)
@@ -263,10 +263,10 @@ static TQString filenameOnly(TQString path)
return path;
}
-static void preProcessDefault( TQString &defaultValue, const TQString &name,
- const TQString &type,
- const TQValueList<CfgEntry::Choice> &choices,
- TQString &code )
+static void preProcessDefault( TTQString &defaultValue, const TTQString &name,
+ const TTQString &type,
+ const TTQValueList<CfgEntry::Choice> &choices,
+ TTQString &code )
{
if ( type == "String" && !defaultValue.isEmpty() ) {
defaultValue = literalString(defaultValue);
@@ -275,14 +275,14 @@ static void preProcessDefault( TQString &defaultValue, const TQString &name,
defaultValue = literalString( defaultValue );
} else if ( type == "StringList" && !defaultValue.isEmpty() ) {
- TQTextStream rb( &code, IO_WriteOnly | IO_Append );
+ TTQTextStream rb( &code, IO_WriteOnly | IO_Append );
if (!code.isEmpty())
rb << endl;
-// rb << " TQStringList default" << name << ";" << endl;
+// rb << " TTQStringList default" << name << ";" << endl;
rb << " default" << name << " = []" << endl;
- TQStringList defaults = TQStringList::split( ",", defaultValue );
- TQStringList::ConstIterator it;
+ TTQStringList defaults = TTQStringList::split( ",", defaultValue );
+ TTQStringList::ConstIterator it;
for( it = defaults.begin(); it != defaults.end(); ++it ) {
rb << " default" << name << " << \"" << *it << "\""
<< endl;
@@ -290,19 +290,19 @@ static void preProcessDefault( TQString &defaultValue, const TQString &name,
defaultValue = "default" + name;
} else if ( type == "Color" && !defaultValue.isEmpty() ) {
- TQRegExp colorRe("\\d+,\\s*\\d+,\\s*\\d+");
+ TTQRegExp colorRe("\\d+,\\s*\\d+,\\s*\\d+");
if (colorRe.exactMatch(defaultValue))
{
- defaultValue = "Qt::Color.new( " + defaultValue + " )";
+ defaultValue = "TQt::Color.new( " + defaultValue + " )";
}
else
{
- defaultValue = "Qt::Color.new( \"" + defaultValue + "\" )";
+ defaultValue = "TQt::Color.new( \"" + defaultValue + "\" )";
}
} else if ( type == "Enum" ) {
if ( !globalEnums ) {
- TQValueList<CfgEntry::Choice>::ConstIterator it;
+ TTQValueList<CfgEntry::Choice>::ConstIterator it;
for( it = choices.begin(); it != choices.end(); ++it ) {
if ( (*it).name == defaultValue ) {
defaultValue.prepend( enumName(name) + "_");
@@ -312,13 +312,13 @@ static void preProcessDefault( TQString &defaultValue, const TQString &name,
}
} else if ( type == "IntList" ) {
- TQTextStream rb( &code, IO_WriteOnly | IO_Append );
+ TTQTextStream rb( &code, IO_WriteOnly | IO_Append );
if (!code.isEmpty())
rb << endl;
rb << " default" << name << " = []" << endl;
- TQStringList defaults = TQStringList::split( ",", defaultValue );
- TQStringList::ConstIterator it;
+ TTQStringList defaults = TTQStringList::split( ",", defaultValue );
+ TTQStringList::ConstIterator it;
for( it = defaults.begin(); it != defaults.end(); ++it ) {
rb << " default" << name << " << " << *it << ""
<< endl;
@@ -328,31 +328,31 @@ static void preProcessDefault( TQString &defaultValue, const TQString &name,
}
-CfgEntry *parseEntry( const TQString &group, const TQDomElement &element )
+CfgEntry *parseEntry( const TTQString &group, const TTQDomElement &element )
{
bool defaultCode = false;
- TQString type = element.attribute( "type" );
- TQString name = element.attribute( "name" );
- TQString key = element.attribute( "key" );
- TQString hidden = element.attribute( "hidden" );
- TQString label;
- TQString whatsThis;
- TQString defaultValue;
- TQString code;
- TQString param;
- TQString paramName;
- TQString paramType;
- TQValueList<CfgEntry::Choice> choices;
- TQStringList paramValues;
- TQStringList paramDefaultValues;
- TQString minValue;
- TQString maxValue;
+ TTQString type = element.attribute( "type" );
+ TTQString name = element.attribute( "name" );
+ TTQString key = element.attribute( "key" );
+ TTQString hidden = element.attribute( "hidden" );
+ TTQString label;
+ TTQString whatsThis;
+ TTQString defaultValue;
+ TTQString code;
+ TTQString param;
+ TTQString paramName;
+ TTQString paramType;
+ TTQValueList<CfgEntry::Choice> choices;
+ TTQStringList paramValues;
+ TTQStringList paramDefaultValues;
+ TTQString minValue;
+ TTQString maxValue;
int paramMax = 0;
- TQDomNode n;
+ TTQDomNode n;
for ( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- TQDomElement e = n.toElement();
- TQString tag = e.tagName();
+ TTQDomElement e = n.toElement();
+ TTQString tag = e.tagName();
if ( tag == "label" ) label = e.text();
else if ( tag == "whatsthis" ) whatsThis = e.text();
else if ( tag == "min" ) minValue = e.text();
@@ -382,14 +382,14 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element )
}
else if (paramType == "Enum")
{
- TQDomNode n2;
+ TTQDomNode n2;
for ( n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) {
- TQDomElement e2 = n2.toElement();
+ TTQDomElement e2 = n2.toElement();
if (e2.tagName() == "values")
{
- TQDomNode n3;
+ TTQDomNode n3;
for ( n3 = e2.firstChild(); !n3.isNull(); n3 = n3.nextSibling() ) {
- TQDomElement e3 = n3.toElement();
+ TTQDomElement e3 = n3.toElement();
if (e3.tagName() == "value")
{
paramValues.append( e3.text() );
@@ -421,18 +421,18 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element )
}
}
else if ( tag == "choices" ) {
- TQDomNode n2;
+ TTQDomNode n2;
for( n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) {
- TQDomElement e2 = n2.toElement();
+ TTQDomElement e2 = n2.toElement();
if ( e2.tagName() == "choice" ) {
- TQDomNode n3;
+ TTQDomNode n3;
CfgEntry::Choice choice;
choice.name = e2.attribute( "name" );
if ( choice.name.isEmpty() ) {
- kdError() << "Tag <choice> requires attribute 'name'." << endl;
+ kdError() << "Tag <choice> retquires attribute 'name'." << endl;
}
for( n3 = e2.firstChild(); !n3.isNull(); n3 = n3.nextSibling() ) {
- TQDomElement e3 = n3.toElement();
+ TTQDomElement e3 = n3.toElement();
if ( e3.tagName() == "label" ) choice.label = e3.text();
if ( e3.tagName() == "whatsthis" ) choice.whatsThis = e3.text();
}
@@ -454,7 +454,7 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element )
if ( nameIsEmpty ) {
name = key;
- name.replace( " ", TQString::null );
+ name.replace( " ", TTQString::null );
} else if ( name.contains( ' ' ) ) {
kdWarning()<<"Entry '"<<name<<"' contains spaces! <name> elements can't contain speces!"<<endl;
name.remove( ' ' );
@@ -487,20 +487,20 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element )
{
// Adjust name
paramName = name;
- name.replace("$("+param+")", TQString::null);
+ name.replace("$("+param+")", TTQString::null);
// Lookup defaults for indexed entries
for(int i = 0; i <= paramMax; i++)
{
- paramDefaultValues.append(TQString::null);
+ paramDefaultValues.append(TTQString::null);
}
- TQDomNode n;
+ TTQDomNode n;
for ( n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- TQDomElement e = n.toElement();
- TQString tag = e.tagName();
+ TTQDomElement e = n.toElement();
+ TTQString tag = e.tagName();
if ( tag == "default" )
{
- TQString index = e.attribute("param");
+ TTQString index = e.attribute("param");
if (index.isEmpty())
continue;
@@ -522,7 +522,7 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element )
return 0;
}
- TQString tmpDefaultValue = e.text();
+ TTQString tmpDefaultValue = e.text();
if (e.attribute( "code" ) != "true")
preProcessDefault(tmpDefaultValue, name, type, choices, code);
@@ -579,49 +579,49 @@ CfgEntry *parseEntry( const TQString &group, const TQDomElement &element )
/**
Return parameter declaration for given type.
*/
-TQString param( const TQString &type )
+TTQString param( const TTQString &type )
{
- if ( type == "String" ) return "const TQString &";
- else if ( type == "StringList" ) return "const TQStringList &";
- else if ( type == "Font" ) return "const TQFont &";
- else if ( type == "Rect" ) return "const TQRect &";
- else if ( type == "Size" ) return "const TQSize &";
- else if ( type == "Color" ) return "const TQColor &";
- else if ( type == "Point" ) return "const TQPoint &";
+ if ( type == "String" ) return "const TTQString &";
+ else if ( type == "StringList" ) return "const TTQStringList &";
+ else if ( type == "Font" ) return "const TTQFont &";
+ else if ( type == "Rect" ) return "const TTQRect &";
+ else if ( type == "Size" ) return "const TTQSize &";
+ else if ( type == "Color" ) return "const TTQColor &";
+ else if ( type == "Point" ) return "const TTQPoint &";
else if ( type == "Int" ) return "int";
else if ( type == "UInt" ) return "uint";
else if ( type == "Bool" ) return "bool";
else if ( type == "Double" ) return "double";
- else if ( type == "DateTime" ) return "const TQDateTime &";
+ else if ( type == "DateTime" ) return "const TTQDateTime &";
else if ( type == "Int64" ) return "Q_INT64";
else if ( type == "UInt64" ) return "Q_UINT64";
- else if ( type == "IntList" ) return "const TQValueList<int> &";
+ else if ( type == "IntList" ) return "const TTQValueList<int> &";
else if ( type == "Enum" ) return "int";
- else if ( type == "Path" ) return "const TQString &";
- else if ( type == "Password" ) return "const TQString &";
+ else if ( type == "Path" ) return "const TTQString &";
+ else if ( type == "Password" ) return "const TTQString &";
else {
kdError() <<"rbkconfig_compiler does not support type \""<< type <<"\""<<endl;
- return "TQString"; //For now, but an assert would be better
+ return "TTQString"; //For now, but an assert would be better
}
}
/**
Actual Ruby initializer value to give a type.
*/
-TQString rbType( const TQString &type )
+TTQString rbType( const TTQString &type )
{
if ( type == "String" ) return "\"\"";
else if ( type == "StringList" ) return "[]";
- else if ( type == "Font" ) return "Qt::Font.new";
- else if ( type == "Rect" ) return "Qt::Rect.new";
- else if ( type == "Size" ) return "Qt::Size.new";
- else if ( type == "Color" ) return "Qt::Color.new";
- else if ( type == "Point" ) return "Qt::Point.new";
+ else if ( type == "Font" ) return "TQt::Font.new";
+ else if ( type == "Rect" ) return "TQt::Rect.new";
+ else if ( type == "Size" ) return "TQt::Size.new";
+ else if ( type == "Color" ) return "TQt::Color.new";
+ else if ( type == "Point" ) return "TQt::Point.new";
else if ( type == "Int" ) return "0";
else if ( type == "UInt" ) return "0";
else if ( type == "Bool" ) return "false, 42";
else if ( type == "Double" ) return "0.0";
- else if ( type == "DateTime" ) return "Qt::DateTime.new";
+ else if ( type == "DateTime" ) return "TQt::DateTime.new";
else if ( type == "Int64" ) return "0";
else if ( type == "UInt64" ) return "0";
else if ( type == "IntList" ) return "[]";
@@ -634,20 +634,20 @@ TQString rbType( const TQString &type )
}
}
-TQString defaultValue( const TQString &type )
+TTQString defaultValue( const TTQString &type )
{
if ( type == "String" ) return "\"\""; // Use empty string, not null string!
else if ( type == "StringList" ) return "[]";
else if ( type == "Font" ) return "KDE::GlobalSettings.generalFont()";
- else if ( type == "Rect" ) return "Qt::Rect.new()";
- else if ( type == "Size" ) return "Qt::Size.new()";
- else if ( type == "Color" ) return "Qt::Color.new(128, 128, 128)";
- else if ( type == "Point" ) return "Qt::Point.new()";
+ else if ( type == "Rect" ) return "TQt::Rect.new()";
+ else if ( type == "Size" ) return "TQt::Size.new()";
+ else if ( type == "Color" ) return "TQt::Color.new(128, 128, 128)";
+ else if ( type == "Point" ) return "TQt::Point.new()";
else if ( type == "Int" ) return "0";
else if ( type == "UInt" ) return "0";
else if ( type == "Bool" ) return "false";
else if ( type == "Double" ) return "0.0";
- else if ( type == "DateTime" ) return "Qt::DateTime.new()";
+ else if ( type == "DateTime" ) return "TQt::DateTime.new()";
else if ( type == "Int64" ) return "0";
else if ( type == "UInt64" ) return "0";
else if ( type == "IntList" ) return "[]";
@@ -660,16 +660,16 @@ TQString defaultValue( const TQString &type )
}
}
-TQString itemType( const TQString &type )
+TTQString itemType( const TTQString &type )
{
- TQString t;
+ TTQString t;
t = type;
t.replace( 0, 1, t.left( 1 ).upper() );
return t;
}
-static TQString itemVar(const CfgEntry *e)
+static TTQString itemVar(const CfgEntry *e)
{
if (itemAccessors)
return varName( e->name() ) + "Item";
@@ -678,10 +678,10 @@ static TQString itemVar(const CfgEntry *e)
}
-TQString newItem( const TQString &type, const TQString &name, const TQString &key,
- const TQString &defaultValue, const TQString &param = TQString::null)
+TTQString newItem( const TTQString &type, const TTQString &name, const TTQString &key,
+ const TTQString &defaultValue, const TTQString &param = TTQString::null)
{
- TQString t = "Item" + itemType( type ) +
+ TTQString t = "Item" + itemType( type ) +
".new( currentGroup(), " + key + ", " + varName( name ) + param;
if ( type == "Enum" ) {
t += ".toInt";
@@ -703,11 +703,11 @@ TQString newItem( const TQString &type, const TQString &name, const TQString &ke
return t;
}
-TQString addItem( const TQString &type, const TQString &name, const TQString &key,
- const TQString &defaultValue, const TQString &param = TQString::null,
- const TQString &paramName = TQString::null )
+TTQString addItem( const TTQString &type, const TTQString &name, const TTQString &key,
+ const TTQString &defaultValue, const TTQString &param = TTQString::null,
+ const TTQString &paramName = TTQString::null )
{
- TQString t = "addItem" + itemType( type ) +
+ TTQString t = "addItem" + itemType( type ) +
"( " + key + ", " + varName( name ) + param;
if ( type == "Enum" ) t += ", values" + name;
if ( !defaultValue.isEmpty() ) {
@@ -726,20 +726,20 @@ TQString addItem( const TQString &type, const TQString &name, const TQString &ke
return t;
}
-TQString paramString(const TQString &s, const CfgEntry *e, int i)
+TTQString paramString(const TTQString &s, const CfgEntry *e, int i)
{
- TQString result = s;
- TQString needle = "$("+e->param()+")";
+ TTQString result = s;
+ TTQString needle = "$("+e->param()+")";
if (result.contains(needle))
{
- TQString tmp;
+ TTQString tmp;
if (e->paramType() == "Enum")
{
tmp = e->paramValues()[i];
}
else
{
- tmp = TQString::number(i);
+ tmp = TTQString::number(i);
}
result.replace(needle, tmp);
@@ -747,12 +747,12 @@ TQString paramString(const TQString &s, const CfgEntry *e, int i)
return result;
}
-TQString paramString(const TQString &group, const TQStringList &parameters)
+TTQString paramString(const TTQString &group, const TTQStringList &parameters)
{
- TQString paramString = group;
- TQString arguments;
+ TTQString paramString = group;
+ TTQString arguments;
int i = 0;
- for( TQStringList::ConstIterator it = parameters.begin();
+ for( TTQStringList::ConstIterator it = parameters.begin();
it != parameters.end(); ++it)
{
if (paramString.contains("$("+*it+")"))
@@ -776,9 +776,9 @@ TQString paramString(const TQString &group, const TQStringList &parameters)
}
/* int i is the value of the parameter */
-TQString userTextsFunctions( CfgEntry *e, TQString itemVarStr=TQString::null, TQString i=TQString::null )
+TTQString userTextsFunctions( CfgEntry *e, TTQString itemVarStr=TTQString::null, TTQString i=TTQString::null )
{
- TQString txt;
+ TTQString txt;
if (itemVarStr.isNull()) itemVarStr=itemVar(e);
if ( !e->label().isEmpty() ) {
txt += " " + itemVarStr + ".setLabel( i18n(";
@@ -827,35 +827,35 @@ int main( int argc, char **argv )
return 1;
}
- validNameRegexp = new TQRegExp("[a-zA-Z_][a-zA-Z0-9_]*");
+ validNameRegexp = new TTQRegExp("[a-zA-Z_][a-zA-Z0-9_]*");
- TQString baseDir = TQFile::decodeName(args->getOption("directory"));
+ TTQString baseDir = TTQFile::decodeName(args->getOption("directory"));
if (!baseDir.endsWith("/"))
baseDir.append("/");
- TQString inputFilename = args->url( 0 ).path();
- TQString codegenFilename = args->url( 1 ).path();
+ TTQString inputFilename = args->url( 0 ).path();
+ TTQString codegenFilename = args->url( 1 ).path();
if (!codegenFilename.endsWith(".kcfgc"))
{
kdError() << "Codegen options file must have extension .kcfgc" << endl;
return 1;
}
- TQString baseName = args->url( 1 ).fileName();
+ TTQString baseName = args->url( 1 ).fileName();
baseName = baseName.left(baseName.length() - 6);
KSimpleConfig codegenConfig( codegenFilename, true );
- TQString nameSpace = codegenConfig.readEntry("NameSpace");
- TQString className = codegenConfig.readEntry("ClassName");
- TQString inherits = codegenConfig.readEntry("Inherits");
- TQString visibility = codegenConfig.readEntry("Visibility");
+ TTQString nameSpace = codegenConfig.readEntry("NameSpace");
+ TTQString className = codegenConfig.readEntry("ClassName");
+ TTQString inherits = codegenConfig.readEntry("Inherits");
+ TTQString visibility = codegenConfig.readEntry("Visibility");
if (!visibility.isEmpty()) visibility+=" ";
bool singleton = codegenConfig.readBoolEntry("Singleton", false);
bool customAddons = codegenConfig.readBoolEntry("CustomAdditions");
- TQString memberVariables = codegenConfig.readEntry("MemberVariables");
- TQStringList headerIncludes = codegenConfig.readListEntry("IncludeFiles");
- TQStringList mutators = codegenConfig.readListEntry("Mutators");
+ TTQString memberVariables = codegenConfig.readEntry("MemberVariables");
+ TTQStringList headerIncludes = codegenConfig.readListEntry("IncludeFiles");
+ TTQStringList mutators = codegenConfig.readListEntry("Mutators");
bool allMutators = false;
if ((mutators.count() == 1) && (mutators[0].lower() == "true"))
allMutators = true;
@@ -864,10 +864,10 @@ int main( int argc, char **argv )
globalEnums = codegenConfig.readBoolEntry( "GlobalEnums", false );
- TQFile input( inputFilename );
+ TTQFile input( inputFilename );
- TQDomDocument doc;
- TQString errorMsg;
+ TTQDomDocument doc;
+ TTQString errorMsg;
int errorRow;
int errorCol;
if ( !doc.setContent( &input, &errorMsg, &errorRow, &errorCol ) ) {
@@ -876,52 +876,52 @@ int main( int argc, char **argv )
return 1;
}
- TQDomElement cfgElement = doc.documentElement();
+ TTQDomElement cfgElement = doc.documentElement();
if ( cfgElement.isNull() ) {
kdError() << "No document in kcfg file" << endl;
return 1;
}
- TQString cfgFileName;
+ TTQString cfgFileName;
bool cfgFileNameArg = false;
- TQStringList parameters;
- TQStringList includes;
+ TTQStringList parameters;
+ TTQStringList includes;
- TQPtrList<CfgEntry> entries;
+ TTQPtrList<CfgEntry> entries;
entries.setAutoDelete( true );
- TQDomNode n;
+ TTQDomNode n;
for ( n = cfgElement.firstChild(); !n.isNull(); n = n.nextSibling() ) {
- TQDomElement e = n.toElement();
+ TTQDomElement e = n.toElement();
- TQString tag = e.tagName();
+ TTQString tag = e.tagName();
if ( tag == "include" ) {
- TQString includeFile = e.text();
+ TTQString includeFile = e.text();
if (!includeFile.isEmpty())
includes.append(includeFile);
} else if ( tag == "kcfgfile" ) {
cfgFileName = e.attribute( "name" );
cfgFileNameArg = e.attribute( "arg" ).lower() == "true";
- TQDomNode n2;
+ TTQDomNode n2;
for( n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) {
- TQDomElement e2 = n2.toElement();
+ TTQDomElement e2 = n2.toElement();
if ( e2.tagName() == "parameter" ) {
parameters.append( e2.attribute( "name" ) );
}
}
} else if ( tag == "group" ) {
- TQString group = e.attribute( "name" );
+ TTQString group = e.attribute( "name" );
if ( group.isEmpty() ) {
kdError() << "Group without name" << endl;
return 1;
}
- TQDomNode n2;
+ TTQDomNode n2;
for( n2 = e.firstChild(); !n2.isNull(); n2 = n2.nextSibling() ) {
- TQDomElement e2 = n2.toElement();
+ TTQDomElement e2 = n2.toElement();
if ( e2.tagName() != "entry" ) continue;
CfgEntry *entry = parseEntry( group, e2 );
if ( entry ) entries.append( entry );
@@ -968,22 +968,22 @@ int main( int argc, char **argv )
}
#endif
- TQString implementationFileName = baseName + ".rb";
+ TTQString implementationFileName = baseName + ".rb";
- TQFile implementation( baseDir + implementationFileName );
+ TTQFile implementation( baseDir + implementationFileName );
if ( !implementation.open( IO_WriteOnly ) ) {
kdError() << "Can't open '" << implementationFileName << "for writing." << endl;
return 1;
}
- TQTextStream rb( &implementation );
+ TTQTextStream rb( &implementation );
rb << "# This file is generated by rbkconfig_compiler from " << args->url(0).fileName() << "." << endl;
rb << "# All changes you do to this file will be lost." << endl;
- rb << endl << "require 'Korundum'" << endl;
+ rb << endl << "retquire 'Korundum'" << endl;
if (singleton) {
- rb << "require 'singleton'" << endl;
+ rb << "retquire 'singleton'" << endl;
}
rb << endl;
@@ -994,7 +994,7 @@ int main( int argc, char **argv )
// << className.upper() << "_H" << endl << endl;
// Includes
-// TQStringList::ConstIterator it;
+// TTQStringList::ConstIterator it;
// for( it = headerIncludes.begin(); it != headerIncludes.end(); ++it ) {
// rb << "#include <" << *it << ">" << endl;
// }
@@ -1016,10 +1016,10 @@ int main( int argc, char **argv )
// enums
CfgEntry *e;
for( e = entries.first(); e; e = entries.next() ) {
- TQValueList<CfgEntry::Choice> choices = e->choices();
+ TTQValueList<CfgEntry::Choice> choices = e->choices();
if ( !choices.isEmpty() ) {
- TQStringList values;
- TQValueList<CfgEntry::Choice>::ConstIterator itChoice;
+ TTQStringList values;
+ TTQValueList<CfgEntry::Choice>::ConstIterator itChoice;
for( itChoice = choices.begin(); itChoice != choices.end(); ++itChoice ) {
if (globalEnums) {
values.append( enumValue((*itChoice).name) );
@@ -1031,16 +1031,16 @@ int main( int argc, char **argv )
values.append( enumName(e->name()) + "_COUNT" );
}
int count = 0;
- for ( TQStringList::Iterator it = values.begin(); it != values.end(); ++it, count++ ) {
+ for ( TTQStringList::Iterator it = values.begin(); it != values.end(); ++it, count++ ) {
rb << " " << *it << " = " << count << endl;
}
rb << endl;
}
- TQStringList values = e->paramValues();
+ TTQStringList values = e->paramValues();
if ( !values.isEmpty() ) {
int count = 0;
- for ( TQStringList::Iterator it = values.begin(); it != values.end(); ++it, count++ ) {
+ for ( TTQStringList::Iterator it = values.begin(); it != values.end(); ++it, count++ ) {
if (globalEnums) {
rb << " " << enumValue(*it) << " = " << count << endl;
} else {
@@ -1055,7 +1055,7 @@ int main( int argc, char **argv )
rb << " def " << enumName(e->param()) << "ToString(i)" << endl;
rb << " [";
count = 0;
- for ( TQStringList::Iterator it = values.begin(); it != values.end(); ++it, count++ ) {
+ for ( TTQStringList::Iterator it = values.begin(); it != values.end(); ++it, count++ ) {
if (count > 0) {
rb << ", ";
}
@@ -1071,8 +1071,8 @@ int main( int argc, char **argv )
rb << endl;
for( e = entries.first(); e; e = entries.next() ) {
- TQString n = e->name();
- TQString t = e->type();
+ TTQString n = e->name();
+ TTQString t = e->type();
// Manipulator
if (allMutators || mutators.contains(n))
@@ -1104,7 +1104,7 @@ int main( int argc, char **argv )
rb << " item.property = " << varName(n);
if (!e->param().isEmpty())
rb << "[i]";
- rb << " = Qt::Variant.new( v )" << endl;
+ rb << " = TQt::Variant.new( v )" << endl;
rb << " end" << endl;
rb << " end" << endl << endl;
}
@@ -1180,7 +1180,7 @@ int main( int argc, char **argv )
rb << " def initialize( ";
if (cfgFileNameArg)
rb << " config" << (parameters.isEmpty() ? " " : ", ");
- for (TQStringList::ConstIterator it = parameters.begin();
+ for (TTQStringList::ConstIterator it = parameters.begin();
it != parameters.end(); ++it)
{
if (it != parameters.begin())
@@ -1196,13 +1196,13 @@ int main( int argc, char **argv )
rb << ")" << endl;
// Store parameters
- for (TQStringList::ConstIterator it = parameters.begin();
+ for (TTQStringList::ConstIterator it = parameters.begin();
it != parameters.end(); ++it)
{
- rb << " @param" << *it << " = Qt::Variant.new( " << *it << " )" << endl;
+ rb << " @param" << *it << " = TQt::Variant.new( " << *it << " )" << endl;
}
- TQString group;
+ TTQString group;
for( e = entries.first(); e; e = entries.next() ) {
if ( e->group() != group ) {
group = e->group();
@@ -1210,14 +1210,14 @@ int main( int argc, char **argv )
rb << " # " << group << endl;
}
if (e->param().isEmpty()) {
- rb << " " << varName(e->name()) << " = Qt::Variant.new( " << rbType(e->type()) << " )";
+ rb << " " << varName(e->name()) << " = TQt::Variant.new( " << rbType(e->type()) << " )";
} else {
rb << " " << varName(e->name()) << " = [ ";
for (int i = 0; i < e->paramMax()+1; i++) {
if (i > 0) {
rb << ", ";
}
- rb << "Qt::Variant.new( " << rbType(e->type()) << " )";
+ rb << "TQt::Variant.new( " << rbType(e->type()) << " )";
}
rb << " ]";
}
@@ -1227,7 +1227,7 @@ int main( int argc, char **argv )
rb << endl;
- group = TQString::null;
+ group = TTQString::null;
for( e = entries.first(); e; e = entries.next() ) {
if ( e->group() != group ) {
if ( !group.isEmpty() ) rb << endl;
@@ -1235,7 +1235,7 @@ int main( int argc, char **argv )
rb << " setCurrentGroup( " << paramString(group, parameters) << " )" << endl << endl;
}
- TQString key = paramString(e->key(), parameters);
+ TTQString key = paramString(e->key(), parameters);
if ( !e->code().isEmpty())
{
rb << e->code() << endl;
@@ -1243,8 +1243,8 @@ int main( int argc, char **argv )
if ( e->type() == "Enum" ) {
rb << " values"
<< e->name() << " = []" << endl;
- TQValueList<CfgEntry::Choice> choices = e->choices();
- TQValueList<CfgEntry::Choice>::ConstIterator it;
+ TTQValueList<CfgEntry::Choice> choices = e->choices();
+ TTQValueList<CfgEntry::Choice>::ConstIterator it;
for( it = choices.begin(); it != choices.end(); ++it ) {
rb << " choice = ItemEnum::Choice.new" << endl;
rb << " choice.name = \"" << enumValue((*it).name) << "\" " << endl;
@@ -1275,7 +1275,7 @@ int main( int argc, char **argv )
rb << userTextsFunctions( e );
rb << " addItem( " << itemVar(e);
- TQString quotedName = e->name();
+ TTQString quotedName = e->name();
addQuotes( quotedName );
if ( quotedName != key ) rb << ", \"" << e->name() << "\"";
rb << " )" << endl;
@@ -1286,8 +1286,8 @@ int main( int argc, char **argv )
rb << " " << itemVar(e) << " = Array.new(" << e->paramMax()+1 << ")" << endl;
for(int i = 0; i <= e->paramMax(); i++)
{
- TQString defaultStr;
- TQString itemVarStr(itemVar(e)+TQString("[%1]").arg(i));
+ TTQString defaultStr;
+ TTQString itemVarStr(itemVar(e)+TTQString("[%1]").arg(i));
if ( !e->paramDefaultValue(i).isEmpty() )
defaultStr = e->paramDefaultValue(i);
@@ -1297,10 +1297,10 @@ int main( int argc, char **argv )
defaultStr = defaultValue( e->type() );
rb << " " << itemVarStr << " = "
- << newItem( e->type(), e->name(), paramString(key, e, i), defaultStr, TQString("[%1]").arg(i) )
+ << newItem( e->type(), e->name(), paramString(key, e, i), defaultStr, TTQString("[%1]").arg(i) )
<< endl;
- rb << " " << itemVarStr << ".property = " << varName(e->name())+TQString("[%1]").arg(i) << endl;
+ rb << " " << itemVarStr << ".property = " << varName(e->name())+TTQString("[%1]").arg(i) << endl;
if ( setUserTexts )
rb << userTextsFunctions( e, itemVarStr, e->paramName() );
diff --git a/korundum/rubylib/rbkconfig_compiler/tests/test1.kcfg b/korundum/rubylib/rbkconfig_compiler/tests/test1.kcfg
index 0c0c8216..b8c23c15 100644
--- a/korundum/rubylib/rbkconfig_compiler/tests/test1.kcfg
+++ b/korundum/rubylib/rbkconfig_compiler/tests/test1.kcfg
@@ -35,7 +35,7 @@
</entry>
<entry name="MyPath" type="Path">
<label>This is a path</label>
- <default code="true">Qt::Dir.homeDirPath()+".hidden_file"</default>
+ <default code="true">TQt::Dir.homeDirPath()+".hidden_file"</default>
</entry>
<entry name="AnotherOption2" type="Int" key="Another Option">
<label>Another option</label>
diff --git a/korundum/rubylib/rbkconfig_compiler/tests/test1main.rb b/korundum/rubylib/rbkconfig_compiler/tests/test1main.rb
index 88a151a6..131287bd 100644
--- a/korundum/rubylib/rbkconfig_compiler/tests/test1main.rb
+++ b/korundum/rubylib/rbkconfig_compiler/tests/test1main.rb
@@ -1,4 +1,4 @@
-require 'Korundum'
-require 'test1.rb'
+retquire 'Korundum'
+retquire 'test1.rb'
t = Test1.new(nil, nil)
diff --git a/korundum/rubylib/rbkconfig_compiler/tests/test2main.rb b/korundum/rubylib/rbkconfig_compiler/tests/test2main.rb
index 85d18f07..bf56014f 100644
--- a/korundum/rubylib/rbkconfig_compiler/tests/test2main.rb
+++ b/korundum/rubylib/rbkconfig_compiler/tests/test2main.rb
@@ -1,5 +1,5 @@
-require 'Korundum'
-require 'myprefs.rb'
-require 'test2.rb'
+retquire 'Korundum'
+retquire 'myprefs.rb'
+retquire 'test2.rb'
t = Test2.new()
diff --git a/korundum/rubylib/rbkconfig_compiler/tests/test3main.rb b/korundum/rubylib/rbkconfig_compiler/tests/test3main.rb
index 8c19b442..f6ab27fc 100644
--- a/korundum/rubylib/rbkconfig_compiler/tests/test3main.rb
+++ b/korundum/rubylib/rbkconfig_compiler/tests/test3main.rb
@@ -1,4 +1,4 @@
-require 'Korundum'
-require 'test3.rb'
+retquire 'Korundum'
+retquire 'test3.rb'
t = TestNameSpace::Test3.new()
diff --git a/korundum/rubylib/rbkconfig_compiler/tests/test4.kcfg b/korundum/rubylib/rbkconfig_compiler/tests/test4.kcfg
index 1428bc0d..c834aa9f 100644
--- a/korundum/rubylib/rbkconfig_compiler/tests/test4.kcfg
+++ b/korundum/rubylib/rbkconfig_compiler/tests/test4.kcfg
@@ -9,7 +9,7 @@
<entry name="Color$(Number)" type="Color" key="color #$(Number)">
<parameter name="Number" type="Int" max="3"/>
<label>Block colors.</label>
- <code>defaultColor = [ Qt::red, Qt::blue, Qt::green, Qt::black ]</code>
+ <code>defaultColor = [ TQt::red, TQt::blue, TQt::green, TQt::black ]</code>
<default code="true">defaultColor[$(Number)]</default>
</entry>
<entry name="MouseAction$(Button)" type="Enum" key="$(Button)_mouse_action">
diff --git a/korundum/rubylib/rbkconfig_compiler/tests/test4main.rb b/korundum/rubylib/rbkconfig_compiler/tests/test4main.rb
index c75f0995..87bd2657 100644
--- a/korundum/rubylib/rbkconfig_compiler/tests/test4main.rb
+++ b/korundum/rubylib/rbkconfig_compiler/tests/test4main.rb
@@ -1,4 +1,4 @@
-require 'Korundum'
-require 'test4.rb'
+retquire 'Korundum'
+retquire 'test4.rb'
t = Test4.instance()
diff --git a/korundum/rubylib/rbkconfig_compiler/tests/test5.kcfg b/korundum/rubylib/rbkconfig_compiler/tests/test5.kcfg
index 1428bc0d..c834aa9f 100644
--- a/korundum/rubylib/rbkconfig_compiler/tests/test5.kcfg
+++ b/korundum/rubylib/rbkconfig_compiler/tests/test5.kcfg
@@ -9,7 +9,7 @@
<entry name="Color$(Number)" type="Color" key="color #$(Number)">
<parameter name="Number" type="Int" max="3"/>
<label>Block colors.</label>
- <code>defaultColor = [ Qt::red, Qt::blue, Qt::green, Qt::black ]</code>
+ <code>defaultColor = [ TQt::red, TQt::blue, TQt::green, TQt::black ]</code>
<default code="true">defaultColor[$(Number)]</default>
</entry>
<entry name="MouseAction$(Button)" type="Enum" key="$(Button)_mouse_action">
diff --git a/korundum/rubylib/rbkconfig_compiler/tests/test5main.rb b/korundum/rubylib/rbkconfig_compiler/tests/test5main.rb
index cd0fbeb7..94966a1a 100644
--- a/korundum/rubylib/rbkconfig_compiler/tests/test5main.rb
+++ b/korundum/rubylib/rbkconfig_compiler/tests/test5main.rb
@@ -1,4 +1,4 @@
-require 'Korundum'
-require 'test5.rb'
+retquire 'Korundum'
+retquire 'test5.rb'
t = Test5.instance()
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", "[email protected]
# 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()'
diff --git a/korundum/rubylib/tutorials/p1/p1.rb b/korundum/rubylib/tutorials/p1/p1.rb
index 87e5e1b9..120f4135 100644
--- a/korundum/rubylib/tutorials/p1/p1.rb
+++ b/korundum/rubylib/tutorials/p1/p1.rb
@@ -1,11 +1,11 @@
-require 'Qt'
+retquire 'Qt'
- a = Qt::Application.new( ARGV )
+ a = TQt::Application.new( ARGV )
- hello = Qt::PushButton.new( "Hello world!", nil )
+ hello = TQt::PushButton.new( "Hello world!", nil )
hello.resize( 100, 30 )
- Qt::Object::connect( hello, SIGNAL('clicked()'), a, SLOT('quit()') )
+ TQt::Object::connect( hello, SIGNAL('clicked()'), a, SLOT('quit()') )
a.setMainWidget( hello )
hello.show()
diff --git a/korundum/rubylib/tutorials/p2/p2.rb b/korundum/rubylib/tutorials/p2/p2.rb
index b2c6d03c..b54359da 100644
--- a/korundum/rubylib/tutorials/p2/p2.rb
+++ b/korundum/rubylib/tutorials/p2/p2.rb
@@ -1,9 +1,9 @@
-require 'Korundum'
+retquire 'Korundum'
about = KDE::AboutData.new("p2", "Hello World", "0.1")
KDE::CmdLineArgs.init(ARGV, about)
a = KDE::Application.new()
- hello = Qt::PushButton.new( a.i18n("Hello World !"), nil )
+ hello = TQt::PushButton.new( a.i18n("Hello World !"), nil )
hello.autoResize = true
a.mainWidget = hello
diff --git a/korundum/rubylib/tutorials/p3/p3.rb b/korundum/rubylib/tutorials/p3/p3.rb
index fc575878..f58c0336 100644
--- a/korundum/rubylib/tutorials/p3/p3.rb
+++ b/korundum/rubylib/tutorials/p3/p3.rb
@@ -1,4 +1,4 @@
-require 'Korundum'
+retquire 'Korundum'
class MainWindow < KDE::MainWindow
slots 'fileOpen()', 'fileSave()'
@@ -7,7 +7,7 @@ class MainWindow < KDE::MainWindow
super(nil, name)
setCaption("KDE Tutorial - p3")
- filemenu = Qt::PopupMenu.new
+ filemenu = TQt::PopupMenu.new
filemenu.insertItem( i18n( "&Open" ), self, SLOT('fileOpen()') )
filemenu.insertItem( i18n( "&Save" ), self, SLOT('fileSave()') )
filemenu.insertItem( i18n( "&Quit" ), $kapp, SLOT('quit()') )
@@ -28,7 +28,7 @@ class MainWindow < KDE::MainWindow
menu.insertSeparator()
menu.insertItem( i18n( "&Help" ), helpmenu )
- hello = Qt::TextEdit.new(
+ hello = TQt::TextEdit.new(
i18n("<H2>Hello World !</H2><BR>This is a simple" +
" window with <I><font size=5><B>R<font color=red" +
" size=5>ich </font><font color=blue size=5>Text" +
diff --git a/korundum/rubylib/tutorials/p4/p4.rb b/korundum/rubylib/tutorials/p4/p4.rb
index 63777872..f1d8be53 100644
--- a/korundum/rubylib/tutorials/p4/p4.rb
+++ b/korundum/rubylib/tutorials/p4/p4.rb
@@ -1,4 +1,4 @@
-require 'Korundum'
+retquire 'Korundum'
class MainWindow < KDE::MainWindow
slots 'changeLocation()',
@@ -8,7 +8,7 @@ class MainWindow < KDE::MainWindow
super(nil, name)
setCaption("KDE Tutorial - p4")
- filemenu = Qt::PopupMenu.new
+ filemenu = TQt::PopupMenu.new
filemenu.insertItem( i18n( "&Quit" ), $kapp, SLOT( 'quit()' ) )
about =
i18n("p4 1.0\n\n" +
@@ -26,9 +26,9 @@ class MainWindow < KDE::MainWindow
menu.insertSeparator()
menu.insertItem(i18n("&Help"), helpmenu)
- vbox = Qt::VBox.new( self )
+ vbox = TQt::VBox.new( self )
- @location = Qt::LineEdit.new( vbox )
+ @location = TQt::LineEdit.new( vbox )
@location.setText( "http://localhost" )
@browser = KDE::HTMLPart.new( vbox )
diff --git a/korundum/rubylib/tutorials/p5/p5.rb b/korundum/rubylib/tutorials/p5/p5.rb
index 8e16c2c8..c5fb132a 100644
--- a/korundum/rubylib/tutorials/p5/p5.rb
+++ b/korundum/rubylib/tutorials/p5/p5.rb
@@ -1,4 +1,4 @@
-require 'Korundum'
+retquire 'Korundum'
class MainWindow < KDE::MainWindow
slots 'changeLocation()',
@@ -9,7 +9,7 @@ class MainWindow < KDE::MainWindow
super(nil, name)
setCaption("KDE Tutorial - p5")
- filemenu = Qt::PopupMenu.new
+ filemenu = TQt::PopupMenu.new
filemenu.insertItem( i18n( "&Quit" ), $kapp, SLOT( 'quit()' ) )
about =
i18n("p5 1.0\n\n" +
@@ -27,18 +27,18 @@ class MainWindow < KDE::MainWindow
menu.insertSeparator()
menu.insertItem(i18n("&Help"), helpmenu)
- vbox = Qt::VBox.new( self )
+ vbox = TQt::VBox.new( self )
- @location = Qt::LineEdit.new( vbox )
+ @location = TQt::LineEdit.new( vbox )
@location.setText( "http://localhost" )
connect( @location , SIGNAL( 'returnPressed()' ),
self, SLOT( 'changeLocation()' ) )
- split = Qt::Splitter.new( vbox )
+ split = TQt::Splitter.new( vbox )
split.setOpaqueResize()
- bookmark = Qt::PushButton.new( i18n("Add to Bookmarks"), split );
+ bookmark = TQt::PushButton.new( i18n("Add to Bookmarks"), split );
connect( bookmark, SIGNAL( 'clicked()' ), self, SLOT( 'bookLocation()' ) )
diff --git a/korundum/rubylib/tutorials/p6/p6.rb b/korundum/rubylib/tutorials/p6/p6.rb
index ea7b2b1e..86ea4ede 100644
--- a/korundum/rubylib/tutorials/p6/p6.rb
+++ b/korundum/rubylib/tutorials/p6/p6.rb
@@ -1,7 +1,7 @@
-require 'Korundum'
+retquire 'Korundum'
class BookMarkList < KDE::ListView
- k_dcop 'void add( QString )'
+ k_dcop 'void add( TQString )'
def initialize()
super(nil, "Bookmarks")
diff --git a/korundum/rubylib/tutorials/p7/p7.rb b/korundum/rubylib/tutorials/p7/p7.rb
index 650f4db5..8e6eaf6c 100644
--- a/korundum/rubylib/tutorials/p7/p7.rb
+++ b/korundum/rubylib/tutorials/p7/p7.rb
@@ -1,7 +1,7 @@
-require 'Korundum'
+retquire 'Korundum'
class Browser < KDE::MainWindow
- k_dcop 'void setURL(QString)'
+ k_dcop 'void setURL(TQString)'
slots 'fileSetDefaultPage()',
'changeLocation()',
@@ -18,7 +18,7 @@ class Browser < KDE::MainWindow
setCaption("KDE Tutorial - p7")
@history = []
- filemenu = Qt::PopupMenu.new
+ filemenu = TQt::PopupMenu.new
filemenu.insertItem( i18n( "&Set default page" ),
self, SLOT( 'fileSetDefaultPage()' ) )
filemenu.insertItem(i18n( "&Quit" ), $kapp, SLOT( 'quit()' ))
@@ -52,9 +52,9 @@ class Browser < KDE::MainWindow
i18n("Quit the application"))
addToolBar(toolbar)
- vbox = Qt::VBox.new( self )
+ vbox = TQt::VBox.new( self )
- @location = Qt::LineEdit.new( vbox )
+ @location = TQt::LineEdit.new( vbox )
config = $kapp.config()
config.setGroup("Settings")
@@ -63,7 +63,7 @@ class Browser < KDE::MainWindow
connect( @location , SIGNAL( 'returnPressed()' ),
self, SLOT( 'changeLocation()' ) )
- split = Qt::Splitter.new( vbox )
+ split = TQt::Splitter.new( vbox )
split.setOpaqueResize()
@browser = KDE::HTMLPart.new( split )
diff --git a/korundum/rubylib/tutorials/p8/p8.rb b/korundum/rubylib/tutorials/p8/p8.rb
index 711fe021..817f72f9 100644
--- a/korundum/rubylib/tutorials/p8/p8.rb
+++ b/korundum/rubylib/tutorials/p8/p8.rb
@@ -1,15 +1,15 @@
-require 'Korundum'
+retquire 'Korundum'
class BookMarkList < KDE::ListView
- k_dcop 'void add(QString)'
+ k_dcop 'void add(TQString)'
- slots 'setURLInBrowser(QListViewItem *)'
+ slots 'setURLInBrowser(TQListViewItem *)'
def initialize()
super(nil, "Bookmarks")
addColumn( i18n("My Bookmarks") );
- connect( self, SIGNAL('clicked(QListViewItem *)'),
- self, SLOT('setURLInBrowser(QListViewItem *)'))
+ connect( self, SIGNAL('clicked(TQListViewItem *)'),
+ self, SLOT('setURLInBrowser(TQListViewItem *)'))
end
def add( s )
diff --git a/korundum/rubylib/tutorials/p9/p9.rb b/korundum/rubylib/tutorials/p9/p9.rb
index 98bb9d0e..48a01fdc 100644
--- a/korundum/rubylib/tutorials/p9/p9.rb
+++ b/korundum/rubylib/tutorials/p9/p9.rb
@@ -1,7 +1,7 @@
-require 'Korundum'
+retquire 'Korundum'
class Browser < KDE::MainWindow
- k_dcop 'void setURL(QString)'
+ k_dcop 'void setURL(TQString)'
slots 'fileSetDefaultPage()',
'changeLocation()',
@@ -28,9 +28,9 @@ class Browser < KDE::MainWindow
createGUI(Dir.getwd + "/p9ui.rc")
- vbox = Qt::VBox.new( self )
+ vbox = TQt::VBox.new( self )
- @location = Qt::LineEdit.new( vbox )
+ @location = TQt::LineEdit.new( vbox )
config = $kapp.config()
config.setGroup("Settings")