Plasma ApplicationWindow component proposal.

Mark markg85 at gmail.com
Tue May 29 10:11:34 UTC 2012


Hi,

since we don't really seem to be getting away from a ApplicationWindow
component i will just try to start the discussion for it.
I'd like to implement a ApplicationWindow component that follows
http://qt.gitorious.org/qt-components/desktop/blobs/master/components/ApplicationWindow.qml
thus
in plasma that will become:

PlasmaComponents.ApplicationWindow
{
  ...
}

Note: ApplicationWindow creates a QWindowItem:
http://qt.gitorious.org/qt-components/desktop/blobs/master/src/qwindowitem.h
All relevant files:
http://qt.gitorious.org/qt-components/desktop/blobs/master/src/qwindowitem.h
http://qt.gitorious.org/qt-components/desktop/blobs/master/src/qwindowitem.cpp
http://qt.gitorious.org/qt-components/desktop/blobs/master/src/qtoplevelwindow.h
http://qt.gitorious.org/qt-components/desktop/blobs/master/src/qtoplevelwindow.cpp

I would basically copy the above files and add them to
http://quickgit.kde.org/index.php?p=kde-runtime.git&a=tree&h=bad8a1c734c571f678cb5809b72586e2e3dc9563&hb=294470c860f548944ac44d83aff98996a075fcd3&f=plasma%2Fdeclarativeimports%2Fplasmacomponents

The advantages for a ApplicationWindow are (in my case):
- Full control over a window element.
- Allows me to move a window from within QML along with the animation
(Behavior on x { Numberanimation{}}) ... which makes it a lot neater then
doing the same from C++.
- I only have to pass new positions from the C++ side

You do in fact end up with 2 new elements:
.ApplicationWindow
.Window

I propose Window to be private (don't know how to do that) and make
ApplicationWindow public with the "api" from Qt Desktop components along
with - at the very least - the following:
PlasmaComponents.ApplicationWindow
{
  blurMask: QRegin
  windowDecoration : bool (already in the Window element read qwindowitem.h)
}

Yes, ApplicationWindow will have all the flags set by default to blur the
background and be a transparent window. The blurMask will be used to
determine what to blur.
This is specifically for FrameSvg in C++ and FrameSvgItem in QML (long live
naming consistency..) This does mean that the Frame* QML Components will
need to have a (read only) mask property which can be set in the
ApplicationWindow component and will be used for blurring. Ideally there is
going to be a new "FrameWindow" (or WindowFrame) component which combines
FrameSvgItem and ApplicationWindow.

I in fact already had all this working about a year ago but was - at that
time - hold back by Marco to commit it. That change was sadly lost during
a re-install and discarding that code as not useful since it wasn't allowed
to be committed anyway.

I do like to make this - again - but only if i get the GO that it will not
be in vein and a waste of time. I really want to have this one settled
before i even start.

So:
- If you have any additions to the ApplicationWindow API as described
above, please do tell.
- Any other issues/naming/whatever, please do tell.
- I will only begin with this if i get the GO that it makes a chance
of actually being committed otherwise my efforts are in vein again which i
want to prevent!

I can't wait to see those replies on this proposal :)

Cheers,
Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120529/f58164f1/attachment.html>


More information about the Plasma-devel mailing list