diff options
Diffstat (limited to 'ktalkd/kcmktalkd/soundpage.cpp')
-rw-r--r-- | ktalkd/kcmktalkd/soundpage.cpp | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/ktalkd/kcmktalkd/soundpage.cpp b/ktalkd/kcmktalkd/soundpage.cpp index 8f53e304..289b180f 100644 --- a/ktalkd/kcmktalkd/soundpage.cpp +++ b/ktalkd/kcmktalkd/soundpage.cpp @@ -26,11 +26,11 @@ #include <stdlib.h> //for setenv -#include <qgroupbox.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qlistbox.h> -#include <qcheckbox.h> +#include <tqgroupbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqlistbox.h> +#include <tqcheckbox.h> #include <klineedit.h> #include <ksimpleconfig.h> @@ -44,7 +44,7 @@ /* Lots of stuff taken from syssound.cpp */ -KSoundPageConfig::KSoundPageConfig( QWidget *parent, const char* name, +KSoundPageConfig::KSoundPageConfig( TQWidget *parent, const char* name, KSimpleConfig *_config, KSimpleConfig *_announceconfig) : KCModule (parent, name) { @@ -59,70 +59,70 @@ KSoundPageConfig::KSoundPageConfig( QWidget *parent, const char* name, announceconfig = _announceconfig; } - QBoxLayout* toplay = new QVBoxLayout(this, KDialog::marginHint(), + TQBoxLayout* toplay = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint() ); - QGroupBox* extprg_box = new QGroupBox(this); + TQGroupBox* extprg_box = new TQGroupBox(this); extprg_box->setColumnLayout( 0, Qt::Horizontal ); toplay->addWidget(extprg_box); - QGridLayout* l = new QGridLayout(extprg_box->layout()); + TQGridLayout* l = new TQGridLayout(extprg_box->layout()); extprg_edit = new KURLRequester(extprg_box); l->addWidget(extprg_edit, 2, 4); - extprg_label = new QLabel(extprg_edit,i18n("&Announcement program:"), extprg_box); + extprg_label = new TQLabel(extprg_edit,i18n("&Announcement program:"), extprg_box); l->addWidget(extprg_label, 2, 2); client_edit = new KURLRequester(extprg_box); l->addWidget(client_edit, 4, 4); - client_label = new QLabel(client_edit,i18n("&Talk client:"), extprg_box); + client_label = new TQLabel(client_edit,i18n("&Talk client:"), extprg_box); l->addWidget(client_label, 4, 2); toplay->addSpacing(10); - sound_cb = new QCheckBox(i18n("&Play sound"), this); + sound_cb = new TQCheckBox(i18n("&Play sound"), this); toplay->addWidget(sound_cb); - QGroupBox* sound_box = new QGroupBox(this); + TQGroupBox* sound_box = new TQGroupBox(this); toplay->addWidget(sound_box); - QBoxLayout* lay = new QVBoxLayout(sound_box, 10, 10); + TQBoxLayout* lay = new TQVBoxLayout(sound_box, 10, 10); int edit_h = client_edit->height(); // The height of a QLineEdit - sound_list = new QListBox(sound_box); + sound_list = new TQListBox(sound_box); sound_list->setMinimumHeight( 3 * edit_h ); sound_list->setAcceptDrops(true); sound_list->installEventFilter(this); - sound_label = new QLabel(sound_list,i18n("&Sound file:"), sound_box); + sound_label = new TQLabel(sound_list,i18n("&Sound file:"), sound_box); lay->addWidget(sound_label); - QBoxLayout* l2 = new QHBoxLayout(lay, 10); + TQBoxLayout* l2 = new TQHBoxLayout(lay, 10); l2->addWidget(sound_list); - btn_test = new QPushButton(i18n("&Test"), sound_box); + btn_test = new TQPushButton(i18n("&Test"), sound_box); l2->addWidget(btn_test); - sound_tip = new QLabel( + sound_tip = new TQLabel( i18n("Additional WAV files can be dropped onto the sound list."), sound_box); lay->addWidget(sound_tip); - QStringList strlist( KGlobal::dirs()->findAllResources( "sound" ) ); + TQStringList strlist( KGlobal::dirs()->findAllResources( "sound" ) ); sound_list->insertStringList( strlist ); load(); - connect(sound_cb, SIGNAL(clicked()), this, SLOT(soundOnOff())); - connect(btn_test, SIGNAL(clicked()), this, SLOT(playCurrentSound())); + connect(sound_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(soundOnOff())); + connect(btn_test, TQT_SIGNAL(clicked()), this, TQT_SLOT(playCurrentSound())); // emit changed(true) on changes - connect(extprg_edit->lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(slotChanged())); - connect(client_edit->lineEdit(), SIGNAL(textChanged(const QString&)), this, SLOT(slotChanged())); + connect(extprg_edit->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotChanged())); + connect(client_edit->lineEdit(), TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotChanged())); } KSoundPageConfig::~KSoundPageConfig( ) { @@ -146,15 +146,15 @@ void KSoundPageConfig::slotChanged() { emit changed(true); } -bool KSoundPageConfig::eventFilter(QObject* /*o*/, QEvent* e) +bool KSoundPageConfig::eventFilter(TQObject* /*o*/, TQEvent* e) { - if (e->type() == QEvent::DragEnter) { - sound_listDragEnterEvent((QDragEnterEvent *) e); + if (e->type() == TQEvent::DragEnter) { + sound_listDragEnterEvent((TQDragEnterEvent *) e); return true; } - if (e->type() == QEvent::Drop) { - sound_listDropEvent((QDropEvent *) e); + if (e->type() == TQEvent::Drop) { + sound_listDropEvent((TQDropEvent *) e); return true; } @@ -162,12 +162,12 @@ bool KSoundPageConfig::eventFilter(QObject* /*o*/, QEvent* e) } -void KSoundPageConfig::sound_listDragEnterEvent(QDragEnterEvent* e) +void KSoundPageConfig::sound_listDragEnterEvent(TQDragEnterEvent* e) { e->accept(KURLDrag::canDecode(e)); } -void KSoundPageConfig::sound_listDropEvent(QDropEvent* e){ +void KSoundPageConfig::sound_listDropEvent(TQDropEvent* e){ KURL::List list; // This should never happen, but anyway... @@ -192,7 +192,7 @@ void KSoundPageConfig::sound_listDropEvent(QDropEvent* e){ { // Now check for the ending ".wav" if (url.path().right(4).upper() != ".WAV") { - QString msg = i18n("%1\ndoes not appear "\ + TQString msg = i18n("%1\ndoes not appear "\ "to be a WAV file.").arg(url.path()); KMessageBox::sorry(this, msg, i18n("Improper File Extension")); @@ -203,7 +203,7 @@ void KSoundPageConfig::sound_listDropEvent(QDropEvent* e){ if (!addToSound_List(url.path())) { // did not add file because it is already in the list - QString msg = i18n("The file %1 is already in the list").arg(url.path()); + TQString msg = i18n("The file %1 is already in the list").arg(url.path()); KMessageBox::information(this, msg, i18n("File Already in List")); @@ -213,7 +213,7 @@ void KSoundPageConfig::sound_listDropEvent(QDropEvent* e){ } } -int KSoundPageConfig::findInSound_List(QString sound) { +int KSoundPageConfig::findInSound_List(TQString sound) { // Searches for <sound> in sound_list. Returns position or -1 if not found bool found = false; @@ -229,13 +229,13 @@ int KSoundPageConfig::findInSound_List(QString sound) { return (found ? i-1 : -1); } -bool KSoundPageConfig::addToSound_List(QString sound){ +bool KSoundPageConfig::addToSound_List(TQString sound){ // Add "sound" to the sound list, but only if it is not already there bool found = (findInSound_List(sound) != -1); if (!found) { // Fine, the sound is not already in the sound list! - QString *tmp = new QString(sound); // take a copy... + TQString *tmp = new TQString(sound); // take a copy... sound_list->insertItem(*tmp); sound_list->setTopItem(sound_list->count()-1); @@ -247,7 +247,7 @@ bool KSoundPageConfig::addToSound_List(QString sound){ void KSoundPageConfig::playCurrentSound() { - QString hlp, sname; + TQString hlp, sname; int soundno; soundno = sound_list->currentItem(); @@ -287,7 +287,7 @@ void KSoundPageConfig::load() { config->setGroup("ktalkd"); announceconfig->setGroup("ktalkannounce"); - setenv("KDEBINDIR",QFile::encodeName(KStandardDirs::kde_default("exe")),false/*don't overwrite*/); + setenv("KDEBINDIR",TQFile::encodeName(KStandardDirs::kde_default("exe")),false/*don't overwrite*/); // for the first reading of the config file extprg_edit->lineEdit()->setText(config->readPathEntry("ExtPrg", @@ -298,7 +298,7 @@ void KSoundPageConfig::load() { bool b = announceconfig->readBoolEntry("Sound",true/*default value*/); sound_cb->setChecked(b); - const QString soundFile = announceconfig->readPathEntry("SoundFile"); + const TQString soundFile = announceconfig->readPathEntry("SoundFile"); if (!soundFile.isEmpty()) { int pos = findInSound_List(soundFile); |