Configuration dialogs for Calligra Applications

Cyrille Berger Skott cberger at cberger.net
Thu Jan 13 08:02:02 GMT 2011


Hi,

On Thursday 13 January 2011, Shantanu Tushar Jha wrote:
> 1. Is the idea of sharing configuration dialog and common configuration
> pages sane? I don't have much idea about Calligra's (and hence KOffice's)
> history so if this has been already discussed, please point to the ML
> thread.

We had prior discussion on the subject, see [1]. It is all I could remember. 
Which lead to some config dialog to be put in libs/main/config see [2]. While 
it allows the widgets to be the same, it still requires editing each 
individual application.

To conclude, yes it is a sane idea and a very wanted project :)

> 2. To implement a shared dialog, where is the best place to add the dialog?
> Being new to the codebase, lots of classes come to my mind (like
> KOApplication, KODocument etc) so I need a little bit of help here.

I guess all depends how much time you are willing to invest in this. If you 
only have time for the autosave configuration, the quickest road is to add a 
widget to libs/main/config, and make all application use that. However, if you 
want to invest yourself more in the subject, and create a setting dialog that 
would allow "calligra-wide" configuration option as well as "application-
specific". I have outlined a possible solution in [3], the use of KCModule [4] 
would allow to move the settings to plugins.

However, while I think it is an ideal solution, an intermediary solution would 
be to have a KoSettingsDialog inheriting KPageDialog, with a set of predefined 
pages, that can be extended by application for their own settings. The 
location of that dialog should be in libs/main, and it should probably be 
called from KoView. And I guess application specific pages could be created by 
adding a KoView::createPreferencesPage returning a list of KPageWidgetItem*.

[1] http://lists.kde.org/?l=koffice-devel&m=124932729205268&w=2
[2] http://gitweb.kde.org/calligra.git/tree/HEAD:/libs/main/config
[3] http://lists.kde.org/?l=koffice-devel&m=124937404927580&w=2
[4] http://api.kde.org/4.x-api/kdelibs-apidocs/kdeui/html/classKCModule.html
-- 
Cyrille Berger Skott



More information about the calligra-devel mailing list