Making dbus optional in Calligra

Sebastian Sauer mail at dipe.org
Wed Feb 8 13:54:38 GMT 2012


On 02/08/2012 02:01 PM, Sebastian Sauer wrote:
> On 02/08/2012 02:01 PM, Boudewijn Rempt wrote:
>> On Wednesday 08 February 2012 Feb, Sebastian Sauer wrote:
>>> On 02/08/2012 09:47 AM, Boudewijn Rempt wrote:
>>>> On Wednesday 08 February 2012 Feb, Sebastian Sauer wrote:
>>>>> An example would be the "Accounts" application shipped per default 
>>>>> with
>>>>> the N9 that is using Telepathy offers additional plugins via the 
>>>>> store.
>>>>> Imagine how great it could have been if the "Documents" 
>>>>> application (aka
>>>>> Calligra on the N9) would have offered a way to write all kind of
>>>>> plugins to extend that application. But yes, in some cases it#s maybe
>>>>> not even wanted to allow to hook into an application and extend it 
>>>>> or in
>>>>> some situations there is just no need for it.
>>>> Actually, it does. There's a plugin interface for Harmattan Office, 
>>>> but it's badly documented and the project got stopped before anyone 
>>>> started writing plugins. And of course, adding an e.g. epub import 
>>>> plugin would only need to refer to Calligra code.
>>>>
>>> Oha, very interesting. Can you point me at source-code / 
>>> documentation /
>>> header-files / libs on the N9 that show how that API looks like and how
>>> I could write my own plugin? Or does "the project got stopped before
>>> anyone started writing plugins" mean it's not usable?
>>>
>>>
>> The source code is here: 
>> http://harmattan-dev.nokia.com/pool/harmattan-beta3/free/o/office-tools/. 
>> But there is no documentation.
>
> Fantastic. Lot of thanks! :-)
>

For those interested;
It is possible to write 3 types of plugins.

1. Document handlers
Someone could integrate another application like Karbon or Plan into the 
Documents application in a similar way lilke Words, Stage, tables and 
poppler are integrated already.

2. Actions
It is possible to write plugins that expose QAction's that are then 
displayed in the menu at the right-bottom side of 
Words/Stage/Tables/Poppler. So, someone could add a plugin like "Export 
all images in the document to my Images-folder" to Words and when a 
odt/doc/docx file is loaded the user can trigger that action from the menu.

3. Plugins that do not expose QAction's.
This is similar to 2 except that no actions is added to the menu. Since 
all of office-tools is exported and since office-tools seem to allow 
access to the underlying Calligra libs there are close to no limits. 
Someone could for example add a spellcheck-plugin that automatically 
checks all the words in a odt/doc/docx and paints the wrong spelled 
words with a red underline. For such a plugin some dirty hacks may be 
needed but from looking at the code it should be perfect possible.

So, all in all the plugin-API is rather good. That clearly deserves a 
blog-post and an initial plugin to show it works :) May take some time 
till I can do something like that cause of missing time :-/ In any case; 
great work! :-)

> _______________________________________________
> calligra-devel mailing list
> calligra-devel at kde.org
> https://mail.kde.org/mailman/listinfo/calligra-devel
>




More information about the calligra-devel mailing list