[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Need help with Plasma::Containment in Python
From:       "Aaron J. Seigo" <aseigo () kde ! org>
Date:       2010-03-10 3:34:08
Message-ID: 201003091934.09199.aseigo () kde ! org
[Download RAW message or body]

On March 9, 2010, LordBlueLight wrote:
> I'm trying to build a plasmoid in Python for my Dashboard wich has TabBar
> like the Comic Plasmoid has (if activated) and each Tab is a Containment
> containing a different set of applets. Like pages in the plasma-netbook
> but for my Dashboard.

this is an incorrect usage of the API and is guaranteed to do nasty things on 
you.

the hierarchy is: Corona contains Containments which contain Applets. this can 
not be violated. in practice the system tray does so (aplpets in applets) but 
it does so with some nastyness. this is only done because having plasmoids in 
there makes so much sense that it's worth fudging things a bit there.

but in general it's a bad idea and doing applet->containment->applet will fail 
spectacularly.

instead, what you probably should be doing is writing a Containment that 
allows one to group Applets. that is, in fact what Containment is all about: 
managing the layout of Applets.

now, while the hierarchy is Corona -> Containment -> Applet ... that is only 
the hierarchy for Plasma information. that is not necessarily the QGrahicsItem 
hierarchy. which means that this is completely valid:

Corona (which is a QGraphicsScene) -> Containment -> TabWidget -> Applets

the Applets in this case will see Containment and the TabWidget will be 
'transparent' to them unless they manually go up the QGraphicsWidget 
hierarchy.

you could have more than one TabWidget, you could even have different kinds of 
grouping widgets.

drag and drop would also come for free in this way.

i'd also suggest taking this discussion to plasma-devel@kde.org as that's 
where plasma related discussion tends to happen. :)

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Development Frameworks
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic