<commit_before>#!/usr/bin/env ruby

require 'Korundum'

class MyWidget < KDE::PushButton
	k_dcop 'void mySlot(QString)', 'QPoint getPoint(QString)',
			'QMap<QCString,DCOPRef> actionMap()', 'QValueList<DCOPRef> windowList()'
	
	def initialize(parent, name)
		super
	end
	
	def mySlot(greeting)
		puts "greeting: #{greeting}"
	end
	
	def getPoint(msg)
		puts "message: #{msg}"
		return Qt::Point.new(50, 100)
	end
	
	def actionMap()
		map = {}
		map['foobar'] = KDE::DCOPRef.new("myapp", "myobj")
		return map
	end
	
	def windowList()
		list = []
		list[0] = KDE::DCOPRef.new("myapp", "myobj")
		return list
	end
end

about = KDE::AboutData.new("dcopslot", "dcopSlotTest", "0.1")
KDE::CmdLineArgs.init(ARGV, about)
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)
puts "result: #{result}"

slottest.show()
# Qt::Internal::setDebug Qt::QtDebugChannel::QTDB_ALL
a.exec()
<commit_msg>Added an example dcop slot of type 'QValueList<QCString> propertyNames(bool)'<commit_after>#!/usr/bin/env ruby

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)'
			
	
	def initialize(parent, name)
		super
	end
	
	def mySlot(greeting)
		puts "greeting: #{greeting}"
	end
	
	def getPoint(msg)
		puts "message: #{msg}"
		return Qt::Point.new(50, 100)
	end
	
	def actionMap()
		map = {}
		map['foobar'] = KDE::DCOPRef.new("myapp", "myobj")
		return map
	end
	
	def windowList()
		list = []
		list[0] = KDE::DCOPRef.new("myapp", "myobj")
		return list
	end
	
	def propertyNames(b)
		return ["thisProperty", "thatProperty"]
	end
end

about = KDE::AboutData.new("dcopslot", "dcopSlotTest", "0.1")
KDE::CmdLineArgs.init(ARGV, about)
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)
puts "result: #{result}"

slottest.show()
# Qt::Internal::setDebug Qt::QtDebugChannel::QTDB_ALL
a.exec()

{'fraction_non_alphanumeric': 0.16271463614063778, 'fraction_numerical': 0.006541291905151268, 'mean_word_length': 5.613513513513514, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1203243', 'n_tokens_mistral': 1017, 'n_tokens_neox': 926, 'n_words': 194}