[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: kspread plugins?
From:       Thomas Zander <zander () kde ! org>
Date:       2007-06-22 10:38:26
Message-ID: 200706221238.26679.zander () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Friday 22 June 2007 12:05:33 Tomas Mecir wrote:
> > I can imagine a (too simple) interface you create in KSpread.
> > class KSpreadPlugin {
> >   virtual Value value() const = 0;
> >   virtual void setData(const QString &formulaText) = 0;
> >   virtual QWidget* createConfigPanel() const = 0;
> > };
>
> Hrm. Well I guess you only use this as a generic example, as
> reimplementing these functions would be of little use

Yes, it probably was a stupid example :)

> Perhaps I'm overheated today or something, but I'm still failing to
> see any tangible benefit over simply allowing the plug-ins to set the
> cell text, be it directly or through some proxy API. 

That would work fine as well, sure.
The basic Idea that I had is that KSpread should be able to ask the plugin 
for a new value whenever a recalc is done.
How that value is passed is something that people are more into the 
KSpread API should know.

Another point that I should emphasize at this point is that providing an 
interface for the plugin to implement means that it is easier to keep 
your API stable because you can limit the (internal) classes you export. 
Which is great to allow an external party to write a plugin for 2.1 and 
still use it with 2.6 without recompiling.

> Unless we're 
> talking about big things like a plug-in using the cell to display
> something totally different, not text, but that's likely going way out
> of the scope of simple plug-ins, and should be done in a separate
> flake.

No, text only would be fine IMO. I was mostly thinking about the two 
examples I gave in this thread; having a kross script might be a 3th. 
Where the script can do something silly like showing the amount of files 
in your homedir. Stuff like that.

-- 
Thomas Zander

[Attachment #5 (application/pgp-signature)]

_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic