KWeather XDG icon names and icon theme support #18

Merged
blu.256 merged 27 commits from feat/kweather-std-icons into master 2 years ago

@ -36,7 +36,7 @@ tde_add_tdeinit_executable( kweatherreport AUTOMOC
##### kweatherservice (executable) ##############
tde_add_executable( kweatherservice AUTOMOC
SOURCES main.cpp metar_parser.cpp
SOURCES main.cpp weather_icon.cpp metar_parser.cpp
weatherlib.cpp weatherservice.cpp
weatherservice.skel stationdatabase.cpp
sun.cpp weatherservice.stub
@ -92,7 +92,7 @@ add_custom_command(
#
# tde_add_executable( metar_parser_test AUTOMOC
# SOURCES metar_parser_test.cpp metar_parser.cpp
# stationdatabase.cpp sun.cpp
# weather_icon.cpp stationdatabase.cpp sun.cpp
# )
#
# add_test( NAME metar_parser_test-test
@ -110,21 +110,29 @@ tde_add_kpart( weather_panelapplet AUTOMOC
)
##### kcm_weather (kpart) #######################
##### kcm_weatherapplet (kpart) #################
tde_add_kpart( kcm_weather AUTOMOC
SOURCES kcmweather.cpp prefdialogdata.ui
tde_add_kpart( kcm_weatherapplet AUTOMOC
SOURCES kcmweatherapplet.cpp appletconfig.ui
weatherservice.stub
LINK tdeio-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
)
##### kcm_weatherservice (kpart) ################
##### kcm_weatherservice (kpart) #################
tde_add_kpart( kcm_weatherservice AUTOMOC
SOURCES kcmweatherservice.cpp
serviceconfigwidget.cpp serviceconfigdata.ui
SOURCES kcmweatherservice.cpp serviceconfig.ui
weatherservice.stub
LINK tdeio-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
)
##### kcm_weatherstations (kpart) ################
tde_add_kpart( kcm_weatherstations AUTOMOC
SOURCES kcmweatherstations.cpp
stationsconfigwidget.cpp stationsconfig.ui
weatherservice.stub
LINK tdeui-shared tdehtml-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
@ -171,8 +179,9 @@ tde_create_translated_desktop(
tde_create_translated_desktop(
SOURCE
kweatherservice.desktop
kcmweather.desktop
kcmweatherapplet.desktop
kcmweatherservice.desktop
kcmweatherstations.desktop
DESTINATION ${SERVICES_INSTALL_DIR}
PO_DIR kweather-desktops
)

@ -1,16 +1,16 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>prefsDialogData</class>
<class>appletConfig</class>
<author>ian reinhart geiser &lt;geiseri@kde.org&gt;</author>
<widget class="TQWidget">
<property name="name">
<cstring>prefsDialogData</cstring>
<cstring>appletConfig</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>429</width>
<height>341</height>
<width>761</width>
<height>385</height>
</rect>
</property>
<property name="sizePolicy">
@ -27,6 +27,9 @@
<height>0</height>
</size>
</property>
<property name="caption">
<string>appletConfig</string>
</property>
<property name="focusPolicy">
<enum>TabFocus</enum>
</property>
@ -50,7 +53,7 @@
</sizepolicy>
</property>
<property name="frameShape">
<enum>GroupBoxPanel</enum>
<enum>NoFrame</enum>
</property>
<property name="frameShadow">
<enum>Sunken</enum>
@ -135,65 +138,84 @@
<property name="exclusive">
<bool>true</bool>
</property>
<vbox>
<widget class="TQRadioButton">
<property name="name">
<cstring>unnamed</cstring>
<cstring>m_smallView</cstring>
</property>
<widget class="TQRadioButton">
<property name="name">
<cstring>m_smallView</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;Show icon only</string>
</property>
<property name="buttonGroupId">
<number>1</number>
</property>
<property name="toolTip" stdset="0">
<string>&lt;qt&gt;Click here to show only the weather icon.&lt;/qt&gt;</string>
</property>
<property name="whatsThis" stdset="0">
<string>This feature will allow you to make KWeather take up only one slot on the kicker. Normally this application will take up two slots. The small view will only show the weather icon, while the normal view will display both the icon and the current weather statistics. For the small view the weather statistics will be put on the buttons tool tip.</string>
</property>
</widget>
<widget class="TQRadioButton">
<property name="name">
<cstring>CheckBox9</cstring>
</property>
<property name="text">
<string>Show &amp;icon and temperature</string>
</property>
<property name="buttonGroupId">
<number>2</number>
</property>
</widget>
<widget class="TQRadioButton">
<property name="name">
<cstring>CheckBox10</cstring>
</property>
<property name="text">
<string>Show icon, temperature, &amp;wind and pressure information</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="buttonGroupId">
<number>3</number>
</property>
</widget>
</vbox>
<property name="geometry">
<rect>
<x>6</x>
<y>24</y>
<width>747</width>
<height>26</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>0</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>&amp;Show icon only</string>
</property>
<property name="buttonGroupId">
<number>1</number>
</property>
<property name="toolTip" stdset="0">
<string>&lt;qt&gt;Click here to show only the weather icon.&lt;/qt&gt;</string>
</property>
<property name="whatsThis" stdset="0">
<string>This feature will allow you to make KWeather take up only one slot on the kicker. Normally this application will take up two slots. The small view will only show the weather icon, while the normal view will display both the icon and the current weather statistics. For the small view the weather statistics will be put on the buttons tool tip.</string>
</property>
</widget>
<widget class="TQRadioButton">
<property name="name">
<cstring>CheckBox10</cstring>
</property>
<property name="geometry">
<rect>
<x>6</x>
<y>82</y>
<width>747</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string>Show icon, temperature, &amp;wind and pressure information</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
<property name="buttonGroupId">
<number>3</number>
</property>
</widget>
<widget class="TQRadioButton">
<property name="name">
<cstring>CheckBox9</cstring>
</property>
<property name="geometry">
<rect>
<x>6</x>
<y>53</y>
<width>747</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string>Show &amp;icon and temperature</string>
</property>
<property name="buttonGroupId">
<number>2</number>
</property>
</widget>
</widget>
<widget class="TQGroupBox">
<property name="name">
<cstring>GroupBox1</cstring>
<cstring>groupBox3</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
@ -203,78 +225,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Logging Options</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>m_enableLog</cstring>
</property>
<property name="text">
<string>E&amp;nable logging</string>
</property>
</widget>
<spacer row="0" column="2">
<property name="name">
<cstring>Spacer6_2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>294</width>
<height>16</height>
</size>
</property>
</spacer>
<widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>m_labelLogFile</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Log &amp;file:</string>
</property>
<property name="buddy" stdset="0">
<cstring>m_logFile</cstring>
</property>
</widget>
<widget class="KURLRequester" row="1" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>m_logFile</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>252</width>
<height>0</height>
</size>
</property>
<property name="toolTip" stdset="0">
<string>Enter the logfile name.</string>
</property>
<property name="whatsThis" stdset="0">
<string>Enter the full path and filename to enable logging in KWeather.</string>
</property>
</widget>
</grid>
</widget>
<widget class="TQGroupBox">
<property name="name">
<cstring>groupBox3</cstring>
</property>
<property name="title">
<string>Text</string>
</property>
@ -316,35 +266,36 @@
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
<enum>MinimumExpanding</enum>
</property>
<property name="sizeHint">
<size>
<width>170</width>
<width>624</width>
<height>20</height>
</size>
</property>
</spacer>
</hbox>
</widget>
<spacer>
<property name="name">
<cstring>spacer4</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>91</height>
</size>
</property>
</spacer>
</vbox>
</widget>
<customwidgets>
</customwidgets>
<connections>
<connection>
<sender>m_enableLog</sender>
<signal>toggled(bool)</signal>
<receiver>m_labelLogFile</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>m_enableLog</sender>
<signal>toggled(bool)</signal>
<receiver>m_logFile</receiver>
<slot>setEnabled(bool)</slot>
</connection>
</connections>
<includes>
<include location="global" impldecl="in implementation">kcolorbutton.h</include>
<include location="global" impldecl="in implementation">kcombobox.h</include>
@ -352,6 +303,8 @@
<include location="global" impldecl="in implementation">klineedit.h</include>
<include location="global" impldecl="in implementation">kpushbutton.h</include>
<include location="global" impldecl="in implementation">kurlrequester.h</include>
<include location="global" impldecl="in implementation">kpushbutton.h</include>
<include location="global" impldecl="in implementation">klineedit.h</include>
</includes>
<layoutdefaults spacing="3" margin="6"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>

@ -101,7 +101,7 @@ void dockwidget::showWeather()
m_weatherService->stationName( m_locationCode ) + " (" +
m_weatherService->stationCountry( m_locationCode ) + ")</nobr></center></h3>";
if ( m_weatherService->currentIconString( m_locationCode ) == "dunno" ) // no data
if ( m_weatherService->currentIconString( m_locationCode ) == "weather-none-available" ) // no data
tip += "<center><nobr>" + i18n("The network is currently offline...") + "</nobr></center>";
tip += TQString("<br><table>"

@ -9,18 +9,10 @@
#
#################################################
install( FILES overcast.png sunny.png dunno.png
cloudy1.png cloudy2.png cloudy3.png cloudy4.png
cloudy5.png fog.png hail.png light_rain.png
mist.png shower1.png shower2.png shower3.png
sleet.png snow1.png snow2.png snow3.png
snow4.png snow5.png tstorm1.png tstorm2.png
tstorm3.png cloudy1_night.png cloudy2_night.png
cloudy3_night.png cloudy4_night.png
fog_night.png mist_night.png shower1_night.png
shower2_night.png snow1_night.png
snow2_night.png snow3_night.png sunny_night.png
tstorm1_night.png tstorm2_night.png
file( GLOB ICONS *.png )
install(
FILES ${ICONS}
DESTINATION ${DATA_INSTALL_DIR}/kweather
)

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before

Width:  |  Height:  |  Size: 7.3 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before

Width:  |  Height:  |  Size: 9.5 KiB

After

Width:  |  Height:  |  Size: 9.5 KiB

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 9.9 KiB

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

@ -36,26 +36,26 @@
#include <kcolorbutton.h>
#include "dockwidget.h"
#include "prefdialogdata.h"
#include "appletconfig.h"
#include "kcmweather.h"
#include "kcmweatherapplet.h"
#include "weatherservice_stub.h"
extern "C"
{
KDE_EXPORT TDECModule *create_weather( TQWidget *parent, const char * )
KDE_EXPORT TDECModule *create_weatherapplet( TQWidget *parent, const char * )
{
return new KCMWeather( parent, "kweather" );
return new KCMWeatherApplet( parent, "kweather" );
}
}
KCMWeather::KCMWeather( TQWidget *parent, const char *name )
KCMWeatherApplet::KCMWeatherApplet( TQWidget *parent, const char *name )
: TDECModule( parent, name )
{
mWeatherService = new WeatherService_stub( "KWeatherService",
"WeatherService" );
TQVBoxLayout *layout = new TQVBoxLayout( this );
mWidget = new prefsDialogData( this );
mWidget = new appletConfig( this );
mWidget->m_reportLocation->setFocus();
layout->addWidget( mWidget );
@ -63,8 +63,6 @@ KCMWeather::KCMWeather( TQWidget *parent, const char *name )
fillStationList();
load();
connect( mWidget->m_enableLog, TQT_SIGNAL( toggled( bool ) ),
TQT_SLOT( enableLogWidgets( bool ) ) );
connect( mWidget->m_viewMode, TQT_SIGNAL( released( int ) ),
TQT_SLOT( changeViewMode( int ) ) );
connect( mWidget->m_reportLocation, TQT_SIGNAL( activated( const TQString& ) ),
@ -73,7 +71,7 @@ KCMWeather::KCMWeather( TQWidget *parent, const char *name )
TQT_SLOT( textColorChanged(const TQColor &) ) );
TDEAboutData *about = new TDEAboutData(
I18N_NOOP( "kcmweather" ),
I18N_NOOP( "kcmweatherapplet" ),
I18N_NOOP( "KWeather Configure Dialog" ),
0, 0, TDEAboutData::License_GPL,
I18N_NOOP( "(c), 2003 Tobias Koenig" ) );
@ -82,16 +80,16 @@ KCMWeather::KCMWeather( TQWidget *parent, const char *name )
setAboutData(about);
}
KCMWeather::~KCMWeather()
KCMWeatherApplet::~KCMWeatherApplet()
{
delete mWeatherService;
}
void KCMWeather::showEvent( TQShowEvent * )
void KCMWeatherApplet::showEvent( TQShowEvent * )
{
fillStationList();
}
void KCMWeather::fillStationList()
void KCMWeatherApplet::fillStationList()
{
// store current selection
TQString current = mWidget->m_reportLocation->currentText();
@ -133,41 +131,30 @@ void KCMWeather::fillStationList()
reportLocationChanged();
}
void KCMWeather::changeViewMode( int mode )
void KCMWeatherApplet::changeViewMode( int mode )
{
mViewMode = mode;
emit changed( true );
}
void KCMWeather::enableLogWidgets( bool value )
{
mWidget->m_logFile->setEnabled( value );
mWidget->m_labelLogFile->setEnabled( value );
emit changed( true );
}
void KCMWeather::reportLocationChanged()
void KCMWeatherApplet::reportLocationChanged()
{
kdDebug() << "New station: " << mWidget->m_reportLocation->currentText()
<< " Code: " << mWeatherService->stationCode( mWidget->m_reportLocation->currentText() ) << endl;
emit changed( true );
}
void KCMWeather::textColorChanged(const TQColor &)
void KCMWeatherApplet::textColorChanged(const TQColor &)
{
emit changed( true );
}
void KCMWeather::load()
void KCMWeatherApplet::load()
{
kdDebug() << "Load" << endl;
TDEConfig config( "weather_panelappletrc" );
config.setGroup( "General Options" );
bool enabled = config.readBoolEntry( "logging", false );
mWidget->m_enableLog->setChecked( enabled );
enableLogWidgets( enabled );
static TQColor black(TQt::black);
TQColor textColor = config.readColorEntry("textColor", &black);
@ -175,24 +162,21 @@ void KCMWeather::load()
TQString loc = config.readEntry( "report_location" );
mWidget->m_logFile->setURL( config.readPathEntry( "log_file_name" ) );
if ( ! loc.isEmpty() )
mWidget->m_reportLocation->setCurrentText( mWeatherService->stationName( loc ) );
mWidget->m_viewMode->setButton( config.readNumEntry( "smallview_mode", dockwidget::ShowAll ) );
changeViewMode( config.readNumEntry( "smallview_mode", dockwidget::ShowAll ) );
emit changed( false );
}
void KCMWeather::save()
void KCMWeatherApplet::save()
{
kdDebug() << "Save" << endl;
TDEConfig config( "weather_panelappletrc" );
config.setGroup( "General Options" );
config.writeEntry( "logging", mWidget->m_enableLog->isChecked() );
config.writeEntry( "log_file_name", mWidget->m_logFile->url() );
config.writeEntry( "textColor", mWidget->m_textColor->color() );
// Station idx to local idx; if nothing selected yet, keep it empty
@ -202,21 +186,18 @@ void KCMWeather::save()
config.writeEntry( "report_location", loc);
config.writeEntry( "smallview_mode", mViewMode );
config.sync();
emit changed( false );
}
void KCMWeather::defaults()
void KCMWeatherApplet::defaults()
{
mWidget->m_enableLog->setChecked( false );
enableLogWidgets( false );
mWidget->m_logFile->setURL( "" );
mWidget->m_reportLocation->setCurrentText( "" );
changeViewMode( dockwidget::ShowAll );
emit changed( true );
}
#include "kcmweather.moc"
#include "kcmweatherapplet.moc"

@ -1,15 +1,15 @@
[Desktop Entry]
Icon=configure
Icon=kicker
Type=Service
X-TDE-ServiceTypes=TDECModule
X-TDE-ModuleType=Library
X-TDE-Library=weather
X-TDE-FactoryName=weather
X-TDE-Library=weatherapplet
X-TDE-FactoryName=weatherapplet
X-TDE-ParentApp=weather_panelapplet
X-TDE-ParentComponents=weather_panelapplet
Name=Display
Comment=Display Setup
Keywords=kweather; weather; configure; settings; display;
Name=Applet
Comment=Applet Config
Keywords=kweather; weather; configure; settings; display; applet;
X-DocPath=kweather?anchor=configuring-kweather

@ -20,21 +20,20 @@
without including the source code for TQt in the source distribution.
*/
#ifndef KCMWEATHER_H
#define KCMWEATHER_H
#ifndef KCMWEATHERAPPLET_H
#define KCMWEATHERAPPLET_H
#include <tdecmodule.h>
class prefsDialogData;
class appletConfig;
class KCMWeather : public TDECModule
class KCMWeatherApplet : public TDECModule
{
Q_OBJECT
public:
KCMWeather( TQWidget *parent = 0, const char *name = 0 );
~KCMWeather();
KCMWeatherApplet( TQWidget *parent = 0, const char *name = 0 );
~KCMWeatherApplet();
virtual void load();
virtual void save();
@ -45,13 +44,12 @@ class KCMWeather : public TDECModule
virtual void showEvent( TQShowEvent * );
private slots:
void enableLogWidgets( bool value );
void changeViewMode( int mode );
void reportLocationChanged();
void textColorChanged(const TQColor &);
private:
prefsDialogData *mWidget;
appletConfig *mWidget;
WeatherService_stub *mWeatherService;
int mViewMode;
};

@ -1,72 +1,151 @@
/*
This file is part of KWeather.
Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
with any edition of TQt, and distribute the resulting executable,
without including the source code for TQt in the source distribution.
*/
/*
This file is part of KWeather.
Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
with any edition of TQt, and distribute the resulting executable,
without including the source code for TQt in the source distribution.
*/
#include <tqbuttongroup.h>
#include <tqcheckbox.h>
#include <tqlabel.h>
#include <tqlayout.h>
#include <tdeaboutdata.h>
#include <tdeapplication.h>
#include <tdeconfig.h>
#include <kdebug.h>
#include <tdelocale.h>
#include <kurlrequester.h>
#include <kcombobox.h>
#include <kcolorbutton.h>
#include <dcopclient.h>
#include <dcopref.h>
#include "serviceconfigwidget.h"
#include "dockwidget.h"
#include "serviceconfig.h"
#include "kcmweatherservice.h"
#include "weatherservice_stub.h"
extern "C"
{
KDE_EXPORT TDECModule *create_weatherservice( TQWidget *parent, const char * ) {
return new KCMWeatherService( parent, "kweather" );
}
KDE_EXPORT TDECModule *create_weatherservice( TQWidget *parent, const char * )
{
return new KCMWeatherService( parent, "kweather" );
}
}
KCMWeatherService::KCMWeatherService( TQWidget *parent, const char *name )
: TDECModule( parent, name )
: TDECModule( parent, name )
{
TQVBoxLayout *layout = new TQVBoxLayout( this );
mWidget = new ServiceConfigWidget( this );
mWeatherService = new WeatherService_stub( "KWeatherService",
"WeatherService" );
TQVBoxLayout *layout = new TQVBoxLayout( this );
mWidget = new serviceConfig( this );
// not needed, as a change immediately changes the service
//connect(mWidget, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool)));
layout->addWidget( mWidget );
layout->addStretch();
layout->addWidget( mWidget );
TDEAboutData *about = new TDEAboutData( "kcmweatherservice",
I18N_NOOP( "KWeather Configure Dialog" ),
0, 0, TDEAboutData::License_GPL,
I18N_NOOP( "(c), 2003 Tobias Koenig" ) );
load();
connect( mWidget->m_enableLog, TQT_SIGNAL( toggled( bool ) ),
TQT_SLOT( enableLogWidgets( bool ) ) );
connect( mWidget->m_iconTheme, TQT_SIGNAL( released( int ) ),
TQT_SLOT( changed() ) );
about->addAuthor( "Tobias Koenig", 0, "tokoe@kde.org" );
setAboutData(about);
TDEAboutData *about = new TDEAboutData(
I18N_NOOP( "kcmweatherservice" ),
I18N_NOOP( "KWeather Configure Dialog" ),
0, 0, TDEAboutData::License_GPL,
I18N_NOOP( "(c), 2003 Tobias Koenig" ) );
about->addAuthor( "Tobias Koenig", 0, "tokoe@kde.org" );
setAboutData(about);
}
KCMWeatherService::~KCMWeatherService()
{
delete mWeatherService;
}
void KCMWeatherService::enableLogWidgets( bool value )
{
mWidget->m_logFile->setEnabled( value );
mWidget->m_labelLogFile->setEnabled( value );
emit changed( true );
}
void KCMWeatherService::load()
{
kdDebug() << "Load" << endl;
TDEConfig config( "weather_panelappletrc" );
config.setGroup( "General Options" );
bool enabled = config.readBoolEntry( "logging", false );
mWidget->m_enableLog->setChecked( enabled );
enableLogWidgets( enabled );
mWidget->m_logFile->setURL( config.readPathEntry( "log_file_name" ) );
mUseIconTheme = config.readBoolEntry("use_icon_theme", true);
mWidget->m_iconTheme->setButton( mUseIconTheme ? 0 : 1 );
emit changed( false );
}
void KCMWeatherService::save()
{
kdDebug() << "Save" << endl;
TDEConfig config( "weather_panelappletrc" );
config.setGroup( "General Options" );
config.writeEntry( "logging", mWidget->m_enableLog->isChecked() );
config.writeEntry( "log_file_name", mWidget->m_logFile->url() );
mUseIconTheme = (mWidget->m_iconTheme->selectedId() == 0);
config.writeEntry( "use_icon_theme", mUseIconTheme );
updateIconTheme(mUseIconTheme);
config.sync();
emit changed( false );
}
void KCMWeatherService::defaults()
{
mWidget->m_enableLog->setChecked( false );
enableLogWidgets( false );
mWidget->m_logFile->setURL( "" );
mWidget->m_iconTheme->setButton(0);
emit changed( true );
}
void KCMWeatherService::updateIconTheme( bool useIconTheme )
{
DCOPRef ws( "KWeatherService", "WeatherService" );
DCOPReply reply = ws.call( "useIconTheme", useIconTheme );
if( ! reply.isValid() )
{
kdDebug(12004) << "[kcmweatherservice::updateIconTheme] DCOP call failed" << endl;
}
}
#include "kcmweatherservice.moc"

@ -1,5 +1,5 @@
[Desktop Entry]
Icon=kweather
Icon=connect_established
Type=Service
X-TDE-ServiceTypes=TDECModule
@ -10,7 +10,7 @@ X-TDE-ParentApp=weather_panelapplet
X-TDE-ParentComponents=weather_panelapplet,kontact_weatherplugin
X-TDE-CfgDlgHierarchy=KontactSummary
Name=Weather Service
Comment=Weather Service Setup
Keywords=kweather; weather service; configure; settings;
X-DocPath=kweather?anchor=weather-service
Name=Service
Comment=Weather Service Config
Keywords=kweather; weather service; configure; settings; service;
X-DocPath=kweather?anchor=configuring-kweather

@ -1,24 +1,23 @@
/*
This file is part of KWeather.
Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
This file is part of KWeather.
Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
with any edition of TQt, and distribute the resulting executable,
without including the source code for TQt in the source distribution.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
with any edition of TQt, and distribute the resulting executable,
without including the source code for TQt in the source distribution.
*/
#ifndef KCMWEATHERSERVICE_H
@ -26,22 +25,30 @@
#include <tdecmodule.h>
class ServiceConfigWidget;
class serviceConfig;
class KCMWeatherService : public TDECModule
{
Q_OBJECT
Q_OBJECT
public:
KCMWeatherService( TQWidget *parent = 0, const char *name = 0 );
~KCMWeatherService();
virtual void load();
virtual void save();
virtual void defaults();
public:
KCMWeatherService( TQWidget *parent = 0, const char *name = 0 );
private slots:
void enableLogWidgets( bool value );
virtual void load();
virtual void save();
virtual void defaults();
private:
serviceConfig *mWidget;
WeatherService_stub *mWeatherService;
int mViewMode;
bool mUseIconTheme;
private:
ServiceConfigWidget *mWidget;
void updateIconTheme( bool useIconTheme );
};
#endif
#endif

@ -0,0 +1,72 @@
/*
This file is part of KWeather.
Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
with any edition of TQt, and distribute the resulting executable,
without including the source code for TQt in the source distribution.
*/
#include <tqlayout.h>
#include <tdeaboutdata.h>
#include <kdebug.h>
#include <tdelocale.h>
#include "stationsconfigwidget.h"
#include "kcmweatherstations.h"
extern "C"
{
KDE_EXPORT TDECModule *create_weatherstations( TQWidget *parent, const char * ) {
return new KCMWeatherStations( parent, "kweather" );
}
}
KCMWeatherStations::KCMWeatherStations( TQWidget *parent, const char *name )
: TDECModule( parent, name )
{
TQVBoxLayout *layout = new TQVBoxLayout( this );
mWidget = new StationsConfigWidget( this );
// not needed, as a change immediately changes the service
//connect(mWidget, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool)));
layout->addWidget( mWidget );
TDEAboutData *about = new TDEAboutData( "kcmweatherstations",
I18N_NOOP( "KWeather Configure Dialog" ),
0, 0, TDEAboutData::License_GPL,
I18N_NOOP( "(c), 2003 Tobias Koenig" ) );
about->addAuthor( "Tobias Koenig", 0, "tokoe@kde.org" );
setAboutData(about);
}
void KCMWeatherStations::load()
{
}
void KCMWeatherStations::save()
{
}
void KCMWeatherStations::defaults()
{
}
#include "kcmweatherstations.moc"

@ -0,0 +1,16 @@
[Desktop Entry]
Icon=kweather
Type=Service
X-TDE-ServiceTypes=TDECModule
X-TDE-ModuleType=Library
X-TDE-Library=weatherstations
X-TDE-FactoryName=weatherstations
X-TDE-ParentApp=weather_panelapplet
X-TDE-ParentComponents=weather_panelapplet,kontact_weatherplugin
X-TDE-CfgDlgHierarchy=KontactSummary
Name=Stations
Comment=Weather Stations Config
Keywords=kweather; weather service; configure; settings; stations;
X-DocPath=kweather?anchor=weather-service

@ -0,0 +1,47 @@
/*
This file is part of KWeather.
Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
As a special exception, permission is given to link this program
with any edition of TQt, and distribute the resulting executable,
without including the source code for TQt in the source distribution.
*/
#ifndef KCMWEATHERSTATIONS_H
#define KCMWEATHERSTATIONS_H
#include <tdecmodule.h>
class StationsConfigWidget;
class KCMWeatherStations : public TDECModule
{
Q_OBJECT
public:
KCMWeatherStations( TQWidget *parent = 0, const char *name = 0 );
virtual void load();
virtual void save();
virtual void defaults();
private:
StationsConfigWidget *mWidget;
};
#endif

@ -161,8 +161,9 @@ void kweather::preferences()
settingsDialog = new KCMultiDialog( this );
connect( settingsDialog, TQT_SIGNAL( configCommitted() ), TQT_SLOT( slotPrefsAccepted() ) );
settingsDialog->addModule( "kcmweather.desktop" );
settingsDialog->addModule( "kcmweatherapplet.desktop" );
settingsDialog->addModule( "kcmweatherservice.desktop" );
settingsDialog->addModule( "kcmweatherstations.desktop" );
}
settingsDialog->show();
@ -332,6 +333,13 @@ void kweather::slotPrefsAccepted()
dockWidget->setLocationCode(reportLocation);
dockWidget->setViewMode(mViewMode);
if ( !mWeatherService )
{
initDCOP();
}
mWeatherService->forceUpdateAll();
setLabelColor();
emit updateLayout();

@ -68,9 +68,9 @@ private: // Private methods
void showWeather();
void writeLogEntry();
void mousePressEvent(TQMouseEvent *e);
bool attach();
TQString reportLocation;
TQString fileName;
TQString metarData;

@ -28,6 +28,7 @@ email : jratke@comcast.net
#include "metar_parser.h"
#include "stationdatabase.h"
#include "weather_icon.h"
#include "sun.h"
// Temperature conversion macros
@ -57,6 +58,7 @@ void MetarParser::reset()
{
// Initialize the WeatherInfo structure
weatherInfo.theWeather = TQString();
weatherInfo.iconPath = TQString();
weatherInfo.clouds = 0;
weatherInfo.windMPH = 0;
weatherInfo.tempC = 0;
@ -257,7 +259,7 @@ bool MetarParser::parseCurrent(const TQString &s)
if (sCode.contains("DZ"))
{
phenomena = i18n("Drizzle");
weatherInfo.theWeather = "light_rain";
saveIconNamePath( WeatherIcon::LightRain, false );
}
else if (sCode.contains("RA"))
{
@ -272,32 +274,32 @@ bool MetarParser::parseCurrent(const TQString &s)
else if (sCode.contains("SG"))
{
phenomena = i18n("Snow Grains");
weatherInfo.theWeather = "snow4";
saveIconNamePath( WeatherIcon::Snow, false, 4 );
}
else if (sCode.contains("IC"))
{
phenomena = i18n("Ice Crystals");
weatherInfo.theWeather = "hail";
saveIconNamePath( WeatherIcon::Hail, false );
}
else if (sCode.contains("PE"))
{
phenomena = i18n("Ice Pellets");
weatherInfo.theWeather = "hail";
saveIconNamePath( WeatherIcon::Hail, false );
}
else if (s.contains("GR"))
{
phenomena = i18n("Hail");
weatherInfo.theWeather = "hail";
saveIconNamePath( WeatherIcon::Hail, false );
}
else if (sCode.contains("GS"))
{
phenomena = i18n("Small Hail Pellets");
weatherInfo.theWeather = "hail";
saveIconNamePath( WeatherIcon::Hail, false );
}
else if (s.contains("UP"))
{
phenomena = i18n("Unknown Precipitation");
weatherInfo.theWeather = iconName("shower1");
saveIconNamePath( WeatherIcon::Showers, isNight(weatherInfo.reportLocation), 1);
}
else if (sCode.contains("BR"))
{
@ -721,24 +723,22 @@ bool MetarParser::parseStationNeedsMaintenance(const TQString &s)
void MetarParser::calcCurrentIcon()
{
// Default to overcast clouds
if ( weatherInfo.clouds == -1 )
weatherInfo.clouds = 64;
bool night = isNight( weatherInfo.reportLocation );
if (weatherInfo.theWeather.isEmpty())
{
if (weatherInfo.clouds == 0)
weatherInfo.theWeather = iconName("sunny");
saveIconNamePath( WeatherIcon::Sunny, night );
else if (weatherInfo.clouds > 0 && weatherInfo.clouds <= 2)
weatherInfo.theWeather = iconName("cloudy1");
saveIconNamePath( WeatherIcon::Cloudy, night, 1 );
else if ( weatherInfo.clouds > 2 && weatherInfo.clouds <= 4)
weatherInfo.theWeather = iconName("cloudy2");
saveIconNamePath( WeatherIcon::Cloudy, night, 2 );
else if ( weatherInfo.clouds > 4 && weatherInfo.clouds <= 8)
weatherInfo.theWeather = iconName("cloudy3");
saveIconNamePath( WeatherIcon::Cloudy, night, 3 );
else if ( weatherInfo.clouds > 8 && weatherInfo.clouds < 63)
weatherInfo.theWeather = iconName( "cloudy4" );
saveIconNamePath( WeatherIcon::Cloudy, night, 4 );
else
weatherInfo.theWeather = "cloudy5";
saveIconNamePath( WeatherIcon::Cloudy, night, 5 );
}
else if (weatherInfo.theWeather == "tstorm")
{
@ -746,11 +746,11 @@ void MetarParser::calcCurrentIcon()
weatherInfo.clouds = 30;
if (weatherInfo.clouds >= 0 && weatherInfo.clouds <= 10)
weatherInfo.theWeather = iconName("tstorm1");
saveIconNamePath( WeatherIcon::Thunderstorm, night, 1 );
else if ( weatherInfo.clouds > 10 && weatherInfo.clouds <= 20)
weatherInfo.theWeather = iconName("tstorm2");
saveIconNamePath( WeatherIcon::Thunderstorm, night, 2 );
else
weatherInfo.theWeather = "tstorm3";
saveIconNamePath( WeatherIcon::Thunderstorm, night, 3 );
}
else if (weatherInfo.theWeather == "shower")
{
@ -758,11 +758,11 @@ void MetarParser::calcCurrentIcon()
weatherInfo.clouds = 30;
if (weatherInfo.clouds >= 0 && weatherInfo.clouds <= 10)
weatherInfo.theWeather = iconName("shower1");
saveIconNamePath( WeatherIcon::Showers, night, 1 );
else if ( weatherInfo.clouds > 10 && weatherInfo.clouds <= 20)
weatherInfo.theWeather = iconName("shower2");
saveIconNamePath( WeatherIcon::Showers, night, 2 );
else
weatherInfo.theWeather = "shower3";
saveIconNamePath( WeatherIcon::Showers, night, 3 );
}
else if (weatherInfo.theWeather == "snow")
{
@ -770,22 +770,22 @@ void MetarParser::calcCurrentIcon()
weatherInfo.clouds = 30;
if (weatherInfo.clouds >= 0 && weatherInfo.clouds <= 8)
weatherInfo.theWeather = iconName("snow1");
saveIconNamePath( WeatherIcon::Snow, night, 1 );
else if ( weatherInfo.clouds > 8 && weatherInfo.clouds <= 16)
weatherInfo.theWeather = iconName("snow2");
saveIconNamePath( WeatherIcon::Snow, night, 2 );
else if (weatherInfo.clouds > 16 && weatherInfo.clouds <= 24)
weatherInfo.theWeather = iconName("snow3");
saveIconNamePath( WeatherIcon::Snow, night, 3 );
else
weatherInfo.theWeather = "snow5";
saveIconNamePath( WeatherIcon::Snow, night, 5 );
}
else if (isNight(weatherInfo.reportLocation) && weatherInfo.theWeather == "mist")
weatherInfo.theWeather = "mist_night";
else if (isNight(weatherInfo.reportLocation) && weatherInfo.theWeather == "fog")
weatherInfo.theWeather = "fog_night";
else if ( weatherInfo.theWeather == "mist" || weatherInfo.theWeather == "fog" )
{
if ( weatherInfo.clouds >= 63 )
weatherInfo.theWeather = "cloudy5";
saveIconNamePath( WeatherIcon::Cloudy, night, 5 );
else if ( weatherInfo.theWeather == "mist" )
saveIconNamePath( WeatherIcon::Mist, night );
else if ( weatherInfo.theWeather == "fog" )
saveIconNamePath( WeatherIcon::Fog, night );
}
kdDebug(12006) << "Clouds: " << weatherInfo.clouds << ", Icon: "
@ -861,13 +861,23 @@ bool MetarParser::isNight(const TQString &stationID) const
}
}
TQString MetarParser::iconName( const TQString &icon ) const
void MetarParser::saveIconNamePath( int condition, bool night, int strength )
{
TQString _iconName = icon;
if ( isNight( weatherInfo.reportLocation ) )
_iconName += "_night";
return _iconName;
if( strength != 0 )
{
// Ranged
WeatherIcon* wi = new WeatherIcon( condition, night, strength );
weatherInfo.iconName = wi->name();
weatherInfo.iconPath = wi->path();
delete wi;
}
else
{
// Simple
WeatherIcon* wi = new WeatherIcon( condition, night );
weatherInfo.iconName = wi->name();
weatherInfo.iconPath = wi->path();
delete wi;
}
}

@ -32,6 +32,8 @@ struct WeatherInfo
{
/** The current weather state outside */
TQString theWeather;
TQString iconName;
TQString iconPath;
int clouds;
float windMPH;
float tempC;
@ -92,7 +94,7 @@ class MetarParser
void calcCurrentIcon();
void calcWindChill();
bool isNight(const TQString &stationID) const;
TQString iconName( const TQString &icon ) const;
void saveIconNamePath( int condition, bool night, int strength = 0 );
/*
* Reset the internal WeatherInfo struct of the class so that

@ -0,0 +1,198 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>serviceConfig</class>
<author>ian reinhart geiser &lt;geiseri@kde.org&gt;</author>
<widget class="TQWidget">
<property name="name">
<cstring>serviceConfig</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>491</width>
<height>194</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>3</hsizetype>
<vsizetype>3</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="caption">
<string>serviceConfig</string>
</property>
<property name="focusPolicy">
<enum>TabFocus</enum>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>0</number>
</property>
<widget class="TQButtonGroup">
<property name="name">
<cstring>m_iconTheme</cstring>
</property>
<property name="title">
<string>Weather Icons</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQRadioButton">
<property name="name">
<cstring>m_systemIcons</cstring>
</property>
<property name="text">
<string>&amp;Use system theme</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
<widget class="TQRadioButton">
<property name="name">
<cstring>m_kweatherIcons</cstring>
</property>
<property name="text">
<string>Use classic &amp;KWeather theme</string>
</property>
</widget>
</vbox>
</widget>
<widget class="TQGroupBox">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
<hsizetype>1</hsizetype>
<vsizetype>1</vsizetype>
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="title">
<string>Logging Options</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
<widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>m_enableLog</cstring>
</property>
<property name="text">
<string>E&amp;nable logging</string>
</property>
</widget>
<spacer row="0" column="2">
<property name="name">
<cstring>Spacer6_2</cstring>
</property>
<property name="orientation">
<enum>Horizontal</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>294</width>
<height>16</height>
</size>
</property>
</spacer>
<widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>m_labelLogFile</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Log f&amp;ile:</string>
</property>
<property name="buddy" stdset="0">
<cstring>m_logFile</cstring>
</property>
</widget>
<widget class="KURLRequester" row="1" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>m_logFile</cstring>
</property>
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>252</width>
<height>0</height>
</size>
</property>
<property name="toolTip" stdset="0">
<string>Enter the logfile name.</string>
</property>
<property name="whatsThis" stdset="0">
<string>Enter the full path and filename to enable logging in KWeather.</string>
</property>
</widget>
</grid>
</widget>
<spacer>
<property name="name">
<cstring>spacer4</cstring>
</property>
<property name="orientation">
<enum>Vertical</enum>
</property>
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="sizeHint">
<size>
<width>20</width>
<height>111</height>
</size>
</property>
</spacer>
</vbox>
</widget>
<connections>
<connection>
<sender>m_enableLog</sender>
<signal>toggled(bool)</signal>
<receiver>m_labelLogFile</receiver>
<slot>setEnabled(bool)</slot>
</connection>
<connection>
<sender>m_enableLog</sender>
<signal>toggled(bool)</signal>
<receiver>m_logFile</receiver>
<slot>setEnabled(bool)</slot>
</connection>
</connections>
<includes>
<include location="global" impldecl="in implementation">kcolorbutton.h</include>
<include location="global" impldecl="in implementation">kcombobox.h</include>
<include location="global" impldecl="in implementation">kdialog.h</include>
<include location="global" impldecl="in implementation">kurlrequester.h</include>
<include location="global" impldecl="in implementation">kpushbutton.h</include>
<include location="global" impldecl="in implementation">klineedit.h</include>
</includes>
<layoutdefaults spacing="3" margin="6"/>
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
</UI>

@ -27,10 +27,12 @@
#include <ksettings/dispatcher.h>
#include <kcmultidialog.h>
#include <tdeapplication.h>
#include <kiconloader.h>
#include <tdetoolbar.h>
#include <tdeaction.h>
#include <tdelocale.h>
#include <dcopclient.h>
#include <dcopref.h>
sidebarwidget::sidebarwidget(TQWidget* parent, const char* name)
@ -61,6 +63,11 @@ sidebarwidget::sidebarwidget(TQWidget* parent, const char* name)
mainLayout->addWidget(toolbar);
mainLayout->addWidget(reportGrid);
if(!kapp->dcopClient()->isAttached())
{
kapp->dcopClient()->attach();
}
dcopCall = new DCOPRef( "KWeatherService", "WeatherService" );
}
@ -75,7 +82,7 @@ TQWidget *sidebarwidget::viewport()
void sidebarwidget::slotRefresh()
{
dcopCall->send("updateAll()");
dcopCall->send("forceUpdateAll()");
}
void sidebarwidget::slotConfigure()
@ -85,6 +92,7 @@ void sidebarwidget::slotConfigure()
settingsDialog = new KCMultiDialog(0);
connect( settingsDialog, TQT_SIGNAL( configCommitted() ), this, TQT_SLOT( slotRefresh() ) );
settingsDialog->addModule( "kcmweatherstations.desktop" );
settingsDialog->addModule( "kcmweatherservice.desktop" );
}

@ -1,9 +1,9 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>wsPrefs</class>
<class>stationsConfig</class>
<author>Ian Reinhart Geiser &lt;geiseri@kde.org&gt;</author>
<widget class="TQWidget">
<property name="name">
<cstring>wsPrefs</cstring>
<cstring>stationsConfig</cstring>
</property>
<property name="geometry">
<rect>
@ -201,31 +201,31 @@
<connection>
<sender>mAddButton</sender>
<signal>clicked()</signal>
<receiver>wsPrefs</receiver>
<receiver>stationsConfig</receiver>
<slot>addStation()</slot>
</connection>
<connection>
<sender>mRemoveButton</sender>
<signal>clicked()</signal>
<receiver>wsPrefs</receiver>
<receiver>stationsConfig</receiver>
<slot>removeStation()</slot>
</connection>
<connection>
<sender>mUpdate</sender>
<signal>clicked()</signal>
<receiver>wsPrefs</receiver>
<receiver>stationsConfig</receiver>
<slot>updateStations()</slot>
</connection>
<connection>
<sender>mExit</sender>
<signal>clicked()</signal>
<receiver>wsPrefs</receiver>
<receiver>stationsConfig</receiver>
<slot>exitWeatherService()</slot>
</connection>
<connection>
<sender>mSelectedStations</sender>
<signal>selectionChanged(TQListViewItem*)</signal>
<receiver>wsPrefs</receiver>
<receiver>stationsConfig</receiver>
<slot>selectionChanged(TQListViewItem*)</slot>
</connection>
</connections>

@ -31,7 +31,7 @@
#include <kpushbutton.h>
#include <kstandarddirs.h>
#include "serviceconfigwidget.h"
#include "stationsconfigwidget.h"
#include "weatherservice_stub.h"
class StationItem : public TQListViewItem
@ -55,8 +55,8 @@ class StationItem : public TQListViewItem
static void parseStationEntry( const TQString &line, TQString &name, TQString &uid );
ServiceConfigWidget::ServiceConfigWidget( TQWidget *parent, const char *name )
: wsPrefs( parent, name ), mService(0)
StationsConfigWidget::StationsConfigWidget( TQWidget *parent, const char *name )
: stationsConfig( parent, name ), mService(0)
{
mService = new WeatherService_stub( "KWeatherService", "WeatherService" );
connect( mAllStations, TQT_SIGNAL( doubleClicked ( TQListViewItem *, const TQPoint &, int ) ), TQT_SLOT( addStation() ) );
@ -67,12 +67,12 @@ ServiceConfigWidget::ServiceConfigWidget( TQWidget *parent, const char *name )
scanStations();
}
ServiceConfigWidget::~ServiceConfigWidget()
StationsConfigWidget::~StationsConfigWidget()
{
delete mService;
}
void ServiceConfigWidget::addStation()
void StationsConfigWidget::addStation()
{
if ( !dcopActive() )
return;
@ -87,7 +87,7 @@ void ServiceConfigWidget::addStation()
modified();
}
void ServiceConfigWidget::removeStation()
void StationsConfigWidget::removeStation()
{
if ( !dcopActive() )
return;
@ -102,7 +102,7 @@ void ServiceConfigWidget::removeStation()
modified();
}
void ServiceConfigWidget::updateStations()
void StationsConfigWidget::updateStations()
{
if ( !dcopActive() )
return;
@ -111,7 +111,7 @@ void ServiceConfigWidget::updateStations()
scanStations();
}
void ServiceConfigWidget::exitWeatherService()
void StationsConfigWidget::exitWeatherService()
{
if ( !dcopActive() )
return;
@ -120,7 +120,7 @@ void ServiceConfigWidget::exitWeatherService()
modified();
}
void ServiceConfigWidget::scanStations()
void StationsConfigWidget::scanStations()
{
if ( !dcopActive() )
return;
@ -145,23 +145,23 @@ void ServiceConfigWidget::scanStations()
}
}
void ServiceConfigWidget::selectionChanged( TQListViewItem *item )
void StationsConfigWidget::selectionChanged( TQListViewItem *item )
{
mRemoveButton->setEnabled( item != 0 );
}
void ServiceConfigWidget::modified()
void StationsConfigWidget::modified()
{
emit changed( true );
}
void ServiceConfigWidget::initGUI()
void StationsConfigWidget::initGUI()
{
mAllStations->header()->hide();
mSelectedStations->header()->hide();
}
void ServiceConfigWidget::loadLocations()
void StationsConfigWidget::loadLocations()
{
TDEConfig config( locate( "data", "kweatherservice/weather_stations.desktop" ) );
@ -201,7 +201,7 @@ void ServiceConfigWidget::loadLocations()
}
}
bool ServiceConfigWidget::dcopActive()
bool StationsConfigWidget::dcopActive()
{
TQString error;
TQCString appID;
@ -236,4 +236,4 @@ void parseStationEntry( const TQString &line, TQString &name, TQString &uid )
}
}
#include "serviceconfigwidget.moc"
#include "stationsconfigwidget.moc"

@ -17,22 +17,22 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef SERVICECONFIGWIDGET_H
#define SERVICECONFIGWIDGET_H
#ifndef STATIONSCONFIGWIDGET_H
#define STATIONSCONFIGWIDGET_H
#include <serviceconfigdata.h>
#include <stationsconfig.h>
class TQListViewItem;
class WeatherService_stub;
class ServiceConfigWidget : public wsPrefs
class StationsConfigWidget : public stationsConfig
{
Q_OBJECT
public:
ServiceConfigWidget( TQWidget *parent, const char *name = 0 );
virtual ~ServiceConfigWidget();
StationsConfigWidget( TQWidget *parent, const char *name = 0 );
virtual ~StationsConfigWidget();
signals:
void changed( bool );

@ -0,0 +1,460 @@
#include <tqpair.h>
#include <kstandarddirs.h>
#include <kiconloader.h>
#include <kdebug.h>
#include "weather_icon.h"
WeatherIconPrivate* WeatherIconPrivate::s_instance = 0;
WeatherIconPrivate::WeatherIconPrivate()
{
iconLoader = new TDEIconLoader("kweather");
}
WeatherIconPrivate::~WeatherIconPrivate()
{
delete iconLoader;
}
WeatherIconPrivate* WeatherIconPrivate::instance()
{
if ( s_instance == 0 )
s_instance = new WeatherIconPrivate();
return s_instance;
}
void WeatherIconPrivate::useIconTheme( bool use )
{
m_useIconTheme = use;
}
bool WeatherIconPrivate::usingIconTheme()
{
return m_useIconTheme;
}
TQPair<TQString,TQString> WeatherIconPrivate::findIcon( TQStringList fallback )
{
kdDebug(12006) << "[findIcon] Use icon theme? " << m_useIconTheme << endl;
if( m_useIconTheme )
{
// Check in theme
for ( TQStringList::Iterator icon = fallback.begin(); icon != fallback.end(); ++icon )
{
kdDebug(12006) << "[findIcon] Searching for `" << *icon << "` in theme" << endl;
TQString iPath = iconPath(*icon, true);
if( !( iPath.isNull() ) )
{
kdDebug(12006) << "[findIcon] Found `" << *icon << "` in theme: " << iPath << endl;
return qMakePair(*icon, iPath);
}
}
}
// Check in kweather fallback
for ( TQStringList::Iterator icon = fallback.begin(); icon != fallback.end(); ++icon )
{
kdDebug(12006) << "[findIcon] Searching for `" << *icon << "` in kweather icons" << endl;
TQString iPath = iconPath(*icon, false);
if( !( iPath.isNull() ) )
{
kdDebug(12006) << "[findIcon] Found `" << *icon << "` in kweather icons: " << iPath << endl;
return qMakePair(*icon, iPath);
}
}
return qMakePair(WeatherIcon::unknown(), iconPath(WeatherIcon::unknown()));
}
TQString WeatherIconPrivate::iconPath( TQString icon, bool inTheme )
{
if( inTheme )
{
return iconLoader->iconPath(icon, TDEIcon::Desktop, true);
}
else
{
return locate( "data", "kweather/" + icon + ".png" );
}
}
TQString WeatherIconPrivate::iconPath( TQString icon )
{
return iconPath(icon, m_useIconTheme);
}
WeatherIcon::WeatherIcon( int condition, bool night )
{
TQStringList fallback;
switch( condition )
{
case Sunny:
{
if( night )
{
fallback << "weather-clear-night"; //xdg, kweather
}
fallback << "weather-clear"; // xdg, kweather
break;
}
case Fog:
{
if( night )
{
fallback << "weather-fog-night"; // themes, kweather
}
fallback << "weather-fog"; // xdg, kweather
break;
}
case Mist:
{
if( night )
{
fallback << "weather-mist-night"; // themes, kweather
}
fallback << "weather-mist"; // themes, kweather
if( night )
{
fallback << "weather-fog-night"; // themes, kweather
}
fallback << "weather-fog"; // xdg, kweather
break;
}
case Overcast:
{
fallback << "weather-overcast"; // xdg, kweather
break;
}
case Hail:
{
fallback << "weather-hail"; // themes
fallback << "weather-freezing-rain"; // themes, kweather
fallback << "weather-snow"; // xdg, kweather
break;
}
case LightRain:
{
fallback << "weather-showers-scattered"; // xdg, kweather
break;
}
case Sleet:
{
fallback << "weather-snow-rain"; // themes, kweather
fallback << "weather-snow"; // xdg, kweather
break;
}
}
TQPair<TQString,TQString> foundIcon = WeatherIconPrivate::instance()->findIcon(fallback);
iconName = foundIcon.first;
iconPath = foundIcon.second;
return;
}
WeatherIcon::WeatherIcon( int condition, bool night, unsigned int strength )
{
TQStringList fallback;
switch ( condition )
{
case Cloudy:
{
switch ( strength )
{
case 1:
{
if( night )
{
fallback << "weather-few-clouds-night"; // xdg, kweather
}
fallback << "weather-few-clouds"; // xdg, kweather
break;
}
case 2:
{
if( night )
{
fallback << "weather-moderate-clouds-night"; // kweather
}
fallback << "weather-moderate-clouds"; // kweather
if( night )
{
fallback << "weather-few-clouds-night"; // xdg, kweather
}
fallback << "weather-few-clouds"; // xdg, kweather
break;
}
case 3: {
if( night )
{
fallback << "weather-clouds-night"; // themes, kweather
}
fallback << "weather-clouds"; // themes, kweather
if( night )
{
fallback << "weather-few-clouds-night"; // xdg, kweather
}
fallback << "weather-few-clouds"; // xdg, kweather
break;
}
case 4:
{
if( night )
{
fallback << "weather-ample-clouds-night"; // kweather
}
fallback << "weather-ample-clouds"; // kweather
fallback << "weather-many-clouds"; // themes, kweather
fallback << "weather-overcast"; // xdg, kweather
break;
}
case 5: {
fallback << "weather-many-clouds"; // themes, kweather
fallback << "weather-overcast"; // xdg, kweather
break;
}
default: {
fallback << "weather-clouds"; // themes, kweather
fallback << "weather-few-clouds"; // xdg, kweather
break;
}
}
break;
}
case Showers:
{
switch ( strength )
{
case 1:
{
if( night )
{
fallback << "weather-showers-scattered-night"; // themes, kweather
}
else
{
fallback << "weather-showers-scattered-day"; // themes, kweather
}
fallback << "weather-showers-scattered"; // xdg, kweather
break;
}
case 2:
{
if( night )
{
fallback << "weather-showers-night"; // themes, kweather
}
else
{
fallback << "weather-showers-day"; // themes, kweather
}
fallback << "weather-showers"; // xdg, kweather
break;
}
case 3:
default:
{
fallback << "weather-showers"; // xdg, kweather
break;
}
}
break;
}
case Snow:
{
switch( strength )
{
case 1:
{
if( night )
{
fallback << "weather-snow-scattered-night"; // themes, kweather
}
else
{
fallback << "weather-snow-scattered-day"; // themes, kweather
}
fallback << "weather-snow-scattered"; // xdg, kweather
fallback << "weather-snow"; // workaround for some themes
break;
}
case 2:
{
if( night )
{
fallback << "weather-snow-moderate-night"; // kweather
}
else
{
fallback << "weather-snow-moderate-day"; // kweather
}
fallback << "weather-snow-moderate"; // kweather
if( night )
{
fallback << "weather-snow-scattered-night"; // themes, kweather
}
else
{
fallback << "weather-snow-scattered-day"; // themes, kweather
}
fallback << "weather-snow-scattered"; // xdg, kweather
fallback << "weather-snow"; // workaround for some themes
break;
}
case 3:
{
if( night )
{
fallback << "weather-snow-ample-night"; // kweather
}
else
{
fallback << "weather-snow-ample-day"; // kweather
}
fallback << "weather-snow-ample"; // kweather
fallback << "weather-snow"; // xdg, kweather
break;
}
case 4:
{
fallback << "weather-snow-scattered"; // xdg, kweather
fallback << "weather-snow"; // workaround for some themes
break;
}
case 5:
default:
{
fallback << "weather-snow"; // xdg, kweather
break;
}
}
break;
}
case Thunderstorm:
switch ( strength )
{
case 1:
{
if( night )
{
fallback << "weather-storm-night"; // themes, kweather
}
else
{
fallback << "weather-storm-day"; // themes, kweather
}
fallback << "weather-storm"; // xdg, kweather
break;
}
case 2:
{
if( night )
{
fallback << "weather-storm-moderate-night"; // kweather
}
else
{
fallback << "weather-storm-moderate-day"; // kweather
}
fallback << "weather-storm-moderate"; // kweather
if( night )
{
fallback << "weather-storm-night"; // themes, kweather
}
else
{
fallback << "weather-storm-day"; // themes, kweather
}
fallback << "weather-storm"; // xdg, kweather
break;
}
case 3:
default:
{
fallback << "weather-storm"; // xdg, kweather
break;
}
}
break;
}
TQPair<TQString,TQString> foundIcon = WeatherIconPrivate::instance()->findIcon(fallback);
iconName = foundIcon.first;
iconPath = foundIcon.second;
return;
}
WeatherIcon::~WeatherIcon()
{
iconName = TQString::null;
}

@ -0,0 +1,42 @@
class TDEIconLoader;
class WeatherIconPrivate {
friend class WeatherIcon;
public:
WeatherIconPrivate();
~WeatherIconPrivate();
static WeatherIconPrivate* instance();
void useIconTheme( bool use );
bool usingIconTheme();
TQString iconPath( TQString icon, bool inTheme );
TQString iconPath( TQString icon );
private:
static WeatherIconPrivate* s_instance;
TDEIconLoader* iconLoader;
bool m_useIconTheme;
TQPair<TQString,TQString> findIcon( TQStringList fallback );
};
class WeatherIcon {
public:
enum SimpleCondition { Sunny, Fog, Mist, Overcast, Hail, LightRain, Sleet };
enum RangedCondition { Cloudy, Showers, Snow, Thunderstorm };
WeatherIcon( int condition /* SimpleCondition */, bool night );
WeatherIcon( int condition /* RangedCondition */, bool night, unsigned int strength );
~WeatherIcon();
static TQString unknown() { return "weather-none-available"; };
TQString name() { return iconName; }
TQString path() { return iconPath; }
private:
TQString iconName;
TQString iconPath;
};

@ -34,11 +34,13 @@ email : geiseri@msoe.edu
#include <unistd.h>
#include <tdeapplication.h>
#include <kpassivepopup.h>
#include <tdeconfig.h>
#include "metar_parser.h"
#include "stationdatabase.h"
#include "sun.h"
#include "weatherlib.h"
#include "weather_icon.h"
#include "weatherlib.moc"
@ -88,6 +90,12 @@ WeatherLib::WeatherLib(StationDatabase *stationDB, TQObject *parent, const char
m_StationDb = stationDB;
data.setAutoDelete( true );
// Initialize correct icon setting
TDEConfig *conf = new TDEConfig("weather_panelappletrc");
conf->setGroup("General Options");
WeatherIconPrivate::instance()->useIconTheme(conf->readBoolEntry("use_icon_theme", true));
delete conf;
}
WeatherLib::~WeatherLib()
@ -271,14 +279,34 @@ TQString WeatherLib::windChill(const TQString &stationID){
TQString WeatherLib::iconName(const TQString &stationID){
TQString result("dunno");
TQString result;
// isEmpty is true for null or 0 length strings
if ( !stationID.isEmpty() )
{
Data *d = findData(stationID);
result = d->wi.iconName;
}
if( result == TQString::null )
result = WeatherIcon::unknown();
return result;
}
TQString WeatherLib::iconPath(const TQString &stationID){
TQString result;
// isEmpty is true for null or 0 length strings
if ( !stationID.isEmpty() )
{
Data *d = findData(stationID);
result = d->wi.theWeather;
result = d->wi.iconPath;
}
if( result == TQString::null )
result = WeatherIconPrivate::instance()->iconPath(WeatherIcon::unknown());
return result;
}

@ -48,6 +48,7 @@ class WeatherLib : public TQObject
TQString wind(const TQString &stationID);
TQString pressure(const TQString &stationID);
TQString iconName(const TQString &stationID);
TQString iconPath(const TQString &stationID);
TQString date(const TQString &stationID);
TQStringList weather(const TQString &stationID);
TQString visibility(const TQString &stationID);

@ -25,10 +25,12 @@
#include <tdeglobal.h>
#include <tdelocale.h>
#include <kstandarddirs.h>
#include <kiconloader.h>
#include "weatherlib.h"
#include "weatherservice.h"
#include "stationdatabase.h"
#include "weather_icon.h"
#include "sun.h"
WeatherService::WeatherService(TQObject *parent, const char *name) : TQObject (parent, name), DCOPObject("WeatherService")
@ -71,13 +73,22 @@ void WeatherService::updated(const TQString &stationID)
void WeatherService::updateAll()
{
kdDebug(12006) << "Sending for all" << endl;
kdDebug(12006) << "Sending update for all" << endl;
TQStringList stations = m_weatherLib->stations();
TQStringList::ConstIterator end(stations.end());
for ( TQStringList::ConstIterator it = stations.begin(); it != end; ++it ) {
update(*it);
}
}
}
void WeatherService::forceUpdateAll()
{
kdDebug(12006) << "Sending forceUpdate for all" << endl;
TQStringList stations = m_weatherLib->stations();
TQStringList::ConstIterator end(stations.end());
for ( TQStringList::ConstIterator it = stations.begin(); it != end; ++it ) {
forceUpdate(*it);
}
}
void WeatherService::updating(const TQString &stationID)
@ -136,9 +147,10 @@ TQPixmap WeatherService::currentIcon(const TQString &stationID)
TQPixmap WeatherService::icon(const TQString &stationID)
{
kdDebug(12006) << "Get the current weather icon.." << endl;
TQString icon = iconFileName(stationID);
TQPixmap theIcon = TQPixmap(icon);
return theIcon;
return kapp->iconLoader()->loadIcon(
iconFileName(stationID),
TDEIcon::Desktop
);
}
TQString WeatherService::currentIconString(const TQString &stationID)
@ -148,9 +160,18 @@ TQString WeatherService::currentIconString(const TQString &stationID)
TQString WeatherService::iconFileName(const TQString &stationID)
{
TQString icon = m_weatherLib->iconName(stationID);
icon = locate( "data", "kweather/" + icon + ".png" );
return icon;
return m_weatherLib->iconPath(stationID);
}
void WeatherService::useIconTheme(bool use)
{
kdDebug(12006) << "Received signal to set useIconTheme to " << use << endl;
WeatherIconPrivate::instance()->useIconTheme(use);
}
bool WeatherService::usingIconTheme()
{
return WeatherIconPrivate::instance()->usingIconTheme();
}
TQString WeatherService::date(const TQString &stationID)
@ -193,7 +214,7 @@ void WeatherService::removeStation(const TQString &stationID)
m_weatherLib->remove(stationID);
saveSettings();
emit stationRemoved(stationID);
kdDebug() << "KWeatherService: station removed: " << stationID << endl;
kdDebug(12006) << "Station removed: " << stationID << endl;
}
void WeatherService::addStation(const TQString &stationID)
@ -201,7 +222,7 @@ void WeatherService::addStation(const TQString &stationID)
m_weatherLib->update(stationID);
saveSettings();
emit stationAdded(stationID);
kdDebug() << "KWeatherService: station added: " << stationID << endl;
kdDebug(12006) << "Station added: " << stationID << endl;
}
void WeatherService::exit()

@ -86,10 +86,14 @@ class WeatherService : public TQObject, public DCOPObject
void update(const TQString &stationID);
void updateAll();
void forceUpdate(const TQString &stationID);
void forceUpdateAll();
void removeStation(const TQString &stationID);
void addStation(const TQString &stationID);
TQStringList listStations();
TQString stationCode( const TQString &stationName );
void useIconTheme( bool use );
bool usingIconTheme();
void exit();

Loading…
Cancel
Save