From f138d74fe16092003b06f5bde9663841929cde7f Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 17 Jun 2011 22:17:08 +0000 Subject: TQt4 port kdeaccessibility This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1237325 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kbstateapplet/kbstate.cpp | 88 +++---- kbstateapplet/kbstate.h | 19 +- kmag/kmag.cpp | 74 +++--- kmag/kmag.h | 7 +- kmag/kmagselrect.cpp | 60 ++--- kmag/kmagselrect.h | 21 +- kmag/kmagzoomview.cpp | 150 ++++++------ kmag/kmagzoomview.h | 13 +- kmousetool/kmousetool/kmousetool.cpp | 6 +- kmousetool/kmousetool/kmousetool.h | 8 +- kmousetool/kmousetool/kmousetoolui.ui | 50 ++-- kmouth/books/sv-personal.phrasebook | 2 +- kmouth/configwizard.cpp | 6 +- kmouth/configwizard.h | 3 +- kmouth/kmouth.cpp | 42 ++-- kmouth/kmouth.h | 7 +- kmouth/optionsdialog.cpp | 16 +- kmouth/optionsdialog.h | 6 +- kmouth/phrasebook/buttonboxui.ui | 16 +- kmouth/phrasebook/phrasebook.cpp | 80 +++---- kmouth/phrasebook/phrasebook.h | 10 +- kmouth/phrasebook/phrasebookdialog.cpp | 134 +++++------ kmouth/phrasebook/phrasebookdialog.h | 19 +- kmouth/phrasebook/phrasebookparser.h | 2 +- kmouth/phrasebook/phrasetree.cpp | 156 ++++++------ kmouth/phrasebook/phrasetree.h | 19 +- kmouth/phraseedit.cpp | 16 +- kmouth/phraseedit.h | 2 +- kmouth/phraselist.cpp | 44 ++-- kmouth/phraselist.h | 5 +- kmouth/phraselistitem.cpp | 4 +- kmouth/preferencesui.ui | 12 +- kmouth/speech.cpp | 26 +- kmouth/speech.h | 1 + kmouth/texttospeechconfigurationui.ui | 20 +- kmouth/texttospeechconfigurationwidget.cpp | 4 +- kmouth/texttospeechconfigurationwidget.h | 2 +- kmouth/texttospeechsystem.h | 3 +- kmouth/wordcompletion/creationsourcedetailsui.ui | 16 +- kmouth/wordcompletion/creationsourcedetailsui.ui.h | 6 +- kmouth/wordcompletion/creationsourceui.ui | 24 +- kmouth/wordcompletion/creationsourceui.ui.h | 2 +- kmouth/wordcompletion/dictionarycreationwizard.cpp | 30 +-- kmouth/wordcompletion/dictionarycreationwizard.h | 9 +- kmouth/wordcompletion/kdedocsourceui.ui | 8 +- kmouth/wordcompletion/kdedocsourceui.ui.h | 2 +- kmouth/wordcompletion/klanguagebutton.cpp | 30 +-- kmouth/wordcompletion/klanguagebutton.h | 21 +- kmouth/wordcompletion/klanguagebuttonhelper.cpp | 18 +- kmouth/wordcompletion/klanguagebuttonhelper.h | 2 +- kmouth/wordcompletion/wordcompletion.cpp | 18 +- kmouth/wordcompletion/wordcompletion.h | 1 + kmouth/wordcompletion/wordcompletionui.ui | 24 +- kmouth/wordcompletion/wordcompletionui.ui.h | 6 +- kmouth/wordcompletion/wordcompletionwidget.cpp | 32 +-- kmouth/wordcompletion/wordcompletionwidget.h | 3 +- kmouth/wordcompletion/wordlist.cpp | 66 ++--- kmouth/wordcompletion/wordlist.h | 2 +- ksayit/Doxyfile | 4 +- ksayit/Freeverb_plugin/Makefile.am | 2 +- ksayit/Freeverb_plugin/freeverb_setup.ui | 82 +++---- ksayit/Freeverb_plugin/freeverbsetupimpl.cpp | 4 +- ksayit/Freeverb_plugin/freeverbsetupimpl.h | 3 +- ksayit/Freeverb_plugin/ksayitfreeverblib.cpp | 10 +- ksayit/Freeverb_plugin/ksayitfreeverblib.h | 10 +- ksayit/KTTSD_Lib/KTTSDlibSetup.ui | 20 +- ksayit/KTTSD_Lib/kttsdlib.cpp | 8 +- ksayit/KTTSD_Lib/kttsdlib.h | 9 +- ksayit/KTTSD_Lib/kttsdlibsetupimpl.cpp | 8 +- ksayit/KTTSD_Lib/kttsdlibsetupimpl.h | 5 +- ksayit/KTTSD_Lib/kttsdlibtalker2.cpp | 6 +- ksayit/KTTSD_Lib/kttsdlibtalker2.h | 5 +- ksayit/src/DocTreeView.ui | 26 +- ksayit/src/DocTreeView.ui.h | 2 +- ksayit/src/KSayItView.ui | 10 +- ksayit/src/Types.h | 6 +- ksayit/src/contextmenuhandler.cpp | 22 +- ksayit/src/contextmenuhandler.h | 13 +- ksayit/src/docbookclasses.cpp | 266 ++++++++++----------- ksayit/src/docbookclasses.h | 38 +-- ksayit/src/docbookgenerator.cpp | 14 +- ksayit/src/docbookgenerator.h | 2 +- ksayit/src/docbookparser.cpp | 44 ++-- ksayit/src/docbookparser.h | 2 +- ksayit/src/doctreeviewimpl.cpp | 122 +++++----- ksayit/src/doctreeviewimpl.h | 6 +- ksayit/src/effectstack.cpp | 2 +- ksayit/src/fx_setup.ui | 62 ++--- ksayit/src/fxpluginhandler.cpp | 20 +- ksayit/src/fxpluginhandler.h | 5 +- ksayit/src/fxsetupimpl.cpp | 6 +- ksayit/src/fxsetupimpl.h | 3 +- ksayit/src/ksayit.cpp | 134 +++++------ ksayit/src/ksayit.h | 13 +- ksayit/src/ksayit_fxplugin.h | 7 +- ksayit/src/ksayit_ttsplugin.h | 10 +- ksayit/src/ksayitbookmarkhandler.cpp | 18 +- ksayit/src/ksayitbookmarkhandler.h | 4 +- ksayit/src/ksayitsystemtray.cpp | 28 +-- ksayit/src/ksayitsystemtray.h | 4 +- ksayit/src/ksayitviewimpl.cpp | 6 +- ksayit/src/ksayitviewimpl.h | 5 +- ksayit/src/parasaxparser.cpp | 6 +- ksayit/src/parasaxparser.h | 2 +- ksayit/src/saxhandler.cpp | 8 +- ksayit/src/saxhandler.h | 6 +- ksayit/src/voicesetupdlg.cpp | 10 +- ksayit/src/voicesetupdlg.h | 3 +- kttsd/app-plugins/kate/katekttsd.cpp | 8 +- kttsd/app-plugins/kate/katekttsd.h | 4 +- kttsd/compat/interfaces/kspeech/kspeech.h | 14 +- kttsd/configure.in.in | 11 +- kttsd/debian/man/kttsd.1 | 6 +- kttsd/debian/man/kttsmgr.1 | 6 +- kttsd/filters/main.cpp | 4 +- kttsd/filters/sbd/sbdconf.cpp | 32 +-- kttsd/filters/sbd/sbdconf.h | 5 +- kttsd/filters/sbd/sbdconfwidget.ui | 58 ++--- kttsd/filters/sbd/sbdproc.cpp | 64 ++--- kttsd/filters/sbd/sbdproc.h | 12 +- .../stringreplacer/editreplacementwidget.ui | 42 ++-- .../filters/stringreplacer/stringreplacerconf.cpp | 34 +-- kttsd/filters/stringreplacer/stringreplacerconf.h | 5 +- .../stringreplacer/stringreplacerconfwidget.ui | 54 ++--- .../filters/stringreplacer/stringreplacerproc.cpp | 14 +- kttsd/filters/stringreplacer/stringreplacerproc.h | 5 +- kttsd/filters/talkerchooser/talkerchooserconf.cpp | 30 +-- kttsd/filters/talkerchooser/talkerchooserconf.h | 5 +- .../talkerchooser/talkerchooserconfwidget.ui | 48 ++-- kttsd/filters/talkerchooser/talkerchooserproc.cpp | 10 +- kttsd/filters/talkerchooser/talkerchooserproc.h | 3 +- kttsd/filters/xhtml2ssml/Doxyfile | 4 +- kttsd/filters/xhtml2ssml/xhtml2ssml.cpp | 8 +- kttsd/filters/xhtml2ssml/xhtml2ssml.h | 4 +- kttsd/filters/xhtml2ssml/xmlelement.cpp | 6 +- kttsd/filters/xhtml2ssml/xmlelement.h | 4 +- kttsd/filters/xmltransformer/xhtml2ssml_simple.xsl | 8 +- .../filters/xmltransformer/xmltransformerconf.cpp | 24 +- kttsd/filters/xmltransformer/xmltransformerconf.h | 5 +- .../xmltransformer/xmltransformerconfwidget.ui | 48 ++-- .../filters/xmltransformer/xmltransformerproc.cpp | 18 +- kttsd/filters/xmltransformer/xmltransformerproc.h | 5 +- kttsd/kcmkttsmgr/addtalker.cpp | 10 +- kttsd/kcmkttsmgr/addtalker.h | 7 +- kttsd/kcmkttsmgr/addtalkerwidget.ui | 32 +-- kttsd/kcmkttsmgr/kcmkttsmgr.cpp | 102 ++++---- kttsd/kcmkttsmgr/kcmkttsmgr.h | 13 +- kttsd/kcmkttsmgr/kcmkttsmgrwidget.ui | 202 ++++++++-------- kttsd/kcmkttsmgr/kcmkttsmgrwidget.ui.h | 2 +- kttsd/kcmkttsmgr/selectevent.cpp | 32 +-- kttsd/kcmkttsmgr/selectevent.h | 7 +- kttsd/kcmkttsmgr/selecteventwidget.ui | 8 +- kttsd/kttsd/filtermgr.cpp | 20 +- kttsd/kttsd/filtermgr.h | 7 +- kttsd/kttsd/kttsd.cpp | 42 ++-- kttsd/kttsd/kttsd.h | 8 +- kttsd/kttsd/speaker.cpp | 58 ++--- kttsd/kttsd/speaker.h | 9 +- kttsd/kttsd/speechdata.cpp | 30 +-- kttsd/kttsd/speechdata.h | 3 +- kttsd/kttsd/ssmlconvert.cpp | 18 +- kttsd/kttsd/ssmlconvert.h | 3 +- kttsd/kttsd/talkermgr.cpp | 24 +- kttsd/kttsd/talkermgr.h | 8 +- kttsd/kttsd/threadedplugin.cpp | 10 +- kttsd/kttsd/threadedplugin.h | 2 +- kttsd/kttsjobmgr/kttsjobmgr.cpp | 34 +-- kttsd/kttsjobmgr/kttsjobmgr.h | 11 +- kttsd/kttsmgr/kttsmgr.cpp | 28 +-- kttsd/kttsmgr/kttsmgr.h | 11 +- kttsd/libkttsd/filterconf.cpp | 8 +- kttsd/libkttsd/filterconf.h | 9 +- kttsd/libkttsd/filterproc.cpp | 6 +- kttsd/libkttsd/filterproc.h | 7 +- kttsd/libkttsd/notify.cpp | 18 +- kttsd/libkttsd/player.h | 7 +- kttsd/libkttsd/pluginconf.cpp | 12 +- kttsd/libkttsd/pluginconf.h | 17 +- kttsd/libkttsd/pluginproc.cpp | 6 +- kttsd/libkttsd/pluginproc.h | 11 +- kttsd/libkttsd/selecttalkerdlg.cpp | 24 +- kttsd/libkttsd/selecttalkerdlg.h | 11 +- kttsd/libkttsd/selecttalkerwidget.ui | 70 +++--- kttsd/libkttsd/stretcher.cpp | 6 +- kttsd/libkttsd/stretcher.h | 5 +- kttsd/libkttsd/talkercode.cpp | 16 +- kttsd/libkttsd/talkercode.h | 6 +- kttsd/libkttsd/testplayer.cpp | 12 +- kttsd/libkttsd/testplayer.h | 6 +- kttsd/libkttsd/utils.cpp | 16 +- kttsd/libkttsd/utils.h | 6 +- kttsd/players/akodeplayer/akodeplayer.cpp | 4 +- kttsd/players/akodeplayer/akodeplayer.h | 3 +- kttsd/players/alsaplayer/alsaplayer.cpp | 18 +- kttsd/players/alsaplayer/alsaplayer.h | 7 +- kttsd/players/artsplayer/artsplayer.cpp | 6 +- kttsd/players/artsplayer/artsplayer.h | 3 +- kttsd/players/gstplayer/gstreamerplayer.cpp | 24 +- kttsd/players/gstplayer/gstreamerplayer.h | 3 +- kttsd/plugins/command/commandconf.cpp | 30 +-- kttsd/plugins/command/commandconf.h | 11 +- kttsd/plugins/command/commandconfwidget.ui | 32 +-- kttsd/plugins/command/commandproc.cpp | 50 ++-- kttsd/plugins/command/commandproc.h | 7 +- kttsd/plugins/epos/eposconf.cpp | 28 +-- kttsd/plugins/epos/eposconf.h | 11 +- kttsd/plugins/epos/eposconfwidget.ui | 90 +++---- kttsd/plugins/epos/eposproc.cpp | 26 +- kttsd/plugins/epos/eposproc.h | 7 +- kttsd/plugins/festivalint/festivalintconf.cpp | 36 +-- kttsd/plugins/festivalint/festivalintconf.h | 11 +- kttsd/plugins/festivalint/festivalintconfwidget.ui | 62 ++--- kttsd/plugins/festivalint/festivalintproc.cpp | 48 ++-- kttsd/plugins/festivalint/festivalintproc.h | 5 +- kttsd/plugins/flite/fliteconf.cpp | 30 +-- kttsd/plugins/flite/fliteconf.h | 11 +- kttsd/plugins/flite/fliteconfwidget.ui | 18 +- kttsd/plugins/flite/fliteproc.cpp | 22 +- kttsd/plugins/flite/fliteproc.h | 7 +- kttsd/plugins/freetts/freettsconf.cpp | 32 +-- kttsd/plugins/freetts/freettsconf.h | 9 +- kttsd/plugins/freetts/freettsconfigwidget.ui | 24 +- kttsd/plugins/freetts/freettsproc.cpp | 16 +- kttsd/plugins/freetts/freettsproc.h | 5 +- kttsd/plugins/hadifix/SSMLtoTxt2pho.xsl | 2 +- kttsd/plugins/hadifix/hadifixconf.cpp | 38 +-- kttsd/plugins/hadifix/hadifixconf.h | 9 +- kttsd/plugins/hadifix/hadifixconfigui.ui | 94 ++++---- kttsd/plugins/hadifix/hadifixconfigui.ui.h | 10 +- kttsd/plugins/hadifix/hadifixproc.cpp | 32 +-- kttsd/plugins/hadifix/hadifixproc.h | 5 +- kttsd/plugins/hadifix/initialconfig.h | 8 +- kttsd/plugins/hadifix/voicefileui.ui | 16 +- kttsd/plugins/hadifix/voicefileui.ui.h | 6 +- 234 files changed, 2601 insertions(+), 2527 deletions(-) diff --git a/kbstateapplet/kbstate.cpp b/kbstateapplet/kbstate.cpp index 09f6846..69a7809 100644 --- a/kbstateapplet/kbstate.cpp +++ b/kbstateapplet/kbstate.cpp @@ -50,16 +50,16 @@ extern "C" #include #include - KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile) + KDE_EXPORT KPanelApplet* init(TQWidget *tqparent, const TQString& configFile) { KGlobal::locale()->insertCatalogue("kbstateapplet"); - KbStateApplet *applet = new KbStateApplet(configFile, KPanelApplet::Normal, KPanelApplet::About, parent, "kbstateapplet"); + KbStateApplet *applet = new KbStateApplet(configFile, KPanelApplet::Normal, KPanelApplet::About, tqparent, "kbstateapplet"); return applet; } } struct ModifierKey { - const unsigned int mask; + const unsigned int tqmask; const KeySym keysym; const char *name; const char *icon; @@ -86,8 +86,8 @@ static ModifierKey modifierKeys[] = { /********************************************************************/ KbStateApplet::KbStateApplet(const TQString& configFile, Type t, int actions, - TQWidget *parent, const char *name) - : KPanelApplet( configFile, t, actions, parent, name ) + TQWidget *tqparent, const char *name) + : KPanelApplet( configFile, t, actions, tqparent, name ) { for (int i = 0; i < 8; i++) { icons[i] = 0; @@ -145,12 +145,12 @@ void KbStateApplet::buildPopupMenu() showPopup->setCheckable( true ); modifierItem=showPopup->insertItem(i18n("Modifier Keys"), this, TQT_SLOT(toggleModifier())); lockkeysItem=showPopup->insertItem(i18n("Lock Keys"), this, TQT_SLOT(toggleLockkeys())); - mouseItem=showPopup->insertItem(i18n("Mouse Status"), this, TQT_SLOT(toggleMouse())); - accessxItem=showPopup->insertItem(i18n("AccessX Status"), this, TQT_SLOT(toggleAccessX())); + mouseItem=showPopup->insertItem(i18n("Mouse tqStatus"), this, TQT_SLOT(toggleMouse())); + accessxItem=showPopup->insertItem(i18n("AccessX tqStatus"), this, TQT_SLOT(toggleAccessX())); popup = new KPopupMenu(this); popup->setCheckable( true ); - popup->insertTitle(0, i18n("Keyboard Status Applet")); + popup->insertTitle(0, i18n("Keyboard tqStatus Applet")); popup->insertItem(i18n("Set Icon Size"),sizePopup); fillSpaceItem = popup->insertItem(i18n("Fill Available Space"), this, TQT_SLOT(toggleFillSpace())); @@ -179,7 +179,7 @@ void KbStateApplet::updateMenu() void calculateSizes (int space, int modifiers, int lockkeys, int accessx, bool showMouse, int &lines, int &length, int &size) -// Calculates the layout based on a given number of modifiers, lockkeys and +// Calculates the tqlayout based on a given number of modifiers, lockkeys and // accessx features. // Output: // lines: number of lines @@ -264,7 +264,7 @@ int KbStateApplet::heightForWidth(int w) const { } void KbStateApplet::mousePressEvent(TQMouseEvent *e) { - if (e->button() == RightButton) + if (e->button() == Qt::RightButton) popup->popup(e->globalPos()); } @@ -281,17 +281,17 @@ void KbStateApplet::toggleFillSpace() { fillSpace = !fillSpace; saveConfig(); updateMenu(); - layout(); + tqlayout(); updateGeometry(); emit updateLayout(); } void KbStateApplet::resizeEvent( TQResizeEvent*e ) { TQWidget::resizeEvent(e); - layout(); + tqlayout(); } -void KbStateApplet::layout() { +void KbStateApplet::tqlayout() { int size = this->size; int lines, length, x,y,dx,dy, ldx,ldy; @@ -308,7 +308,7 @@ void KbStateApplet::layout() { accessxCount++; } - if (orientation() == Vertical) { + if (orientation() ==Qt::Vertical) { calculateSizes (width(), modifierCount, lockkeyCount, accessxCount, showMouse, lines, length, size); @@ -527,21 +527,21 @@ void KbStateApplet::initMasks() { state = 0; for (int i = 0; strcmp(modifierKeys[i].name, "") != 0; i++) { - int mask = modifierKeys[i].mask; - if (mask == 0) + int tqmask = modifierKeys[i].tqmask; + if (tqmask == 0) if (modifierKeys[i].keysym != 0) - mask = XkbKeysymToModifiers (this->x11Display(), modifierKeys[i].keysym); + tqmask = XkbKeysymToModifiers (this->x11Display(), modifierKeys[i].keysym); else if (!strcmp(modifierKeys[i].name, "Win")) - mask = KKeyNative::modX(KKey::WIN); + tqmask = KKeyNative::modX(KKey::WIN); else - mask = XkbKeysymToModifiers (this->x11Display(), XK_Mode_switch) + tqmask = XkbKeysymToModifiers (this->x11Display(), XK_Mode_switch) | XkbKeysymToModifiers (this->x11Display(), XK_ISO_Level3_Shift) | XkbKeysymToModifiers (this->x11Display(), XK_ISO_Level3_Latch) | XkbKeysymToModifiers (this->x11Display(), XK_ISO_Level3_Lock); int map = 0; for (map = 0; map < 8; map++) { - if ((mask & (1 << map)) != 0) + if ((tqmask & (1 << map)) != 0) break; } if ((map <= 7) && !(icons[map])) { @@ -608,7 +608,7 @@ bool KbStateApplet::x11Event (XEvent *evt) { else mouse->setActiveKey (0); - layout(); + tqlayout(); updateGeometry(); emit updateLayout(); break; @@ -660,7 +660,7 @@ void KbStateApplet::stateChangeRequest (KeyIcon *source, bool latched, bool lock void KbStateApplet::toggleModifier() { showModifiers = !showModifiers; updateMenu(); - layout(); + tqlayout(); updateGeometry(); saveConfig(); emit updateLayout(); @@ -669,7 +669,7 @@ void KbStateApplet::toggleModifier() { void KbStateApplet::toggleLockkeys() { showLockkeys = !showLockkeys; updateMenu(); - layout(); + tqlayout(); updateGeometry(); saveConfig(); emit updateLayout(); @@ -678,7 +678,7 @@ void KbStateApplet::toggleLockkeys() { void KbStateApplet::toggleMouse() { showMouse = !showMouse; updateMenu(); - layout(); + tqlayout(); updateGeometry(); saveConfig(); emit updateLayout(); @@ -687,7 +687,7 @@ void KbStateApplet::toggleMouse() { void KbStateApplet::toggleAccessX() { showAccessX = !showAccessX; updateMenu(); - layout(); + tqlayout(); updateGeometry(); saveConfig(); emit updateLayout(); @@ -712,7 +712,7 @@ void KbStateApplet::configureMouse() { } void KbStateApplet::about() { - KAboutData about("kbstateapplet", I18N_NOOP("Keyboard Status Applet"), "0.2", + KAboutData about("kbstateapplet", I18N_NOOP("Keyboard tqStatus Applet"), "0.2", I18N_NOOP("Panel applet that shows the state of the modifier keys"), KAboutData::License_GPL_V2, "(C) 2004 Gunnar Schmi Dt"); KAboutApplication a(&about, this); a.exec(); @@ -747,8 +747,8 @@ void KbStateApplet::saveConfig() /********************************************************************/ KeyIcon::KeyIcon (int keyId, KInstance *instance, - TQWidget *parent, const char *name) - : StatusIcon (modifierKeys[keyId].name, parent, name) { + TQWidget *tqparent, const char *name) + : StatusIcon (modifierKeys[keyId].name, tqparent, name) { this->instance = instance; this->keyId = keyId; this->tristate = (modifierKeys[keyId].isModifier); @@ -810,7 +810,7 @@ void KeyIcon::drawButton (TQPainter *p) { int y = (height()-locked.height())/2; int o = 0; if (isLocked || isLatched) { - qDrawShadePanel (p, 0, 0, width(), height(), colorGroup(), true, 1, NULL); + qDrawShadePanel (p, 0, 0, width(), height(), tqcolorGroup(), true, 1, NULL); p->fillRect (1,1,width()-2,height()-2, KGlobalSettings::highlightColor()); if (strcmp(modifierKeys[keyId].icon, "")) p->drawPixmap (x+1,y+1, latched); @@ -818,7 +818,7 @@ void KeyIcon::drawButton (TQPainter *p) { o = 1; } else { - qDrawShadePanel (p, 0, 0, width(), height(), colorGroup(), false, 1, NULL); + qDrawShadePanel (p, 0, 0, width(), height(), tqcolorGroup(), false, 1, NULL); if (strcmp(modifierKeys[keyId].icon, "")) p->drawPixmap (x,y, unlatched); black = KGlobalSettings::textColor(); @@ -844,9 +844,9 @@ void KeyIcon::drawButton (TQPainter *p) { p->setPen (black); p->setFont (font); if (!strcmp(modifierKeys[keyId].name, "Alt Graph")) - p->drawText (o,o, width(), height(), Qt::AlignCenter, text); + p->drawText (o,o, width(), height(), TQt::AlignCenter, text); else - p->drawText (o,o, width(), height()*(251)/384, Qt::AlignCenter, text); + p->drawText (o,o, width(), height()*(251)/384, TQt::AlignCenter, text); } if (tristate && isLocked) { p->drawPixmap(x+o,y+o, locked); @@ -855,8 +855,8 @@ void KeyIcon::drawButton (TQPainter *p) { /********************************************************************/ -MouseIcon::MouseIcon (KInstance *instance, TQWidget *parent, const char *name) - : StatusIcon ("", parent, name) +MouseIcon::MouseIcon (KInstance *instance, TQWidget *tqparent, const char *name) + : StatusIcon ("", tqparent, name) { this->instance = instance; state = 0; @@ -958,8 +958,8 @@ void MouseIcon::drawButton (TQPainter *p) { TimeoutIcon::TimeoutIcon (KInstance *instance, const TQString &text, const TQString &featurename, - TQWidget *parent, const char *name) - : StatusIcon (text, parent, name) { + TQWidget *tqparent, const char *name) + : StatusIcon (text, tqparent, name) { this->instance = instance; this->featurename = featurename; glyth = " "; @@ -1046,7 +1046,7 @@ void TimeoutIcon::drawButton (TQPainter *p) { p->setFont (font); if (count == 1) { p->setPen (KGlobalSettings::textColor()); - p->drawText (0,0, width()/2, height()/2, Qt::AlignCenter, text); + p->drawText (0,0, width()/2, height()/2, TQt::AlignCenter, text); } else { TQColor t = KGlobalSettings::textColor(); @@ -1054,26 +1054,26 @@ void TimeoutIcon::drawButton (TQPainter *p) { p->setPen (TQColor ((2*t.red()+3*b.red())/5, (2*t.green()+3*b.green())/5, (2*t.blue()+3*b.blue())/5)); - p->drawText (width()/2,0, width()/2, height(), Qt::AlignCenter, text); + p->drawText (width()/2,0, width()/2, height(), TQt::AlignCenter, text); p->setPen (TQColor ((2*t.red()+b.red())/3, (2*t.green()+b.green())/3, (2*t.blue()+b.blue())/3)); - p->drawText (0,0, width(), height(), Qt::AlignCenter, text); + p->drawText (0,0, width(), height(), TQt::AlignCenter, text); p->setPen (KGlobalSettings::textColor()); - p->drawText (0,0, width()/2, height(), Qt::AlignCenter, text); + p->drawText (0,0, width()/2, height(), TQt::AlignCenter, text); } } /********************************************************************/ -StatusIcon::StatusIcon (const TQString &text, TQWidget *parent, const char *name) - : TQPushButton (text, parent, name) { - setSizePolicy(TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored)); +StatusIcon::StatusIcon (const TQString &text, TQWidget *tqparent, const char *name) + : TQPushButton (text, tqparent, name) { + tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored)); } StatusIcon::~StatusIcon () { } -TQSize StatusIcon::minimumSizeHint () const { +TQSize StatusIcon::tqminimumSizeHint () const { return TQSize (0,0); } diff --git a/kbstateapplet/kbstate.h b/kbstateapplet/kbstate.h index a9b9601..55aca27 100644 --- a/kbstateapplet/kbstate.h +++ b/kbstateapplet/kbstate.h @@ -35,20 +35,22 @@ class KPopupMenu; class StatusIcon : public TQPushButton { Q_OBJECT + TQ_OBJECT public: - StatusIcon (const TQString &text, TQWidget *parent, const char *name=0); + StatusIcon (const TQString &text, TQWidget *tqparent, const char *name=0); ~StatusIcon (); - TQSize minimumSizeHint () const; + TQSize tqminimumSizeHint () const; }; typedef TQPtrList IconList; class TimeoutIcon : public StatusIcon { Q_OBJECT + TQ_OBJECT public: TimeoutIcon (KInstance *instance, const TQString &text, const TQString &featurename, - TQWidget *parent, const char *name=0); + TQWidget *tqparent, const char *name=0); ~TimeoutIcon (); void update (); @@ -72,9 +74,10 @@ private slots: class KeyIcon : public StatusIcon { Q_OBJECT + TQ_OBJECT public: KeyIcon (int keyId, KInstance *instance, - TQWidget *parent, const char *name=0); + TQWidget *tqparent, const char *name=0); ~KeyIcon (); void setState (bool latched, bool locked); void drawButton (TQPainter *p); @@ -102,8 +105,9 @@ private: class MouseIcon : public StatusIcon { Q_OBJECT + TQ_OBJECT public: - MouseIcon (KInstance *instance, TQWidget *parent, const char *name=0); + MouseIcon (KInstance *instance, TQWidget *tqparent, const char *name=0); ~MouseIcon (); void setState (int state); void setActiveKey (int activekey); @@ -130,10 +134,11 @@ class MouseIcon : public StatusIcon { class KbStateApplet : public KPanelApplet { Q_OBJECT + TQ_OBJECT public: KbStateApplet(const TQString& configFile, Type t = Normal, int actions = 0, - TQWidget *parent = 0, const char *name = 0); + TQWidget *tqparent = 0, const char *name = 0); ~KbStateApplet(); int widthForHeight(int height) const; @@ -165,7 +170,7 @@ private slots: private: void loadConfig(); void saveConfig(); - void layout(); + void tqlayout(); int xkb_base_event_type; diff --git a/kmag/kmag.cpp b/kmag/kmag.cpp index 12d660c..80549be 100644 --- a/kmag/kmag.cpp +++ b/kmag/kmag.cpp @@ -126,92 +126,92 @@ KmagApp::~KmagApp() void KmagApp::initActions() { - fileNewWindow = new KAction(i18n("New &Window"), "window_new", KStdAccel::openNew(), this, + fileNewWindow = new KAction(i18n("New &Window"), "window_new", KStdAccel::openNew(), TQT_TQOBJECT(this), TQT_SLOT(slotFileNewWindow()), actionCollection(),"new_window"); fileNewWindow->setToolTip(i18n("Open a new KMagnifier window")); - refreshSwitch = new KAction(i18n("&Stop"), "stop", KStdAccel::reload(), this, + refreshSwitch = new KAction(i18n("&Stop"), "stop", KStdAccel::reload(), TQT_TQOBJECT(this), TQT_SLOT(slotToggleRefresh()), actionCollection(), "start_stop_refresh"); refreshSwitch->setToolTip(i18n("Click to stop window refresh")); refreshSwitch->setWhatsThis(i18n("Clicking on this icon will start / stop\ updating of the display. Stopping the update will zero the processing power\ required (CPU usage)")); - m_pSnapshot = new KAction(i18n("&Save Snapshot As..."), "ksnapshot", KStdAccel::save(), this, + m_pSnapshot = new KAction(i18n("&Save Snapshot As..."), "ksnapshot", KStdAccel::save(), TQT_TQOBJECT(this), TQT_SLOT(saveZoomPixmap()), actionCollection(),"snapshot"); m_pSnapshot->setWhatsThis(i18n("Saves the zoomed view to an image file.")); m_pSnapshot->setToolTip(i18n("Save image to a file")); - m_pPrint = KStdAction::print(this, TQT_SLOT(slotFilePrint()), actionCollection(), "print"); + m_pPrint = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotFilePrint()), actionCollection(), "print"); m_pPrint->setWhatsThis(i18n("Click on this button to print the current zoomed view.")); - m_pQuit = KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection(), "quit"); + m_pQuit = KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotFileQuit()), actionCollection(), "quit"); m_pQuit->setStatusText(i18n("Quits the application")); m_pQuit->setWhatsThis (i18n("Quits the application")); - m_pCopy = KStdAction::copy(this, TQT_SLOT(copyToClipBoard()), actionCollection(), "copy"); + m_pCopy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(copyToClipBoard()), actionCollection(), "copy"); m_pCopy->setWhatsThis(i18n("Click on this button to copy the current zoomed view to the clipboard which you can paste in other applications.")); m_pCopy->setToolTip(i18n("Copy zoomed image to clipboard")); - m_pShowMenu = new KToggleAction(i18n("Show &Menu"), "showmenu", CTRL+Key_M, this, + m_pShowMenu = new KToggleAction(i18n("Show &Menu"), "showmenu", CTRL+Key_M, TQT_TQOBJECT(this), TQT_SLOT(slotShowMenu()), actionCollection(),"show_menu"); #ifdef havesetCheckedState m_pShowMenu->setCheckedState(i18n("Hide &Menu")); #endif - m_pShowMainToolBar = new KToggleAction(i18n("Show Main &Toolbar"), 0, 0, this, + m_pShowMainToolBar = new KToggleAction(i18n("Show Main &Toolbar"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowMainToolBar()), actionCollection(),"show_mainToolBar"); #ifdef havesetCheckedState m_pShowMainToolBar->setCheckedState(i18n("Hide Main &Toolbar")); #endif - m_pShowViewToolBar = new KToggleAction(i18n("Show &View Toolbar"), 0, 0, this, + m_pShowViewToolBar = new KToggleAction(i18n("Show &View Toolbar"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowViewToolBar()), actionCollection(),"show_viewToolBar"); #ifdef havesetCheckedState m_pShowViewToolBar->setCheckedState(i18n("Hide &View Toolbar")); #endif - m_pShowSettingsToolBar = new KToggleAction(i18n("Show &Settings Toolbar"), 0, 0, this, + m_pShowSettingsToolBar = new KToggleAction(i18n("Show &Settings Toolbar"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotShowSettingsToolBar()), actionCollection(),"show_settingsToolBar"); #ifdef havesetCheckedState m_pShowSettingsToolBar->setCheckedState(i18n("Hide &Settings Toolbar")); #endif - m_modeFollowMouse = new KRadioAction(i18n("&Follow Mouse Mode"), "followmouse", Key_F1, this, + m_modeFollowMouse = new KRadioAction(i18n("&Follow Mouse Mode"), "followmouse", Key_F1, TQT_TQOBJECT(this), TQT_SLOT(slotModeFollowMouse()), actionCollection(), "mode_followmouse"); m_modeFollowMouse->setToolTip(i18n("Magnify mouse area into window")); m_modeFollowMouse->setWhatsThis(i18n("In this mode the area around the mouse cursor is shown in a normal window.")); - m_modeSelWin = new KRadioAction(i18n("S&election Window Mode"), "window", Key_F2, this, + m_modeSelWin = new KRadioAction(i18n("S&election Window Mode"), "window", Key_F2, TQT_TQOBJECT(this), TQT_SLOT(slotModeSelWin()), actionCollection(), "mode_selectionwindow"); m_modeSelWin->setToolTip(i18n("Magnify selected area into window")); m_modeSelWin->setWhatsThis(i18n("In this mode a selection window is opened. The selected area is shown in a normal window.")); - m_modeEdgeTop = new KRadioAction(i18n("&Top Screen Edge Mode"), 0, 0, this, + m_modeEdgeTop = new KRadioAction(i18n("&Top Screen Edge Mode"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotModeEdgeTop()), actionCollection(),"mode_edgetop"); m_modeEdgeTop->setToolTip(i18n("Magnify mouse area to top screen edge")); m_modeEdgeTop->setWhatsThis(i18n("In this mode the area around the mouse is magnified to the top screen edge.")); - m_modeEdgeLeft = new KRadioAction(i18n("&Left Screen Edge Mode"), 0, 0, this, + m_modeEdgeLeft = new KRadioAction(i18n("&Left Screen Edge Mode"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotModeEdgeLeft()), actionCollection(),"mode_edgeleft"); m_modeEdgeLeft->setToolTip(i18n("Magnify mouse area to left screen edge")); m_modeEdgeLeft->setWhatsThis(i18n("In this mode the area around the mouse is magnified to the left screen edge.")); - m_modeEdgeRight = new KRadioAction(i18n("&Right Screen Edge Mode"), 0, 0, this, + m_modeEdgeRight = new KRadioAction(i18n("&Right Screen Edge Mode"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotModeEdgeRight()), actionCollection(),"mode_edgeright"); m_modeEdgeRight->setToolTip(i18n("Magnify mouse area to right screen edge")); m_modeEdgeRight->setWhatsThis(i18n("In this mode the area around the mouse is magnified to the right screen edge.")); - m_modeEdgeBottom = new KRadioAction(i18n("&Bottom Screen Edge Mode"), 0, 0, this, + m_modeEdgeBottom = new KRadioAction(i18n("&Bottom Screen Edge Mode"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotModeEdgeBottom()), actionCollection(),"mode_edgebottom"); m_modeEdgeBottom->setToolTip(i18n("Magnify mouse area to bottom screen edge")); m_modeEdgeBottom->setWhatsThis(i18n("In this mode the area around the mouse is magnified to the bottom screen edge.")); - m_hideCursor = new KToggleAction(i18n("Hide Mouse &Cursor"), "hidemouse", Key_F4, this, + m_hideCursor = new KToggleAction(i18n("Hide Mouse &Cursor"), "hidemouse", Key_F4, TQT_TQOBJECT(this), TQT_SLOT(slotToggleHideCursor()), actionCollection(), "hidecursor"); #ifdef havesetCheckedState m_hideCursor->setCheckedState(i18n("Show Mouse &Cursor")); #endif m_hideCursor->setToolTip(i18n("Hide the mouse cursor")); - m_pZoomIn = KStdAction::zoomIn(this, TQT_SLOT(zoomIn()), actionCollection(), "zoom_in"); + m_pZoomIn = KStdAction::zoomIn(TQT_TQOBJECT(this), TQT_SLOT(zoomIn()), actionCollection(), "zoom_in"); m_pZoomIn->setWhatsThis(i18n("Click on this button to zoom-in on the selected region.")); m_pZoomBox = new KSelectAction(i18n("&Zoom"),0,actionCollection(),"zoom"); @@ -219,10 +219,10 @@ void KmagApp::initActions() m_pZoomBox->setWhatsThis(i18n("Select the zoom factor.")); m_pZoomBox->setToolTip(i18n("Zoom factor")); - m_pZoomOut = KStdAction::zoomOut(this, TQT_SLOT(zoomOut()), actionCollection(), "zoom_out"); + m_pZoomOut = KStdAction::zoomOut(TQT_TQOBJECT(this), TQT_SLOT(zoomOut()), actionCollection(), "zoom_out"); m_pZoomOut->setWhatsThis(i18n("Click on this button to zoom-out on the selected region.")); - m_pInvert = new KToggleAction(i18n("&Invert Colors"), 0, Key_F6, this, + m_pInvert = new KToggleAction(i18n("&Invert Colors"), 0, Key_F6, TQT_TQOBJECT(this), TQT_SLOT(slotToggleInvert()), actionCollection(), "invert"); m_pRotationBox = new KSelectAction(i18n("&Rotation"),0,actionCollection(),"rotation"); @@ -232,8 +232,8 @@ void KmagApp::initActions() // KHelpMenu *newHelpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData()); - m_keyConf = KStdAction::keyBindings( this, TQT_SLOT( slotConfKeys() ), actionCollection(), "key_conf"); - m_toolConf = KStdAction::configureToolbars( this, TQT_SLOT( slotEditToolbars() ), + m_keyConf = KStdAction::keyBindings( TQT_TQOBJECT(this), TQT_SLOT( slotConfKeys() ), actionCollection(), "key_conf"); + m_toolConf = KStdAction::configureToolbars( TQT_TQOBJECT(this), TQT_SLOT( slotEditToolbars() ), actionCollection(), "toolbar_conf"); m_pFPSBox = new KSelectAction(i18n("Re&fresh"),0,actionCollection(),"fps_selector"); @@ -247,7 +247,7 @@ void KmagApp::initActions() void KmagApp::initView() { m_zoomView = new KMagZoomView( this, "ZoomView" ); - m_zoomView->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, m_zoomView->sizePolicy().hasHeightForWidth() ) ); + m_zoomView->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, m_zoomView->sizePolicy().hasHeightForWidth() ) ); m_zoomView->setFrameShape( TQFrame::StyledPanel ); m_zoomView->setFrameShadow( TQFrame::Raised ); @@ -270,11 +270,11 @@ void KmagApp::initConnections() connect(this, TQT_SIGNAL(updateFPSIndex(int)), m_pFPSBox, TQT_SLOT(setCurrentItem(int))); // selector selects a zoom index -> set the zoom index - connect(m_pZoomBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setZoomIndex(int))); - connect(m_pRotationBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setRotationIndex(int))); - connect(m_pFPSBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setFPSIndex(int))); + connect(m_pZoomBox, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(setZoomIndex(int))); + connect(m_pRotationBox, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(setRotationIndex(int))); + connect(m_pFPSBox, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(setFPSIndex(int))); - connect(m_zoomView, TQT_SIGNAL(contextMenu(TQPoint)), this, TQT_SLOT(contextMenu(TQPoint))); + connect(m_zoomView, TQT_SIGNAL(contextMenu(TQPoint)), TQT_TQOBJECT(this), TQT_SLOT(contextMenu(TQPoint))); } /** @@ -550,12 +550,12 @@ void KmagApp::saveZoomPixmap() bool toggled(false); // stop refresh temporarily - if (m_zoomView->getRefreshStatus()) { + if (m_zoomView->getRefreshtqStatus()) { slotToggleRefresh(); toggled = true; } - KURL url = KFileDialog::getSaveURL(TQString::null, + KURL url = KFileDialog::getSaveURL(TQString(), KImageIO::pattern(KImageIO::Writing), 0,i18n("Save Snapshot As")); @@ -571,7 +571,7 @@ void KmagApp::saveZoomPixmap() KMessageBox::error(0, i18n("Unable to upload file over the network."), i18n("Error Writing File")); } else { - KMessageBox::information(0, i18n("Current zoomed image saved to\n%1").arg(url.prettyURL()), + KMessageBox::information(0, i18n("Current zoomed image saved to\n%1").tqarg(url.prettyURL()), i18n("Information"), "save_confirm"); } } @@ -583,7 +583,7 @@ void KmagApp::saveZoomPixmap() KMessageBox::error(0, i18n("Unable to save file. Please check if you have permission to write to the directory."), i18n("Error Writing File")); } else { - KMessageBox::information(0, i18n("Current zoomed image saved to\n%1").arg(url.prettyURL()), + KMessageBox::information(0, i18n("Current zoomed image saved to\n%1").tqarg(url.prettyURL()), i18n("Information"), "save_confirm"); } } @@ -597,7 +597,7 @@ void KmagApp::saveZoomPixmap() void KmagApp::slotToggleRefresh() { m_zoomView->toggleRefresh(); - if(m_zoomView->getRefreshStatus()) { + if(m_zoomView->getRefreshtqStatus()) { refreshSwitch->setIcon("stop.png"); refreshSwitch->setText(i18n("Stop")); refreshSwitch->setToolTip(i18n("Click to stop window update")); @@ -799,7 +799,7 @@ void KmagApp::slotFileNewWindow() void KmagApp::slotFilePrint() { -#ifndef QT_NO_PRINTER +#ifndef TQT_NO_PRINTER bool toggled(false); @@ -810,7 +810,7 @@ void KmagApp::slotFilePrint() #endif // stop refresh temporarily - if (m_zoomView->getRefreshStatus()) { + if (m_zoomView->getRefreshtqStatus()) { slotToggleRefresh(); toggled = true; } @@ -840,7 +840,7 @@ void KmagApp::slotFilePrint() if(toggled) { slotToggleRefresh(); } -#endif // QT_NO_PRINTER +#endif // TQT_NO_PRINTER } void KmagApp::slotFileQuit() @@ -864,7 +864,7 @@ void KmagApp::slotFileQuit() void KmagApp::copyToClipBoard() { - QClipboard *cb=KApplication::clipboard(); + TQClipboard *cb=KApplication::tqclipboard(); cb->setPixmap(m_zoomView->getPixmap()); } @@ -935,7 +935,7 @@ void KmagApp::slotEditToolbars() { saveMainWindowSettings( KGlobal::config(), "MainWindow" ); KEditToolbar dlg( actionCollection() ); - connect( &dlg, TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() ) ); + connect( &dlg, TQT_SIGNAL( newToolbarConfig() ), TQT_TQOBJECT(this), TQT_SLOT( slotNewToolbarConfig() ) ); if ( dlg.exec() ) createGUI(); } diff --git a/kmag/kmag.h b/kmag/kmag.h index 6a27f03..e84a176 100644 --- a/kmag/kmag.h +++ b/kmag/kmag.h @@ -29,7 +29,7 @@ #include "kmagzoomview.h" #include -// include files for Qt +// include files for TQt #include // include files for KDE @@ -57,12 +57,13 @@ class KmagApp : public KMainWindow { Q_OBJECT + TQ_OBJECT public: /** * Construtor of KmagApp, calls all init functions to create the application. */ - KmagApp(TQWidget* parent=0, const char* name=0); + KmagApp(TQWidget* tqparent=0, const char* name=0); /// Default destructor ~KmagApp(); @@ -70,7 +71,7 @@ class KmagApp : public KMainWindow protected: - /** save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration + /** save general Options like all bar positions and status as well as the tqgeometry and the recent file list to the configuration * file */ void saveOptions(); diff --git a/kmag/kmagselrect.cpp b/kmag/kmagselrect.cpp index 68e09b0..4a56d07 100644 --- a/kmag/kmagselrect.cpp +++ b/kmag/kmagselrect.cpp @@ -87,42 +87,42 @@ int getTitleSize () // Construction //-------------------------------------------------------------------------- -KMagSelRect::KMagSelRect(TQWidget *parent) : +KMagSelRect::KMagSelRect(TQWidget *tqparent) : TQRect() { - init(parent); + init(tqparent); } KMagSelRect::KMagSelRect(const TQPoint &topLeft, const TQPoint &bottomRight, - TQWidget *parent) : + TQWidget *tqparent) : TQRect(topLeft, bottomRight) { - init(parent); + init(tqparent); } KMagSelRect::KMagSelRect(const TQPoint &topLeft, const TQSize &size, - TQWidget *parent) : + TQWidget *tqparent) : TQRect(topLeft, size) { - init(parent); + init(tqparent); } KMagSelRect::KMagSelRect(int left, int top, int width, int height, - TQWidget *parent) : + TQWidget *tqparent) : TQRect(left, top, width, height) { - init(parent); + init(tqparent); } -void KMagSelRect::init(TQWidget *parent) +void KMagSelRect::init(TQWidget *tqparent) { - // Make sure parent is the window itself, not a widget within the window - if (parent != 0) - while (parent->parentWidget (true) != 0) - parent=parent->parentWidget (true); + // Make sure tqparent is the window itself, not a widget within the window + if (tqparent != 0) + while (tqparent->tqparentWidget (true) != 0) + tqparent=tqparent->tqparentWidget (true); selectionwindow = 0; - selWindowParent = parent; + selWindowParent = tqparent; m_alwaysVisible = false; } @@ -184,19 +184,19 @@ void KMagSelRect::hide() void KMagSelRect::update() { // make sure the selection window does not go outside of the display - if (height() > TQApplication::desktop()->geometry().height()) - setHeight (TQApplication::desktop()->geometry().height()); - if (width() > TQApplication::desktop()->geometry().width()) - setWidth (TQApplication::desktop()->geometry().width()); + if (height() > TQApplication::desktop()->tqgeometry().height()) + setHeight (TQApplication::desktop()->tqgeometry().height()); + if (width() > TQApplication::desktop()->tqgeometry().width()) + setWidth (TQApplication::desktop()->tqgeometry().width()); if (top() < 0) moveTop (0); if (left() < 0) moveLeft (0); - if (bottom() > TQApplication::desktop()->geometry().bottom()) - moveBottom (TQApplication::desktop()->geometry().bottom()); - if (right() > TQApplication::desktop()->geometry().right()) - moveRight (TQApplication::desktop()->geometry().right()); + if (bottom() > TQApplication::desktop()->tqgeometry().bottom()) + moveBottom (TQApplication::desktop()->tqgeometry().bottom()); + if (right() > TQApplication::desktop()->tqgeometry().right()) + moveRight (TQApplication::desktop()->tqgeometry().right()); if (selectionwindow != 0) selectionwindow->setSelRect (TQRect (topLeft(), bottomRight())); @@ -215,8 +215,8 @@ void KMagSelRect::selWinResized() // KMagSelWin //-------------------------------------------------------------------------- -KMagSelWin::KMagSelWin ( TQWidget * parent, const char * name, WFlags ) : - TQWidget (parent, name, WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop | WType_TopLevel | WX11BypassWM) +KMagSelWin::KMagSelWin ( TQWidget * tqparent, const char * name, WFlags ) : + TQWidget (tqparent, name, WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop | WType_TopLevel | WX11BypassWM) { TQBitmap line (8, 8, line_bits, true); setPaletteBackgroundPixmap (line); @@ -230,25 +230,25 @@ KMagSelWin::KMagSelWin ( TQWidget * parent, const char * name, WFlags ) : connect (titleBar, TQT_SIGNAL (resized (TQPoint)), this, TQT_SLOT (titleMoved (TQPoint))); topLeftCorner = new KMagSelWinCorner (this, "topleft"); - topLeftCorner->setCursor (Qt::SizeFDiagCursor); + topLeftCorner->setCursor (TQt::SizeFDiagCursor); topLeftCorner->setPaletteBackgroundColor (getTitleBtnColor ()); connect (topLeftCorner, TQT_SIGNAL (startResizing ()), this, TQT_SLOT (startResizing ())); connect (topLeftCorner, TQT_SIGNAL (resized (TQPoint)), this, TQT_SLOT (topLeftResized (TQPoint))); topRightCorner = new KMagSelWinCorner (this, "topright"); - topRightCorner->setCursor (Qt::SizeBDiagCursor); + topRightCorner->setCursor (TQt::SizeBDiagCursor); topRightCorner->setPaletteBackgroundColor (getTitleBtnColor ()); connect (topRightCorner, TQT_SIGNAL (startResizing ()), this, TQT_SLOT (startResizing ())); connect (topRightCorner, TQT_SIGNAL (resized (TQPoint)), this, TQT_SLOT (topRightResized (TQPoint))); bottomLeftCorner = new KMagSelWinCorner (this, "bottomleft"); - bottomLeftCorner->setCursor (Qt::SizeBDiagCursor); + bottomLeftCorner->setCursor (TQt::SizeBDiagCursor); bottomLeftCorner->setPaletteBackgroundColor (getTitleBtnColor ()); connect (bottomLeftCorner, TQT_SIGNAL (startResizing ()), this, TQT_SLOT (startResizing ())); connect (bottomLeftCorner, TQT_SIGNAL (resized (TQPoint)), this, TQT_SLOT (bottomLeftResized (TQPoint))); bottomRightCorner = new KMagSelWinCorner (this, "bottomright"); - bottomRightCorner->setCursor (Qt::SizeFDiagCursor); + bottomRightCorner->setCursor (TQt::SizeFDiagCursor); bottomRightCorner->setPaletteBackgroundColor (getTitleBtnColor ()); connect (bottomRightCorner, TQT_SIGNAL (startResizing ()), this, TQT_SLOT (startResizing ())); connect (bottomRightCorner, TQT_SIGNAL (resized (TQPoint)), this, TQT_SLOT (bottomRightResized (TQPoint))); @@ -356,8 +356,8 @@ void KMagSelWin::bottomRightResized ( TQPoint offset ) // KMagSelWinCorner //-------------------------------------------------------------------------- -KMagSelWinCorner::KMagSelWinCorner ( TQWidget * parent, const char * name, WFlags f ) : - TQLabel (parent, name, f) +KMagSelWinCorner::KMagSelWinCorner ( TQWidget * tqparent, const char * name, WFlags f ) : + TQLabel (tqparent, name, f) { setFrameStyle (TQFrame::WinPanel | TQFrame::Raised); setLineWidth (1); diff --git a/kmag/kmagselrect.h b/kmag/kmagselrect.h index e0e8348..9180b36 100644 --- a/kmag/kmagselrect.h +++ b/kmag/kmagselrect.h @@ -22,18 +22,19 @@ #include -// Qt includes +// TQt includes #include #include #include -class KMagSelWinCorner : public QLabel +class KMagSelWinCorner : public TQLabel { Q_OBJECT + TQ_OBJECT public: - KMagSelWinCorner ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ); + KMagSelWinCorner ( TQWidget * tqparent = 0, const char * name = 0, WFlags f = 0 ); virtual ~KMagSelWinCorner(); @@ -51,13 +52,14 @@ protected: virtual void mouseMoveEvent ( TQMouseEvent * e ); }; -class KMagSelWin : public QWidget +class KMagSelWin : public TQWidget { Q_OBJECT + TQ_OBJECT public: - KMagSelWin ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ); + KMagSelWin ( TQWidget * tqparent = 0, const char * name = 0, WFlags f = 0 ); virtual ~KMagSelWin(); @@ -95,16 +97,17 @@ protected: * @author Original : Michael Forster * @author Current : Sarang Lakare */ -class KMagSelRect : public TQObject, public QRect +class KMagSelRect : public TQObject, public TQRect { Q_OBJECT + TQ_OBJECT public: - KMagSelRect(TQWidget *parent=0); + KMagSelRect(TQWidget *tqparent=0); KMagSelRect(const TQPoint &topLeft, const TQPoint &bottomRight, - TQWidget *parent=0); + TQWidget *tqparent=0); KMagSelRect(const TQPoint &topLeft, const TQSize &size, - TQWidget *parent=0); + TQWidget *tqparent=0); KMagSelRect(int left, int top, int width, int height, TQWidget *selWindowParent=0); diff --git a/kmag/kmagzoomview.cpp b/kmag/kmagzoomview.cpp index 4010fce..7608887 100644 --- a/kmag/kmagzoomview.cpp +++ b/kmag/kmagzoomview.cpp @@ -22,7 +22,7 @@ #include "kmagzoomview.h" #include "kmagzoomview.moc" -// include files for Qt +// include files for TQt #include #include #include @@ -80,22 +80,22 @@ static uchar phand_bits[] = { static bool obscuredRegion (TQRegion ®ion, Window winId, Window ignoreId, Window start = 0, int level = -1) { - Window root, parent, *children; uint nchildren; + Window root, tqparent, *tqchildren; uint ntqchildren; if (0 == start) start = qt_xrootwin(); bool winIdFound = false; - if (0 != XQueryTree (qt_xdisplay(), start, &root, &parent, &children, &nchildren)) { - for (uint i=0; i < nchildren; ++i) { + if (0 != XQueryTree (qt_xdisplay(), start, &root, &tqparent, &tqchildren, &ntqchildren)) { + for (uint i=0; i < ntqchildren; ++i) { if (winIdFound) { - if (ignoreId != children [i]) { + if (ignoreId != tqchildren [i]) { XWindowAttributes atts; - XGetWindowAttributes (qt_xdisplay(), children [i], &atts); + XGetWindowAttributes (qt_xdisplay(), tqchildren [i], &atts); if (atts.map_state == IsViewable) region -= TQRegion (atts.x, atts.y, atts.width, atts.height, TQRegion::Rectangle); } } - else if (winId == children [i]) + else if (winId == tqchildren [i]) winIdFound = true; // According to tests, my own window ID is either on toplevel or two levels below. @@ -103,15 +103,15 @@ static bool obscuredRegion (TQRegion ®ion, Window winId, Window ignoreId, Win // then to five recursion levels, and make a full recursive search only if that // was unsuccessful. else if (level > 1) - winIdFound = obscuredRegion (region, winId, ignoreId, children [i], level-1); + winIdFound = obscuredRegion (region, winId, ignoreId, tqchildren [i], level-1); else if (level == -1) - if (! (winIdFound = obscuredRegion (region, winId, ignoreId, children [i], 0))) - if (! (winIdFound = obscuredRegion (region, winId, ignoreId, children [i], 1))) - winIdFound = obscuredRegion (region, winId, ignoreId, children [i], -1); + if (! (winIdFound = obscuredRegion (region, winId, ignoreId, tqchildren [i], 0))) + if (! (winIdFound = obscuredRegion (region, winId, ignoreId, tqchildren [i], 1))) + winIdFound = obscuredRegion (region, winId, ignoreId, tqchildren [i], -1); } - if (children != NULL) - XFree (children); + if (tqchildren != NULL) + XFree (tqchildren); } return winIdFound; @@ -120,8 +120,8 @@ static bool obscuredRegion (TQRegion ®ion, Window winId, Window ignoreId, Win -KMagZoomView::KMagZoomView(TQWidget *parent, const char *name) - : TQScrollView(parent, name), +KMagZoomView::KMagZoomView(TQWidget *tqparent, const char *name) + : TQScrollView(tqparent, name), m_selRect(0, 0, 128, 128, this), m_grabTimer(0), m_mouseViewTimer(0), @@ -136,7 +136,7 @@ KMagZoomView::KMagZoomView(TQWidget *parent, const char *name) KApplication::setGlobalMouseTracking(TRUE); viewport()->setMouseTracking(TRUE); viewport()->setBackgroundMode (NoBackground); - viewport()->setFocusPolicy(TQWidget::StrongFocus); + viewport()->setFocusPolicy(TQ_StrongFocus); m_ctrlKeyPressed = false; m_shiftKeyPressed = false; @@ -227,7 +227,7 @@ void KMagZoomView::resizeEvent( TQResizeEvent * e ) } /** - * Called when the widget is to be repainted + * Called when the widget is to be tqrepainted * * @param p */ @@ -246,7 +246,7 @@ void KMagZoomView::drawContents ( TQPainter * p, int clipx, int clipy, int clipw // show the pixel under mouse cursor if(m_showMouse) { // paint the mouse cursor - paintMouseCursor(&clippedPixmap, calcMousePos (m_refreshSwitch)-TQPoint (areaToPaint.x(), areaToPaint.y())); + paintMouseCursor(TQT_TQPAINTDEVICE(&clippedPixmap), calcMousePos (m_refreshSwitch)-TQPoint (areaToPaint.x(), areaToPaint.y())); } TQPixmap zoomedPixmap; @@ -255,9 +255,9 @@ void KMagZoomView::drawContents ( TQPainter * p, int clipx, int clipy, int clipw if (m_invert) { TQImage zoomedImage; zoomedImage = zoomedPixmap.convertToImage(); - zoomedImage.invertPixels (false); + zoomedImage.tqinvertPixels (false); p->drawImage (TQPoint (clipx-contentsX(), clipy-contentsY()), zoomedImage, zoomedImage.rect(), - Qt::ThresholdDither | Qt::ThresholdAlphaDither | Qt::AvoidDither); + TQt::ThresholdDither | TQt::ThresholdAlphaDither | TQt::AvoidDither); } else { p->drawPixmap (TQPoint (clipx, clipy), zoomedPixmap, zoomedPixmap.rect()); } @@ -283,20 +283,20 @@ void KMagZoomView::paintMouseCursor(TQPaintDevice *dev, TQPoint mousePos) switch(m_showMouse) { case 1: // 1. Square around the pixel - pz.setPen(Qt::white); - pz.setRasterOp(Qt::XorROP); + pz.setPen(TQt::white); + pz.setRasterOp(TQt::XorROP); pz.drawRect(mousePos.x()-1, mousePos.y()-1, 3, 3); break; case 2: { // 2. Arrow cursor - pz.setPen(Qt::black); - pz.setBackgroundColor(Qt::white); + pz.setPen(TQt::black); + pz.setBackgroundColor(TQt::white); TQBitmap sCursor( 16, 16, left_ptr_bits, TRUE ); - TQBitmap mask( 16, 16, left_ptrmsk_bits, TRUE ); - sCursor.setMask(mask); + TQBitmap tqmask( 16, 16, left_ptrmsk_bits, TRUE ); + sCursor.setMask(tqmask); // since hot spot is at 3,1 pz.drawPixmap(mousePos.x()-3, mousePos.y()-1, sCursor); @@ -315,12 +315,12 @@ void KMagZoomView::paintMouseCursor(TQPaintDevice *dev, TQPoint mousePos) case ArrowCursor : { // 2. Arrow cursor - pz.setPen(Qt::black); - pz.setBackgroundColor(Qt::white); + pz.setPen(TQt::black); + pz.setBackgroundColor(TQt::white); TQBitmap sCursor( 16, 16, left_ptr_bits, TRUE ); - TQBitmap mask( 16, 16, left_ptrmsk_bits, TRUE ); - sCursor.setMask(mask); + TQBitmap tqmask( 16, 16, left_ptrmsk_bits, TRUE ); + sCursor.setMask(tqmask); // since hot spot is at 3,1 pz.drawPixmap(mousePos.x()-3, mousePos.y()-1, sCursor); @@ -328,8 +328,8 @@ void KMagZoomView::paintMouseCursor(TQPaintDevice *dev, TQPoint mousePos) break; default: TQBitmap sCursor( 32, 32, phand_bits, TRUE ); - TQBitmap mask( 32, 32, phandm_bits, TRUE ); - sCursor.setMask(mask); + TQBitmap tqmask( 32, 32, phandm_bits, TRUE ); + sCursor.setMask(tqmask); pz.drawPixmap(mousePos.x(), mousePos.y(), sCursor); break; @@ -370,7 +370,7 @@ TQPoint KMagZoomView::calcMousePos(bool updateMousePos) void KMagZoomView::mousePressEvent(TQMouseEvent *e) { switch(e->button()) { - case TQMouseEvent::LeftButton : + case Qt::LeftButton : if(m_ctrlKeyPressed) { // check if currently in resize mode // don't do anything if fitToWindow is enabled @@ -392,10 +392,8 @@ void KMagZoomView::mousePressEvent(TQMouseEvent *e) m_selRect.show(); } else { - #if QT_VERSION >= 300 - // ignore this button press.. so it goes to the parent + // ignore this button press.. so it goes to the tqparent e->ignore(); - #endif } } else if(m_shiftKeyPressed) { // check if currently in move mode @@ -417,10 +415,8 @@ void KMagZoomView::mousePressEvent(TQMouseEvent *e) m_selRect.show(); } else { - #if QT_VERSION >= 300 - // ignore this button press.. so it goes to the parent + // ignore this button press.. so it goes to the tqparent e->ignore(); - #endif } } else { // check if currently in move mode @@ -441,15 +437,13 @@ void KMagZoomView::mousePressEvent(TQMouseEvent *e) m_selRect.show(); } else { - #if QT_VERSION >= 300 - // ignore this button press.. so it goes to the parent + // ignore this button press.. so it goes to the tqparent e->ignore(); - #endif } } break; - case TQMouseEvent::MidButton : + case Qt::MidButton : // check if currently in move mode // don't do anything if follow mouse is enabled if ((m_mouseMode != MoveSelection) && !m_followMouse) { @@ -469,18 +463,14 @@ void KMagZoomView::mousePressEvent(TQMouseEvent *e) m_selRect.show(); } else { - #if QT_VERSION >= 300 - // ignore this button press.. so it goes to the parent + // ignore this button press.. so it goes to the tqparent e->ignore(); - #endif } break; // do nothing default: -#if QT_VERSION >= 300 - // ignore this button press.. so it goes to the parent + // ignore this button press.. so it goes to the tqparent e->ignore(); -#endif break; } } @@ -494,8 +484,8 @@ void KMagZoomView::mousePressEvent(TQMouseEvent *e) void KMagZoomView::mouseReleaseEvent(TQMouseEvent *e) { switch(e->button()) { - case TQMouseEvent::LeftButton : - case TQMouseEvent::MidButton : + case Qt::LeftButton : + case Qt::MidButton : // check if currently in move mode if(m_mouseMode == MoveSelection) { // hide the selection window @@ -503,7 +493,7 @@ void KMagZoomView::mouseReleaseEvent(TQMouseEvent *e) // set the mouse mode to normal m_mouseMode = Normal; - // restore the cursor shape + // restore the cursor tqshape setCursor(arrowCursor); // restore the cursor position @@ -514,7 +504,7 @@ void KMagZoomView::mouseReleaseEvent(TQMouseEvent *e) // set the mouse mode to normal m_mouseMode = Normal; - // restore the cursor shape + // restore the cursor tqshape setCursor(arrowCursor); // restore the cursor position @@ -526,14 +516,14 @@ void KMagZoomView::mouseReleaseEvent(TQMouseEvent *e) // set the mouse mode to normal m_mouseMode = Normal; - // restore the cursor shape + // restore the cursor tqshape setCursor(arrowCursor); } break; - case TQMouseEvent::RightButton : + case Qt::RightButton : break; - case TQMouseEvent::NoButton : + case Qt::NoButton : break; // do nothing @@ -582,16 +572,16 @@ void KMagZoomView::mouseMoveEvent(TQMouseEvent *e) void KMagZoomView::keyPressEvent(TQKeyEvent *e) { int offset = 16; - if (e->state() & TQKeyEvent::ShiftButton) + if (e->state() & TQt::ShiftButton) offset = 1; - if (e->key() == TQKeyEvent::Key_Control) + if (e->key() == TQt::Key_Control) m_ctrlKeyPressed = true; - else if (e->key() == TQKeyEvent::Key_Shift) - m_shiftKeyPressed = true; - else if (e->key() == TQKeyEvent::Key_Left) + else if (e->key() == TQt::Key_Shift) + m_shiftKeyPressed = true; + else if (e->key() == TQt::Key_Left) { - if (e->state() & TQKeyEvent::ControlButton) + if (e->state() & TQt::ControlButton) { if (offset >= m_selRect.width()) m_selRect.setWidth (1); @@ -615,9 +605,9 @@ void KMagZoomView::keyPressEvent(TQKeyEvent *e) } m_selRect.update(); } - else if (e->key() == TQKeyEvent::Key_Right) + else if (e->key() == TQt::Key_Right) { - if (e->state() & TQKeyEvent::ControlButton) + if (e->state() & TQt::ControlButton) m_selRect.setRight (m_selRect.right()+offset); else if (contentsX() < contentsWidth()-visibleWidth()) { @@ -632,9 +622,9 @@ void KMagZoomView::keyPressEvent(TQKeyEvent *e) m_selRect.update(); } - else if (e->key() == TQKeyEvent::Key_Up) + else if (e->key() == TQt::Key_Up) { - if (e->state() & TQKeyEvent::ControlButton) + if (e->state() & TQt::ControlButton) { if (offset >= m_selRect.height()) m_selRect.setHeight (1); @@ -658,9 +648,9 @@ void KMagZoomView::keyPressEvent(TQKeyEvent *e) } m_selRect.update(); } - else if (e->key() == TQKeyEvent::Key_Down) + else if (e->key() == TQt::Key_Down) { - if (e->state() & TQKeyEvent::ControlButton) + if (e->state() & TQt::ControlButton) m_selRect.setBottom (m_selRect.bottom()+offset); else if (contentsY() < contentsHeight()-visibleHeight()) { @@ -680,9 +670,9 @@ void KMagZoomView::keyPressEvent(TQKeyEvent *e) void KMagZoomView::keyReleaseEvent(TQKeyEvent *e) { - if (e->key() == TQKeyEvent::Key_Control) + if (e->key() == TQt::Key_Control) m_ctrlKeyPressed = false; - else if (e->key() == TQKeyEvent::Key_Shift) + else if (e->key() == TQt::Key_Shift) m_shiftKeyPressed = false; else e->ignore(); @@ -716,7 +706,7 @@ void KMagZoomView::fitToWindow() m_selRect.moveCenter(currCenter); m_selRect.update(); - viewport()->repaint(false); + viewport()->tqrepaint(false); } void KMagZoomView::setFitToWindow(bool fit) @@ -761,18 +751,18 @@ void KMagZoomView::grabFrame() intersection &= TQRegion (selRect, TQRegion::Rectangle); // We don't want to overpaint other windows that happen to be on top - obscuredRegion (intersection, topLevelWidget()->winId(), m_selRect.winId()); + obscuredRegion (intersection, tqtopLevelWidget()->winId(), m_selRect.winId()); intersection.translate (-selRect.x(), -selRect.y()); TQPainter painter (&m_grabbedPixmap, true); - TQMemArray rects (intersection.rects()); + TQMemArray rects (intersection.tqrects()); for (uint i = 0; i < rects.size(); i++) painter.fillRect (rects[i], TQBrush (TQColor (128, 128, 128))); - // call repaint to display the newly grabbed image + // call tqrepaint to display the newly grabbed image TQRect newSize = m_zoomMatrix.mapRect (m_grabbedPixmap.rect()); resizeContents (newSize.width(), newSize.height()); - viewport()->repaint(false); + viewport()->tqrepaint(false); } @@ -785,7 +775,7 @@ void KMagZoomView::updateMouseView() if(m_selRect.left() <= pos.x() && pos.x() <= m_selRect.right() && m_selRect.top() <= pos.y() && pos.y() <= m_selRect.bottom() && m_refreshSwitch) - viewport()->repaint(false); + viewport()->tqrepaint(false); } /** @@ -811,7 +801,7 @@ void KMagZoomView::setZoom(float zoom) { m_zoom = zoom; updateMatrix(); - viewport()->repaint(); + viewport()->tqrepaint(); } /** @@ -821,7 +811,7 @@ void KMagZoomView::setRotation(int rotation) { m_rotation = rotation; updateMatrix(); - viewport()->repaint(); + viewport()->tqrepaint(); } /** @@ -830,7 +820,7 @@ void KMagZoomView::setRotation(int rotation) void KMagZoomView::setInvertation(bool invert) { m_invert = invert; - viewport()->repaint(); + viewport()->tqrepaint(); } /** @@ -899,7 +889,7 @@ TQPixmap KMagZoomView::getPixmap() TQPixmap mousePixmap(m_grabbedPixmap); // paint the mouse cursor w/o updating to a newer position - paintMouseCursor(&mousePixmap, calcMousePos(false)); + paintMouseCursor(TQT_TQPAINTDEVICE(&mousePixmap), calcMousePos(false)); return(mousePixmap); } else { // no mouse cursor diff --git a/kmag/kmagzoomview.h b/kmag/kmagzoomview.h index 7b631ae..0c492cb 100644 --- a/kmag/kmagzoomview.h +++ b/kmag/kmagzoomview.h @@ -24,7 +24,7 @@ #include #endif -// include files for Qt +// include files for TQt #include #include #include @@ -43,12 +43,13 @@ * @author Olaf Schmikt * @author Sarang Lakare */ -class KMagZoomView : public QScrollView +class KMagZoomView : public TQScrollView { Q_OBJECT + TQ_OBJECT public: /// Constructor for the main view - KMagZoomView(TQWidget *parent = 0, const char *name=0); + KMagZoomView(TQWidget *tqparent = 0, const char *name=0); /// Destructor for the main view ~KMagZoomView(); @@ -60,7 +61,7 @@ class KMagZoomView : public QScrollView TQPixmap getPixmap(); /// Returns the state of the refresh switch - bool getRefreshStatus() const { return m_refreshSwitch; }; + bool getRefreshtqStatus() const { return m_refreshSwitch; }; /// Returns teh status of followMouse bool getFollowMouse() const { return m_followMouse; }; @@ -69,7 +70,7 @@ class KMagZoomView : public QScrollView bool getShowSelRect() const { return (m_selRect.getAlwaysVisible()); }; /// Get the coordinates of the selection rectangle - TQRect getSelRectPos() const { return static_cast(m_selRect); }; + TQRect getSelRectPos() const { return (TQRect&)(m_selRect); }; /// Returns the current state of show mouse unsigned int getShowMouseType() const; @@ -131,7 +132,7 @@ class KMagZoomView : public QScrollView /// Called when the widget has been resized void resizeEvent(TQResizeEvent *e); - /// Called when the widget is to be repainted + /// Called when the widget is to be tqrepainted void drawContents ( TQPainter * p, int clipx, int clipy, int clipw, int cliph ); /// This function calculates the mouse position relative to the image diff --git a/kmousetool/kmousetool/kmousetool.cpp b/kmousetool/kmousetool/kmousetool.cpp index c54da8a..3e03e23 100644 --- a/kmousetool/kmousetool/kmousetool.cpp +++ b/kmousetool/kmousetool/kmousetool.cpp @@ -147,7 +147,7 @@ void KMouseTool::timerEvent( TQTimerEvent * ) return; if (!continue_timer) { - killTimers(); + TQT_TQOBJECT(this)->killTimers(); return; } @@ -250,7 +250,7 @@ void KMouseTool::playTickSound() // TQSound::play(mSoundFileName); } -KMouseTool::KMouseTool(TQWidget *parent, const char *name) : KMouseToolUI(parent, name) +KMouseTool::KMouseTool(TQWidget *tqparent, const char *name) : KMouseToolUI(tqparent, name) { init_vars(); resetSettings(); @@ -608,7 +608,7 @@ void KMouseTool::aboutSelected() -KMouseToolTray::KMouseToolTray (TQWidget *parent, const char *name) : KSystemTray (parent, name) +KMouseToolTray::KMouseToolTray (TQWidget *tqparent, const char *name) : KSystemTray (tqparent, name) { startStopId = contextMenu()->insertItem (i18n("&Start"), this, TQT_SIGNAL(startStopSelected())); contextMenu()->insertSeparator(); diff --git a/kmousetool/kmousetool/kmousetool.h b/kmousetool/kmousetool/kmousetool.h index 7f6fa0b..fde5566 100644 --- a/kmousetool/kmousetool/kmousetool.h +++ b/kmousetool/kmousetool/kmousetool.h @@ -55,6 +55,7 @@ class KMouseToolTray; class KMouseTool : public KMouseToolUI { Q_OBJECT + TQ_OBJECT private: MTStroke stroke; @@ -77,7 +78,7 @@ private: TQString autostartdirname; TQString rcfilename; TQString appfilename; - QString mSoundFileName; + TQString mSoundFileName; KAudioPlayer *mplayer; KMouseToolTray *trayIcon; @@ -186,7 +187,7 @@ public: /** * construtor */ - KMouseTool(TQWidget* parent=0, const char *name=0); + KMouseTool(TQWidget* tqparent=0, const char *name=0); /** destructor */ ~KMouseTool(); @@ -194,9 +195,10 @@ public: class KMouseToolTray : public KSystemTray { Q_OBJECT + TQ_OBJECT int startStopId; public: - KMouseToolTray (TQWidget *parent=0, const char *name=0); + KMouseToolTray (TQWidget *tqparent=0, const char *name=0); ~KMouseToolTray(); void updateStartStopText (bool mousetool_is_running); diff --git a/kmousetool/kmousetool/kmousetoolui.ui b/kmousetool/kmousetool/kmousetoolui.ui index 05b3322..5e6b1a9 100644 --- a/kmousetool/kmousetool/kmousetoolui.ui +++ b/kmousetool/kmousetool/kmousetoolui.ui @@ -1,6 +1,6 @@ KMouseToolUI - + KMouseToolUI @@ -29,14 +29,14 @@ Expanding - + 20 30 - + groupBox1 @@ -47,9 +47,9 @@ unnamed - + - layout9 + tqlayout9 @@ -65,14 +65,14 @@ Fixed - + 16 20 - + dragTimeLabel @@ -137,7 +137,7 @@ 5 - + movementLabel @@ -167,7 +167,7 @@ 1 - + cbStroke @@ -175,7 +175,7 @@ &Enable strokes - + dwellTimeLabel @@ -194,7 +194,7 @@ dwellTimeEdit - + cbDrag @@ -205,9 +205,9 @@ true - + - layout5 + tqlayout5 @@ -239,7 +239,7 @@ Expanding - + 31 20 @@ -256,7 +256,7 @@ - + cbStart @@ -264,7 +264,7 @@ Start with &KDE - + cbClick @@ -274,15 +274,15 @@ - + - layout5 + tqlayout5 unnamed - + textLabel1 @@ -300,7 +300,7 @@ false - + WordBreak|AlignJustify|AlignVCenter @@ -314,7 +314,7 @@ Fixed - + 8 8 @@ -339,9 +339,9 @@ - + - layout5 + tqlayout5 @@ -365,7 +365,7 @@ Expanding - + 241 20 @@ -406,7 +406,7 @@ setEnabled(bool) - + knuminput.h knuminput.h diff --git a/kmouth/books/sv-personal.phrasebook b/kmouth/books/sv-personal.phrasebook index 37f7636..cb4efe7 100644 --- a/kmouth/books/sv-personal.phrasebook +++ b/kmouth/books/sv-personal.phrasebook @@ -1,7 +1,7 @@ -Jag kan bara prata med hjälp av den här dumma maskinen. +Jag kan bara prata med hjälp av den här dumma tqmaskinen. Tyvärr är jag ganska trött nu och behöver ta en paus. Tack för att du kom. Trevligt att se dig. diff --git a/kmouth/configwizard.cpp b/kmouth/configwizard.cpp index 3d99005..bce57e4 100644 --- a/kmouth/configwizard.cpp +++ b/kmouth/configwizard.cpp @@ -31,8 +31,8 @@ #include "wordcompletion/wordcompletion.h" #include "wordcompletion/dictionarycreationwizard.h" -ConfigWizard::ConfigWizard (TQWidget *parent, const char *name, KConfig *config) - : KWizard(parent, name, true) +ConfigWizard::ConfigWizard (TQWidget *tqparent, const char *name, KConfig *config) + : KWizard(tqparent, name, true) { setCaption (i18n("Initial Configuration - KMouth")); @@ -88,7 +88,7 @@ void ConfigWizard::initCompletion (KConfig *config) { config->setGroup("Dictionary 0"); config->writeEntry ("Filename", "dictionary.txt"); config->writeEntry ("Name", "Default"); - config->writeEntry ("Language", TQString::null); + config->writeEntry ("Language", TQString()); config->sync(); } } diff --git a/kmouth/configwizard.h b/kmouth/configwizard.h index 112e25a..8f2dd55 100644 --- a/kmouth/configwizard.h +++ b/kmouth/configwizard.h @@ -35,8 +35,9 @@ class CompletionWizardWidget; class ConfigWizard : public KWizard { Q_OBJECT + TQ_OBJECT public: - ConfigWizard (TQWidget *parent, const char *name, KConfig *config); + ConfigWizard (TQWidget *tqparent, const char *name, KConfig *config); ~ConfigWizard(); bool configurationNeeded (); diff --git a/kmouth/kmouth.cpp b/kmouth/kmouth.cpp index 76c715f..83c2797 100644 --- a/kmouth/kmouth.cpp +++ b/kmouth/kmouth.cpp @@ -95,57 +95,57 @@ bool KMouthApp::configured() { void KMouthApp::initActions() { // The "File" menu - fileOpen = new KAction(i18n("&Open as History..."), "phrasehistory_open", KStdAccel::open(), this, TQT_SLOT(slotFileOpen()), actionCollection(),"file_open"); + fileOpen = new KAction(i18n("&Open as History..."), "phrasehistory_open", KStdAccel::open(), TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), actionCollection(),"file_open"); fileOpen->setStatusText(i18n("Opens an existing file as history")); fileOpen->setWhatsThis (i18n("Opens an existing file as history")); - fileSaveAs = new KAction(i18n("Save &History As..."), "phrasehistory_save", KStdAccel::save(), this, TQT_SLOT(slotFileSaveAs()), actionCollection(),"file_save_as"); + fileSaveAs = new KAction(i18n("Save &History As..."), "phrasehistory_save", KStdAccel::save(), TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAs()), actionCollection(),"file_save_as"); fileSaveAs->setStatusText(i18n("Saves the actual history as...")); fileSaveAs->setWhatsThis (i18n("Saves the actual history as...")); - filePrint = new KAction(i18n("&Print History..."), "phrasehistory_print", KStdAccel::print(), this, TQT_SLOT(slotFilePrint()), actionCollection(),"file_print"); + filePrint = new KAction(i18n("&Print History..."), "phrasehistory_print", KStdAccel::print(), TQT_TQOBJECT(this), TQT_SLOT(slotFilePrint()), actionCollection(),"file_print"); filePrint->setStatusText(i18n("Prints out the actual history")); filePrint->setWhatsThis (i18n("Prints out the actual history")); - fileQuit = KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection()); + fileQuit = KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotFileQuit()), actionCollection()); fileQuit->setStatusText(i18n("Quits the application")); fileQuit->setWhatsThis (i18n("Quits the application")); // The "Edit" menu - editCut = KStdAction::cut(phraseList, TQT_SLOT(cut()), actionCollection()); + editCut = KStdAction::cut(TQT_TQOBJECT(phraseList), TQT_SLOT(cut()), actionCollection()); editCut->setStatusText(i18n("Cuts the selected section and puts it to the clipboard")); editCut->setWhatsThis (i18n("Cuts the selected section and puts it to the clipboard. If there is some text selected in the edit field it is placed it on the clipboard. Otherwise the selected sentences in the history (if any) are placed on the clipboard.")); - editCopy = KStdAction::copy(phraseList, TQT_SLOT(copy()), actionCollection()); + editCopy = KStdAction::copy(TQT_TQOBJECT(phraseList), TQT_SLOT(copy()), actionCollection()); editCopy->setStatusText(i18n("Copies the selected section to the clipboard")); editCopy->setWhatsThis (i18n("Copies the selected section to the clipboard. If there is some text selected in the edit field it is copied to the clipboard. Otherwise the selected sentences in the history (if any) are copied to the clipboard.")); - editPaste = KStdAction::paste(phraseList, TQT_SLOT(paste()), actionCollection()); + editPaste = KStdAction::paste(TQT_TQOBJECT(phraseList), TQT_SLOT(paste()), actionCollection()); editPaste->setStatusText(i18n("Pastes the clipboard contents to actual position")); editPaste->setWhatsThis (i18n("Pastes the clipboard contents at the current cursor position into the edit field.")); - editSpeak = new KAction (i18n("&Speak"), "speak", 0, phraseList, TQT_SLOT(speak()), actionCollection(),"edit_speak"); + editSpeak = new KAction (i18n("&Speak"), "speak", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(speak()), actionCollection(),"edit_speak"); editSpeak->setStatusText(i18n("Speaks the currently active sentence(s)")); editSpeak->setWhatsThis (i18n("Speaks the currently active sentence(s). If there is some text in the edit field it is spoken. Otherwise the selected sentences in the history (if any) are spoken.")); // The "Phrase book" menu - phrasebookEdit = new KAction(i18n("&Edit..."), 0, 0, this, TQT_SLOT(slotEditPhrasebook()), actionCollection(),"phrasebook_edit"); + phrasebookEdit = new KAction(i18n("&Edit..."), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotEditPhrasebook()), actionCollection(),"phrasebook_edit"); // The "Options" menu - viewMenuBar = KStdAction::showMenubar(this, TQT_SLOT(slotViewMenuBar()), actionCollection()); - viewToolBar = KStdAction::showToolbar(this, TQT_SLOT(slotViewToolBar()), actionCollection()); + viewMenuBar = KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(slotViewMenuBar()), actionCollection()); + viewToolBar = KStdAction::showToolbar(TQT_TQOBJECT(this), TQT_SLOT(slotViewToolBar()), actionCollection()); viewToolBar->setStatusText(i18n("Enables/disables the toolbar")); viewToolBar->setWhatsThis (i18n("Enables/disables the toolbar")); - viewPhrasebookBar = new KToggleAction (i18n("Show P&hrasebook Bar"), 0, 0, this, TQT_SLOT(slotViewPhrasebookBar()), actionCollection(), "showPhrasebookBar"); + viewPhrasebookBar = new KToggleAction (i18n("Show P&hrasebook Bar"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotViewPhrasebookBar()), actionCollection(), "showPhrasebookBar"); viewPhrasebookBar->setStatusText(i18n("Enables/disables the phrasebook bar")); viewPhrasebookBar->setWhatsThis (i18n("Enables/disables the phrasebook bar")); - viewStatusBar = KStdAction::showStatusbar(this, TQT_SLOT(slotViewStatusBar()), actionCollection()); + viewStatusBar = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(slotViewStatusBar()), actionCollection()); viewStatusBar->setStatusText(i18n("Enables/disables the statusbar")); viewStatusBar->setWhatsThis (i18n("Enables/disables the statusbar")); - configureTTS = new KAction (i18n("&Configure KMouth..."), "configure", 0, this, TQT_SLOT(slotConfigureTTS()), actionCollection(), "configureTTS"); + configureTTS = new KAction (i18n("&Configure KMouth..."), "configure", 0, TQT_TQOBJECT(this), TQT_SLOT(slotConfigureTTS()), actionCollection(), "configureTTS"); configureTTS->setStatusText(i18n("Opens the configuration dialog")); configureTTS->setWhatsThis (i18n("Opens the configuration dialog")); @@ -153,27 +153,27 @@ void KMouthApp::initActions() { // The "Help" menu will automatically get created. // The popup menu of the list of spoken sentences - phraseListSpeak = new KAction (i18n("&Speak"), "speak", 0, phraseList, TQT_SLOT(speakListSelection()), actionCollection(), "phraselist_speak"); + phraseListSpeak = new KAction (i18n("&Speak"), "speak", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(speakListSelection()), actionCollection(), "phraselist_speak"); phraseListSpeak->setStatusText(i18n("Speaks the currently selected phrases in the history")); phraseListSpeak->setWhatsThis (i18n("Speaks the currently selected phrases in the history")); - phraseListRemove = new KAction (i18n("&Delete"), "editdelete", 0, phraseList, TQT_SLOT(removeListSelection()), actionCollection(), "phraselist_remove"); + phraseListRemove = new KAction (i18n("&Delete"), "editdelete", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(removeListSelection()), actionCollection(), "phraselist_remove"); phraseListRemove->setStatusText(i18n("Deletes the currently selected phrases from the history")); phraseListRemove->setWhatsThis (i18n("Deletes the currently selected phrases from the history")); - phraseListCut = new KAction (i18n("Cu&t"), "editcut", 0, phraseList, TQT_SLOT(cutListSelection()), actionCollection(), "phraselist_cut"); + phraseListCut = new KAction (i18n("Cu&t"), "editcut", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(cutListSelection()), actionCollection(), "phraselist_cut"); phraseListCut->setStatusText(i18n("Cuts the currently selected phrases from the history and puts them to the clipboard")); phraseListCut->setWhatsThis (i18n("Cuts the currently selected phrases from the history and puts them to the clipboard")); - phraseListCopy = new KAction (i18n("&Copy"), "editcopy", 0, phraseList, TQT_SLOT(copyListSelection()), actionCollection(), "phraselist_copy"); + phraseListCopy = new KAction (i18n("&Copy"), "editcopy", 0, TQT_TQOBJECT(phraseList), TQT_SLOT(copyListSelection()), actionCollection(), "phraselist_copy"); phraseListCut->setStatusText(i18n("Copies the currently selected phrases from the history to the clipboard")); phraseListCut->setWhatsThis (i18n("Copies the currently selected phrases from the history to the clipboard")); - phraselistSelectAll = new KAction (i18n("Select &All Entries"), 0, 0, phraseList, TQT_SLOT(selectAllEntries()), actionCollection(),"phraselist_select_all"); + phraselistSelectAll = new KAction (i18n("Select &All Entries"), 0, 0, TQT_TQOBJECT(phraseList), TQT_SLOT(selectAllEntries()), actionCollection(),"phraselist_select_all"); phraselistSelectAll->setStatusText(i18n("Selects all phrases in the history")); phraselistSelectAll->setWhatsThis (i18n("Selects all phrases in the history")); - phraselistDeselectAll = new KAction (i18n("D&eselect All Entries"), 0, 0, phraseList, TQT_SLOT(deselectAllEntries()), actionCollection(),"phraselist_deselect_all"); + phraselistDeselectAll = new KAction (i18n("D&eselect All Entries"), 0, 0, TQT_TQOBJECT(phraseList), TQT_SLOT(deselectAllEntries()), actionCollection(),"phraselist_deselect_all"); phraselistDeselectAll->setStatusText(i18n("Deselects all phrases in the history")); phraselistDeselectAll->setWhatsThis (i18n("Deselects all phrases in the history")); @@ -458,7 +458,7 @@ void KMouthApp::slotPhrasebookConfirmed (PhraseBook &book) { delete phrases; phrases = new KActionCollection (this, actionCollection()); - book.addToGUI (popup, toolbar, phrases, this, TQT_SLOT(slotPhraseSelected (const TQString &))); + book.addToGUI (popup, toolbar, phrases, TQT_TQOBJECT(this), TQT_SLOT(slotPhraseSelected (const TQString &))); TQString bookLocation = KApplication::kApplication()->dirs()->saveLocation ("appdata", "/"); if (!bookLocation.isNull() && !bookLocation.isEmpty()) { diff --git a/kmouth/kmouth.h b/kmouth/kmouth.h index ba7756d..e9b18f4 100644 --- a/kmouth/kmouth.h +++ b/kmouth/kmouth.h @@ -24,7 +24,7 @@ #include #endif -// include files for Qt +// include files for TQt // include files for KDE #include @@ -56,11 +56,12 @@ class PhraseBook; class KMouthApp : public KMainWindow { Q_OBJECT + TQ_OBJECT public: /** construtor of KMouthApp, calls all init functions to create the application. */ - KMouthApp(TQWidget* parent=0, const char* name=0); + KMouthApp(TQWidget* tqparent=0, const char* name=0); ~KMouthApp(); /** Returns true if the configuration wizard was not needed or when it * was successfully completed. @@ -78,7 +79,7 @@ class KMouthApp : public KMainWindow void enableMenuEntries(bool existSelectedEntries, bool existDeselectedEntries); protected: - /** save general Options like all bar positions and status as well as the geometry and the recent file list to the configuration + /** save general Options like all bar positions and status as well as the tqgeometry and the recent file list to the configuration * file */ void saveOptions(); diff --git a/kmouth/optionsdialog.cpp b/kmouth/optionsdialog.cpp index a16e1e4..ad98fda 100644 --- a/kmouth/optionsdialog.cpp +++ b/kmouth/optionsdialog.cpp @@ -39,8 +39,8 @@ #include "texttospeechconfigurationwidget.h" #include "speech.h" -PreferencesWidget::PreferencesWidget (TQWidget *parent, const char *name) - : PreferencesUI (parent, name) +PreferencesWidget::PreferencesWidget (TQWidget *tqparent, const char *name) + : PreferencesUI (tqparent, name) { speakCombo->setCurrentItem (1); speak = false; @@ -113,27 +113,27 @@ bool PreferencesWidget::isSpeakImmediately () { /***************************************************************************/ -OptionsDialog::OptionsDialog (TQWidget *parent) +OptionsDialog::OptionsDialog (TQWidget *tqparent) : KDialogBase(IconList, i18n("Configuration"), Ok|Apply|Cancel|Help, Ok, - parent, "configuration", false, true) + tqparent, "configuration", false, true) { setHelp ("config-dialog"); TQPixmap iconGeneral = KGlobal::iconLoader()->loadIcon("configure", KIcon::NoGroup, KIcon::SizeMedium); - TQGrid *pageGeneral = addGridPage (1, Qt::Horizontal, i18n("General Options"), TQString::null, iconGeneral); + TQGrid *pageGeneral = addGridPage (1, Qt::Horizontal, i18n("General Options"), TQString(), iconGeneral); tabCtl = new TQTabWidget (pageGeneral, "general"); behaviourWidget = new PreferencesWidget (tabCtl, "prefPage"); - behaviourWidget->layout()->setMargin(KDialog::marginHint()); + behaviourWidget->tqlayout()->setMargin(KDialog::marginHint()); tabCtl->addTab (behaviourWidget, i18n("&Preferences")); commandWidget = new TextToSpeechConfigurationWidget (tabCtl, "ttsTab"); - commandWidget->layout()->setMargin(KDialog::marginHint()); + commandWidget->tqlayout()->setMargin(KDialog::marginHint()); tabCtl->addTab (commandWidget, i18n("&Text-to-Speech")); TQPixmap iconCompletion = KGlobal::iconLoader()->loadIcon("keyboard", KIcon::NoGroup, KIcon::SizeMedium); - TQGrid *pageCompletion = addGridPage (1, Qt::Horizontal, i18n("Word Completion"), TQString::null, iconCompletion); + TQGrid *pageCompletion = addGridPage (1, Qt::Horizontal, i18n("Word Completion"), TQString(), iconCompletion); completionWidget = new WordCompletionWidget(pageCompletion, "Word Completion widget"); kttsd = loadKttsd(); diff --git a/kmouth/optionsdialog.h b/kmouth/optionsdialog.h index 30f635d..ac50f7d 100644 --- a/kmouth/optionsdialog.h +++ b/kmouth/optionsdialog.h @@ -33,8 +33,9 @@ class WordCompletionWidget; class PreferencesWidget : public PreferencesUI { Q_OBJECT + TQ_OBJECT public: - PreferencesWidget(TQWidget *parent, const char *name); + PreferencesWidget(TQWidget *tqparent, const char *name); ~PreferencesWidget(); void readOptions (KConfig *config); @@ -56,8 +57,9 @@ private: class OptionsDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - OptionsDialog(TQWidget *parent); + OptionsDialog(TQWidget *tqparent); ~OptionsDialog(); void slotCancel(); diff --git a/kmouth/phrasebook/buttonboxui.ui b/kmouth/phrasebook/buttonboxui.ui index abc999b..d2b5d00 100644 --- a/kmouth/phrasebook/buttonboxui.ui +++ b/kmouth/phrasebook/buttonboxui.ui @@ -1,6 +1,6 @@ ButtonBoxUI - + ButtonBoxUI @@ -25,7 +25,7 @@ 6 - + phrasebox @@ -42,7 +42,7 @@ 6 - + keyButtonPlace @@ -55,7 +55,7 @@ With this line edit you define the name of a sub-phrasebook or the contents of a phrase. - + noKey @@ -66,7 +66,7 @@ If you select this option then the selected phrase will not be reachable by a keyboard shortcut. - + customKey @@ -77,7 +77,7 @@ If you select this option then the selected phrase will be reachable by a keyboard shortcut. You can change the shortcut with the button next to this option. - + shortcutLabel @@ -85,7 +85,7 @@ Shortcut for the phrase: - + textLabel @@ -103,5 +103,5 @@ - + diff --git a/kmouth/phrasebook/phrasebook.cpp b/kmouth/phrasebook/phrasebook.cpp index cc5d900..2efc2e6 100644 --- a/kmouth/phrasebook/phrasebook.cpp +++ b/kmouth/phrasebook/phrasebook.cpp @@ -109,7 +109,7 @@ void PhraseBook::print(KPrinter *pPrinter) { for (it = begin(); it != end(); ++it) { TQRect rect = metrics.boundingRect (x+16*(*it).getLevel(), y, w-16*(*it).getLevel(), 0, - Qt::AlignJustify | Qt::WordBreak, + TQt::AlignJustify | TQt::WordBreak, (*it).getPhrase().getPhrase()); if (y+rect.height() > size.height()) { @@ -118,7 +118,7 @@ void PhraseBook::print(KPrinter *pPrinter) { } printpainter.drawText (x+16*(*it).getLevel(),y, w-16*(*it).getLevel(),rect.height(), - Qt::AlignJustify | Qt::WordBreak, + TQt::AlignJustify | TQt::WordBreak, (*it).getPhrase().getPhrase()); y += rect.height(); } @@ -151,7 +151,7 @@ TQCString encodeString (const TQString str) { TQCString res = ""; for (int i = 0; i < (int)str.length(); i++) { TQChar ch = str.at(i); - ushort uc = ch.unicode(); + ushort uc = ch.tqunicode(); TQCString number; number.setNum(uc); if ((uc>127) || (uc<32) || (ch=='<') || (ch=='>') || (ch=='&') || (ch==';')) res = res + "&#" + number + ";"; @@ -249,7 +249,7 @@ bool PhraseBook::save (const KURL &url, bool asPhrasebook) { } } -int PhraseBook::save (TQWidget *parent, const TQString &title, KURL &url, bool phrasebookFirst) { +int PhraseBook::save (TQWidget *tqparent, const TQString &title, KURL &url, bool phrasebookFirst) { // KFileDialog::getSaveURL(...) is not useful here as we need // to know the requested file type. @@ -259,7 +259,7 @@ int PhraseBook::save (TQWidget *parent, const TQString &title, KURL &url, bool p else filters = i18n("*.txt|Plain Text Files (*.txt)\n*.phrasebook|Phrase Books (*.phrasebook)\n*|All Files"); - KFileDialog fdlg(TQString::null,filters, parent, "filedialog", true); + KFileDialog fdlg(TQString(),filters, tqparent, "filedialog", true); fdlg.setCaption(title); fdlg.setOperationMode( KFileDialog::Saving ); @@ -274,20 +274,20 @@ int PhraseBook::save (TQWidget *parent, const TQString &title, KURL &url, bool p } if (KIO::NetAccess::exists(url)) { - if (KMessageBox::warningContinueCancel(0,TQString("%1").arg(i18n("The file %1 already exists. " - "Do you want to overwrite it?").arg(url.url())),i18n("File Exists"),i18n("&Overwrite"))==KMessageBox::Cancel) { + if (KMessageBox::warningContinueCancel(0,TQString("%1").tqarg(i18n("The file %1 already exists. " + "Do you want to overwrite it?").tqarg(url.url())),i18n("File Exists"),i18n("&Overwrite"))==KMessageBox::Cancel) { return 0; } } bool result; if (fdlg.currentFilter() == "*.phrasebook") { - if (url.fileName (false).contains('.') == 0) { + if (url.fileName (false).tqcontains('.') == 0) { url.setFileName (url.fileName(false) + ".phrasebook"); } - else if (url.fileName (false).right (11).contains (".phrasebook", false) == 0) { - int filetype = KMessageBox::questionYesNoCancel (0,TQString("%1").arg(i18n("Your chosen filename %1 has a different extension than .phrasebook. " - "Do you wish to add .phrasebook to the filename?").arg(url.filename())),i18n("File Extension"),i18n("Add"),i18n("Do Not Add")); + else if (url.fileName (false).right (11).tqcontains (".phrasebook", false) == 0) { + int filetype = KMessageBox::questionYesNoCancel (0,TQString("%1").tqarg(i18n("Your chosen filename %1 has a different extension than .phrasebook. " + "Do you wish to add .phrasebook to the filename?").tqarg(url.filename())),i18n("File Extension"),i18n("Add"),i18n("Do Not Add")); if (filetype == KMessageBox::Cancel) { return 0; } @@ -298,12 +298,12 @@ int PhraseBook::save (TQWidget *parent, const TQString &title, KURL &url, bool p result = save (url, true); } else if (fdlg.currentFilter() == "*.txt") { - if (url.fileName (false).right (11).contains (".phrasebook", false) == 0) { + if (url.fileName (false).right (11).tqcontains (".phrasebook", false) == 0) { result = save (url, false); } else { - int filetype = KMessageBox::questionYesNoCancel (0,TQString("%1").arg(i18n("Your chosen filename %1 has the extension .phrasebook. " - "Do you wish to save in phrasebook format?").arg(url.filename())),i18n("File Extension"),i18n("As Phrasebook"),i18n("As Plain Text")); + int filetype = KMessageBox::questionYesNoCancel (0,TQString("%1").tqarg(i18n("Your chosen filename %1 has the extension .phrasebook. " + "Do you wish to save in phrasebook format?").tqarg(url.filename())),i18n("File Extension"),i18n("As Phrasebook"),i18n("As Plain Text")); if (filetype == KMessageBox::Cancel) { return 0; } @@ -339,7 +339,7 @@ bool PhraseBook::open (const KURL &url) { // First: try to load it as a normal phrase book TQFile file(tempFile); - TQXmlInputSource source (&file); + TQXmlInputSource source (TQT_TQIODEVICE(&file)); bool error = !decode (source); // Second: if the file does not contain a phrase book, load it as @@ -374,7 +374,7 @@ void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollect TQObject *receiver, const char *slot) const { if ((popup != 0) || (toolbar != 0)) { TQPtrStack stack; - TQWidget *parent = popup; + TQWidget *tqparent = popup; int level = 0; TQValueListConstIterator it; @@ -384,38 +384,38 @@ void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollect KActionMenu *menu = new KActionMenu("", "phrasebook"); menu->setDelayed(false); phrases->insert(menu); - menu->plug (parent); - if (parent == popup) + menu->plug (tqparent); + if (tqparent == popup) menu->plug (toolbar); - if (parent != 0) - stack.push (parent); - parent = menu->popupMenu(); + if (tqparent != 0) + stack.push (tqparent); + tqparent = menu->popupMenu(); level++; } - while (newLevel < level && (parent != popup)) { - parent = stack.pop(); + while (newLevel < level && (tqparent != popup)) { + tqparent = stack.pop(); level--; } if ((*it).isPhrase()) { Phrase phrase = (*it).getPhrase(); KAction *action = new PhraseAction (phrase.getPhrase(), phrase.getShortcut(), receiver, slot, phrases); - if (parent == popup) + if (tqparent == popup) action->plug (toolbar); - if (parent != 0) - action->plug(parent); + if (tqparent != 0) + action->plug(tqparent); } else { Phrase phrase = (*it).getPhrase(); KActionMenu *menu = new KActionMenu(phrase.getPhrase(), "phrasebook"); menu->setDelayed(false); phrases->insert(menu); - if (parent == popup) + if (tqparent == popup) menu->plug (toolbar); - if (parent != 0) - menu->plug (parent); - stack.push (parent); - parent = menu->popupMenu(); + if (tqparent != 0) + menu->plug (tqparent); + stack.push (tqparent); + tqparent = menu->popupMenu(); level++; } } @@ -451,9 +451,9 @@ PhraseBookDrag::~PhraseBookDrag () { void PhraseBookDrag::setBook (PhraseBook *book) { if (book == 0) { isEmpty = true; - xmlphrasebook.setText(TQString::null); - xml.setText(TQString::null); - plain.setText(TQString::null); + xmlphrasebook.setText(TQString()); + xml.setText(TQString()); + plain.setText(TQString()); } else { isEmpty = false; @@ -477,15 +477,15 @@ const char *PhraseBookDrag::format (int i) const { return xmlphrasebook.format(i/3); } -TQByteArray PhraseBookDrag::encodedData (const char* mime) const { +TQByteArray PhraseBookDrag::tqencodedData (const char* mime) const { TQCString m(mime); m = m.lower(); - if (m.contains("xml-phrasebook")) - return xmlphrasebook.encodedData(mime); - else if (m.contains("xml")) - return xml.encodedData(mime); + if (m.tqcontains("xml-phrasebook")) + return xmlphrasebook.tqencodedData(mime); + else if (m.tqcontains("xml")) + return xml.tqencodedData(mime); else - return plain.encodedData(mime); + return plain.tqencodedData(mime); } bool PhraseBookDrag::canDecode (const TQMimeSource* e) { diff --git a/kmouth/phrasebook/phrasebook.h b/kmouth/phrasebook/phrasebook.h index b0133b1..eb19ea2 100644 --- a/kmouth/phrasebook/phrasebook.h +++ b/kmouth/phrasebook/phrasebook.h @@ -118,7 +118,7 @@ public: * 0, if the user canceled the operation, * -1, if there was an error when saving the file. */ - int save (TQWidget *parent, const TQString &title, KURL &url, bool phrasebookFirst = true); + int save (TQWidget *tqparent, const TQString &title, KURL &url, bool phrasebookFirst = true); /** encodes the phrase book. Returns the encoded xml code. */ TQString encode (); @@ -148,6 +148,7 @@ public: */ class PhraseBookDrag: public TQDragObject { Q_OBJECT + TQ_OBJECT public: PhraseBookDrag (PhraseBook *book, TQWidget *dragSource = 0, const char *name = 0); PhraseBookDrag (TQWidget *dragSource = 0, const char *name = 0); @@ -156,7 +157,7 @@ public: virtual void setBook (PhraseBook *book); const char *format (int i) const; - virtual TQByteArray encodedData (const char *) const; + virtual TQByteArray tqencodedData (const char *) const; static bool canDecode (const TQMimeSource *e); static bool decode (const TQMimeSource *e, PhraseBook *book); @@ -170,9 +171,10 @@ private: class PhraseAction : public KAction { Q_OBJECT + TQ_OBJECT public: - PhraseAction (const TQString& phrase, const TQString& cut, const TQObject* receiver, const char* slot, KActionCollection* parent) - : KAction (phrase, "phrase", KShortcut(cut), 0, 0, parent, phrase.latin1()) { + PhraseAction (const TQString& phrase, const TQString& cut, const TQObject* receiver, const char* slot, KActionCollection* tqparent) + : KAction (phrase, "phrase", KShortcut(cut), 0, 0, tqparent, phrase.latin1()) { this->phrase = phrase; connect (this, TQT_SIGNAL(slotActivated (const TQString &)), receiver, slot); }; diff --git a/kmouth/phrasebook/phrasebookdialog.cpp b/kmouth/phrasebook/phrasebookdialog.cpp index 2abe3d0..6e4deda 100644 --- a/kmouth/phrasebook/phrasebookdialog.cpp +++ b/kmouth/phrasebook/phrasebookdialog.cpp @@ -53,9 +53,9 @@ namespace PhraseBookPrivate { }; } -CheckBookItem::CheckBookItem (TQListViewItem *parent, TQListViewItem *last, +CheckBookItem::CheckBookItem (TQListViewItem *tqparent, TQListViewItem *last, const TQString &text, const TQString &name, const TQString &filename) - : TQCheckListItem (parent, text, TQCheckListItem::CheckBox) + : TQCheckListItem (tqparent, text, TQCheckListItem::CheckBox) { moveItem (last); setText(PhraseBookPrivate::name, name); @@ -67,12 +67,12 @@ CheckBookItem::CheckBookItem (TQListViewItem *parent, TQListViewItem *last, else numberOfBooks = 1; selectedBooks = 0; - ((CheckBookItem*)parent)->childChange (numberOfBooks, selectedBooks); + ((CheckBookItem*)tqparent)->childChange (numberOfBooks, selectedBooks); } -CheckBookItem::CheckBookItem (TQListView *parent, TQListViewItem *last, +CheckBookItem::CheckBookItem (TQListView *tqparent, TQListViewItem *last, const TQString &text, const TQString &name, const TQString &filename) - : TQCheckListItem (parent, text, TQCheckListItem::CheckBox) + : TQCheckListItem (tqparent, text, TQCheckListItem::CheckBox) { moveItem (last); setText(PhraseBookPrivate::name, name); @@ -102,12 +102,12 @@ void CheckBookItem::activate() { void CheckBookItem::stateChange (bool on) { TQListViewItem *item = firstChild(); if (item == 0) { - TQListViewItem *parent = this->parent(); - if (parent != 0) { + TQListViewItem *tqparent = this->tqparent(); + if (tqparent != 0) { if (on) - ((CheckBookItem*)parent)->childChange (0, 1); + ((CheckBookItem*)tqparent)->childChange (0, 1); else - ((CheckBookItem*)parent)->childChange (0, -1); + ((CheckBookItem*)tqparent)->childChange (0, -1); } } else propagateStateChange(); @@ -127,19 +127,19 @@ void CheckBookItem::propagateStateChange () { void CheckBookItem::childChange (int numberDiff, int selDiff) { numberOfBooks += numberDiff; selectedBooks += selDiff; - TQListViewItem *parent = this->parent(); - if (parent != 0) - ((CheckBookItem*)parent)->childChange (numberDiff, selDiff); + TQListViewItem *tqparent = this->tqparent(); + if (tqparent != 0) + ((CheckBookItem*)tqparent)->childChange (numberDiff, selDiff); TQString text = i18n(" (%1 of %2 books selected)"); - text = text.arg(selectedBooks).arg(numberOfBooks); + text = text.tqarg(selectedBooks).tqarg(numberOfBooks); setText(0, this->text(PhraseBookPrivate::name)+text); } /***************************************************************************/ -InitialPhraseBookWidget::InitialPhraseBookWidget (TQWidget *parent, const char *name) - : TQWidget(parent, name) +InitialPhraseBookWidget::InitialPhraseBookWidget (TQWidget *tqparent, const char *name) + : TQWidget(tqparent, name) { TQVBoxLayout *mainLayout = new TQVBoxLayout (this, 0, KDialog::spacingHint()); TQLabel *label = new TQLabel (i18n("Please decide which phrase books you need:"), this, "booksTitle"); @@ -165,7 +165,7 @@ InitialPhraseBookWidget::~InitialPhraseBookWidget () { void InitialPhraseBookWidget::initStandardPhraseBooks() { StandardBookList bookPaths = PhraseBookDialog::standardPhraseBooks(); - TQListViewItem *parent = 0; + TQListViewItem *tqparent = 0; TQListViewItem *last = 0; TQStringList currentNamePath = ""; TQPtrStack stack; @@ -179,26 +179,26 @@ void InitialPhraseBookWidget::initStandardPhraseBooks() { for (; (it1 != currentNamePath.end()) && (it1 != dirs.end()) && (*it1 == *it2); ++it1, ++it2); for (; it1 != currentNamePath.end(); ++it1) { - last = parent; - parent = stack.pop(); + last = tqparent; + tqparent = stack.pop(); } for (; it2 != dirs.end(); ++it2) { - stack.push (parent); + stack.push (tqparent); TQListViewItem *newParent; - if (parent == 0) - newParent = new CheckBookItem (books, last, *it2, *it2, TQString::null); + if (tqparent == 0) + newParent = new CheckBookItem (books, last, *it2, *it2, TQString()); else - newParent = new CheckBookItem (parent, last, *it2, *it2, TQString::null); - parent = newParent; + newParent = new CheckBookItem (tqparent, last, *it2, *it2, TQString()); + tqparent = newParent; last = 0; } currentNamePath = dirs; TQListViewItem *book; - if (parent == 0) + if (tqparent == 0) book = new CheckBookItem (books, last, (*it).name, (*it).name, (*it).filename); else - book = new CheckBookItem (parent, last, (*it).name, (*it).name, (*it).filename); + book = new CheckBookItem (tqparent, last, (*it).name, (*it).name, (*it).filename); last = book; } } @@ -218,7 +218,7 @@ void InitialPhraseBookWidget::createBook () { } while ((item != 0) && (item->nextSibling() == 0)) { - item = item->parent(); + item = item->tqparent(); } if (item != 0) item = item->nextSibling(); @@ -233,8 +233,8 @@ void InitialPhraseBookWidget::createBook () { /***************************************************************************/ -ButtonBoxWidget::ButtonBoxWidget (TQWidget *parent, const char *name) -: ButtonBoxUI (parent, name) { +ButtonBoxWidget::ButtonBoxWidget (TQWidget *tqparent, const char *name) +: ButtonBoxUI (tqparent, name) { keyButtonPlaceLayout = new TQGridLayout (keyButtonPlace, 1, 1, 0, 0, "keyButtonPlaceLayout"); keyButton = new KKeyButton (keyButtonPlace, "key"); @@ -303,10 +303,10 @@ void PhraseBookDialog::initGUI () { treeView->setAllColumnsShowFocus (true); treeView->setSelectionMode (TQListView::Extended); TQWhatsThis::add (treeView, i18n("This list contains the current phrase book in a tree structure. You can select and modify individual phrases and sub phrase books")); - connect (treeView, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(selectionChanged())); - connect (treeView, TQT_SIGNAL(contextMenuRequested (TQListViewItem *, const TQPoint &, int)), this, TQT_SLOT(contextMenuRequested (TQListViewItem *, const TQPoint &, int))); - connect (treeView, TQT_SIGNAL(dropped (TQDropEvent *, TQListViewItem *, TQListViewItem *)), this, TQT_SLOT(slotDropped (TQDropEvent *, TQListViewItem *, TQListViewItem *))); - connect (treeView, TQT_SIGNAL(moved (TQListViewItem *, TQListViewItem *, TQListViewItem *)), this, TQT_SLOT(slotMoved (TQListViewItem *, TQListViewItem *, TQListViewItem *))); + connect (treeView, TQT_SIGNAL(selectionChanged()), TQT_TQOBJECT(this), TQT_SLOT(selectionChanged())); + connect (treeView, TQT_SIGNAL(contextMenuRequested (TQListViewItem *, const TQPoint &, int)), TQT_TQOBJECT(this), TQT_SLOT(contextMenuRequested (TQListViewItem *, const TQPoint &, int))); + connect (treeView, TQT_SIGNAL(dropped (TQDropEvent *, TQListViewItem *, TQListViewItem *)), TQT_TQOBJECT(this), TQT_SLOT(slotDropped (TQDropEvent *, TQListViewItem *, TQListViewItem *))); + connect (treeView, TQT_SIGNAL(moved (TQListViewItem *, TQListViewItem *, TQListViewItem *)), TQT_TQOBJECT(this), TQT_SLOT(slotMoved (TQListViewItem *, TQListViewItem *, TQListViewItem *))); mainLayout->addWidget (treeView); buttonBox = new ButtonBoxWidget (page, "buttonbox"); @@ -322,23 +322,23 @@ void PhraseBookDialog::initGUI () { void PhraseBookDialog::initActions() { // The file menu - fileNewPhrase = new KAction (i18n("&New Phrase"), "phrase_new", 0, this, TQT_SLOT(slotAddPhrase()), actionCollection(),"file_new_phrase"); + fileNewPhrase = new KAction (i18n("&New Phrase"), "phrase_new", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddPhrase()), actionCollection(),"file_new_phrase"); fileNewPhrase->setStatusText(i18n("Adds a new phrase")); fileNewPhrase->setWhatsThis (i18n("Adds a new phrase")); - fileNewBook = new KAction (i18n("New Phrase &Book"), "phrasebook_new", 0, this, TQT_SLOT(slotAddPhrasebook()), actionCollection(),"file_new_book"); + fileNewBook = new KAction (i18n("New Phrase &Book"), "phrasebook_new", 0, TQT_TQOBJECT(this), TQT_SLOT(slotAddPhrasebook()), actionCollection(),"file_new_book"); fileNewBook->setStatusText(i18n("Adds a new phrase book into which other books and phrases can be placed")); fileNewBook->setWhatsThis (i18n("Adds a new phrase book into which other books and phrases can be placed")); - fileSave = KStdAction::save(this, TQT_SLOT(slotSave()), actionCollection()); + fileSave = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotSave()), actionCollection()); fileSave->setStatusText(i18n("Saves the phrase book onto the hard disk")); fileSave->setWhatsThis (i18n("Saves the phrase book onto the hard disk")); - fileImport = new KAction (i18n("&Import..."), "phrasebook_open", 0, this, TQT_SLOT(slotImportPhrasebook()), actionCollection(),"file_import"); + fileImport = new KAction (i18n("&Import..."), "phrasebook_open", 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook()), actionCollection(),"file_import"); fileImport->setStatusText(i18n("Imports a file and adds its contents to the phrase book")); fileImport->setWhatsThis (i18n("Imports a file and adds its contents to the phrase book")); - toolbarImport = new KToolBarPopupAction (i18n("&Import..."), "phrasebook_open", 0, this, TQT_SLOT(slotImportPhrasebook()), actionCollection(),"toolbar_import"); + toolbarImport = new KToolBarPopupAction (i18n("&Import..."), "phrasebook_open", 0, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook()), actionCollection(),"toolbar_import"); toolbarImport->setStatusText(i18n("Imports a file and adds its contents to the phrase book")); toolbarImport->setWhatsThis (i18n("Imports a file and adds its contents to the phrase book")); @@ -346,32 +346,32 @@ void PhraseBookDialog::initActions() { fileImportStandardBook->setStatusText(i18n("Imports a standard phrase book and adds its contents to the phrase book")); fileImportStandardBook->setWhatsThis (i18n("Imports a standard phrase book and adds its contents to the phrase book")); - fileExport = new KAction (i18n("&Export..."), "phrasebook_save", 0, this, TQT_SLOT(slotExportPhrasebook()), actionCollection(),"file_export"); + fileExport = new KAction (i18n("&Export..."), "phrasebook_save", 0, TQT_TQOBJECT(this), TQT_SLOT(slotExportPhrasebook()), actionCollection(),"file_export"); fileExport->setStatusText(i18n("Exports the currently selected phrase(s) or phrase book(s) into a file")); fileExport->setWhatsThis (i18n("Exports the currently selected phrase(s) or phrase book(s) into a file")); - filePrint = KStdAction::print(this, TQT_SLOT(slotPrint()), actionCollection()); + filePrint = KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(slotPrint()), actionCollection()); filePrint->setStatusText(i18n("Prints the currently selected phrase(s) or phrase book(s)")); filePrint->setWhatsThis (i18n("Prints the currently selected phrase(s) or phrase book(s)")); - fileClose = KStdAction::close(this, TQT_SLOT(close()), actionCollection()); + fileClose = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); fileClose->setStatusText(i18n("Closes the window")); fileClose->setWhatsThis (i18n("Closes the window")); // The edit menu - editCut = KStdAction::cut(this, TQT_SLOT(slotCut()), actionCollection()); + editCut = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(slotCut()), actionCollection()); editCut->setStatusText(i18n("Cuts the currently selected entries from the phrase book and puts it to the clipboard")); editCut->setWhatsThis (i18n("Cuts the currently selected entries from the phrase book and puts it to the clipboard")); - editCopy = KStdAction::copy(this, TQT_SLOT(slotCopy()), actionCollection()); + editCopy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(slotCopy()), actionCollection()); editCopy->setStatusText(i18n("Copies the currently selected entry from the phrase book to the clipboard")); editCopy->setWhatsThis (i18n("Copies the currently selected entry from the phrase book to the clipboard")); - editPaste = KStdAction::paste(this, TQT_SLOT(slotPaste()), actionCollection()); + editPaste = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(slotPaste()), actionCollection()); editPaste->setStatusText(i18n("Pastes the clipboard contents to actual position")); editPaste->setWhatsThis (i18n("Pastes the clipboard contents to actual position")); - editDelete = new KAction (i18n("&Delete"), "editdelete", 0, this, TQT_SLOT(slotRemove()), actionCollection(),"edit_delete"); + editDelete = new KAction (i18n("&Delete"), "editdelete", 0, TQT_TQOBJECT(this), TQT_SLOT(slotRemove()), actionCollection(),"edit_delete"); editDelete->setStatusText(i18n("Deletes the selected entries from the phrase book")); editDelete->setWhatsThis (i18n("Deletes the selected entries from the phrase book")); @@ -383,7 +383,7 @@ TQString PhraseBookDialog::displayPath (TQString filename) { TQFileInfo file(filename); TQString path = file.dirPath(); TQString dispPath = ""; - uint position = path.find("/kmouth/books/")+TQString("/kmouth/books/").length(); + uint position = path.tqfind("/kmouth/books/")+TQString("/kmouth/books/").length(); while (path.length() > position) { file.setFile(path); @@ -434,7 +434,7 @@ StandardBookList PhraseBookDialog::standardPhraseBooks() { void PhraseBookDialog::initStandardPhraseBooks () { StandardBookList bookPaths = standardPhraseBooks(); - KActionMenu *parent = fileImportStandardBook; + KActionMenu *tqparent = fileImportStandardBook; TQStringList currentNamePath = "x"; TQPtrStack stack; StandardBookList::iterator it; @@ -450,21 +450,21 @@ void PhraseBookDialog::initStandardPhraseBooks () { for (; (it1 != currentNamePath.end()) && (it1 != dirs.end()) && (*it1 == *it2); ++it1, ++it2); for (; it1 != currentNamePath.end(); ++it1) - parent = stack.pop(); + tqparent = stack.pop(); for (; it2 != dirs.end(); ++it2) { - stack.push (parent); + stack.push (tqparent); KActionMenu *newParent = new KActionMenu (*it2); - parent->insert(newParent); - if (parent == fileImportStandardBook) + tqparent->insert(newParent); + if (tqparent == fileImportStandardBook) newParent->plug(toolbarImport->popupMenu()); - parent = newParent; + tqparent = newParent; } currentNamePath = dirs; KAction *book = new StandardPhraseBookInsertAction ( - url, (*it).name, this, TQT_SLOT(slotImportPhrasebook (const KURL &)), actionCollection()); - parent->insert(book); - if (parent == fileImportStandardBook) + url, (*it).name, TQT_TQOBJECT(this), TQT_SLOT(slotImportPhrasebook (const KURL &)), actionCollection()); + tqparent->insert(book); + if (tqparent == fileImportStandardBook) book->plug(toolbarImport->popupMenu()); } } @@ -567,7 +567,7 @@ void PhraseBookDialog::slotNoKey() { PhraseTreeItem *currentItem = selectedItem (treeView); if (currentItem != 0) { - currentItem->setCut (KShortcut(TQString::null)); + currentItem->setCut (KShortcut(TQString())); buttonBox->keyButton->setShortcut(currentItem->cut(), false); } phrasebookChanged = true; @@ -597,7 +597,7 @@ void PhraseBookDialog::setShortcut( const KShortcut& cut ) { { TQString s = i18n("In order to use the '%1' key as a shortcut, " "it must be combined with the " - "Win, Alt, Ctrl, and/or Shift keys.").arg(TQChar(key.sym())); + "Win, Alt, Ctrl, and/or Shift keys.").tqarg(TQChar(key.sym())); KMessageBox::sorry( this, s, i18n("Invalid Shortcut Key") ); return; } @@ -615,8 +615,8 @@ void PhraseBookDialog::setShortcut( const KShortcut& cut ) { } } -TQListViewItem *PhraseBookDialog::addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book) { - TQListViewItem *newItem = treeView->addBook(parent, after, book); +TQListViewItem *PhraseBookDialog::addBook (TQListViewItem *tqparent, TQListViewItem *after, PhraseBook *book) { + TQListViewItem *newItem = treeView->addBook(tqparent, after, book); if (newItem != 0) { treeView->clearSelection(); treeView->ensureItemVisible(newItem); @@ -631,8 +631,8 @@ TQListViewItem *PhraseBookDialog::addBook (TQListViewItem *item, PhraseBook *boo if (item == 0) return addBook(0, 0, book); else if (((PhraseTreeItem *)item)->isPhrase() || !item->isOpen()) - if (item->parent() != 0) - return addBook(item->parent(), item, book); + if (item->tqparent() != 0) + return addBook(item->tqparent(), item, book); else return addBook(0, item, book); else @@ -667,20 +667,20 @@ void PhraseBookDialog::slotCut () { void PhraseBookDialog::slotCopy () { PhraseBook book; treeView->fillBook (&book, true); - TQApplication::clipboard()->setData(new PhraseBookDrag(&book)); + TQApplication::tqclipboard()->setData(new PhraseBookDrag(&book)); } void PhraseBookDialog::slotPaste () { PhraseBook book; - if (PhraseBookDrag::decode(TQApplication::clipboard()->data(), &book)) { + if (PhraseBookDrag::decode(TQApplication::tqclipboard()->data(), &book)) { addBook (treeView->currentItem(), &book); } } -void PhraseBookDialog::slotDropped (TQDropEvent *e, TQListViewItem *parent, TQListViewItem *after) { +void PhraseBookDialog::slotDropped (TQDropEvent *e, TQListViewItem *tqparent, TQListViewItem *after) { PhraseBook book; if (PhraseBookDrag::decode(e, &book)) { - addBook(parent, after, &book); + addBook(tqparent, after, &book); } } @@ -719,7 +719,7 @@ void PhraseBookDialog::slotSave () { } void PhraseBookDialog::slotImportPhrasebook () { - KURL url=KFileDialog::getOpenURL(TQString::null, + KURL url=KFileDialog::getOpenURL(TQString(), i18n("*.phrasebook|Phrase Books (*.phrasebook)\n*.txt|Plain Text Files (*.txt)\n*|All Files"), this, i18n("Import Phrasebook")); slotImportPhrasebook (url); @@ -731,7 +731,7 @@ void PhraseBookDialog::slotImportPhrasebook (const KURL &url) { if (book.open (url)) addBook(treeView->currentItem(), &book); else - KMessageBox::sorry(this,i18n("There was an error loading file\n%1").arg( url.url() )); + KMessageBox::sorry(this,i18n("There was an error loading file\n%1").tqarg( url.url() )); } } @@ -741,7 +741,7 @@ void PhraseBookDialog::slotExportPhrasebook () { KURL url; if (book.save (this, i18n("Export Phrase Book"), url) == -1) - KMessageBox::sorry(this,i18n("There was an error saving file\n%1").arg( url.url() )); + KMessageBox::sorry(this,i18n("There was an error saving file\n%1").tqarg( url.url() )); } void PhraseBookDialog::slotPrint() diff --git a/kmouth/phrasebook/phrasebookdialog.h b/kmouth/phrasebook/phrasebookdialog.h index a3bc352..1a09a79 100644 --- a/kmouth/phrasebook/phrasebookdialog.h +++ b/kmouth/phrasebook/phrasebookdialog.h @@ -50,9 +50,9 @@ typedef TQValueList StandardBookList; class CheckBookItem : public TQCheckListItem { public: - CheckBookItem (TQListViewItem *parent, TQListViewItem *last, + CheckBookItem (TQListViewItem *tqparent, TQListViewItem *last, const TQString &text, const TQString &name, const TQString &filename); - CheckBookItem (TQListView *parent, TQListViewItem *last, + CheckBookItem (TQListView *tqparent, TQListViewItem *last, const TQString &text, const TQString &name, const TQString &filename); ~CheckBookItem(); @@ -74,8 +74,9 @@ private: class InitialPhraseBookWidget : public TQWidget { Q_OBJECT + TQ_OBJECT public: - InitialPhraseBookWidget(TQWidget *parent, const char *name); + InitialPhraseBookWidget(TQWidget *tqparent, const char *name); ~InitialPhraseBookWidget(); void createBook(); @@ -94,9 +95,10 @@ private: */ class StandardPhraseBookInsertAction : public KAction { Q_OBJECT + TQ_OBJECT public: - StandardPhraseBookInsertAction (const KURL &url, const TQString& name, const TQObject* receiver, const char* slot, KActionCollection* parent) - : KAction (name, "phrasebook", 0, 0, 0, parent, 0) { + StandardPhraseBookInsertAction (const KURL &url, const TQString& name, const TQObject* receiver, const char* slot, KActionCollection* tqparent) + : KAction (name, "phrasebook", 0, 0, 0, tqparent, 0) { this->url = url; connect (this, TQT_SIGNAL(slotActivated (const KURL &)), receiver, slot); }; @@ -123,7 +125,7 @@ private: */ class ButtonBoxWidget : public ButtonBoxUI { public: - ButtonBoxWidget (TQWidget *parent = 0, const char *name = 0); + ButtonBoxWidget (TQWidget *tqparent = 0, const char *name = 0); ~ButtonBoxWidget (); KKeyButton *keyButton; @@ -141,6 +143,7 @@ protected: class PhraseBookDialog : public KMainWindow { friend class InitialPhraseBookWidget; Q_OBJECT + TQ_OBJECT private: /** Constructor. It is private because this class implements the singleton * pattern. For creating the instance of the dialog, use the get() method. @@ -184,7 +187,7 @@ public slots: void slotExportPhrasebook (); void slotPrint (); - void slotDropped (TQDropEvent *e, TQListViewItem *parent, TQListViewItem *after); + void slotDropped (TQDropEvent *e, TQListViewItem *tqparent, TQListViewItem *after); void slotMoved (TQListViewItem *item, TQListViewItem *, TQListViewItem *); signals: @@ -199,7 +202,7 @@ private: /** initializes the list of standard phrase books */ void initStandardPhraseBooks (); - TQListViewItem *addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book); + TQListViewItem *addBook (TQListViewItem *tqparent, TQListViewItem *after, PhraseBook *book); TQListViewItem *addBook (TQListViewItem *item, PhraseBook *book); void setShortcut (const KShortcut &cut); diff --git a/kmouth/phrasebook/phrasebookparser.h b/kmouth/phrasebook/phrasebookparser.h index a858b4f..fe9db9f 100644 --- a/kmouth/phrasebook/phrasebookparser.h +++ b/kmouth/phrasebook/phrasebookparser.h @@ -24,7 +24,7 @@ /** * This class implements a parser for both the phrase list and for phrase - * books. It is intended to be used together with the Qt SAX2 framework. + * books. It is intended to be used together with the TQt SAX2 framework. * @author Gunnar Schmi Dt */ diff --git a/kmouth/phrasebook/phrasetree.cpp b/kmouth/phrasebook/phrasetree.cpp index 6ffbaee..dcd08c6 100644 --- a/kmouth/phrasebook/phrasetree.cpp +++ b/kmouth/phrasebook/phrasetree.cpp @@ -28,8 +28,8 @@ #include "phrasebookdialog.h" #include "phrasebook.h" -PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon) - : KListViewItem (parent, after, phrase) +PhraseTreeItem::PhraseTreeItem (TQListView *tqparent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon) + : KListViewItem (tqparent, after, phrase) { isPhraseValue = true; cutValue = shortcut; @@ -38,8 +38,8 @@ PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQStr setExpandable (false); } -PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon) - : KListViewItem (parent, after, phrase) +PhraseTreeItem::PhraseTreeItem (TQListViewItem *tqparent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon) + : KListViewItem (tqparent, after, phrase) { isPhraseValue = true; cutValue = shortcut; @@ -47,15 +47,15 @@ PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, T setPixmap(0, icon); setExpandable (false); } -PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon) - : KListViewItem (parent, after, name) +PhraseTreeItem::PhraseTreeItem (TQListView *tqparent, TQListViewItem *after, TQString name, TQPixmap icon) + : KListViewItem (tqparent, after, name) { isPhraseValue = false; setPixmap(0, icon); setExpandable (true); } -PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString name, TQPixmap icon) - : KListViewItem (parent, after, name) +PhraseTreeItem::PhraseTreeItem (TQListViewItem *tqparent, TQListViewItem *after, TQString name, TQPixmap icon) + : KListViewItem (tqparent, after, name) { isPhraseValue = false; setPixmap(0, icon); @@ -74,8 +74,8 @@ void PhraseTreeItem::setCut (KShortcut cut) { // *************************************************************************** -PhraseTree::PhraseTree (TQWidget *parent, const char *name) - : KListView (parent, name) +PhraseTree::PhraseTree (TQWidget *tqparent, const char *name) + : KListView (tqparent, name) { phrasebook_open = KGlobal::iconLoader()->loadIcon("phrasebook", KIcon::Small); phrasebook_closed = KGlobal::iconLoader()->loadIcon("phrasebook_closed", KIcon::Small); @@ -90,14 +90,14 @@ PhraseTree::~PhraseTree (){ namespace PhraseTreePrivate { TQListViewItem *prevSibling (TQListViewItem *item) { - TQListViewItem *parent = item->parent(); + TQListViewItem *tqparent = item->tqparent(); TQListViewItem *above = item->itemAbove(); - if (above == parent) + if (above == tqparent) return 0; - while (above->parent() != parent) - above = above->parent(); + while (above->tqparent() != tqparent) + above = above->tqparent(); return above; } @@ -109,25 +109,25 @@ namespace PhraseTreePrivate { if (item == 0) return false; - TQListViewItem *parent = item->parent(); + TQListViewItem *tqparent = item->tqparent(); TQListViewItem *above = item->itemAbove(); if (above == 0) return false; - else if (above == parent) { - *newParent = parent->parent(); - *newAbove = prevSibling (parent); + else if (above == tqparent) { + *newParent = tqparent->tqparent(); + *newAbove = prevSibling (tqparent); return true; } - else if (above->parent() == parent) { - *newParent = parent; + else if (above->tqparent() == tqparent) { + *newParent = tqparent; *newAbove = prevSibling (above); return true; } else { - while (above->parent()->parent() != parent) - above = above->parent(); - *newParent = above->parent(); + while (above->tqparent()->tqparent() != tqparent) + above = above->tqparent(); + *newParent = above->tqparent(); *newAbove = above; return true; } @@ -140,14 +140,14 @@ namespace PhraseTreePrivate { if (item == 0) return false; - TQListViewItem *parent = item->parent(); + TQListViewItem *tqparent = item->tqparent(); TQListViewItem *below = item->nextSibling(); - if (parent == 0 && below == 0) + if (tqparent == 0 && below == 0) return false; - else if (parent != 0 && below == 0) { - *newParent = parent->parent(); - *newAbove = parent; + else if (tqparent != 0 && below == 0) { + *newParent = tqparent->tqparent(); + *newAbove = tqparent; return true; } else if (below->isOpen()) { @@ -156,7 +156,7 @@ namespace PhraseTreePrivate { return true; } else { - *newParent = parent; + *newParent = tqparent; *newAbove = below; return true; } @@ -195,32 +195,32 @@ namespace PhraseTreePrivate { if (item == 0) return false; - TQListViewItem *parent = item->parent(); + TQListViewItem *tqparent = item->tqparent(); - if (parent == 0) + if (tqparent == 0) return false; else { - *newParent = parent->parent(); - *newAbove = parent; + *newParent = tqparent->tqparent(); + *newAbove = tqparent; return true; } } } void PhraseTree::moveItem (TQListViewItem *item, - TQListViewItem *parent, + TQListViewItem *tqparent, TQListViewItem *above) { if (item != 0) { - if (item->parent() == 0) + if (item->tqparent() == 0) takeItem (item); else - item->parent()->takeItem (item); + item->tqparent()->takeItem (item); - if (parent == 0) + if (tqparent == 0) insertItem (item); else - parent->insertItem (item); + tqparent->insertItem (item); item->moveItem(above); } @@ -241,7 +241,7 @@ bool PhraseTree::hasSelectedItems() { } else { while ((i != 0) && (i->nextSibling() == 0)) { - i = i->parent(); + i = i->tqparent(); level--; } if (i != 0) @@ -267,7 +267,7 @@ void PhraseTree::deleteSelectedItems() { } else { while ((i != 0) && (i->nextSibling() == 0)) { - i = i->parent(); + i = i->tqparent(); } if (i != 0) i = i->nextSibling(); @@ -281,15 +281,15 @@ void PhraseTree::deleteSelectedItems() { } void PhraseTree::keyPressEvent (TQKeyEvent *e) { - if ((e->state() & Qt::KeyButtonMask) == Qt::AltButton) { - if (e->key() == Qt::Key_Up) { + if ((e->state() & TQt::KeyButtonMask) == TQt::AltButton) { + if (e->key() == TQt::Key_Up) { TQListViewItem *item = currentItem(); if ((item != 0) && (item->isSelected())) { - TQListViewItem *parent; + TQListViewItem *tqparent; TQListViewItem *above; - if (PhraseTreePrivate::findAbovePosition (item, &parent, &above)) { - moveItem(item, parent, above); + if (PhraseTreePrivate::findAbovePosition (item, &tqparent, &above)) { + moveItem(item, tqparent, above); setCurrentItem (item); item->setSelected(true); } @@ -297,14 +297,14 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) { e->accept(); return; } - else if (e->key() == Qt::Key_Down) { + else if (e->key() == TQt::Key_Down) { TQListViewItem *item = currentItem(); if ((item != 0) && (item->isSelected())) { - TQListViewItem *parent; + TQListViewItem *tqparent; TQListViewItem *above; - if (PhraseTreePrivate::findBelowPosition (item, &parent, &above)) { - moveItem(item, parent, above); + if (PhraseTreePrivate::findBelowPosition (item, &tqparent, &above)) { + moveItem(item, tqparent, above); setCurrentItem (item); item->setSelected(true); } @@ -312,14 +312,14 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) { e->accept(); return; } - else if (e->key() == Qt::Key_Left) { + else if (e->key() == TQt::Key_Left) { TQListViewItem *item = currentItem(); if ((item != 0) && (item->isSelected())) { - TQListViewItem *parent; + TQListViewItem *tqparent; TQListViewItem *above; - if (PhraseTreePrivate::findLeftPosition (item, &parent, &above)) { - moveItem(item, parent, above); + if (PhraseTreePrivate::findLeftPosition (item, &tqparent, &above)) { + moveItem(item, tqparent, above); setCurrentItem (item); item->setSelected(true); } @@ -327,14 +327,14 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) { e->accept(); return; } - else if (e->key() == Qt::Key_Right) { + else if (e->key() == TQt::Key_Right) { TQListViewItem *item = currentItem(); if ((item != 0) && (item->isSelected())) { - TQListViewItem *parent; + TQListViewItem *tqparent; TQListViewItem *above; - if (PhraseTreePrivate::findRightPosition (item, &parent, &above)) { - moveItem(item, parent, above); + if (PhraseTreePrivate::findRightPosition (item, &tqparent, &above)) { + moveItem(item, tqparent, above); setCurrentItem (item); item->setSelected(true); } @@ -346,57 +346,57 @@ void PhraseTree::keyPressEvent (TQKeyEvent *e) { KListView::keyPressEvent(e); } -PhraseTreeItem *PhraseTree::insertPhrase (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TQString shortcut) { +PhraseTreeItem *PhraseTree::insertPhrase (TQListViewItem *tqparent, TQListViewItem *after, TQString phrase, TQString shortcut) { KShortcut cut = KShortcut(shortcut); if (isKeyPresent (cut, 0, false)) - cut = KShortcut(TQString::null); + cut = KShortcut(TQString()); - if (parent == 0) + if (tqparent == 0) return new PhraseTreeItem (this, after, phrase, cut, this->phrase); else - return new PhraseTreeItem (parent, after, phrase, cut, this->phrase); + return new PhraseTreeItem (tqparent, after, phrase, cut, this->phrase); } -PhraseTreeItem *PhraseTree::insertBook (TQListViewItem *parent, TQListViewItem *after, TQString name) { - if (parent == 0) +PhraseTreeItem *PhraseTree::insertBook (TQListViewItem *tqparent, TQListViewItem *after, TQString name) { + if (tqparent == 0) return new PhraseTreeItem (this, after, name, phrasebook_closed); else - return new PhraseTreeItem (parent, after, name, phrasebook_closed); + return new PhraseTreeItem (tqparent, after, name, phrasebook_closed); } -TQListViewItem *PhraseTree::addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book) { +TQListViewItem *PhraseTree::addBook (TQListViewItem *tqparent, TQListViewItem *after, PhraseBook *book) { TQListViewItem *last = after; int level = 0; PhraseBookEntryList::iterator it; for (it = book->begin(); it != book->end(); ++it) { int newLevel = (*it).getLevel(); while (level < newLevel) { - parent = insertBook(parent, last, ""); + tqparent = insertBook(tqparent, last, ""); last = 0; level++; } while (level > newLevel) { - last = parent; - if (parent != 0) - parent = parent->parent(); + last = tqparent; + if (tqparent != 0) + tqparent = tqparent->tqparent(); level--; } if ((*it).isPhrase()) { Phrase phrase = (*it).getPhrase(); - last = insertPhrase (parent, last, phrase.getPhrase(), phrase.getShortcut()); + last = insertPhrase (tqparent, last, phrase.getPhrase(), phrase.getShortcut()); } else { Phrase phrase = (*it).getPhrase(); - parent = insertBook(parent, last, phrase.getPhrase()); + tqparent = insertBook(tqparent, last, phrase.getPhrase()); last = 0; level++; } } while (level > 0) { - last = parent; - if (parent != 0) - parent = parent->parent(); + last = tqparent; + if (tqparent != 0) + tqparent = tqparent->tqparent(); level--; } return last; @@ -421,7 +421,7 @@ void PhraseTree::fillBook (PhraseBook *book, bool respectSelection) { } else { while ((i != 0) && (i->nextSibling() == 0)) { - i = i->parent(); + i = i->tqparent(); if (level > 0) level--; } @@ -470,7 +470,7 @@ void PhraseTree::_warning (const KKeySequence& cut, TQString sAction, TQString s i18n("The '%1' key combination has already been allocated " "to %2.\n" "Please choose a unique key combination."). - arg(cut.toString()).arg(sAction); + tqarg(cut.toString()).tqarg(sAction); KMessageBox::sorry( this, s, sTitle ); } @@ -485,7 +485,7 @@ bool PhraseTree::isStdAccelPresent (const KShortcut& cut, bool warnUser) { { if (warnUser) _warning (cut.seq(iSeq), - i18n("the standard \"%1\" action").arg(KStdAccel::label(id)), + i18n("the standard \"%1\" action").tqarg(KStdAccel::label(id)), i18n("Conflict with Standard Application Shortcut")); return true; } @@ -501,7 +501,7 @@ bool PhraseTree::isGlobalKeyPresent (const KShortcut& cut, bool warnUser) { if (iSeq > -1) { if (warnUser) _warning (cut.seq(iSeq), - i18n("the global \"%1\" action").arg(it.key()), + i18n("the global \"%1\" action").tqarg(it.key()), i18n("Conflict with Global Shortcuts")); return true; } diff --git a/kmouth/phrasebook/phrasetree.h b/kmouth/phrasebook/phrasetree.h index 45ae26c..26af68c 100644 --- a/kmouth/phrasebook/phrasetree.h +++ b/kmouth/phrasebook/phrasetree.h @@ -33,13 +33,13 @@ class PhraseTreeItem : public KListViewItem { friend class PhraseTree; private: /** Creates a phrase item within a sub phrase book */ - PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon); + PhraseTreeItem (TQListView *tqparent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon); /** Creates a phrase item at the top level */ - PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon); + PhraseTreeItem (TQListViewItem *tqparent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon); /** Creates a phrase book item within a sub phrase book */ - PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon); + PhraseTreeItem (TQListView *tqparent, TQListViewItem *after, TQString name, TQPixmap icon); /** Creates a phrase book item at the top level */ - PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString name, TQPixmap icon); + PhraseTreeItem (TQListViewItem *tqparent, TQListViewItem *after, TQString name, TQPixmap icon); public: bool isPhrase(); @@ -60,22 +60,23 @@ private: class PhraseTree : public KListView { friend class PhraseTreeItem; Q_OBJECT + TQ_OBJECT public: - PhraseTree (TQWidget *parent = 0, const char *name = 0); + PhraseTree (TQWidget *tqparent = 0, const char *name = 0); ~PhraseTree (); void keyPressEvent (TQKeyEvent *e); - PhraseTreeItem *insertPhrase (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TQString shortcut); - PhraseTreeItem *insertBook (TQListViewItem *parent, TQListViewItem *after, TQString name); + PhraseTreeItem *insertPhrase (TQListViewItem *tqparent, TQListViewItem *after, TQString phrase, TQString shortcut); + PhraseTreeItem *insertBook (TQListViewItem *tqparent, TQListViewItem *after, TQString name); - TQListViewItem *addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book); + TQListViewItem *addBook (TQListViewItem *tqparent, TQListViewItem *after, PhraseBook *book); void fillBook (PhraseBook *book, bool respectSelection); TQDragObject *dragObject (); TQDragObject *dragObject (bool isDependent); - void moveItem (TQListViewItem *item, TQListViewItem *parent, TQListViewItem *above); + void moveItem (TQListViewItem *item, TQListViewItem *tqparent, TQListViewItem *above); bool hasSelectedItems(); void deleteSelectedItems(); diff --git a/kmouth/phraseedit.cpp b/kmouth/phraseedit.cpp index 000a1f5..4397bb6 100644 --- a/kmouth/phraseedit.cpp +++ b/kmouth/phraseedit.cpp @@ -17,36 +17,36 @@ #include "phraseedit.h" -PhraseEdit::PhraseEdit(const TQString &string, TQWidget *parent) - : KLineEdit (string, parent) { +PhraseEdit::PhraseEdit(const TQString &string, TQWidget *tqparent) + : KLineEdit (string, tqparent) { } PhraseEdit::~PhraseEdit() { } void PhraseEdit::keyPressEvent (TQKeyEvent *e) { - if ((e->state() & Qt::KeyButtonMask) == Qt::ControlButton) { - if (e->key() == Qt::Key_C) { + if ((e->state() & TQt::KeyButtonMask) == TQt::ControlButton) { + if (e->key() == TQt::Key_C) { if (!this->hasSelectedText()) { e->ignore(); return; } } - else if (e->key() == Qt::Key_Insert) { + else if (e->key() == TQt::Key_Insert) { if (!hasSelectedText()) { e->ignore(); return; } } - else if (e->key() == Qt::Key_X) { + else if (e->key() == TQt::Key_X) { if (!hasSelectedText()) { e->ignore(); return; } } } - else if ((e->state() & Qt::KeyButtonMask) == Qt::ShiftButton) { - if (e->key() == Qt::Key_Delete) { + else if ((e->state() & TQt::KeyButtonMask) == TQt::ShiftButton) { + if (e->key() == TQt::Key_Delete) { if (!hasSelectedText()) { e->ignore(); return; diff --git a/kmouth/phraseedit.h b/kmouth/phraseedit.h index 0ebd132..ccc5342 100644 --- a/kmouth/phraseedit.h +++ b/kmouth/phraseedit.h @@ -27,7 +27,7 @@ class PhraseEdit : public KLineEdit { public: - PhraseEdit(const TQString &string, TQWidget *parent); + PhraseEdit(const TQString &string, TQWidget *tqparent); virtual ~PhraseEdit(); void keyPressEvent (TQKeyEvent *e); diff --git a/kmouth/phraselist.cpp b/kmouth/phraselist.cpp index 48148c3..6264f14 100644 --- a/kmouth/phraselist.cpp +++ b/kmouth/phraselist.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -// include files for Qt +// include files for TQt #include #include #include @@ -45,19 +45,19 @@ #include "phrasebook/phrasebook.h" #include "wordcompletion/wordcompletion.h" -PhraseList::PhraseList(TQWidget *parent, const char *name) : TQWidget(parent,name) { +PhraseList::PhraseList(TQWidget *tqparent, const char *name) : TQWidget(tqparent,name) { isInSlot = false; setBackgroundMode(PaletteBase); - TQVBoxLayout *layout = new TQVBoxLayout (this); + TQVBoxLayout *tqlayout = new TQVBoxLayout (this); listBox = new KListBox (this); - listBox->setFocusPolicy(TQWidget::NoFocus); + listBox->setFocusPolicy(TQ_NoFocus); listBox->setSelectionMode (TQListBox::Extended); TQWhatsThis::add (listBox, i18n("This list contains the history of spoken sentences. You can select sentences and press the speak button for re-speaking.")); - layout->addWidget(listBox); + tqlayout->addWidget(listBox); TQHBoxLayout *rowLayout = new TQHBoxLayout (); - layout->addLayout(rowLayout); + tqlayout->addLayout(rowLayout); completion = new WordCompletion(); @@ -66,7 +66,7 @@ PhraseList::PhraseList(TQWidget *parent, const char *name) : TQWidget(parent,nam rowLayout->addWidget(dictionaryCombo); lineEdit = new PhraseEdit ("", this); - lineEdit->setFocusPolicy(TQWidget::StrongFocus); + lineEdit->setFocusPolicy(TQ_StrongFocus); lineEdit->setFrame(true); lineEdit->setEchoMode(TQLineEdit::Normal); lineEdit->setCompletionObject (completion); @@ -77,7 +77,7 @@ PhraseList::PhraseList(TQWidget *parent, const char *name) : TQWidget(parent,nam TQIconSet icon = KGlobal::iconLoader()->loadIconSet("speak", KIcon::Small); speakButton = new TQPushButton (icon, i18n("&Speak"), this); - speakButton->setFocusPolicy(TQWidget::NoFocus); + speakButton->setFocusPolicy(TQ_NoFocus); speakButton->setAutoDefault(false); TQWhatsThis::add (speakButton, i18n("Speaks the currently active sentence(s). If there is some text in the edit field it is spoken. Otherwise the selected sentences in the history (if any) are spoken.")); rowLayout->addWidget(speakButton); @@ -139,7 +139,7 @@ void PhraseList::enableMenuEntries() { else deselected = true; } - KMouthApp *theApp=(KMouthApp *) parentWidget(); + KMouthApp *theApp=(KMouthApp *) tqparentWidget(); theApp->enableMenuEntries (selected, deselected); } @@ -191,7 +191,7 @@ void PhraseList::readCompletionOptions(KConfig *config) { int mode = config->readNumEntry ("Mode", KGlobalSettings::completionMode()); lineEdit->setCompletionMode (static_cast(mode)); - TQString current = config->readEntry ("List", TQString::null); + TQString current = config->readEntry ("List", TQString()); TQStringList list = completion->wordLists(); TQStringList::ConstIterator it; int i = 0; @@ -271,7 +271,7 @@ void PhraseList::cutListSelection () { } void PhraseList::copyListSelection () { - TQApplication::clipboard()->setText (getListSelection().join ("\n")); + TQApplication::tqclipboard()->setText (getListSelection().join ("\n")); } void PhraseList::lineEntered (const TQString &phrase) { @@ -285,7 +285,7 @@ void PhraseList::lineEntered (const TQString &phrase) { void PhraseList::speakPhrase (const TQString &phrase) { TQApplication::setOverrideCursor (KCursor::WaitCursor, false); - KMouthApp *theApp=(KMouthApp *) parentWidget(); + KMouthApp *theApp=(KMouthApp *) tqparentWidget(); TQString language = completion->languageOfWordList (completion->currentWordList()); theApp->getTTSSystem()->speak(phrase, language); TQApplication::restoreOverrideCursor (); @@ -313,7 +313,7 @@ void PhraseList::contextMenuRequested (TQListBoxItem *, const TQPoint &pos) { else name = "phraselist_popup"; - KMouthApp *theApp=(KMouthApp *) parentWidget(); + KMouthApp *theApp=(KMouthApp *) tqparentWidget(); KXMLGUIFactory *factory = theApp->factory(); TQPopupMenu *popup = (TQPopupMenu *)factory->container(name,theApp); if (popup != 0) { @@ -357,7 +357,7 @@ void PhraseList::setEditLineText(const TQString &s) { } void PhraseList::keyPressEvent (TQKeyEvent *e) { - if (e->key() == Qt::Key_Up) { + if (e->key() == TQt::Key_Up) { bool selected = false; for (TQListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) { if (item->isSelected()) { @@ -394,7 +394,7 @@ void PhraseList::keyPressEvent (TQKeyEvent *e) { e->accept(); } - else if (e->key() == Qt::Key_Down) { + else if (e->key() == TQt::Key_Down) { bool selected = false; for (TQListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) { if (item->isSelected()) { @@ -419,12 +419,12 @@ void PhraseList::keyPressEvent (TQKeyEvent *e) { } e->accept(); } - else if ((e->state() & Qt::KeyButtonMask) == Qt::ControlButton) { - if (e->key() == Qt::Key_C) { + else if ((e->state() & TQt::KeyButtonMask) == TQt::ControlButton) { + if (e->key() == TQt::Key_C) { copy(); e->accept(); } - else if (e->key() == Qt::Key_X) { + else if (e->key() == TQt::Key_X) { cut(); e->accept(); } @@ -446,11 +446,11 @@ void PhraseList::save () { KURL url; if (book.save (this, i18n("Save As"), url, false) == -1) - KMessageBox::sorry(this,i18n("There was an error saving file\n%1").arg( url.url() )); + KMessageBox::sorry(this,i18n("There was an error saving file\n%1").tqarg( url.url() )); } void PhraseList::open () { - KURL url=KFileDialog::getOpenURL(TQString::null, + KURL url=KFileDialog::getOpenURL(TQString(), i18n("*|All Files\n*.phrasebook|Phrase Books (*.phrasebook)\n*.txt|Plain Text Files (*.txt)"), this, i18n("Open File as History")); if(!url.isEmpty()) @@ -464,7 +464,7 @@ void PhraseList::open (KURL url) { PhraseBook book; if (book.open (url)) { - // convert PhraseBookEntryList -> QStringList + // convert PhraseBookEntryList -> TQStringList TQStringList list = book.toStringList(); listBox->clear(); TQStringList::iterator it; @@ -472,7 +472,7 @@ void PhraseList::open (KURL url) { insertIntoPhraseList (*it, false); } else - KMessageBox::sorry(this,i18n("There was an error loading file\n%1").arg( url.url() )); + KMessageBox::sorry(this,i18n("There was an error loading file\n%1").tqarg( url.url() )); } #include "phraselist.moc" diff --git a/kmouth/phraselist.h b/kmouth/phraselist.h index 702e135..cad58ad 100644 --- a/kmouth/phraselist.h +++ b/kmouth/phraselist.h @@ -23,7 +23,7 @@ #include #include -// include files for Qt +// include files for TQt #include #include @@ -40,8 +40,9 @@ class WordCompletion; class PhraseList : public TQWidget { Q_OBJECT + TQ_OBJECT public: - PhraseList(TQWidget *parent=0, const char *name=0); + PhraseList(TQWidget *tqparent=0, const char *name=0); ~PhraseList(); /** contains the implementation for printing functionality */ diff --git a/kmouth/phraselistitem.cpp b/kmouth/phraselistitem.cpp index 721e893..6e902f3 100644 --- a/kmouth/phraselistitem.cpp +++ b/kmouth/phraselistitem.cpp @@ -46,7 +46,7 @@ void PhraseListItem::paint (TQPainter *p) { if (drawCursor()) { TQRect r (0, 0, listBox()->maxItemWidth(), height (listBox())); - listBox()->style().drawPrimitive (TQStyle::PE_FocusRect, p, r, - listBox()->colorGroup()); + listBox()->tqstyle().tqdrawPrimitive (TQStyle::PE_FocusRect, p, r, + listBox()->tqcolorGroup()); } } diff --git a/kmouth/preferencesui.ui b/kmouth/preferencesui.ui index a718b9d..dcc219d 100644 --- a/kmouth/preferencesui.ui +++ b/kmouth/preferencesui.ui @@ -1,6 +1,6 @@ PreferencesUI - + PreferencesUI @@ -33,7 +33,7 @@ 6 - + Layout1 @@ -47,7 +47,7 @@ 6 - + speakLabel @@ -92,7 +92,7 @@ - + Layout2 @@ -106,7 +106,7 @@ 6 - + closeLabel @@ -158,5 +158,5 @@ - + diff --git a/kmouth/speech.cpp b/kmouth/speech.cpp index 8fc8f19..300bfb1 100644 --- a/kmouth/speech.cpp +++ b/kmouth/speech.cpp @@ -51,7 +51,7 @@ TQString Speech::prepareCommand (TQString command, const TQString &text, TQValueStack stack; // saved isdoublequote values during parsing of braces bool issinglequote=false; // inside '...' ? bool isdoublequote=false; // inside "..." ? - int noreplace=0; // nested braces when within ${...} + int notqreplace=0; // nested braces when within ${...} TQString escText = KShellProcess::quote(text); // character sequences that change the state or need to be otherwise processed @@ -71,17 +71,17 @@ TQString Speech::prepareCommand (TQString command, const TQString &text, if ((command[i]=='(') || (command[i]=='{')) { // (...) or {...} // assert(isdoublequote == false) stack.push(isdoublequote); - if (noreplace > 0) + if (notqreplace > 0) // count nested braces when within ${...} - noreplace++; + notqreplace++; i++; } else if (command[i]=='$') { // $(...) or ${...} stack.push(isdoublequote); isdoublequote = false; - if ((noreplace > 0) || (command[i+1]=='{')) + if ((notqreplace > 0) || (command[i+1]=='{')) // count nested braces when within ${...} - noreplace++; + notqreplace++; i+=2; } else if ((command[i]==')') || (command[i]=='}')) { @@ -90,9 +90,9 @@ TQString Speech::prepareCommand (TQString command, const TQString &text, isdoublequote = stack.pop(); else qWarning("Parse error."); - if (noreplace > 0) + if (notqreplace > 0) // count nested braces when within ${...} - noreplace--; + notqreplace--; i++; } else if (command[i]=='\'') { @@ -107,7 +107,7 @@ TQString Speech::prepareCommand (TQString command, const TQString &text, i+=2; else if (command[i]=='`') { // Replace all `...` with safer $(...) - command.replace (i, 1, "$("); + command.tqreplace (i, 1, "$("); TQRegExp re_backticks("(`|\\\\`|\\\\\\\\|\\\\\\$)"); for (int i2=re_backticks.search(command,i+2); i2!=-1; @@ -115,7 +115,7 @@ TQString Speech::prepareCommand (TQString command, const TQString &text, ) { if (command[i2] == '`') { - command.replace (i2, 1, ")"); + command.tqreplace (i2, 1, ")"); i2=command.length(); // leave loop } else { @@ -126,7 +126,7 @@ TQString Speech::prepareCommand (TQString command, const TQString &text, } // Leave i unchanged! We need to process "$(" } - else if (noreplace > 0) { // do not replace macros within ${...} + else if (notqreplace > 0) { // do not replace macros within ${...} if (issinglequote) i+=re_singlequote.matchedLength(); else if (isdoublequote) @@ -161,7 +161,7 @@ TQString Speech::prepareCommand (TQString command, const TQString &text, else if (issinglequote) v="'"+v+"'"; - command.replace (i, match.length(), v); + command.tqreplace (i, match.length(), v); i+=v.length(); } } @@ -225,10 +225,10 @@ void Speech::speak(TQString command, bool stdIn, const TQString &text, const TQS } void Speech::receivedStdout (KProcess *, char *buffer, int buflen) { - kdDebug() << TQString::fromLatin1(buffer, buflen) + "\n"; + kdDebug() << TQString::tqfromLatin1(buffer, buflen) + "\n"; } void Speech::receivedStderr (KProcess *, char *buffer, int buflen) { - kdDebug() << TQString::fromLatin1(buffer, buflen) + "\n"; + kdDebug() << TQString::tqfromLatin1(buffer, buflen) + "\n"; } void Speech::wroteStdin(KProcess *) { diff --git a/kmouth/speech.h b/kmouth/speech.h index 11331cf..f92bb98 100644 --- a/kmouth/speech.h +++ b/kmouth/speech.h @@ -29,6 +29,7 @@ class Speech : public TQObject { Q_OBJECT + TQ_OBJECT public: enum CharacterCodec { Local = 0, diff --git a/kmouth/texttospeechconfigurationui.ui b/kmouth/texttospeechconfigurationui.ui index de393ce..877b831 100644 --- a/kmouth/texttospeechconfigurationui.ui +++ b/kmouth/texttospeechconfigurationui.ui @@ -1,6 +1,6 @@ texttospeechconfigurationui - + texttospeechconfigurationui @@ -25,7 +25,7 @@ 6 - + Layout4 @@ -39,7 +39,7 @@ 6 - + urlLabel @@ -87,7 +87,7 @@ - + Layout5 @@ -101,7 +101,7 @@ 6 - + characterCodingLabel @@ -133,7 +133,7 @@ - + stdInButton @@ -144,7 +144,7 @@ This check box specifies whether the text is sent as standard input to the speech synthesizer. - + useKttsd @@ -157,10 +157,10 @@ - + configurationChanged() - - + + kurlrequester.h klineedit.h diff --git a/kmouth/texttospeechconfigurationwidget.cpp b/kmouth/texttospeechconfigurationwidget.cpp index f7fe16a..11ad5d9 100644 --- a/kmouth/texttospeechconfigurationwidget.cpp +++ b/kmouth/texttospeechconfigurationwidget.cpp @@ -31,8 +31,8 @@ #include #include -TextToSpeechConfigurationWidget::TextToSpeechConfigurationWidget (TQWidget *parent, const char *name) - : texttospeechconfigurationui (parent, name) +TextToSpeechConfigurationWidget::TextToSpeechConfigurationWidget (TQWidget *tqparent, const char *name) + : texttospeechconfigurationui (tqparent, name) { ttsSystem = new TextToSpeechSystem(); diff --git a/kmouth/texttospeechconfigurationwidget.h b/kmouth/texttospeechconfigurationwidget.h index a5ef3ba..0e567a3 100644 --- a/kmouth/texttospeechconfigurationwidget.h +++ b/kmouth/texttospeechconfigurationwidget.h @@ -30,7 +30,7 @@ class TextToSpeechConfigurationWidget : public texttospeechconfigurationui { friend class TextToSpeechConfigurationDialog; public: - TextToSpeechConfigurationWidget(TQWidget *parent, const char *name); + TextToSpeechConfigurationWidget(TQWidget *tqparent, const char *name); ~TextToSpeechConfigurationWidget(); TextToSpeechSystem *getTTSSystem() const; diff --git a/kmouth/texttospeechsystem.h b/kmouth/texttospeechsystem.h index f435585..db494e7 100644 --- a/kmouth/texttospeechsystem.h +++ b/kmouth/texttospeechsystem.h @@ -29,8 +29,9 @@ class KConfig; *@author Gunnar Schmi Dt */ -class TextToSpeechSystem : public QObject{ +class TextToSpeechSystem : public TQObject{ Q_OBJECT + TQ_OBJECT friend class TextToSpeechConfigurationWidget; public: TextToSpeechSystem(); diff --git a/kmouth/wordcompletion/creationsourcedetailsui.ui b/kmouth/wordcompletion/creationsourcedetailsui.ui index 1a1f61b..689ee25 100644 --- a/kmouth/wordcompletion/creationsourcedetailsui.ui +++ b/kmouth/wordcompletion/creationsourcedetailsui.ui @@ -1,6 +1,6 @@ CreationSourceDetailsUI - + CreationSourceDetailsUI @@ -16,7 +16,7 @@ unnamed - + spellCheckBox @@ -30,7 +30,7 @@ If you select this check box the words are spell-checked before they are inserted into the new dictionary. - + encodingLabel @@ -52,7 +52,7 @@ With this combo box you select the character encoding used to load text files. This combo box is not used for XML files or for dictionary files. - + urlLabel @@ -125,7 +125,7 @@ With this input field you select the OpenOffice.org directory that will be used to spellcheck the words of the new dictionary. - + languageLabel @@ -166,13 +166,13 @@ KLanguageButton *languageButton; - + languageButton_activated( int index ) - + init() - + kinputdialog.h kpushbutton.h diff --git a/kmouth/wordcompletion/creationsourcedetailsui.ui.h b/kmouth/wordcompletion/creationsourcedetailsui.ui.h index 16ecdc5..f3ed793 100644 --- a/kmouth/wordcompletion/creationsourcedetailsui.ui.h +++ b/kmouth/wordcompletion/creationsourcedetailsui.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -15,7 +15,7 @@ void CreationSourceDetailsUI::init() { TQWhatsThis::add (languageButton, i18n("With this combo box you decide which language should be associated with the new dictionary.")); loadLanguageList(languageButton); - languageButton->insertLanguage("??", i18n("Other"), TQString::fromLatin1("l10n/"), TQString::null); + languageButton->insertLanguage("??", i18n("Other"), TQString::tqfromLatin1("l10n/"), TQString()); connect (languageButton, TQT_SIGNAL(activated(int)), this, TQT_SLOT(languageButton_activated(int))); } @@ -28,7 +28,7 @@ void CreationSourceDetailsUI::languageButton_activated (int) { languageButton->setCurrentItem(customLanguage); } else { - languageButton->insertLanguage(customLanguage, i18n("without name"), TQString::fromLatin1("l10n/"), TQString::null); + languageButton->insertLanguage(customLanguage, i18n("without name"), TQString::tqfromLatin1("l10n/"), TQString()); languageButton->setCurrentItem(customLanguage); } } diff --git a/kmouth/wordcompletion/creationsourceui.ui b/kmouth/wordcompletion/creationsourceui.ui index 13a7c06..603d15a 100644 --- a/kmouth/wordcompletion/creationsourceui.ui +++ b/kmouth/wordcompletion/creationsourceui.ui @@ -1,6 +1,6 @@ CreationSourceUI - + CreationSourceUI @@ -16,7 +16,7 @@ unnamed - + createButton @@ -30,7 +30,7 @@ If you select this box a new dictionary is created by either loading a dictionary file or by counting the individual words in a text. - + mergeButton @@ -41,7 +41,7 @@ If you select this box a new dictionary is created by merging existing dictionaries. - + fileButton @@ -63,7 +63,7 @@ If you select this box a new dictionary is created by loading a file. You may either select an XML file, a standard text file or a file containing a word completion dictionary. If you select a standard text file or an XML file the frequentness of the individual words is detected by simply counting the occurrences of each word. - + kdeDocButton @@ -88,7 +88,7 @@ If you select this box a new dictionary is created by parsing the KDE documentation. The frequentness of the individual words is detect by simply counting the occurrences of each word. - + directoryButton @@ -120,14 +120,14 @@ Fixed - + 20 40 - + emptyButton @@ -161,19 +161,19 @@ - qbuttongroup.h + tqbuttongroup.h creationsourceui.ui.h class QButtonGroup - QButtonGroup *group2; - QButtonGroup *group1; + TQButtonGroup *group2; + TQButtonGroup *group1; init() destroy() - + diff --git a/kmouth/wordcompletion/creationsourceui.ui.h b/kmouth/wordcompletion/creationsourceui.ui.h index f9f3dad..6115008 100644 --- a/kmouth/wordcompletion/creationsourceui.ui.h +++ b/kmouth/wordcompletion/creationsourceui.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/kmouth/wordcompletion/dictionarycreationwizard.cpp b/kmouth/wordcompletion/dictionarycreationwizard.cpp index 13c770e..14b7980 100644 --- a/kmouth/wordcompletion/dictionarycreationwizard.cpp +++ b/kmouth/wordcompletion/dictionarycreationwizard.cpp @@ -42,10 +42,10 @@ #include "kdedocsourceui.h" #include "wordlist.h" -DictionaryCreationWizard::DictionaryCreationWizard (TQWidget *parent, const char *name, +DictionaryCreationWizard::DictionaryCreationWizard (TQWidget *tqparent, const char *name, TQStringList dictionaryNames, TQStringList dictionaryFiles, TQStringList dictionaryLanguages) - : KWizard (parent, name) + : KWizard (tqparent, name) { buildCodecList (); @@ -161,10 +161,10 @@ TQString DictionaryCreationWizard::createDictionary() { if (creationSource->mergeButton->isChecked()) { map = WordList::mergeFiles (mergeWidget->mergeParameters(), pdlg); - dicFile = TQString::null; + dicFile = TQString(); } else if (creationSource->emptyButton->isChecked()) { - dicFile = TQString::null; + dicFile = TQString(); } else if (creationSource->fileButton->isChecked()) { TQString filename = fileWidget->url->url(); @@ -221,7 +221,7 @@ TQString DictionaryCreationWizard::createDictionary() { TQString dictionaryFile; do { dictnumber++; - filename = TQString("wordcompletion%1.dict").arg(dictnumber); + filename = TQString("wordcompletion%1.dict").tqarg(dictnumber); dictionaryFile = KApplication::kApplication()->dirs()->findResource("appdata", filename); } while (KStandardDirs::exists(dictionaryFile)); @@ -274,19 +274,19 @@ TQString DictionaryCreationWizard::language() { /***************************************************************************/ -MergeWidget::MergeWidget(KWizard *parent, const char *name, +MergeWidget::MergeWidget(KWizard *tqparent, const char *name, TQStringList dictionaryNames, TQStringList dictionaryFiles, TQStringList dictionaryLanguages) -: TQScrollView (parent, name) { +: TQScrollView (tqparent, name) { dictionaries.setAutoDelete (false); weights.setAutoDelete (false); TQWidget *contents = new TQWidget(viewport()); addChild(contents); - TQGridLayout *layout = new TQGridLayout (contents); + TQGridLayout *tqlayout = new TQGridLayout (contents); setResizePolicy (TQScrollView::AutoOneFit); - layout->setColStretch (0, 0); - layout->setColStretch (1, 1); + tqlayout->setColStretch (0, 0); + tqlayout->setColStretch (1, 1); int row = 0; TQStringList::Iterator nIt = dictionaryNames.begin(); @@ -295,8 +295,8 @@ MergeWidget::MergeWidget(KWizard *parent, const char *name, for (; nIt != dictionaryNames.end(); ++nIt, ++fIt, ++lIt) { TQCheckBox *checkbox = new TQCheckBox(*nIt, contents); KIntNumInput *numInput = new KIntNumInput(contents); - layout->addWidget (checkbox, row, 0); - layout->addWidget (numInput, row, 1); + tqlayout->addWidget (checkbox, row, 0); + tqlayout->addWidget (numInput, row, 1); checkbox->setChecked (true); numInput->setRange (1, 100, 10, true); @@ -335,13 +335,13 @@ TQString MergeWidget::language () { } } - return TQString::null; + return TQString(); } /***************************************************************************/ -CompletionWizardWidget::CompletionWizardWidget (KWizard *parent, const char *name) - : KDEDocSourceUI (parent, name) { +CompletionWizardWidget::CompletionWizardWidget (KWizard *tqparent, const char *name) + : KDEDocSourceUI (tqparent, name) { } CompletionWizardWidget::~CompletionWizardWidget() { diff --git a/kmouth/wordcompletion/dictionarycreationwizard.h b/kmouth/wordcompletion/dictionarycreationwizard.h index b947b7f..c2d1e2e 100644 --- a/kmouth/wordcompletion/dictionarycreationwizard.h +++ b/kmouth/wordcompletion/dictionarycreationwizard.h @@ -42,8 +42,9 @@ class MergeWidget; */ class DictionaryCreationWizard : public KWizard { Q_OBJECT + TQ_OBJECT public: - DictionaryCreationWizard (TQWidget *parent, const char *name, + DictionaryCreationWizard (TQWidget *tqparent, const char *name, TQStringList dictionaryNames, TQStringList dictionaryFiles, TQStringList dictionaryLanguages); @@ -76,8 +77,9 @@ private: */ class MergeWidget : public TQScrollView { Q_OBJECT + TQ_OBJECT public: - MergeWidget(KWizard *parent, const char *name, + MergeWidget(KWizard *tqparent, const char *name, TQStringList dictionaryNames, TQStringList dictionaryFiles, TQStringList dictionaryLanguages); @@ -99,9 +101,10 @@ private: */ class CompletionWizardWidget : public KDEDocSourceUI { Q_OBJECT + TQ_OBJECT friend class ConfigWizard; public: - CompletionWizardWidget(KWizard *parent, const char *name); + CompletionWizardWidget(KWizard *tqparent, const char *name); ~CompletionWizardWidget(); void ok (KConfig *config); diff --git a/kmouth/wordcompletion/kdedocsourceui.ui b/kmouth/wordcompletion/kdedocsourceui.ui index 21ce02a..8fc7b82 100644 --- a/kmouth/wordcompletion/kdedocsourceui.ui +++ b/kmouth/wordcompletion/kdedocsourceui.ui @@ -1,6 +1,6 @@ KDEDocSourceUI - + KDEDocSourceUI @@ -16,7 +16,7 @@ unnamed - + spellCheckBox @@ -49,7 +49,7 @@ With this input field you select the OpenOffice.org directory that will be used to spellcheck the words of the new dictionary. - + languageLabel @@ -92,7 +92,7 @@ init() - + kurlrequester.h klineedit.h diff --git a/kmouth/wordcompletion/kdedocsourceui.ui.h b/kmouth/wordcompletion/kdedocsourceui.ui.h index 92a4c6b..0e3ade1 100644 --- a/kmouth/wordcompletion/kdedocsourceui.ui.h +++ b/kmouth/wordcompletion/kdedocsourceui.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ diff --git a/kmouth/wordcompletion/klanguagebutton.cpp b/kmouth/wordcompletion/klanguagebutton.cpp index 5d4c062..e34881a 100644 --- a/kmouth/wordcompletion/klanguagebutton.cpp +++ b/kmouth/wordcompletion/klanguagebutton.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 1999-2000 Hans Petter Bieker * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.trolltech.com/ * * This program is free software; you can redistribute it and/or modify @@ -60,12 +60,12 @@ static inline void checkInsertPos( TQPopupMenu *popup, const TQString & str, static inline TQPopupMenu * checkInsertIndex( TQPopupMenu *popup, const TQStringList *tags, const TQString &submenu ) { - int pos = tags->findIndex( submenu ); + int pos = tags->tqfindIndex( submenu ); TQPopupMenu *pi = 0; if ( pos != -1 ) { - TQMenuItem *p = popup->findItem( pos ); + TQMenuItem *p = popup->tqfindItem( pos ); pi = p ? p->popup() : 0; } if ( !pi ) @@ -80,8 +80,8 @@ KLanguageButton::~KLanguageButton() delete m_tags; } -KLanguageButton::KLanguageButton( TQWidget * parent, const char *name ) -: TQPushButton( parent, name ), +KLanguageButton::KLanguageButton( TQWidget * tqparent, const char *name ) +: TQPushButton( tqparent, name ), m_popup( 0 ), m_oldPopup( 0 ) { @@ -112,7 +112,7 @@ void KLanguageButton::insertSeparator( const TQString &submenu, int index ) { TQPopupMenu *pi = checkInsertIndex( m_popup, m_tags, submenu ); pi->insertSeparator( index ); - m_tags->append( TQString::null ); + m_tags->append( TQString() ); } void KLanguageButton::insertSubmenu( const TQString &text, const TQString &tag, @@ -132,12 +132,12 @@ void KLanguageButton::insertSubmenu( const TQString &text, const TQString &tag, void KLanguageButton::insertLanguage( const TQString& path, const TQString& name, const TQString& sub, const TQString &submenu, int index ) { - TQString output = name + TQString::fromLatin1( " (" ) + path + - TQString::fromLatin1( ")" ); + TQString output = name + TQString::tqfromLatin1( " (" ) + path + + TQString::tqfromLatin1( ")" ); #if 0 // Nooooo ! Country != language TQPixmap flag( locate( "locale", sub + path + - TQString::fromLatin1( "/flag.png" ) ) ); + TQString::tqfromLatin1( "/flag.png" ) ) ); #endif insertItem( output, path, submenu, index ); } @@ -174,7 +174,7 @@ void KLanguageButton::clear() connect( m_popup, TQT_SIGNAL( highlighted( int ) ), TQT_SIGNAL( highlighted( int ) ) ); - setText( TQString::null ); + setText( TQString() ); setIconSet( TQIconSet() ); } @@ -182,14 +182,14 @@ void KLanguageButton::clear() { if ( i < 0 || i >= count() ) return; - TQString output = name + TQString::fromLatin1( " (" ) + tag( i ) + - TQString::fromLatin1( ")" ); + TQString output = name + TQString::tqfromLatin1( " (" ) + tag( i ) + + TQString::tqfromLatin1( ")" ); changeItem( output, i ); }*/ bool KLanguageButton::containsTag( const TQString &str ) const { - return m_tags->contains( str ) > 0; + return m_tags->tqcontains( str ) > 0; } TQString KLanguageButton::currentTag() const @@ -202,7 +202,7 @@ TQString KLanguageButton::tag( int i ) const if ( i < 0 || i >= count() ) { kdDebug() << "KLanguageButton::tag(), unknown tag " << i << endl; - return TQString::null; + return TQString(); } return *m_tags->at( i ); } @@ -228,7 +228,7 @@ void KLanguageButton::setCurrentItem( int i ) void KLanguageButton::setCurrentItem( const TQString &code ) { - int i = m_tags->findIndex( code ); + int i = m_tags->tqfindIndex( code ); if ( code.isNull() ) i = 0; if ( i != -1 ) diff --git a/kmouth/wordcompletion/klanguagebutton.h b/kmouth/wordcompletion/klanguagebutton.h index 0ebe5c7..1c116b5 100644 --- a/kmouth/wordcompletion/klanguagebutton.h +++ b/kmouth/wordcompletion/klanguagebutton.h @@ -5,7 +5,7 @@ * Copyright (c) 1999-2000 Hans Petter Bieker * (c) 2001 Martijn Klingens * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify @@ -34,33 +34,34 @@ * Essentially just a combo box with a 2-D dataset, but using a real * TQComboBox will produce ugly results. * - * Combined version of KTagCombo and KLanguageCombo but using a QPushButton + * Combined version of KTagCombo and KLanguageCombo but using a TQPushButton * instead. */ -class KLanguageButton : public QPushButton +class KLanguageButton : public TQPushButton { Q_OBJECT + TQ_OBJECT public: - KLanguageButton(TQWidget *parent=0, const char *name=0); + KLanguageButton(TQWidget *tqparent=0, const char *name=0); ~KLanguageButton(); void insertItem( const TQIconSet& icon, const TQString &text, - const TQString &tag, const TQString &submenu = TQString::null, + const TQString &tag, const TQString &submenu = TQString(), int index = -1 ); void insertItem( const TQString &text, const TQString &tag, - const TQString &submenu = TQString::null, int index = -1 ); - void insertSeparator( const TQString &submenu = TQString::null, + const TQString &submenu = TQString(), int index = -1 ); + void insertSeparator( const TQString &submenu = TQString(), int index = -1 ); void insertSubmenu( const TQString &text, const TQString &tag, - const TQString &submenu = TQString::null, int index = -1); + const TQString &submenu = TQString(), int index = -1); int count() const; void clear(); void insertLanguage( const TQString& path, const TQString& name, - const TQString& sub = TQString::null, - const TQString &submenu = TQString::null, int index = -1); + const TQString& sub = TQString(), + const TQString &submenu = TQString(), int index = -1); /* * Tag of the selected item diff --git a/kmouth/wordcompletion/klanguagebuttonhelper.cpp b/kmouth/wordcompletion/klanguagebuttonhelper.cpp index a68007b..12059c1 100644 --- a/kmouth/wordcompletion/klanguagebuttonhelper.cpp +++ b/kmouth/wordcompletion/klanguagebuttonhelper.cpp @@ -3,7 +3,7 @@ * * Copyright (c) 2003 Gunnar Schmi Dt * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.trolltech.com/ * * This program is free software; you can redistribute it and/or modify @@ -31,30 +31,30 @@ TQString languageName (TQString languageCode) { TQString filename = KGlobal::dirs()->findResource("locale", - languageCode + TQString::fromLatin1("/entry.desktop")); + languageCode + TQString::tqfromLatin1("/entry.desktop")); KSimpleConfig entry(filename); - entry.setGroup(TQString::fromLatin1("KCM Locale")); - return entry.readEntry(TQString::fromLatin1("Name"), i18n("without name")); + entry.setGroup(TQString::tqfromLatin1("KCM Locale")); + return entry.readEntry(TQString::tqfromLatin1("Name"), i18n("without name")); } void loadLanguageList(KLanguageButton *combo) // This function was taken from kdebase/kcontrol/kdm/kdm-appear.cpp { TQStringList langlist = KGlobal::dirs()->findAllResources("locale", - TQString::fromLatin1("*/entry.desktop")); + TQString::tqfromLatin1("*/entry.desktop")); langlist.sort(); for ( TQStringList::ConstIterator it = langlist.begin(); it != langlist.end(); ++it ) { TQString fpath = (*it).left((*it).length() - 14); - int index = fpath.findRev('/'); + int index = fpath.tqfindRev('/'); TQString nid = fpath.mid(index + 1); KSimpleConfig entry(*it); - entry.setGroup(TQString::fromLatin1("KCM Locale")); - TQString name = entry.readEntry(TQString::fromLatin1("Name"), i18n("without name")); - combo->insertLanguage(nid, name, TQString::fromLatin1("l10n/"), TQString::null); + entry.setGroup(TQString::tqfromLatin1("KCM Locale")); + TQString name = entry.readEntry(TQString::tqfromLatin1("Name"), i18n("without name")); + combo->insertLanguage(nid, name, TQString::tqfromLatin1("l10n/"), TQString()); } if (KGlobal::locale()) diff --git a/kmouth/wordcompletion/klanguagebuttonhelper.h b/kmouth/wordcompletion/klanguagebuttonhelper.h index 11edd09..0f4f232 100644 --- a/kmouth/wordcompletion/klanguagebuttonhelper.h +++ b/kmouth/wordcompletion/klanguagebuttonhelper.h @@ -3,7 +3,7 @@ * * Copyright (c) 2003 Gunnar Schmi Dt * - * Requires the Qt widget libraries, available at no cost at + * Requires the TQt widget libraries, available at no cost at * http://www.troll.no/ * * This program is free software; you can redistribute it and/or modify diff --git a/kmouth/wordcompletion/wordcompletion.cpp b/kmouth/wordcompletion/wordcompletion.cpp index 268872a..a5d7a4e 100644 --- a/kmouth/wordcompletion/wordcompletion.cpp +++ b/kmouth/wordcompletion/wordcompletion.cpp @@ -38,7 +38,7 @@ WordCompletion::~WordCompletion() { delete d; } -typedef QPair Match; +typedef TQPair Match; typedef TQValueList MatchList; TQString WordCompletion::makeCompletion(const TQString &text) { @@ -46,7 +46,7 @@ TQString WordCompletion::makeCompletion(const TQString &text) { d->lastText = text; KCompletion::clear(); - int border = text.findRev(TQRegExp("\\W")); + int border = text.tqfindRev(TQRegExp("\\W")); TQString suffix = text.right (text.length() - border - 1).lower(); TQString prefix = text.left (border + 1); @@ -84,10 +84,10 @@ TQStringList WordCompletion::wordLists(const TQString &language) { } TQString WordCompletion::languageOfWordList(const TQString &wordlist) { - if (d->dictDetails.contains(wordlist)) + if (d->dictDetails.tqcontains(wordlist)) return d->dictDetails[wordlist].language; else - return TQString::null; + return TQString(); } TQString WordCompletion::currentWordList() { @@ -137,7 +137,7 @@ bool WordCompletion::setWordList(const TQString &wordlist) { d->wordsToSave = false; d->map.clear(); - bool result = d->dictDetails.contains (wordlist); + bool result = d->dictDetails.tqcontains (wordlist); if (result) d->current = wordlist; else @@ -177,13 +177,13 @@ void WordCompletion::addSentence (const TQString &sentence) { TQStringList::ConstIterator it; for (it = words.begin(); it != words.end(); ++it) { - if (!(*it).contains(TQRegExp("\\d|_"))) { + if (!(*it).tqcontains(TQRegExp("\\d|_"))) { TQString key = (*it).lower(); - if (d->map.contains(key)) + if (d->map.tqcontains(key)) d->map[key] += 1; else d->map[key] = 1; - if (d->addedWords.contains(key)) + if (d->addedWords.tqcontains(key)) d->addedWords[key] += 1; else d->addedWords[key] = 1; @@ -208,7 +208,7 @@ void WordCompletion::save () { stream << "WPDictFile\n"; TQMap::ConstIterator it; for (it = d->map.begin(); it != d->map.end(); ++it) { - if (d->addedWords.contains(it.key())) { + if (d->addedWords.tqcontains(it.key())) { stream << it.key() << "\t" << d->addedWords[it.key()] << "\t1\n"; stream << it.key() << "\t" << it.data() - d->addedWords[it.key()] << "\t2\n"; } diff --git a/kmouth/wordcompletion/wordcompletion.h b/kmouth/wordcompletion/wordcompletion.h index 2bc5ceb..220196f 100644 --- a/kmouth/wordcompletion/wordcompletion.h +++ b/kmouth/wordcompletion/wordcompletion.h @@ -9,6 +9,7 @@ class WordCompletion : public KCompletion { friend class WordListWidget; Q_OBJECT + TQ_OBJECT public: WordCompletion(); virtual ~WordCompletion(); diff --git a/kmouth/wordcompletion/wordcompletionui.ui b/kmouth/wordcompletion/wordcompletionui.ui index 8036272..401a71b 100644 --- a/kmouth/wordcompletion/wordcompletionui.ui +++ b/kmouth/wordcompletion/wordcompletionui.ui @@ -1,6 +1,6 @@ WordCompletionUI - + WordCompletionUI @@ -16,9 +16,9 @@ unnamed - + - layout1 + tqlayout1 @@ -141,7 +141,7 @@ Expanding - + 20 240 @@ -150,9 +150,9 @@ - + - layout2 + tqlayout2 @@ -191,7 +191,7 @@ This list contains all available dictionaries for the word completion. KMouth will display a combo box next to the edit field in the main window if this list contains more than one dictionary. You can use this combo box in order to select the dictionary that actually gets used for the word completion. - + selectedDictionaryDetails @@ -213,7 +213,7 @@ unnamed - + languageLabel @@ -224,7 +224,7 @@ With this combo box you select the language associated with the selected dictionary. - + dictionaryNameLabel @@ -273,13 +273,13 @@ KLanguageButton *languageButton; - + languageButton_activated( int index ) - + init() - + kurlrequester.h kpushbutton.h diff --git a/kmouth/wordcompletion/wordcompletionui.ui.h b/kmouth/wordcompletion/wordcompletionui.ui.h index 9a428df..d74137e 100644 --- a/kmouth/wordcompletion/wordcompletionui.ui.h +++ b/kmouth/wordcompletion/wordcompletionui.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you wish to add, delete or rename functions or slots use -** Qt Designer which will update this file, preserving your code. Create an +** TQt Designer which will update this file, preserving your code. Create an ** init() function in place of a constructor, and a destroy() function in ** place of a destructor. *****************************************************************************/ @@ -15,7 +15,7 @@ void WordCompletionUI::init() { TQWhatsThis::add (languageButton, i18n("With this combo box you select the language associated with the selected dictionary.")); loadLanguageList(languageButton); - languageButton->insertLanguage("??", i18n("Other"), TQString::fromLatin1("l10n/"), TQString::null); + languageButton->insertLanguage("??", i18n("Other"), TQString::tqfromLatin1("l10n/"), TQString()); connect (languageButton, TQT_SIGNAL(activated(int)), this, TQT_SLOT(languageButton_activated(int))); } @@ -28,7 +28,7 @@ void WordCompletionUI::languageButton_activated (int) { languageButton->setCurrentItem(customLanguage); } else { - languageButton->insertLanguage(customLanguage, i18n("without name"), TQString::fromLatin1("l10n/"), TQString::null); + languageButton->insertLanguage(customLanguage, i18n("without name"), TQString::tqfromLatin1("l10n/"), TQString()); languageButton->setCurrentItem(customLanguage); } } diff --git a/kmouth/wordcompletion/wordcompletionwidget.cpp b/kmouth/wordcompletion/wordcompletionwidget.cpp index b25df12..4c05557 100644 --- a/kmouth/wordcompletion/wordcompletionwidget.cpp +++ b/kmouth/wordcompletion/wordcompletionwidget.cpp @@ -39,18 +39,18 @@ class DictionaryListItem : public KListViewItem { public: - DictionaryListItem (TQListView *parent, TQString filename, TQString name, TQString language, TQString languageCode) - : KListViewItem (parent, name) { + DictionaryListItem (TQListView *tqparent, TQString filename, TQString name, TQString language, TQString languageCode) + : KListViewItem (tqparent, name) { setFilename (filename); setLanguage (language, languageCode); }; - DictionaryListItem (TQListView *parent, TQString filename, TQString name, TQString languageCode) - : KListViewItem (parent, name) { + DictionaryListItem (TQListView *tqparent, TQString filename, TQString name, TQString languageCode) + : KListViewItem (tqparent, name) { setFilename (filename); setLanguage (languageCode); }; - DictionaryListItem (TQListView *parent, TQListViewItem *after, TQString filename, TQString name, TQString languageCode) - : KListViewItem (parent, after, name) { + DictionaryListItem (TQListView *tqparent, TQListViewItem *after, TQString filename, TQString name, TQString languageCode) + : KListViewItem (tqparent, after, name) { setFilename (filename); setLanguage (languageCode); }; @@ -71,11 +71,11 @@ public: void setLanguage (TQString languageCode) { TQString filename = KGlobal::dirs()->findResource("locale", - languageCode + TQString::fromLatin1("/entry.desktop")); + languageCode + TQString::tqfromLatin1("/entry.desktop")); KSimpleConfig entry(filename); - entry.setGroup(TQString::fromLatin1("KCM Locale")); - TQString name = entry.readEntry(TQString::fromLatin1("Name"), i18n("without name")); + entry.setGroup(TQString::tqfromLatin1("KCM Locale")); + TQString name = entry.readEntry(TQString::tqfromLatin1("Name"), i18n("without name")); setLanguage (name + " (" + languageCode + ")", languageCode); } @@ -91,7 +91,7 @@ private: /***************************************************************************/ -WordCompletionWidget::WordCompletionWidget(TQWidget *parent, const char *name) : WordCompletionUI (parent, name) { +WordCompletionWidget::WordCompletionWidget(TQWidget *tqparent, const char *name) : WordCompletionUI (tqparent, name) { dictionaryList->setSorting (-1); // no sorted list // Connect the signals from hte KCMKTTSDWidget to this class @@ -136,7 +136,7 @@ void WordCompletionWidget::load() { config->readEntry("Name"), languageTag); if (!languageButton->containsTag(languageTag)) - languageButton->insertLanguage(languageTag, i18n("without name"), TQString::fromLatin1("l10n/"), TQString::null); + languageButton->insertLanguage(languageTag, i18n("without name"), TQString::tqfromLatin1("l10n/"), TQString()); } // Clean up disc space @@ -159,7 +159,7 @@ void WordCompletionWidget::save() { while (it.current()) { DictionaryListItem *item = dynamic_cast(it.current()); if (item != 0) { - config->setGroup(TQString("Dictionary %1").arg(number)); + config->setGroup(TQString("Dictionary %1").tqarg(number)); config->writeEntry ("Filename", item->filename()); config->writeEntry ("Name", item->text (0)); config->writeEntry ("Language", item->languageCode()); @@ -200,7 +200,7 @@ void WordCompletionWidget::addDictionary() { newDictionaryFiles += filename; TQString languageTag = wizard->language(); if (!languageButton->containsTag(languageTag)) { - languageButton->insertLanguage(languageTag, i18n("without name"), TQString::fromLatin1("l10n/"), TQString::null); + languageButton->insertLanguage(languageTag, i18n("without name"), TQString::tqfromLatin1("l10n/"), TQString()); } KListViewItem *item = new DictionaryListItem (dictionaryList, filename, wizard->name(), languageTag); @@ -246,13 +246,13 @@ void WordCompletionWidget::exportDictionary() { DictionaryListItem *item = dynamic_cast(dictionaryList->selectedItem ()); if (item != 0) { - KURL url = KFileDialog::getSaveURL(TQString::null, TQString::null, this, i18n("Export Dictionary")); + KURL url = KFileDialog::getSaveURL(TQString(), TQString(), this, i18n("Export Dictionary")); if (url.isEmpty() || !url.isValid()) return; if (KIO::NetAccess::exists(url, false, this)) { - if (KMessageBox::warningContinueCancel(0,TQString("%1").arg(i18n("The file %1 already exists. " - "Do you want to overwrite it?").arg(url.url())),i18n("File Exists"),i18n("&Overwrite"))==KMessageBox::Cancel) { + if (KMessageBox::warningContinueCancel(0,TQString("%1").tqarg(i18n("The file %1 already exists. " + "Do you want to overwrite it?").tqarg(url.url())),i18n("File Exists"),i18n("&Overwrite"))==KMessageBox::Cancel) { return; } } diff --git a/kmouth/wordcompletion/wordcompletionwidget.h b/kmouth/wordcompletion/wordcompletionwidget.h index fddf074..6118642 100644 --- a/kmouth/wordcompletion/wordcompletionwidget.h +++ b/kmouth/wordcompletion/wordcompletionwidget.h @@ -30,8 +30,9 @@ class KLanguageButton; */ class WordCompletionWidget : public WordCompletionUI { Q_OBJECT + TQ_OBJECT public: - WordCompletionWidget(TQWidget *parent, const char *name); + WordCompletionWidget(TQWidget *tqparent, const char *name); ~WordCompletionWidget(); /** diff --git a/kmouth/wordcompletion/wordlist.cpp b/kmouth/wordcompletion/wordlist.cpp index f10feaf..15c4ea2 100644 --- a/kmouth/wordcompletion/wordlist.cpp +++ b/kmouth/wordcompletion/wordlist.cpp @@ -53,7 +53,7 @@ TQString XMLParser::errorString() { } bool XMLParser::startDocument() { - text = TQString::null; + text = TQString(); return true; } @@ -63,7 +63,7 @@ bool XMLParser::startElement (const TQString &, const TQString &, { if (!text.isNull() && !text.isEmpty()) { addWords (list, text); - text = TQString::null; + text = TQString(); } return true; } @@ -76,7 +76,7 @@ bool XMLParser::characters (const TQString &ch) { bool XMLParser::ignorableWhitespace (const TQString &) { if (!text.isNull() && !text.isEmpty()) { addWords (list, text); - text = TQString::null; + text = TQString(); } return true; } @@ -86,7 +86,7 @@ bool XMLParser::endElement (const TQString &, const TQString &, { if (!text.isNull() && !text.isEmpty()) { addWords (list, text); - text = TQString::null; + text = TQString(); } return true; } @@ -94,7 +94,7 @@ bool XMLParser::endElement (const TQString &, const TQString &, bool XMLParser::endDocument() { if (!text.isNull() && !text.isEmpty()) { addWords (list, text); - text = TQString::null; + text = TQString(); } return true; } @@ -139,9 +139,9 @@ void addWords (WordMap &map, TQString line) { TQStringList::ConstIterator it; for (it = words.begin(); it != words.end(); ++it) { - if (!(*it).contains(TQRegExp("\\d|_"))) { + if (!(*it).tqcontains(TQRegExp("\\d|_"))) { TQString key = (*it).lower(); - if (map.contains(key)) + if (map.tqcontains(key)) map[key] += 1; else map[key] = 1; @@ -152,7 +152,7 @@ void addWords (WordMap &map, TQString line) { void addWords (WordMap &map, WordMap add) { WordList::WordMap::ConstIterator it; for (it = add.begin(); it != add.end(); ++it) - if (map.contains(it.key())) + if (map.tqcontains(it.key())) map[it.key()] += it.data(); else map[it.key()] = it.data(); @@ -160,7 +160,7 @@ void addWords (WordMap &map, WordMap add) { void addWordsFromFile (WordMap &map, TQString filename, TQTextStream::Encoding encoding, TQTextCodec *codec) { TQFile xmlfile(filename); - TQXmlInputSource source (&xmlfile); + TQXmlInputSource source (TQT_TQIODEVICE(&xmlfile)); XMLParser parser; TQXmlSimpleReader reader; reader.setFeature ("http://trolltech.com/xml/features/report-start-end-entity", true); @@ -186,7 +186,7 @@ void addWordsFromFile (WordMap &map, TQString filename, TQTextStream::Encoding e bool ok; int weight = list[1].toInt(&ok); if (ok && (weight > 0)) { - if (map.contains(list[0])) + if (map.tqcontains(list[0])) map[list[0]] += weight; else map[list[0]] = weight; @@ -228,7 +228,7 @@ WordMap parseFiles (TQStringList files, TQTextStream::Encoding encoding, TQTextC if (steps != 0 && progress*100/steps > percent) { percent = progress*100/steps; pdlg->progressBar()->setProgress(percent); - qApp->processEvents (20); + tqApp->tqprocessEvents (20); } } return map; @@ -237,7 +237,7 @@ WordMap parseFiles (TQStringList files, TQTextStream::Encoding encoding, TQTextC WordMap mergeFiles (TQMap files, KProgressDialog *pdlg) { pdlg->setLabel (i18n("Merging dictionaries...")); pdlg->show(); - qApp->processEvents (20); + tqApp->tqprocessEvents (20); int progress = 0; int steps = files.count(); @@ -261,7 +261,7 @@ WordMap mergeFiles (TQMap files, KProgressDialog *pdlg) { maxWeight = weight; for (iter = fileMap.begin(); iter != fileMap.end(); ++iter) - if (map.contains(iter.key())) + if (map.tqcontains(iter.key())) map[iter.key()] += iter.data() * factor; else map[iter.key()] = iter.data() * factor; @@ -269,7 +269,7 @@ WordMap mergeFiles (TQMap files, KProgressDialog *pdlg) { if (steps != 0 && progress*100/steps > percent) { percent = progress*100/steps; pdlg->progressBar()->setProgress(percent); - qApp->processEvents (20); + tqApp->tqprocessEvents (20); } } @@ -290,7 +290,7 @@ WordMap mergeFiles (TQMap files, KProgressDialog *pdlg) { WordMap parseKDEDoc (TQString language, KProgressDialog *pdlg) { pdlg->setLabel (i18n("Parsing the KDE documentation...")); pdlg->show(); - qApp->processEvents (20); + tqApp->tqprocessEvents (20); TQStringList files = KApplication::kApplication()->dirs()->findAllResources ("html", language + "/*.docbook", true, true); if ((files.count() == 0) && (language.length() == 5)) { @@ -304,7 +304,7 @@ WordMap parseKDEDoc (TQString language, KProgressDialog *pdlg) { WordMap parseFile (TQString filename, TQTextStream::Encoding encoding, TQTextCodec *codec, KProgressDialog *pdlg) { pdlg->setLabel (i18n("Parsing file...")); pdlg->show(); - qApp->processEvents (20); + tqApp->tqprocessEvents (20); TQStringList files = filename; @@ -314,16 +314,16 @@ WordMap parseFile (TQString filename, TQTextStream::Encoding encoding, TQTextCod WordMap parseDir (TQString directory, TQTextStream::Encoding encoding, TQTextCodec *codec, KProgressDialog *pdlg) { pdlg->setLabel (i18n("Parsing directory...")); pdlg->show(); - qApp->processEvents (20); + tqApp->tqprocessEvents (20); TQStringList directories; directories += directory; TQStringList files; for (TQStringList::Iterator it = directories.begin(); it != directories.end(); it = directories.remove(it)) { TQDir dir(*it); - const QFileInfoList *entries = dir.entryInfoList ("*", TQDir::Dirs | TQDir::Files | TQDir::NoSymLinks | TQDir::Readable); + const TQFileInfoList *entries = dir.entryInfoList ("*", TQDir::Dirs | TQDir::Files | TQDir::NoSymLinks | TQDir::Readable); if (entries != 0) { - QFileInfoListIterator iter (*entries); + TQFileInfoListIterator iter (*entries); while ((iter.current()) != 0) { TQString name = iter.current()->fileName(); if (name != "." && name != "..") { @@ -394,14 +394,14 @@ void loadAffFile(const TQString &filename, AffMap &prefixes, AffMap &suffixes) { if (s.startsWith("PFX")) { AffList list; - if (prefixes.contains (fields[1][0])) + if (prefixes.tqcontains (fields[1][0])) list = prefixes[fields[1][0]]; list << e; prefixes[fields[1][0]] = list; } else if (s.startsWith("SFX")) { AffList list; - if (suffixes.contains (fields[1][0])) + if (suffixes.tqcontains (fields[1][0])) list = suffixes[fields[1][0]]; list << e; suffixes[fields[1][0]] = list; @@ -432,7 +432,7 @@ inline bool checkCondition (const TQString &word, const TQStringList &condition) it != condition.end(); ++it, ++idx) { - if ((*it).contains(word[idx]) == ((*it)[0] == '^')) + if ((*it).tqcontains(word[idx]) == ((*it)[0] == '^')) return false; } return true; @@ -445,7 +445,7 @@ inline bool checkCondition (const TQString &word, const TQStringList &condition) */ inline void checkWord(const TQString &word, const TQString &modifiers, bool cross, const WordMap &map, WordMap &checkedMap, const AffMap &suffixes) { for (uint i = 0; i < modifiers.length(); i++) { - if (suffixes.contains(modifiers[i])) { + if (suffixes.tqcontains(modifiers[i])) { AffList sList = suffixes[modifiers[i]]; AffList::ConstIterator sIt; @@ -454,7 +454,7 @@ inline void checkWord(const TQString &word, const TQString &modifiers, bool cros && (checkCondition(word, (*sIt).condition))) { TQString sWord = word.left(word.length()-(*sIt).charsToRemove) + (*sIt).add; - if (map.contains(sWord)) + if (map.tqcontains(sWord)) checkedMap[sWord] = map[sWord]; } } @@ -467,19 +467,19 @@ inline void checkWord(const TQString &word, const TQString &modifiers, bool cros * @param modifiers discribes which pre- and suffixes are valid */ void checkWord (const TQString &word, const TQString &modifiers, const WordMap &map, WordMap &checkedMap, const AffMap &prefixes, const AffMap &suffixes) { - if (map.contains(word)) + if (map.tqcontains(word)) checkedMap[word] = map[word]; checkWord(word, modifiers, true, map, checkedMap, suffixes); for (uint i = 0; i < modifiers.length(); i++) { - if (prefixes.contains(modifiers[i])) { + if (prefixes.tqcontains(modifiers[i])) { AffList pList = prefixes[modifiers[i]]; AffList::ConstIterator pIt; for (pIt = pList.begin(); pIt != pList.end(); ++pIt) { TQString pWord = (*pIt).add + word; - if (map.contains(pWord)) + if (map.tqcontains(pWord)) checkedMap[pWord] = map[pWord]; checkWord(pWord, modifiers, false, map, checkedMap, suffixes); @@ -504,7 +504,7 @@ WordMap spellCheck (WordMap map, TQString dictionary, KProgressDialog *pdlg) { pdlg->setLabel (i18n("Performing spell check...")); pdlg->progressBar()->setTotalSteps(100); pdlg->progressBar()->setProgress(0); - qApp->processEvents (20); + tqApp->tqprocessEvents (20); int progress = 0; int steps = 0; int percent = 0; @@ -520,14 +520,14 @@ WordMap spellCheck (WordMap map, TQString dictionary, KProgressDialog *pdlg) { while (!stream.atEnd()) { TQString s = stream.readLine(); - if (s.contains("/")) { - TQString word = s.left(s.find("/")).lower(); - TQString modifiers = s.right(s.length() - s.find("/")); + if (s.tqcontains("/")) { + TQString word = s.left(s.tqfind("/")).lower(); + TQString modifiers = s.right(s.length() - s.tqfind("/")); checkWord(word, modifiers, map, checkedMap, prefixes, suffixes); } else { - if (!s.isEmpty() && !s.isNull() && map.contains(s.lower())) + if (!s.isEmpty() && !s.isNull() && map.tqcontains(s.lower())) checkedMap[s.lower()] = map[s.lower()]; } @@ -535,7 +535,7 @@ WordMap spellCheck (WordMap map, TQString dictionary, KProgressDialog *pdlg) { if (steps != 0 && progress*100/steps > percent) { percent = progress*100/steps; pdlg->progressBar()->setProgress(percent); - qApp->processEvents (20); + tqApp->tqprocessEvents (20); } } } diff --git a/kmouth/wordcompletion/wordlist.h b/kmouth/wordcompletion/wordlist.h index 2ce004f..11dd6c1 100644 --- a/kmouth/wordcompletion/wordlist.h +++ b/kmouth/wordcompletion/wordlist.h @@ -46,7 +46,7 @@ bool saveWordList (WordMap map, TQString filename); /** * This class implements a parser for reading docbooks and generating word - * lists. It is intended to be used together with the Qt SAX2 framework. + * lists. It is intended to be used together with the TQt SAX2 framework. * @author Gunnar Schmi Dt */ diff --git a/ksayit/Doxyfile b/ksayit/Doxyfile index cb1408f..77566a0 100644 --- a/ksayit/Doxyfile +++ b/ksayit/Doxyfile @@ -16,7 +16,7 @@ ABBREVIATE_BRIEF = "The $name class" \ is \ provides \ specifies \ - contains \ + tqcontains \ represents \ a \ an \ @@ -102,7 +102,7 @@ FILE_PATTERNS = *.c \ *.tlh \ *.diff \ *.patch \ - *.moc \ + *.tqmoc \ *.xpm \ *.dox RECURSIVE = yes diff --git a/ksayit/Freeverb_plugin/Makefile.am b/ksayit/Freeverb_plugin/Makefile.am index 0db4104..d226444 100644 --- a/ksayit/Freeverb_plugin/Makefile.am +++ b/ksayit/Freeverb_plugin/Makefile.am @@ -1,4 +1,4 @@ -INCLUDES = -I$(top_srcdir)/ksayit/src $(all_includes) +INCLUDES = -I$(top_srcdir)/ksayit/src $(all_includes) -I$(kde_includes)/kde -I$(kde_includes)/arts METASOURCES = AUTO kde_servicetypes_DATA = ksayit_libFreeverb_service.desktop kde_services_DATA = ksayit_libFreeverb.desktop diff --git a/ksayit/Freeverb_plugin/freeverb_setup.ui b/ksayit/Freeverb_plugin/freeverb_setup.ui index ab3808a..c1dffb0 100644 --- a/ksayit/Freeverb_plugin/freeverb_setup.ui +++ b/ksayit/Freeverb_plugin/freeverb_setup.ui @@ -1,6 +1,6 @@ Freeverb_Setup - + Freeverb_Setup @@ -20,7 +20,7 @@ 0 - + 360 300 @@ -36,15 +36,15 @@ Minimum - + - layout6 + tqlayout6 unnamed - + frame_room @@ -56,7 +56,7 @@ 0 - + 0 260 @@ -72,18 +72,18 @@ unnamed - + textLabel_room <b>Room</b> - + WordBreak|AlignCenter - + LCD_room @@ -121,7 +121,7 @@ Flat - + slider_room @@ -149,7 +149,7 @@ - + frame_damp @@ -161,7 +161,7 @@ 0 - + 0 260 @@ -177,18 +177,18 @@ unnamed - + textLabel_damp <b>Damp</b> - + WordBreak|AlignCenter - + LCD_damp @@ -226,7 +226,7 @@ Flat - + slider_damp @@ -248,7 +248,7 @@ - + frame_wet @@ -260,7 +260,7 @@ 0 - + 0 260 @@ -276,18 +276,18 @@ unnamed - + textLabel_wet <b>Wet</b> - + WordBreak|AlignCenter - + LCD_wet @@ -325,7 +325,7 @@ Flat - + slider_wet @@ -347,7 +347,7 @@ - + frame_dry @@ -359,7 +359,7 @@ 0 - + 0 260 @@ -375,18 +375,18 @@ unnamed - + textLabel_dry <b>Dry</b> - + WordBreak|AlignCenter - + LCD_dry @@ -424,7 +424,7 @@ Flat - + slider_dry @@ -446,7 +446,7 @@ - + frame_width @@ -458,7 +458,7 @@ 0 - + 0 260 @@ -474,18 +474,18 @@ unnamed - + textLabel_width <b>Width</b> - + WordBreak|AlignCenter - + LCD_width @@ -523,7 +523,7 @@ Flat - + slider_width @@ -569,9 +569,9 @@ Horizontal - + - layout12 + tqlayout12 @@ -587,7 +587,7 @@ Expanding - + 180 20 @@ -598,7 +598,7 @@ OK_Button - + 60 0 @@ -653,15 +653,15 @@ slotOKwasClicked() - + sliderRoomChanged(int) sliderDampChanged(int) sliderWetChanged(int) sliderDryChanged(int) sliderWidthChanged(int) slotOKwasClicked() - - + + kpushbutton.h diff --git a/ksayit/Freeverb_plugin/freeverbsetupimpl.cpp b/ksayit/Freeverb_plugin/freeverbsetupimpl.cpp index 4fd00be..f861a57 100644 --- a/ksayit/Freeverb_plugin/freeverbsetupimpl.cpp +++ b/ksayit/Freeverb_plugin/freeverbsetupimpl.cpp @@ -28,8 +28,8 @@ using namespace std; // App specific includes #include "freeverbsetupimpl.h" -FreeverbSetupImpl::FreeverbSetupImpl(TQWidget *parent, const char *name, bool modal, KConfig *config ) - : Freeverb_Setup(parent,name,modal), m_config(config) { +FreeverbSetupImpl::FreeverbSetupImpl(TQWidget *tqparent, const char *name, bool modal, KConfig *config ) + : Freeverb_Setup(tqparent,name,modal), m_config(config) { // initialize Widgets Init(); diff --git a/ksayit/Freeverb_plugin/freeverbsetupimpl.h b/ksayit/Freeverb_plugin/freeverbsetupimpl.h index b243faf..b7c884f 100644 --- a/ksayit/Freeverb_plugin/freeverbsetupimpl.h +++ b/ksayit/Freeverb_plugin/freeverbsetupimpl.h @@ -33,8 +33,9 @@ class FreeverbSetupImpl : public Freeverb_Setup { Q_OBJECT + TQ_OBJECT public: - FreeverbSetupImpl(TQWidget *parent=0, const char *name=0, bool modal=true, KConfig *config=0); + FreeverbSetupImpl(TQWidget *tqparent=0, const char *name=0, bool modal=true, KConfig *config=0); ~FreeverbSetupImpl(); public slots: diff --git a/ksayit/Freeverb_plugin/ksayitfreeverblib.cpp b/ksayit/Freeverb_plugin/ksayitfreeverblib.cpp index bb91885..64febd1 100644 --- a/ksayit/Freeverb_plugin/ksayitfreeverblib.cpp +++ b/ksayit/Freeverb_plugin/ksayitfreeverblib.cpp @@ -41,19 +41,19 @@ KInstance *FreeverbPluginFactory::p_instance = 0L; // Factory Constructor -FreeverbPluginFactory::FreeverbPluginFactory(TQObject *parent, const char* name) +FreeverbPluginFactory::FreeverbPluginFactory(TQObject *tqparent, const char* name) { p_instance = new KInstance("FreeverbPluginFactory"); } -TQObject* FreeverbPluginFactory::createObject(TQObject *parent, const char* name, +TQObject* FreeverbPluginFactory::createObject(TQObject *tqparent, const char* name, const char*, const TQStringList &) { kdDebug(100200) << "FreeverbPluginFactory::createObject()" << endl; - TQObject* obj = new FreeverbPlugin( parent, name ); + TQObject* obj = new FreeverbPlugin( tqparent, name ); emit objectCreated( obj ); return obj; } @@ -62,8 +62,8 @@ TQObject* FreeverbPluginFactory::createObject(TQObject *parent, const char* name // Plugin Constructor -FreeverbPlugin::FreeverbPlugin(TQObject *parent, const char* name) //, KApplication *Appl) - : FXPlugin(parent, name) //, m_Appl(Appl) +FreeverbPlugin::FreeverbPlugin(TQObject *tqparent, const char* name) //, KApplication *Appl) + : FXPlugin(tqparent, name) //, m_Appl(Appl) { m_config = new KSimpleConfig("ksayit_freeverbrc"); diff --git a/ksayit/Freeverb_plugin/ksayitfreeverblib.h b/ksayit/Freeverb_plugin/ksayitfreeverblib.h index e9731d4..aac4408 100644 --- a/ksayit/Freeverb_plugin/ksayitfreeverblib.h +++ b/ksayit/Freeverb_plugin/ksayitfreeverblib.h @@ -27,15 +27,16 @@ class FreeverbPluginFactory : public KLibFactory { Q_OBJECT + TQ_OBJECT public: // Consturctor - FreeverbPluginFactory(TQObject *parent=0, const char* name=0); + FreeverbPluginFactory(TQObject *tqparent=0, const char* name=0); // Destructor virtual ~FreeverbPluginFactory(){ delete p_instance; }; - TQObject* createObject(TQObject *parent=0, const char* name=0, - const char* className="TQObject", + TQObject* createObject(TQObject *tqparent=0, const char* name=0, + const char* className=TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args=TQStringList()); private: @@ -50,9 +51,10 @@ private: class FreeverbPlugin : public FXPlugin { Q_OBJECT + TQ_OBJECT public: // Constructor - FreeverbPlugin(TQObject *parent=0, const char* name=0); //, KApplication *Appl=0); + FreeverbPlugin(TQObject *tqparent=0, const char* name=0); //, KApplication *Appl=0); // Destructor ~FreeverbPlugin(); diff --git a/ksayit/KTTSD_Lib/KTTSDlibSetup.ui b/ksayit/KTTSD_Lib/KTTSDlibSetup.ui index 8c624e4..29be316 100644 --- a/ksayit/KTTSD_Lib/KTTSDlibSetup.ui +++ b/ksayit/KTTSD_Lib/KTTSDlibSetup.ui @@ -1,6 +1,6 @@ KTTSDlibSetup - + KTTSDlibSetup @@ -19,7 +19,7 @@ unnamed - + textLabel1 @@ -49,9 +49,9 @@ Horizontal - + - layout1 + tqlayout1 @@ -67,14 +67,14 @@ Expanding - + 40 20 - + kcm_Button @@ -95,7 +95,7 @@ Expanding - + 40 20 @@ -114,8 +114,8 @@ slotLaunchControlcenter() - + slotLaunchControlcenter() - - + + diff --git a/ksayit/KTTSD_Lib/kttsdlib.cpp b/ksayit/KTTSD_Lib/kttsdlib.cpp index f41670b..9680a88 100644 --- a/ksayit/KTTSD_Lib/kttsdlib.cpp +++ b/ksayit/KTTSD_Lib/kttsdlib.cpp @@ -11,7 +11,7 @@ // // #include // nanosleep -// Qt includes +// TQt includes #include #include @@ -27,8 +27,8 @@ #include "kttsdlibsetupimpl.h" -KTTSDLib::KTTSDLib(TQObject *parent, const char *name, KApplication *Appl) - : TQObject(parent, name), m_Appl(Appl) +KTTSDLib::KTTSDLib(TQObject *tqparent, const char *name, KApplication *Appl) + : TQObject(tqparent, name), m_Appl(Appl) { KGlobal::locale()->insertCatalogue("libKTTSD"); m_talker = new kttsdlibtalker2(static_cast(this), "kttsdlibtalker"); @@ -81,7 +81,7 @@ int KTTSDLib::getActions() } -int KTTSDLib::getStatus() const +int KTTSDLib::gettqStatus() const { return TTS::AUDIOFILE; } diff --git a/ksayit/KTTSD_Lib/kttsdlib.h b/ksayit/KTTSD_Lib/kttsdlib.h index eb57912..929ef3a 100644 --- a/ksayit/KTTSD_Lib/kttsdlib.h +++ b/ksayit/KTTSD_Lib/kttsdlib.h @@ -45,9 +45,10 @@ class kttsdlibtalker2; /** @author Robert Vogl */ -class KDE_EXPORT KTTSDLib : public QObject +class KDE_EXPORT KTTSDLib : public TQObject { -Q_OBJECT +Q_OBJECT +TQ_OBJECT signals: /** Emitted when the plugin has been finished speeking. */ @@ -70,7 +71,7 @@ public slots: void slotTextStarted(const uint job); public: - KTTSDLib(TQObject *parent=0, const char *name=0, KApplication *Appl=0); + KTTSDLib(TQObject *tqparent=0, const char *name=0, KApplication *Appl=0); ~KTTSDLib(); @@ -92,7 +93,7 @@ public: void sayText(); - int getStatus() const; + int gettqStatus() const; void stop(); diff --git a/ksayit/KTTSD_Lib/kttsdlibsetupimpl.cpp b/ksayit/KTTSD_Lib/kttsdlibsetupimpl.cpp index 1cb8bc9..0ade8fe 100644 --- a/ksayit/KTTSD_Lib/kttsdlibsetupimpl.cpp +++ b/ksayit/KTTSD_Lib/kttsdlibsetupimpl.cpp @@ -12,7 +12,7 @@ #include -// Qt includes +// TQt includes #include // KDE includes @@ -23,8 +23,8 @@ // App specific includes #include "kttsdlibsetupimpl.h" -KTTSDlibSetupImpl::KTTSDlibSetupImpl(TQWidget *parent, const char *name) - : KTTSDlibSetup(parent, name) +KTTSDlibSetupImpl::KTTSDlibSetupImpl(TQWidget *tqparent, const char *name) + : KTTSDlibSetup(tqparent, name) { } @@ -47,7 +47,7 @@ void KTTSDlibSetupImpl::slotLaunchControlcenter() fgets(cmdresult, 18, fp); pclose(fp); } - if ( !TQCString(cmdresult).contains("kcmkttsd") ){ + if ( !TQCString(cmdresult).tqcontains("kcmkttsd") ){ TQString error = i18n("Control Center Module for KTTSD not found."); KMessageBox::sorry(this, error, i18n("Problem")); return; diff --git a/ksayit/KTTSD_Lib/kttsdlibsetupimpl.h b/ksayit/KTTSD_Lib/kttsdlibsetupimpl.h index cd36430..ed49df4 100644 --- a/ksayit/KTTSD_Lib/kttsdlibsetupimpl.h +++ b/ksayit/KTTSD_Lib/kttsdlibsetupimpl.h @@ -12,7 +12,7 @@ #ifndef KTTSDSETUPIMPL_H #define KTTSDSETUPIMPL_H -// Qt includes +// TQt includes // KDE includes #include @@ -26,8 +26,9 @@ class KTTSDlibSetupImpl : public KTTSDlibSetup { Q_OBJECT + TQ_OBJECT public: - KTTSDlibSetupImpl(TQWidget *parent = 0, const char *name = 0); + KTTSDlibSetupImpl(TQWidget *tqparent = 0, const char *name = 0); ~KTTSDlibSetupImpl(); diff --git a/ksayit/KTTSD_Lib/kttsdlibtalker2.cpp b/ksayit/KTTSD_Lib/kttsdlibtalker2.cpp index c88a96b..10fceb9 100644 --- a/ksayit/KTTSD_Lib/kttsdlibtalker2.cpp +++ b/ksayit/KTTSD_Lib/kttsdlibtalker2.cpp @@ -12,7 +12,7 @@ #include //sleep -// Qt includes +// TQt includes #include // KDE includes @@ -21,8 +21,8 @@ // App specific includes #include "kttsdlibtalker2.h" -kttsdlibtalker2::kttsdlibtalker2(TQObject *parent, const char *name) - : TQObject(parent, name), DCOPStub("kttsd", "KSpeech") +kttsdlibtalker2::kttsdlibtalker2(TQObject *tqparent, const char *name) + : TQObject(tqparent, name), DCOPStub("kttsd", "KSpeech") { m_client = NULL; diff --git a/ksayit/KTTSD_Lib/kttsdlibtalker2.h b/ksayit/KTTSD_Lib/kttsdlibtalker2.h index 29b6371..6627a6e 100644 --- a/ksayit/KTTSD_Lib/kttsdlibtalker2.h +++ b/ksayit/KTTSD_Lib/kttsdlibtalker2.h @@ -12,7 +12,7 @@ #ifndef KTTSDLIBTALKER2_H #define KTTSDLIBTALKER2_H -// Qt includes +// TQt includes #include #include @@ -29,6 +29,7 @@ class kttsdlibtalker2 : public TQObject, public KSpeech_stub, virtual public KSpeechSink { Q_OBJECT + TQ_OBJECT signals: void signalTextStarted(const uint); @@ -36,7 +37,7 @@ signals: void signalTextStopped(const uint); public: - kttsdlibtalker2(TQObject *parent = 0, const char *name = 0); + kttsdlibtalker2(TQObject *tqparent = 0, const char *name = 0); ~kttsdlibtalker2(); diff --git a/ksayit/src/DocTreeView.ui b/ksayit/src/DocTreeView.ui index 14e5f09..ed6f9b1 100644 --- a/ksayit/src/DocTreeView.ui +++ b/ksayit/src/DocTreeView.ui @@ -1,6 +1,6 @@ DocTreeView - + DocTreeView @@ -20,7 +20,7 @@ 0 - + 100 200 @@ -105,21 +105,21 @@ listView - clicked(QListViewItem*) + clicked(TQListViewItem*) DocTreeView - slotItemClicked(QListViewItem*) + slotItemClicked(TQListViewItem*) listView - rightButtonPressed(QListViewItem*,const QPoint&,int) + rightButtonPressed(TQListViewItem*,const TQPoint&,int) DocTreeView - slotRightButtonPressed(QListViewItem*,const QPoint&,int) + slotRightButtonPressed(TQListViewItem*,const TQPoint&,int) DocTreeView.ui.h - + signalContentChanged(const QString &) signalAllNodesProcessed() signalSetText(const QString &) @@ -128,9 +128,9 @@ signalSetBookmarkFilename(const QString&) signalChangeBookmarkFilename(const QString &) signalDeleteBookmark(const QString&, const QString&) - - - slotItemClicked( QListViewItem * ) + + + slotItemClicked( TQListViewItem * ) slotRenameItem() slotDeleteItem() slotNewBookInfo() @@ -149,9 +149,9 @@ slotNewSection_3() slotNewSection_4() slotNewSection_5() - slotRightButtonPressed( QListViewItem * i, const QPoint &, int ) - - + slotRightButtonPressed( TQListViewItem * i, const TQPoint &, int ) + + klistview.h diff --git a/ksayit/src/DocTreeView.ui.h b/ksayit/src/DocTreeView.ui.h index 9807a7c..4d1de7b 100644 --- a/ksayit/src/DocTreeView.ui.h +++ b/ksayit/src/DocTreeView.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** If you want to add, delete, or rename functions or slots, use -** Qt Designer to update this file, preserving your code. +** TQt Designer to update this file, preserving your code. ** ** You should not define a constructor or destructor in this file. ** Instead, write your code in functions called init() and destroy(). diff --git a/ksayit/src/KSayItView.ui b/ksayit/src/KSayItView.ui index 4ffa9b9..adb821b 100644 --- a/ksayit/src/KSayItView.ui +++ b/ksayit/src/KSayItView.ui @@ -1,6 +1,6 @@ KSayItView - + KSayItView @@ -23,7 +23,7 @@ TextEdit - + 400 200 @@ -58,11 +58,11 @@ TextEdit - + slotCopyAvailable(bool) slotTextChanged() - - + + ktextedit.h diff --git a/ksayit/src/Types.h b/ksayit/src/Types.h index 506e67f..005f108 100644 --- a/ksayit/src/Types.h +++ b/ksayit/src/Types.h @@ -54,9 +54,9 @@ This abstract class is the interface to access the items of the TreeView. class ListViewInterface : public KListViewItem { public: - ListViewInterface(ListViewInterface *parent=0, TQString label=TQString::null); - ListViewInterface(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null); - ListViewInterface(KListView *lv=0, TQString label=TQString::null); + ListViewInterface(ListViewInterface *tqparent=0, TQString label=TQString()); + ListViewInterface(ListViewInterface *tqparent=0, ListViewInterface *after=0, TQString label=TQString()); + ListViewInterface(KListView *lv=0, TQString label=TQString()); // ~ListViewItemInterface(); diff --git a/ksayit/src/contextmenuhandler.cpp b/ksayit/src/contextmenuhandler.cpp index 26e8831..75f06e7 100644 --- a/ksayit/src/contextmenuhandler.cpp +++ b/ksayit/src/contextmenuhandler.cpp @@ -10,7 +10,7 @@ // // -// Qt includes +// TQt includes #include #include @@ -31,12 +31,12 @@ ContextActionHandler::ContextActionHandler(ContextMenuHandler *menuhandler) : TQXmlDefaultHandler(), m_menuhandler(menuhandler) { - m_subName = TQString::null; - m_actionName = TQString::null; - m_qty = TQString::null; + m_subName = TQString(); + m_actionName = TQString(); + m_qty = TQString(); m_popup = menuhandler->m_popupmenu; m_hit = false; - m_searchID = TQString::null; + m_searchID = TQString(); } ContextActionHandler::~ContextActionHandler() @@ -117,8 +117,8 @@ bool ContextActionHandler::characters( const TQString &ch ) /** * MenuHandler */ -ContextMenuHandler::ContextMenuHandler(TQObject *parent, const char *name) - : TQObject(parent, name), m_DocTreeView(parent) +ContextMenuHandler::ContextMenuHandler(TQObject *tqparent, const char *name) + : TQObject(tqparent, name), m_DocTreeView(tqparent) { m_popupmenu = NULL; m_item = NULL; @@ -293,7 +293,7 @@ bool ContextMenuHandler::parseXmlFile(const TQString &xmlID) ContextActionHandler handler(this); handler.setSearchID(xmlID); parser.setContentHandler( &handler ); - return parser.parse( &xmlFile ); + return parser.parse( TQT_TQIODEVICE(&xmlFile) ); } @@ -307,7 +307,7 @@ KAction* ContextMenuHandler::ActionFactory( const TQString &actionName, const TQ // check if qty is within allowed limits ListViewInterface *i = static_cast(m_item->firstChild()); int count = 0; - TQString name = TQString::null; + TQString name = TQString(); while (i){ name = ( i->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString(); if ( name.lower() == actionName.lower() ){ @@ -378,9 +378,9 @@ KAction* ContextMenuHandler::ActionFactory( const TQString &actionName, const TQ } -KPopupMenu* ContextMenuHandler::SubMenuFactory(KPopupMenu *parent) +KPopupMenu* ContextMenuHandler::SubMenuFactory(KPopupMenu *tqparent) { - return new KPopupMenu(parent); + return new KPopupMenu(tqparent); } diff --git a/ksayit/src/contextmenuhandler.h b/ksayit/src/contextmenuhandler.h index 148bb04..88d7c0e 100644 --- a/ksayit/src/contextmenuhandler.h +++ b/ksayit/src/contextmenuhandler.h @@ -12,7 +12,7 @@ #ifndef CONTEXTMENUHANDLER_H #define CONTEXTMENUHANDLER_H -// Qt includes +// TQt includes #include #include #include @@ -64,11 +64,12 @@ private: /** @author Robert Vogl */ -class ContextMenuHandler : public QObject +class ContextMenuHandler : public TQObject { Q_OBJECT + TQ_OBJECT public: - ContextMenuHandler(TQObject *parent = 0, const char *name = 0); + ContextMenuHandler(TQObject *tqparent = 0, const char *name = 0); ~ContextMenuHandler(); @@ -79,10 +80,10 @@ public: KPopupMenu* getPopupMenu(ListViewInterface *item); /** - * \returns A pointer to the Submenu as a child of the parent - * \p parent. + * \returns A pointer to the Submenu as a child of the tqparent + * \p tqparent. */ - KPopupMenu* SubMenuFactory(KPopupMenu *parent); + KPopupMenu* SubMenuFactory(KPopupMenu *tqparent); /** * Creates an action sufficiant to the given name. diff --git a/ksayit/src/docbookclasses.cpp b/ksayit/src/docbookclasses.cpp index 9a3af1b..5f0fa00 100644 --- a/ksayit/src/docbookclasses.cpp +++ b/ksayit/src/docbookclasses.cpp @@ -9,7 +9,7 @@ // Copyright: See COPYING file that comes with this distribution // // -// Qt includes +// TQt includes #include #include #include @@ -31,12 +31,12 @@ ////////////////////////////////////// // Interface ////////////////////////////////////// -ListViewInterface::ListViewInterface(ListViewInterface *parent, TQString label) - : KListViewItem( parent, label ) +ListViewInterface::ListViewInterface(ListViewInterface *tqparent, TQString label) + : KListViewItem( tqparent, label ) { } -ListViewInterface::ListViewInterface(ListViewInterface *parent, ListViewInterface *after, TQString label) : KListViewItem( parent, after, label ) +ListViewInterface::ListViewInterface(ListViewInterface *tqparent, ListViewInterface *after, TQString label) : KListViewItem( tqparent, after, label ) { } @@ -63,12 +63,12 @@ RobDocument::RobDocument(KListView *lv, TQString label) m_valueList.append( TQString("RobDocument") ); // XmlContextName m_valueList.append( (bool)false ); // isEditable m_valueList.append( (int)0 ); // MaxLines - m_valueList.append(TQString::null); // Summary - m_valueList.append(TQString::null); // RawData + m_valueList.append(TQString()); // Summary + m_valueList.append(TQString()); // RawData m_valueList.append("

" + i18n("unnamed") + "

"); // RTFHeader - m_valueList.append(TQString::null); // RTFData + m_valueList.append(TQString()); // RTFData m_valueList.append(i18n("unnamed") + "\n"); // SpeakerHeader - m_valueList.append(TQString::null); // SpeakerData + m_valueList.append(TQString()); // SpeakerData // new Concept (end) } @@ -101,7 +101,7 @@ bool RobDocument::setValue( unsigned int index, TQVariant data ) TQVariant RobDocument::getValue( unsigned int index ) const { if ( index > m_valueList.count() ) - return TQVariant(); // a invalid QVariant + return TQVariant(); // a invalid TQVariant TQVariant data; data = m_valueList[index]; @@ -116,8 +116,8 @@ TQVariant RobDocument::getValue( unsigned int index ) const /** * Overview */ -Overview::Overview(ListViewInterface *parent, ListViewInterface *after, TQString label) - : ListViewInterface(parent, after, label) +Overview::Overview(ListViewInterface *tqparent, ListViewInterface *after, TQString label) + : ListViewInterface(tqparent, after, label) { TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("filenew", KIcon::Small); this->setPixmap(0, pixmap); @@ -128,12 +128,12 @@ Overview::Overview(ListViewInterface *parent, ListViewInterface *after, TQString m_valueList.append( TQString("BookInfo") ); // XmlContextName m_valueList.append( (bool)false ); // isEditable m_valueList.append( (int)0 ); // MaxLines - m_valueList.append(TQString::null); // Summary - m_valueList.append(TQString::null); // RawData + m_valueList.append(TQString()); // Summary + m_valueList.append(TQString()); // RawData m_valueList.append("

" + i18n("Overview") + "

"); // RTFHeader - m_valueList.append(TQString::null); // RTFData + m_valueList.append(TQString()); // RTFData m_valueList.append(i18n("Overview") + "\n"); // SpeakerHeader - m_valueList.append(TQString::null); // SpeakerData + m_valueList.append(TQString()); // SpeakerData // new Concept (end) } @@ -160,7 +160,7 @@ bool Overview::setValue( unsigned int index, TQVariant data ) TQVariant Overview::getValue( unsigned int index ) const { if ( index > m_valueList.count() ) - return TQVariant(); // a invalid QVariant + return TQVariant(); // a invalid TQVariant TQVariant data; data = m_valueList[index]; @@ -171,8 +171,8 @@ TQVariant Overview::getValue( unsigned int index ) const /** * Date */ -Date::Date(ListViewInterface *parent, ListViewInterface *after, TQString label) - : ListViewInterface(parent, after, label) +Date::Date(ListViewInterface *tqparent, ListViewInterface *after, TQString label) + : ListViewInterface(tqparent, after, label) { TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("filenew", KIcon::Small); this->setPixmap(0, pixmap); @@ -183,12 +183,12 @@ Date::Date(ListViewInterface *parent, ListViewInterface *after, TQString label) m_valueList.append( TQString("Date") ); // XmlContextName m_valueList.append( (bool)false ); // isEditable m_valueList.append( (int)1 ); // MaxLines - m_valueList.append(TQString::null); // Summary - m_valueList.append(TQString::null); // RawData + m_valueList.append(TQString()); // Summary + m_valueList.append(TQString()); // RawData m_valueList.append("" + i18n("Date") +": "); // RTFHeader - m_valueList.append(TQString::null); // RTFData + m_valueList.append(TQString()); // RTFData m_valueList.append(i18n("Date") + ": "); // SpeakerHeader - m_valueList.append(TQString::null); // SpeakerData + m_valueList.append(TQString()); // SpeakerData // new Concept (end) } @@ -227,7 +227,7 @@ bool Date::setValue( unsigned int index, TQVariant data ) TQVariant Date::getValue( unsigned int index ) const { if ( index > m_valueList.count() ) - return TQVariant(); // a invalid QVariant + return TQVariant(); // a invalid TQVariant TQVariant data; data = m_valueList[index]; @@ -238,8 +238,8 @@ TQVariant Date::getValue( unsigned int index ) const /** * ReleaseInfo */ -ReleaseInfo::ReleaseInfo(ListViewInterface *parent, ListViewInterface *after, TQString label) - : ListViewInterface(parent, after, label) +ReleaseInfo::ReleaseInfo(ListViewInterface *tqparent, ListViewInterface *after, TQString label) + : ListViewInterface(tqparent, after, label) { TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("filenew", KIcon::Small); this->setPixmap(0, pixmap); @@ -250,12 +250,12 @@ ReleaseInfo::ReleaseInfo(ListViewInterface *parent, ListViewInterface *after, TQ m_valueList.append( TQString("ReleaseInfo") ); // XmlContextName m_valueList.append( (bool)false ); // isEditable m_valueList.append( (int)1 ); // MaxLines - m_valueList.append(TQString::null); // Summary - m_valueList.append(TQString::null); // RawData + m_valueList.append(TQString()); // Summary + m_valueList.append(TQString()); // RawData m_valueList.append("" + i18n("Release") + ": "); // RTFHeader - m_valueList.append(TQString::null); // RTFData + m_valueList.append(TQString()); // RTFData m_valueList.append(i18n("Release") + ": "); // SpeakerHeader - m_valueList.append(TQString::null); // SpeakerData + m_valueList.append(TQString()); // SpeakerData // new Concept (end) } @@ -294,7 +294,7 @@ bool ReleaseInfo::setValue( unsigned int index, TQVariant data ) TQVariant ReleaseInfo::getValue( unsigned int index ) const { if ( index > m_valueList.count() ) - return TQVariant(); // a invalid QVariant + return TQVariant(); // a invalid TQVariant TQVariant data; data = m_valueList[index]; @@ -305,8 +305,8 @@ TQVariant ReleaseInfo::getValue( unsigned int index ) const /** * Authorgroup */ -AuthorGroup::AuthorGroup(ListViewInterface *parent, ListViewInterface *after, TQString label) - : ListViewInterface(parent, after, label) +AuthorGroup::AuthorGroup(ListViewInterface *tqparent, ListViewInterface *after, TQString label) + : ListViewInterface(tqparent, after, label) { TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("kdmconfig", KIcon::Small); this->setPixmap(0, pixmap); @@ -317,12 +317,12 @@ AuthorGroup::AuthorGroup(ListViewInterface *parent, ListViewInterface *after, TQ m_valueList.append( TQString("AuthorGroup") ); // XmlContextName m_valueList.append( (bool)false ); // isEditable m_valueList.append( (int)0 ); // MaxLines - m_valueList.append(TQString::null); // Summary - m_valueList.append(TQString::null); // RawData + m_valueList.append(TQString()); // Summary + m_valueList.append(TQString()); // RawData m_valueList.append("

" + i18n("Author(s)")+ "

"); // RTFHeader - m_valueList.append(TQString::null); // RTFData + m_valueList.append(TQString()); // RTFData m_valueList.append(i18n("Author(s)") + "\n"); // SpeakerHeader - m_valueList.append(TQString::null); // SpeakerData + m_valueList.append(TQString()); // SpeakerData // new Concept (end) } @@ -349,7 +349,7 @@ bool AuthorGroup::setValue( unsigned int index, TQVariant data ) TQVariant AuthorGroup::getValue( unsigned int index ) const { if ( index > m_valueList.count() ) - return TQVariant(); // a invalid QVariant + return TQVariant(); // a invalid TQVariant TQVariant data; data = m_valueList[index]; @@ -361,8 +361,8 @@ TQVariant AuthorGroup::getValue( unsigned int index ) const /** * Author */ -Author::Author(ListViewInterface *parent, ListViewInterface *after, TQString label) - : ListViewInterface(parent, after, label) +Author::Author(ListViewInterface *tqparent, ListViewInterface *after, TQString label) + : ListViewInterface(tqparent, after, label) { TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("personal", KIcon::Small); this->setPixmap(0, pixmap); @@ -372,12 +372,12 @@ Author::Author(ListViewInterface *parent, ListViewInterface *after, TQString lab m_valueList.append( TQString("Author") ); // XmlContextName m_valueList.append( (bool)false ); // isEditable m_valueList.append( (int)1 ); // MaxLines - m_valueList.append(TQString::null); // Summary - m_valueList.append(TQString::null); // RawData + m_valueList.append(TQString()); // Summary + m_valueList.append(TQString()); // RawData m_valueList.append("" + i18n("Author") + ": "); // RTFHeader - m_valueList.append(TQString::null); // RTFData + m_valueList.append(TQString()); // RTFData m_valueList.append(i18n("Author") + ": "); // SpeakerHeader - m_valueList.append(TQString::null); // SpeakerData + m_valueList.append(TQString()); // SpeakerData // new Concept (end) } @@ -389,9 +389,9 @@ Author::~Author() // { // // canonify string // TQString m_data = data; -// m_data.replace( TQRegExp("\n"), "" ); // remove Newlines -// m_data.replace( TQRegExp(" {2,}"), " " ); // remove multiple spaces -// m_data.replace( TQRegExp("[\t|\r]{1,}"), ""); // remove Tabs +// m_data.tqreplace( TQRegExp("\n"), "" ); // remove Newlines +// m_data.tqreplace( TQRegExp(" {2,}"), " " ); // remove multiple spaces +// m_data.tqreplace( TQRegExp("[\t|\r]{1,}"), ""); // remove Tabs // // split string "firstname surname" // TQString firstname = m_data.section(' ', 0, 0); // TQString surname = m_data.section(' ', 1, 1); @@ -434,7 +434,7 @@ bool Author::setValue( unsigned int index, TQVariant data ) TQVariant Author::getValue( unsigned int index ) const { if ( index > m_valueList.count() ) - return TQVariant(); // a invalid QVariant + return TQVariant(); // a invalid TQVariant TQVariant data; data = m_valueList[index]; @@ -445,8 +445,8 @@ TQVariant Author::getValue( unsigned int index ) const /** * KeywordSet */ -KeywordSet::KeywordSet(ListViewInterface *parent, ListViewInterface *after, TQString label) - : ListViewInterface(parent, after, label) +KeywordSet::KeywordSet(ListViewInterface *tqparent, ListViewInterface *after, TQString label) + : ListViewInterface(tqparent, after, label) { TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("txt", KIcon::Small); this->setPixmap(0, pixmap); @@ -457,12 +457,12 @@ KeywordSet::KeywordSet(ListViewInterface *parent, ListViewInterface *after, TQSt m_valueList.append( TQString("KeywordSet") ); // XmlContextName m_valueList.append( (bool)false ); // isEditable m_valueList.append( (int)0 ); // MaxLines - m_valueList.append(TQString::null); // Summary - m_valueList.append(TQString::null); // RawData + m_valueList.append(TQString()); // Summary + m_valueList.append(TQString()); // RawData m_valueList.append("

" + i18n("Keywords") + "

"); // RTFHeader - m_valueList.append(TQString::null); // RTFData + m_valueList.append(TQString()); // RTFData m_valueList.append(i18n("Keywords") + "\n"); // SpeakerHeader - m_valueList.append(TQString::null); // SpeakerData + m_valueList.append(TQString()); // SpeakerData // new Concept (end) } @@ -489,7 +489,7 @@ bool KeywordSet::setValue( unsigned int index, TQVariant data ) TQVariant KeywordSet::getValue( unsigned int index ) const { if ( index > m_valueList.count() ) - return TQVariant(); // a invalid QVariant + return TQVariant(); // a invalid TQVariant TQVariant data; data = m_valueList[index]; @@ -500,20 +500,20 @@ TQVariant KeywordSet::getValue( unsigned int index ) const /** * Keyword */ -Keyword::Keyword(ListViewInterface *parent, ListViewInterface *after, TQString label) - : ListViewInterface(parent, after, label) +Keyword::Keyword(ListViewInterface *tqparent, ListViewInterface *after, TQString label) + : ListViewInterface(tqparent, after, label) { // new Concept (begin) m_valueList.clear(); m_valueList.append( TQString("Keyword") ); // XmlContextName m_valueList.append( (bool)false ); // isEditable m_valueList.append( (bool)1 ); // MaxLines - m_valueList.append(TQString::null); // Summary - m_valueList.append(TQString::null); // RawData - m_valueList.append(TQString::null); // RTFHeader - m_valueList.append(TQString::null); // RTFData - m_valueList.append(TQString::null); // SpeakerHeader - m_valueList.append(TQString::null); // SpeakerData + m_valueList.append(TQString()); // Summary + m_valueList.append(TQString()); // RawData + m_valueList.append(TQString()); // RTFHeader + m_valueList.append(TQString()); // RTFData + m_valueList.append(TQString()); // SpeakerHeader + m_valueList.append(TQString()); // SpeakerData // new Concept (end) } @@ -553,7 +553,7 @@ bool Keyword::setValue( unsigned int index, TQVariant data ) TQVariant Keyword::getValue( unsigned int index ) const { if ( index > m_valueList.count() ) - return TQVariant(); // a invalid QVariant + return TQVariant(); // a invalid TQVariant TQVariant data; data = m_valueList[index]; @@ -566,8 +566,8 @@ TQVariant Keyword::getValue( unsigned int index ) const /** * Abstract */ -Abstract::Abstract(ListViewInterface *parent, ListViewInterface *after, TQString label) - : ListViewInterface(parent, after, label) +Abstract::Abstract(ListViewInterface *tqparent, ListViewInterface *after, TQString label) + : ListViewInterface(tqparent, after, label) { TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("filenew", KIcon::Small); this->setPixmap(0, pixmap); @@ -578,12 +578,12 @@ Abstract::Abstract(ListViewInterface *parent, ListViewInterface *after, TQString m_valueList.append( TQString("Abstract") ); // XmlContextName m_valueList.append( (bool)false ); // isEditable m_valueList.append( (int)0 ); // MaxLines - m_valueList.append(TQString::null); // Summary - m_valueList.append(TQString::null); // RawData + m_valueList.append(TQString()); // Summary + m_valueList.append(TQString()); // RawData m_valueList.append("

" + i18n("Abstract") + "

"); // RTFHeader - m_valueList.append(TQString::null); // RTFData + m_valueList.append(TQString()); // RTFData m_valueList.append(i18n("Abstract") + "\n"); // SpeakerHeader - m_valueList.append(TQString::null); // SpeakerData + m_valueList.append(TQString()); // SpeakerData // new Concept (end) } @@ -610,7 +610,7 @@ bool Abstract::setValue( unsigned int index, TQVariant data ) TQVariant Abstract::getValue( unsigned int index ) const { if ( index > m_valueList.count() ) - return TQVariant(); // a invalid QVariant + return TQVariant(); // a invalid TQVariant TQVariant data; data = m_valueList[index]; @@ -622,8 +622,8 @@ TQVariant Abstract::getValue( unsigned int index ) const /** * Para */ -Para::Para(ListViewInterface *parent, ListViewInterface *after, TQString label) - : ListViewInterface(parent, after, label) +Para::Para(ListViewInterface *tqparent, ListViewInterface *after, TQString label) + : ListViewInterface(tqparent, after, label) { TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small); this->setPixmap(0, pixmap); @@ -633,12 +633,12 @@ Para::Para(ListViewInterface *parent, ListViewInterface *after, TQString label) m_valueList.append( TQString("Para") ); // XmlContextName m_valueList.append( (bool)false ); // isEditable m_valueList.append( (int)-1 ); // MaxLines - m_valueList.append(TQString::null); // Summary - m_valueList.append(TQString::null); // RawData - m_valueList.append(TQString::null); // RTFHeader - m_valueList.append(TQString::null); // RTFData + m_valueList.append(TQString()); // Summary + m_valueList.append(TQString()); // RawData + m_valueList.append(TQString()); // RTFHeader + m_valueList.append(TQString()); // RTFData m_valueList.append(i18n("Paragraph") + "\n"); // SpeakerHeader - m_valueList.append(TQString::null); // SpeakerData + m_valueList.append(TQString()); // SpeakerData // new Concept (end) } @@ -652,7 +652,7 @@ bool Para::setValue( unsigned int index, TQVariant data ) return false; TQValueList::Iterator it = m_valueList.at(index); - TQString sData = TQString::null; + TQString sData = TQString(); ParaSaxParser *p = ParaSaxParser::Instance(); switch (index){ case KSayItGlobal::ISEDITABLE: @@ -684,7 +684,7 @@ bool Para::setValue( unsigned int index, TQVariant data ) TQVariant Para::getValue( unsigned int index ) const { if ( index > m_valueList.count() ) - return TQVariant(); // a invalid QVariant + return TQVariant(); // a invalid TQVariant TQVariant data; data = m_valueList[index]; @@ -696,8 +696,8 @@ TQVariant Para::getValue( unsigned int index ) const /** * Chapter */ -Chapter::Chapter(ListViewInterface *parent, ListViewInterface *after, TQString label) - : ListViewInterface(parent, after, label) +Chapter::Chapter(ListViewInterface *tqparent, ListViewInterface *after, TQString label) + : ListViewInterface(tqparent, after, label) { TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small); this->setPixmap(0, pixmap); @@ -707,12 +707,12 @@ Chapter::Chapter(ListViewInterface *parent, ListViewInterface *after, TQString l m_valueList.append( TQString("Chapter") ); // XmlContextName m_valueList.append( (bool)false ); // isEditable m_valueList.append( (int)0 ); // MaxLines - m_valueList.append(TQString::null); // Summary - m_valueList.append(TQString::null); // RawData - m_valueList.append(TQString::null); // RTFHeader - m_valueList.append(TQString::null); // RTFData - m_valueList.append(TQString::null); // SpeakerHeader - m_valueList.append(TQString::null); // SpeakerData + m_valueList.append(TQString()); // Summary + m_valueList.append(TQString()); // RawData + m_valueList.append(TQString()); // RTFHeader + m_valueList.append(TQString()); // RTFData + m_valueList.append(TQString()); // SpeakerHeader + m_valueList.append(TQString()); // SpeakerData // new Concept (end) } @@ -745,7 +745,7 @@ bool Chapter::setValue( unsigned int index, TQVariant data ) TQVariant Chapter::getValue( unsigned int index ) const { if ( index > m_valueList.count() ) - return TQVariant(); // a invalid QVariant + return TQVariant(); // a invalid TQVariant TQVariant data; data = m_valueList[index]; @@ -757,8 +757,8 @@ TQVariant Chapter::getValue( unsigned int index ) const /** * Sect1 */ -Sect1::Sect1(ListViewInterface *parent, ListViewInterface *after, TQString label) - : ListViewInterface(parent, after, label) +Sect1::Sect1(ListViewInterface *tqparent, ListViewInterface *after, TQString label) + : ListViewInterface(tqparent, after, label) { TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small); this->setPixmap(0, pixmap); @@ -768,12 +768,12 @@ Sect1::Sect1(ListViewInterface *parent, ListViewInterface *after, TQString label m_valueList.append( TQString("Sect1") ); // XmlContextName m_valueList.append( (bool)false ); // isEditable m_valueList.append( (int)0 ); // MaxLines - m_valueList.append(TQString::null); // Summary - m_valueList.append(TQString::null); // RawData - m_valueList.append(TQString::null); // RTFHeader - m_valueList.append(TQString::null); // RTFData - m_valueList.append(TQString::null); // SpeakerHeader - m_valueList.append(TQString::null); // SpeakerData + m_valueList.append(TQString()); // Summary + m_valueList.append(TQString()); // RawData + m_valueList.append(TQString()); // RTFHeader + m_valueList.append(TQString()); // RTFData + m_valueList.append(TQString()); // SpeakerHeader + m_valueList.append(TQString()); // SpeakerData // new Concept (end) } @@ -806,7 +806,7 @@ bool Sect1::setValue( unsigned int index, TQVariant data ) TQVariant Sect1::getValue( unsigned int index ) const { if ( index > m_valueList.count() ) - return TQVariant(); // a invalid QVariant + return TQVariant(); // a invalid TQVariant TQVariant data; data = m_valueList[index]; @@ -817,8 +817,8 @@ TQVariant Sect1::getValue( unsigned int index ) const /** * Sect2 */ -Sect2::Sect2(ListViewInterface *parent, ListViewInterface *after, TQString label) - : ListViewInterface(parent, after, label) +Sect2::Sect2(ListViewInterface *tqparent, ListViewInterface *after, TQString label) + : ListViewInterface(tqparent, after, label) { TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small); this->setPixmap(0, pixmap); @@ -828,12 +828,12 @@ Sect2::Sect2(ListViewInterface *parent, ListViewInterface *after, TQString label m_valueList.append( TQString("Sect2") ); // XmlContextName m_valueList.append( (bool)false ); // isEditable m_valueList.append( (int)0 ); // MaxLines - m_valueList.append(TQString::null); // Summary - m_valueList.append(TQString::null); // RawData - m_valueList.append(TQString::null); // RTFHeader - m_valueList.append(TQString::null); // RTFData - m_valueList.append(TQString::null); // SpeakerHeader - m_valueList.append(TQString::null); // SpeakerData + m_valueList.append(TQString()); // Summary + m_valueList.append(TQString()); // RawData + m_valueList.append(TQString()); // RTFHeader + m_valueList.append(TQString()); // RTFData + m_valueList.append(TQString()); // SpeakerHeader + m_valueList.append(TQString()); // SpeakerData // new Concept (end) } @@ -866,7 +866,7 @@ bool Sect2::setValue( unsigned int index, TQVariant data ) TQVariant Sect2::getValue( unsigned int index ) const { if ( index > m_valueList.count() ) - return TQVariant(); // a invalid QVariant + return TQVariant(); // a invalid TQVariant TQVariant data; data = m_valueList[index]; @@ -877,8 +877,8 @@ TQVariant Sect2::getValue( unsigned int index ) const /** * Sect3 */ -Sect3::Sect3(ListViewInterface *parent, ListViewInterface *after, TQString label) - : ListViewInterface(parent, after, label) +Sect3::Sect3(ListViewInterface *tqparent, ListViewInterface *after, TQString label) + : ListViewInterface(tqparent, after, label) { TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small); this->setPixmap(0, pixmap); @@ -888,12 +888,12 @@ Sect3::Sect3(ListViewInterface *parent, ListViewInterface *after, TQString label m_valueList.append( TQString("Sect3") ); // XmlContextName m_valueList.append( (bool)false ); // isEditable m_valueList.append( (int)0 ); // MaxLines - m_valueList.append(TQString::null); // Summary - m_valueList.append(TQString::null); // RawData - m_valueList.append(TQString::null); // RTFHeader - m_valueList.append(TQString::null); // RTFData - m_valueList.append(TQString::null); // SpeakerHeader - m_valueList.append(TQString::null); // SpeakerData + m_valueList.append(TQString()); // Summary + m_valueList.append(TQString()); // RawData + m_valueList.append(TQString()); // RTFHeader + m_valueList.append(TQString()); // RTFData + m_valueList.append(TQString()); // SpeakerHeader + m_valueList.append(TQString()); // SpeakerData // new Concept (end) } @@ -926,7 +926,7 @@ bool Sect3::setValue( unsigned int index, TQVariant data ) TQVariant Sect3::getValue( unsigned int index ) const { if ( index > m_valueList.count() ) - return TQVariant(); // a invalid QVariant + return TQVariant(); // a invalid TQVariant TQVariant data; data = m_valueList[index]; @@ -937,8 +937,8 @@ TQVariant Sect3::getValue( unsigned int index ) const /** * Sect4 */ -Sect4::Sect4(ListViewInterface *parent, ListViewInterface *after, TQString label) - : ListViewInterface(parent, after, label) +Sect4::Sect4(ListViewInterface *tqparent, ListViewInterface *after, TQString label) + : ListViewInterface(tqparent, after, label) { TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small); this->setPixmap(0, pixmap); @@ -948,12 +948,12 @@ Sect4::Sect4(ListViewInterface *parent, ListViewInterface *after, TQString label m_valueList.append( TQString("Sect4") ); // XmlContextName m_valueList.append( (bool)false ); // isEditable m_valueList.append( (int)0 ); // MaxLines - m_valueList.append(TQString::null); // Summary - m_valueList.append(TQString::null); // RawData - m_valueList.append(TQString::null); // RTFHeader - m_valueList.append(TQString::null); // RTFData - m_valueList.append(TQString::null); // SpeakerHeader - m_valueList.append(TQString::null); // SpeakerData + m_valueList.append(TQString()); // Summary + m_valueList.append(TQString()); // RawData + m_valueList.append(TQString()); // RTFHeader + m_valueList.append(TQString()); // RTFData + m_valueList.append(TQString()); // SpeakerHeader + m_valueList.append(TQString()); // SpeakerData // new Concept (end) } @@ -986,7 +986,7 @@ bool Sect4::setValue( unsigned int index, TQVariant data ) TQVariant Sect4::getValue( unsigned int index ) const { if ( index > m_valueList.count() ) - return TQVariant(); // a invalid QVariant + return TQVariant(); // a invalid TQVariant TQVariant data; data = m_valueList[index]; @@ -997,8 +997,8 @@ TQVariant Sect4::getValue( unsigned int index ) const /** * Sect5 */ -Sect5::Sect5(ListViewInterface *parent, ListViewInterface *after, TQString label) - : ListViewInterface(parent, after, label) +Sect5::Sect5(ListViewInterface *tqparent, ListViewInterface *after, TQString label) + : ListViewInterface(tqparent, after, label) { TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small); this->setPixmap(0, pixmap); @@ -1008,12 +1008,12 @@ Sect5::Sect5(ListViewInterface *parent, ListViewInterface *after, TQString label m_valueList.append( TQString("Sect5") ); // XmlContextName m_valueList.append( (bool)false ); // isEditable m_valueList.append( (int)0 ); // MaxLines - m_valueList.append(TQString::null); // Summary - m_valueList.append(TQString::null); // RawData - m_valueList.append(TQString::null); // RTFHeader - m_valueList.append(TQString::null); // RTFData - m_valueList.append(TQString::null); // SpeakerHeader - m_valueList.append(TQString::null); // SpeakerData + m_valueList.append(TQString()); // Summary + m_valueList.append(TQString()); // RawData + m_valueList.append(TQString()); // RTFHeader + m_valueList.append(TQString()); // RTFData + m_valueList.append(TQString()); // SpeakerHeader + m_valueList.append(TQString()); // SpeakerData // new Concept (end) } @@ -1046,7 +1046,7 @@ bool Sect5::setValue( unsigned int index, TQVariant data ) TQVariant Sect5::getValue( unsigned int index ) const { if ( index > m_valueList.count() ) - return TQVariant(); // a invalid QVariant + return TQVariant(); // a invalid TQVariant TQVariant data; data = m_valueList[index]; diff --git a/ksayit/src/docbookclasses.h b/ksayit/src/docbookclasses.h index e7a891f..e24af91 100644 --- a/ksayit/src/docbookclasses.h +++ b/ksayit/src/docbookclasses.h @@ -12,7 +12,7 @@ #ifndef DOCBOOKCLASSES_H #define DOCBOOKCLASSES_H -// Qt includes +// TQt includes #include #include @@ -32,7 +32,7 @@ class TQStringList; // /** Represents the root item of the document, therefore it expects - a \p TQListView object as parent.\n + a \p TQListView object as tqparent.\n Structural item only (no references to a DOM node). @author Robert Vogl */ @@ -41,11 +41,11 @@ class RobDocument : public ListViewInterface public: /** * Constructor - * \param lv The ListView parent. + * \param lv The ListView tqparent. * \param label The label is shown in column 0 of the TreeView and is also * used as bookmark title. */ - RobDocument(KListView *lv=0, TQString label=TQString::null); + RobDocument(KListView *lv=0, TQString label=TQString()); ~RobDocument(); bool setValue( unsigned int index, TQVariant data ); @@ -67,7 +67,7 @@ private: class Overview : public ListViewInterface { public: - Overview(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null); + Overview(ListViewInterface *tqparent=0, ListViewInterface *after=0, TQString label=TQString()); ~Overview(); bool setValue( unsigned int index, TQVariant data ); @@ -85,7 +85,7 @@ private: class Date : public ListViewInterface { public: - Date(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null); + Date(ListViewInterface *tqparent=0, ListViewInterface *after=0, TQString label=TQString()); ~Date(); bool setValue( unsigned int index, TQVariant data ); @@ -104,7 +104,7 @@ private: class ReleaseInfo : public ListViewInterface { public: - ReleaseInfo(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null); + ReleaseInfo(ListViewInterface *tqparent=0, ListViewInterface *after=0, TQString label=TQString()); ~ReleaseInfo(); bool setValue( unsigned int index, TQVariant data ); @@ -124,7 +124,7 @@ private: class AuthorGroup : public ListViewInterface { public: - AuthorGroup(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null); + AuthorGroup(ListViewInterface *tqparent=0, ListViewInterface *after=0, TQString label=TQString()); ~AuthorGroup(); bool setValue( unsigned int index, TQVariant data ); @@ -143,7 +143,7 @@ private: class Author : public ListViewInterface { public: - Author(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null); + Author(ListViewInterface *tqparent=0, ListViewInterface *after=0, TQString label=TQString()); ~Author(); bool setValue( unsigned int index, TQVariant data ); @@ -162,7 +162,7 @@ private: class KeywordSet : public ListViewInterface { public: - KeywordSet(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null); + KeywordSet(ListViewInterface *tqparent=0, ListViewInterface *after=0, TQString label=TQString()); ~KeywordSet(); bool setValue( unsigned int index, TQVariant data ); @@ -180,7 +180,7 @@ private: class Keyword : public ListViewInterface { public: - Keyword(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null); + Keyword(ListViewInterface *tqparent=0, ListViewInterface *after=0, TQString label=TQString()); ~Keyword(); bool setValue( unsigned int index, TQVariant data ); @@ -199,7 +199,7 @@ private: class Abstract : public ListViewInterface { public: - Abstract(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null); + Abstract(ListViewInterface *tqparent=0, ListViewInterface *after=0, TQString label=TQString()); ~Abstract(); bool setValue( unsigned int index, TQVariant data ); @@ -217,7 +217,7 @@ private: class Para : public ListViewInterface { public: - Para(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null); + Para(ListViewInterface *tqparent=0, ListViewInterface *after=0, TQString label=TQString()); ~Para(); bool setValue( unsigned int index, TQVariant data ); @@ -236,7 +236,7 @@ private: class Chapter : public ListViewInterface { public: - Chapter(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null); + Chapter(ListViewInterface *tqparent=0, ListViewInterface *after=0, TQString label=TQString()); ~Chapter(); bool setValue( unsigned int index, TQVariant data ); @@ -255,7 +255,7 @@ private: class Sect1 : public ListViewInterface { public: - Sect1(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null); + Sect1(ListViewInterface *tqparent=0, ListViewInterface *after=0, TQString label=TQString()); ~Sect1(); bool setValue( unsigned int index, TQVariant data ); @@ -274,7 +274,7 @@ private: class Sect2 : public ListViewInterface { public: - Sect2(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null); + Sect2(ListViewInterface *tqparent=0, ListViewInterface *after=0, TQString label=TQString()); ~Sect2(); bool setValue( unsigned int index, TQVariant data ); @@ -293,7 +293,7 @@ private: class Sect3 : public ListViewInterface { public: - Sect3(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null); + Sect3(ListViewInterface *tqparent=0, ListViewInterface *after=0, TQString label=TQString()); ~Sect3(); bool setValue( unsigned int index, TQVariant data ); @@ -312,7 +312,7 @@ private: class Sect4 : public ListViewInterface { public: - Sect4(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null); + Sect4(ListViewInterface *tqparent=0, ListViewInterface *after=0, TQString label=TQString()); ~Sect4(); bool setValue( unsigned int index, TQVariant data ); @@ -331,7 +331,7 @@ private: class Sect5 : public ListViewInterface { public: - Sect5(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null); + Sect5(ListViewInterface *tqparent=0, ListViewInterface *after=0, TQString label=TQString()); ~Sect5(); bool setValue( unsigned int index, TQVariant data ); diff --git a/ksayit/src/docbookgenerator.cpp b/ksayit/src/docbookgenerator.cpp index 4b792b2..a6f8a72 100644 --- a/ksayit/src/docbookgenerator.cpp +++ b/ksayit/src/docbookgenerator.cpp @@ -10,7 +10,7 @@ // // -// Qt includes +// TQt includes #include #include @@ -105,10 +105,10 @@ void DocbookGenerator::writeTitleOfBook(TQTextStream &doc, ListViewInterface *it if ( whoAmI != "BookInfo" ) return; - // Documents title is stored in root element (parent of BookInfo) - ListViewInterface *parent = static_cast(item->parent()); - if ( parent ){ - TQString title = parent->text(0); + // Documents title is stored in root element (tqparent of BookInfo) + ListViewInterface *tqparent = static_cast(item->tqparent()); + if ( tqparent ){ + TQString title = tqparent->text(0); // add node to document doc << "" << title << "" << endl; @@ -151,7 +151,7 @@ void DocbookGenerator::writeAuthor(TQTextStream &doc, ListViewInterface *item) if ( whoAmI != "Author" ) return; - TQString author = TQString::null; + TQString author = TQString(); author = ( item->getValue(KSayItGlobal::RAWDATA) ).toString(); // add node to document @@ -231,7 +231,7 @@ void DocbookGenerator::writeKeyword(TQTextStream &doc, ListViewInterface *item) return; // TQString keyword = item->text( 0 ); - TQString keyword = TQString::null; + TQString keyword = TQString(); keyword = (item->getValue(3)).toString(); // add node to document diff --git a/ksayit/src/docbookgenerator.h b/ksayit/src/docbookgenerator.h index b5fb251..109d0c5 100644 --- a/ksayit/src/docbookgenerator.h +++ b/ksayit/src/docbookgenerator.h @@ -12,7 +12,7 @@ #ifndef DOCBOOKGENERATOR_H #define DOCBOOKGENERATOR_H -// Qt includes +// TQt includes #include // KDE includes diff --git a/ksayit/src/docbookparser.cpp b/ksayit/src/docbookparser.cpp index 679a44b..f1e0c51 100644 --- a/ksayit/src/docbookparser.cpp +++ b/ksayit/src/docbookparser.cpp @@ -10,7 +10,7 @@ // // -// Qt includes +// TQt includes #include #include #include @@ -58,7 +58,7 @@ TQString DocbookParser::node2raw(TQDomNode node) const void DocbookParser::parseBook(const TQDomElement &element, ListViewInterface *item) { kdDebug(100200) << "+++ entering parseBook()" << endl; - item->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') ); + item->setText(3, TQString("%1").tqarg(++m_idCounter).rightJustify(8,'0') ); // register Popup menu m_contextmenuhandler->registerPopupMenu( item ); @@ -89,7 +89,7 @@ void DocbookParser::parseBookInfo(const TQDomElement &element, ListViewInterface kdDebug(100200) << "+++ entering parseBookInfo()" << endl; Overview *overview = new Overview(item, NULL, i18n("Overview")); - overview->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') ); + overview->setText(3, TQString("%1").tqarg(++m_idCounter).rightJustify(8,'0') ); // register Popup menu m_contextmenuhandler->registerPopupMenu( overview ); @@ -122,7 +122,7 @@ void DocbookParser::parseBookInfo(const TQDomElement &element, ListViewInterface data = node.firstChild().toText(); if( !data.isNull() ){ Date *date = new Date(overview, NULL, i18n("Date")); - date->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') ); + date->setText(3, TQString("%1").tqarg(++m_idCounter).rightJustify(8,'0') ); date->setText( 1, data.nodeValue() ); date->setValue(KSayItGlobal::RTFDATA, data.nodeValue()); date->setValue(KSayItGlobal::SPEAKERDATA, data.nodeValue()); @@ -140,7 +140,7 @@ void DocbookParser::parseBookInfo(const TQDomElement &element, ListViewInterface data = node.firstChild().toText(); if( !data.isNull() ){ ReleaseInfo *relinfo = new ReleaseInfo(overview, NULL, i18n("Release")); - relinfo->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') ); + relinfo->setText(3, TQString("%1").tqarg(++m_idCounter).rightJustify(8,'0') ); relinfo->setText( 1, data.nodeValue() ); relinfo->setValue(KSayItGlobal::RTFDATA, data.nodeValue()); relinfo->setValue(KSayItGlobal::SPEAKERDATA, data.nodeValue()); @@ -176,7 +176,7 @@ void DocbookParser::parseAuthorGroup(const TQDomElement &element, ListViewInterf // item = overview AuthorGroup *authorgroup = new AuthorGroup(item, NULL, i18n("Author(s)")); - authorgroup->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') ); + authorgroup->setText(3, TQString("%1").tqarg(++m_idCounter).rightJustify(8,'0') ); // register Popup menu m_contextmenuhandler->registerPopupMenu( authorgroup ); @@ -199,11 +199,11 @@ void DocbookParser::parseAuthor(const TQDomElement &element, ListViewInterface * TQDomText data; TQDomText firstname = TQDomText(); TQDomText surname = TQDomText(); - TQString s_firstname = TQString::null; - TQString s_surname = TQString::null; + TQString s_firstname = TQString(); + TQString s_surname = TQString(); Author *author = new Author(item); - author->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') ); + author->setText(3, TQString("%1").tqarg(++m_idCounter).rightJustify(8,'0') ); TQDomNode node = element.firstChild(); while( !node.isNull() ){ @@ -241,7 +241,7 @@ void DocbookParser::parseKeywordSet(const TQDomElement &element, ListViewInterfa // item = overview KeywordSet *keywordset = new KeywordSet(item, NULL, i18n("Keywords")); - keywordset->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') ); + keywordset->setText(3, TQString("%1").tqarg(++m_idCounter).rightJustify(8,'0') ); // register Popup menu m_contextmenuhandler->registerPopupMenu( keywordset ); @@ -252,7 +252,7 @@ void DocbookParser::parseKeywordSet(const TQDomElement &element, ListViewInterfa data = node.firstChild().toText(); if( !data.isNull() ){ Keyword *keyword = new Keyword(keywordset); - keyword->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') ); + keyword->setText(3, TQString("%1").tqarg(++m_idCounter).rightJustify(8,'0') ); keyword->setText(0, data.nodeValue() ); keyword->setValue(KSayItGlobal::RTFDATA, data.nodeValue() ); keyword->setValue(KSayItGlobal::SPEAKERDATA, data.nodeValue() ); @@ -275,7 +275,7 @@ void DocbookParser::parseAbstract(const TQDomElement &element, ListViewInterface // item = overview TQDomText data; Abstract *abstract = new Abstract(item, NULL, i18n("Abstract")); - abstract->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') ); + abstract->setText(3, TQString("%1").tqarg(++m_idCounter).rightJustify(8,'0') ); // register Popup menu m_contextmenuhandler->registerPopupMenu( abstract ); @@ -296,7 +296,7 @@ void DocbookParser::parseChapter(const TQDomElement &element, ListViewInterface TQDomText data; Chapter *chapter = new Chapter(item, NULL, i18n("Chapter")); - chapter->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') ); + chapter->setText(3, TQString("%1").tqarg(++m_idCounter).rightJustify(8,'0') ); // register Popup menu m_contextmenuhandler->registerPopupMenu( chapter ); @@ -326,7 +326,7 @@ void DocbookParser::parseSect1(const TQDomElement &element, ListViewInterface *i TQDomText data; Sect1 *sect1 = new Sect1(item, NULL, i18n("Section Level 1")); - sect1->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') ); + sect1->setText(3, TQString("%1").tqarg(++m_idCounter).rightJustify(8,'0') ); // register Popup menu m_contextmenuhandler->registerPopupMenu( sect1 ); @@ -356,7 +356,7 @@ void DocbookParser::parseSect2(const TQDomElement &element, ListViewInterface *i TQDomText data; Sect2 *sect2 = new Sect2(item, NULL, i18n("Section Level 2")); - sect2->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') ); + sect2->setText(3, TQString("%1").tqarg(++m_idCounter).rightJustify(8,'0') ); // register Popup menu m_contextmenuhandler->registerPopupMenu( sect2 ); @@ -386,7 +386,7 @@ void DocbookParser::parseSect3(const TQDomElement &element, ListViewInterface *i TQDomText data; Sect3 *sect3 = new Sect3(item, NULL, i18n("Section Level 3")); - sect3->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') ); + sect3->setText(3, TQString("%1").tqarg(++m_idCounter).rightJustify(8,'0') ); // register Popup menu m_contextmenuhandler->registerPopupMenu( sect3 ); @@ -416,7 +416,7 @@ void DocbookParser::parseSect4(const TQDomElement &element, ListViewInterface *i TQDomText data; Sect4 *sect4 = new Sect4(item, NULL, i18n("Section Level 4")); - sect4->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') ); + sect4->setText(3, TQString("%1").tqarg(++m_idCounter).rightJustify(8,'0') ); // register Popup menu m_contextmenuhandler->registerPopupMenu( sect4 ); @@ -446,7 +446,7 @@ void DocbookParser::parseSect5(const TQDomElement &element, ListViewInterface *i TQDomText data; Sect5 *sect5 = new Sect5(item, NULL, i18n("Section Level 4")); - sect5->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') ); + sect5->setText(3, TQString("%1").tqarg(++m_idCounter).rightJustify(8,'0') ); // register Popup menu m_contextmenuhandler->registerPopupMenu( sect5 ); @@ -473,15 +473,15 @@ void DocbookParser::parsePara(const TQDomElement &element, ListViewInterface *it kdDebug(100200) << "+++ entering parsePara()" << endl; Para *para = new Para(item, NULL, i18n("Paragraph")); - para->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') ); + para->setText(3, TQString("%1").tqarg(++m_idCounter).rightJustify(8,'0') ); // register Popup menu m_contextmenuhandler->registerPopupMenu( para ); TQString raw = node2raw(element); // remove tags - raw.replace( TQRegExp(""),""); - raw.replace( TQRegExp("^ "),"" ); - raw.replace( TQRegExp("^\n"), "" ); + raw.tqreplace( TQRegExp(""),""); + raw.tqreplace( TQRegExp("^ "),"" ); + raw.tqreplace( TQRegExp("^\n"), "" ); para->setValue(KSayItGlobal::RAWDATA, raw); para->setValue(KSayItGlobal::RTFDATA, raw); diff --git a/ksayit/src/docbookparser.h b/ksayit/src/docbookparser.h index 5c84e30..66deb91 100644 --- a/ksayit/src/docbookparser.h +++ b/ksayit/src/docbookparser.h @@ -12,7 +12,7 @@ #ifndef DOCBOOKPARSER_H #define DOCBOOKPARSER_H -// Qt includes +// TQt includes #include // KDE includes diff --git a/ksayit/src/doctreeviewimpl.cpp b/ksayit/src/doctreeviewimpl.cpp index 11e22ce..5776917 100644 --- a/ksayit/src/doctreeviewimpl.cpp +++ b/ksayit/src/doctreeviewimpl.cpp @@ -11,7 +11,7 @@ // #include // getenv -// Qt includes +// TQt includes #include #include #include @@ -41,8 +41,8 @@ ////////////////////////////////////// // TreeView Implementation ////////////////////////////////////// -DocTreeViewImpl::DocTreeViewImpl(TQWidget* parent, const char* name, WFlags fl) - : DocTreeView(parent, name, fl) +DocTreeViewImpl::DocTreeViewImpl(TQWidget* tqparent, const char* name, WFlags fl) + : DocTreeView(tqparent, name, fl) { m_rootItem = NULL; m_url = KURL(); @@ -66,7 +66,7 @@ DocTreeViewImpl::DocTreeViewImpl(TQWidget* parent, const char* name, WFlags fl) m_currentItem = m_rootItem; m_parasaxparser = ParaSaxParser::Instance(); m_editMode = false; - m_changedContent = TQString::null; + m_changedContent = TQString(); m_contextmenuhandler = NULL; m_contextmenu = NULL; @@ -86,7 +86,7 @@ DocTreeViewImpl::~DocTreeViewImpl() void DocTreeViewImpl::enableContextMenus( bool enabled ) { if ( enabled ){ - m_contextmenuhandler = new ContextMenuHandler(this, "contextmenuhandler"); + m_contextmenuhandler = new ContextMenuHandler(TQT_TQOBJECT(this), "contextmenuhandler"); } else { if ( m_contextmenuhandler ) delete m_contextmenuhandler; @@ -105,7 +105,7 @@ void DocTreeViewImpl::clear() // inform BookmarkHandler // - emit signalSetBookmarkFilename( TQString::null ); + emit signalSetBookmarkFilename( TQString() ); listView->clear(); m_rootItem = new RobDocument( listView, i18n("unnamed") ); @@ -193,11 +193,11 @@ void DocTreeViewImpl::openFile(const KURL &url) if( domTree.setContent(&file) ){ // extract Header file.reset(); - TQString header = TQString::null; + TQString header = TQString(); TQString line; int offset; file.readLine( line, file.size() ); - while( !file.atEnd() && (offset = line.find("(sit.current()); if ( !item ) @@ -503,7 +503,7 @@ void DocTreeViewImpl::slotItemClicked(TQListViewItem *item) if ( item ){ m_currentItem = static_cast(item); - TQString str = TQString::null; + TQString str = TQString(); TQTextStream msg(&str, IO_ReadWrite); msg.setEncoding(TQTextStream::UnicodeUTF8); @@ -517,7 +517,7 @@ void DocTreeViewImpl::slotItemClicked(TQListViewItem *item) // Create Bookmark-ID depending on the location of the item // within the tree - TQString idstring = TQString::null; + TQString idstring = TQString(); TQTextStream id(&idstring, IO_ReadWrite); id.setEncoding(TQTextStream::UnicodeUTF8); id << "1=RobDocument"; @@ -553,21 +553,21 @@ void DocTreeViewImpl::recursiveBuildItemIdentifier(ListViewInterface* item, TQTe if ( !item ) return; - // 1. Do we have a parent (=parentItem)? + // 1. Do we have a tqparent (=tqparentItem)? // If no -> return, if yes -> recursive call - ListViewInterface *parentItem = NULL; - parentItem = static_cast( item->parent() ); - if ( parentItem ){ - recursiveBuildItemIdentifier( parentItem, idstring ); + ListViewInterface *tqparentItem = NULL; + tqparentItem = static_cast( item->tqparent() ); + if ( tqparentItem ){ + recursiveBuildItemIdentifier( tqparentItem, idstring ); } else { // break recursion return; } - // 2. Which child of the parentItem are we? Append no. to idstring. + // 2. Which child of the tqparentItem are we? Append no. to idstring. int childno = 0; TQString itemID = item->text(3); - ListViewInterface *i = static_cast( parentItem->firstChild() ); + ListViewInterface *i = static_cast( tqparentItem->firstChild() ); while( i ){ childno++; if ( i->text(3) == itemID ) @@ -585,17 +585,17 @@ void DocTreeViewImpl::recursiveBuildItemIdentifier(ListViewInterface* item, TQTe TQString DocTreeViewImpl::getItemTitle( ListViewInterface *item ) { if ( !item ) - return TQString::null; + return TQString(); TQString col0 = item->text(0); - TQString title = TQString::null; + TQString title = TQString(); // if ( col0 == i18n("Paragraph") ){ // better to use XmlContextName? if( (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString() == i18n("Paragraph") ){ title = ( item->getValue(KSayItGlobal::SPEAKERDATA) ).toString().left(32); // canonify string - title.replace( TQRegExp("^( |\t|\n)+"), ""); - title.replace( TQRegExp("( |\t|\n)$+"), ""); + title.tqreplace( TQRegExp("^( |\t|\n)+"), ""); + title.tqreplace( TQRegExp("( |\t|\n)$+"), ""); } else { title = col0.left(32); } @@ -700,7 +700,7 @@ void DocTreeViewImpl::makeCurrentNodePersistent() m_currentItem->setValue( KSayItGlobal::RTFDATA, m_changedContent ); m_currentItem->setValue( KSayItGlobal::SPEAKERDATA, m_changedContent ); - m_changedContent = TQString::null; + m_changedContent = TQString(); } /** replaced by slotRightButtonPressed() @@ -756,13 +756,13 @@ void DocTreeViewImpl::slotDeleteItem() kdDebug(100200) << "DocTreeViewImpl::slotDeleteItem()" << endl; ListViewInterface *itemToDelete = m_currentItem; - ListViewInterface *parentItem = NULL; - parentItem = static_cast(itemToDelete->parent()); - if ( !parentItem ) - return; // delete only items with parent + ListViewInterface *tqparentItem = NULL; + tqparentItem = static_cast(itemToDelete->tqparent()); + if ( !tqparentItem ) + return; // delete only items with tqparent // try to delete bookmark - TQString url = TQString::null; + TQString url = TQString(); TQTextStream id(&url, IO_ReadWrite); id.setEncoding(TQTextStream::UnicodeUTF8); id << "ksayit://1=RobDocument"; @@ -779,15 +779,15 @@ void DocTreeViewImpl::slotDeleteItem() TQListViewItemIterator itr( m_rootItem ); while ( itr.current() ) { item = static_cast(itr.current()); - item->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') ); + item->setText(3, TQString("%1").tqarg(++m_idCounter).rightJustify(8,'0') ); ++itr; } // show m_rootItem->sort(); - listView->setSelected( parentItem, true ); - listView->ensureItemVisible( parentItem ); - slotItemClicked( parentItem ); + listView->setSelected( tqparentItem, true ); + listView->ensureItemVisible( tqparentItem ); + slotItemClicked( tqparentItem ); } @@ -797,7 +797,7 @@ void DocTreeViewImpl::slotNewBookInfo() if ( whoAmI == "RobDocument" ){ int newIndex = newIndexFirstChild(); Overview *overview = new Overview( m_currentItem, NULL, i18n("Overview") ); - overview->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') ); + overview->setText(3, TQString("%1").tqarg(newIndex).rightJustify(8,'0') ); m_contextmenuhandler->registerPopupMenu( overview ); } @@ -810,7 +810,7 @@ void DocTreeViewImpl::slotNewChapter() if ( whoAmI == "RobDocument" ){ int newIndex = newIndexLastChild(); Chapter *chapter = new Chapter( m_currentItem, NULL, i18n("Chapter") ); - chapter->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') ); + chapter->setText(3, TQString("%1").tqarg(newIndex).rightJustify(8,'0') ); TQString newTitle = i18n("New Chapter Title"); chapter->setText(0, newTitle ); @@ -829,7 +829,7 @@ void DocTreeViewImpl::slotNewKeywordSet() // New TreeView item int newIndex = newIndexFirstChild(); KeywordSet *keywordset = new KeywordSet(m_currentItem, NULL, i18n("Keywords")); - keywordset->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') ); + keywordset->setText(3, TQString("%1").tqarg(newIndex).rightJustify(8,'0') ); m_contextmenuhandler->registerPopupMenu( keywordset ); } @@ -843,7 +843,7 @@ void DocTreeViewImpl::slotNewKeyword() // New TreeView item int newIndex = newIndexLastChild(); Keyword *keyword = new Keyword(m_currentItem, NULL, i18n("Keyword")); - keyword->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') ); + keyword->setText(3, TQString("%1").tqarg(newIndex).rightJustify(8,'0') ); TQString newKeyword = i18n("New Keyword"); keyword->setText(0, newKeyword ); @@ -863,7 +863,7 @@ void DocTreeViewImpl::slotNewAbstract() // New TreeView item int newIndex = newIndexLastChild(); Abstract *abstract = new Abstract(m_currentItem, NULL, i18n("Abstract")); - abstract->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') ); + abstract->setText(3, TQString("%1").tqarg(newIndex).rightJustify(8,'0') ); m_contextmenuhandler->registerPopupMenu( abstract ); @@ -883,7 +883,7 @@ void DocTreeViewImpl::slotNewAuthorGroup() // New TreeView item int newIndex = newIndexFirstChild(); AuthorGroup *authorgroup = new AuthorGroup(m_currentItem, NULL, i18n("Author(s)")); - authorgroup->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') ); + authorgroup->setText(3, TQString("%1").tqarg(newIndex).rightJustify(8,'0') ); m_contextmenuhandler->registerPopupMenu( authorgroup ); @@ -903,7 +903,7 @@ void DocTreeViewImpl::slotNewAuthor() // New TreeView item int newIndex = newIndexLastChild(); Author *author = new Author(m_currentItem); - author->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') ); + author->setText(3, TQString("%1").tqarg(newIndex).rightJustify(8,'0') ); author->setText(0, i18n("Author") ); TQString newAuthor = i18n("Firstname Surname"); @@ -924,10 +924,10 @@ void DocTreeViewImpl::slotNewDate() // New TreeView item int newIndex = newIndexLastChild(); Date *date = new Date(m_currentItem, NULL, i18n("Date")); - date->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') ); + date->setText(3, TQString("%1").tqarg(newIndex).rightJustify(8,'0') ); // get current date TQString today; - today = KGlobal::locale()->formatDate(TQDate::currentDate(Qt::LocalTime), true); + today = KGlobal::locale()->formatDate(TQDate::tqcurrentDate(Qt::LocalTime), true); date->setText( 1, today); date->setValue( KSayItGlobal::RAWDATA, today ); date->setValue( KSayItGlobal::RTFDATA, today ); @@ -945,7 +945,7 @@ void DocTreeViewImpl::slotNewReleaseInfo() // New TreeView item int newIndex = newIndexLastChild(); ReleaseInfo *relinfo = new ReleaseInfo(m_currentItem, NULL, i18n("Release")); - relinfo->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') ); + relinfo->setText(3, TQString("%1").tqarg(newIndex).rightJustify(8,'0') ); TQString newRelease = "0.0.0"; relinfo->setText( 1, newRelease ); @@ -966,20 +966,20 @@ void DocTreeViewImpl::slotNewTitle() void DocTreeViewImpl::slotNewParagraph() { /* // Create Null element - TQDomElement parentElement = TQDomElement(); + TQDomElement tqparentElement = TQDomElement(); NodeList_type list; list.clear(); m_currentItem->getNodes( list ); - parentElement = (list.front()).toElement(); + tqparentElement = (list.front()).toElement(); - if ( parentElement.isNull() ) + if ( tqparentElement.isNull() ) return; */ // New TreeView item int newIndex = newIndexLastChild(); Para *para = new Para(m_currentItem, NULL, i18n("Paragraph")); - para->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') ); + para->setText(3, TQString("%1").tqarg(newIndex).rightJustify(8,'0') ); m_contextmenuhandler->registerPopupMenu( para ); @@ -992,7 +992,7 @@ void DocTreeViewImpl::slotNewSection_1() if ( whoAmI == "Chapter" ){ int newIndex = newIndexLastChild(); Sect1 *sect1 = new Sect1(m_currentItem, NULL, i18n("Section Level 1")); - sect1->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') ); + sect1->setText(3, TQString("%1").tqarg(newIndex).rightJustify(8,'0') ); TQString newTitle = i18n("New Section Title"); sect1->setValue( KSayItGlobal::RTFHEADER, newTitle ); @@ -1009,7 +1009,7 @@ void DocTreeViewImpl::slotNewSection_2() if ( whoAmI == "Sect1" ){ int newIndex = newIndexLastChild(); Sect2 *sect2 = new Sect2(m_currentItem, NULL, i18n("Section Level 2")); - sect2->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') ); + sect2->setText(3, TQString("%1").tqarg(newIndex).rightJustify(8,'0') ); TQString newTitle = i18n("New Section Title"); sect2->setValue( KSayItGlobal::RTFHEADER, newTitle ); @@ -1026,7 +1026,7 @@ void DocTreeViewImpl::slotNewSection_3() if ( whoAmI == "Sect2" ){ int newIndex = newIndexLastChild(); Sect3 *sect3 = new Sect3(m_currentItem, NULL, i18n("Section Level 3")); - sect3->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') ); + sect3->setText(3, TQString("%1").tqarg(newIndex).rightJustify(8,'0') ); TQString newTitle = i18n("New Section Title"); sect3->setValue( KSayItGlobal::RTFHEADER, newTitle ); @@ -1043,7 +1043,7 @@ void DocTreeViewImpl::slotNewSection_4() if ( whoAmI == "Sect3" ){ int newIndex = newIndexLastChild(); Sect4 *sect4 = new Sect4(m_currentItem, NULL, i18n("Section Level 4")); - sect4->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') ); + sect4->setText(3, TQString("%1").tqarg(newIndex).rightJustify(8,'0') ); TQString newTitle = i18n("New Section Title"); sect4->setValue( KSayItGlobal::RTFHEADER, newTitle ); @@ -1060,7 +1060,7 @@ void DocTreeViewImpl::slotNewSection_5() if ( whoAmI == "Sect4" ){ int newIndex = newIndexLastChild(); Sect5 *sect5 = new Sect5(m_currentItem, NULL, i18n("Section Level 5")); - sect5->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') ); + sect5->setText(3, TQString("%1").tqarg(newIndex).rightJustify(8,'0') ); TQString newTitle = i18n("New Section Title"); sect5->setValue( KSayItGlobal::RTFHEADER, newTitle ); @@ -1086,7 +1086,7 @@ int DocTreeViewImpl::newIndexFirstChild() item = static_cast(it.current()); itemIndex = (item->text(3)).toInt(); if ( itemIndex > currentIndex ){ - item->setText(3, TQString("%1").arg(itemIndex+1).rightJustify(8,'0') );; + item->setText(3, TQString("%1").tqarg(itemIndex+1).rightJustify(8,'0') );; } ++it; } @@ -1116,7 +1116,7 @@ int DocTreeViewImpl::newIndexLastChild() item = static_cast(it.current()); itemIndex = (item->text(3)).toInt(); if ( itemIndex > lastIndex ){ - item->setText(3, TQString("%1").arg(itemIndex+1).rightJustify(8,'0') ); + item->setText(3, TQString("%1").tqarg(itemIndex+1).rightJustify(8,'0') ); } ++it; } diff --git a/ksayit/src/doctreeviewimpl.h b/ksayit/src/doctreeviewimpl.h index c42cab8..f461b84 100644 --- a/ksayit/src/doctreeviewimpl.h +++ b/ksayit/src/doctreeviewimpl.h @@ -12,7 +12,7 @@ #ifndef DOCTREEVIEWIMPL_H #define DOCTREEVIEWIMPL_H -// Qt includes +// TQt includes #include // KDE includes @@ -40,7 +40,7 @@ all required methods to access or manipulate its content. class DocTreeViewImpl : public DocTreeView { public: - DocTreeViewImpl(TQWidget* parent=0, const char* name=0, WFlags fl=0); + DocTreeViewImpl(TQWidget* tqparent=0, const char* name=0, WFlags fl=0); ~DocTreeViewImpl(); @@ -102,7 +102,7 @@ public: /** * Sets the item active designated by the ID. * \param ID The ID (column 3) of the TreeView item. - * \returns TQString::null if the operation was successfull,\n + * \returns TQString() if the operation was successfull,\n * an error message, if the item was not found. */ TQString selectItemByID(const TQString &ID, const TQString title); diff --git a/ksayit/src/effectstack.cpp b/ksayit/src/effectstack.cpp index 67cfb44..75ef7f5 100644 --- a/ksayit/src/effectstack.cpp +++ b/ksayit/src/effectstack.cpp @@ -10,7 +10,7 @@ // // -// Qt includes +// TQt includes #include // KDE includes diff --git a/ksayit/src/fx_setup.ui b/ksayit/src/fx_setup.ui index 60ad57d..056ceb0 100644 --- a/ksayit/src/fx_setup.ui +++ b/ksayit/src/fx_setup.ui @@ -1,6 +1,6 @@ FX_Setup - + FX_Setup @@ -22,23 +22,23 @@ unnamed - + - layout7 + tqlayout7 unnamed - + - layout3 + tqlayout3 unnamed - + textLabel_available @@ -46,11 +46,11 @@ Available:
- + listBox_Available - + 150 170 @@ -59,9 +59,9 @@ - + - layout4 + tqlayout4 @@ -77,18 +77,18 @@ Expanding - + 20 40 - + toolButton_add - + 30 32767 @@ -101,11 +101,11 @@ image0 - + toolButton_remove - + 30 32767 @@ -128,7 +128,7 @@ Expanding - + 20 40 @@ -137,15 +137,15 @@ - + - layout5 + tqlayout5 unnamed - + textLabel_active @@ -153,11 +153,11 @@ Active:
- + listBox_Active - + 150 170 @@ -171,9 +171,9 @@ - + - layout8 + tqlayout8 @@ -189,14 +189,14 @@ Expanding - + 40 20 - + pushButton_removeAll @@ -237,16 +237,16 @@ listBox_Active - doubleClicked(QListBoxItem*) + doubleClicked(TQListBoxItem*) FX_Setup - slotConfigureEffect(QListBoxItem*) + slotConfigureEffect(TQListBoxItem*) - + slotAdd() slotRemove() slotRemoveAll() - slotConfigureEffect(QListBoxItem*) - - + slotConfigureEffect(TQListBoxItem*) + +
diff --git a/ksayit/src/fxpluginhandler.cpp b/ksayit/src/fxpluginhandler.cpp index ec68de8..fc5ed5d 100644 --- a/ksayit/src/fxpluginhandler.cpp +++ b/ksayit/src/fxpluginhandler.cpp @@ -26,8 +26,8 @@ #include "ksayit_ttsplugin.h" -FXPluginHandler::FXPluginHandler(TQObject *parent, const char *name, KConfig *config) - : TQObject(parent, name), m_config(config) +FXPluginHandler::FXPluginHandler(TQObject *tqparent, const char *name, KConfig *config) + : TQObject(tqparent, name), m_config(config) { m_mapPluginList.clear(); m_lstActivePlugins.clear(); @@ -58,8 +58,8 @@ void FXPluginHandler::searchPlugins() KTrader::OfferList offers = KTrader::self()->query("KSayIt/FXPlugin"); KLibFactory *factory = NULL; - TQString library = TQString::null; - TQString name = TQString::null; + TQString library = TQString(); + TQString name = TQString(); KTrader::OfferList::Iterator it=offers.begin(); for ( ;it!=offers.end(); ++it ){ @@ -70,11 +70,11 @@ void FXPluginHandler::searchPlugins() if ( factory ){ kdDebug(100200) << "FXPluginHandler::searchPlugins(): Plugin factory found." << endl; // register found plugin - if ( !sRegistered.contains( TQString(name) )){ + if ( !sRegistered.tqcontains( TQString(name) )){ sRegistered.append( TQString(name) ); plugin.name = name; plugin.library = library; - plugin.description = TQString::null; + plugin.description = TQString(); plugin.EffectID = 0; plugin.p = NULL; m_mapPluginList[plugin.name] = plugin; // update Plugin Map @@ -96,7 +96,7 @@ void FXPluginHandler::readConfiguration() // unload all plugins and destroy the effect objects lit = m_lstActivePlugins.begin(); while ( lit != m_lstActivePlugins.end() ){ - mit = m_mapPluginList.find( *lit ); + mit = m_mapPluginList.tqfind( *lit ); if ( mit!=m_mapPluginList.end() ){ plugin = *mit; if ( (plugin.p != NULL) && (plugin.EffectID == 0) ){ @@ -116,7 +116,7 @@ void FXPluginHandler::readConfiguration() KLibFactory *factory = NULL; for (lit=conf_active.begin(); lit!=conf_active.end(); ++lit){ // for all in config - mit = m_mapPluginList.find(*lit); + mit = m_mapPluginList.tqfind(*lit); if( mit!=m_mapPluginList.end() ){ // plugin found in list of registered plugins plugin = *mit; @@ -146,7 +146,7 @@ void FXPluginHandler::showEffectGUI(const TQString &pname) fx_struct plugin; // find plugin with name==pname in list and show its GUI - mit = m_mapPluginList.find(pname); + mit = m_mapPluginList.tqfind(pname); if ( mit != m_mapPluginList.end() ){ plugin = *mit; if ( plugin.p != NULL ){ // plugin loaded @@ -198,7 +198,7 @@ void FXPluginHandler::activateEffect(const TQString &pname, fx_struct plugin; // find plugin with name==pname - mit = m_mapPluginList.find(pname); + mit = m_mapPluginList.tqfind(pname); if ( mit!=m_mapPluginList.end() ){ plugin = *mit; if ( plugin.p != NULL ){ diff --git a/ksayit/src/fxpluginhandler.h b/ksayit/src/fxpluginhandler.h index 43c820f..ca4aa21 100644 --- a/ksayit/src/fxpluginhandler.h +++ b/ksayit/src/fxpluginhandler.h @@ -44,11 +44,12 @@ typedef struct { } fx_struct; -class FXPluginHandler : public QObject +class FXPluginHandler : public TQObject { Q_OBJECT + TQ_OBJECT public: - FXPluginHandler(TQObject *parent = 0, const char *name = 0, KConfig *config=0); + FXPluginHandler(TQObject *tqparent = 0, const char *name = 0, KConfig *config=0); ~FXPluginHandler(); public: // Methods diff --git a/ksayit/src/fxsetupimpl.cpp b/ksayit/src/fxsetupimpl.cpp index fc0100e..9f18b81 100644 --- a/ksayit/src/fxsetupimpl.cpp +++ b/ksayit/src/fxsetupimpl.cpp @@ -27,10 +27,10 @@ // #include "freeverbsetupimpl.h" #include "fxpluginhandler.h" -FX_SetupImpl::FX_SetupImpl(TQWidget *parent, const char *name, +FX_SetupImpl::FX_SetupImpl(TQWidget *tqparent, const char *name, KConfig *config, FXPluginHandler *fxpluginhandler ) - : FX_Setup(parent,name), m_config(config), m_fxpluginhandler(fxpluginhandler) + : FX_Setup(tqparent,name), m_config(config), m_fxpluginhandler(fxpluginhandler) { m_fxpluginhandler->getPlugins(pluginlist); @@ -109,7 +109,7 @@ void FX_SetupImpl::Init(TQStringList c_avail) pushButton_removeAll->setEnabled(false); for (sit=conf_active.begin(); sit!=conf_active.end(); ++sit){ - it = c_avail.find(*sit); + it = c_avail.tqfind(*sit); if ( it!=c_avail.end() ){ // active plugin as per config-file in pluginlist found c_active.append(*sit); // append to active list c_avail.remove(*sit); // remove active plugin from the list of avail plugins diff --git a/ksayit/src/fxsetupimpl.h b/ksayit/src/fxsetupimpl.h index ac256ed..fc868e6 100644 --- a/ksayit/src/fxsetupimpl.h +++ b/ksayit/src/fxsetupimpl.h @@ -37,9 +37,10 @@ class FXPluginHandler; */ class FX_SetupImpl : public FX_Setup { Q_OBJECT + TQ_OBJECT public: - FX_SetupImpl(TQWidget *parent=0, const char *name=0, + FX_SetupImpl(TQWidget *tqparent=0, const char *name=0, KConfig *config=0, FXPluginHandler *fxpluginhandler=0); ~FX_SetupImpl(); diff --git a/ksayit/src/ksayit.cpp b/ksayit/src/ksayit.cpp index 877c60a..bdf772c 100644 --- a/ksayit/src/ksayit.cpp +++ b/ksayit/src/ksayit.cpp @@ -55,9 +55,9 @@ #define KSAYITUI "ksayitui.rc" #define ID_STATUS_MSG 1 -KSayItApp::KSayItApp(TQWidget* parent, const char* name, WFlags f, +KSayItApp::KSayItApp(TQWidget* tqparent, const char* name, WFlags f, const TQCString &objID) - : KMainWindow(parent, name, f), DCOPObject(objID) + : KMainWindow(tqparent, name, f), DCOPObject(objID) { config = NULL; view = NULL; @@ -67,10 +67,10 @@ KSayItApp::KSayItApp(TQWidget* parent, const char* name, WFlags f, bkManager = NULL; bkHandler = NULL; bkMenu = NULL; - m_currentBookmarkFile = TQString::null; + m_currentBookmarkFile = TQString(); config=kapp->config(); - m_kttslib = new KTTSDLib(this, "KTTSD-Library", kapp); + m_kttslib = new KTTSDLib(TQT_TQOBJECT(this), "KTTSD-Library", kapp); initView(); initStatusBar(); @@ -84,31 +84,31 @@ KSayItApp::KSayItApp(TQWidget* parent, const char* name, WFlags f, // connect TTS plugin handler to this object connect(m_kttslib, TQT_SIGNAL(signalFinished()), - this, TQT_SLOT(slotTTSFinished()) ); + TQT_TQOBJECT(this), TQT_SLOT(slotTTSFinished()) ); // only used if library thinks it has to call the preferences dialog. // e.g. when it detects a bad configuration. connect(m_kttslib, TQT_SIGNAL(signalCallPreferences()), - this, TQT_SLOT(slotPreferences()) ); + TQT_TQOBJECT(this), TQT_SLOT(slotPreferences()) ); // init Clipboard - cb = TQApplication::clipboard(); - connect(cb, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotClipboardChanged()) ); + cb = TQApplication::tqclipboard(); + connect(cb, TQT_SIGNAL(dataChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotClipboardChanged()) ); // create SystemTray object tray = new KSayItSystemTray(this, "system_tray"); - connect(tray, TQT_SIGNAL(signalCallPreferences()), this, TQT_SLOT(slotPreferences()) ); - connect(tray, TQT_SIGNAL(signalSayActivated()), this, TQT_SLOT(slotSayText()) ); - connect(tray, TQT_SIGNAL(signalSayClipboard()), this, TQT_SLOT(slotSayClipboard()) ); - connect(tray, TQT_SIGNAL(signalShutUpActivated()), this, TQT_SLOT(slotStopActivated()) ); - connect(tray, TQT_SIGNAL(signalPauseActivated()), this, TQT_SLOT(slotPauseActivated()) ); - connect(tray, TQT_SIGNAL(signalNextActivated()), this, TQT_SLOT(slotNextSentenceActivated()) ); - connect(tray, TQT_SIGNAL(signalPrevActivated()), this, TQT_SLOT(slotPrevSentenceActivated()) ); + connect(tray, TQT_SIGNAL(signalCallPreferences()), TQT_TQOBJECT(this), TQT_SLOT(slotPreferences()) ); + connect(tray, TQT_SIGNAL(signalSayActivated()), TQT_TQOBJECT(this), TQT_SLOT(slotSayText()) ); + connect(tray, TQT_SIGNAL(signalSayClipboard()), TQT_TQOBJECT(this), TQT_SLOT(slotSayClipboard()) ); + connect(tray, TQT_SIGNAL(signalShutUpActivated()), TQT_TQOBJECT(this), TQT_SLOT(slotStopActivated()) ); + connect(tray, TQT_SIGNAL(signalPauseActivated()), TQT_TQOBJECT(this), TQT_SLOT(slotPauseActivated()) ); + connect(tray, TQT_SIGNAL(signalNextActivated()), TQT_TQOBJECT(this), TQT_SLOT(slotNextSentenceActivated()) ); + connect(tray, TQT_SIGNAL(signalPrevActivated()), TQT_TQOBJECT(this), TQT_SLOT(slotPrevSentenceActivated()) ); tray->show(); tray->setEnabled(true); // create the FX plugin handler - m_fxpluginhandler = new FXPluginHandler(this, "fxpluginhandler", config); + m_fxpluginhandler = new FXPluginHandler(TQT_TQOBJECT(this), "fxpluginhandler", config); m_fxpluginhandler->searchPlugins(); // create object for effectstack @@ -141,61 +141,61 @@ KSayItApp::~KSayItApp() void KSayItApp::initActions() { // Standard-Actions - open = KStdAction::open(this, TQT_SLOT(slotFileOpen()), actionCollection()); - save = KStdAction::save(this, TQT_SLOT(slotFileSave()), actionCollection()); - saveAs = KStdAction::saveAs(this, TQT_SLOT(slotFileSaveAs()), actionCollection()); - KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection()); - KStdAction::close(this, TQT_SLOT(slotCloseMainWindow()), actionCollection()); - cut = KStdAction::cut(view, TQT_SLOT(slotCut()), actionCollection()); - copy = KStdAction::copy(view, TQT_SLOT(slotCopy()), actionCollection()); - paste = KStdAction::paste(view, TQT_SLOT(slotPaste()), actionCollection()); - preferences = KStdAction::preferences(this, TQT_SLOT(slotPreferences()), actionCollection()); - KStdAction::keyBindings(this, TQT_SLOT(slotEditKeys()), actionCollection()); - KStdAction::configureToolbars(this, TQT_SLOT(slotConfigureToolbar()), actionCollection()); + open = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(slotFileOpen()), actionCollection()); + save = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(slotFileSave()), actionCollection()); + saveAs = KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(slotFileSaveAs()), actionCollection()); + KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(slotFileQuit()), actionCollection()); + KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(slotCloseMainWindow()), actionCollection()); + cut = KStdAction::cut(TQT_TQOBJECT(view), TQT_SLOT(slotCut()), actionCollection()); + copy = KStdAction::copy(TQT_TQOBJECT(view), TQT_SLOT(slotCopy()), actionCollection()); + paste = KStdAction::paste(TQT_TQOBJECT(view), TQT_SLOT(slotPaste()), actionCollection()); + preferences = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotPreferences()), actionCollection()); + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(slotEditKeys()), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(slotConfigureToolbar()), actionCollection()); KStdAction::showToolbar("mainToolBar", actionCollection()); - statusBarAction = KStdAction::showStatusbar(this, TQT_SLOT(slotToggleStatusBar()), actionCollection()); + statusBarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(slotToggleStatusBar()), actionCollection()); // User defined actions say = new KAction (i18n("Say"), - Qt::Key_F9, - this, TQT_SLOT (slotSayText()), + TQt::Key_F9, + TQT_TQOBJECT(this), TQT_SLOT (slotSayText()), actionCollection(), "say_it"); pause = new KAction (i18n("Pause"), - Qt::Key_Pause, - this, TQT_SLOT (slotPauseActivated()), + TQt::Key_Pause, + TQT_TQOBJECT(this), TQT_SLOT (slotPauseActivated()), actionCollection(), "pause"); shutup = new KAction (i18n("Shut Up"), - Qt::Key_F10, - this, TQT_SLOT (slotStopActivated()), + TQt::Key_F10, + TQT_TQOBJECT(this), TQT_SLOT (slotStopActivated()), actionCollection(), "shut_up"); next_sentence = new KAction (i18n("Next Sentence"), - Qt::Key_Next, - this, TQT_SLOT (slotNextSentenceActivated()), + TQt::Key_Next, + TQT_TQOBJECT(this), TQT_SLOT (slotNextSentenceActivated()), actionCollection(), "next_sentence"); prev_sentence = new KAction (i18n("Previous Sentence"), - Qt::Key_Prior, - this, TQT_SLOT(slotPrevSentenceActivated()), + TQt::Key_Prior, + TQT_TQOBJECT(this), TQT_SLOT(slotPrevSentenceActivated()), actionCollection(), "prev_sentence"); clear = new KAction (i18n("Clear"), - Qt::Key_F12, - this, TQT_SLOT(slotClear()), + TQt::Key_F12, + TQT_TQOBJECT(this), TQT_SLOT(slotClear()), actionCollection(), "clear"); edit = new KToggleAction( i18n("Edit Text"), 0, - this, TQT_SLOT(slotEditToggled()), + TQT_TQOBJECT(this), TQT_SLOT(slotEditToggled()), actionCollection(), "edittext"); @@ -293,7 +293,7 @@ void KSayItApp::slotChangeBookmarkFilename(const TQString &newname) // copy old bookmarkfile to new file if ( m_currentBookmarkFile != newbkFile ){ if ( TQFile::exists(m_currentBookmarkFile) ){ - TQString command = TQString("cp %1 %2").arg(m_currentBookmarkFile).arg(newbkFile); + TQString command = TQString("cp %1 %2").tqarg(m_currentBookmarkFile).tqarg(newbkFile); system( command.ascii() ); } // install new BookmarkHandler based on the new file @@ -314,7 +314,7 @@ void KSayItApp::initStatusBar() { // STATUSBAR statusBar()->insertItem(i18n("Ready."), ID_STATUS_MSG, 1); - statusBar()->setItemAlignment(ID_STATUS_MSG, Qt::AlignLeft); + statusBar()->setItemAlignment(ID_STATUS_MSG, TQt::AlignLeft); } @@ -322,17 +322,17 @@ void KSayItApp::initView() { // create the main widget view = new KSayItViewImpl(this); - view->setMinimumSize(view->sizeHint()); + view->setMinimumSize(view->tqsizeHint()); setCentralWidget(view); // connections connect( view, TQT_SIGNAL(signalEnableCopyCut(bool)), - this, TQT_SLOT(slotEnableCopyCut(bool))); - connect( view, TQT_SIGNAL(signalShowStatus(const TQString &)), - this, TQT_SLOT(slotStatusMsg(const TQString &))); + TQT_TQOBJECT(this), TQT_SLOT(slotEnableCopyCut(bool))); + connect( view, TQT_SIGNAL(signalShowtqStatus(const TQString &)), + TQT_TQOBJECT(this), TQT_SLOT(slotStatusMsg(const TQString &))); connect( view, TQT_SIGNAL(signalSetCaption(const TQString &)), - this, TQT_SLOT(slotSetCaption(const TQString &))); + TQT_TQOBJECT(this), TQT_SLOT(slotSetCaption(const TQString &))); connect( view, TQT_SIGNAL(signalTextChanged(bool)), - this, TQT_SLOT(slotTextChanged(bool)) ); + TQT_TQOBJECT(this), TQT_SLOT(slotTextChanged(bool)) ); // DockWindow TQDockWindow *docview = new TQDockWindow(TQDockWindow::InDock, this, "docview"); @@ -341,25 +341,25 @@ void KSayItApp::initView() // treeview->clear(); docview->setWidget(treeview); docview->setResizeEnabled(true); - this->setDockEnabled(docview, Qt::DockTop, false); - this->setDockEnabled(docview, Qt::DockBottom, false); - this->moveDockWindow(docview, Qt::DockLeft); + this->setDockEnabled(docview, TQt::DockTop, false); + this->setDockEnabled(docview, TQt::DockBottom, false); + this->moveDockWindow(docview, TQt::DockLeft); connect( treeview, TQT_SIGNAL(signalContentChanged(const TQString&)), - this, TQT_SLOT(slotTreeViewChanged(const TQString&)) ); + TQT_TQOBJECT(this), TQT_SLOT(slotTreeViewChanged(const TQString&)) ); connect( treeview, TQT_SIGNAL(signalSetText(const TQString&)), - this, TQT_SLOT(slotSetText(const TQString&)) ); + TQT_TQOBJECT(this), TQT_SLOT(slotSetText(const TQString&)) ); connect( treeview, TQT_SIGNAL(signalAllNodesProcessed()), - this, TQT_SLOT(slotSayNode()) ); + TQT_TQOBJECT(this), TQT_SLOT(slotSayNode()) ); connect( treeview, TQT_SIGNAL(signalEnableTextedit(bool)), - this, TQT_SLOT(slotEnableTextedit(bool)) ); + TQT_TQOBJECT(this), TQT_SLOT(slotEnableTextedit(bool)) ); connect( treeview, TQT_SIGNAL(signalNotifyBookmarkManager(const TQString&, const TQString&)), - this, TQT_SLOT(slotNotifyBookmarkHandler(const TQString&, const TQString&)) ); + TQT_TQOBJECT(this), TQT_SLOT(slotNotifyBookmarkHandler(const TQString&, const TQString&)) ); connect( treeview, TQT_SIGNAL(signalSetBookmarkFilename(const TQString&)), - this, TQT_SLOT(slotSetBookmarkFilename(const TQString&)) ); + TQT_TQOBJECT(this), TQT_SLOT(slotSetBookmarkFilename(const TQString&)) ); connect( treeview, TQT_SIGNAL(signalChangeBookmarkFilename(const TQString&)), - this, TQT_SLOT(slotChangeBookmarkFilename(const TQString&)) ); + TQT_TQOBJECT(this), TQT_SLOT(slotChangeBookmarkFilename(const TQString&)) ); connect( treeview, TQT_SIGNAL(signalDeleteBookmark(const TQString&, const TQString&)), - this, TQT_SLOT(slotDeleteBookmark(const TQString&, const TQString&)) ); + TQT_TQOBJECT(this), TQT_SLOT(slotDeleteBookmark(const TQString&, const TQString&)) ); } @@ -473,7 +473,7 @@ void KSayItApp::slotFileOpen() // open filerequester TQString fn; TQString usershome( getenv("HOME") ); - KURL url = KFileDialog::getOpenURL(usershome, TQString::null, this, i18n("File to Speak") ); + KURL url = KFileDialog::getOpenURL(usershome, TQString(), this, i18n("File to Speak") ); try{ if ( !url.isEmpty() ){ resetView(); @@ -549,7 +549,7 @@ void KSayItApp::slotEditKeys() void KSayItApp::slotFileQuit() { slotStatusMsg(i18n("Exiting...")); - int really = KMessageBox::questionYesNo( this, i18n("Do you really want to quit?"), TQString::null, KStdGuiItem::quit(), KStdGuiItem::cancel() ); + int really = KMessageBox::questionYesNo( this, i18n("Do you really want to quit?"), TQString(), KStdGuiItem::quit(), KStdGuiItem::cancel() ); if (really == KMessageBox::Yes){ slotSaveOptions(); kapp->quit(); @@ -618,7 +618,7 @@ void KSayItApp::slotClipboardChanged() return; } - if ( cb->data(QClipboard::Clipboard)->provides("text/plain") ){ + if ( cb->data(TQClipboard::Clipboard)->provides("text/plain") ){ tray->changeState( StateWAIT::Instance() ); paste->setEnabled(true); } else { @@ -811,12 +811,12 @@ void KSayItApp::setActions(int actions) { // ACTIONS::PLAY | ACTIONS::STOP | ACTIONS::PAUSE | ACTIONS::FFWD | ACTIONS::FREV; - // Get the mask of supported actions from the plugin. - int mask = m_kttslib->getActions(); - kdDebug(100200) << TQString("KSayItApp:PSA: %1").arg(mask, 0, 2) << endl; + // Get the tqmask of supported actions from the plugin. + int tqmask = m_kttslib->getActions(); + kdDebug(100200) << TQString("KSayItApp:PSA: %1").tqarg(tqmask, 0, 2) << endl; // disable actions not supported by the plugin - int ma = actions & mask; + int ma = actions & tqmask; if (ma & ACTIONS::PLAY){ say->setEnabled(true); diff --git a/ksayit/src/ksayit.h b/ksayit/src/ksayit.h index fc8fef9..bf1e672 100644 --- a/ksayit/src/ksayit.h +++ b/ksayit/src/ksayit.h @@ -24,7 +24,7 @@ using namespace std; -// include files for Qt +// include files for TQt #include #include @@ -68,12 +68,13 @@ class KSayItBookmarkHandler; class KSayItApp : public KMainWindow, public DCOPObject { Q_OBJECT +// TQ_OBJECT K_DCOP public: /** construtor of KSayItApp, calls all init functions to create the application. */ - KSayItApp(TQWidget* parent=0, const char* name=0, WFlags f=0, + KSayItApp(TQWidget* tqparent=0, const char* name=0, WFlags f=0, const TQCString &objID=0); ~KSayItApp(); @@ -114,7 +115,7 @@ private slots: */ void slotTreeViewChanged(const TQString &str); - /** save general Options like all bar positions and status as well as the geometry to + /** save general Options like all bar positions and status as well as the tqgeometry to * the configuration file. */ void slotSaveOptions(); @@ -265,7 +266,7 @@ public: * Selects the item with the given ID in the TreeView. * \param ID The ID of the item to select. * \param title The title of the bookmark. - * \returns TQString::null, if the operation was successfull, + * \returns TQString(), if the operation was successfull, * an error message, if the ID was not found. */ TQString setItemByBookmark( const TQString &ID, const TQString &title ); @@ -315,7 +316,7 @@ private: // Methods * \p ksayit/ksayit_bookmarks/. * \param filename The name of the bookmark file. * \returns The absolute pathname of the given bookmark file. - * Returns \p TQString::null if the operation was not successfull. + * Returns \p TQString() if the operation was not successfull. */ TQString getBookmarkDir(const TQString &filename); @@ -349,7 +350,7 @@ private: KActionMenu *bookmarkmenu; // Misc stuff - QClipboard *cb; + TQClipboard *cb; TQString clip; KTTSDLib *m_kttslib; FXPluginHandler *m_fxpluginhandler; diff --git a/ksayit/src/ksayit_fxplugin.h b/ksayit/src/ksayit_fxplugin.h index 852c522..211ca36 100644 --- a/ksayit/src/ksayit_fxplugin.h +++ b/ksayit/src/ksayit_fxplugin.h @@ -30,14 +30,15 @@ using namespace Arts; * derived from FXPlugin, include 'ksayit_fxplugin.h' and reimplement all the * pure virtual functions provided herein. * *Appl is a pointer to the main application as delivered by \p KApplication::kApplication(). - * It can be used for any reason i.e. to install a Qt translator.\n + * It can be used for any reason i.e. to install a TQt translator.\n \author Robert Vogl */ -class FXPlugin : public QObject +class FXPlugin : public TQObject { // Q_OBJECT + TQ_OBJECT public: - FXPlugin(TQObject *parent=0, const char* name=0){}; + FXPlugin(TQObject *tqparent=0, const char* name=0){}; /** Sets the Main application object. Useful for config objects etc. */ diff --git a/ksayit/src/ksayit_ttsplugin.h b/ksayit/src/ksayit_ttsplugin.h index e0f8d31..bb3e9f9 100644 --- a/ksayit/src/ksayit_ttsplugin.h +++ b/ksayit/src/ksayit_ttsplugin.h @@ -37,7 +37,7 @@ * \p createPlugin() returns a pointer to an instance of your class. * The Plugin Handler of KSayIt calls this function with a parameter pointing * to the main application instance, as delivered by \p KApplication::kApplication(). - * This pointer can be used for any reason i.e. to install a Qt translator.\n + * This pointer can be used for any reason i.e. to install a TQt translator.\n * An instance of your class should be deleted by use of \p destroyPlugin().\n * Example: \code @@ -54,7 +54,7 @@ } }; \endcode - * KSayIt expects two Qt-signals from the plugin:\n + * KSayIt expects two TQt-signals from the plugin:\n * \p signalPluginFinished() must be emitted when the plugin is finished, * i.e. a task to speak text has been finished.\n * \p signalPluginFailed() is optional and shall emitted if the processing @@ -62,10 +62,10 @@ \author Robert Vogl */ -class TTSPlugin : public QObject +class TTSPlugin : public TQObject { protected: - TTSPlugin(TQObject *parent, const char *name) : TQObject(parent, name){}; + TTSPlugin(TQObject *tqparent, const char *name) : TQObject(tqparent, name){}; public: /** Returns the name of the plugin. This name is the unique identifier @@ -109,7 +109,7 @@ public: * In this case, KSayIt uses a built-in audio player to play back * the file via aRts.\n * If this plugin provides its own audio output mechanisms, then return - * \p TQString::null.\n + * \p TQString().\n * The TTS processing shall be implemented non-blocking, i.e. this function has * to return a valid string as soon as possible, before the typically time * consuming TTS processing starts. The synchronization with KSayIt shall diff --git a/ksayit/src/ksayitbookmarkhandler.cpp b/ksayit/src/ksayitbookmarkhandler.cpp index 7a45247..8e838d5 100644 --- a/ksayit/src/ksayitbookmarkhandler.cpp +++ b/ksayit/src/ksayitbookmarkhandler.cpp @@ -10,7 +10,7 @@ // // -// Qt include +// TQt include #include // KDE includes @@ -23,11 +23,11 @@ #include "ksayitbookmarkhandler.h" #include "ksayit.h" -KSayItBookmarkHandler::KSayItBookmarkHandler(KBookmarkManager *bkManager, KSayItApp* parent) - : KBookmarkOwner(), m_bkManager(bkManager), m_parent(parent) +KSayItBookmarkHandler::KSayItBookmarkHandler(KBookmarkManager *bkManager, KSayItApp* tqparent) + : KBookmarkOwner(), m_bkManager(bkManager), m_parent(tqparent) { - m_ID = TQString::null; - m_title = TQString::null; + m_ID = TQString(); + m_title = TQString(); } KSayItBookmarkHandler::~KSayItBookmarkHandler() @@ -49,10 +49,10 @@ void KSayItBookmarkHandler::openBookmarkURL(const TQString &url) kdDebug(100200) << "KSayItBookmarkHandler::openBookmarkURL(" << url << ")" << endl; TQString l_url = url; - TQString title = TQString::null; + TQString title = TQString(); TQString type = l_url.section( "://", 0, 0 ); TQString ID = l_url.section( TQRegExp("/+"), 1, 1 ); - TQString err = TQString::null; + TQString err = TQString(); // Some checks if ( type != "ksayit" ){ @@ -71,7 +71,7 @@ void KSayItBookmarkHandler::openBookmarkURL(const TQString &url) title = bookmark.text(); } - TQString result = TQString::null; + TQString result = TQString(); result = m_parent->setItemByBookmark( ID, title ); if ( !result.isNull() ){ KMessageBox::sorry( 0, result, i18n("Bookmark not found") ); @@ -228,7 +228,7 @@ void KSayItBookmarkHandler::traverseBookmarks(KBookmarkGroup bkGroup) // // Modifications on URL/Title END - bkNew = bkGroup.addBookmark( m_bkManager, title, url, TQString::null, false ); + bkNew = bkGroup.addBookmark( m_bkManager, title, url, TQString(), false ); bkGroup.moveItem( bkNew, bkPrev ); bkGroup.deleteBookmark( bk ); } diff --git a/ksayit/src/ksayitbookmarkhandler.h b/ksayit/src/ksayitbookmarkhandler.h index 018ea39..31be84c 100644 --- a/ksayit/src/ksayitbookmarkhandler.h +++ b/ksayit/src/ksayitbookmarkhandler.h @@ -12,7 +12,7 @@ #ifndef KSAYITBOOKMARKHANDLER_H #define KSAYITBOOKMARKHANDLER_H -// Qt includes +// TQt includes #include // KDE includes @@ -31,7 +31,7 @@ class KSayItApp; class KSayItBookmarkHandler : public KBookmarkOwner { public: - KSayItBookmarkHandler(KBookmarkManager *bkManager=0, KSayItApp* parent=0); + KSayItBookmarkHandler(KBookmarkManager *bkManager=0, KSayItApp* tqparent=0); virtual ~KSayItBookmarkHandler(); public: diff --git a/ksayit/src/ksayitsystemtray.cpp b/ksayit/src/ksayitsystemtray.cpp index e2001cd..e7054a2 100644 --- a/ksayit/src/ksayitsystemtray.cpp +++ b/ksayit/src/ksayitsystemtray.cpp @@ -26,8 +26,8 @@ // App specific includes #include "ksayitsystemtray.h" -KSayItSystemTray::KSayItSystemTray(TQWidget *parent, const char *name) - : KSystemTray(parent,name) +KSayItSystemTray::KSayItSystemTray(TQWidget *tqparent, const char *name) + : KSystemTray(tqparent,name) { initActions(); changeState( StateCLIPEMPTY::Instance() ); @@ -46,7 +46,7 @@ void KSayItSystemTray::initActions() menu = this->contextMenu(); help = new KHelpMenu(this, kapp->aboutData(), false, actionCollection()); // Standard actions - settings = KStdAction::preferences(this, TQT_SLOT(slotPreferences()), actionCollection()); + settings = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotPreferences()), actionCollection()); help_about = KStdAction::aboutApp(help, TQT_SLOT(aboutApplication()), actionCollection()); help_kde = KStdAction::aboutKDE(help, TQT_SLOT(aboutKDE()), actionCollection()); @@ -54,28 +54,28 @@ void KSayItSystemTray::initActions() say = new KAction(i18n("Say"), "player_play", 0, - this, TQT_SLOT (slotSayActivated()), + TQT_TQOBJECT(this), TQT_SLOT (slotSayActivated()), actionCollection(), "say_it"); shutup = new KAction(i18n("Shut Up"), "player_stop", 0, - this, TQT_SLOT (slotStopActivated()), + TQT_TQOBJECT(this), TQT_SLOT (slotStopActivated()), actionCollection(), "shut_up"); pause = new KAction (i18n("Pause"), "player_pause", 0, - this, TQT_SLOT (slotPauseActivated()), + TQT_TQOBJECT(this), TQT_SLOT (slotPauseActivated()), actionCollection(), "pause"); next_sentence = new KAction (i18n("Next Sentence"), "2rightarrow", 0, - this, TQT_SLOT (slotNextSentenceActivated()), + TQT_TQOBJECT(this), TQT_SLOT (slotNextSentenceActivated()), actionCollection(), "next_sentence"); @@ -83,7 +83,7 @@ void KSayItSystemTray::initActions() prev_sentence = new KAction (i18n("Previous Sentence"), "2leftarrow", 0, - this, TQT_SLOT(slotPrevSentenceActivated()), + TQT_TQOBJECT(this), TQT_SLOT(slotPrevSentenceActivated()), actionCollection(), "prev_sentence"); @@ -253,7 +253,7 @@ void StateWAIT::setContext(KSayItSystemTray *caller) void StateWAIT::mousePressEvent(KSayItSystemTray *caller, TQMouseEvent *e) { - if (e->button()==LeftButton){ // left Mouse-button pressed + if (e->button()==Qt::LeftButton){ // left Mouse-button pressed TQWidget::mousePressEvent(e); // do nothing (see mouseReleaseEvent) } else { mousePressEventCall(caller, e); // normal mouse-handling @@ -262,7 +262,7 @@ void StateWAIT::mousePressEvent(KSayItSystemTray *caller, TQMouseEvent *e) void StateWAIT::mouseReleaseEvent(KSayItSystemTray *caller, TQMouseEvent *e) { - if (e->button()==LeftButton){ // left Mouse-button released + if (e->button()==Qt::LeftButton){ // left Mouse-button released say(caller); } else { mouseReleaseEventCall(caller, e); // normal mouse-handling @@ -294,7 +294,7 @@ void StateSAY::setContext(KSayItSystemTray *caller) void StateSAY::mousePressEvent(KSayItSystemTray *caller, TQMouseEvent *e) { - if (e->button()==LeftButton){ // left Mouse-button pressed + if (e->button()==Qt::LeftButton){ // left Mouse-button pressed TQWidget::mousePressEvent(e); // do nothing (see mouseReleaseEvent) } else { mousePressEventCall(caller, e); // normal mouse-handling @@ -303,7 +303,7 @@ void StateSAY::mousePressEvent(KSayItSystemTray *caller, TQMouseEvent *e) void StateSAY::mouseReleaseEvent(KSayItSystemTray *caller, TQMouseEvent *e) { - if (e->button()==LeftButton){ // left Mouse-button released + if (e->button()==Qt::LeftButton){ // left Mouse-button released TQWidget::mouseReleaseEvent(e); // do nothing (see mouseReleaseEvent) } else { mouseReleaseEventCall(caller, e); // normal mouse-handling @@ -336,7 +336,7 @@ void StateCLIPEMPTY::setContext(KSayItSystemTray *caller) void StateCLIPEMPTY::mousePressEvent(KSayItSystemTray *caller, TQMouseEvent *e) { - if (e->button()==LeftButton){ // left Mouse-button pressed + if (e->button()==Qt::LeftButton){ // left Mouse-button pressed TQWidget::mousePressEvent(e); // do nothing (see mouseReleaseEvent) } else { mousePressEventCall(caller, e); // normal mouse-handling @@ -345,7 +345,7 @@ void StateCLIPEMPTY::mousePressEvent(KSayItSystemTray *caller, TQMouseEvent *e) void StateCLIPEMPTY::mouseReleaseEvent(KSayItSystemTray *caller, TQMouseEvent *e) { - if (e->button()==LeftButton){ // left Mouse-button released + if (e->button()==Qt::LeftButton){ // left Mouse-button released TQWidget::mouseReleaseEvent(e); // do nothing (see mouseReleaseEvent) } else { mouseReleaseEventCall(caller, e); // normal mouse-handling diff --git a/ksayit/src/ksayitsystemtray.h b/ksayit/src/ksayitsystemtray.h index 90b15fb..cdeca47 100644 --- a/ksayit/src/ksayitsystemtray.h +++ b/ksayit/src/ksayitsystemtray.h @@ -39,11 +39,12 @@ class State; */ class KSayItSystemTray : public KSystemTray { Q_OBJECT + TQ_OBJECT friend class State; public: - KSayItSystemTray(TQWidget *parent=0, const char *name=0); + KSayItSystemTray(TQWidget *tqparent=0, const char *name=0); ~KSayItSystemTray(); signals: @@ -149,6 +150,7 @@ private: class State : public KSystemTray { Q_OBJECT + TQ_OBJECT public: State(); ~State(); diff --git a/ksayit/src/ksayitviewimpl.cpp b/ksayit/src/ksayitviewimpl.cpp index dfda154..07c5cdf 100644 --- a/ksayit/src/ksayitviewimpl.cpp +++ b/ksayit/src/ksayitviewimpl.cpp @@ -33,7 +33,7 @@ using namespace std; // App specific includes #include "ksayitviewimpl.h" -KSayItViewImpl::KSayItViewImpl(TQWidget *parent, const char *name ) : KSayItView(parent,name) { +KSayItViewImpl::KSayItViewImpl(TQWidget *tqparent, const char *name ) : KSayItView(tqparent,name) { // some presets @@ -51,9 +51,9 @@ void KSayItViewImpl::enableTextedit( bool enable ) { // if enable==true, we are in Edit Mode => RTF-Mode off. if ( enable ){ - TextEdit->setTextFormat( Qt::PlainText); + TextEdit->setTextFormat( TQt::PlainText); } else { - TextEdit->setTextFormat( Qt::RichText); + TextEdit->setTextFormat( TQt::RichText); } TextEdit->setReadOnly( !enable ); } diff --git a/ksayit/src/ksayitviewimpl.h b/ksayit/src/ksayitviewimpl.h index eb288e7..fab7e49 100644 --- a/ksayit/src/ksayitviewimpl.h +++ b/ksayit/src/ksayitviewimpl.h @@ -33,14 +33,15 @@ class KSayItViewImpl : public KSayItView { Q_OBJECT + TQ_OBJECT public: - KSayItViewImpl(TQWidget *parent=0, const char *name=0); + KSayItViewImpl(TQWidget *tqparent=0, const char *name=0); ~KSayItViewImpl(); signals: void signalSetCaption(const TQString &caption); - void signalShowStatus(const TQString &status); + void signalShowtqStatus(const TQString &status); void signalEnableCopyCut(bool enable); /** Emitted when the text in the TextEditor view cahnges. diff --git a/ksayit/src/parasaxparser.cpp b/ksayit/src/parasaxparser.cpp index 9a61e0a..a296e22 100644 --- a/ksayit/src/parasaxparser.cpp +++ b/ksayit/src/parasaxparser.cpp @@ -12,7 +12,7 @@ // #include // cout // using namespace std; -// Qt includes +// TQt includes // KDE includes #include @@ -30,8 +30,8 @@ ParaSaxParser::ParaSaxParser() m_reader->setEntityResolver(m_handler); m_reader->setDeclHandler(m_handler); - m_XmlInputHeader = TQString::null; - m_XmlInputBody = TQString::null; + m_XmlInputHeader = TQString(); + m_XmlInputBody = TQString(); } ParaSaxParser::~ParaSaxParser() diff --git a/ksayit/src/parasaxparser.h b/ksayit/src/parasaxparser.h index 6f46156..3b9c72c 100644 --- a/ksayit/src/parasaxparser.h +++ b/ksayit/src/parasaxparser.h @@ -12,7 +12,7 @@ #ifndef PARASAXPARSER_H #define PARASAXPARSER_H -// Qt includes +// TQt includes #include #include diff --git a/ksayit/src/saxhandler.cpp b/ksayit/src/saxhandler.cpp index 9f6354c..7e2d6aa 100644 --- a/ksayit/src/saxhandler.cpp +++ b/ksayit/src/saxhandler.cpp @@ -23,7 +23,7 @@ SaxHandler::SaxHandler() : TQXmlDefaultHandler() { - m_output = TQString::null; + m_output = TQString(); m_rtf = true; m_tagmap["action"] = "B"; m_tagmap["application"] = "B"; @@ -127,7 +127,7 @@ bool SaxHandler::characters(const TQString & ch) bool SaxHandler::fatalError(const TQXmlParseException &exc) { TQString err = i18n("Fatal error while parsing XML-Paragraph:\n"); - err += i18n("%1, Line: %2").arg(exc.message()).arg(exc.lineNumber()); + err += i18n("%1, Line: %2").tqarg(exc.message()).tqarg(exc.lineNumber()); KMessageBox::error(0, err, i18n("Fatal error") ); return false; } @@ -160,7 +160,7 @@ bool SaxHandler::internalEntityDecl(const TQString & name, bool SaxHandler::skippedEntity(const TQString &name) { - TQString warn = i18n("Unresolved entity found: %1.\n").arg(name); + TQString warn = i18n("Unresolved entity found: %1.\n").tqarg(name); warn += i18n("KSayIt does not support DocBook files with external entities. "); warn += i18n("Parsing can continue, but the resulting text will contain gaps."); @@ -181,7 +181,7 @@ void SaxHandler::getData( TQString &data ) const void SaxHandler::reset() { - m_output = TQString::null; + m_output = TQString(); } diff --git a/ksayit/src/saxhandler.h b/ksayit/src/saxhandler.h index 4e611b7..397ecef 100644 --- a/ksayit/src/saxhandler.h +++ b/ksayit/src/saxhandler.h @@ -1,7 +1,7 @@ // // C++ Interface: saxhandler // -// Description: Qt SAX2-Handler +// Description: TQt SAX2-Handler // // // Author: Robert Vogl , (C) 2005 @@ -16,7 +16,7 @@ #include using namespace std; -// Qt includes +// TQt includes #include #include @@ -26,7 +26,7 @@ typedef map TagMapT; /** @author Robert Vogl */ -class SaxHandler : public QXmlDefaultHandler +class SaxHandler : public TQXmlDefaultHandler { public: SaxHandler(); diff --git a/ksayit/src/voicesetupdlg.cpp b/ksayit/src/voicesetupdlg.cpp index d8df70a..50e4e1c 100644 --- a/ksayit/src/voicesetupdlg.cpp +++ b/ksayit/src/voicesetupdlg.cpp @@ -39,12 +39,12 @@ #include "fxpluginhandler.h" #include "kttsdlib.h" -VoiceSetupDlg::VoiceSetupDlg(TQWidget *parent, const char *name, const TQString &caption, +VoiceSetupDlg::VoiceSetupDlg(TQWidget *tqparent, const char *name, const TQString &caption, bool modal, KConfig *config, FXPluginHandler *fxpluginhandler, KTTSDLib *ttslib) - : KDialogBase(IconList, caption, Ok|Cancel, Ok, parent, name, modal, true), + : KDialogBase(IconList, caption, Ok|Cancel, Ok, tqparent, name, modal, true), m_config(config), m_fxpluginhandler(fxpluginhandler), m_kttslib(ttslib) @@ -88,7 +88,7 @@ void VoiceSetupDlg::initFXPage() connect( this, TQT_SIGNAL(signalReloadFX()), fxDialog, TQT_SLOT(slotReload()) ); // Disable/enable FX-Setup depending on TTS-libs capability - int status = m_kttslib->getStatus() & TTS::AUDIOFILE; + int status = m_kttslib->gettqStatus() & TTS::AUDIOFILE; if ( status ){ m_fxPage->setEnabled(true); } else { @@ -105,7 +105,7 @@ void VoiceSetupDlg::slotPageChanged(TQWidget *page) if ( page != m_fxPage ) return; - int status = m_kttslib->getStatus() & TTS::AUDIOFILE; + int status = m_kttslib->gettqStatus() & TTS::AUDIOFILE; if ( status ){ m_fxPage->setEnabled(true); } else { @@ -120,7 +120,7 @@ void VoiceSetupDlg::slotOk() { kdDebug(100200) << "+++ entering VoiceSetupDlg::slotOK()" << endl; - int status = m_kttslib->getStatus(); + int status = m_kttslib->gettqStatus(); if ( (status & TTS::AUDIOFILE) == 0 ){ emit signalRemoveAllFX(); } diff --git a/ksayit/src/voicesetupdlg.h b/ksayit/src/voicesetupdlg.h index c9063e4..10cc42e 100644 --- a/ksayit/src/voicesetupdlg.h +++ b/ksayit/src/voicesetupdlg.h @@ -33,9 +33,10 @@ class KTTSDLib; */ class VoiceSetupDlg : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - VoiceSetupDlg(TQWidget *parent=0, const char *name=0, const TQString &caption=NULL, + VoiceSetupDlg(TQWidget *tqparent=0, const char *name=0, const TQString &caption=NULL, bool modal=true, KConfig *config=0, FXPluginHandler *fxpluginhandler=0, diff --git a/kttsd/app-plugins/kate/katekttsd.cpp b/kttsd/app-plugins/kate/katekttsd.cpp index 47837fb..65017b7 100644 --- a/kttsd/app-plugins/kate/katekttsd.cpp +++ b/kttsd/app-plugins/kate/katekttsd.cpp @@ -17,7 +17,7 @@ * * ***************************************************************************/ -// Qt includes. +// TQt includes. #include #include #include @@ -38,8 +38,8 @@ K_EXPORT_COMPONENT_FACTORY( ktexteditor_kttsd, KGenericFactory( "ktexteditor_kttsd" ) ) -KateKttsdPlugin::KateKttsdPlugin( TQObject *parent, const char* name, const TQStringList& ) - : KTextEditor::Plugin ( (KTextEditor::Document*) parent, name ) +KateKttsdPlugin::KateKttsdPlugin( TQObject *tqparent, const char* name, const TQStringList& ) + : KTextEditor::Plugin ( (KTextEditor::Document*) tqparent, name ) { } @@ -80,7 +80,7 @@ KateKttsdPluginView::KateKttsdPluginView( KTextEditor::View *view, const char *n void KateKttsdPluginView::slotReadOut() { - KTextEditor::View *v = (KTextEditor::View*)parent(); + KTextEditor::View *v = (KTextEditor::View*)tqparent(); KTextEditor::SelectionInterface *si = KTextEditor::selectionInterface( v->document() ); TQString text; diff --git a/kttsd/app-plugins/kate/katekttsd.h b/kttsd/app-plugins/kate/katekttsd.h index c30f3cf..cfcc750 100644 --- a/kttsd/app-plugins/kate/katekttsd.h +++ b/kttsd/app-plugins/kate/katekttsd.h @@ -28,9 +28,10 @@ class KateKttsdPlugin : public KTextEditor::Plugin, public KTextEditor::PluginViewInterface { Q_OBJECT + TQ_OBJECT public: - KateKttsdPlugin( TQObject *parent = 0, + KateKttsdPlugin( TQObject *tqparent = 0, const char* name = 0, const TQStringList &args = TQStringList() ); virtual ~KateKttsdPlugin(); @@ -45,6 +46,7 @@ class KateKttsdPlugin : public KTextEditor::Plugin, public KTextEditor::PluginVi class KateKttsdPluginView : public TQObject, public KXMLGUIClient { Q_OBJECT + TQ_OBJECT public: KateKttsdPluginView( KTextEditor::View *view, const char *name=0 ); diff --git a/kttsd/compat/interfaces/kspeech/kspeech.h b/kttsd/compat/interfaces/kspeech/kspeech.h index d321528..39ca74c 100644 --- a/kttsd/compat/interfaces/kspeech/kspeech.h +++ b/kttsd/compat/interfaces/kspeech/kspeech.h @@ -207,8 +207,8 @@ * "kttsd", object "KSpeech". * @verbatim - MyPart::MyPart(TQWidget *parent, const char *name) : - KParts::ReadOnlyPart(parent, name), + MyPart::MyPart(TQWidget *tqparent, const char *name) : + KParts::ReadOnlyPart(tqparent, name), DCOPStub("kttsd", "KSpeech") { @endverbatim * @@ -293,8 +293,8 @@ * receiving object. * @verbatim - MyPart::MyPart(TQWidget *parent, const char *name) : - KParts::ReadOnlyPart(parent, name), + MyPart::MyPart(TQWidget *tqparent, const char *name) : + KParts::ReadOnlyPart(tqparent, name), DCOPObject("mypart_kspeechsink") { @endverbatim * @@ -441,7 +441,7 @@ * a Spanish synthesizer would likely be unintelligible). So the language * attribute is said to have "priority". * If an application does not specify a language attribute, a default one will be assumed. - * The rest of the attributes are said to be "preferred". If %KTTSD cannot find + * The rest of the attributes are said to be "preferred". If %KTTSD cannot tqfind * a talker with the exact preferred attributes requested, the closest matching * talker will likely still be understandable. * @@ -751,11 +751,11 @@ class KSpeech : virtual public DCOPObject { * with a single space, and then replaces the sentence delimiters using * the following statement: @verbatim - TQString::replace(sentenceDelimiter, "\\1\t"); + TQString::tqreplace(sentenceDelimiter, "\\1\t"); @endverbatim * * which replaces all sentence delimiters with a tab, but - * preserving the first capture text (first parenthesis). In other + * preserving the first capture text (first tqparenthesis). In other * words, the sentence punctuation is preserved. * The tab is later used to separate the text into sentences. * diff --git a/kttsd/configure.in.in b/kttsd/configure.in.in index 4adcfb1..b833cfc 100644 --- a/kttsd/configure.in.in +++ b/kttsd/configure.in.in @@ -280,16 +280,7 @@ kdeversion_save_LIBS="$LIBS" LIBS="$LIBS $X_EXTRA_LIBS" CXXFLAGS="$CXXFLAGS $all_includes" -AC_COMPILE_IFELSE([ -#include -#if ! ( KDE_IS_VERSION( 3, 4, 90 ) ) -#error KDE 3.4 -#endif -], - KTTS_ICONS_DIR="" -, - KTTS_ICONS_DIR="icons" -) +KTTS_ICONS_DIR="icons" CXXFLAGS="$kdeversion_save_CXXFLAGS" LIBS="$kdeversion_save_LIBS" diff --git a/kttsd/debian/man/kttsd.1 b/kttsd/debian/man/kttsd.1 index 379d7f0..4b8743b 100644 --- a/kttsd/debian/man/kttsd.1 +++ b/kttsd/debian/man/kttsd.1 @@ -62,8 +62,8 @@ Waits for a WM_NET compatible windowmanager .B --style