[Kde-pim] KResource plugin selection
Kevin Krammer
kevin.krammer at gmx.at
Tue Aug 26 13:36:32 BST 2008
Hi PIMsters,
first a bit of context:
I am currently working on improvements to the Akonadi resource for KABC
resources.
Part of that is selecting the KResource plugin and currently this is handled
exactly like in KAddressBook, i.e. using KInputDialog::getItem()
In KAddressBook this works nicely because it can pass widget parent thus
getting the window relationship right, avoiding the focus stealing prevention
to kick in.
Within the Akonadi resource I only have access to a window id so I need to use
KWindowSystem::setMainWindow() which requires a pointer to the dialog which
KInputDialog does not provide.
So instead of writing just a KInputDialog reimplementation I though that I
could also get rid of the two dialog approach, i.e. selecting a plugin in one
dialog and then configuring it in another.
I decided to do an assistant type approach where the first page shows the
plugins in a list on the left and the selected plugin's description on the
right.
Description as in KRES::Factory::typeDescription(), however this is currently
always empty since the .desktop files miss the respective Comment field (see
attachment)
The second page would then show the plugin configuration widget, though it
truned out that some plugins do not have such a widget, e.g. the one for
Kolab.
IMHO these plugins should at least show an info text, e.g. return a
ConfigWidget implementation with just a QLabel.
I currently just display a generic "No config required" kind of message which
is almost certainly misleading :-/
Since the dialog gets the siize required for the largest config widget some of
them should probably also be relayouted, e.g. the one for LDAP is huge.
Such texts and widget improvements probably directly benefit a respective
Akonadi resource implementation as well.
I can relicence to LGPL if anyone else is interested.
Cheers,
Kevin
--
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kabc-plugins.diff
Type: text/x-diff
Size: 1777 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20080826/59d76bad/attachment.diff>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20080826/59d76bad/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/
More information about the kde-pim
mailing list