[Panel-devel] [PATCH] Plasma::Dialog
Sebastian Kuegler
sebas at kde.org
Wed Dec 5 17:31:53 CET 2007
So I've reworked the dialogue enough to be fit for inclusion from my point of
view. I'd like someone to look over first, though.
The main changes from Alexis' version is that the positioning code has now
moved into the dialogue itself, since it looked pretty gross. (Sorry!)
Nothing you want to copy from applet to applet anyway.
So currently, you can use it as follows from an applet:
#include <plasma/dialog.h>
dialog = new Plasma::Dialog();
// Fill the dialog with widgets and layouts al gusto
dialog->position(event, boundingRect(), mapToScene(boundingRect().topLeft()));
dialog->show();
I'm thinking of adding a convenience method to add a UI file which then gets
set as mainWidget, but the class itself is pretty usable right now. The next
step would be to port Alexis' devicenotifier to use this class, too. I first
would like to know if it looks good this way, though.
In the screenshot, you see that the dialogue gets a shadow that looks a bit
out of place (other plasma elements don't have this shadow), is there an easy
way to avoid this, like using different default WindowFlags?
Can I commit this? (Comment is of course also welcome and will be addressed.)
--
sebas
http://www.kde.org | http://vizZzion.org | GPG Key ID: 9119 0EF9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plasma_dialog.diff
Type: text/x-diff
Size: 13641 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071205/5f6f1fe7/attachment-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plasma_dialog.jpeg
Type: image/jpeg
Size: 21427 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071205/5f6f1fe7/attachment-0001.jpeg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 481 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20071205/5f6f1fe7/attachment-0001.pgp
More information about the Panel-devel
mailing list