diff options
Diffstat (limited to 'kradio3/plugins/recording')
-rw-r--r-- | kradio3/plugins/recording/encoder_mp3.cpp | 14 | ||||
-rw-r--r-- | kradio3/plugins/recording/encoder_ogg.cpp | 4 | ||||
-rw-r--r-- | kradio3/plugins/recording/encoder_pcm.cpp | 4 | ||||
-rw-r--r-- | kradio3/plugins/recording/recording-configuration-ui.ui | 36 | ||||
-rw-r--r-- | kradio3/plugins/recording/recording-datamonitor.cpp | 20 | ||||
-rw-r--r-- | kradio3/plugins/recording/recording-monitor.cpp | 18 | ||||
-rw-r--r-- | kradio3/plugins/recording/recording-monitor.h | 2 | ||||
-rw-r--r-- | kradio3/plugins/recording/recording.cpp | 6 |
8 files changed, 52 insertions, 52 deletions
diff --git a/kradio3/plugins/recording/encoder_mp3.cpp b/kradio3/plugins/recording/encoder_mp3.cpp index 8d76fe2..2b2eb74 100644 --- a/kradio3/plugins/recording/encoder_mp3.cpp +++ b/kradio3/plugins/recording/encoder_mp3.cpp @@ -76,7 +76,7 @@ void RecordingEncodingMP3::encode(const char *_buffer, size_t buffer_size, char m_MP3BufferSize); lameSerialization.unlock(); if (n < 0) { - m_errorString += i18n("Error %1 while encoding mp3. ").tqarg(TQString().setNum(n)); + m_errorString += i18n("Error %1 while encoding mp3. ").arg(TQString().setNum(n)); m_error = true; } else if (n > 0) { m_encodedSize += n; @@ -86,7 +86,7 @@ void RecordingEncodingMP3::encode(const char *_buffer, size_t buffer_size, char int r = fwrite(m_MP3Buffer, 1, n, m_MP3Output); if (r <= 0) { - m_errorString += i18n("Error %1 writing output. ").tqarg(TQString().setNum(r)); + m_errorString += i18n("Error %1 writing output. ").arg(TQString().setNum(r)); m_error = true; } } @@ -120,13 +120,13 @@ bool RecordingEncodingMP3::openOutput(const TQString &output) if (lame_init_params(m_LAMEFlags) < 0) { m_error = true; - m_errorString += i18n("Cannot initialize libmp3lame parameters. ").tqarg(output); + m_errorString += i18n("Cannot initialize libmp3lame parameters. ").arg(output); } if (!m_error) { id3tag_init(m_LAMEFlags); id3tag_add_v2(m_LAMEFlags); - TQString title = m_RadioStation->name() + TQString().sprintf(" - %s", (TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)).ascii()); + TQString title = m_RadioStation->name() + TQString().sprintf(" - %s", (TQDateTime::currentDateTime().toString(Qt::ISODate)).ascii()); TQString comment = i18n("Recorded by KRadio"); size_t l = title.length() + comment.length() + 10; m_ID3Tags = new char[l]; @@ -140,7 +140,7 @@ bool RecordingEncodingMP3::openOutput(const TQString &output) m_MP3Output = fopen(output.ascii(), "wb+"); if (!m_MP3Output) { - m_errorString += i18n("Cannot open output file %1. ").tqarg(output); + m_errorString += i18n("Cannot open output file %1. ").arg(output); m_error = true; } @@ -186,12 +186,12 @@ void RecordingEncodingMP3::closeOutput() m_MP3BufferSize); if (n < 0) { m_error = true; - m_errorString += i18n("Error %1 while encoding mp3. ").tqarg(TQString().setNum(n)); + m_errorString += i18n("Error %1 while encoding mp3. ").arg(TQString().setNum(n)); } else if (n > 0) { int r = fwrite(m_MP3Buffer, 1, n, m_MP3Output); if (r <= 0) { m_error = true; - m_errorString += i18n("Error %1 writing output. ").tqarg(TQString().setNum(r)); + m_errorString += i18n("Error %1 writing output. ").arg(TQString().setNum(r)); } else { lame_mp3_tags_fid(m_LAMEFlags, m_MP3Output); } diff --git a/kradio3/plugins/recording/encoder_ogg.cpp b/kradio3/plugins/recording/encoder_ogg.cpp index b51eedd..ec43546 100644 --- a/kradio3/plugins/recording/encoder_ogg.cpp +++ b/kradio3/plugins/recording/encoder_ogg.cpp @@ -133,7 +133,7 @@ bool RecordingEncodingOgg::openOutput(const TQString &output) #ifdef HAVE_OGG m_OggOutput = fopen(output.ascii(), "wb+"); if (!m_OggOutput) { - m_errorString += i18n("Cannot open Ogg/Vorbis output file %1. ").tqarg(output); + m_errorString += i18n("Cannot open Ogg/Vorbis output file %1. ").arg(output); m_error = true; } @@ -176,7 +176,7 @@ bool RecordingEncodingOgg::openOutput(const TQString &output) vorbis_comment_init (&vc); vorbis_comment_add_tag_new(&vc, "creator", "KRadio" VERSION); vorbis_comment_add_tag_new(&vc, "title", m_RadioStation->longName().utf8()); - vorbis_comment_add_tag_new(&vc, "date", TQDateTime::tqcurrentDateTime().toString(Qt::ISODate)); + vorbis_comment_add_tag_new(&vc, "date", TQDateTime::currentDateTime().toString(Qt::ISODate)); vorbis_analysis_headerout(&m_VorbisDSP, &vc, &header_main, &header_comments, &header_codebooks); diff --git a/kradio3/plugins/recording/encoder_pcm.cpp b/kradio3/plugins/recording/encoder_pcm.cpp index 85da6ee..1143bc3 100644 --- a/kradio3/plugins/recording/encoder_pcm.cpp +++ b/kradio3/plugins/recording/encoder_pcm.cpp @@ -50,7 +50,7 @@ void RecordingEncodingPCM::encode(const char *buffer, size_t buffer_size, char * if (err != (int)buffer_size) { m_error = true; - m_errorString += i18n("Error %1 writing output. ").tqarg(TQString().setNum(err)); + m_errorString += i18n("Error %1 writing output. ").arg(TQString().setNum(err)); } } @@ -63,7 +63,7 @@ bool RecordingEncodingPCM::openOutput(const TQString &output) if (!m_output) { m_error = true; - m_errorString += i18n("Cannot open output file %1. ").tqarg(output); + m_errorString += i18n("Cannot open output file %1. ").arg(output); } return !m_error; } diff --git a/kradio3/plugins/recording/recording-configuration-ui.ui b/kradio3/plugins/recording/recording-configuration-ui.ui index e5ba41c..2a90973 100644 --- a/kradio3/plugins/recording/recording-configuration-ui.ui +++ b/kradio3/plugins/recording/recording-configuration-ui.ui @@ -42,7 +42,7 @@ </property> <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>tqlayout7</cstring> + <cstring>layout7</cstring> </property> <grid> <property name="name"> @@ -50,7 +50,7 @@ </property> <widget class="TQLayoutWidget" row="2" column="1" rowspan="1" colspan="2"> <property name="name"> - <cstring>tqlayout3_2</cstring> + <cstring>layout3_2</cstring> </property> <hbox> <property name="name"> @@ -66,7 +66,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>141</width> <height>20</height> @@ -91,7 +91,7 @@ </widget> <widget class="TQLayoutWidget" row="1" column="2"> <property name="name"> - <cstring>tqlayout3</cstring> + <cstring>layout3</cstring> </property> <hbox> <property name="name"> @@ -107,7 +107,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>141</width> <height>20</height> @@ -222,7 +222,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>5</height> @@ -247,7 +247,7 @@ </property> <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>tqlayout69</cstring> + <cstring>layout69</cstring> </property> <grid> <property name="name"> @@ -263,7 +263,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>225</width> <height>20</height> @@ -321,7 +321,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>225</width> <height>20</height> @@ -454,7 +454,7 @@ <property name="sizeType"> <enum>Minimum</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>225</width> <height>20</height> @@ -473,7 +473,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>5</height> @@ -498,7 +498,7 @@ </property> <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>tqlayout5</cstring> + <cstring>layout5</cstring> </property> <grid> <property name="name"> @@ -563,7 +563,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>16</height> @@ -588,7 +588,7 @@ </property> <widget class="TQLayoutWidget" row="0" column="0"> <property name="name"> - <cstring>tqlayout68</cstring> + <cstring>layout68</cstring> </property> <vbox> <property name="name"> @@ -596,7 +596,7 @@ </property> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout6</cstring> + <cstring>layout6</cstring> </property> <hbox> <property name="name"> @@ -623,7 +623,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>380</width> <height>20</height> @@ -634,7 +634,7 @@ </widget> <widget class="TQLayoutWidget"> <property name="name"> - <cstring>tqlayout7</cstring> + <cstring>layout7</cstring> </property> <hbox> <property name="name"> @@ -688,7 +688,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>16</height> diff --git a/kradio3/plugins/recording/recording-datamonitor.cpp b/kradio3/plugins/recording/recording-datamonitor.cpp index 8f22b1a..f2bbe8e 100644 --- a/kradio3/plugins/recording/recording-datamonitor.cpp +++ b/kradio3/plugins/recording/recording-datamonitor.cpp @@ -50,7 +50,7 @@ RecordingDataMonitor::RecordingDataMonitor(TQWidget *parent, const char *name) setColors(TQColor(20, 244, 20), TQColor(10, 117, 10)); - tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); + setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Expanding)); } @@ -107,10 +107,10 @@ void RecordingDataMonitor::internalDrawContents(TQPainter &painter, bool repaint if (m_channels <= 0) return; TQRect r = contentsRect(); - TQPen activePen (tqcolorGroup().color(TQColorGroup::Text), 1); - TQPen inactivePen (tqcolorGroup().color(TQColorGroup::Mid), 1); - TQBrush activeBrush = tqcolorGroup().brush(TQColorGroup::Text); - TQBrush inactiveBrush = tqcolorGroup().brush(TQColorGroup::Mid); + TQPen activePen (colorGroup().color(TQColorGroup::Text), 1); + TQPen inactivePen (colorGroup().color(TQColorGroup::Mid), 1); + TQBrush activeBrush = colorGroup().brush(TQColorGroup::Text); + TQBrush inactiveBrush = colorGroup().brush(TQColorGroup::Mid); TQBrush yellowBrush(TQColor(255,255,0)); TQBrush orangeBrush(TQColor(255,192,0)); TQBrush redBrush (TQColor(255,0, 0)); @@ -171,12 +171,12 @@ void RecordingDataMonitor::internalDrawContents(TQPainter &painter, bool repaint f.setPixelSize(CHANNEL_H_MIN); painter.setFont(f); - int maxW = TQFontMetrics(f).width(i18n("%1 dB").tqarg((int)min_dB)); + int maxW = TQFontMetrics(f).width(i18n("%1 dB").arg((int)min_dB)); int delta_dB = 5; while (abs((long)min_dB) / delta_dB * maxW * 2 > r.width()) delta_dB *= 2; for (int dB = 0; dB >= min_dB; dB -= delta_dB) { - TQString txt = i18n("%1 dB").tqarg(dB); + TQString txt = i18n("%1 dB").arg(dB); int w = TQFontMetrics(f).width(txt); int x = x0 + (int)(nBlocks * BLOCK_W_MIN * (min_dB - dB) / min_dB) - w; if (x < x0) continue; @@ -223,11 +223,11 @@ bool RecordingDataMonitor::setColors(const TQColor &activeText, if (parentWidget() && parentWidget()->backgroundPixmap() ){ KPixmapIO io; TQImage i = io.convertToImage(*parentWidget()->backgroundPixmap()); - KImageEffect::fade(i, 0.5, tqcolorGroup().color(TQColorGroup::Dark)); + KImageEffect::fade(i, 0.5, colorGroup().color(TQColorGroup::Dark)); setPaletteBackgroundPixmap(io.convertToPixmap(i)); setBackgroundOrigin(WindowOrigin); } else { - setBackgroundColor(tqcolorGroup().color(TQColorGroup::Button)); + setBackgroundColor(colorGroup().color(TQColorGroup::Button)); } return true; @@ -267,7 +267,7 @@ bool RecordingDataMonitor::noticeSoundStreamData(SoundStreamID /*id*/, TQPainter paint(this); if (m_maxValue != old_max) { - tqrepaint(true); + repaint(true); } else { internalDrawContents(paint, false); } diff --git a/kradio3/plugins/recording/recording-monitor.cpp b/kradio3/plugins/recording/recording-monitor.cpp index 063a095..f2c773e 100644 --- a/kradio3/plugins/recording/recording-monitor.cpp +++ b/kradio3/plugins/recording/recording-monitor.cpp @@ -21,7 +21,7 @@ #include <tqlabel.h> #include <tqpushbutton.h> -#include <tqlayout.h> +#include <layout.h> #include <tqcheckbox.h> #include <kcombobox.h> @@ -43,7 +43,7 @@ RecordingMonitor::RecordingMonitor(const TQString &name) l0->addWidget( new TQLabel(i18n("SoundStream"), this), 0, 0); l0->addWidget(m_comboSoundStreamSelector = new KComboBox( this), 0, 1); l0->addWidget( new TQLabel(i18n("Status"), this), 1, 0); - l0->addWidget(m_labeltqStatus = new TQLabel(i18n("<undefined>"), this), 1, 1); + l0->addWidget(m_labelStatus = new TQLabel(i18n("<undefined>"), this), 1, 1); l0->addWidget( new TQLabel(i18n("Recording File"), this), 2, 0); l0->addWidget(m_labelFileName = new TQLabel(i18n("<undefined>"), this), 2, 1); l0->addWidget( new TQLabel(i18n("File Size"), this), 3, 0); @@ -336,13 +336,13 @@ bool RecordingMonitor::noticeSoundStreamData(SoundStreamID id, double MB = kB / 1024; double GB = MB / 1024; TQString str_size; - str_size = i18n("%1 Byte").tqarg(KGlobal::locale()->formatNumber((int)B, 0)); - if (kB > 1) str_size = i18n("%1 kB").tqarg(KGlobal::locale()->formatNumber(kB, 3)); - if (MB > 1) str_size = i18n("%1 MB").tqarg(KGlobal::locale()->formatNumber(MB, 3)); - if (GB > 1) str_size = i18n("%1 GB").tqarg(KGlobal::locale()->formatNumber(GB, 3)); + str_size = i18n("%1 Byte").arg(KGlobal::locale()->formatNumber((int)B, 0)); + if (kB > 1) str_size = i18n("%1 kB").arg(KGlobal::locale()->formatNumber(kB, 3)); + if (MB > 1) str_size = i18n("%1 MB").arg(KGlobal::locale()->formatNumber(MB, 3)); + if (GB > 1) str_size = i18n("%1 GB").arg(KGlobal::locale()->formatNumber(GB, 3)); m_labelSize->setText(str_size); - m_labelRate->setText(i18n("%1 Hz").tqarg(sf.m_SampleRate)); + m_labelRate->setText(i18n("%1 Hz").arg(sf.m_SampleRate)); return true; } return false; @@ -369,7 +369,7 @@ void RecordingMonitor::slotStreamSelected(int idx) m_labelTime ->setEnabled(true); m_labelRate ->setEnabled(true); m_labelFileName ->setEnabled(true); - m_labeltqStatus ->setEnabled(true); + m_labelStatus ->setEnabled(true); } else { m_dataMonitor ->setEnabled(false); m_labelSize ->setEnabled(false); @@ -377,7 +377,7 @@ void RecordingMonitor::slotStreamSelected(int idx) m_labelTime ->setEnabled(false); m_labelRate ->setEnabled(false); m_labelFileName ->setEnabled(false); - m_labeltqStatus ->setEnabled(false); + m_labelStatus ->setEnabled(false); } m_currentStream = id; m_recording = false; diff --git a/kradio3/plugins/recording/recording-monitor.h b/kradio3/plugins/recording/recording-monitor.h index a979c02..5f9247a 100644 --- a/kradio3/plugins/recording/recording-monitor.h +++ b/kradio3/plugins/recording/recording-monitor.h @@ -105,7 +105,7 @@ protected: TQLabel *m_labelTime; TQLabel *m_labelRate; TQLabel *m_labelFileName; - TQLabel *m_labeltqStatus; + TQLabel *m_labelStatus; TQPushButton *m_btnStartStop; KComboBox *m_comboSoundStreamSelector; diff --git a/kradio3/plugins/recording/recording.cpp b/kradio3/plugins/recording/recording.cpp index ca11bfe..46dc502 100644 --- a/kradio3/plugins/recording/recording.cpp +++ b/kradio3/plugins/recording/recording.cpp @@ -479,7 +479,7 @@ bool Recording::noticeSoundStreamData(SoundStreamID id, size_t bufferSize = remSize; char *buf = thread->lockInputBuffer(bufferSize); if (!buf) { - logWarning(i18n("Encoder input buffer overflow (buffer configuration problem?). Skipped %1 input bytes").tqarg(TQString::number(remSize))); + logWarning(i18n("Encoder input buffer overflow (buffer configuration problem?). Skipped %1 input bytes").arg(TQString::number(remSize))); break; } if (bufferSize > remSize) { @@ -529,7 +529,7 @@ bool Recording::startEncoder(SoundStreamID ssid, const RecordingConfig &cfg) TQString station = rs ? rs->name() + "-" : ""; station.replace(TQRegExp("[/*?]"), "_"); - TQDate date = TQDate::tqcurrentDate(); + TQDate date = TQDate::currentDate(); TQTime time = TQTime::currentTime(); TQString sdate; @@ -644,7 +644,7 @@ bool Recording::event(TQEvent *_e) notifySoundStreamData(m_RawStreams2EncodedStreams[id], thread->config().m_SoundFormat, step->data(), step->size(), consumed_size, step->metaData()); if (consumed_size != SIZE_T_DONT_CARE && consumed_size < step->size()) { - logError(i18n("Recording::notifySoundStreamData(encoded data): Receivers skipped %1 Bytes").tqarg(step->size() - consumed_size)); + logError(i18n("Recording::notifySoundStreamData(encoded data): Receivers skipped %1 Bytes").arg(step->size() - consumed_size)); } } } |