summaryrefslogtreecommitdiffstats
path: root/kandy
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /kandy
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kandy')
-rw-r--r--kandy/src/atcommand.cpp76
-rw-r--r--kandy/src/atcommand.h66
-rw-r--r--kandy/src/cmdpropertiesdialog.cpp20
-rw-r--r--kandy/src/cmdpropertiesdialog.h4
-rw-r--r--kandy/src/commanditem.cpp24
-rw-r--r--kandy/src/commanditem.h14
-rw-r--r--kandy/src/commandscheduler.cpp22
-rw-r--r--kandy/src/commandscheduler.h24
-rw-r--r--kandy/src/commandset.cpp46
-rw-r--r--kandy/src/commandset.h18
-rw-r--r--kandy/src/kandy.cpp74
-rw-r--r--kandy/src/kandy.h18
-rw-r--r--kandy/src/kandy_client.cpp14
-rw-r--r--kandy/src/kandyprefsdialog.cpp150
-rw-r--r--kandy/src/kandyprefsdialog.h14
-rw-r--r--kandy/src/kandyview.cpp122
-rw-r--r--kandy/src/kandyview.h26
-rw-r--r--kandy/src/main.cpp24
-rw-r--r--kandy/src/mobilegui.cpp190
-rw-r--r--kandy/src/mobilegui.h36
-rw-r--r--kandy/src/mobilemain.cpp32
-rw-r--r--kandy/src/mobilemain.h10
-rw-r--r--kandy/src/modem.cpp38
-rw-r--r--kandy/src/modem.h18
24 files changed, 540 insertions, 540 deletions
diff --git a/kandy/src/atcommand.cpp b/kandy/src/atcommand.cpp
index 006fedf15..20e771cc1 100644
--- a/kandy/src/atcommand.cpp
+++ b/kandy/src/atcommand.cpp
@@ -32,7 +32,7 @@ ATParameter::ATParameter()
mUserInput = false;
}
-ATParameter::ATParameter(const QString &value,const QString &name,
+ATParameter::ATParameter(const TQString &value,const TQString &name,
bool userInput)
{
mName = name;
@@ -48,7 +48,7 @@ ATCommand::ATCommand()
construct();
}
-ATCommand::ATCommand(const QString &cmdString)
+ATCommand::ATCommand(const TQString &cmdString)
{
setCmdName(i18n("New Command"));
setCmdString(cmdString);
@@ -59,7 +59,7 @@ ATCommand::ATCommand(const QString &cmdString)
construct();
}
-ATCommand::ATCommand(const QString &cmdName,const QString &cmdString,
+ATCommand::ATCommand(const TQString &cmdName,const TQString &cmdString,
bool hexOutput)
{
setCmdName(cmdName);
@@ -82,18 +82,18 @@ ATCommand::~ATCommand()
}
-void ATCommand::setCmdName(const QString &cmdName)
+void ATCommand::setCmdName(const TQString &cmdName)
{
mCmdName = cmdName;
}
-QString ATCommand::cmdName()
+TQString ATCommand::cmdName()
{
return mCmdName;
}
-void ATCommand::setCmdString(const QString &cmdString)
+void ATCommand::setCmdString(const TQString &cmdString)
{
mCmdString = cmdString;
@@ -104,15 +104,15 @@ void ATCommand::setCmdString(const QString &cmdString)
// kdDebug() << "ATCommand: Id: " << mId << endl;
}
-QString ATCommand::cmdString()
+TQString ATCommand::cmdString()
{
return mCmdString;
}
-QString ATCommand::cmd()
+TQString ATCommand::cmd()
{
if (mParameters.count() > 0) {
- QString cmd = cmdString().left(cmdString().find("=") + 1);
+ TQString cmd = cmdString().left(cmdString().find("=") + 1);
// kdDebug() << "--1-cmd: " << cmd << endl;
for(uint i=0;i<mParameters.count();++i) {
cmd += mParameters.at(i)->value();
@@ -125,7 +125,7 @@ QString ATCommand::cmd()
}
}
-QString ATCommand::id()
+TQString ATCommand::id()
{
return mId;
}
@@ -140,24 +140,24 @@ bool ATCommand::hexOutput()
return mHexOutput;
}
-void ATCommand::setResultString(const QString &resultString)
+void ATCommand::setResultString(const TQString &resultString)
{
mResultString = resultString;
mResultFieldsList.clear();
- QStringList resultFields = QStringList::split("\n",mResultString);
+ TQStringList resultFields = TQStringList::split("\n",mResultString);
- for(QStringList::Iterator it = resultFields.begin();
+ for(TQStringList::Iterator it = resultFields.begin();
it != resultFields.end(); ++it) {
setResultFields(*it);
}
}
-void ATCommand::setResultFields( QString fieldsString )
+void ATCommand::setResultFields( TQString fieldsString )
{
- QString id = mId.upper().left( mId.find( '=' ) );
+ TQString id = mId.upper().left( mId.find( '=' ) );
// Truncate the command name prepended to the output by the modem.
@@ -168,9 +168,9 @@ void ATCommand::setResultFields( QString fieldsString )
if ( ( fieldsString[ 0 ] == '(' ) && ( fieldsString[ fieldsString.length() - 1 ] == ')' ) )
fieldsString = fieldsString.mid( 1, fieldsString.length() - 2 );
- QStringList *fields = new QStringList;
- QStringList TmpFields = QStringList::split( ',', fieldsString );
- QString TmpString = "";
+ TQStringList *fields = new QStringList;
+ TQStringList TmpFields = TQStringList::split( ',', fieldsString );
+ TQString TmpString = "";
// Assume a phonebook entry of the mobile phone has the format
@@ -181,7 +181,7 @@ void ATCommand::setResultFields( QString fieldsString )
// Hence, the fieldsString needs to be parsed a little bit. Names stored on
// the mobile phone are quoted. Commas within a quoted are of the fieldsString
// must not be divided into differend fields.
- for ( QStringList::Iterator it = TmpFields.begin(); it != TmpFields.end(); it++ )
+ for ( TQStringList::Iterator it = TmpFields.begin(); it != TmpFields.end(); it++ )
{
// Start of a quoted area
if ( ( (*it)[ 0 ] == '\"' ) && ( (*it)[ (*it).length() - 1 ] != '\"' ) )
@@ -206,18 +206,18 @@ void ATCommand::setResultFields( QString fieldsString )
}
-QString ATCommand::resultString()
+TQString ATCommand::resultString()
{
return mResultString;
}
-QString ATCommand::resultField(int index)
+TQString ATCommand::resultField(int index)
{
if (mResultFieldsList.count() == 0) return "";
- QStringList *resultFields = mResultFieldsList.at(0);
+ TQStringList *resultFields = mResultFieldsList.at(0);
- QStringList::Iterator it = resultFields->at(index);
+ TQStringList::Iterator it = resultFields->at(index);
if (it == resultFields->end()) {
kdDebug() << "ATCommand::resultField: index " << index << " out of range."
<< endl;
@@ -228,7 +228,7 @@ QString ATCommand::resultField(int index)
}
-QPtrList<QStringList> *ATCommand::resultFields()
+TQPtrList<TQStringList> *ATCommand::resultFields()
{
return &mResultFieldsList;
}
@@ -243,12 +243,12 @@ void ATCommand::clearParameters()
mParameters.clear();
}
-QPtrList<ATParameter> ATCommand::parameters()
+TQPtrList<ATParameter> ATCommand::parameters()
{
return mParameters;
}
-void ATCommand::setParameter(int index,const QString &value)
+void ATCommand::setParameter(int index,const TQString &value)
{
if (mParameters.count() <= (unsigned int)index) {
kdDebug() << "ATCommand " << cmdName() << " has no Parameter " << index
@@ -261,19 +261,19 @@ void ATCommand::setParameter(int index,const QString &value)
void ATCommand::setParameter(int index,int value)
{
- setParameter(index,QString::number(value));
+ setParameter(index,TQString::number(value));
}
-QString ATCommand::processOutput(const QString &output)
+TQString ATCommand::processOutput(const TQString &output)
{
if (hexOutput()) {
- QString hexString = output.mid(output.find('\n')+1);
+ TQString hexString = output.mid(output.find('\n')+1);
int i=0;
- QString aChar = hexString.mid(i,2);
- QString result;
+ TQString aChar = hexString.mid(i,2);
+ TQString result;
while(!aChar.isEmpty()) {
int charValue = aChar.toInt(0,16);
- QChar charEncoded(charValue);
+ TQChar charEncoded(charValue);
// result += aChar + ": " + charEncoded + "\n";
result += charEncoded;
i += 2;
@@ -286,7 +286,7 @@ QString ATCommand::processOutput(const QString &output)
}
}
-QString ATCommand::processOutput()
+TQString ATCommand::processOutput()
{
return processOutput(mResultString);
}
@@ -298,15 +298,15 @@ void ATCommand::extractParameters()
int pos = cmdString().find("=");
if (pos < 0) return;
- QString paraString = cmdString().mid(pos+1);
+ TQString paraString = cmdString().mid(pos+1);
// kdDebug() << "Para String: " << paraString << endl;
- QStringList paraList = QStringList::split(",",paraString);
+ TQStringList paraList = TQStringList::split(",",paraString);
- QStringList::ConstIterator it = paraList.begin();
- QStringList::ConstIterator end = paraList.end();
+ TQStringList::ConstIterator it = paraList.begin();
+ TQStringList::ConstIterator end = paraList.end();
int argNum = 1;
while(it != end) {
- addParameter(new ATParameter(*it,i18n("Arg %1").arg(QString::number(argNum++)),
+ addParameter(new ATParameter(*it,i18n("Arg %1").arg(TQString::number(argNum++)),
false));
++it;
}
diff --git a/kandy/src/atcommand.h b/kandy/src/atcommand.h
index 8296d1291..f8f8f6a3f 100644
--- a/kandy/src/atcommand.h
+++ b/kandy/src/atcommand.h
@@ -24,26 +24,26 @@
#ifndef ATCOMMAND_H
#define ATCOMMAND_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
class ATParameter {
public:
ATParameter();
- ATParameter(const QString &value,const QString &name="",
+ ATParameter(const TQString &value,const TQString &name="",
bool userInput=false);
- void setName(const QString &name) { mName = name; }
- QString name() const { return mName; }
- void setValue(const QString &value) { mValue = value; }
- QString value() const { return mValue; }
+ void setName(const TQString &name) { mName = name; }
+ TQString name() const { return mName; }
+ void setValue(const TQString &value) { mValue = value; }
+ TQString value() const { return mValue; }
void setUserInput(bool userInput) { mUserInput = userInput; }
bool userInput() const { return mUserInput; }
private:
- QString mName;
- QString mValue;
+ TQString mName;
+ TQString mValue;
bool mUserInput;
};
@@ -54,37 +54,37 @@ class ATParameter {
class ATCommand {
public:
ATCommand();
- ATCommand(const QString &cmdString);
- ATCommand(const QString &cmdName,const QString &cmdString,
+ ATCommand(const TQString &cmdString);
+ ATCommand(const TQString &cmdName,const TQString &cmdString,
bool hexOutput=false);
virtual ~ATCommand();
- void setCmdName(const QString &);
- QString cmdName();
+ void setCmdName(const TQString &);
+ TQString cmdName();
- void setCmdString(const QString &);
- QString cmdString();
+ void setCmdString(const TQString &);
+ TQString cmdString();
- QString cmd();
+ TQString cmd();
- QString id();
+ TQString id();
void setHexOutput(bool);
bool hexOutput();
- QString processOutput(const QString &);
- QString processOutput();
+ TQString processOutput(const TQString &);
+ TQString processOutput();
- void setResultString(const QString &);
- QString resultString();
- QString resultField(int index);
- QPtrList<QStringList> *resultFields();
+ void setResultString(const TQString &);
+ TQString resultString();
+ TQString resultField(int index);
+ TQPtrList<TQStringList> *resultFields();
void addParameter(ATParameter *);
void clearParameters();
- QPtrList<ATParameter> parameters();
+ TQPtrList<ATParameter> parameters();
- void setParameter(int index,const QString &value);
+ void setParameter(int index,const TQString &value);
void setParameter(int index,int value);
void setAutoDelete(bool autoDelete) { mAutoDelete = autoDelete; }
@@ -92,18 +92,18 @@ class ATCommand {
private:
void construct();
- void setResultFields(QString fieldsString);
+ void setResultFields(TQString fieldsString);
void extractParameters();
- QString mCmdName;
- QString mCmdString;
- QString mId;
+ TQString mCmdName;
+ TQString mCmdString;
+ TQString mId;
bool mHexOutput;
- QString mResultString;
- QPtrList<QStringList> mResultFieldsList;
+ TQString mResultString;
+ TQPtrList<TQStringList> mResultFieldsList;
- QPtrList<ATParameter> mParameters;
+ TQPtrList<ATParameter> mParameters;
bool mAutoDelete;
};
diff --git a/kandy/src/cmdpropertiesdialog.cpp b/kandy/src/cmdpropertiesdialog.cpp
index f871a02bb..f9667c268 100644
--- a/kandy/src/cmdpropertiesdialog.cpp
+++ b/kandy/src/cmdpropertiesdialog.cpp
@@ -22,9 +22,9 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlistview.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqlistview.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
#include <kinputdialog.h>
#include <klocale.h>
@@ -34,10 +34,10 @@
#include "cmdpropertiesdialog.h"
#include "cmdpropertiesdialog.moc"
-class ParameterItem : public QCheckListItem {
+class ParameterItem : public TQCheckListItem {
public:
- ParameterItem(ATParameter *p,QListView *parent) :
- QCheckListItem(parent,p->name(),CheckBox),mParameter(p)
+ ParameterItem(ATParameter *p,TQListView *parent) :
+ TQCheckListItem(parent,p->name(),CheckBox),mParameter(p)
{
setText(1,p->value());
setOn(p->userInput());
@@ -62,7 +62,7 @@ class ParameterItem : public QCheckListItem {
* The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog.
*/
-CmdPropertiesDialog::CmdPropertiesDialog(ATCommand *cmd, QWidget* parent,
+CmdPropertiesDialog::CmdPropertiesDialog(ATCommand *cmd, TQWidget* parent,
const char* name, bool modal,
WFlags fl )
: CmdPropertiesDialog_base( parent, name, modal, fl )
@@ -82,7 +82,7 @@ void CmdPropertiesDialog::readCommand()
mStringEdit->setText(mCmd->cmdString());
mHexCheck->setChecked(mCmd->hexOutput());
- QPtrList<ATParameter> parameters = mCmd->parameters();
+ TQPtrList<ATParameter> parameters = mCmd->parameters();
for(int i=(int)parameters.count()-1;i>=0;--i) {
ATParameter *p = parameters.at(i);
new ParameterItem(p,mParameterList);
@@ -101,11 +101,11 @@ void CmdPropertiesDialog::writeCommand()
}
}
-void CmdPropertiesDialog::editParameterName(QListViewItem *item)
+void CmdPropertiesDialog::editParameterName(TQListViewItem *item)
{
bool ok = false;
- QString newName = KInputDialog::getText(QString::null,
+ TQString newName = KInputDialog::getText(TQString::null,
i18n("Enter parameter name:"),item->text(0),&ok,this);
if (ok) {
diff --git a/kandy/src/cmdpropertiesdialog.h b/kandy/src/cmdpropertiesdialog.h
index 18849d3d6..ee37852aa 100644
--- a/kandy/src/cmdpropertiesdialog.h
+++ b/kandy/src/cmdpropertiesdialog.h
@@ -32,12 +32,12 @@ class CmdPropertiesDialog : public CmdPropertiesDialog_base
{
Q_OBJECT
public:
- CmdPropertiesDialog(ATCommand *cmd,QWidget* parent=0,const char* name=0,
+ CmdPropertiesDialog(ATCommand *cmd,TQWidget* parent=0,const char* name=0,
bool modal=false,WFlags fl=0);
~CmdPropertiesDialog();
protected slots:
- void editParameterName(QListViewItem *);
+ void editParameterName(TQListViewItem *);
void slotAccept();
private:
diff --git a/kandy/src/commanditem.cpp b/kandy/src/commanditem.cpp
index fde599c3f..4785e89ff 100644
--- a/kandy/src/commanditem.cpp
+++ b/kandy/src/commanditem.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
@@ -30,8 +30,8 @@
#include "commanditem.h"
-CommandItem::CommandItem(QListView *listView,ATCommand *command)
- : QListViewItem(listView)
+CommandItem::CommandItem(TQListView *listView,ATCommand *command)
+ : TQListViewItem(listView)
{
mCommand = command;
@@ -47,15 +47,15 @@ ATCommand *CommandItem::command()
return mCommand;
}
-void CommandItem::load(QDomElement *c)
+void CommandItem::load(TQDomElement *c)
{
mCommand->setCmdName(c->attribute("name","unknown"));
mCommand->setCmdString(c->attribute("string","at"));
mCommand->setHexOutput(c->attribute("hexoutput","n") == "y");
- QDomNode n = c->firstChild();
+ TQDomNode n = c->firstChild();
while(!n.isNull()) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (!e.isNull()) {
ATParameter *p = new ATParameter;
p->setName(e.attribute("name","unnamed"));
@@ -70,24 +70,24 @@ void CommandItem::load(QDomElement *c)
setItemText();
}
-void CommandItem::save(QDomDocument *doc,QDomElement *parent)
+void CommandItem::save(TQDomDocument *doc,TQDomElement *parent)
{
- QDomElement c = doc->createElement("command");
+ TQDomElement c = doc->createElement("command");
c.setAttribute("name",mCommand->cmdName());
c.setAttribute("string",mCommand->cmdString());
c.setAttribute("hexoutput",mCommand->hexOutput() ? "y" : "n");
parent->appendChild(c);
- QPtrList<ATParameter> paras = mCommand->parameters();
+ TQPtrList<ATParameter> paras = mCommand->parameters();
for(uint i=0;i<paras.count();++i) {
saveParameter(paras.at(i),doc,&c);
}
}
-void CommandItem::saveParameter(ATParameter *p, QDomDocument *doc,
- QDomElement *parent)
+void CommandItem::saveParameter(ATParameter *p, TQDomDocument *doc,
+ TQDomElement *parent)
{
- QDomElement e = doc->createElement("parameter");
+ TQDomElement e = doc->createElement("parameter");
e.setAttribute("name",p->name());
e.setAttribute("value",p->value());
e.setAttribute("userinput",p->userInput() ? "y" : "n");
diff --git a/kandy/src/commanditem.h b/kandy/src/commanditem.h
index 853bba01b..ccd89a0a0 100644
--- a/kandy/src/commanditem.h
+++ b/kandy/src/commanditem.h
@@ -25,7 +25,7 @@
#ifndef _COMMAND_ITEM_H_
#define _COMMAND_ITEM_H_
-#include <qlistview.h>
+#include <tqlistview.h>
class ATCommand;
class ATParameter;
@@ -33,22 +33,22 @@ class QDomElement;
class QDomDocument;
/**
- QListView item representing a modem command.
+ TQListView item representing a modem command.
*/
-class CommandItem : public QListViewItem {
+class CommandItem : public TQListViewItem {
public:
- CommandItem(QListView *listView,ATCommand *command);
+ CommandItem(TQListView *listView,ATCommand *command);
~CommandItem();
ATCommand *command();
- void load(QDomElement *c);
- void save(QDomDocument *doc,QDomElement *parent);
+ void load(TQDomElement *c);
+ void save(TQDomDocument *doc,TQDomElement *parent);
void setItemText();
protected:
- void saveParameter(ATParameter *p, QDomDocument *doc,QDomElement *parent);
+ void saveParameter(ATParameter *p, TQDomDocument *doc,TQDomElement *parent);
private:
ATCommand *mCommand;
diff --git a/kandy/src/commandscheduler.cpp b/kandy/src/commandscheduler.cpp
index 23544e8a2..bef11cac8 100644
--- a/kandy/src/commandscheduler.cpp
+++ b/kandy/src/commandscheduler.cpp
@@ -30,13 +30,13 @@
#include "commandscheduler.h"
#include "commandscheduler.moc"
-CommandScheduler::CommandScheduler(Modem *modem,QObject *parent,
+CommandScheduler::CommandScheduler(Modem *modem,TQObject *parent,
const char *name) :
- QObject(parent,name),
+ TQObject(parent,name),
mModem(modem)
{
- connect(mModem,SIGNAL(gotLine(const char *)),
- SLOT(processOutput(const char *)));
+ connect(mModem,TQT_SIGNAL(gotLine(const char *)),
+ TQT_SLOT(processOutput(const char *)));
}
void CommandScheduler::execute(ATCommand *command)
@@ -52,7 +52,7 @@ void CommandScheduler::execute(ATCommand *command)
if (mCommandQueue.count() == 1) sendCommand(command->cmd());
}
-void CommandScheduler::execute(const QString &command)
+void CommandScheduler::execute(const TQString &command)
{
ATCommand *cmd = new ATCommand("",command);
cmd->setAutoDelete(true);
@@ -60,9 +60,9 @@ void CommandScheduler::execute(const QString &command)
execute(cmd);
}
-void CommandScheduler::executeId(const QString &id)
+void CommandScheduler::executeId(const TQString &id)
{
- QPtrList<ATCommand> *cmds = mCommandSet.commandList();
+ TQPtrList<ATCommand> *cmds = mCommandSet.commandList();
for(uint i=0;i<cmds->count();++i) {
if (cmds->at(i)->id() == id) {
@@ -73,7 +73,7 @@ void CommandScheduler::executeId(const QString &id)
kdDebug(5960) << "CommandScheduler::executeId(): Id '" << id << "' not found" << endl;
}
-void CommandScheduler::sendCommand(const QString &command)
+void CommandScheduler::sendCommand(const TQString &command)
{
if (command.isEmpty()) {
kdDebug(5960) << "CommandScheduler::sendCommand(): Warning! Empty command."
@@ -89,7 +89,7 @@ void CommandScheduler::sendCommand(const QString &command)
void CommandScheduler::processOutput(const char *line)
{
- QString l = line;
+ TQString l = line;
ATCommand *cmd = mCommandQueue.first();
if (l == "OK") {
mState = WAITING;
@@ -123,7 +123,7 @@ void CommandScheduler::nextCommand()
}
}
-bool CommandScheduler::loadProfile(const QString& filename)
+bool CommandScheduler::loadProfile(const TQString& filename)
{
mCommandSet.clear();
@@ -132,7 +132,7 @@ bool CommandScheduler::loadProfile(const QString& filename)
return true;
}
-bool CommandScheduler::saveProfile(const QString& filename)
+bool CommandScheduler::saveProfile(const TQString& filename)
{
if (!mCommandSet.saveFile(filename)) return false;
diff --git a/kandy/src/commandscheduler.h b/kandy/src/commandscheduler.h
index 20398aafa..231ad325b 100644
--- a/kandy/src/commandscheduler.h
+++ b/kandy/src/commandscheduler.h
@@ -24,38 +24,38 @@
#ifndef COMMANDSCHEDULER_H
#define COMMANDSCHEDULER_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include "atcommand.h"
#include "commandset.h"
class Modem;
-class CommandScheduler : public QObject {
+class CommandScheduler : public TQObject {
Q_OBJECT
public:
- CommandScheduler (Modem *modem,QObject *parent = 0, const char *name = 0);
+ CommandScheduler (Modem *modem,TQObject *parent = 0, const char *name = 0);
- void execute(const QString &command);
+ void execute(const TQString &command);
void execute(ATCommand *command);
- void executeId(const QString &id);
+ void executeId(const TQString &id);
Modem *modem() { return mModem; }
CommandSet *commandSet() { return &mCommandSet; }
- bool loadProfile(const QString& filename);
- bool saveProfile(const QString& filename);
+ bool loadProfile(const TQString& filename);
+ bool saveProfile(const TQString& filename);
signals:
- void result(const QString &);
+ void result(const TQString &);
void commandProcessed(ATCommand *);
private slots:
void processOutput(const char *line);
private:
- void sendCommand(const QString &command);
+ void sendCommand(const TQString &command);
void nextCommand();
private:
@@ -65,12 +65,12 @@ class CommandScheduler : public QObject {
ATCommand *mLastCommand;
- QPtrList<ATCommand> mCommandQueue;
+ TQPtrList<ATCommand> mCommandQueue;
enum State { WAITING, PROCESSING };
State mState;
- QString mResult;
+ TQString mResult;
};
#endif
diff --git a/kandy/src/commandset.cpp b/kandy/src/commandset.cpp
index f44899cac..17a50b811 100644
--- a/kandy/src/commandset.cpp
+++ b/kandy/src/commandset.cpp
@@ -22,9 +22,9 @@
without including the source code for Qt in the source distribution.
*/
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
#include <kdebug.h>
@@ -51,12 +51,12 @@ void CommandSet::deleteCommand(ATCommand *command)
mList.removeRef(command);
}
-bool CommandSet::loadFile(const QString& filename)
+bool CommandSet::loadFile(const TQString& filename)
{
// kdDebug(5960) << "CommandSet::loadFile(): " << filename << endl;
- QDomDocument doc("Kandy");
- QFile f(filename);
+ TQDomDocument doc("Kandy");
+ TQFile f(filename);
if (!f.open(IO_ReadOnly))
return false;
if (!doc.setContent(&f)) {
@@ -65,9 +65,9 @@ bool CommandSet::loadFile(const QString& filename)
}
f.close();
- QDomNodeList commands = doc.elementsByTagName("command");
+ TQDomNodeList commands = doc.elementsByTagName("command");
for(uint i=0;i<commands.count();++i) {
- QDomElement c = commands.item(i).toElement();
+ TQDomElement c = commands.item(i).toElement();
if (!c.isNull()) {
ATCommand *cmd = new ATCommand;
loadCommand(cmd,&c);
@@ -78,24 +78,24 @@ bool CommandSet::loadFile(const QString& filename)
return true;
}
-bool CommandSet::saveFile(const QString& filename)
+bool CommandSet::saveFile(const TQString& filename)
{
kdDebug(5960) << "CommandSet::saveFile(): " << filename << endl;
- QDomDocument doc("Kandy");
- QDomElement set = doc.createElement("commandset");
+ TQDomDocument doc("Kandy");
+ TQDomElement set = doc.createElement("commandset");
doc.appendChild(set);
for(uint i=0; i<mList.count();++i) {
saveCommand(mList.at(i),&doc,&set);
}
- QFile xmlfile(filename);
+ TQFile xmlfile(filename);
if (!xmlfile.open(IO_WriteOnly)) {
kdDebug(5960) << "Error opening file for write." << endl;
return false;
}
- QTextStream ts(&xmlfile);
+ TQTextStream ts(&xmlfile);
doc.documentElement().save(ts,2);
xmlfile.close();
@@ -107,15 +107,15 @@ void CommandSet::clear()
mList.clear();
}
-void CommandSet::loadCommand(ATCommand *command,QDomElement *c)
+void CommandSet::loadCommand(ATCommand *command,TQDomElement *c)
{
command->setCmdName(c->attribute("name","unknown"));
command->setCmdString(c->attribute("string","at"));
command->setHexOutput(c->attribute("hexoutput","n") == "y");
- QDomNode n = c->firstChild();
+ TQDomNode n = c->firstChild();
while(!n.isNull()) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if (!e.isNull()) {
ATParameter *p = new ATParameter;
p->setName(e.attribute("name","unnamed"));
@@ -128,25 +128,25 @@ void CommandSet::loadCommand(ATCommand *command,QDomElement *c)
}
}
-void CommandSet::saveCommand(ATCommand *command,QDomDocument *doc,
- QDomElement *parent)
+void CommandSet::saveCommand(ATCommand *command,TQDomDocument *doc,
+ TQDomElement *parent)
{
- QDomElement c = doc->createElement("command");
+ TQDomElement c = doc->createElement("command");
c.setAttribute("name",command->cmdName());
c.setAttribute("string",command->cmdString());
c.setAttribute("hexoutput",command->hexOutput() ? "y" : "n");
parent->appendChild(c);
- QPtrList<ATParameter> paras = command->parameters();
+ TQPtrList<ATParameter> paras = command->parameters();
for(uint i=0;i<paras.count();++i) {
saveParameter(paras.at(i),doc,&c);
}
}
-void CommandSet::saveParameter(ATParameter *p, QDomDocument *doc,
- QDomElement *parent)
+void CommandSet::saveParameter(ATParameter *p, TQDomDocument *doc,
+ TQDomElement *parent)
{
- QDomElement e = doc->createElement("parameter");
+ TQDomElement e = doc->createElement("parameter");
e.setAttribute("name",p->name());
e.setAttribute("value",p->value());
e.setAttribute("userinput",p->userInput() ? "y" : "n");
diff --git a/kandy/src/commandset.h b/kandy/src/commandset.h
index 41c9cd144..3f385fea5 100644
--- a/kandy/src/commandset.h
+++ b/kandy/src/commandset.h
@@ -24,7 +24,7 @@
#ifndef COMMANDSET_H
#define COMMANDSET_H
-#include <qlistview.h>
+#include <tqlistview.h>
class ATCommand;
class ATParameter;
@@ -32,7 +32,7 @@ class QDomElement;
class QDomDocument;
/**
- QListView item representing a modem command.
+ TQListView item representing a modem command.
*/
class CommandSet {
public:
@@ -42,20 +42,20 @@ class CommandSet {
void addCommand(ATCommand *);
void deleteCommand(ATCommand *);
- bool loadFile(const QString &);
- bool saveFile(const QString &);
+ bool loadFile(const TQString &);
+ bool saveFile(const TQString &);
void clear();
- QPtrList<ATCommand> *commandList() { return &mList; }
+ TQPtrList<ATCommand> *commandList() { return &mList; }
protected:
- void loadCommand(ATCommand *,QDomElement *c);
- void saveCommand(ATCommand *,QDomDocument *doc,QDomElement *parent);
- void saveParameter(ATParameter *p, QDomDocument *doc,QDomElement *parent);
+ void loadCommand(ATCommand *,TQDomElement *c);
+ void saveCommand(ATCommand *,TQDomDocument *doc,TQDomElement *parent);
+ void saveParameter(ATParameter *p, TQDomDocument *doc,TQDomElement *parent);
private:
- QPtrList<ATCommand> mList;
+ TQPtrList<ATCommand> mList;
};
#endif
diff --git a/kandy/src/kandy.cpp b/kandy/src/kandy.cpp
index 860aff5bb..d7da32e86 100644
--- a/kandy/src/kandy.cpp
+++ b/kandy/src/kandy.cpp
@@ -22,11 +22,11 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlineedit.h>
-#include <qprinter.h>
-#include <qprintdialog.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <tqlineedit.h>
+#include <tqprinter.h>
+#include <tqprintdialog.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
#include <kglobal.h>
#include <klocale.h>
@@ -81,16 +81,16 @@ Kandy::Kandy(CommandScheduler *scheduler)
setAutoSaveSettings();
// allow the view to change the statusbar and caption
- connect(mView, SIGNAL(signalChangeStatusbar(const QString&)),
- this, SLOT(changeStatusbar(const QString&)));
- connect(mView, SIGNAL(signalChangeCaption(const QString&)),
- this, SLOT(changeCaption(const QString&)));
+ connect(mView, TQT_SIGNAL(signalChangeStatusbar(const TQString&)),
+ this, TQT_SLOT(changeStatusbar(const TQString&)));
+ connect(mView, TQT_SIGNAL(signalChangeCaption(const TQString&)),
+ this, TQT_SLOT(changeCaption(const TQString&)));
- connect(mView,SIGNAL(modifiedChanged(bool)),SLOT(setTitle()));
+ connect(mView,TQT_SIGNAL(modifiedChanged(bool)),TQT_SLOT(setTitle()));
KConfig *config = KGlobal::config();
config->setGroup("General");
- QString currentProfile = config->readEntry("CurrentProfile",
+ TQString currentProfile = config->readEntry("CurrentProfile",
locate("appdata","default.kandy"));
if (!currentProfile.isEmpty()) load(currentProfile);
}
@@ -99,7 +99,7 @@ Kandy::~Kandy()
{
}
-void Kandy::load(const QString& filename)
+void Kandy::load(const TQString& filename)
{
if (!mView->loadFile(filename)) {
KMessageBox::error(this,i18n("Could not load file %1").arg(filename));
@@ -109,7 +109,7 @@ void Kandy::load(const QString& filename)
setTitle();
}
-void Kandy::save(const QString & filename)
+void Kandy::save(const TQString & filename)
{
if (!filename.isEmpty()) {
if (!mView->saveFile(filename)) {
@@ -123,26 +123,26 @@ void Kandy::save(const QString & filename)
void Kandy::setupActions()
{
- KStdAction::open(this, SLOT(fileOpen()), actionCollection());
- KStdAction::save(this, SLOT(fileSave()), actionCollection());
- KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
-// KStdAction::print(this, SLOT(filePrint()), actionCollection());
- KStdAction::quit(this, SLOT(close()), actionCollection());
+ KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection());
+ KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
+// KStdAction::print(this, TQT_SLOT(filePrint()), actionCollection());
+ KStdAction::quit(this, TQT_SLOT(close()), actionCollection());
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
- KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
- new KAction(i18n("Mobile GUI"),0,this,SLOT(showMobileGui()),
+ new KAction(i18n("Mobile GUI"),0,this,TQT_SLOT(showMobileGui()),
actionCollection(),"show_mobilegui");
- mConnectAction = new KAction(i18n("Connect"),0,this,SLOT(modemConnect()),
+ mConnectAction = new KAction(i18n("Connect"),0,this,TQT_SLOT(modemConnect()),
actionCollection(),"modem_connect");
mDisconnectAction = new KAction(i18n("Disconnect"),0,this,
- SLOT(modemDisconnect()),actionCollection(),
+ TQT_SLOT(modemDisconnect()),actionCollection(),
"modem_disconnect");
createGUI();
@@ -163,7 +163,7 @@ void Kandy::readProperties(KConfig */*config*/)
// in 'saveProperties'
}
-void Kandy::dragEnterEvent(QDragEnterEvent *event)
+void Kandy::dragEnterEvent(TQDragEnterEvent *event)
{
// do nothing
KMainWindow::dragEnterEvent(event);
@@ -172,7 +172,7 @@ void Kandy::dragEnterEvent(QDragEnterEvent *event)
// event->accept(KURLDrag::canDecode(event));
}
-void Kandy::dropEvent(QDropEvent *event)
+void Kandy::dropEvent(TQDropEvent *event)
{
// this is a very simplistic implementation of a drop event. we
// will only accept a dropped URL. the Qt dnd code can do *much*
@@ -203,7 +203,7 @@ void Kandy::fileOpen()
// this slot is called whenever the File->Open menu is selected,
// the Open shortcut is pressed (usually CTRL+O) or the Open toolbar
// button is clicked
- QString filename = KFileDialog::getOpenFileName();
+ TQString filename = KFileDialog::getOpenFileName();
if (!filename.isEmpty()) load(filename);
}
@@ -215,7 +215,7 @@ void Kandy::fileSave()
void Kandy::fileSaveAs()
{
- QString filename = KFileDialog::getSaveFileName();
+ TQString filename = KFileDialog::getSaveFileName();
save(filename);
}
@@ -225,16 +225,16 @@ void Kandy::filePrint()
// the Print shortcut is pressed (usually CTRL+P) or the Print toolbar
// button is clicked
if (!mPrinter) mPrinter = new QPrinter;
- if (QPrintDialog::getPrinterSetup(mPrinter))
+ if (TQPrintDialog::getPrinterSetup(mPrinter))
{
// setup the printer. with Qt, you always "print" to a
- // QPainter.. whether the output medium is a pixmap, a screen,
+ // TQPainter.. whether the output medium is a pixmap, a screen,
// or paper
- QPainter p;
+ TQPainter p;
p.begin(mPrinter);
// we let our view do the actual printing
- QPaintDeviceMetrics metrics(mPrinter);
+ TQPaintDeviceMetrics metrics(mPrinter);
mView->print(&p, metrics.height(), metrics.width());
// and send the result to the printer
@@ -252,7 +252,7 @@ void Kandy::optionsConfigureToolbars()
// use the standard toolbar editor
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() );
KEditToolbar dlg(actionCollection());
- connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(newToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(newToolbarConfig()));
dlg.exec();
}
@@ -275,13 +275,13 @@ void Kandy::optionsPreferences()
mPreferencesDialog->raise();
}
-void Kandy::changeStatusbar(const QString& text)
+void Kandy::changeStatusbar(const TQString& text)
{
// display the text on the statusbar
statusBar()->message(text);
}
-void Kandy::changeCaption(const QString& text)
+void Kandy::changeCaption(const TQString& text)
{
// display the text on the caption
setCaption(text);
@@ -300,7 +300,7 @@ bool Kandy::queryClose()
{
if (mView->isModified()) {
switch (KMessageBox::warningYesNoCancel(this,
- i18n("Save changes to profile %1?").arg(mFilename), QString::null, KStdGuiItem::save(), KStdGuiItem::discard())) {
+ i18n("Save changes to profile %1?").arg(mFilename), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard())) {
case KMessageBox::Yes :
fileSave();
return true;
@@ -342,7 +342,7 @@ void Kandy::showMobileGui()
emit showMobileWin();
}
-void Kandy::showErrorMessage( const QString &text )
+void Kandy::showErrorMessage( const TQString &text )
{
KMessageBox::error( 0, text );
}
diff --git a/kandy/src/kandy.h b/kandy/src/kandy.h
index ba2e66155..3d122dc93 100644
--- a/kandy/src/kandy.h
+++ b/kandy/src/kandy.h
@@ -62,15 +62,15 @@ class Kandy : public KMainWindow
/**
* Use this method to load whatever file/URL you have
*/
- void load(const QString& url);
- void save(const QString& url);
+ void load(const TQString& url);
+ void save(const TQString& url);
public slots:
void setTitle();
void modemConnect();
- void showErrorMessage( const QString & );
+ void showErrorMessage( const TQString & );
signals:
void showMobileWin();
@@ -80,8 +80,8 @@ class Kandy : public KMainWindow
/**
* Overridden virtuals for Qt drag 'n drop (XDND)
*/
- virtual void dragEnterEvent(QDragEnterEvent *event);
- virtual void dropEvent(QDropEvent *event);
+ virtual void dragEnterEvent(TQDragEnterEvent *event);
+ virtual void dropEvent(TQDropEvent *event);
bool queryClose();
@@ -112,8 +112,8 @@ class Kandy : public KMainWindow
void showMobileGui();
void newToolbarConfig();
- void changeStatusbar(const QString& text);
- void changeCaption(const QString& text);
+ void changeStatusbar(const TQString& text);
+ void changeCaption(const TQString& text);
private:
@@ -125,12 +125,12 @@ class Kandy : public KMainWindow
KandyView *mView;
- QPrinter *mPrinter;
+ TQPrinter *mPrinter;
KAction *mConnectAction;
KAction *mDisconnectAction;
- QString mFilename;
+ TQString mFilename;
KandyPrefsDialog *mPreferencesDialog;
};
diff --git a/kandy/src/kandy_client.cpp b/kandy/src/kandy_client.cpp
index ece43f5da..b927afc3a 100644
--- a/kandy/src/kandy_client.cpp
+++ b/kandy/src/kandy_client.cpp
@@ -24,8 +24,8 @@
#include <kapplication.h>
#include <dcopclient.h>
-#include <qdatastream.h>
-#include <qstring.h>
+#include <tqdatastream.h>
+#include <tqstring.h>
int main(int argc, char **argv)
{
@@ -36,13 +36,13 @@ int main(int argc, char **argv)
client->attach();
// do a 'send' for now
- QByteArray data;
- QDataStream ds(data, IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream ds(data, IO_WriteOnly);
if (argc > 1)
- ds << QString(argv[1]);
+ ds << TQString(argv[1]);
else
- ds << QString("http://www.kde.org");
- client->send("kandy", "KandyIface", "openURL(QString)", data);
+ ds << TQString("http://www.kde.org");
+ client->send("kandy", "KandyIface", "openURL(TQString)", data);
return app.exec();
}
diff --git a/kandy/src/kandyprefsdialog.cpp b/kandy/src/kandyprefsdialog.cpp
index d25688ff9..d98989dc2 100644
--- a/kandy/src/kandyprefsdialog.cpp
+++ b/kandy/src/kandyprefsdialog.cpp
@@ -22,20 +22,20 @@
without including the source code for Qt in the source distribution.
*/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qbuttongroup.h>
-#include <qlineedit.h>
-#include <qfont.h>
-#include <qslider.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qcombobox.h>
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qspinbox.h>
-#include <qdatetime.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqbuttongroup.h>
+#include <tqlineedit.h>
+#include <tqfont.h>
+#include <tqslider.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqcombobox.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqspinbox.h>
+#include <tqdatetime.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -54,7 +54,7 @@
#include "kandyprefsdialog.moc"
-KandyPrefsDialog::KandyPrefsDialog(QWidget *parent, char *name, bool modal) :
+KandyPrefsDialog::KandyPrefsDialog(TQWidget *parent, char *name, bool modal) :
KPrefsDialog(KandyPrefs::self(),parent,name,modal)
{
setupSerialTab();
@@ -74,10 +74,10 @@ KandyPrefsDialog::~KandyPrefsDialog()
void KandyPrefsDialog::setupSerialTab()
{
- QFrame *topFrame = addPage(i18n("Serial Interface"),0,
+ TQFrame *topFrame = addPage(i18n("Serial Interface"),0,
DesktopIcon("connect_no",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
+ TQGridLayout *topLayout = new TQGridLayout(topFrame,6,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
@@ -113,10 +113,10 @@ void KandyPrefsDialog::setupSerialTab()
void KandyPrefsDialog::setupAddressbookTab()
{
- QFrame *topFrame = addPage(i18n("Address Book"), 0,
+ TQFrame *topFrame = addPage(i18n("Address Book"), 0,
DesktopIcon("kaddressbook", KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame, 13, 4);
+ TQGridLayout *topLayout = new TQGridLayout(topFrame, 13, 4);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
@@ -292,68 +292,68 @@ void KandyPrefsDialog::setupAddressbookTab()
}
- connect( useHomeSuff->checkBox(), SIGNAL(toggled(bool)),
- HomeSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useHomeSuff->checkBox(), SIGNAL(toggled(bool)),
- HomeSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useWorkSuff->checkBox(), SIGNAL(toggled(bool)),
- WorkSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useWorkSuff->checkBox(), SIGNAL(toggled(bool)),
- WorkSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useMessagingSuff->checkBox(), SIGNAL(toggled(bool)),
- MessagingSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useMessagingSuff->checkBox(), SIGNAL(toggled(bool)),
- MessagingSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useFaxSuff->checkBox(), SIGNAL(toggled(bool)),
- FaxSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useFaxSuff->checkBox(), SIGNAL(toggled(bool)),
- FaxSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useCellSuff->checkBox(), SIGNAL(toggled(bool)),
- CellSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useCellSuff->checkBox(), SIGNAL(toggled(bool)),
- CellSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useVideoSuff->checkBox(), SIGNAL(toggled(bool)),
- VideoSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useVideoSuff->checkBox(), SIGNAL(toggled(bool)),
- VideoSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useMailboxSuff->checkBox(), SIGNAL(toggled(bool)),
- MailboxSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useMailboxSuff->checkBox(), SIGNAL(toggled(bool)),
- MailboxSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useModemSuff->checkBox(), SIGNAL(toggled(bool)),
- ModemSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useModemSuff->checkBox(), SIGNAL(toggled(bool)),
- ModemSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useCarSuff->checkBox(), SIGNAL(toggled(bool)),
- CarSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useCarSuff->checkBox(), SIGNAL(toggled(bool)),
- CarSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( useISDNSuff->checkBox(), SIGNAL(toggled(bool)),
- ISDNSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( useISDNSuff->checkBox(), SIGNAL(toggled(bool)),
- ISDNSuff->label(), SLOT(setEnabled(bool)) );
-
- connect( usePagerSuff->checkBox(), SIGNAL(toggled(bool)),
- PagerSuff->lineEdit(), SLOT(setEnabled(bool)) );
- connect( usePagerSuff->checkBox(), SIGNAL(toggled(bool)),
- PagerSuff->label(), SLOT(setEnabled(bool)) );
+ connect( useHomeSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ HomeSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useHomeSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ HomeSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useWorkSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ WorkSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useWorkSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ WorkSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useMessagingSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ MessagingSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useMessagingSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ MessagingSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useFaxSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ FaxSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useFaxSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ FaxSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useCellSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ CellSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useCellSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ CellSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useVideoSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ VideoSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useVideoSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ VideoSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useMailboxSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ MailboxSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useMailboxSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ MailboxSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useModemSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ ModemSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useModemSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ ModemSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useCarSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ CarSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useCarSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ CarSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( useISDNSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ ISDNSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( useISDNSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ ISDNSuff->label(), TQT_SLOT(setEnabled(bool)) );
+
+ connect( usePagerSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ PagerSuff->lineEdit(), TQT_SLOT(setEnabled(bool)) );
+ connect( usePagerSuff->checkBox(), TQT_SIGNAL(toggled(bool)),
+ PagerSuff->label(), TQT_SLOT(setEnabled(bool)) );
}
void KandyPrefsDialog::setupWindowsTab()
{
- QFrame *topFrame = addPage(i18n("Windows"),0,
+ TQFrame *topFrame = addPage(i18n("Windows"),0,
DesktopIcon("window_list",KIcon::SizeMedium));
- QGridLayout *topLayout = new QGridLayout(topFrame,6,2);
+ TQGridLayout *topLayout = new TQGridLayout(topFrame,6,2);
topLayout->setSpacing(spacingHint());
topLayout->setMargin(marginHint());
diff --git a/kandy/src/kandyprefsdialog.h b/kandy/src/kandyprefsdialog.h
index 5d63331c5..7929e92d5 100644
--- a/kandy/src/kandyprefsdialog.h
+++ b/kandy/src/kandyprefsdialog.h
@@ -25,12 +25,12 @@
#ifndef _KANDYPREFSDIALOG_H
#define _KANDYPREFSDIALOG_H
-#include <qframe.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
+#include <tqframe.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
#include <kdialogbase.h>
@@ -44,7 +44,7 @@ class KandyPrefsDialog : public KPrefsDialog
Q_OBJECT
public:
/** Initialize dialog and pages */
- KandyPrefsDialog(QWidget *parent=0,char *name=0,bool modal=false);
+ KandyPrefsDialog(TQWidget *parent=0,char *name=0,bool modal=false);
~KandyPrefsDialog();
protected:
diff --git a/kandy/src/kandyview.cpp b/kandy/src/kandyview.cpp
index 5b9f06194..27d3b7b6b 100644
--- a/kandy/src/kandyview.cpp
+++ b/kandy/src/kandyview.cpp
@@ -24,19 +24,19 @@
#include <unistd.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qtextedit.h>
-#include <qlistview.h>
-#include <qdom.h>
-#include <qtextstream.h>
-#include <qfile.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqtextedit.h>
+#include <tqlistview.h>
+#include <tqdom.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
#include <kurl.h>
#include <kmessagebox.h>
@@ -57,90 +57,90 @@
#include "kandyview.h"
#include "kandyview.moc"
-KandyView::KandyView(CommandScheduler *scheduler,QWidget *parent)
- : QWidget(parent)
+KandyView::KandyView(CommandScheduler *scheduler,TQWidget *parent)
+ : TQWidget(parent)
{
mModified = false;
mScheduler = scheduler;
- QBoxLayout *topLayout = new QVBoxLayout( this );
+ TQBoxLayout *topLayout = new TQVBoxLayout( this );
- QSplitter *mainSplitter = new QSplitter( Horizontal, this );
+ TQSplitter *mainSplitter = new TQSplitter( Horizontal, this );
topLayout->addWidget( mainSplitter );
- QWidget *commandBox = new QWidget( mainSplitter );
+ TQWidget *commandBox = new TQWidget( mainSplitter );
- QBoxLayout *commandLayout = new QVBoxLayout( commandBox );
+ TQBoxLayout *commandLayout = new TQVBoxLayout( commandBox );
commandLayout->setMargin( KDialog::marginHint() );
commandLayout->setSpacing( KDialog::spacingHint() );
- mCommandList = new QListView( commandBox );
+ mCommandList = new TQListView( commandBox );
mCommandList->addColumn( i18n( "Name" ) );
mCommandList->addColumn( i18n( "Command" ) );
mCommandList->addColumn( i18n( "Hex" ) );
commandLayout->addWidget( mCommandList );
- connect( mCommandList, SIGNAL( doubleClicked(QListViewItem*) ),
- SLOT( executeCommand() ) );
+ connect( mCommandList, TQT_SIGNAL( doubleClicked(TQListViewItem*) ),
+ TQT_SLOT( executeCommand() ) );
- QPushButton *buttonAdd = new QPushButton( i18n("Add..."), commandBox );
+ TQPushButton *buttonAdd = new TQPushButton( i18n("Add..."), commandBox );
commandLayout->addWidget( buttonAdd );
- connect( buttonAdd, SIGNAL( clicked() ), SLOT( addCommand() ) );
+ connect( buttonAdd, TQT_SIGNAL( clicked() ), TQT_SLOT( addCommand() ) );
- QPushButton *buttonEdit = new QPushButton( i18n("Edit..."), commandBox );
+ TQPushButton *buttonEdit = new TQPushButton( i18n("Edit..."), commandBox );
commandLayout->addWidget( buttonEdit );
- connect( buttonEdit, SIGNAL( clicked() ), SLOT( editCommand() ) );
+ connect( buttonEdit, TQT_SIGNAL( clicked() ), TQT_SLOT( editCommand() ) );
- QPushButton *buttonDelete = new QPushButton( i18n("Delete"), commandBox );
+ TQPushButton *buttonDelete = new TQPushButton( i18n("Delete"), commandBox );
commandLayout->addWidget( buttonDelete );
- connect( buttonDelete, SIGNAL( clicked() ), SLOT( deleteCommand() ) );
+ connect( buttonDelete, TQT_SIGNAL( clicked() ), TQT_SLOT( deleteCommand() ) );
- QPushButton *buttonExecute = new QPushButton( i18n("Execute"), commandBox );
+ TQPushButton *buttonExecute = new TQPushButton( i18n("Execute"), commandBox );
commandLayout->addWidget( buttonExecute );
- connect( buttonExecute, SIGNAL( clicked() ), SLOT( executeCommand() ) );
+ connect( buttonExecute, TQT_SIGNAL( clicked() ), TQT_SLOT( executeCommand() ) );
- QSplitter *ioSplitter = new QSplitter( Vertical, mainSplitter );
+ TQSplitter *ioSplitter = new TQSplitter( Vertical, mainSplitter );
- QWidget *inBox = new QWidget( ioSplitter );
+ TQWidget *inBox = new TQWidget( ioSplitter );
- QBoxLayout *inLayout = new QVBoxLayout( inBox );
+ TQBoxLayout *inLayout = new TQVBoxLayout( inBox );
- QLabel *inLabel = new QLabel( i18n("Input:"), inBox );
+ TQLabel *inLabel = new TQLabel( i18n("Input:"), inBox );
inLabel->setMargin( 2 );
inLayout->addWidget( inLabel );
- mInput = new QTextEdit( inBox );
+ mInput = new TQTextEdit( inBox );
inLayout->addWidget( mInput );
- QWidget *outBox = new QWidget( ioSplitter );
+ TQWidget *outBox = new TQWidget( ioSplitter );
- QBoxLayout *outLayout = new QVBoxLayout( outBox );
+ TQBoxLayout *outLayout = new TQVBoxLayout( outBox );
- QLabel *outLabel = new QLabel( i18n( "Output:"), outBox );
+ TQLabel *outLabel = new TQLabel( i18n( "Output:"), outBox );
outLabel->setMargin( 2 );
outLayout->addWidget( outLabel );
- mOutput = new QTextEdit( outBox );
+ mOutput = new TQTextEdit( outBox );
mOutput->setReadOnly( true );
outLayout->addWidget( mOutput );
- QVBox *resultBox = new QVBox( mainSplitter );
+ TQVBox *resultBox = new TQVBox( mainSplitter );
- QLabel *resultLabel = new QLabel( i18n("Result:"), resultBox );
+ TQLabel *resultLabel = new TQLabel( i18n("Result:"), resultBox );
resultLabel->setMargin( 2 );
- mResultView = new QTextEdit( resultBox );
+ mResultView = new TQTextEdit( resultBox );
mResultView->setReadOnly( true );
- connect (mInput,SIGNAL(returnPressed()),SLOT(processLastLine()));
+ connect (mInput,TQT_SIGNAL(returnPressed()),TQT_SLOT(processLastLine()));
- connect(mScheduler->modem(),SIGNAL(gotLine(const char *)),
- SLOT(appendOutput(const char *)));
+ connect(mScheduler->modem(),TQT_SIGNAL(gotLine(const char *)),
+ TQT_SLOT(appendOutput(const char *)));
- connect(mScheduler,SIGNAL(result(const QString &)),
- mResultView,SLOT(setText(const QString &)));
- connect(mScheduler,SIGNAL(commandProcessed(ATCommand *)),
- SLOT(setResult(ATCommand *)));
+ connect(mScheduler,TQT_SIGNAL(result(const TQString &)),
+ mResultView,TQT_SLOT(setText(const TQString &)));
+ connect(mScheduler,TQT_SIGNAL(commandProcessed(ATCommand *)),
+ TQT_SLOT(setResult(ATCommand *)));
}
KandyView::~KandyView()
@@ -148,7 +148,7 @@ KandyView::~KandyView()
}
-void KandyView::print(QPainter *, int, int)
+void KandyView::print(TQPainter *, int, int)
{
// do the actual printing, here
// p->drawText(etc..)
@@ -158,12 +158,12 @@ void KandyView::importPhonebook()
{
#if 0
createMobileGui();
- connect (mMobileGui,SIGNAL(phonebookRead()),mMobileGui,SLOT(writeKab()));
+ connect (mMobileGui,TQT_SIGNAL(phonebookRead()),mMobileGui,TQT_SLOT(writeKab()));
mMobileGui->readPhonebook();
#endif
}
-void KandyView::slotSetTitle(const QString& title)
+void KandyView::slotSetTitle(const TQString& title)
{
emit signalChangeCaption(title);
}
@@ -212,7 +212,7 @@ void KandyView::addCommand()
int result = dlg->exec();
- if (result == QDialog::Accepted) {
+ if (result == TQDialog::Accepted) {
new CommandItem(mCommandList,cmd);
mScheduler->commandSet()->addCommand(cmd);
setModified();
@@ -223,7 +223,7 @@ void KandyView::addCommand()
void KandyView::editCommand()
{
- QListViewItem *item = mCommandList->currentItem();
+ TQListViewItem *item = mCommandList->currentItem();
if (item) {
CommandItem *cmdItem = (CommandItem *)item;
ATCommand *cmd = cmdItem->command();
@@ -232,7 +232,7 @@ void KandyView::editCommand()
int result = dlg->exec();
- if (result == QDialog::Accepted) {
+ if (result == TQDialog::Accepted) {
cmdItem->setItemText();
setModified();
}
@@ -244,13 +244,13 @@ void KandyView::executeCommand()
CommandItem *item = (CommandItem *)(mCommandList->currentItem());
if (item) {
ATCommand *cmd = item->command();
- QPtrList<ATParameter> paraList = cmd->parameters();
+ TQPtrList<ATParameter> paraList = cmd->parameters();
for(uint i=0;i<paraList.count();++i) {
ATParameter *p = paraList.at(i);
if (p->userInput()) {
bool ok = false;
- QString value = KInputDialog::getText(QString::null,
- i18n("Enter value for %1:").arg(p->name()),QString::null,&ok,this);
+ TQString value = KInputDialog::getText(TQString::null,
+ i18n("Enter value for %1:").arg(p->name()),TQString::null,&ok,this);
if (!ok)
return;
p->setValue(value);
@@ -271,13 +271,13 @@ void KandyView::deleteCommand()
}
}
-bool KandyView::loadFile(const QString& filename)
+bool KandyView::loadFile(const TQString& filename)
{
mCommandList->clear();
if (!mScheduler->loadProfile(filename)) return false;
- QPtrList<ATCommand> *cmds = mScheduler->commandSet()->commandList();
+ TQPtrList<ATCommand> *cmds = mScheduler->commandSet()->commandList();
for(uint i=0;i<cmds->count();++i) {
new CommandItem(mCommandList,cmds->at(i));
@@ -292,7 +292,7 @@ bool KandyView::loadFile(const QString& filename)
return true;
}
-bool KandyView::saveFile(const QString& filename)
+bool KandyView::saveFile(const TQString& filename)
{
if (!mScheduler->saveProfile(filename)) return false;
diff --git a/kandy/src/kandyview.h b/kandy/src/kandyview.h
index 259ee6c78..ed5171cac 100644
--- a/kandy/src/kandyview.h
+++ b/kandy/src/kandyview.h
@@ -24,7 +24,7 @@
#ifndef KANDYVIEW_H
#define KANDYVIEW_H
-#include <qwidget.h>
+#include <tqwidget.h>
class QPainter;
class QTextStream;
@@ -55,7 +55,7 @@ class KandyView : public QWidget
/**
* Default constructor
*/
- KandyView(CommandScheduler *,QWidget *parent);
+ KandyView(CommandScheduler *,TQWidget *parent);
/**
* Destructor
@@ -71,10 +71,10 @@ class KandyView : public QWidget
/**
* Print this view to any medium -- paper or not
*/
- void print(QPainter *, int height, int width);
+ void print(TQPainter *, int height, int width);
- bool loadFile(const QString& filename);
- bool saveFile(const QString& filename);
+ bool loadFile(const TQString& filename);
+ bool saveFile(const TQString& filename);
void setModified(bool modified=true);
bool isModified();
@@ -89,12 +89,12 @@ class KandyView : public QWidget
/**
* Use this signal to change the content of the statusbar
*/
- void signalChangeStatusbar(const QString& text);
+ void signalChangeStatusbar(const TQString& text);
/**
* Use this signal to change the content of the caption
*/
- void signalChangeCaption(const QString& text);
+ void signalChangeCaption(const TQString& text);
void modifiedChanged(bool);
@@ -104,21 +104,21 @@ class KandyView : public QWidget
void setResult(ATCommand *);
private slots:
- void slotSetTitle(const QString& title);
+ void slotSetTitle(const TQString& title);
void processLastLine();
private:
- QString mLastInput;
+ TQString mLastInput;
CommandScheduler *mScheduler;
bool mModified;
- QListView *mCommandList;
+ TQListView *mCommandList;
- QTextEdit *mInput;
- QTextEdit *mOutput;
- QTextEdit *mResultView;
+ TQTextEdit *mInput;
+ TQTextEdit *mOutput;
+ TQTextEdit *mResultView;
};
#endif // KANDYVIEW_H
diff --git a/kandy/src/main.cpp b/kandy/src/main.cpp
index 9343c1ece..982a1a7f2 100644
--- a/kandy/src/main.cpp
+++ b/kandy/src/main.cpp
@@ -22,7 +22,7 @@
without including the source code for Qt in the source distribution.
*/
-#include <qfile.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <dcopclient.h>
@@ -128,25 +128,25 @@ int main(int argc, char **argv)
}
if (args->count() == 1) {
- k->load(QFile::decodeName(args->arg(0)));
+ k->load(TQFile::decodeName(args->arg(0)));
} else if (args->count() > 1) {
args->usage();
}
args->clear();
- QObject::connect(k,SIGNAL(showMobileWin()),m,SLOT(show()));
- QObject::connect(m,SIGNAL(showTerminalWin()),k,SLOT(show()));
- QObject::connect(m,SIGNAL(showPreferencesWin()),
- k,SLOT(optionsPreferences()));
+ TQObject::connect(k,TQT_SIGNAL(showMobileWin()),m,TQT_SLOT(show()));
+ TQObject::connect(m,TQT_SIGNAL(showTerminalWin()),k,TQT_SLOT(show()));
+ TQObject::connect(m,TQT_SIGNAL(showPreferencesWin()),
+ k,TQT_SLOT(optionsPreferences()));
- QObject::connect( m->view(), SIGNAL( connectModem() ), k,
- SLOT( modemConnect() ) );
- QObject::connect( m->view(), SIGNAL( disconnectModem() ), k,
- SLOT( modemDisconnect() ) );
+ TQObject::connect( m->view(), TQT_SIGNAL( connectModem() ), k,
+ TQT_SLOT( modemConnect() ) );
+ TQObject::connect( m->view(), TQT_SIGNAL( disconnectModem() ), k,
+ TQT_SLOT( modemDisconnect() ) );
- QObject::connect( modem, SIGNAL( errorMessage( const QString & ) ),
- k, SLOT( showErrorMessage( const QString & ) ) );
+ TQObject::connect( modem, TQT_SIGNAL( errorMessage( const TQString & ) ),
+ k, TQT_SLOT( showErrorMessage( const TQString & ) ) );
initModem( modem );
diff --git a/kandy/src/mobilegui.cpp b/kandy/src/mobilegui.cpp
index 374660902..14c828381 100644
--- a/kandy/src/mobilegui.cpp
+++ b/kandy/src/mobilegui.cpp
@@ -24,15 +24,15 @@
#include <time.h>
-#include <qlabel.h>
-#include <qlistview.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qmessagebox.h>
+#include <tqlabel.h>
+#include <tqlistview.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqmessagebox.h>
-#include <qtextedit.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
+#include <tqtextedit.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
#include <kdebug.h>
#include <kfiledialog.h>
@@ -71,8 +71,8 @@ class SyncEntry
class SyncEntryKab : public SyncEntry
{
public:
- SyncEntryKab( bool on, const QString &index, const QString &name,
- const QString &phone )
+ SyncEntryKab( bool on, const TQString &index, const TQString &name,
+ const TQString &phone )
{
mOn = on;
@@ -84,9 +84,9 @@ class SyncEntryKab : public SyncEntry
mPhoneNumberIndex = -1;
}
- QString mIndex;
- QString mName;
- QString mPhone;
+ TQString mIndex;
+ TQString mName;
+ TQString mPhone;
KABC::Addressee mAddressee;
int mKABindex;
@@ -97,8 +97,8 @@ class SyncEntryKab : public SyncEntry
class SyncEntryMobile : public SyncEntry
{
public:
- SyncEntryMobile( bool on, const QString &index, const QString &phone,
- const QString &name )
+ SyncEntryMobile( bool on, const TQString &index, const TQString &phone,
+ const TQString &name )
{
mOn = on;
mToBeDeleted = false;
@@ -108,9 +108,9 @@ class SyncEntryMobile : public SyncEntry
mPhone = phone;
}
- QString mIndex;
- QString mName;
- QString mPhone;
+ TQString mIndex;
+ TQString mName;
+ TQString mPhone;
bool mToBeDeleted;
};
@@ -142,24 +142,24 @@ class AddressSyncer
mCommonEntries.setAutoDelete( true );
}
- QPtrList<SyncEntryKab> mKabEntries;
- QPtrList<SyncEntryMobile> mMobileEntries;
- QPtrList<SyncEntryCommon> mCommonEntries;
+ TQPtrList<SyncEntryKab> mKabEntries;
+ TQPtrList<SyncEntryMobile> mMobileEntries;
+ TQPtrList<SyncEntryCommon> mCommonEntries;
};
class PhoneBookItem : public QCheckListItem
{
public:
- PhoneBookItem( QListView *v ) :
- QCheckListItem( v, "", QCheckListItem::CheckBox )
+ PhoneBookItem( TQListView *v ) :
+ TQCheckListItem( v, "", TQCheckListItem::CheckBox )
{
mSyncEntry = 0;
}
- PhoneBookItem( QListView *v, SyncEntry *syncEntry, const QString &name,
- const QString &phone, const QString &index ) :
- QCheckListItem( v, index, QCheckListItem::CheckBox )
+ PhoneBookItem( TQListView *v, SyncEntry *syncEntry, const TQString &name,
+ const TQString &phone, const TQString &index ) :
+ TQCheckListItem( v, index, TQCheckListItem::CheckBox )
{
mSyncEntry = syncEntry;
@@ -183,7 +183,7 @@ class PhoneBookItem : public QCheckListItem
* TRUE to construct a modal dialog.
*/
MobileGui::MobileGui( CommandScheduler *scheduler, KandyPrefs *kprefs,
- QWidget* parent, const char* name, WFlags fl ) :
+ TQWidget* parent, const char* name, WFlags fl ) :
DCOPObject( "KandyIface" ), MobileGui_base( parent, name, fl )
{
// Setup links to related classes
@@ -220,10 +220,10 @@ MobileGui::MobileGui( CommandScheduler *scheduler, KandyPrefs *kprefs,
setMobState( UNLOADED );
// Setup signal handlers
- connect( mScheduler, SIGNAL( commandProcessed( ATCommand * ) ),
- SLOT( processResult( ATCommand * ) ) );
- connect( mScheduler->modem(), SIGNAL( gotLine( const char * ) ),
- SLOT( termAddOutput( const char * ) ) );
+ connect( mScheduler, TQT_SIGNAL( commandProcessed( ATCommand * ) ),
+ TQT_SLOT( processResult( ATCommand * ) ) );
+ connect( mScheduler->modem(), TQT_SIGNAL( gotLine( const char * ) ),
+ TQT_SLOT( termAddOutput( const char * ) ) );
}
@@ -282,7 +282,7 @@ void MobileGui::readPhonebook()
mComingFromReadPhonebook = true;
if ( !warnMobState( LOADED ) ) {
mComingFromReadPhonebook = false;
- QString tmp = "";
+ TQString tmp = "";
ATCommand *cmd = new ATCommand( "+cpbr=" );
cmd->setAutoDelete( true );
@@ -345,13 +345,13 @@ void MobileGui::writePhonebook()
for ( uint i = 0; i < mSyncer->mMobileEntries.count(); i++ ) {
SyncEntryMobile *entry = mSyncer->mMobileEntries.at( i );
- QString id;
+ TQString id;
// Only process changed items of the mobile phonebook in
// order to save time.
if ( entry->mToBeUpdated || entry->mToBeInserted ) {
- QString tmp = "";
+ TQString tmp = "";
if ( entry->mToBeUpdated ) {
@@ -403,7 +403,7 @@ void MobileGui::writePhonebook()
if ( !mPBIndexOccupied[ theIndex - mPBStartIndex ] ) {
// Index of item to be deleted still is 0, so that index position
// wasn't reused. We must delete it explicitly.
- QString id = "+cpbw=" + entry->mIndex;
+ TQString id = "+cpbw=" + entry->mIndex;
mLastWriteId = id;
@@ -441,7 +441,7 @@ void MobileGui::writePhonebookPostProcessing()
} else
if ( mComingFromReadPhonebook ) {
mComingFromReadPhonebook = false;
- QString tmp = "";
+ TQString tmp = "";
ATCommand *cmd = new ATCommand( "+cpbr=" );
cmd->setAutoDelete( true );
@@ -463,7 +463,7 @@ void MobileGui::writePhonebookPostProcessing()
void MobileGui::setClock()
{
char *timeStr = new char[50];
- QString id = "+cclk=";
+ TQString id = "+cclk=";
ATCommand *cmd = new ATCommand( id );
@@ -474,7 +474,7 @@ void MobileGui::setClock()
struct tm *theTime = localtime( &tloc );
strftime( timeStr, 50, "%y/%m/%d,%T+00", theTime );
- QString Time = timeStr;
+ TQString Time = timeStr;
cmd->addParameter( new ATParameter( quote( Time ) ) );
mScheduler->execute( cmd );
@@ -500,7 +500,7 @@ void MobileGui::readKabc()
for ( it = addressBook->begin(); it != addressBook->end();
it++, kabIndex++ ) {
- QString index, name;
+ TQString index, name;
KABC::PhoneNumber phoneNumber;
KABC::PhoneNumber::List phoneNumbers = (*it).phoneNumbers();
KABC::PhoneNumber::List::Iterator it2;
@@ -512,7 +512,7 @@ void MobileGui::readKabc()
it2++, phoneNumberIndex++ ) {
bool excludeNumber = false;
phoneNumber = (*it2);
- QString phone = phoneNumber.number();
+ TQString phone = phoneNumber.number();
if ( (*mPrefs).excludeHome() &&
@@ -646,15 +646,15 @@ void MobileGui::readKabc()
}
-QString MobileGui::decodeSuffix( const QString &suffix )
+TQString MobileGui::decodeSuffix( const TQString &suffix )
{
- QString theSuffix = suffix;
+ TQString theSuffix = suffix;
// Check whether suffix is quoted. If so, it should be interpreted
// as Hex-Number of a special GSM character.
if ( ( theSuffix.left( 1 ) == "\"" ) && ( theSuffix.right( 1 ) == "\"" ) ) {
- QString tmp = "";
+ TQString tmp = "";
char suffixNumber = (char) dequote( suffix ).toUInt( 0, 16 );
tmp += suffixNumber;
@@ -665,9 +665,9 @@ QString MobileGui::decodeSuffix( const QString &suffix )
}
-void MobileGui::formatPBName( QString *name, QString suffix )
+void MobileGui::formatPBName( TQString *name, TQString suffix )
{
- QString theSuffix = decodeSuffix( suffix );
+ TQString theSuffix = decodeSuffix( suffix );
if ( name->length() + theSuffix.length() > mPBNameLength ) {
@@ -684,7 +684,7 @@ void MobileGui::formatPBName( QString *name, QString suffix )
}
-QString MobileGui::stripWhiteSpaces( const QString &theString )
+TQString MobileGui::stripWhiteSpaces( const TQString &theString )
{
int pos = 0;
int len = theString.length();
@@ -726,7 +726,7 @@ void MobileGui::writeKabc()
for ( uint i = 0; i < mSyncer->mKabEntries.count(); i++ ) {
SyncEntryKab *kabEntry = mSyncer->mKabEntries.at( i );
- QString phoneNumber = kabEntry->mPhone;
+ TQString phoneNumber = kabEntry->mPhone;
if ( kabEntry->mToBeUpdated ) {
@@ -751,7 +751,7 @@ void MobileGui::writeKabc()
bool goon = true;
KABC::AddressBook::Iterator it;
bool equivalentEntryFound = false;
- QString name = kabEntry->mName;
+ TQString name = kabEntry->mName;
//
@@ -759,7 +759,7 @@ void MobileGui::writeKabc()
// If a suffix is found, remove it from the name.
//
if ( goon && (*mPrefs).useHomeSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).homeSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).homeSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Home;
name = stripWhiteSpaces(
@@ -768,7 +768,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useWorkSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).workSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).workSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Work;
name = stripWhiteSpaces(
@@ -777,7 +777,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useMessagingSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).messagingSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).messagingSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Msg;
name = stripWhiteSpaces(
@@ -786,7 +786,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useFaxSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).faxSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).faxSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Fax;
name = stripWhiteSpaces(
@@ -795,7 +795,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useCellSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).cellSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).cellSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Cell;
name = stripWhiteSpaces(
@@ -804,7 +804,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useVideoSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).videoSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).videoSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Video;
name = stripWhiteSpaces(
@@ -813,7 +813,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useMailboxSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).mailboxSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).mailboxSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Bbs;
name = stripWhiteSpaces(
@@ -822,7 +822,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useModemSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).modemSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).modemSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Modem;
name = stripWhiteSpaces(
@@ -831,7 +831,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useCarSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).carSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).carSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Car;
name = stripWhiteSpaces(
@@ -840,7 +840,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).useISDNSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).iSDNSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).iSDNSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Isdn;
name = stripWhiteSpaces(
@@ -849,7 +849,7 @@ void MobileGui::writeKabc()
}
}
if ( goon && (*mPrefs).usePagerSuff() ) {
- QString theSuffix = decodeSuffix( (*mPrefs).pagerSuff() );
+ TQString theSuffix = decodeSuffix( (*mPrefs).pagerSuff() );
if ( name.right( theSuffix.length() ) == theSuffix ) {
phoneType = KABC::PhoneNumber::Pager;
name = stripWhiteSpaces(
@@ -865,7 +865,7 @@ void MobileGui::writeKabc()
//
for ( it = addressBook->begin(); it != addressBook->end(); it++ ) {
- QString kabName = (*it).familyName();
+ TQString kabName = (*it).familyName();
KABC::AddressBook::Iterator it3;
KABC::Addressee::List tmp;
bool firstCharIsUnique = true;
@@ -916,15 +916,15 @@ void MobileGui::writeKabc()
if ( !equivalentEntryFound ) {
KABC::Addressee entry;
- QStringList *fields = new QStringList;
+ TQStringList *fields = new QStringList;
- *fields = QStringList::split( ',', name );
+ *fields = TQStringList::split( ',', name );
if ( fields->count() > 1 ) {
// Name string contains comma separated entry so that we
// need to build family and given names out of them.
- QString givenName = "";
+ TQString givenName = "";
entry.setFamilyName( stripWhiteSpaces( (*fields)[ 0 ] ) );
@@ -985,8 +985,8 @@ void MobileGui::processResult( ATCommand *command )
else
if ( command->id() == "+cpbr=?" )
{
- QStringList tmpList = QStringList::split( "-", command->resultField( 0 ) );
- QString tmpString = tmpList.first().right( tmpList.first().length() - 1 );
+ TQStringList tmpList = TQStringList::split( "-", command->resultField( 0 ) );
+ TQString tmpString = tmpList.first().right( tmpList.first().length() - 1 );
mPBStartIndex = tmpString.toUInt();
mPBNameLength = command->resultField( 2 ).toUInt();
} else
@@ -1010,13 +1010,13 @@ void MobileGui::processResult( ATCommand *command )
writePhonebookPostProcessing();
else
if ( command->id() == "+cpbs=?" ) {
- QPtrList<QStringList> *list = command->resultFields();
- QStringList *fields = list->first();
+ TQPtrList<TQStringList> *list = command->resultFields();
+ TQStringList *fields = list->first();
while( fields ) {
for ( unsigned int i = 0; i < fields->count(); i++ ) {
- QString memory = dequote( (*fields)[ i ] );
+ TQString memory = dequote( (*fields)[ i ] );
if ( memory == "FD" )
@@ -1051,9 +1051,9 @@ void MobileGui::processResult( ATCommand *command )
}
-QString MobileGui::noSpaces( const QString &theString )
+TQString MobileGui::noSpaces( const TQString &theString )
{
- QString result = "";
+ TQString result = "";
for ( unsigned int i = 0; i < theString.length(); i++ )
@@ -1083,9 +1083,9 @@ int MobileGui::firstFreeIndex()
}
-QString MobileGui::string2GSM( const QString &theString )
+TQString MobileGui::string2GSM( const TQString &theString )
{
- QString result = "";
+ TQString result = "";
for ( unsigned int i = 0; i < theString.length(); i++ )
@@ -1107,9 +1107,9 @@ QString MobileGui::string2GSM( const QString &theString )
}
-QString MobileGui::GSM2String( const QString &theString )
+TQString MobileGui::GSM2String( const TQString &theString )
{
- QString result = "";
+ TQString result = "";
for ( unsigned int i = 0; i < theString.length(); i++ )
@@ -1135,17 +1135,17 @@ void MobileGui::fillPhonebook( ATCommand *cmd )
{
mSyncer->mMobileEntries.clear();
- QPtrList<QStringList> *list = cmd->resultFields();
- QStringList *fields = list->first();
+ TQPtrList<TQStringList> *list = cmd->resultFields();
+ TQStringList *fields = list->first();
while( fields ) {
if ( fields->count() != 4 )
kdDebug() << "Error! Unexpected number of address fields." << endl;
else {
- QString index = (*fields)[0];
- QString phone = (*fields)[1];
- QString type = (*fields)[2];
- QString name = GSM2String( (*fields)[3] );
+ TQString index = (*fields)[0];
+ TQString phone = (*fields)[1];
+ TQString type = (*fields)[2];
+ TQString name = GSM2String( (*fields)[3] );
SyncEntryMobile *phoneEntry = new SyncEntryMobile( true, dequote( index ),
dequote( phone ),
@@ -1166,7 +1166,7 @@ void MobileGui::fillPhonebook( ATCommand *cmd )
}
-QString MobileGui::quote( const QString &str )
+TQString MobileGui::quote( const TQString &str )
{
if ( ( str.left(1) == "\"" ) && ( str.right(1) == "\"" ) )
return str;
@@ -1175,7 +1175,7 @@ QString MobileGui::quote( const QString &str )
}
-QString MobileGui::dequote( const QString &str )
+TQString MobileGui::dequote( const TQString &str )
{
int pos = 0;
int len = str.length();
@@ -1198,11 +1198,11 @@ void MobileGui::savePhonebook()
if ( mMobState == UNLOADED )
return;
- QString fileName = KFileDialog::getSaveFileName( "phonebook.csv" );
- QFile outFile( fileName );
+ TQString fileName = KFileDialog::getSaveFileName( "phonebook.csv" );
+ TQFile outFile( fileName );
if ( outFile.open( IO_WriteOnly ) ) {
- QTextStream t( &outFile ); // use a text stream
+ TQTextStream t( &outFile ); // use a text stream
for( uint i = 0; i < mSyncer->mMobileEntries.count(); i++) {
SyncEntryMobile *e = mSyncer->mMobileEntries.at( i );
@@ -1310,16 +1310,16 @@ void MobileGui::mergePhonebooks()
} else {
// Conflict: 2 Entries have same name but different numbers.
// Prompt user.
- QString text = "<qt><b>" + i18n( "Kab Entry:" ) + "</b><br>";
+ TQString text = "<qt><b>" + i18n( "Kab Entry:" ) + "</b><br>";
text += " " + theCommonEntry->mKabEntry->mName + " " +
theCommonEntry->mKabEntry->mPhone + "<br>";
text += "<b>" + i18n( "Mobile Entry:" ) + "</b><br>";
text += " " + mobileEntry->mName + " " + mobileEntry->mPhone;
text += "</qt>";
- QMessageBox *msg =
- new QMessageBox( i18n( "Conflicting Entries" ), text,
- QMessageBox::Warning, 1, 2, 0, this );
+ TQMessageBox *msg =
+ new TQMessageBox( i18n( "Conflicting Entries" ), text,
+ TQMessageBox::Warning, 1, 2, 0, this );
msg->setButtonText( 1, i18n( "Use Kab Entry" ) );
msg->setButtonText( 2, i18n( "Use Mobile Entry" ) );
@@ -1560,12 +1560,12 @@ void MobileGui::setKabState( ABState newState )
void MobileGui::warnKabState( ABState newState )
{
if ( ( mKabState == MODIFIED ) && ( newState != MODIFIED ) ) {
- QString text = "<qt><b>" + i18n( "Warning" ) + "</b><br>";
+ TQString text = "<qt><b>" + i18n( "Warning" ) + "</b><br>";
text += i18n( "The KDE address book contains unsaved changes." ) +
"<br></qt>";
- QMessageBox *msg = new QMessageBox( i18n( "Unsaved Changes" ), text,
- QMessageBox::Critical, 1, 2, 0, this );
+ TQMessageBox *msg = new TQMessageBox( i18n( "Unsaved Changes" ), text,
+ TQMessageBox::Critical, 1, 2, 0, this );
msg->setButtonText( 1, i18n( "Save" ) );
msg->setButtonText( 2, i18n( "Discard" ) );
@@ -1645,12 +1645,12 @@ bool MobileGui::warnMobState( ABState newState )
{
if ( ( mMobState == MODIFIED ) && ( newState != MODIFIED ) )
{
- QString text = "<qt><b>" + i18n( "Warning" ) + "</b><br>";
+ TQString text = "<qt><b>" + i18n( "Warning" ) + "</b><br>";
text += i18n( "The mobile phone book contains unsaved changes." ) +
"<br></qt>";
- QMessageBox *msg = new QMessageBox( i18n( "Unsaved Changes" ), text,
- QMessageBox::Critical, 1, 2, 0, this );
+ TQMessageBox *msg = new TQMessageBox( i18n( "Unsaved Changes" ), text,
+ TQMessageBox::Critical, 1, 2, 0, this );
msg->setButtonText( 1, i18n( "Save" ) );
msg->setButtonText( 2, i18n( "Discard" ) );
diff --git a/kandy/src/mobilegui.h b/kandy/src/mobilegui.h
index b3dbd33ff..2d0f3b073 100644
--- a/kandy/src/mobilegui.h
+++ b/kandy/src/mobilegui.h
@@ -28,7 +28,7 @@
#include "mobilegui_base.h"
#include "kandyprefs.h"
-#include "qvaluevector.h"
+#include "tqvaluevector.h"
class CommandScheduler;
@@ -41,18 +41,18 @@ class MobileGui : public MobileGui_base, virtual public KandyIface
Q_OBJECT
public:
- MobileGui( CommandScheduler *, KandyPrefs *kprefs, QWidget* parent=0,
+ MobileGui( CommandScheduler *, KandyPrefs *kprefs, TQWidget* parent=0,
const char* name=0, WFlags fl=0 );
~MobileGui();
void exit();
signals:
- void sendCommand( const QString & );
+ void sendCommand( const TQString & );
void phonebookRead();
- void statusMessage( const QString & );
- void transientStatusMessage( const QString & );
+ void statusMessage( const TQString & );
+ void transientStatusMessage( const TQString & );
void connectModem();
void disconnectModem();
@@ -79,18 +79,18 @@ class MobileGui : public MobileGui_base, virtual public KandyIface
CommandScheduler *mScheduler;
AddressSyncer *mSyncer;
KandyPrefs *mPrefs;
- QWidget *mparent;
+ TQWidget *mparent;
/* String Formatting Routines */
- QString quote( const QString & );
- QString dequote( const QString & );
- void formatPBName( QString *, QString );
- QString noSpaces( const QString & );
+ TQString quote( const TQString & );
+ TQString dequote( const TQString & );
+ void formatPBName( TQString *, TQString );
+ TQString noSpaces( const TQString & );
int firstFreeIndex();
- QString string2GSM( const QString & );
- QString GSM2String( const QString & );
- QString decodeSuffix( const QString & );
- QString stripWhiteSpaces( const QString & );
+ TQString string2GSM( const TQString & );
+ TQString GSM2String( const TQString & );
+ TQString decodeSuffix( const TQString & );
+ TQString stripWhiteSpaces( const TQString & );
/* Routines for GUI updates */
void updateKabBook();
@@ -98,12 +98,12 @@ class MobileGui : public MobileGui_base, virtual public KandyIface
void disconnectGUI();
/* Phone specific items */
- QString mMobManufacturer;
- QString mMobModel;
+ TQString mMobManufacturer;
+ TQString mMobModel;
unsigned int mPBStartIndex;
unsigned int mPBLength;
unsigned int mPBNameLength;
- QValueVector<bool> mPBIndexOccupied;
+ TQValueVector<bool> mPBIndexOccupied;
bool mMobHasFD;
bool mMobHasLD;
bool mMobHasME;
@@ -114,7 +114,7 @@ class MobileGui : public MobileGui_base, virtual public KandyIface
bool mMobHasRC;
/* Routines and Flags for asynchronous control flow */
- QString mLastWriteId;
+ TQString mLastWriteId;
bool mComingFromToggleConnection;
bool mComingFromReadPhonebook;
bool mComingFromSyncPhonebooks;
diff --git a/kandy/src/mobilemain.cpp b/kandy/src/mobilemain.cpp
index 118ee7f4e..6143dec7b 100644
--- a/kandy/src/mobilemain.cpp
+++ b/kandy/src/mobilemain.cpp
@@ -39,7 +39,7 @@
#include <kaction.h>
#include <kstdaction.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include "mobilegui.h"
@@ -55,10 +55,10 @@ MobileMain::MobileMain(CommandScheduler *scheduler, KandyPrefs *prefs)
setupActions();
statusBar()->insertItem(i18n(" Disconnected "),1,0,true);
- connect(mView,SIGNAL(statusMessage(const QString &)),
- SLOT(showStatusMessage(const QString &)));
- connect(mView,SIGNAL(transientStatusMessage(const QString &)),
- SLOT(showTransientStatusMessage(const QString &)));
+ connect(mView,TQT_SIGNAL(statusMessage(const TQString &)),
+ TQT_SLOT(showStatusMessage(const TQString &)));
+ connect(mView,TQT_SIGNAL(transientStatusMessage(const TQString &)),
+ TQT_SLOT(showTransientStatusMessage(const TQString &)));
statusBar()->show();
@@ -71,17 +71,17 @@ MobileMain::~MobileMain()
void MobileMain::setupActions()
{
- KStdAction::quit(this, SLOT(close()), actionCollection());
+ KStdAction::quit(this, TQT_SLOT(close()), actionCollection());
- new KAction(i18n("Terminal"),0,this,SLOT(showTerminal()),
+ new KAction(i18n("Terminal"),0,this,TQT_SLOT(showTerminal()),
actionCollection(),"show_terminal");
createStandardStatusBarAction();
setStandardToolBarMenuEnabled(true);
- KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection());
- KStdAction::preferences(this, SLOT(optionsPreferences()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
+ KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(optionsPreferences()), actionCollection());
createGUI("kandymobileui.rc");
}
@@ -101,7 +101,7 @@ void MobileMain::readProperties(KConfig */*config*/)
// in 'saveProperties'
}
-void MobileMain::dragEnterEvent(QDragEnterEvent *event)
+void MobileMain::dragEnterEvent(TQDragEnterEvent *event)
{
// do nothing
KMainWindow::dragEnterEvent(event);
@@ -110,7 +110,7 @@ void MobileMain::dragEnterEvent(QDragEnterEvent *event)
// event->accept(KURLDrag::canDecode(event));
}
-void MobileMain::dropEvent(QDropEvent *event)
+void MobileMain::dropEvent(TQDropEvent *event)
{
// this is a very simplistic implementation of a drop event. we
// will only accept a dropped URL. the Qt dnd code can do *much*
@@ -130,7 +130,7 @@ void MobileMain::optionsConfigureToolbars()
// use the standard toolbar editor
saveMainWindowSettings( KGlobal::config(), autoSaveGroup() );
KEditToolbar dlg(actionCollection());
- connect(&dlg, SIGNAL(newToolbarConfig()), this, SLOT(newToolbarConfig()));
+ connect(&dlg, TQT_SIGNAL(newToolbarConfig()), this, TQT_SLOT(newToolbarConfig()));
dlg.exec();
}
@@ -146,19 +146,19 @@ void MobileMain::optionsPreferences()
emit showPreferencesWin();
}
-void MobileMain::showStatusMessage(const QString& text)
+void MobileMain::showStatusMessage(const TQString& text)
{
// display the text on the statusbar
statusBar()->message(text);
}
-void MobileMain::showTransientStatusMessage(const QString& text)
+void MobileMain::showTransientStatusMessage(const TQString& text)
{
// display the text on the statusbar for 2 s.
statusBar()->message(text,2000);
}
-void MobileMain::changeCaption(const QString& text)
+void MobileMain::changeCaption(const TQString& text)
{
// display the text on the caption
setCaption(text);
diff --git a/kandy/src/mobilemain.h b/kandy/src/mobilemain.h
index 091d0de0e..46c8bc576 100644
--- a/kandy/src/mobilemain.h
+++ b/kandy/src/mobilemain.h
@@ -67,8 +67,8 @@ class MobileMain : public KMainWindow
/**
* Overridden virtuals for Qt drag 'n drop (XDND)
*/
- virtual void dragEnterEvent(QDragEnterEvent *event);
- virtual void dropEvent(QDropEvent *event);
+ virtual void dragEnterEvent(TQDragEnterEvent *event);
+ virtual void dropEvent(TQDropEvent *event);
bool queryClose();
@@ -94,9 +94,9 @@ class MobileMain : public KMainWindow
void optionsPreferences();
void newToolbarConfig();
- void showStatusMessage(const QString& text);
- void showTransientStatusMessage(const QString& text);
- void changeCaption(const QString& text);
+ void showStatusMessage(const TQString& text);
+ void showTransientStatusMessage(const TQString& text);
+ void changeCaption(const TQString& text);
private:
diff --git a/kandy/src/modem.cpp b/kandy/src/modem.cpp
index 3341ad589..a7d246950 100644
--- a/kandy/src/modem.cpp
+++ b/kandy/src/modem.cpp
@@ -40,7 +40,7 @@
#include <pwd.h>
#include <errno.h>
-#include <qglobal.h>
+#include <tqglobal.h>
#include <klocale.h>
#include <kdebug.h>
@@ -74,16 +74,16 @@
-Modem::Modem( KandyPrefs *kprefs, QObject *parent, const char *name ) :
- QObject(parent, name)
+Modem::Modem( KandyPrefs *kprefs, TQObject *parent, const char *name ) :
+ TQObject(parent, name)
{
mOpen = false;
prefs = kprefs;
- timer = new QTimer( this, "modemtimer" );
+ timer = new TQTimer( this, "modemtimer" );
Q_CHECK_PTR( timer );
- connect( timer, SIGNAL( timeout() ), SLOT( timerDone() ) );
+ connect( timer, TQT_SIGNAL( timeout() ), TQT_SLOT( timerDone() ) );
init();
xreset();
@@ -191,7 +191,7 @@ bool Modem::open()
if ( !lockDevice() )
return false;
- QCString dev = QFile::encodeName( (*prefs).serialDevice() );
+ TQCString dev = TQFile::encodeName( (*prefs).serialDevice() );
const char *fdev = dev.data();
if ( ( fd = ::open( fdev, O_RDWR | O_NOCTTY | O_NONBLOCK ) ) == -1 ) {
emit errorMessage( i18n( "Unable to open device '%1'. "
@@ -226,10 +226,10 @@ bool Modem::open()
return false;
}
- sn = new QSocketNotifier( fd, QSocketNotifier::Read, this,
+ sn = new TQSocketNotifier( fd, TQSocketNotifier::Read, this,
"modemsocketnotifier" );
Q_CHECK_PTR( sn );
- connect( sn, SIGNAL( activated( int ) ), SLOT( readChar( int ) ) );
+ connect( sn, TQT_SIGNAL( activated( int ) ), TQT_SLOT( readChar( int ) ) );
mOpen = true;
@@ -287,17 +287,17 @@ bool Modem::lockDevice()
pid_t pid;
int lfd;
struct passwd *pw;
- QStringList pathList;
- QString fileName, content;
+ TQStringList pathList;
+ TQString fileName, content;
- pathList = QStringList::split( "/", (*prefs).serialDevice() );
+ pathList = TQStringList::split( "/", (*prefs).serialDevice() );
fileName = (*prefs).lockDirectory() + "/LCK.." + pathList.last();
- if ( !access( QFile::encodeName( fileName ).data(), F_OK ) ) {
+ if ( !access( TQFile::encodeName( fileName ).data(), F_OK ) ) {
char buf[256];
- if ( ( lfd = ::open( QFile::encodeName( fileName ), O_RDONLY ) ) < 0 ) {
+ if ( ( lfd = ::open( TQFile::encodeName( fileName ), O_RDONLY ) ) < 0 ) {
emit errorMessage( i18n( "Unable to open lock file '%1'.")
.arg( fileName ) );
return false;
@@ -333,7 +333,7 @@ bool Modem::lockDevice()
}
}
- if ( ( lfd = creat( QFile::encodeName( fileName ).data(), 0644 ) ) == -1 ) {
+ if ( ( lfd = creat( TQFile::encodeName( fileName ).data(), 0644 ) ) == -1 ) {
emit errorMessage( i18n( "Unable to create lock file '%1'. "
"Please check that you have sufficient permissions.")
.arg( fileName ) );
@@ -343,7 +343,7 @@ bool Modem::lockDevice()
pid = (int) getpid();
pw = getpwuid( getuid() );
content.sprintf( "%08d %s %s", pid, "kandy", pw->pw_name );
- write( lfd, QFile::encodeName( content ).data(), content.length() );
+ write( lfd, TQFile::encodeName( content ).data(), content.length() );
::close( lfd );
is_locked = true;
@@ -359,9 +359,9 @@ void Modem::unlockDevice()
dev_unlock( (*prefs).serialDevice().local8Bit(), getpid() );
#else
if ( is_locked ) {
- QStringList pathList = QStringList::split( "/", (*prefs).serialDevice() );
+ TQStringList pathList = TQStringList::split( "/", (*prefs).serialDevice() );
- QFile::remove( (*prefs).lockDirectory() + "/LCK.." + pathList.last() );
+ TQFile::remove( (*prefs).lockDirectory() + "/LCK.." + pathList.last() );
is_locked = false;
}
#endif
@@ -438,7 +438,7 @@ void Modem::timerStart( int msec )
void Modem::receiveXModem( bool crc )
{
disconnect( sn, 0, this, 0 );
- connect( sn, SIGNAL( activated( int ) ), SLOT( readXChar( int ) ) );
+ connect( sn, TQT_SIGNAL( activated( int ) ), TQT_SLOT( readXChar( int ) ) );
xcrc = crc;
@@ -664,7 +664,7 @@ void Modem::xreset()
if ( sn ) {
disconnect( sn, 0, this, 0 );
- connect( sn, SIGNAL( activated( int ) ), SLOT( readChar( int ) ) );
+ connect( sn, TQT_SIGNAL( activated( int ) ), TQT_SLOT( readChar( int ) ) );
}
}
diff --git a/kandy/src/modem.h b/kandy/src/modem.h
index ecb0cfe91..52321894f 100644
--- a/kandy/src/modem.h
+++ b/kandy/src/modem.h
@@ -32,11 +32,11 @@
#include <termios.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qtimer.h>
-#include <qsocketnotifier.h>
-#include <qfile.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqtimer.h>
+#include <tqsocketnotifier.h>
+#include <tqfile.h>
#include "kandyprefs.h"
@@ -47,7 +47,7 @@ class Modem : public QObject
{
Q_OBJECT
public:
- Modem(KandyPrefs *kprefs, QObject *parent = 0, const char *name = 0);
+ Modem(KandyPrefs *kprefs, TQObject *parent = 0, const char *name = 0);
virtual ~Modem();
void setSpeed(int speed);
@@ -98,8 +98,8 @@ private:
tcflag_t cflag;
int fd;
- QTimer *timer;
- QSocketNotifier *sn;
+ TQTimer *timer;
+ TQSocketNotifier *sn;
uchar buffer[1024];
int bufpos;
@@ -117,7 +117,7 @@ signals:
void xmodemDone(bool);
void timeout();
- void errorMessage( const QString & );
+ void errorMessage( const TQString & );
};