[Kget] Settings

joel vennin joel.vennin at gmail.com
Thu Jan 3 18:42:36 CET 2008


2008/1/3, Lukas Appelhans <l.appelhans at gmx.de>:
>
> Am Donnerstag, 3. Januar 2008 07:13:02 schrieb joel vennin:
> > Hi,
> >
> > I've question concerning general settings for a plugin. In fact, through
> > the transfer class we can override the save definition to save settings
> for
> > a specific transfer. To save global settings we use the KConfig system.
> >
> > However, I need when my plugin is loaded (transfer factory
> initialization)
> > to initialize some class (server settings) with the global config
> (present
> > in the KConfig singleton). So, I can do it through the transferfactory
> > constructor to initialize my class. However, if one change the global
> > settings of the plugin, I'm not able to be notified dynamically by this
> > change.
> >
> > So, for now I've only one solution, for me it is just a hack but not the
> > best solution (I think). What I do for now, I add some signal/slot
> between
> > the ui settings of the plugin and my class (server settings) to keep
> > informed by settings modification.
> Mmh, perhaps we can add a function for the Transfer-class, which is called
> every Settings-change. If that's a good sollution, I will prepare a patch
> and
> commit it, when trunk is reopened...


Thank you for your reply,

Ok but (I know it may be specific to my self, but I don't think so). In
fact, in my case we define one or severals servers in the settings. A server
can handle a set of connection. This set of connection must be shared
between all NntpTransfer instance. So, if one decide to change the amount of
connections handled by a server through the settings, my
NNTPServerManager(which is a snigleton) need to be notified by the fact that
a server has changed his amount of connection.
So it's why in my case I suggest that the TransferFactory can be also
notified by settings changes. If it is not the case, all the NNTPTransfer
will update the  NNTPServerManager.

I wish you understand my point of view,

Joel




Lukas
>
> _______________________________________________
> Kget mailing list
> Kget at kde.org
> https://mail.kde.org/mailman/listinfo/kget
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kget/attachments/20080103/48f1480f/attachment.html 


More information about the Kget mailing list