diff options
author | Timothy Pearson <[email protected]> | 2013-02-01 15:04:07 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-02-01 15:04:07 -0600 |
commit | a1e6ce502c334194d31a0b78b11b77e9532da64b (patch) | |
tree | af926bf79ece44ee312952d3d896a1da440daf83 /kradio3/src/kradioapp.cpp | |
parent | b69d61089748af635b869896140531ad906433d8 (diff) | |
download | tderadio-a1e6ce502c334194d31a0b78b11b77e9532da64b.tar.gz tderadio-a1e6ce502c334194d31a0b78b11b77e9532da64b.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'kradio3/src/kradioapp.cpp')
-rw-r--r-- | kradio3/src/kradioapp.cpp | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/kradio3/src/kradioapp.cpp b/kradio3/src/kradioapp.cpp index f5320b1..d137647 100644 --- a/kradio3/src/kradioapp.cpp +++ b/kradio3/src/kradioapp.cpp @@ -36,17 +36,17 @@ #include "include/debug-profiler.h" ///////////////////////////////////////////////////////////////////////////// -//// KRadioAbout +//// TDERadioAbout -AboutPageInfo KRadioAbout::createAboutPage () +AboutPageInfo TDERadioAbout::createAboutPage () { const char *description = I18N_NOOP( - "KRadio - The Radio Application for KDE" + "TDERadio - The Radio Application for KDE" "<P>" - "With KRadio you can listen to radio broadcasts with the help of your " + "With TDERadio you can listen to radio broadcasts with the help of your " "V4L/V4L2 compatible radio card." "<P>" - "The KRadio Project contains a station preset data database. To complete " + "The TDERadio Project contains a station preset data database. To complete " "this database you are encouraged to contribute your station preset file " "to the project. Just send it to one of the authors. " "<P>" @@ -55,7 +55,7 @@ AboutPageInfo KRadioAbout::createAboutPage () "<P>" ); - TDEAboutData aboutData("kradio", "KRadio", + TDEAboutData aboutData("kradio", "TDERadio", VERSION, description, TDEAboutData::License_GPL, @@ -63,20 +63,20 @@ AboutPageInfo KRadioAbout::createAboutPage () 0, "http://sourceforge.net/projects/kradio", 0); - aboutData.addAuthor("Martin Witte", I18N_NOOP("Preset Database, Remote Control Support, Alarms, Rewrite for KRadio 0.3.0, Misc"), "[email protected]"); + aboutData.addAuthor("Martin Witte", I18N_NOOP("Preset Database, Remote Control Support, Alarms, Rewrite for TDERadio 0.3.0, Misc"), "[email protected]"); aboutData.addAuthor("Marcus Camen", I18N_NOOP("Buildsystem, Standards Conformance, Cleanups"), "[email protected]"); aboutData.addAuthor("Klas Kalass", I18N_NOOP("Miscellaneous"), "[email protected]"); aboutData.addAuthor("Frank Schwanz", I18N_NOOP("idea, first basic application"), "[email protected]"); aboutData.addCredit(I18N_NOOP("Many People around the World ... "), I18N_NOOP("... which contributed station preset files \n" - "and tested early and unstable snapshots of KRadio \n" + "and tested early and unstable snapshots of TDERadio \n" "with much patience")); return AboutPageInfo( - new KRadioAboutWidget(aboutData, KRadioAboutWidget::AbtAppStandard), - "KRadio", - "KRadio", + new TDERadioAboutWidget(aboutData, TDERadioAboutWidget::AbtAppStandard), + "TDERadio", + "TDERadio", "kradio" ); } @@ -94,10 +94,10 @@ PluginLibraryInfo::PluginLibraryInfo (const TQString &lib_name) { library = KLibLoader::self()->library(lib_name.ascii()); if (library) { - info_func = (t_kradio_plugin_info_func) library->symbol("KRadioPlugin_GetAvailablePlugins"); - init_func = (t_kradio_plugin_init_func) library->symbol("KRadioPlugin_CreatePlugin"); - libload_func = (t_kradio_plugin_libload_func) library->symbol("KRadioPlugin_LoadLibrary"); - libunload_func = (t_kradio_plugin_libunload_func)library->symbol("KRadioPlugin_UnloadLibrary"); + info_func = (t_kradio_plugin_info_func) library->symbol("TDERadioPlugin_GetAvailablePlugins"); + init_func = (t_kradio_plugin_init_func) library->symbol("TDERadioPlugin_CreatePlugin"); + libload_func = (t_kradio_plugin_libload_func) library->symbol("TDERadioPlugin_LoadLibrary"); + libunload_func = (t_kradio_plugin_libunload_func)library->symbol("TDERadioPlugin_UnloadLibrary"); if (info_func && init_func && libload_func && libunload_func) { libload_func(); info_func(plugins); @@ -122,9 +122,9 @@ PluginLibraryInfo::PluginLibraryInfo (const TQString &lib_name) ///////////////////////////////////////////////////////////////////////////// -//// KRadioApp +//// TDERadioApp -KRadioApp::KRadioApp() +TDERadioApp::TDERadioApp() : TDEApplication(), m_quitting(false) { @@ -133,18 +133,18 @@ KRadioApp::KRadioApp() } -KRadioApp::~KRadioApp() +TDERadioApp::~TDERadioApp() { - IErrorLogClient::staticLogDebug("KRadioApp::~KRadioApp()"); + IErrorLogClient::staticLogDebug("TDERadioApp::~TDERadioApp()"); } -void KRadioApp::saveState() +void TDERadioApp::saveState() { IErrorLogClient::staticLogDebug(i18n("saveState")); saveState(TDEGlobal::config()); } -void KRadioApp::saveState (TDEConfig *c) +void TDERadioApp::saveState (TDEConfig *c) { c->setGroup("Global"); c->writeEntry("instances", m_Instances.count()); @@ -169,9 +169,9 @@ void KRadioApp::saveState (TDEConfig *c) } -void KRadioApp::restoreState (TDEConfig *c) +void TDERadioApp::restoreState (TDEConfig *c) { - BlockProfiler profiler("KRadioApp::restoreState - loadLibraries"); + BlockProfiler profiler("TDERadioApp::restoreState - loadLibraries"); c->setGroup("Plugin Libraries"); int n_libs = c->readNumEntry("count", 0); @@ -179,7 +179,7 @@ void KRadioApp::restoreState (TDEConfig *c) // KProgressDialog *progress = new KProgressDialog(NULL, NULL, i18n("Loading Plugin Libraries")); // progress->setMinimumWidth(400); // progress->setAllowCancel(false); -// progress->TQWidget::setCaption(i18n("KRadio - Loading Plugin Libraries")); +// progress->TQWidget::setCaption(i18n("TDERadio - Loading Plugin Libraries")); // progress->show(); /* progress->progressBar()->setTotalSteps(n_libs);*/ @@ -209,7 +209,7 @@ void KRadioApp::restoreState (TDEConfig *c) c->setGroup("Global"); - BlockProfiler rest_profiler("KRadioApp::restoreState - restore"); + BlockProfiler rest_profiler("TDERadioApp::restoreState - restore"); int n = c->readNumEntry("instances", 1); if (n < 1 || n > 10) @@ -224,9 +224,9 @@ void KRadioApp::restoreState (TDEConfig *c) } -PluginManager *KRadioApp::createNewInstance(const TQString &_name) +PluginManager *TDERadioApp::createNewInstance(const TQString &_name) { - BlockProfiler profiler("KRadioApp::createNewInstance"); + BlockProfiler profiler("TDERadioApp::createNewInstance"); TQString instance_name = _name; TQString title_ext = ""; @@ -239,24 +239,24 @@ PluginManager *KRadioApp::createNewInstance(const TQString &_name) } PluginManager *pm = new PluginManager ( instance_name, this, - i18n("KRadio Configuration") + title_ext, - i18n("About KRadio Components") + title_ext + i18n("TDERadio Configuration") + title_ext, + i18n("About TDERadio Components") + title_ext ); m_Instances.insert(instance_name, pm); /* Until we don't have library plugins we must instantiate them hard-wired */ - KRadioAbout *about = new KRadioAbout ( "kradio-about-" + instance_name); + TDERadioAbout *about = new TDERadioAbout ( "kradio-about-" + instance_name); pm->insertPlugin(about); return pm; } -KLibrary *KRadioApp::LoadLibrary (const TQString &library) +KLibrary *TDERadioApp::LoadLibrary (const TQString &library) { - BlockProfiler profiler("KRadioApp::LoadLibrary"); - BlockProfiler libprofiler("KRadioApp::LoadLibrary - " + library); + BlockProfiler profiler("TDERadioApp::LoadLibrary"); + BlockProfiler libprofiler("TDERadioApp::LoadLibrary - " + library); PluginLibraryInfo libinfo(library); if (libinfo.valid()) { @@ -281,7 +281,7 @@ KLibrary *KRadioApp::LoadLibrary (const TQString &library) } -void KRadioApp::UnloadLibrary (const TQString &library) +void TDERadioApp::UnloadLibrary (const TQString &library) { if (!m_PluginLibraries.contains(library)) return; @@ -306,12 +306,12 @@ void KRadioApp::UnloadLibrary (const TQString &library) } -PluginBase *KRadioApp::CreatePlugin (PluginManager *manager, const TQString &class_name, const TQString &object_name) +PluginBase *TDERadioApp::CreatePlugin (PluginManager *manager, const TQString &class_name, const TQString &object_name) { - BlockProfiler all_profiler ("KRadioApp::CreatePlugin"); - BlockProfiler class_profiler("KRadioApp::CreatePlugin - " + class_name); + BlockProfiler all_profiler ("TDERadioApp::CreatePlugin"); + BlockProfiler class_profiler("TDERadioApp::CreatePlugin - " + class_name); - BlockProfiler create_profiler("KRadioApp::CreatePlugin - create"); + BlockProfiler create_profiler("TDERadioApp::CreatePlugin - create"); PluginBase *retval = NULL; if (m_PluginInfos.contains(class_name)) { @@ -333,18 +333,18 @@ PluginBase *KRadioApp::CreatePlugin (PluginManager *manager, const TQString &cla if (retval) { - BlockProfiler insert_profiler("KRadioApp::CreatePlugin - insert"); + BlockProfiler insert_profiler("TDERadioApp::CreatePlugin - insert"); manager->insertPlugin(retval); insert_profiler.stop(); - //BlockProfiler restore_profiler("KRadioApp::CreatePlugin - restore"); + //BlockProfiler restore_profiler("TDERadioApp::CreatePlugin - restore"); //retval->restoreState(TDEGlobal::config()); } return retval; } -void KRadioApp::startPlugins() +void TDERadioApp::startPlugins() { TQDictIterator<PluginManager> it(m_Instances); for (; it.current(); ++it) { @@ -352,7 +352,7 @@ void KRadioApp::startPlugins() } } -void KRadioApp::slotAboutToQuit() +void TDERadioApp::slotAboutToQuit() { IErrorLogClient::staticLogDebug("slotAboutToQuit"); if (!m_quitting) { |