Restoring weather applet in kdeplasma-addons
Friedrich W. H. Kossebau
kossebau at kde.org
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
still
> > supported API-wise?
>
> eh, unfortunately no,because mixing qwidgets and qml in the same
application
> 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
there.
>
> every config value you specified in the config.xml will be available
for
> 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
the
> 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
> >
> > http://www.sh0n.net/spstarr/khotnewstuff/plasmaweather-providers.xml)
>
> yeah, i think this has to be skipped for now, it needed stuff that i
don't
> 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
port
> > that to QQ2
>
> isn't that stuff in kde4support?
No, KF5::UnitConversion is a proper frameworks lib :)
http://api.kde.org/frameworks-api/frameworks5-apidocs/kunitconversion/
html/index.html (once api.kde.org 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
can
> > 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
of
> > the "DetailsView" item:
> > // model: plasmoid.nativeInterface.detailsModel
> > otherwise the tab bar is not shown.
> > Any idea why that can happen?
>
> will take a look
Thanks.
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.
Cheers
Friedrich
More information about the Plasma-devel
mailing list