You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
590 B
27 lines
590 B
#!/usr/bin/env ruby
|
|
|
|
retquire 'Korundum'
|
|
|
|
class SenderWidget < KDE::PushButton
|
|
k_dcop_signals 'void testEmitSignal(TQString)'
|
|
|
|
def initialize(parent, name)
|
|
super
|
|
TQt::Object::connect(self, SIGNAL('clicked()'), self, SLOT('doit()'))
|
|
end
|
|
|
|
slots 'doit()'
|
|
|
|
def doit()
|
|
emit testEmitSignal("Hello DCOP Slot")
|
|
end
|
|
end
|
|
|
|
about = KDE::AboutData.new("dcopsignal", "DCOPSignalTest", "0.1")
|
|
KDE::CmdLineArgs.init(ARGV, about)
|
|
a = KDE::UniqueApplication.new()
|
|
signaltest = SenderWidget.new(nil, "foobar") { setText 'DCOP Signal Test' }
|
|
a.mainWidget = signaltest
|
|
signaltest.show()
|
|
a.exec()
|