summaryrefslogtreecommitdiffstats
path: root/kweather/kcmweather.cpp
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2021-12-12 15:50:37 +0200
committerMavridis Philippe <mavridisf@gmail.com>2022-01-14 12:39:01 +0200
commit6668b34bc5deb36e73aa45e0457ed6740f828efd (patch)
treef2ff95858cc06d5eaad187b6750717a58a175a60 /kweather/kcmweather.cpp
parent67e995b6fc4da17811aefb7c8d841c9812e4eec9 (diff)
downloadtdetoys-6668b34bc5deb36e73aa45e0457ed6740f828efd.tar.gz
tdetoys-6668b34bc5deb36e73aa45e0457ed6740f828efd.zip
Implemented icon theme option.
Changes in this commit include: * The option itself; * A method of updating the option right after Apply or Ok is pressed in the settings dialog; * A new WeatherIconPrivate class to store the methods previously in WeatherIcons, as well as the settings; * Improved icon name helper function in METAR parser; * A few cleanups to the WeatherIcon class. Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'kweather/kcmweather.cpp')
-rw-r--r--kweather/kcmweather.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/kweather/kcmweather.cpp b/kweather/kcmweather.cpp
index 9251737..b480980 100644
--- a/kweather/kcmweather.cpp
+++ b/kweather/kcmweather.cpp
@@ -71,6 +71,8 @@ KCMWeather::KCMWeather( TQWidget *parent, const char *name )
TQT_SLOT( reportLocationChanged() ) );
connect( mWidget->m_textColor, TQT_SIGNAL( changed(const TQColor &) ),
TQT_SLOT( textColorChanged(const TQColor &) ) );
+ connect( mWidget->m_iconTheme, TQT_SIGNAL( released( int ) ),
+ TQT_SLOT( changed() ) );
TDEAboutData *about = new TDEAboutData(
I18N_NOOP( "kcmweather" ),
@@ -182,6 +184,9 @@ void KCMWeather::load()
mWidget->m_viewMode->setButton( config.readNumEntry( "smallview_mode", dockwidget::ShowAll ) );
changeViewMode( config.readNumEntry( "smallview_mode", dockwidget::ShowAll ) );
+
+ mWidget->m_iconTheme->setButton( config.readBoolEntry("use_icon_theme", true) ? 0 : 1 );
+
emit changed( false );
}
@@ -202,6 +207,9 @@ void KCMWeather::save()
config.writeEntry( "report_location", loc);
config.writeEntry( "smallview_mode", mViewMode );
+
+ config.writeEntry( "use_icon_theme", mWidget->m_iconTheme->selectedId() == 0 );
+
config.sync();
emit changed( false );