diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kopete/plugins/nowlistening/nowlisteningpreferences.cpp | |
download | tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/plugins/nowlistening/nowlisteningpreferences.cpp')
-rw-r--r-- | kopete/plugins/nowlistening/nowlisteningpreferences.cpp | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/kopete/plugins/nowlistening/nowlisteningpreferences.cpp b/kopete/plugins/nowlistening/nowlisteningpreferences.cpp new file mode 100644 index 00000000..179ce3a5 --- /dev/null +++ b/kopete/plugins/nowlistening/nowlisteningpreferences.cpp @@ -0,0 +1,95 @@ +/* + nowlisteningpreferences.cpp + + Kopete Now Listening To plugin + + Copyright (c) 2002,2003,2004 by Will Stephenson <will@stevello.free-online.co.uk> + Copyright (c) 2005 by Michaƫl Larouche <michael.larouche@kdemail.net> + + Kopete (c) 2002-2005 by the Kopete developers <kopete-devel@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. * + * * + ************************************************************************* +*/ +#include <qspinbox.h> +#include <qlineedit.h> +#include <qlayout.h> +#include <qradiobutton.h> + +#include <klistbox.h> +#include <klocale.h> +#include <kgenericfactory.h> + +#include "config.h" // for HAVE_XMMS +#include "nowlisteningprefs.h" +#include "nowlisteningconfig.h" +#include "nowlisteningpreferences.h" +#include "nowlisteningpreferences.moc" + +typedef KGenericFactory<NowListeningPreferences> NowListeningPreferencesFactory; +K_EXPORT_COMPONENT_FACTORY( kcm_kopete_nowlistening, NowListeningPreferencesFactory( "kcm_kopete_nowlistening" ) ) + + +NowListeningPreferences::NowListeningPreferences(QWidget *parent, const char* /*name*/, const QStringList &args) + : KCModule( NowListeningPreferencesFactory::instance(), parent, args ) +{ + ( new QVBoxLayout( this ) )->setAutoAdd( true ); + preferencesDialog = new NowListeningPrefsUI( this ); + + addConfig( NowListeningConfig::self(), preferencesDialog ); + + // Fill the media player listbox. + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Kscd")); + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Noatun")); + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Juk")); + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("amaroK")); + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("Kaffeine")); +#if defined Q_WS_X11 && !defined K_WS_QTONLY && defined HAVE_XMMS + preferencesDialog->kcfg_SelectedMediaPlayer->insertItem(QString::fromUtf8("XMMS")); +#endif + load(); +} + +NowListeningPreferences::~NowListeningPreferences( ) +{ + delete preferencesDialog; +} + +void NowListeningPreferences::save() +{ + KCModule::save(); +} + +void NowListeningPreferences::load() +{ + KCModule::load(); +} + +void NowListeningPreferences::slotSettingsChanged() +{ + emit changed( true ); +} + +void NowListeningPreferences::defaults() +{ + /*preferencesDialog->m_header->setText( i18n("Now Listening To: ")); + preferencesDialog->m_perTrack->setText(i18n("%track( by %artist)( on %album)")); + preferencesDialog->m_conjunction->setText( i18n(", and ")); + preferencesDialog->m_autoAdvertising->setChecked( false );*/ +} + +/* +* Local variables: +* c-indentation-style: k&r +* c-basic-offset: 8 +* indent-tabs-mode: t +* End: +*/ +// vim: set noet ts=4 sts=4 sw=4: +// |