Notes from "Async and representation"

Marco Martin notmart at gmail.com
Tue Jan 14 22:35:11 UTC 2014


On Wednesday 15 January 2014 00:01:35 Mark Gaiser wrote:
> Hi Marco,

First, to be clear is not *my* proposal per se, is the proposal we came up at 
the sprint.

> So if i get it right you propose that every plasmoid - in QML - will
> at the very least have this:
> 
> Item {
> 
>   Applet {
>     minimumWidth: ...
>     minimumHeight: ...
>     ...
>   }
> }
> 
> right?

no,
it would be
Applet {
     minimumWidth: ...
     minimumHeight: ...
     compactRepresentation: Component {...}
     fullRepresentation: Component  {...}
}

no root Item, and is a qobject, non visual

> If that's the case then i'd like to suggest to figure out how to do
> that in the root object which will make it look as follows:
> 
> Item {
> 
>   minimumWidth: ...
>   minimumHeight: ...
>   ...
> }

that's exactly how is now apart that you have to declare the properties too, 
so 
Item {
     property int minimumWidth:...
     ....
}

that's what we want to get away from ;)

> That seems cleaner to me. Specially because Applet doesn't seem to do
> much or anything else. Just a container of some "must be provided"
> properties. I know you can inspect QML from the C++ code and figure
> out if a property is set. How, i don't know :)
> 
> Why are there minimal requirements anyway? Won't a plain simple QML file
> like: Item {
>   width: 100
>   height: 100
> }
> 
> Would the above stop to work when loaded through plasma? If so it
> would seem very odd to me. If those "must be provided" properties are
> not set then just threat it as a desktop plasmoid.

the properties don't "have" to be provided, but size hints are needed in order 
for the applet to corretcly resize in a panel for instance

-- 
Marco Martin


More information about the Plasma-devel mailing list