summaryrefslogtreecommitdiffstats
path: root/korundum/README
diff options
context:
space:
mode:
Diffstat (limited to 'korundum/README')
-rw-r--r--korundum/README32
1 files changed, 16 insertions, 16 deletions
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: