Hi,
I'm porting Amarok to KF5. I'm basically done with the pure C++/Qt part.
There is a folder that used to be powered by Plasma::Applet [1]. I have
now to port this to plasma-framework. Could you redirect me to a
project which use them so that it can inspire me? I have no idea of how
to begin....
You can look at plasma-workspace/shell. Note that most Plasmoids are
written in QML nowadays, rather than C++.
I know that plasmoids are in QML and that's exactly my problem. I don't
know how to build the context with the plasma-framework, and I've never
seen a project which uses it (out of plasmoids, but it's not what I'm
looking for). I could try to do pure QML in the project, but it was
designed with the old plasma-framework and I think it should stay like
this.
Hi,
I think all depends what are your design goals.
If you want to maintain a similar thing, a view with applets that can be added
and removed, I think using plasma-framework makes sense because it gives you
the infrastructure to have such applets in self contained packages and a
layout to save and restore from.
Regardless if you decide to use the whole plasma-framework, I think if you
want to maintain the "addon, applet" nature of the things in the amarok
context view, you should use the same approach for packages: they can also be
used separately from plasma with the kpackage framework (managed install,
update, remove and load from tarballs with your qml code inside, useful to
interact with things like kdelook)
So basically you mean that I should write (if I go in this direction)
some independent plasmoids (sort of) that would be called and displayed
in Amarok. I think the goal is exactly this
If you end up using plasma, I don't think a straight port of the current
amarok context view is very feasible, because plasma is changed quite a lo
(not beingbased on qgraphicsview anymore and all)
what i suggest you is to start to experiment by writing a standalone app as
little as possible that loads/saves plasmoids, a minimal shell ( hmm, i should
add one in the examples in p-w now that i think about) and then if you are
able to make it work as your liking, you take those class you written and
stick it as a view in amarok.
I suggest you to take a look at the file "standaloneappcorona.cpp" in plasma-
framework, is way simpler than "shellcorona.cpp" that is the use used in a
normal desktop session: you won't have to worry about things like multi
screen, panels or activities (what you need to implement is a Corona subclass,
it's the central part for layout save and restore).
Ok It's exactly what I was afraid of: rewritting from scratch. So I'll
create a crash-test project for this, and when I'll be comfortable
enough with it I'll do it in Amarok.
After that, In order to make the single applet talk with the Amarok internals,
there are several methods possible, but all quite simple, so it's secondary at
the moment i think :)
There are somethings i can think about for which probably plasma-framework is
not quite ready, but if there is interest i can work to fix them,, like you
may need some headers of a library which doesn't install headers yet
(plasmaquick) and the filter on desktop entry keys "X-KDE-ParentApp" should be
reimplemented, but it's all an easy fix.
Personally, I would like an application using plasma-framework, as it would
mean the part of using it as a library would be debugged and ironed out (as
the kf5 is not used that way so far)
Does it mean that it will be hard and that maybe the libraries are still
bugged? ....
Of course all of this wouldn't be necessary if the context view would become a
more fixed thing with one single view and not extensible... again it all
depends what the design goals are ;)
The goal is to be extensible. And I think in a plasma-applet way it will
be also better than it was with QGraphicScene.
I've never really used QML in a full project (just played around for
some plasmoids). Do you think that I can come back to you on IRC or per
email if I'm in troubles? I'm somehow also looking for a mentor who can
help me when I'm stuck.
Also if I write a dummy project to get used to it, maybe it could be
reviewed and put in the techbase wiki, to let other people use plasma.
I'm quite open for documenting it, if I'm given a page and a kind of
"framework" to follow.
Thx
Olivier
Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<