diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-13 00:46:47 +0000 |
commit | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (patch) | |
tree | 5f52a9eada2e9f3654fc327d7c14dfef570a6ecb /kandy/src | |
parent | 2ee4bf4fd5eff93b2fbef0ff8e8063edffc5da5c (diff) | |
download | tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.tar.gz tdepim-67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7.zip |
Initial conversion of kdepim to TQt
This will probably require some tweaking before it will build under Qt4,
however Qt3 builds are OK. Any alterations this commit makes to kdepim
behaviour under Qt3 are unintentional and should be fixed.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227832 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kandy/src')
28 files changed, 172 insertions, 164 deletions
diff --git a/kandy/src/atcommand.cpp b/kandy/src/atcommand.cpp index 87a2cfdc8..e43814b43 100644 --- a/kandy/src/atcommand.cpp +++ b/kandy/src/atcommand.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include "atcommand.h" @@ -112,7 +112,7 @@ TQString ATCommand::cmdString() TQString ATCommand::cmd() { if (mParameters.count() > 0) { - TQString cmd = cmdString().left(cmdString().find("=") + 1); + TQString cmd = cmdString().left(cmdString().tqfind("=") + 1); // kdDebug() << "--1-cmd: " << cmd << endl; for(uint i=0;i<mParameters.count();++i) { cmd += mParameters.at(i)->value(); @@ -157,7 +157,7 @@ void ATCommand::setResultString(const TQString &resultString) void ATCommand::setResultFields( TQString fieldsString ) { - TQString id = mId.upper().left( mId.find( '=' ) ); + TQString id = mId.upper().left( mId.tqfind( '=' ) ); // Truncate the command name prepended to the output by the modem. @@ -267,7 +267,7 @@ void ATCommand::setParameter(int index,int value) TQString ATCommand::processOutput(const TQString &output) { if (hexOutput()) { - TQString hexString = output.mid(output.find('\n')+1); + TQString hexString = output.mid(output.tqfind('\n')+1); int i=0; TQString aChar = hexString.mid(i,2); TQString result; @@ -295,7 +295,7 @@ void ATCommand::extractParameters() { // kdDebug() << "Arg String: " << cmdString() << endl; - int pos = cmdString().find("="); + int pos = cmdString().tqfind("="); if (pos < 0) return; TQString paraString = cmdString().mid(pos+1); diff --git a/kandy/src/atcommand.h b/kandy/src/atcommand.h index f8f8f6a3f..4e6e864a9 100644 --- a/kandy/src/atcommand.h +++ b/kandy/src/atcommand.h @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #ifndef ATCOMMAND_H #define ATCOMMAND_H diff --git a/kandy/src/cmdpropertiesdialog.cpp b/kandy/src/cmdpropertiesdialog.cpp index f9667c268..b71a62f2f 100644 --- a/kandy/src/cmdpropertiesdialog.cpp +++ b/kandy/src/cmdpropertiesdialog.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include <tqlistview.h> @@ -36,8 +36,8 @@ class ParameterItem : public TQCheckListItem { public: - ParameterItem(ATParameter *p,TQListView *parent) : - TQCheckListItem(parent,p->name(),CheckBox),mParameter(p) + ParameterItem(ATParameter *p,TQListView *tqparent) : + TQCheckListItem(tqparent,p->name(),CheckBox),mParameter(p) { setText(1,p->value()); setOn(p->userInput()); @@ -56,16 +56,16 @@ class ParameterItem : public TQCheckListItem { /* - * Constructs a CmdPropertiesDialog which is a child of 'parent', with the + * Constructs a CmdPropertiesDialog which is a child of 'tqparent', with the * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -CmdPropertiesDialog::CmdPropertiesDialog(ATCommand *cmd, TQWidget* parent, +CmdPropertiesDialog::CmdPropertiesDialog(ATCommand *cmd, TQWidget* tqparent, const char* name, bool modal, WFlags fl ) - : CmdPropertiesDialog_base( parent, name, modal, fl ) + : CmdPropertiesDialog_base( tqparent, name, modal, fl ) { mCmd = cmd; @@ -105,7 +105,7 @@ void CmdPropertiesDialog::editParameterName(TQListViewItem *item) { bool ok = false; - TQString newName = KInputDialog::getText(TQString::null, + TQString newName = KInputDialog::getText(TQString(), i18n("Enter parameter name:"),item->text(0),&ok,this); if (ok) { diff --git a/kandy/src/cmdpropertiesdialog.h b/kandy/src/cmdpropertiesdialog.h index ee37852aa..052425153 100644 --- a/kandy/src/cmdpropertiesdialog.h +++ b/kandy/src/cmdpropertiesdialog.h @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #ifndef CMDPROPERTIESDIALOG_H #define CMDPROPERTIESDIALOG_H @@ -31,8 +31,9 @@ class ATCommand; class CmdPropertiesDialog : public CmdPropertiesDialog_base { Q_OBJECT + TQ_OBJECT public: - CmdPropertiesDialog(ATCommand *cmd,TQWidget* parent=0,const char* name=0, + CmdPropertiesDialog(ATCommand *cmd,TQWidget* tqparent=0,const char* name=0, bool modal=false,WFlags fl=0); ~CmdPropertiesDialog(); diff --git a/kandy/src/cmdpropertiesdialog_base.ui b/kandy/src/cmdpropertiesdialog_base.ui index 7231a6bee..57359e3e2 100644 --- a/kandy/src/cmdpropertiesdialog_base.ui +++ b/kandy/src/cmdpropertiesdialog_base.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>CmdPropertiesDialog_base</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>CmdPropertiesDialog_base</cstring> </property> @@ -28,17 +28,17 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="3"> + <widget class="TQLineEdit" row="0" column="1" rowspan="1" colspan="3"> <property name="name"> <cstring>mNameEdit</cstring> </property> </widget> - <widget class="QLineEdit" row="1" column="1" rowspan="1" colspan="3"> + <widget class="TQLineEdit" row="1" column="1" rowspan="1" colspan="3"> <property name="name"> <cstring>mStringEdit</cstring> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -46,7 +46,7 @@ <string>Name:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -54,7 +54,7 @@ <string>String:</string> </property> </widget> - <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="4"> + <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>mHexCheck</cstring> </property> @@ -62,7 +62,7 @@ <string>Hex result</string> </property> </widget> - <widget class="QListView" row="2" column="0" rowspan="1" colspan="4"> + <widget class="TQListView" row="2" column="0" rowspan="1" colspan="4"> <column> <property name="text"> <string>Position</string> @@ -117,7 +117,7 @@ </size> </property> </spacer> - <widget class="QPushButton" row="4" column="2"> + <widget class="TQPushButton" row="4" column="2"> <property name="name"> <cstring>buttonOk</cstring> </property> @@ -131,7 +131,7 @@ <bool>true</bool> </property> </widget> - <widget class="QPushButton" row="4" column="3"> + <widget class="TQPushButton" row="4" column="3"> <property name="name"> <cstring>buttonCancel</cstring> </property> @@ -164,9 +164,9 @@ <slot>reject()</slot> </connection> </connections> -<slots> +<Q_SLOTS> <slot>editParameterName(QListViewItem *)</slot> <slot access="protected">slotAccept()</slot> -</slots> +</Q_SLOTS> <tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kandy/src/commanditem.cpp b/kandy/src/commanditem.cpp index 4785e89ff..f8eceb2c9 100644 --- a/kandy/src/commanditem.cpp +++ b/kandy/src/commanditem.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include <tqdom.h> @@ -70,13 +70,13 @@ void CommandItem::load(TQDomElement *c) setItemText(); } -void CommandItem::save(TQDomDocument *doc,TQDomElement *parent) +void CommandItem::save(TQDomDocument *doc,TQDomElement *tqparent) { 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); + tqparent->appendChild(c); TQPtrList<ATParameter> paras = mCommand->parameters(); for(uint i=0;i<paras.count();++i) { @@ -85,13 +85,13 @@ void CommandItem::save(TQDomDocument *doc,TQDomElement *parent) } void CommandItem::saveParameter(ATParameter *p, TQDomDocument *doc, - TQDomElement *parent) + TQDomElement *tqparent) { TQDomElement e = doc->createElement("parameter"); e.setAttribute("name",p->name()); e.setAttribute("value",p->value()); e.setAttribute("userinput",p->userInput() ? "y" : "n"); - parent->appendChild(e); + tqparent->appendChild(e); } void CommandItem::setItemText() diff --git a/kandy/src/commanditem.h b/kandy/src/commanditem.h index 39d4a8216..d92c9e744 100644 --- a/kandy/src/commanditem.h +++ b/kandy/src/commanditem.h @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #ifndef _COMMAND_ITEM_H_ @@ -43,12 +43,12 @@ class CommandItem : public TQListViewItem { ATCommand *command(); void load(TQDomElement *c); - void save(TQDomDocument *doc,TQDomElement *parent); + void save(TQDomDocument *doc,TQDomElement *tqparent); void setItemText(); protected: - void saveParameter(ATParameter *p, TQDomDocument *doc,TQDomElement *parent); + void saveParameter(ATParameter *p, TQDomDocument *doc,TQDomElement *tqparent); private: ATCommand *mCommand; diff --git a/kandy/src/commandscheduler.cpp b/kandy/src/commandscheduler.cpp index bef11cac8..3a1001ed3 100644 --- a/kandy/src/commandscheduler.cpp +++ b/kandy/src/commandscheduler.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include <kdebug.h> @@ -30,9 +30,9 @@ #include "commandscheduler.h" #include "commandscheduler.moc" -CommandScheduler::CommandScheduler(Modem *modem,TQObject *parent, +CommandScheduler::CommandScheduler(Modem *modem,TQObject *tqparent, const char *name) : - TQObject(parent,name), + TQObject(tqparent,name), mModem(modem) { connect(mModem,TQT_SIGNAL(gotLine(const char *)), diff --git a/kandy/src/commandscheduler.h b/kandy/src/commandscheduler.h index 231ad325b..d18f82dc9 100644 --- a/kandy/src/commandscheduler.h +++ b/kandy/src/commandscheduler.h @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #ifndef COMMANDSCHEDULER_H #define COMMANDSCHEDULER_H @@ -34,8 +34,9 @@ class Modem; class CommandScheduler : public TQObject { Q_OBJECT + TQ_OBJECT public: - CommandScheduler (Modem *modem,TQObject *parent = 0, const char *name = 0); + CommandScheduler (Modem *modem,TQObject *tqparent = 0, const char *name = 0); void execute(const TQString &command); void execute(ATCommand *command); diff --git a/kandy/src/commandset.cpp b/kandy/src/commandset.cpp index 17a50b811..d1bcc6316 100644 --- a/kandy/src/commandset.cpp +++ b/kandy/src/commandset.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include <tqdom.h> @@ -129,13 +129,13 @@ void CommandSet::loadCommand(ATCommand *command,TQDomElement *c) } void CommandSet::saveCommand(ATCommand *command,TQDomDocument *doc, - TQDomElement *parent) + TQDomElement *tqparent) { 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); + tqparent->appendChild(c); TQPtrList<ATParameter> paras = command->parameters(); for(uint i=0;i<paras.count();++i) { @@ -144,11 +144,11 @@ void CommandSet::saveCommand(ATCommand *command,TQDomDocument *doc, } void CommandSet::saveParameter(ATParameter *p, TQDomDocument *doc, - TQDomElement *parent) + TQDomElement *tqparent) { TQDomElement e = doc->createElement("parameter"); e.setAttribute("name",p->name()); e.setAttribute("value",p->value()); e.setAttribute("userinput",p->userInput() ? "y" : "n"); - parent->appendChild(e); + tqparent->appendChild(e); } diff --git a/kandy/src/commandset.h b/kandy/src/commandset.h index 8c3cbc426..d297fe630 100644 --- a/kandy/src/commandset.h +++ b/kandy/src/commandset.h @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #ifndef COMMANDSET_H #define COMMANDSET_H @@ -51,8 +51,8 @@ class CommandSet { protected: void loadCommand(ATCommand *,TQDomElement *c); - void saveCommand(ATCommand *,TQDomDocument *doc,TQDomElement *parent); - void saveParameter(ATParameter *p, TQDomDocument *doc,TQDomElement *parent); + void saveCommand(ATCommand *,TQDomDocument *doc,TQDomElement *tqparent); + void saveParameter(ATParameter *p, TQDomDocument *doc,TQDomElement *tqparent); private: TQPtrList<ATCommand> mList; diff --git a/kandy/src/kandy.cpp b/kandy/src/kandy.cpp index 95bf20ac6..4766947a2 100644 --- a/kandy/src/kandy.cpp +++ b/kandy/src/kandy.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include <tqlineedit.h> @@ -175,7 +175,7 @@ void Kandy::dragEnterEvent(TQDragEnterEvent *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* + // will only accept a dropped URL. the TQt dnd code can do *much* // much more, so please read the docs there // do nothing @@ -227,7 +227,7 @@ void Kandy::filePrint() if (!mPrinter) mPrinter = new TQPrinter; if (TQPrintDialog::getPrinterSetup(mPrinter)) { - // setup the printer. with Qt, you always "print" to a + // setup the printer. with TQt, you always "print" to a // TQPainter.. whether the output medium is a pixmap, a screen, // or paper TQPainter p; @@ -300,7 +300,7 @@ bool Kandy::queryClose() { if (mView->isModified()) { switch (KMessageBox::warningYesNoCancel(this, - i18n("Save changes to profile %1?").arg(mFilename), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard())) { + i18n("Save changes to profile %1?").arg(mFilename), TQString(), KStdGuiItem::save(), KStdGuiItem::discard())) { case KMessageBox::Yes : fileSave(); return true; @@ -318,7 +318,7 @@ void Kandy::modemConnect() { if (!mScheduler->modem()->open()) { KMessageBox::sorry(this, - i18n("Cannot open modem device %1.") + i18n("Cannot open modem tqdevice %1.") .arg(KandyPrefs::serialDevice()), i18n("Modem Error")); return; } diff --git a/kandy/src/kandy.h b/kandy/src/kandy.h index e2a7754bf..a81208dee 100644 --- a/kandy/src/kandy.h +++ b/kandy/src/kandy.h @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #ifndef KANDY_H #define KANDY_H @@ -48,6 +48,7 @@ class KandyPrefsDialog; class Kandy : public KMainWindow { Q_OBJECT + TQ_OBJECT public: /** * Default Constructor @@ -78,7 +79,7 @@ class Kandy : public KMainWindow protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ virtual void dragEnterEvent(TQDragEnterEvent *event); virtual void dropEvent(TQDropEvent *event); diff --git a/kandy/src/kandy.kcfg b/kandy/src/kandy.kcfg index a93f674b8..f8d44ab35 100644 --- a/kandy/src/kandy.kcfg +++ b/kandy/src/kandy.kcfg @@ -7,7 +7,7 @@ <group name="Serial Port"> <entry type="String" key="Serial Device"> - <label>Serial device</label> + <label>Serial tqdevice</label> <default>/dev/ttyS1</default> </entry> <entry type="String" key="Baud Rate"> diff --git a/kandy/src/kandy_client.cpp b/kandy/src/kandy_client.cpp index b927afc3a..2aba3b355 100644 --- a/kandy/src/kandy_client.cpp +++ b/kandy/src/kandy_client.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include <kapplication.h> diff --git a/kandy/src/kandyiface.h b/kandy/src/kandyiface.h index 3b45bd013..49c9484b1 100644 --- a/kandy/src/kandyiface.h +++ b/kandy/src/kandyiface.h @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #ifndef KANDYIFACE_H #define KANDYIFACE_H diff --git a/kandy/src/kandyprefsdialog.cpp b/kandy/src/kandyprefsdialog.cpp index d98989dc2..1e233aaa8 100644 --- a/kandy/src/kandyprefsdialog.cpp +++ b/kandy/src/kandyprefsdialog.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include <tqlayout.h> @@ -54,8 +54,8 @@ #include "kandyprefsdialog.moc" -KandyPrefsDialog::KandyPrefsDialog(TQWidget *parent, char *name, bool modal) : - KPrefsDialog(KandyPrefs::self(),parent,name,modal) +KandyPrefsDialog::KandyPrefsDialog(TQWidget *tqparent, char *name, bool modal) : + KPrefsDialog(KandyPrefs::self(),tqparent,name,modal) { setupSerialTab(); setupAddressbookTab(); @@ -81,7 +81,7 @@ void KandyPrefsDialog::setupSerialTab() topLayout->setSpacing(spacingHint()); topLayout->setMargin(marginHint()); - // Define serial device + // Define serial tqdevice serialDevice = addWidString( KandyPrefs::self()->serialDeviceItem(), topFrame ); topLayout->addWidget(serialDevice->label(),0,0); diff --git a/kandy/src/kandyprefsdialog.h b/kandy/src/kandyprefsdialog.h index 7929e92d5..886e35048 100644 --- a/kandy/src/kandyprefsdialog.h +++ b/kandy/src/kandyprefsdialog.h @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #ifndef _KANDYPREFSDIALOG_H @@ -42,9 +42,10 @@ class KandyPrefsDialog : public KPrefsDialog { Q_OBJECT + TQ_OBJECT public: /** Initialize dialog and pages */ - KandyPrefsDialog(TQWidget *parent=0,char *name=0,bool modal=false); + KandyPrefsDialog(TQWidget *tqparent=0,char *name=0,bool modal=false); ~KandyPrefsDialog(); protected: diff --git a/kandy/src/kandyview.cpp b/kandy/src/kandyview.cpp index 27d3b7b6b..38fcb9cb1 100644 --- a/kandy/src/kandyview.cpp +++ b/kandy/src/kandyview.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include <unistd.h> @@ -57,8 +57,8 @@ #include "kandyview.h" #include "kandyview.moc" -KandyView::KandyView(CommandScheduler *scheduler,TQWidget *parent) - : TQWidget(parent) +KandyView::KandyView(CommandScheduler *scheduler,TQWidget *tqparent) + : TQWidget(tqparent) { mModified = false; mScheduler = scheduler; @@ -249,8 +249,8 @@ void KandyView::executeCommand() ATParameter *p = paraList.at(i); if (p->userInput()) { bool ok = false; - TQString value = KInputDialog::getText(TQString::null, - i18n("Enter value for %1:").arg(p->name()),TQString::null,&ok,this); + TQString value = KInputDialog::getText(TQString(), + i18n("Enter value for %1:").arg(p->name()),TQString(),&ok,this); if (!ok) return; p->setValue(value); diff --git a/kandy/src/kandyview.h b/kandy/src/kandyview.h index 7c1a1c7ab..41153a54f 100644 --- a/kandy/src/kandyview.h +++ b/kandy/src/kandyview.h @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #ifndef KANDYVIEW_H #define KANDYVIEW_H @@ -48,14 +48,15 @@ class CmdPropertiesDialog; @short Main view @author Cornelius Schumacher <[email protected]> */ -class KandyView : public QWidget +class KandyView : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** * Default constructor */ - KandyView(CommandScheduler *,TQWidget *parent); + KandyView(CommandScheduler *,TQWidget *tqparent); /** * Destructor diff --git a/kandy/src/main.cpp b/kandy/src/main.cpp index 982a1a7f2..d323379c9 100644 --- a/kandy/src/main.cpp +++ b/kandy/src/main.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include <tqfile.h> diff --git a/kandy/src/mobilegui.cpp b/kandy/src/mobilegui.cpp index fec40b7ff..08cf54cc7 100644 --- a/kandy/src/mobilegui.cpp +++ b/kandy/src/mobilegui.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include <time.h> @@ -148,7 +148,7 @@ class AddressSyncer }; -class PhoneBookItem : public QCheckListItem +class PhoneBookItem : public TQCheckListItem { public: PhoneBookItem( TQListView *v ) : @@ -176,21 +176,21 @@ class PhoneBookItem : public QCheckListItem /* - * Constructs a MobileGui which is a child of 'parent', with the + * Constructs a MobileGui which is a child of 'tqparent', with the * name 'name' and widget flags set to 'f' * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ MobileGui::MobileGui( CommandScheduler *scheduler, KandyPrefs *kprefs, - TQWidget* parent, const char* name, WFlags fl ) : - DCOPObject( "KandyIface" ), MobileGui_base( parent, name, fl ) + TQWidget* tqparent, const char* name, WFlags fl ) : + DCOPObject( "KandyIface" ), MobileGui_base( tqparent, name, fl ) { // Setup links to related classes mScheduler = scheduler; mSyncer = new AddressSyncer; mPrefs = kprefs; - mparent = parent; + mtqparent = tqparent; // Setup mobile phone specific data mMobManufacturer = ""; @@ -922,7 +922,7 @@ void MobileGui::writeKabc() *fields = TQStringList::split( ',', name ); if ( fields->count() > 1 ) { - // Name string tqcontains comma separated entry so that we + // Name string contains comma separated entry so that we // need to build family and given names out of them. TQString givenName = ""; @@ -933,7 +933,7 @@ void MobileGui::writeKabc() givenName += stripWhiteSpaces( (*fields)[ i ] ) + " "; entry.setGivenName( stripWhiteSpaces( givenName ) ); } else - // Name string tqcontains only one string without comma. + // Name string contains only one string without comma. entry.setFamilyName( stripWhiteSpaces( name ) ); entry.insertPhoneNumber( KABC::PhoneNumber( phoneNumber, phoneType ) ); @@ -954,7 +954,7 @@ void MobileGui::writeKabc() } -void MobileGui::refreshStatus() +void MobileGui::refreshtqStatus() { mScheduler->executeId( "+cbc" ); mScheduler->executeId( "+csq" ); @@ -1453,7 +1453,7 @@ void MobileGui::toggleConnection() emit connectModem(); readModelInformation(); - refreshStatus(); + refreshtqStatus(); mConnectButton->setText( tr2i18n( "Disconnect" ) ); PushButton1->setEnabled( true ); @@ -1463,7 +1463,7 @@ void MobileGui::toggleConnection() setKabState( UNLOADED ); setMobState( UNLOADED ); - ((MobileMain *) mparent)->statusBar()->changeItem( i18n(" Connected "), 1 ); + ((MobileMain *) mtqparent)->statusBar()->changeItem( i18n(" Connected "), 1 ); } else { warnKabState( UNLOADED ); @@ -1510,7 +1510,7 @@ void MobileGui::disconnectGUI() mPBIndexOccupied.resize( 0, false ); - ((MobileMain *) mparent)->statusBar()->changeItem( i18n(" Disconnected "), + ((MobileMain *) mtqparent)->statusBar()->changeItem( i18n(" Disconnected "), 1 ); } @@ -1561,7 +1561,7 @@ void MobileGui::warnKabState( ABState newState ) { if ( ( mKabState == MODIFIED ) && ( newState != MODIFIED ) ) { TQString text = "<qt><b>" + i18n( "Warning" ) + "</b><br>"; - text += i18n( "The KDE address book tqcontains unsaved changes." ) + + text += i18n( "The KDE address book contains unsaved changes." ) + "<br></qt>"; TQMessageBox *msg = new TQMessageBox( i18n( "Unsaved Changes" ), text, @@ -1646,7 +1646,7 @@ bool MobileGui::warnMobState( ABState newState ) if ( ( mMobState == MODIFIED ) && ( newState != MODIFIED ) ) { TQString text = "<qt><b>" + i18n( "Warning" ) + "</b><br>"; - text += i18n( "The mobile phone book tqcontains unsaved changes." ) + + text += i18n( "The mobile phone book contains unsaved changes." ) + "<br></qt>"; TQMessageBox *msg = new TQMessageBox( i18n( "Unsaved Changes" ), text, diff --git a/kandy/src/mobilegui.h b/kandy/src/mobilegui.h index de698729e..cb28f1885 100644 --- a/kandy/src/mobilegui.h +++ b/kandy/src/mobilegui.h @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #ifndef MOBILEGUI_H #define MOBILEGUI_H @@ -39,9 +39,10 @@ class AddressSyncer; class MobileGui : public MobileGui_base, virtual public KandyIface { Q_OBJECT + TQ_OBJECT public: - MobileGui( CommandScheduler *, KandyPrefs *kprefs, TQWidget* parent=0, + MobileGui( CommandScheduler *, KandyPrefs *kprefs, TQWidget* tqparent=0, const char* name=0, WFlags fl=0 ); ~MobileGui(); @@ -60,7 +61,7 @@ class MobileGui : public MobileGui_base, virtual public KandyIface void readModelInformation(); void readPhonebook(); void savePhonebook(); - void refreshStatus(); + void refreshtqStatus(); void writePhonebook(); void readKabc(); void writeKabc(); @@ -79,7 +80,7 @@ class MobileGui : public MobileGui_base, virtual public KandyIface CommandScheduler *mScheduler; AddressSyncer *mSyncer; KandyPrefs *mPrefs; - TQWidget *mparent; + TQWidget *mtqparent; /* String Formatting Routines */ TQString quote( const TQString & ); diff --git a/kandy/src/mobilegui_base.ui b/kandy/src/mobilegui_base.ui index 9379abab2..ddb054991 100644 --- a/kandy/src/mobilegui_base.ui +++ b/kandy/src/mobilegui_base.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.2" stdsetdef="1"> <class>MobileGui_base</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>MobileGui_base</cstring> </property> @@ -25,7 +25,7 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>GroupBox2</cstring> </property> @@ -42,7 +42,7 @@ </property> <grid> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel1</cstring> </property> @@ -51,7 +51,7 @@ </property> </widget> - <widget class="QLabel" row="3" column="0"> + <widget class="TQLabel" row="3" column="0"> <property name="name"> <cstring>TextLabel3_2</cstring> </property> @@ -60,7 +60,7 @@ </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>mManufacturerLabel</cstring> </property> @@ -69,7 +69,7 @@ </property> </widget> - <widget class="QLabel" row="2" column="1"> + <widget class="TQLabel" row="2" column="1"> <property name="name"> <cstring>mGSMVersionLabel</cstring> </property> @@ -78,7 +78,7 @@ </property> </widget> - <widget class="QLabel" row="3" column="1"> + <widget class="TQLabel" row="3" column="1"> <property name="name"> <cstring>mSerialNumberLabel</cstring> </property> @@ -87,7 +87,7 @@ </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>mModelLabel</cstring> </property> @@ -96,7 +96,7 @@ </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>TextLabel3</cstring> </property> @@ -105,7 +105,7 @@ </property> </widget> - <widget class="QLabel" row="2" column="0"> + <widget class="TQLabel" row="2" column="0"> <property name="name"> <cstring>TextLabel2</cstring> </property> @@ -133,11 +133,11 @@ </spacer> </grid> </widget> - <widget class="QTabWidget" row="1" column="0" colspan="2"> + <widget class="TQTabWidget" row="1" column="0" colspan="2"> <property name="name"> <cstring>mTabWidget</cstring> </property> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>mABTab</cstring> </property> @@ -148,7 +148,7 @@ <bool>false</bool> </property> <grid> - <widget class="QGroupBox" row="0" column="0"> + <widget class="TQGroupBox" row="0" column="0"> <property name="name"> <cstring>groupBox3</cstring> </property> @@ -159,7 +159,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QListView" row="0" column="0" rowspan="3" colspan="1"> + <widget class="TQListView" row="0" column="0" rowspan="3" colspan="1"> <column> <property name="text"> <string>Name</string> @@ -189,7 +189,7 @@ <enum>AllColumns</enum> </property> </widget> - <widget class="QPushButton" row="0" column="1"> + <widget class="TQPushButton" row="0" column="1"> <property name="name"> <cstring>mReadKabButton</cstring> </property> @@ -214,7 +214,7 @@ </size> </property> </spacer> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>PushButton8</cstring> </property> @@ -224,7 +224,7 @@ </widget> </grid> </widget> - <widget class="QGroupBox" row="0" column="1"> + <widget class="TQGroupBox" row="0" column="1"> <property name="name"> <cstring>groupBox4</cstring> </property> @@ -235,7 +235,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton" row="0" column="1"> + <widget class="TQPushButton" row="0" column="1"> <property name="name"> <cstring>PushButton3</cstring> </property> @@ -243,7 +243,7 @@ <string>Read</string> </property> </widget> - <widget class="QPushButton" row="1" column="1"> + <widget class="TQPushButton" row="1" column="1"> <property name="name"> <cstring>PushButton12</cstring> </property> @@ -268,7 +268,7 @@ </size> </property> </spacer> - <widget class="QPushButton" row="2" column="1"> + <widget class="TQPushButton" row="2" column="1"> <property name="name"> <cstring>PushButton4_2</cstring> </property> @@ -276,7 +276,7 @@ <string>Save to File...</string> </property> </widget> - <widget class="QPushButton" row="4" column="1"> + <widget class="TQPushButton" row="4" column="1"> <property name="name"> <cstring>MobDeleteButton</cstring> </property> @@ -284,7 +284,7 @@ <string>Delete</string> </property> </widget> - <widget class="QListView" row="0" column="0" rowspan="5" colspan="1"> + <widget class="TQListView" row="0" column="0" rowspan="5" colspan="1"> <column> <property name="text"> <string>Name</string> @@ -316,7 +316,7 @@ </widget> </grid> </widget> - <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> + <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>tqlayout21</cstring> </property> @@ -324,7 +324,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QPushButton"> + <widget class="TQPushButton"> <property name="name"> <cstring>PushButton8_3</cstring> </property> @@ -353,7 +353,7 @@ </widget> </grid> </widget> - <widget class="QWidget"> + <widget class="TQWidget"> <property name="name"> <cstring>mTerminalTab</cstring> </property> @@ -361,7 +361,7 @@ <string>Terminal</string> </attribute> <grid> - <widget class="QTextEdit" row="0" column="0"> + <widget class="TQTextEdit" row="0" column="0"> <property name="name"> <cstring>mTermIO</cstring> </property> @@ -372,7 +372,7 @@ </grid> </widget> </widget> - <widget class="QGroupBox" row="0" column="1"> + <widget class="TQGroupBox" row="0" column="1"> <property name="name"> <cstring>GroupBox1</cstring> </property> @@ -385,7 +385,7 @@ </sizepolicy> </property> <property name="title"> - <string>Status</string> + <string>tqStatus</string> </property> <grid> <property name="name"> @@ -397,15 +397,15 @@ <property name="spacing"> <number>6</number> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> - <cstring>mStatus</cstring> + <cstring>mtqStatus</cstring> </property> <property name="text"> <string>Battery charge:</string> </property> </widget> - <widget class="QLabel" row="1" column="0"> + <widget class="TQLabel" row="1" column="0"> <property name="name"> <cstring>TextLabel5</cstring> </property> @@ -413,7 +413,7 @@ <string>Signal quality:</string> </property> </widget> - <widget class="QLabel" row="1" column="1"> + <widget class="TQLabel" row="1" column="1"> <property name="name"> <cstring>mSignalQualityLabel</cstring> </property> @@ -421,7 +421,7 @@ <string>x</string> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>mBatteryChargeLabel</cstring> </property> @@ -445,7 +445,7 @@ </size> </property> </spacer> - <widget class="QPushButton" row="3" column="0"> + <widget class="TQPushButton" row="3" column="0"> <property name="name"> <cstring>mConnectButton</cstring> </property> @@ -464,7 +464,7 @@ <enum>Expanding</enum> </property> </spacer> - <widget class="QPushButton" row="3" column="3"> + <widget class="TQPushButton" row="3" column="3"> <property name="name"> <cstring>PushButton1</cstring> </property> @@ -475,7 +475,7 @@ <bool>false</bool> </property> </widget> - <widget class="QPushButton" row="3" column="4"> + <widget class="TQPushButton" row="3" column="4"> <property name="name"> <cstring>PushButton5_3</cstring> </property> @@ -537,7 +537,7 @@ <sender>PushButton1</sender> <signal>clicked()</signal> <receiver>MobileGui_base</receiver> - <slot>refreshStatus()</slot> + <slot>refreshtqStatus()</slot> </connection> <connection> <sender>mConnectButton</sender> @@ -565,11 +565,11 @@ <tabstop>PushButton1</tabstop> <tabstop>PushButton8_3</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot>readKabc()</slot> <slot>readModelInformation()</slot> <slot>readPhonebook()</slot> - <slot>refreshStatus()</slot> + <slot>refreshtqStatus()</slot> <slot>savePhonebook()</slot> <slot>setClock()</slot> <slot>syncPhonebooks()</slot> @@ -578,6 +578,6 @@ <slot>termAddOutput( const char *line )</slot> <slot>toggleConnection()</slot> <slot>deleteMobPhonebook()</slot> -</slots> +</Q_SLOTS> <tqlayoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kandy/src/mobilemain.cpp b/kandy/src/mobilemain.cpp index 851b78295..7b39d8d30 100644 --- a/kandy/src/mobilemain.cpp +++ b/kandy/src/mobilemain.cpp @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #include <kglobal.h> @@ -113,7 +113,7 @@ void MobileMain::dragEnterEvent(TQDragEnterEvent *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* + // will only accept a dropped URL. the TQt dnd code can do *much* // much more, so please read the docs there // do nothing diff --git a/kandy/src/mobilemain.h b/kandy/src/mobilemain.h index d414d15e7..01ff1888d 100644 --- a/kandy/src/mobilemain.h +++ b/kandy/src/mobilemain.h @@ -18,8 +18,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. As a special exception, permission is given to link this program - with any edition of Qt, and distribute the resulting executable, - without including the source code for Qt in the source distribution. + with any edition of TQt, and distribute the resulting executable, + without including the source code for TQt in the source distribution. */ #ifndef MOBILEMAIN_H #define MOBILEMAIN_H @@ -46,6 +46,7 @@ class CommandScheduler; class MobileMain : public KMainWindow { Q_OBJECT + TQ_OBJECT public: /** * Default Constructor @@ -65,7 +66,7 @@ class MobileMain : public KMainWindow protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ virtual void dragEnterEvent(TQDragEnterEvent *event); virtual void dropEvent(TQDropEvent *event); diff --git a/kandy/src/modem.cpp b/kandy/src/modem.cpp index a7d246950..4b085de6a 100644 --- a/kandy/src/modem.cpp +++ b/kandy/src/modem.cpp @@ -74,8 +74,8 @@ -Modem::Modem( KandyPrefs *kprefs, TQObject *parent, const char *name ) : - TQObject(parent, name) +Modem::Modem( KandyPrefs *kprefs, TQObject *tqparent, const char *name ) : + TQObject(tqparent, name) { mOpen = false; @@ -194,7 +194,7 @@ bool Modem::open() 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'. " + emit errorMessage( i18n( "Unable to open tqdevice '%1'. " "Please check that you have sufficient permissions." ) .arg( fdev ) ); return false; @@ -279,7 +279,7 @@ bool Modem::lockDevice() #ifdef HAVE_LOCKDEV is_locked = !dev_lock( (*prefs).serialDevice().local8Bit() ); if (!is_locked) - emit errorMessage( i18n( "Unable to lock device '%1'." ).arg( + emit errorMessage( i18n( "Unable to lock tqdevice '%1'." ).arg( (*prefs).serialDevice() )); return is_locked; #else @@ -322,7 +322,7 @@ bool Modem::lockDevice() } if ( !kill( (pid_t) pid, 0 ) ) { - emit errorMessage( i18n( "Process with PID %1, which is locking the device, is still running.") + emit errorMessage( i18n( "Process with PID %1, which is locking the tqdevice, is still running.") .arg( pid ) ); return false; } diff --git a/kandy/src/modem.h b/kandy/src/modem.h index 52321894f..0b30a05bf 100644 --- a/kandy/src/modem.h +++ b/kandy/src/modem.h @@ -43,11 +43,12 @@ -class Modem : public QObject +class Modem : public TQObject { Q_OBJECT + TQ_OBJECT public: - Modem(KandyPrefs *kprefs, TQObject *parent = 0, const char *name = 0); + Modem(KandyPrefs *kprefs, TQObject *tqparent = 0, const char *name = 0); virtual ~Modem(); void setSpeed(int speed); |