Notes from "Async and representation"

David Edmundson david at davidedmundson.co.uk
Wed Jan 15 01:20:52 UTC 2014


Code comment:
Make sure you default m_minimumWidth and the others to something in
the ctor and check your usage of width when you mean height :)

It might be a good idea to have a default property of type
QmlListProperty<QObject> so that Applets can have child objects in the
QML for all their models/shared data without having to declare random
properties to store children. Danger is people might randomly add in
GUI items and then get confused that nothing shows. I'm not sure.

I think on the applet object:
 - minimumSize is useless (if the layout makes us super small, we'll
load the compact representation and then automatigally use the minimum
size of that and re-layout)
 - maximumSize is useless (if the layout makes us super huge, we'll
load the full representation, and then the maximumSize will be loaded
from that and relayout)
 - implicitSize becomes the default size when you add a plasmoid to
the desktop - at which point we can kill that from the
fullRepresentation (I'm not super sure on that?)

Obviously we want to avoid re-layouts as they're expensive, but right
now that's kinda unavoidable unless we happen to have the same values
in applet and in compact/full which will be hard to enforce. It will
be no worse than the current setup.

Maybe we want:
MyCompactRepresentation
{
 property size minimumSize
 property size implicitSize
}
MyFullRepresentation
{
 property size maximumSize
}

Applet {
 property size defaultSize
 property size smallestCompactSize
}

Lets have a discussion tomorrow with the whiteboard and lots of scribbling.

David


More information about the Plasma-devel mailing list