You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
514 B
26 lines
514 B
#!/usr/bin/env kjscmd
|
|
|
|
var dcop = new DCOPClient(this);
|
|
var box = new QHBox(this);
|
|
var go = new KPushButton(box);
|
|
var loc = new KLineEdit(box);
|
|
|
|
go.pixmap = StdIcons.DesktopIcon("go",32);
|
|
go.connect(go, "clicked()", this, "getWeather");
|
|
|
|
dcop.attach();
|
|
box.show();
|
|
|
|
function getWeather()
|
|
{
|
|
if ( dcop.isAttached() )
|
|
{
|
|
var icn = new Image(this);
|
|
icn.pixmap = dcop.call("KWeatherService","WeatherService","icon(QString)", loc.text);
|
|
icn.smoothScale(32,32);
|
|
go.pixmap = icn.pixmap;
|
|
}
|
|
}
|
|
|
|
application.exec();
|