diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:48:06 +0000 |
commit | 47c8a359c5276062c4bc17f0e82410f29081b502 (patch) | |
tree | 2d54a5f60a5b74067632f9ef6df58c2bc38155e6 /ktalkd | |
parent | 6f82532777a35e0e60bbd2b290b2e93e646f349b (diff) | |
download | tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.tar.gz tdenetwork-47c8a359c5276062c4bc17f0e82410f29081b502.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1157648 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ktalkd')
-rw-r--r-- | ktalkd/kcmktalkd/answmachpage.cpp | 56 | ||||
-rw-r--r-- | ktalkd/kcmktalkd/answmachpage.h | 46 | ||||
-rw-r--r-- | ktalkd/kcmktalkd/forwmachpage.cpp | 30 | ||||
-rw-r--r-- | ktalkd/kcmktalkd/forwmachpage.h | 32 | ||||
-rw-r--r-- | ktalkd/kcmktalkd/main.cpp | 26 | ||||
-rw-r--r-- | ktalkd/kcmktalkd/main.h | 6 | ||||
-rw-r--r-- | ktalkd/kcmktalkd/soundpage.cpp | 78 | ||||
-rw-r--r-- | ktalkd/kcmktalkd/soundpage.h | 32 | ||||
-rw-r--r-- | ktalkd/ktalkd/machines/forwmach.cpp | 2 | ||||
-rw-r--r-- | ktalkd/ktalkd/machines/talkconn.cpp | 4 | ||||
-rw-r--r-- | ktalkd/ktalkd/readcfg++.cpp | 30 | ||||
-rw-r--r-- | ktalkd/ktalkd/unixsock.cpp | 18 | ||||
-rw-r--r-- | ktalkd/ktalkdlg/ktalkdlg.cpp | 44 |
13 files changed, 202 insertions, 202 deletions
diff --git a/ktalkd/kcmktalkd/answmachpage.cpp b/ktalkd/kcmktalkd/answmachpage.cpp index c0aec185..3f426821 100644 --- a/ktalkd/kcmktalkd/answmachpage.cpp +++ b/ktalkd/kcmktalkd/answmachpage.cpp @@ -29,7 +29,7 @@ #include <stdlib.h> #include <klocale.h> // for getenv -KAnswmachPageConfig::KAnswmachPageConfig( QWidget *parent, const char* name, +KAnswmachPageConfig::KAnswmachPageConfig( TQWidget *parent, const char* name, KSimpleConfig *_config) : KCModule (parent, name) { @@ -42,42 +42,42 @@ KAnswmachPageConfig::KAnswmachPageConfig( QWidget *parent, const char* name, config = _config; } - answmach_cb = new QCheckBox(i18n("&Activate answering machine"), this); + answmach_cb = new TQCheckBox(i18n("&Activate answering machine"), this); answmach_cb->adjustSize(); - mail_edit = new QLineEdit(this); + mail_edit = new TQLineEdit(this); mail_edit->adjustSize(); mail_edit->setMinimumWidth(150); - mail_label = new QLabel(mail_edit,i18n("&Mail address:"),this); + mail_label = new TQLabel(mail_edit,i18n("&Mail address:"),this); mail_label->adjustSize(); mail_label->setAlignment( ShowPrefix | AlignVCenter ); - subj_edit = new QLineEdit(this); + subj_edit = new TQLineEdit(this); subj_edit->adjustSize(); subj_edit->setMinimumWidth(150); - subj_label = new QLabel(subj_edit, i18n("Mail s&ubject:"),this); + subj_label = new TQLabel(subj_edit, i18n("Mail s&ubject:"),this); subj_label->adjustSize(); subj_label->setAlignment( ShowPrefix | AlignVCenter ); - subj_tip = new QLabel(i18n("Use %s for the caller name"),this); + subj_tip = new TQLabel(i18n("Use %s for the caller name"),this); subj_tip->setAlignment( ShowPrefix ); - head_edit = new QLineEdit(this); + head_edit = new TQLineEdit(this); head_edit->adjustSize(); head_edit->setMinimumWidth(150); - head_label = new QLabel(head_edit, i18n("Mail &first line:"),this); + head_label = new TQLabel(head_edit, i18n("Mail &first line:"),this); head_label->adjustSize(); head_label->setAlignment( ShowPrefix | AlignVCenter ); - head_tip = new QLabel( + head_tip = new TQLabel( i18n("Use first %s for caller name, and second %s for caller hostname"), this); head_tip->setAlignment( ShowPrefix ); - emptymail_cb = new QCheckBox(i18n("&Receive a mail even if no message left"), this); + emptymail_cb = new TQCheckBox(i18n("&Receive a mail even if no message left"), this); emptymail_cb->adjustSize(); - msg_ml = new QMultiLineEdit(this); + msg_ml = new TQMultiLineEdit(this); msg_ml->adjustSize(); msg_ml->setMinimumWidth(150); - msg_label = new QLabel(msg_ml, i18n("&Banner displayed on answering machine startup:"),this); + msg_label = new TQLabel(msg_ml, i18n("&Banner displayed on answering machine startup:"),this); msg_label->adjustSize(); msg_label->setAlignment( ShowPrefix | AlignVCenter ); @@ -86,24 +86,24 @@ KAnswmachPageConfig::KAnswmachPageConfig( QWidget *parent, const char* name, + head_tip->height() + emptymail_cb->height() + msg_label->height() + msg_ml->height() + 30; setMinimumSize(400, h); // 400 : otherwise, buttons may overlap - msg_default = new QString(i18n("The person you are asking to talk with is not answering.\n" + msg_default = new TQString(i18n("The person you are asking to talk with is not answering.\n" "Please leave a message to be delivered via email.\n" "Just start typing and when you have finished, exit normally.")); load(); - connect(answmach_cb, SIGNAL(clicked()), this, SLOT(answmachOnOff())); + connect(answmach_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(answmachOnOff())); // Emit changed(true) when anything changes - connect(answmach_cb, SIGNAL(clicked()), this, SLOT(slotChanged())); - connect(mail_edit, SIGNAL(textChanged(const QString&)), - this, SLOT(slotChanged())); - connect(subj_edit, SIGNAL(textChanged(const QString&)), - this, SLOT(slotChanged())); - connect(head_edit, SIGNAL(textChanged(const QString&)), - this, SLOT(slotChanged())); - connect(emptymail_cb, SIGNAL(clicked()), this, SLOT(slotChanged())); - connect(msg_ml, SIGNAL(textChanged()), this, SLOT(slotChanged())); + connect(answmach_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChanged())); + connect(mail_edit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotChanged())); + connect(subj_edit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotChanged())); + connect(head_edit, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotChanged())); + connect(emptymail_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChanged())); + connect(msg_ml, TQT_SIGNAL(textChanged()), this, TQT_SLOT(slotChanged())); } @@ -128,10 +128,10 @@ void KAnswmachPageConfig::slotChanged() { emit changed(true); } -void KAnswmachPageConfig::resizeEvent(QResizeEvent *) { +void KAnswmachPageConfig::resizeEvent(TQResizeEvent *) { int h_txt = answmach_cb->height(); // taken for the general label height - int h_edt = mail_edit->height(); // taken for the general QLineEdit height + int h_edt = mail_edit->height(); // taken for the general TQLineEdit height int spc = h_txt / 3; int w = rect().width(); @@ -223,7 +223,7 @@ void KAnswmachPageConfig::load() { msg_ml->clear(); char m[]="Msg1"; // used as key to read configuration - QString msg; + TQString msg; while (!(msg=config->readEntry(m)).isNull()) { msg_ml->append(msg); @@ -249,7 +249,7 @@ void KAnswmachPageConfig::save() { config->writeEntry("EmptyMail", emptymail_cb->isChecked()); char m[]="Msg1"; // used as key to read configuration int linenr=0; - QString msg; + TQString msg; while ((linenr<8) && (linenr<msg_ml->numLines())) { config->writeEntry(m,msg_ml->textLine(linenr)); diff --git a/ktalkd/kcmktalkd/answmachpage.h b/ktalkd/kcmktalkd/answmachpage.h index 830cc32e..31032a93 100644 --- a/ktalkd/kcmktalkd/answmachpage.h +++ b/ktalkd/kcmktalkd/answmachpage.h @@ -24,16 +24,16 @@ #ifndef __KCONTROL_KANSWMACHPAGE_H__ #define __KCONTROL_KANSWMACHPAGE_H__ -#include <qdir.h> +#include <tqdir.h> /* has to be before everything because of #define Unsorted 0 in X11/X.h !! */ -#include <qobject.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qmultilineedit.h> -#include <qpushbutton.h> -#include <qbutton.h> -#include <qcheckbox.h> +#include <tqobject.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqmultilineedit.h> +#include <tqpushbutton.h> +#include <tqbutton.h> +#include <tqcheckbox.h> #include <kcmodule.h> @@ -44,7 +44,7 @@ class KAnswmachPageConfig : public KCModule Q_OBJECT public: - KAnswmachPageConfig( QWidget *parent=0, const char* name=0, + KAnswmachPageConfig( TQWidget *parent=0, const char* name=0, KSimpleConfig *config=0 ); ~KAnswmachPageConfig( ); @@ -53,7 +53,7 @@ public: void defaults(); protected: - void resizeEvent(QResizeEvent *e); + void resizeEvent(TQResizeEvent *e); private slots: void answmachOnOff(); @@ -63,20 +63,20 @@ private: KSimpleConfig *config; bool delete_config; - QCheckBox *answmach_cb; - QLabel *mail_label; - QLineEdit *mail_edit; - QLabel *subj_label; - QLineEdit *subj_edit; - QLabel *subj_tip; - QLabel *head_label; - QLineEdit *head_edit; - QLabel *head_tip; - QCheckBox *emptymail_cb; - QLabel *msg_label; - QMultiLineEdit *msg_ml; + TQCheckBox *answmach_cb; + TQLabel *mail_label; + TQLineEdit *mail_edit; + TQLabel *subj_label; + TQLineEdit *subj_edit; + TQLabel *subj_tip; + TQLabel *head_label; + TQLineEdit *head_edit; + TQLabel *head_tip; + TQCheckBox *emptymail_cb; + TQLabel *msg_label; + TQMultiLineEdit *msg_ml; - QString *msg_default; + TQString *msg_default; }; #endif diff --git a/ktalkd/kcmktalkd/forwmachpage.cpp b/ktalkd/kcmktalkd/forwmachpage.cpp index 6475927f..0a6337f7 100644 --- a/ktalkd/kcmktalkd/forwmachpage.cpp +++ b/ktalkd/kcmktalkd/forwmachpage.cpp @@ -26,7 +26,7 @@ #include <ksimpleconfig.h> #include <klocale.h> -KForwmachPageConfig::KForwmachPageConfig( QWidget *parent, const char* name, +KForwmachPageConfig::KForwmachPageConfig( TQWidget *parent, const char* name, KSimpleConfig *_config) : KCModule (parent, name) { @@ -38,26 +38,26 @@ KForwmachPageConfig::KForwmachPageConfig( QWidget *parent, const char* name, delete_config = false; config = _config; } - forwmach_cb = new QCheckBox(i18n("Activate &forward"), this); + forwmach_cb = new TQCheckBox(i18n("Activate &forward"), this); forwmach_cb->adjustSize(); - address_edit = new QLineEdit(this); + address_edit = new TQLineEdit(this); address_edit->adjustSize(); address_edit->setMinimumWidth(150); - address_label = new QLabel(address_edit,i18n("&Destination (user or user@host):"),this); + address_label = new TQLabel(address_edit,i18n("&Destination (user or user@host):"),this); address_label->adjustSize(); address_label->setAlignment( ShowPrefix | AlignVCenter ); - method_combo = new QComboBox(this); + method_combo = new TQComboBox(this); method_combo->insertItem("FWA"); method_combo->insertItem("FWR"); method_combo->insertItem("FWT"); method_combo->adjustSize(); method_combo->setMinimumWidth(80); - method_label = new QLabel(method_combo, i18n("Forward &method:"),this); + method_label = new TQLabel(method_combo, i18n("Forward &method:"),this); method_label->adjustSize(); method_label->setAlignment( ShowPrefix | AlignVCenter ); - expl_label = new QLabel(i18n( + expl_label = new TQLabel(i18n( "FWA: Forward announcement only. Direct connection. Not recommended.\n\ FWR: Forward all requests, changing info when necessary. Direct connection.\n\ FWT: Forward all requests and handle the talk request. No direct connection.\n\ @@ -75,12 +75,12 @@ See Help for further explanation.\n\ load(); - connect(forwmach_cb, SIGNAL(clicked()), this, SLOT(forwmachOnOff())); + connect(forwmach_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(forwmachOnOff())); // emit changed(true) on changes - connect(forwmach_cb, SIGNAL(clicked()), this, SLOT(slotChanged())); - connect(address_edit, SIGNAL(textChanged(const QString&)), this, SLOT(slotChanged())); - connect(method_combo, SIGNAL(activated(int)), this, SLOT(slotChanged())); + connect(forwmach_cb, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChanged())); + connect(address_edit, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(slotChanged())); + connect(method_combo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotChanged())); } KForwmachPageConfig::~KForwmachPageConfig( ) { @@ -100,9 +100,9 @@ void KForwmachPageConfig::slotChanged() { emit changed(true); } -void KForwmachPageConfig::resizeEvent(QResizeEvent *) { +void KForwmachPageConfig::resizeEvent(TQResizeEvent *) { int h_txt = forwmach_cb->height(); // taken for the general label height - int h_edt = address_edit->height(); // taken for the general QLineEdit height + int h_edt = address_edit->height(); // taken for the general TQLineEdit height int spc = h_txt / 3; int w = rect().width(); @@ -148,14 +148,14 @@ void KForwmachPageConfig::load() { config->setGroup("ktalkd"); - QString forward = config->readEntry("Forward","unset"); + TQString forward = config->readEntry("Forward","unset"); forwmach_cb->setChecked(forward!="unset"); if (forward != "unset" ) address_edit->setText(forward); else address_edit->setText(""); - QString forwardMethod = config->readEntry("ForwardMethod","FWR"); + TQString forwardMethod = config->readEntry("ForwardMethod","FWR"); for (int i=0; i<method_combo->count(); i++) if (forwardMethod == method_combo->text(i)) method_combo->setCurrentItem(i); diff --git a/ktalkd/kcmktalkd/forwmachpage.h b/ktalkd/kcmktalkd/forwmachpage.h index 4202fc30..1643aeef 100644 --- a/ktalkd/kcmktalkd/forwmachpage.h +++ b/ktalkd/kcmktalkd/forwmachpage.h @@ -24,16 +24,16 @@ #ifndef __KCONTROL_KFORWMACHPAGE_H__ #define __KCONTROL_KFORWMACHPAGE_H__ -#include <qdir.h> +#include <tqdir.h> /* has to be before everything because of #define Unsorted 0 in X11/X.h !! */ -#include <qobject.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qcombobox.h> -#include <qpushbutton.h> -#include <qbutton.h> -#include <qcheckbox.h> +#include <tqobject.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqcombobox.h> +#include <tqpushbutton.h> +#include <tqbutton.h> +#include <tqcheckbox.h> #include <kcmodule.h> @@ -44,7 +44,7 @@ class KForwmachPageConfig : public KCModule Q_OBJECT public: - KForwmachPageConfig( QWidget *parent=0, const char* name=0, + KForwmachPageConfig( TQWidget *parent=0, const char* name=0, KSimpleConfig *config=0); ~KForwmachPageConfig( ); @@ -53,7 +53,7 @@ public: void defaults(); protected: - void resizeEvent(QResizeEvent *e); + void resizeEvent(TQResizeEvent *e); private slots: void forwmachOnOff(); @@ -63,12 +63,12 @@ private: KSimpleConfig *config; bool delete_config; - QCheckBox *forwmach_cb; - QLabel *address_label; - QLineEdit *address_edit; - QLabel *method_label; - QComboBox * method_combo; - QLabel *expl_label; + TQCheckBox *forwmach_cb; + TQLabel *address_label; + TQLineEdit *address_edit; + TQLabel *method_label; + TQComboBox * method_combo; + TQLabel *expl_label; }; #endif diff --git a/ktalkd/kcmktalkd/main.cpp b/ktalkd/kcmktalkd/main.cpp index 204606d9..06f1e9b8 100644 --- a/ktalkd/kcmktalkd/main.cpp +++ b/ktalkd/kcmktalkd/main.cpp @@ -27,18 +27,18 @@ #include <ksimpleconfig.h> #include <klocale.h> #include <kglobal.h> -#include <qtabwidget.h> -#include <qlayout.h> +#include <tqtabwidget.h> +#include <tqlayout.h> -KTalkdConfigModule::KTalkdConfigModule(QWidget *parent, const char *name) +KTalkdConfigModule::KTalkdConfigModule(TQWidget *parent, const char *name) : KCModule(parent, name) { config = new KSimpleConfig("ktalkdrc"); announceconfig = new KSimpleConfig("ktalkannouncerc"); - QVBoxLayout *layout = new QVBoxLayout(this); + TQVBoxLayout *layout = new TQVBoxLayout(this); - tab = new QTabWidget(this); + tab = new TQTabWidget(this); layout->addWidget(tab); @@ -50,9 +50,9 @@ KTalkdConfigModule::KTalkdConfigModule(QWidget *parent, const char *name) tab->addTab(answmachpage, i18n("Ans&wering Machine")); tab->addTab(forwmachpage, i18n("forward call", "&Forward")); - connect(soundpage, SIGNAL(changed(bool)), this, SIGNAL(changed(bool))); - connect(answmachpage, SIGNAL(changed(bool)), this, SIGNAL(changed(bool))); - connect(forwmachpage, SIGNAL(changed(bool)), this, SIGNAL(changed(bool))); + connect(soundpage, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool))); + connect(answmachpage, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool))); + connect(forwmachpage, TQT_SIGNAL(changed(bool)), this, TQT_SIGNAL(changed(bool))); } KTalkdConfigModule::~KTalkdConfigModule() { @@ -81,29 +81,29 @@ void KTalkdConfigModule::load() if (forwmachpage) forwmachpage->load(); } -void KTalkdConfigModule::resizeEvent(QResizeEvent *) +void KTalkdConfigModule::resizeEvent(TQResizeEvent *) { tab->setGeometry(0,0,width(),height()); } extern "C" { - KDE_EXPORT KCModule *create_ktalkd(QWidget *parent, const char *) + KDE_EXPORT KCModule *create_ktalkd(TQWidget *parent, const char *) { return new KTalkdConfigModule(parent, "kcmktalkd"); } - KDE_EXPORT KCModule *create_ktalkd_answmach(QWidget *parent, const char *) + KDE_EXPORT KCModule *create_ktalkd_answmach(TQWidget *parent, const char *) { return new KAnswmachPageConfig(parent, "kcmktalkd"); } - KDE_EXPORT KCModule *create_ktalkd_sound(QWidget *parent, const char *) + KDE_EXPORT KCModule *create_ktalkd_sound(TQWidget *parent, const char *) { return new KSoundPageConfig(parent, "kcmktalkd"); } - KDE_EXPORT KCModule *create_ktalkd_forwmach(QWidget *parent, const char *) + KDE_EXPORT KCModule *create_ktalkd_forwmach(TQWidget *parent, const char *) { return new KForwmachPageConfig(parent, "kcmktalkd"); } diff --git a/ktalkd/kcmktalkd/main.h b/ktalkd/kcmktalkd/main.h index 3fde07c4..ee6c8a12 100644 --- a/ktalkd/kcmktalkd/main.h +++ b/ktalkd/kcmktalkd/main.h @@ -38,7 +38,7 @@ class KTalkdConfigModule : public KCModule public: - KTalkdConfigModule(QWidget *parent, const char *name); + KTalkdConfigModule(TQWidget *parent, const char *name); virtual ~KTalkdConfigModule(); //void init(); @@ -47,13 +47,13 @@ public: void defaults(); protected: - void resizeEvent(QResizeEvent *); + void resizeEvent(TQResizeEvent *); private: KSimpleConfig *config; KSimpleConfig *announceconfig; - QTabWidget *tab; + TQTabWidget *tab; KSoundPageConfig *soundpage; KAnswmachPageConfig *answmachpage; 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); diff --git a/ktalkd/kcmktalkd/soundpage.h b/ktalkd/kcmktalkd/soundpage.h index e47194a2..61fa24dc 100644 --- a/ktalkd/kcmktalkd/soundpage.h +++ b/ktalkd/kcmktalkd/soundpage.h @@ -24,10 +24,10 @@ #ifndef __KCONTROL_KSOUNDPAGE_H__ #define __KCONTROL_KSOUNDPAGE_H__ -#include <qdir.h> +#include <tqdir.h> /* has to be before everything because of #define Unsorted 0 in X11/X.h !! */ -#include <qobject.h> +#include <tqobject.h> #include <kcmodule.h> @@ -48,7 +48,7 @@ class KSoundPageConfig : public KCModule Q_OBJECT public: - KSoundPageConfig( QWidget *parent=0, const char* name=0, + KSoundPageConfig( TQWidget *parent=0, const char* name=0, KSimpleConfig *config=0, KSimpleConfig *announceconfig=0); ~KSoundPageConfig( ); @@ -56,7 +56,7 @@ public: void save(); void defaults(); - bool eventFilter(QObject* o, QEvent* e); + bool eventFilter(TQObject* o, TQEvent* e); private slots: void soundOnOff(); @@ -64,26 +64,26 @@ private slots: void slotChanged(); // Sound DnD - void sound_listDragEnterEvent(QDragEnterEvent* e); - void sound_listDropEvent(QDropEvent* e); + void sound_listDragEnterEvent(TQDragEnterEvent* e); + void sound_listDropEvent(TQDropEvent* e); private: KSimpleConfig *config; KSimpleConfig *announceconfig; bool delete_config; - QLabel *extprg_label; + TQLabel *extprg_label; KURLRequester *extprg_edit; - QLabel *client_label; + TQLabel *client_label; KURLRequester *client_edit; - QCheckBox *sound_cb; - QLabel *sound_label; - QListBox *sound_list; - QLabel *sound_tip; - QPushButton *btn_test; - - int findInSound_List(QString sound); - bool addToSound_List(QString sound); + TQCheckBox *sound_cb; + TQLabel *sound_label; + TQListBox *sound_list; + TQLabel *sound_tip; + TQPushButton *btn_test; + + int findInSound_List(TQString sound); + bool addToSound_List(TQString sound); }; #endif diff --git a/ktalkd/ktalkd/machines/forwmach.cpp b/ktalkd/ktalkd/machines/forwmach.cpp index 4d6b2146..402e4f01 100644 --- a/ktalkd/ktalkd/machines/forwmach.cpp +++ b/ktalkd/ktalkd/machines/forwmach.cpp @@ -428,7 +428,7 @@ char * ForwMachine::forwMachFindMatch(TABLE_ENTRY * table, NEW_CTL_MSG * mp) void sig_handler(int signum) { - ktalk_debug("SIGNAL received : %d",signum); + ktalk_debug("TQT_SIGNAL received : %d",signum); ForwMachine * fwm = ForwMachine::getForwMachine(); fwm->processDelete(); } diff --git a/ktalkd/ktalkd/machines/talkconn.cpp b/ktalkd/ktalkd/machines/talkconn.cpp index 2836bc62..b2e5710a 100644 --- a/ktalkd/ktalkd/machines/talkconn.cpp +++ b/ktalkd/ktalkd/machines/talkconn.cpp @@ -164,7 +164,7 @@ struct in_addr TalkConnection::getReplyAddr (struct in_addr destination) { unsigned char *help1; unsigned char *help2; - /* disabled caching - I don't have QIntDict ... + /* disabled caching - I don't have TQIntDict ... result = replyAddrList [(long) destination.s_addr]; if (result) { return *result; @@ -215,7 +215,7 @@ struct in_addr TalkConnection::getReplyAddr (struct in_addr destination) { } return *result; } -/* QIntDict <in_addr> TalkConnection::replyAddrList; */ +/* TQIntDict <in_addr> TalkConnection::replyAddrList; */ /** Check the remote protocol. Result stored in <protocol>. * @return 1 if succeeded to find at least 1 protocol */ diff --git a/ktalkd/ktalkd/readcfg++.cpp b/ktalkd/ktalkd/readcfg++.cpp index 07a10dc2..b18edbff 100644 --- a/ktalkd/ktalkd/readcfg++.cpp +++ b/ktalkd/ktalkd/readcfg++.cpp @@ -53,7 +53,7 @@ #include <kconfig.h> #include <kstandarddirs.h> #include <kinstance.h> -#include <qfile.h> +#include <tqfile.h> /* Ktalkd includes */ #include "readconf.h" @@ -89,7 +89,7 @@ int init_user_config(const char * l_name) if (!pw) return 0; else { struct stat buf; - QString cfgFileName, tkannFileName; + TQString cfgFileName, tkannFileName; /* Set $HOME, because KInstance uses it */ setenv("HOME",pw->pw_dir,1 /* overwrite */); @@ -103,14 +103,14 @@ ktalk_debug("%s",pw->pw_dir); ktalk_debug("%s","endpwent"); //WABA: New KConfig should be able to handle this gracefully: - if (stat(QFile::encodeName(tkannFileName),&buf)!=-1) { + if (stat(TQFile::encodeName(tkannFileName),&buf)!=-1) { // check if it exists, 'cause otherwise it would be created empty with // root as owner ! ktkanncfg = new KConfig(tkannFileName); ktkanncfg -> setGroup("ktalkannounce"); ktkanncfg -> setDollarExpansion(true); } else ktkanncfg = 0L; - if (stat(QFile::encodeName(cfgFileName),&buf)!=-1) { + if (stat(TQFile::encodeName(cfgFileName),&buf)!=-1) { // check if it exists, 'cause otherwise it would be created empty with // root as owner ! ktalkdcfg = new KConfig(cfgFileName); @@ -142,7 +142,7 @@ int read_user_config(const char * key, char * result, int max) cfg = ktalkdcfg; if (!cfg) return 0; // file doesn't exist - QString Qresult; + TQString Qresult; if ((Qresult = cfg -> readEntry(key, "unset")) != "unset") { qstrncpy( result, Qresult.ascii(), max); @@ -180,20 +180,20 @@ void end_user_config() int process_config_file(void) { // Where is ktalkdlg installed ? - QString ktalkdlg_dir = locate("exe", "ktalkdlg"); + TQString ktalkdlg_dir = locate("exe", "ktalkdlg"); ktalkdlg_dir.truncate( ktalkdlg_dir.findRev('/') ); // Has to be done, for any $KDEBINDIR in ktalkdrc. - setenv("KDEBINDIR", QFile::encodeName(ktalkdlg_dir), 0/*don't overwrite*/); + setenv("KDEBINDIR", TQFile::encodeName(ktalkdlg_dir), 0/*don't overwrite*/); KConfig * syscfg = new KConfig( "ktalkdrc" ); syscfg -> setGroup("ktalkd"); syscfg -> setDollarExpansion(true); - QString result; + TQString result; #define found(k) (!(result = syscfg -> readEntry(k)).isEmpty()) - // QString cfgStr = cfgStr0.stripWhiteSpace(); + // TQString cfgStr = cfgStr0.stripWhiteSpace(); if (found("AnswMach")) { Options.answmach=booleanresult(result.ascii()); @@ -212,19 +212,19 @@ int process_config_file(void) ktalk_debug("Sound : %d",Options.sound); } if (found("SoundFile")) { - qstrncpy(Options.soundfile,QFile::encodeName(result),S_CFGLINE); + qstrncpy(Options.soundfile,TQFile::encodeName(result),S_CFGLINE); ktalk_debug("SoundFile = %s",Options.soundfile); } if (found("SoundPlayer")) { - qstrncpy(Options.soundplayer,QFile::encodeName(result),S_CFGLINE); + qstrncpy(Options.soundplayer,TQFile::encodeName(result),S_CFGLINE); ktalk_debug("SoundPlayer = %s",Options.soundplayer); } if (found("SoundPlayerOpt")) { - qstrncpy(Options.soundplayeropt,QFile::encodeName(result),S_CFGLINE); + qstrncpy(Options.soundplayeropt,TQFile::encodeName(result),S_CFGLINE); ktalk_debug("SoundPlayerOpt = %s",Options.soundplayeropt); } if (found("MailProg")) { - qstrncpy(Options.mailprog,QFile::encodeName(result),S_CFGLINE); + qstrncpy(Options.mailprog,TQFile::encodeName(result),S_CFGLINE); ktalk_debug("Mail prog = %s",Options.mailprog); } /* text based announcement */ @@ -246,11 +246,11 @@ int process_config_file(void) } if (found("ExtPrg")) { - qstrncpy(Options.extprg,QFile::encodeName(result),S_CFGLINE); + qstrncpy(Options.extprg,TQFile::encodeName(result),S_CFGLINE); ktalk_debug("Ext prg = %s",Options.extprg); } else { /* has to work even without config file at all */ KStandardDirs stddirs; - qstrncpy(Options.extprg, QFile::encodeName(stddirs.findResource("exe","ktalkdlg")), S_CFGLINE-1); + qstrncpy(Options.extprg, TQFile::encodeName(stddirs.findResource("exe","ktalkdlg")), S_CFGLINE-1); } delete syscfg; diff --git a/ktalkd/ktalkd/unixsock.cpp b/ktalkd/ktalkd/unixsock.cpp index 34272405..9547ccf5 100644 --- a/ktalkd/ktalkd/unixsock.cpp +++ b/ktalkd/ktalkd/unixsock.cpp @@ -45,8 +45,8 @@ #include <sys/select.h> // Needed on some systems. #endif -#include <qstrlist.h> -#include <qfile.h> +#include <tqstrlist.h> +#include <tqfile.h> #include "includ.h" #include "proto.h" @@ -80,8 +80,8 @@ bool sendToKtalk (const char *username, const char *announce) } // find sockets of running ktalk clients - QString tempDir = "/tmp"; - QString templ = QString ("ktalk-") + username + "-"; + TQString tempDir = "/tmp"; + TQString templ = TQString ("ktalk-") + username + "-"; bool announceok = FALSE; char buffer [N_CHARS+2]; buffer [0] = 1; @@ -89,9 +89,9 @@ bool sendToKtalk (const char *username, const char *announce) unsigned int announcelen = strlen(buffer); unsigned int len; - DIR *dir = opendir (QFile::encodeName(tempDir)); + DIR *dir = opendir (TQFile::encodeName(tempDir)); struct dirent *entry; - QStrList dirList; + TQStrList dirList; struct sockaddr_un ktalkAddr; ktalkAddr.sun_family = AF_UNIX; while ((entry = readdir (dir))) { @@ -109,9 +109,9 @@ bool sendToKtalk (const char *username, const char *announce) // out who's talking to janet, all I need is to write // a small app that listens on /tmp/ktalk-janet-foo // - if (templ == QFile::decodeName(entry->d_name).left(templ.length())) { - QString path = tempDir + "/" + QFile::decodeName(entry->d_name); - strncpy (ktalkAddr.sun_path, QFile::encodeName(path), sizeof (ktalkAddr.sun_path)); + if (templ == TQFile::decodeName(entry->d_name).left(templ.length())) { + TQString path = tempDir + "/" + TQFile::decodeName(entry->d_name); + strncpy (ktalkAddr.sun_path, TQFile::encodeName(path), sizeof (ktalkAddr.sun_path)); len = sendto (sock, buffer, announcelen, 0, (struct sockaddr *) &ktalkAddr, sizeof (ktalkAddr)); if (len == announcelen) diff --git a/ktalkd/ktalkdlg/ktalkdlg.cpp b/ktalkd/ktalkdlg/ktalkdlg.cpp index b843c990..336c9a04 100644 --- a/ktalkd/ktalkdlg/ktalkdlg.cpp +++ b/ktalkd/ktalkdlg/ktalkdlg.cpp @@ -26,8 +26,8 @@ #include <fcntl.h> #include <unistd.h> -#include <qmessagebox.h> -#include <qfile.h> +#include <tqmessagebox.h> +#include <tqfile.h> #include <kapplication.h> #include <kdebug.h> @@ -42,21 +42,21 @@ #define MAX_DLG_LIFE RING_WAIT /* so that the dialog lasts exactly the time of an announce */ -class TimeoutDialog : public QMessageBox { +class TimeoutDialog : public TQMessageBox { public: TimeoutDialog (int timeout_ms, - const QString& caption, const QString &text, Icon icon, + const TQString& caption, const TQString &text, Icon icon, int button0, int button1, int button2, - QWidget *parent=0, const char *name=0, bool modal=TRUE, + TQWidget *parent=0, const char *name=0, bool modal=TRUE, WFlags f=WStyle_DialogBorder ): - QMessageBox (caption, text, icon, button0, button1, button2, + TQMessageBox (caption, text, icon, button0, button1, button2, parent, name, modal, f) {startTimer (timeout_ms);} ~TimeoutDialog () {killTimers ();} - virtual void timerEvent (QTimerEvent *) + virtual void timerEvent (TQTimerEvent *) {killTimers (); done (Rejected);} }; @@ -89,7 +89,7 @@ int main (int argc, char **argv) if (args->count() == 0) KCmdLineArgs::usage(i18n("'user@host' expected.")); - QString s; + TQString s; s.sprintf ("%d:%02d", localclock->tm_hour, localclock->tm_min); s = i18n ("Message from talk demon at ") + s + " ...\n" + i18n ("Talk connection requested by ") + args->arg(0); @@ -97,7 +97,7 @@ int main (int argc, char **argv) if ( args->count() == 2 ) { s += '\n'; - QString callee = args->arg(1); + TQString callee = args->arg(1); s += i18n ("for user %1").arg( callee.isEmpty() ? i18n("<nobody>") : callee ); } @@ -105,12 +105,12 @@ int main (int argc, char **argv) TimeoutDialog dialog (MAX_DLG_LIFE * 1000, i18n ("Talk requested..."), s, - QMessageBox::Information, - QMessageBox::Yes | QMessageBox::Default, - QMessageBox::No | QMessageBox::Escape, + TQMessageBox::Information, + TQMessageBox::Yes | TQMessageBox::Default, + TQMessageBox::No | TQMessageBox::Escape, 0 ); - dialog.setButtonText( QMessageBox::Yes, i18n ("Respond") ); - dialog.setButtonText( QMessageBox::No, i18n ("Ignore") ); + dialog.setButtonText( TQMessageBox::Yes, i18n ("Respond") ); + dialog.setButtonText( TQMessageBox::No, i18n ("Ignore") ); a.setTopWidget (&dialog); @@ -123,7 +123,7 @@ int main (int argc, char **argv) bool bSound = cfg->readNumEntry ("Sound", 0); if (bSound) { - QString soundFile = cfg->readPathEntry ("SoundFile"); + TQString soundFile = cfg->readPathEntry ("SoundFile"); if (soundFile[0] != '/') soundFile = locate( "sound", soundFile ); @@ -134,17 +134,17 @@ int main (int argc, char **argv) //if (!audio) a.beep (); // If no audio is played (whatever reason), beep! int result = dialog.exec (); - if (result == QMessageBox::Yes) { + if (result == TQMessageBox::Yes) { dialog.killTimers (); kdDebug() << "Running talk client..." << endl; - QString konsole = locate("exe", "konsole"); - QString konsole_dir = konsole; + TQString konsole = locate("exe", "konsole"); + TQString konsole_dir = konsole; konsole_dir.truncate( konsole.findRev('/') ); - setenv("KDEBINDIR", QFile::encodeName(konsole_dir).data(), 0/*don't overwrite*/); - QString cmd0 = cfg->readPathEntry ("talkprg", konsole + " -e talk"); + setenv("KDEBINDIR", TQFile::encodeName(konsole_dir).data(), 0/*don't overwrite*/); + TQString cmd0 = cfg->readPathEntry ("talkprg", konsole + " -e talk"); - QString cmd = cmd0.stripWhiteSpace(); + TQString cmd = cmd0.stripWhiteSpace(); cmd += " '"; cmd += args->arg(0); cmd += "' &"; @@ -160,7 +160,7 @@ int main (int argc, char **argv) /* XXX: The sender's name or hostname may contain `rm -rf .` * That's why it's bad to use system() */ - system (QFile::encodeName(cmd)); + system (TQFile::encodeName(cmd)); kapp->quit(); } |