Hi all, those are some notes in a probable API change that will probably happen (let's discuss!) on how QML plasmoids are written.
The problem: * plasmoids needs some properties in the root object, such as minimumWidth, maximumWidth, compactRepresentation.. * the user has to declare *and* implement them: completely magic, the bad magic * we want async loading as much as possible: ifwe are in a popup, the "main" applet area should be loaded only when the popup opens. this is right now possible but has to be made quite explicitly with the ConditionalLoader component The proposal: * force plasmoids implementations to implement a new component, called Applet or something like that * this component is a simple QObject, so it can't contain any UI * it exports explicitly the properties we need: minimumWidth/height other sizes, compactRepresentation.. * and a new component: fullRepresentation: it will contain the stuff that are intended to go in the full applet, so the popup contents or the full view in the desktop. * both compact and full representation are created on demand when needed, so are *not* guaranteed to always exist. * everything that needs to always exist is stuff like model and dataengines (therefore not graphical) this will have to be child of the root Applet item. (another proposal was to make another property that contains it) * another thing i was thinking about is that some AppletInterface functionalities can be moved there (can be "plasmoid" the root object? i am not sure how much technically feasible, it may be experimented tough) Pros: * allows experiments: one day we may have a "mediacenterrepresentation" and so on * neat api Cons: * may not make fully sense in containments: compactRepresentation is meaningless here * will break *all* plasmoids, will be necessary to adapt everything, how much will delay? a draft of the Appelt api can be found in the branch mart/AppletComponent in plasma-framework Cheers, Marco Martin _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel