Allow arguments to be passed to embedded kcontrol modules

pull/16/head
Timothy Pearson 12 years ago
parent 0b26938b49
commit 1ae857eec3

@ -219,7 +219,7 @@ void KCMultiDialog::clientChanged(bool state)
enableButton( Apply, false ); enableButton( Apply, false );
} }
void KCMultiDialog::addModule(const TQString& path, bool withfallback) void KCMultiDialog::addModule(const TQString& path, bool withfallback, TQStringList args)
{ {
TQString complete = path; TQString complete = path;
@ -228,11 +228,11 @@ void KCMultiDialog::addModule(const TQString& path, bool withfallback)
KService::Ptr service = KService::serviceByStorageId( complete ); KService::Ptr service = KService::serviceByStorageId( complete );
addModule( KCModuleInfo( service ), TQStringList(), withfallback); addModule( KCModuleInfo( service ), TQStringList(), withfallback, args );
} }
void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo, void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo,
TQStringList parentmodulenames, bool withfallback) TQStringList parentmodulenames, bool withfallback, TQStringList args)
{ {
kdDebug(710) << "KCMultiDialog::addModule " kdDebug(710) << "KCMultiDialog::addModule "
<< moduleinfo.moduleName() << endl; << moduleinfo.moduleName() << endl;
@ -294,7 +294,7 @@ void KCMultiDialog::addModule(const KCModuleInfo& moduleinfo,
} }
else else
{ {
module = new KCModuleProxy( moduleinfo, withfallback, page ); module = new KCModuleProxy( moduleinfo, withfallback, page, 0, args );
TQStringList parentComponents = moduleinfo.service()->property( TQStringList parentComponents = moduleinfo.service()->property(
"X-TDE-ParentComponents" ).toStringList(); "X-TDE-ParentComponents" ).toStringList();
moduleParentComponents.insert( module, moduleParentComponents.insert( module,

@ -118,8 +118,10 @@ public:
* *
* @param withfallback Try harder to load the module. Might result * @param withfallback Try harder to load the module. Might result
* in the module appearing outside the dialog. * in the module appearing outside the dialog.
*
* @param args List of arguments to pass to the module.
**/ **/
void addModule(const TQString& module, bool withfallback=true); void addModule(const TQString& module, bool withfallback=true, TQStringList args = TQStringList());
/** /**
* Add a module. * Add a module.
@ -135,9 +137,11 @@ public:
* *
* @param withfallback Try harder to load the module. Might result * @param withfallback Try harder to load the module. Might result
* in the module appearing outside the dialog. * in the module appearing outside the dialog.
*
* @param args List of arguments to pass to the module.
**/ **/
void addModule(const KCModuleInfo& moduleinfo, TQStringList void addModule(const KCModuleInfo& moduleinfo, TQStringList
parentmodulenames = TQStringList(), bool withfallback=false); parentmodulenames = TQStringList(), bool withfallback=false, TQStringList args = TQStringList());
/** /**
* Remove all modules from the dialog. * Remove all modules from the dialog.

Loading…
Cancel
Save