[PATCH] Add signals support to kconfig_compiler
michael.larouche at kdemail.net
Tue Jan 31 15:03:44 GMT 2006
This patch add support for signals in kconfig_compiler. What does it means ?
It means that a changed entry can emit a signal to dispatch it to another
component. I needed it in Kopete to replace a old hand-made configuration
First you need to define a list of signals in the configuration file like
<signal name="emoticonSettingsChanged" />
<label>Tell when a complete style change.</label>
After, add to the entry the signal to emit:
<entry key="stylePath" type="String">
<label>Absolute path to a directory containing a Adium/Kopete chat window
<emit signal="styleChanged" />
To acheive it, I needed to make KConfigSkeleton derive from QObject to be able
to call signals in derived classes.
I define a enum list in the devirated class that I store in a bitmask to
determine which signal was modified. Then in the derivated usrWriteConfig()
method, it emit the changed signals.
Patch included also fix to reference files(to make tests pass), the new test
files, modifications to build system (automake and CMake), addition to the
Michaël Larouche (Shock The Dark Mage)
KDE developer working on Kopete, Kamefu...on dial-up :P
MSN/Email: michael.larouche at kdemail.net
IRC: irc.freenode.org/DarkShock on #kopete,#solid,#kamefu,#plasma
Jabber: darkshock at myjabber.net
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8848 bytes
Desc: not available
More information about the kde-core-devel