In MenuItem, we can't inherit QAction anymore (our MenuItem has to be a
QQuickItem), so we need to aggregate, which means adding glue API.
Positioning code is disabled, icons broken, but a QMenu with our items
inside shows up and is works.
it lists widgets, allows to add them now.
Categories and download new widgets are disabled for now.
It seems PlasmaComponents.MenuItem is broken (it inherits its API from QAction,
but in QtQuick, it has to be a QQuickItem to be accepted as Delegate.
This might need glue-api. :/)
- add a mousearea to the delegate that calls
widgetExplorer.addApplet(pluginName)
- in widgetsexplorer, locate the plasmoid, load it via
Applet::loadPlasmoid(), then add it to the containment
- In showWidgetExplorer, we set the widgetExplorer's containment to the
sender(), if there's no containment set, we can't add the applet. This
way, the widgetexplorer knows which containment the applet should go to
This makes it possible to add Plasmoids via the GUI :-)
- WidgetExplorer is parented to the view, and deleted / init'ed along
with it
- the model is populated before the QML UI is loaded
The explorer now shows a list of widgets, no interaction atm.
Lots of slaughtering going on here, as we're ripping out
QGraphics*-based UIs. The widgetExplorer object won't have UI in it
anymore, as that is done in the desktop shell package (rather than its
own package).
Lots of features are disabled right now (install, uninstall, download),
the idea is to first just get the model working, and then re-enable
features one at a time.
- add explorer subdirectory to shellpackge, add widgetexplorer filedefinition
- hook up containment added with a connection to showing the widget
explorer
- memory management for widget explorer: create on demand, delete after
close: Maybe we want to cache it? For now, go for reduced memory
consumption rather than quick opening, and see how slow this might
react.
- add QQuickView for widget explorer in desktopcorona
With this patch, I can open a widget explorer window from the QML
containment. Of course, the widget explorer is just a pink window right
now.
We need this in the containment to do our book-keeping, if we just guess
the applet id, we don't know which containment is passed into
addApplet(), so we can't know where to restore it. So we use applet.id
to match a geometry saved to the config with the applet that is being
loaded.