From c663b6440964f6ac48027143ac9e63298991f9d0 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:33:34 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- khotkeys/kcontrol/voicerecorder.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'khotkeys/kcontrol/voicerecorder.cpp') diff --git a/khotkeys/kcontrol/voicerecorder.cpp b/khotkeys/kcontrol/voicerecorder.cpp index 92458c2ee..31578298d 100644 --- a/khotkeys/kcontrol/voicerecorder.cpp +++ b/khotkeys/kcontrol/voicerecorder.cpp @@ -8,8 +8,8 @@ ****************************************************************************/ -#include -#include +#include +#include #include "voicerecorder.h" #include "soundrecorder.h" @@ -20,8 +20,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -45,14 +45,14 @@ bool VoiceRecorder::init( KLibrary* lib ) return arts_play != NULL; } -VoiceRecorder::VoiceRecorder(const Sound& sound_P, const QString &voiceId, QWidget *parent, const char *name) +VoiceRecorder::VoiceRecorder(const Sound& sound_P, const TQString &voiceId, TQWidget *parent, const char *name) : Voice_input_widget_ui(parent, name) , _recorder( SoundRecorder::create(this)) , _state(sNotModified), _tempFile(0L) , _voiceId(voiceId) { _sound=sound_P; buttonPlay->setEnabled(sound_P.size() > 50); buttonStop->setEnabled(false); - connect (_recorder , SIGNAL(recorded(const Sound& )) , this , SLOT(slotSoundRecorded(const Sound& ) )); + connect (_recorder , TQT_SIGNAL(recorded(const Sound& )) , this , TQT_SLOT(slotSoundRecorded(const Sound& ) )); //if(voiceid_P.isEmpty()) emit recorded(false); @@ -89,14 +89,14 @@ void VoiceRecorder::slotPlayPressed() return; /*if(!_modified) { - QString fileName = locateLocal( "appdata", _original_voiuceid + ".wav" ); + TQString fileName = locateLocal( "appdata", _original_voiuceid + ".wav" ); arts_play( fileName ); } else {*/ if(!_tempFile) { - _tempFile=new KTempFile(QString::null,".wav"); + _tempFile=new KTempFile(TQString::null,".wav"); _tempFile->setAutoDelete(true); } _sound.save(_tempFile->name()); @@ -118,7 +118,7 @@ void VoiceRecorder::slotSoundRecorded(const Sound &sound) bool correct=drawSound() && sound.size()>50; if(correct) { - QString vm=voice_handler->isNewSoundFarEnough( VoiceSignature(sound), _voiceId); + TQString vm=voice_handler->isNewSoundFarEnough( VoiceSignature(sound), _voiceId); if(!vm.isNull()) { KMessageBox::sorry (this, i18n("The word you recorded is too close to the existing reference '%1'. Please record another word.").arg(vm) ); @@ -140,14 +140,14 @@ void VoiceRecorder::slotSoundRecorded(const Sound &sound) { if(voiceId().isEmpty()) return VoiceSignature(); - QString fileName = locateLocal( "appdata", voiceId() + ".wav" ); + TQString fileName = locateLocal( "appdata", voiceId() + ".wav" ); _sound.save( fileName ); return VoiceSignature(_sound); }*/ bool VoiceRecorder::drawSound() { - label->setText(QString::null); + label->setText(TQString::null); uint length=_sound.size(); if(length < 2) @@ -155,20 +155,20 @@ bool VoiceRecorder::drawSound() int width=label->width(); int height=label->height(); - QPixmap pix(width,height); - pix.fill(QColor(255,255,255)); - QPainter p; + TQPixmap pix(width,height); + pix.fill(TQColor(255,255,255)); + TQPainter p; p.begin(&pix); - p.setPen(QPen(QColor("green"),1)); + p.setPen(TQPen(TQColor("green"),1)); p.drawLine(0,height/2,width,height/2); - p.setPen(QPen(QColor("red"),1)); + p.setPen(TQPen(TQColor("red"),1)); uint lx=0; uint ly=height/2; - /*** DRAW THE SIGNAL ******/ + /*** DRAW THE TQT_SIGNAL ******/ for(uint f=1; f