Restoring weather applet in kdeplasma-addons

Friedrich W. H. Kossebau kossebau at
Tue Feb 9 00:07:14 UTC 2016

Am Montag, 8. Februar 2016, 10:41:00 CET schrieb Marco Martin:
> On Monday 08 February 2016, Friedrich W. H. Kossebau wrote:
> > No config support yet, are QWidget-based config dialogs that even 
> > supported API-wise?
> eh, unfortunately no,because mixing qwidgets and qml in the same 
> is extremely painful :/
> so also the cofig dialog has to be qml now...

Too bad for my hope for a quick first port then.

Okay, so taking a bite into qmlication of things...

> take a look at other applets, like userswitcher on that repo too.
> you need a config/config.xml that says what config keys are "legit",
> a config/config.qml that says what pages there are in the dialog, like
> import org.kde.plasma.configuration 2.0
> ConfigModel {
>     ConfigCategory {
>         name: i18n("General")
>         icon: "weather-clear"
>         source: "configGeneral.qml"
>     }
> }
> that you'll have ui/configGeneral.qml that is the page you specified 
> every config value you specified in the config.xml will be available 
> read and write as properties in the root item of configGeneral.qml as
> cfg_configKEy like cfg_location
> and the applet will read them as plasmoid.config.location or whatever 
> config key

You meant "main.xml" here where you wrote "config.xml", right?
(would match files I found elsewhere in the repo)

Thanks for the pointers, going to play with this next.

> > * integration with KNewStuff for weather data providers
> > 
> >  (though currently bound to private and no longer existing
> > 
> >
> yeah, i think this has to be skipped for now, it needed stuff that i 
> want to expose as public symbol again.
> I'll probably add some simpler js binding to replace that in the future

Okay, will completely remove any KNewStuff code then for now.

> > * KUnitConversion data handling config & widgets, no idea yet how to 
> > that to QQ2
> isn't that stuff in kde4support?

No, KF5::UnitConversion is a proper frameworks lib :)
html/index.html (once works again for KF5)

> > Would not mind completing the recreation of the weather applet to a
> > perfect implementation of how things should be done. So happy to be
> > walked through the steps. But at the same time I need after every 
step a
> > milestone where things work completely :)
> > 
> > Pushed as branch kossebau/weatherapplet to kdeplasma-addons, so you 
> > have a look, feedback welcome.
> > 
> > Not sure if there is an issue with PlasmaComponents.TabGroup:
> > in main.qml I currently need to disable setting the "model" property 
> > the "DetailsView" item:
> > //             model: plasmoid.nativeInterface.detailsModel
> > otherwise the tab bar is not shown.
> > Any idea why that can happen?
> will take a look

Something fishy might be going on there, but from pure reading (with QQ2 
beginner eyes) I could not see anything wrong in the DetailsView 
structures that should make the TabGroup simply hide the tab (and no 
debug warnings on the console). All I found by accident was that not 
setting the model property had an effect.


More information about the Plasma-devel mailing list