diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 06:08:18 +0000 |
commit | 2620ed602b1dc0a7bc3c3135ee12361b1af25405 (patch) | |
tree | 382e1bc273f19af4e5dd261f79741046ed9e37c6 /kradio3/plugins/alsa-sound | |
parent | fdd75d807795e8fcf6286df1fb185153ac623efd (diff) | |
download | tderadio-2620ed602b1dc0a7bc3c3135ee12361b1af25405.tar.gz tderadio-2620ed602b1dc0a7bc3c3135ee12361b1af25405.zip |
rename the following methods:
tqfind find
tqreplace replace
tqcontains contains
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kradio@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kradio3/plugins/alsa-sound')
-rw-r--r-- | kradio3/plugins/alsa-sound/alsa-sound-configuration.cpp | 8 | ||||
-rw-r--r-- | kradio3/plugins/alsa-sound/alsa-sound.cpp | 62 |
2 files changed, 35 insertions, 35 deletions
diff --git a/kradio3/plugins/alsa-sound/alsa-sound-configuration.cpp b/kradio3/plugins/alsa-sound/alsa-sound-configuration.cpp index 6b190ad..9bd7cca 100644 --- a/kradio3/plugins/alsa-sound/alsa-sound-configuration.cpp +++ b/kradio3/plugins/alsa-sound/alsa-sound-configuration.cpp @@ -104,7 +104,7 @@ AlsaSoundConfiguration::~AlsaSoundConfiguration () void AlsaSoundConfiguration::slotPlaybackCardSelected(const TQString &cardname) { - if (!m_name2card.tqcontains(cardname)) + if (!m_name2card.contains(cardname)) return; listSoundDevices(m_comboPlaybackDevice, &m_playbackDeviceName2dev, &m_dev2playbackDeviceName, &m_playbackDevice2idx, m_name2card[cardname], SND_PCM_STREAM_PLAYBACK); @@ -113,7 +113,7 @@ void AlsaSoundConfiguration::slotPlaybackCardSelected(const TQString &cardname) void AlsaSoundConfiguration::slotCaptureCardSelected(const TQString &cardname) { - if (!m_name2card.tqcontains(cardname)) + if (!m_name2card.contains(cardname)) return; saveCaptureMixerSettings(); @@ -146,7 +146,7 @@ void AlsaSoundConfiguration::slotCaptureCardSelected(const TQString &cardname) int idx = 0; for (TQValueListConstIterator<TQString> it = all_list.begin(); it != all_list.end(); ++it, ++idx) { QAlsaMixerElement *e = new QAlsaMixerElement(m_groupMixerSubFrame, *it, - sw_list.tqcontains(*it), vol_list.tqcontains(*it)); + sw_list.contains(*it), vol_list.contains(*it)); TQObject::connect(e, TQT_SIGNAL(sigDirty()), this, TQT_SLOT(slotSetDirty())); m_groupMixerLayout->addWidget(e, idx > cols, idx % cols); e->show(); @@ -179,7 +179,7 @@ void AlsaSoundConfiguration::restoreCaptureMixerSettings() TQString id = AlsaConfigMixerSetting::getIDString(card, name); QAlsaMixerElement *e = *it; - if (m_MixerSettings.tqcontains(id)) { + if (m_MixerSettings.contains(id)) { const AlsaConfigMixerSetting &s = m_MixerSettings[id]; e->setVolume(s.m_volume); e->setOverride(s.m_use); diff --git a/kradio3/plugins/alsa-sound/alsa-sound.cpp b/kradio3/plugins/alsa-sound/alsa-sound.cpp index 1b4625e..0f64935 100644 --- a/kradio3/plugins/alsa-sound/alsa-sound.cpp +++ b/kradio3/plugins/alsa-sound/alsa-sound.cpp @@ -248,8 +248,8 @@ bool AlsaSoundDevice::prepareCapture(SoundStreamID id, const TQString &channel) bool AlsaSoundDevice::releasePlayback(SoundStreamID id) { - if (id.isValid() && m_PlaybackStreams.tqcontains(id)) { - if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id)) { + if (id.isValid() && m_PlaybackStreams.contains(id)) { + if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id)) { stopPlayback(id); } m_PlaybackStreams.remove(id); @@ -260,7 +260,7 @@ bool AlsaSoundDevice::releasePlayback(SoundStreamID id) bool AlsaSoundDevice::releaseCapture(SoundStreamID id) { - if (id.isValid() && m_CaptureStreams.tqcontains(id)) { + if (id.isValid() && m_CaptureStreams.contains(id)) { if (m_CaptureStreamID == id) { stopCapture(id); } @@ -284,7 +284,7 @@ bool AlsaSoundDevice::supportsCapture() const bool AlsaSoundDevice::startPlayback(SoundStreamID id) { - if (id.isValid() && m_PlaybackStreams.tqcontains(id) && m_EnablePlayback) { + if (id.isValid() && m_PlaybackStreams.contains(id) && m_EnablePlayback) { SoundStreamConfig &cfg = m_PlaybackStreams[id]; @@ -295,7 +295,7 @@ bool AlsaSoundDevice::startPlayback(SoundStreamID id) ok = true; } } else { - if (!m_PassivePlaybackStreams.tqcontains(id)) + if (!m_PassivePlaybackStreams.contains(id)) m_PassivePlaybackStreams.append(id); ok = true; } @@ -326,12 +326,12 @@ bool AlsaSoundDevice::pausePlayback(SoundStreamID /*id*/) bool AlsaSoundDevice::stopPlayback(SoundStreamID id) { - if (id.isValid() && m_PlaybackStreams.tqcontains(id)) { + if (id.isValid() && m_PlaybackStreams.contains(id)) { SoundStreamConfig &cfg = m_PlaybackStreams[id]; if (!cfg.m_ActiveMode) { - if (m_PassivePlaybackStreams.tqcontains(id)) { + if (m_PassivePlaybackStreams.contains(id)) { /* float tmp = 0; writePlaybackMixerVolume(cfg.m_Channel, tmp, true);*/ m_PassivePlaybackStreams.remove(id); @@ -351,7 +351,7 @@ bool AlsaSoundDevice::stopPlayback(SoundStreamID id) bool AlsaSoundDevice::isPlaybackRunning(SoundStreamID id, bool &b) const { - if (id.isValid() && m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id)) { + if (id.isValid() && m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id)) { b = true; return true; } else { @@ -364,7 +364,7 @@ bool AlsaSoundDevice::startCaptureWithFormat(SoundStreamID id, SoundFormat &real_format, bool force_format) { - if (m_CaptureStreams.tqcontains(id) && m_EnableCapture) { + if (m_CaptureStreams.contains(id) && m_EnableCapture) { if (m_CaptureStreamID != id) { m_CapturePos = 0; @@ -454,7 +454,7 @@ bool AlsaSoundDevice::isCaptureRunning(SoundStreamID id, bool &b, SoundFormat &s bool AlsaSoundDevice::noticeSoundStreamClosed(SoundStreamID id) { bool found = false; - if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id)) { + if (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id)) { stopPlayback(id); found = true; } @@ -471,13 +471,13 @@ bool AlsaSoundDevice::noticeSoundStreamClosed(SoundStreamID id) bool AlsaSoundDevice::noticeSoundStreamRedirected(SoundStreamID oldID, SoundStreamID newID) { bool found = false; - if (m_PlaybackStreams.tqcontains(oldID)) { + if (m_PlaybackStreams.contains(oldID)) { m_PlaybackStreams.insert(newID, m_PlaybackStreams[oldID]); if (newID != oldID) m_PlaybackStreams.remove(oldID); found = true; } - if (m_CaptureStreams.tqcontains(oldID)) { + if (m_CaptureStreams.contains(oldID)) { m_CaptureStreams.insert(newID, m_CaptureStreams[oldID]); if (newID != oldID) m_CaptureStreams.remove(oldID); @@ -488,7 +488,7 @@ bool AlsaSoundDevice::noticeSoundStreamRedirected(SoundStreamID oldID, SoundStre m_PlaybackStreamID = newID; if (m_CaptureStreamID == oldID) m_CaptureStreamID = newID; - if (m_PassivePlaybackStreams.tqcontains(oldID)) { + if (m_PassivePlaybackStreams.contains(oldID)) { m_PassivePlaybackStreams.remove(oldID); m_PassivePlaybackStreams.append(newID); } @@ -1088,7 +1088,7 @@ const TQStringList &AlsaSoundDevice::getCaptureChannels() const bool AlsaSoundDevice::setPlaybackVolume(SoundStreamID id, float volume) { - if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) { + if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) { SoundStreamConfig &cfg = m_PlaybackStreams[id]; if (rint(100*volume) != rint(100*cfg.m_Volume)) { @@ -1120,7 +1120,7 @@ bool AlsaSoundDevice::setCaptureVolume(SoundStreamID id, float volume) bool AlsaSoundDevice::getPlaybackVolume(SoundStreamID id, float &volume) const { - if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) { + if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) { const SoundStreamConfig &cfg = m_PlaybackStreams[id]; volume = cfg.m_Volume; return true; @@ -1144,7 +1144,7 @@ void AlsaSoundDevice::checkMixerVolume(SoundStreamID id) { if (id.isValid()) { - if (m_hPlaybackMixer && m_PassivePlaybackStreams.tqcontains(id) || m_PlaybackStreamID == id) { + if (m_hPlaybackMixer && m_PassivePlaybackStreams.contains(id) || m_PlaybackStreamID == id) { snd_mixer_handle_events(m_hPlaybackMixer); SoundStreamConfig &cfg = m_PlaybackStreams[id]; @@ -1164,7 +1164,7 @@ void AlsaSoundDevice::checkMixerVolume(SoundStreamID id) snd_mixer_handle_events(m_hCaptureMixer); SoundStreamConfig &cfg = m_CaptureStreams[id]; - if (m_CaptureChannels2ID.tqcontains(cfg.m_Channel)) { + if (m_CaptureChannels2ID.contains(cfg.m_Channel)) { float v = readCaptureMixerVolume(cfg.m_Channel); if (rint(100*cfg.m_Volume) != rint(100*v)) { cfg.m_Volume = v; @@ -1181,7 +1181,7 @@ float AlsaSoundDevice::readPlaybackMixerVolume(const TQString &channel, bool &mu if (!m_hPlaybackMixer) return 0; // without error - if (m_PlaybackChannels2ID.tqcontains(channel) && m_hPlaybackMixer) { + if (m_PlaybackChannels2ID.contains(channel) && m_hPlaybackMixer) { AlsaMixerElement sid = m_PlaybackChannels2ID[channel]; snd_mixer_elem_t *elem = snd_mixer_find_selem(m_hPlaybackMixer, sid); if (elem) { @@ -1215,7 +1215,7 @@ float AlsaSoundDevice::readCaptureMixerVolume(const TQString &channel) const if (!m_hCaptureMixer) return 0; // without error - if (m_CaptureChannels2ID.tqcontains(channel) && m_hCaptureMixer) { + if (m_CaptureChannels2ID.contains(channel) && m_hCaptureMixer) { AlsaMixerElement sid = m_CaptureChannels2ID[channel]; snd_mixer_elem_t *elem = snd_mixer_find_selem(m_hCaptureMixer, sid); if (elem) { @@ -1248,7 +1248,7 @@ bool AlsaSoundDevice::writePlaybackMixerVolume (const TQString &channel, float & if (!m_hPlaybackMixer) return false; - if (m_PlaybackChannels2ID.tqcontains(channel) && m_hPlaybackMixer) { + if (m_PlaybackChannels2ID.contains(channel) && m_hPlaybackMixer) { AlsaMixerElement sid = m_PlaybackChannels2ID[channel]; snd_mixer_elem_t *elem = snd_mixer_find_selem(m_hPlaybackMixer, sid); if (elem) { @@ -1284,7 +1284,7 @@ bool AlsaSoundDevice::writeCaptureMixerVolume (const TQString &channel, float &v if (!m_hCaptureMixer) return false; - if (m_CaptureChannels2ID.tqcontains(channel) && m_hCaptureMixer) { + if (m_CaptureChannels2ID.contains(channel) && m_hCaptureMixer) { AlsaMixerElement sid = m_CaptureChannels2ID[channel]; snd_mixer_elem_t *elem = snd_mixer_find_selem(m_hCaptureMixer, sid); if (elem) { @@ -1314,7 +1314,7 @@ bool AlsaSoundDevice::writeCaptureMixerSwitch (const TQString &channel, bool cap if (!m_hCaptureMixer) return false; - if (m_CaptureChannelsSwitch2ID.tqcontains(channel) && m_hCaptureMixer) { + if (m_CaptureChannelsSwitch2ID.contains(channel) && m_hCaptureMixer) { AlsaMixerElement sid = m_CaptureChannelsSwitch2ID[channel]; snd_mixer_elem_t *elem = snd_mixer_find_selem(m_hCaptureMixer, sid); if (elem) { @@ -1337,7 +1337,7 @@ void AlsaSoundDevice::selectCaptureChannel (const TQString &channel) writeCaptureMixerSwitch(channel, true); const TQString ADC = "ADC"; - if (m_CaptureChannels2ID.tqcontains(ADC)) { + if (m_CaptureChannels2ID.contains(ADC)) { float v = readCaptureMixerVolume(ADC); if (rint(v*100) == 0) { float tmp_vol = 1.0; @@ -1345,7 +1345,7 @@ void AlsaSoundDevice::selectCaptureChannel (const TQString &channel) } } const TQString Digital = "Digital"; - if (m_CaptureChannels2ID.tqcontains(Digital)) { + if (m_CaptureChannels2ID.contains(Digital)) { float v = readCaptureMixerVolume(Digital); if (rint(v*100) == 0) { float tmp_vol = 1.0; @@ -1353,12 +1353,12 @@ void AlsaSoundDevice::selectCaptureChannel (const TQString &channel) } } const TQString WAVE = "Wave"; - if (m_CaptureChannels2ID.tqcontains(WAVE)) { + if (m_CaptureChannels2ID.contains(WAVE)) { float x = 0; writeCaptureMixerVolume(WAVE, x); } const TQString Capture = "Capture"; - if (m_CaptureChannelsSwitch2ID.tqcontains(Capture)) { + if (m_CaptureChannelsSwitch2ID.contains(Capture)) { writeCaptureMixerSwitch(Capture, true); } @@ -1366,9 +1366,9 @@ void AlsaSoundDevice::selectCaptureChannel (const TQString &channel) const AlsaConfigMixerSetting &s = *it; if (s.m_card == m_CaptureCard && s.m_use) { float vol = s.m_volume; - if (m_CaptureChannels2ID.tqcontains(s.m_name)) + if (m_CaptureChannels2ID.contains(s.m_name)) writeCaptureMixerVolume(s.m_name, vol); - if (m_CaptureChannelsSwitch2ID.tqcontains(s.m_name)) + if (m_CaptureChannelsSwitch2ID.contains(s.m_name)) writeCaptureMixerSwitch(s.m_name, s.m_active); } } @@ -1451,7 +1451,7 @@ TQString AlsaSoundDevice::getSoundStreamClientDescription() const bool AlsaSoundDevice::mute (SoundStreamID id, bool mute) { - if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) { + if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) { SoundStreamConfig &cfg = m_PlaybackStreams[id]; if (mute != cfg.m_Muted) { if (writePlaybackMixerVolume(cfg.m_Channel, cfg.m_Volume, cfg.m_Muted = mute)) { @@ -1465,7 +1465,7 @@ bool AlsaSoundDevice::mute (SoundStreamID id, bool mute) bool AlsaSoundDevice::unmute (SoundStreamID id, bool unmute) { - if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) { + if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) { SoundStreamConfig &cfg = m_PlaybackStreams[id]; bool mute = !unmute; if (mute != cfg.m_Muted) { @@ -1480,7 +1480,7 @@ bool AlsaSoundDevice::unmute (SoundStreamID id, bool unmute) bool AlsaSoundDevice::isMuted(SoundStreamID id, bool &m) const { - if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.tqcontains(id))) { + if (id.isValid() && (m_PlaybackStreamID == id || m_PassivePlaybackStreams.contains(id))) { const SoundStreamConfig &cfg = m_PlaybackStreams[id]; m = cfg.m_Muted; return true; |