summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:20:30 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:20:30 +0000
commit28bf3cbba4139c8a0f81dc9d1a2f6c4ed724f22c (patch)
treea2f011f22aa31d0839c6e2118501b7a6d2f2ae96
parent0285229d858c8f03cde7354c679a752598cf4515 (diff)
downloadtdeaccessibility-28bf3cbb.tar.gz
tdeaccessibility-28bf3cbb.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1157633 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--kbstateapplet/kbstate.cpp148
-rw-r--r--kbstateapplet/kbstate.h86
-rw-r--r--kmag/kmag.cpp150
-rw-r--r--kmag/kmag.h12
-rw-r--r--kmag/kmagselrect.cpp158
-rw-r--r--kmag/kmagselrect.h56
-rw-r--r--kmag/kmagzoomview.cpp202
-rw-r--r--kmag/kmagzoomview.h74
-rw-r--r--kmousetool/kmousetool/kmousetool.cpp92
-rw-r--r--kmousetool/kmousetool/kmousetool.h16
-rw-r--r--kmousetool/kmousetool/main.cpp8
-rw-r--r--kmousetool/kmousetool/mtstroke.cpp6
-rw-r--r--kmouth/configwizard.cpp16
-rw-r--r--kmouth/configwizard.h4
-rw-r--r--kmouth/kmouth.cpp80
-rw-r--r--kmouth/kmouth.h6
-rw-r--r--kmouth/optionsdialog.cpp48
-rw-r--r--kmouth/optionsdialog.h8
-rw-r--r--kmouth/phrasebook/phrasebook.cpp146
-rw-r--r--kmouth/phrasebook/phrasebook.h72
-rw-r--r--kmouth/phrasebook/phrasebookdialog.cpp226
-rw-r--r--kmouth/phrasebook/phrasebookdialog.h58
-rw-r--r--kmouth/phrasebook/phrasebookparser.cpp22
-rw-r--r--kmouth/phrasebook/phrasebookparser.h24
-rw-r--r--kmouth/phrasebook/phrasetree.cpp126
-rw-r--r--kmouth/phrasebook/phrasetree.h40
-rw-r--r--kmouth/phraseedit.cpp4
-rw-r--r--kmouth/phraseedit.h4
-rw-r--r--kmouth/phraselist.cpp124
-rw-r--r--kmouth/phraselist.h32
-rw-r--r--kmouth/phraselistitem.cpp20
-rw-r--r--kmouth/phraselistitem.h10
-rw-r--r--kmouth/speech.cpp66
-rw-r--r--kmouth/speech.h14
-rw-r--r--kmouth/texttospeechconfigurationwidget.cpp26
-rw-r--r--kmouth/texttospeechconfigurationwidget.h6
-rw-r--r--kmouth/texttospeechsystem.cpp32
-rw-r--r--kmouth/texttospeechsystem.h16
-rw-r--r--kmouth/wordcompletion/creationsourcedetailsui.ui.h10
-rw-r--r--kmouth/wordcompletion/creationsourceui.ui.h4
-rw-r--r--kmouth/wordcompletion/dictionarycreationwizard.cpp132
-rw-r--r--kmouth/wordcompletion/dictionarycreationwizard.h40
-rw-r--r--kmouth/wordcompletion/kdedocsourceui.ui.h2
-rw-r--r--kmouth/wordcompletion/klanguagebutton.cpp96
-rw-r--r--kmouth/wordcompletion/klanguagebutton.h38
-rw-r--r--kmouth/wordcompletion/klanguagebuttonhelper.cpp26
-rw-r--r--kmouth/wordcompletion/klanguagebuttonhelper.h2
-rw-r--r--kmouth/wordcompletion/wordcompletion.cpp94
-rw-r--r--kmouth/wordcompletion/wordcompletion.h18
-rw-r--r--kmouth/wordcompletion/wordcompletionui.ui.h10
-rw-r--r--kmouth/wordcompletion/wordcompletionwidget.cpp120
-rw-r--r--kmouth/wordcompletion/wordcompletionwidget.h8
-rw-r--r--kmouth/wordcompletion/wordlist.cpp170
-rw-r--r--kmouth/wordcompletion/wordlist.h46
-rw-r--r--ksayit/Freeverb_plugin/freeverbsetupimpl.cpp6
-rw-r--r--ksayit/Freeverb_plugin/freeverbsetupimpl.h4
-rw-r--r--ksayit/Freeverb_plugin/ksayitfreeverblib.cpp18
-rw-r--r--ksayit/Freeverb_plugin/ksayitfreeverblib.h18
-rw-r--r--ksayit/KTTSD_Lib/kttsdlib.cpp32
-rw-r--r--ksayit/KTTSD_Lib/kttsdlib.h16
-rw-r--r--ksayit/KTTSD_Lib/kttsdlibsetupimpl.cpp12
-rw-r--r--ksayit/KTTSD_Lib/kttsdlibsetupimpl.h2
-rw-r--r--ksayit/KTTSD_Lib/kttsdlibtalker2.cpp30
-rw-r--r--ksayit/KTTSD_Lib/kttsdlibtalker2.h18
-rw-r--r--ksayit/src/DocTreeView.ui.h4
-rw-r--r--ksayit/src/Types.h22
-rw-r--r--ksayit/src/contextmenuhandler.cpp88
-rw-r--r--ksayit/src/contextmenuhandler.h46
-rw-r--r--ksayit/src/docbookclasses.cpp444
-rw-r--r--ksayit/src/docbookclasses.h136
-rw-r--r--ksayit/src/docbookgenerator.cpp120
-rw-r--r--ksayit/src/docbookgenerator.h36
-rw-r--r--ksayit/src/docbookparser.cpp132
-rw-r--r--ksayit/src/docbookparser.h30
-rw-r--r--ksayit/src/doctreeviewimpl.cpp268
-rw-r--r--ksayit/src/doctreeviewimpl.h30
-rw-r--r--ksayit/src/effectstack.cpp6
-rw-r--r--ksayit/src/fxpluginhandler.cpp46
-rw-r--r--ksayit/src/fxpluginhandler.h34
-rw-r--r--ksayit/src/fxsetupimpl.cpp20
-rw-r--r--ksayit/src/fxsetupimpl.h12
-rw-r--r--ksayit/src/ksayit.cpp196
-rw-r--r--ksayit/src/ksayit.h42
-rw-r--r--ksayit/src/ksayit_fxplugin.h10
-rw-r--r--ksayit/src/ksayit_ttsplugin.h22
-rw-r--r--ksayit/src/ksayitbookmarkhandler.cpp48
-rw-r--r--ksayit/src/ksayitbookmarkhandler.h20
-rw-r--r--ksayit/src/ksayitsystemtray.cpp58
-rw-r--r--ksayit/src/ksayitsystemtray.h40
-rw-r--r--ksayit/src/ksayitviewimpl.cpp12
-rw-r--r--ksayit/src/ksayitviewimpl.h16
-rw-r--r--ksayit/src/main.cpp2
-rw-r--r--ksayit/src/parasaxparser.cpp22
-rw-r--r--ksayit/src/parasaxparser.h18
-rw-r--r--ksayit/src/saxhandler.cpp56
-rw-r--r--ksayit/src/saxhandler.h46
-rw-r--r--ksayit/src/voicesetupdlg.cpp44
-rw-r--r--ksayit/src/voicesetupdlg.h8
-rw-r--r--kttsd/app-plugins/kate/katekttsd.cpp36
-rw-r--r--kttsd/app-plugins/kate/katekttsd.h10
-rw-r--r--kttsd/compat/interfaces/kspeech/kspeech.h102
-rw-r--r--kttsd/compat/interfaces/kspeech/kspeechsink.h22
-rw-r--r--kttsd/filters/main.cpp20
-rw-r--r--kttsd/filters/sbd/sbdconf.cpp124
-rw-r--r--kttsd/filters/sbd/sbdconf.h12
-rw-r--r--kttsd/filters/sbd/sbdproc.cpp214
-rw-r--r--kttsd/filters/sbd/sbdproc.h118
-rw-r--r--kttsd/filters/stringreplacer/stringreplacerconf.cpp282
-rw-r--r--kttsd/filters/stringreplacer/stringreplacerconf.h18
-rw-r--r--kttsd/filters/stringreplacer/stringreplacerproc.cpp60
-rw-r--r--kttsd/filters/stringreplacer/stringreplacerproc.h26
-rw-r--r--kttsd/filters/talkerchooser/talkerchooserconf.cpp84
-rw-r--r--kttsd/filters/talkerchooser/talkerchooserconf.h10
-rw-r--r--kttsd/filters/talkerchooser/talkerchooserproc.cpp16
-rw-r--r--kttsd/filters/talkerchooser/talkerchooserproc.h10
-rw-r--r--kttsd/filters/xhtml2ssml/main.cpp16
-rw-r--r--kttsd/filters/xhtml2ssml/xhtml2ssml.cpp34
-rw-r--r--kttsd/filters/xhtml2ssml/xhtml2ssml.h20
-rw-r--r--kttsd/filters/xhtml2ssml/xmlelement.cpp28
-rw-r--r--kttsd/filters/xhtml2ssml/xmlelement.h34
-rw-r--r--kttsd/filters/xmltransformer/xmltransformerconf.cpp50
-rw-r--r--kttsd/filters/xmltransformer/xmltransformerconf.h10
-rw-r--r--kttsd/filters/xmltransformer/xmltransformerproc.cpp58
-rw-r--r--kttsd/filters/xmltransformer/xmltransformerproc.h32
-rw-r--r--kttsd/kcmkttsmgr/addtalker.cpp76
-rw-r--r--kttsd/kcmkttsmgr/addtalker.h26
-rw-r--r--kttsd/kcmkttsmgr/kcmkttsmgr.cpp700
-rw-r--r--kttsd/kcmkttsmgr/kcmkttsmgr.h58
-rw-r--r--kttsd/kcmkttsmgr/selectevent.cpp54
-rw-r--r--kttsd/kcmkttsmgr/selectevent.h12
-rw-r--r--kttsd/kttsd/filtermgr.cpp74
-rw-r--r--kttsd/kttsd/filtermgr.h30
-rw-r--r--kttsd/kttsd/kttsd.cpp224
-rw-r--r--kttsd/kttsd/kttsd.h132
-rw-r--r--kttsd/kttsd/speaker.cpp156
-rw-r--r--kttsd/kttsd/speaker.h52
-rw-r--r--kttsd/kttsd/speechdata.cpp180
-rw-r--r--kttsd/kttsd/speechdata.h128
-rw-r--r--kttsd/kttsd/ssmlconvert.cpp68
-rw-r--r--kttsd/kttsd/ssmlconvert.h30
-rw-r--r--kttsd/kttsd/talkermgr.cpp72
-rw-r--r--kttsd/kttsd/talkermgr.h36
-rw-r--r--kttsd/kttsd/threadedplugin.cpp24
-rw-r--r--kttsd/kttsd/threadedplugin.h28
-rw-r--r--kttsd/kttsjobmgr/kttsjobmgr.cpp382
-rw-r--r--kttsd/kttsjobmgr/kttsjobmgr.h44
-rw-r--r--kttsd/kttsmgr/kttsmgr.cpp56
-rw-r--r--kttsd/kttsmgr/kttsmgr.h20
-rw-r--r--kttsd/libkttsd/filterconf.cpp38
-rw-r--r--kttsd/libkttsd/filterconf.h18
-rw-r--r--kttsd/libkttsd/filterproc.cpp18
-rw-r--r--kttsd/libkttsd/filterproc.h18
-rw-r--r--kttsd/libkttsd/notify.cpp62
-rw-r--r--kttsd/libkttsd/notify.h20
-rw-r--r--kttsd/libkttsd/player.h16
-rw-r--r--kttsd/libkttsd/pluginconf.cpp76
-rw-r--r--kttsd/libkttsd/pluginconf.h36
-rw-r--r--kttsd/libkttsd/pluginproc.cpp72
-rw-r--r--kttsd/libkttsd/pluginproc.h40
-rw-r--r--kttsd/libkttsd/selecttalkerdlg.cpp146
-rw-r--r--kttsd/libkttsd/selecttalkerdlg.h14
-rw-r--r--kttsd/libkttsd/stretcher.cpp14
-rw-r--r--kttsd/libkttsd/stretcher.h8
-rw-r--r--kttsd/libkttsd/talkercode.cpp112
-rw-r--r--kttsd/libkttsd/talkercode.h90
-rw-r--r--kttsd/libkttsd/testplayer.cpp28
-rw-r--r--kttsd/libkttsd/testplayer.h12
-rw-r--r--kttsd/libkttsd/utils.cpp20
-rw-r--r--kttsd/libkttsd/utils.h12
-rw-r--r--kttsd/players/akodeplayer/akodeplayer.cpp16
-rw-r--r--kttsd/players/akodeplayer/akodeplayer.h12
-rw-r--r--kttsd/players/alsaplayer/alsaplayer.cpp74
-rw-r--r--kttsd/players/alsaplayer/alsaplayer.h32
-rw-r--r--kttsd/players/artsplayer/artsplayer.cpp12
-rw-r--r--kttsd/players/artsplayer/artsplayer.h8
-rw-r--r--kttsd/players/gstplayer/gstreamerplayer.cpp22
-rw-r--r--kttsd/players/gstplayer/gstreamerplayer.h12
-rw-r--r--kttsd/plugins/command/commandconf.cpp70
-rw-r--r--kttsd/plugins/command/commandconf.h24
-rw-r--r--kttsd/plugins/command/commandproc.cpp92
-rw-r--r--kttsd/plugins/command/commandproc.h30
-rw-r--r--kttsd/plugins/epos/eposconf.cpp108
-rw-r--r--kttsd/plugins/epos/eposconf.h24
-rw-r--r--kttsd/plugins/epos/eposproc.cpp98
-rw-r--r--kttsd/plugins/epos/eposproc.h46
-rw-r--r--kttsd/plugins/festivalint/festivalintconf.cpp218
-rw-r--r--kttsd/plugins/festivalint/festivalintconf.h48
-rw-r--r--kttsd/plugins/festivalint/festivalintproc.cpp100
-rw-r--r--kttsd/plugins/festivalint/festivalintproc.h50
-rw-r--r--kttsd/plugins/flite/fliteconf.cpp52
-rw-r--r--kttsd/plugins/flite/fliteconf.h20
-rw-r--r--kttsd/plugins/flite/fliteproc.cpp50
-rw-r--r--kttsd/plugins/flite/fliteproc.h24
-rw-r--r--kttsd/plugins/freetts/freettsconf.cpp72
-rw-r--r--kttsd/plugins/freetts/freettsconf.h24
-rw-r--r--kttsd/plugins/freetts/freettsproc.cpp60
-rw-r--r--kttsd/plugins/freetts/freettsproc.h24
-rw-r--r--kttsd/plugins/hadifix/hadifixconf.cpp128
-rw-r--r--kttsd/plugins/hadifix/hadifixconf.h16
-rw-r--r--kttsd/plugins/hadifix/hadifixconfigui.ui.h14
-rw-r--r--kttsd/plugins/hadifix/hadifixproc.cpp94
-rw-r--r--kttsd/plugins/hadifix/hadifixproc.h32
-rw-r--r--kttsd/plugins/hadifix/initialconfig.h86
-rw-r--r--kttsd/plugins/hadifix/voicefileui.ui.h2
204 files changed, 6058 insertions, 6058 deletions
diff --git a/kbstateapplet/kbstate.cpp b/kbstateapplet/kbstate.cpp
index 05ee26a..09f6846 100644
--- a/kbstateapplet/kbstate.cpp
+++ b/kbstateapplet/kbstate.cpp
@@ -15,12 +15,12 @@
* along with this program; if not, write to the Free Software
*/
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qdrawutil.h>
-#include <qcursor.h>
-#include <qimage.h>
-#include <qpopupmenu.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqdrawutil.h>
+#include <tqcursor.h>
+#include <tqimage.h>
+#include <tqpopupmenu.h>
#include <kaboutapplication.h>
#include <kpopupmenu.h>
@@ -50,7 +50,7 @@ extern "C"
#include <X11/keysymdef.h>
#include <X11/extensions/XKB.h>
- KDE_EXPORT KPanelApplet* init(QWidget *parent, const QString& configFile)
+ KDE_EXPORT KPanelApplet* init(TQWidget *parent, const TQString& configFile)
{
KGlobal::locale()->insertCatalogue("kbstateapplet");
KbStateApplet *applet = new KbStateApplet(configFile, KPanelApplet::Normal, KPanelApplet::About, parent, "kbstateapplet");
@@ -85,8 +85,8 @@ static ModifierKey modifierKeys[] = {
/********************************************************************/
-KbStateApplet::KbStateApplet(const QString& configFile, Type t, int actions,
- QWidget *parent, const char *name)
+KbStateApplet::KbStateApplet(const TQString& configFile, Type t, int actions,
+ TQWidget *parent, const char *name)
: KPanelApplet( configFile, t, actions, parent, name )
{
for (int i = 0; i < 8; i++) {
@@ -113,7 +113,7 @@ KbStateApplet::KbStateApplet(const QString& configFile, Type t, int actions,
accessxFeatures = 0;
//startTimer(100); // ten times a second
- connect(kapp, SIGNAL(kdisplayPaletteChanged()), SLOT(paletteChanged()));
+ connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), TQT_SLOT(paletteChanged()));
kapp->installX11EventFilter (this);
int opcode_rtn, error_rtn;
@@ -139,27 +139,27 @@ void KbStateApplet::buildPopupMenu()
sizePopup->insertItem(i18n("Small"), 13);
sizePopup->insertItem(i18n("Medium"), 20);
sizePopup->insertItem(i18n("Large"), 26);
- connect(sizePopup,SIGNAL(activated(int)), this, SLOT(setIconDim(int)));
+ connect(sizePopup,TQT_SIGNAL(activated(int)), this, TQT_SLOT(setIconDim(int)));
showPopup=new KPopupMenu(this);
showPopup->setCheckable( true );
- modifierItem=showPopup->insertItem(i18n("Modifier Keys"), this, SLOT(toggleModifier()));
- lockkeysItem=showPopup->insertItem(i18n("Lock Keys"), this, SLOT(toggleLockkeys()));
- mouseItem=showPopup->insertItem(i18n("Mouse Status"), this, SLOT(toggleMouse()));
- accessxItem=showPopup->insertItem(i18n("AccessX Status"), this, SLOT(toggleAccessX()));
+ 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()));
popup = new KPopupMenu(this);
popup->setCheckable( true );
popup->insertTitle(0, i18n("Keyboard Status Applet"));
popup->insertItem(i18n("Set Icon Size"),sizePopup);
fillSpaceItem = popup->insertItem(i18n("Fill Available Space"),
- this, SLOT(toggleFillSpace()));
+ this, TQT_SLOT(toggleFillSpace()));
popup->insertItem(i18n("Show"),showPopup);
- popup->insertItem(i18n("Configure AccessX Features..."), this, SLOT(configureAccessX()));
- popup->insertItem(i18n("Configure Keyboard..."), this, SLOT(configureKeyboard()));
- popup->insertItem(i18n("Configure Mouse..."), this, SLOT(configureMouse()));
+ popup->insertItem(i18n("Configure AccessX Features..."), this, TQT_SLOT(configureAccessX()));
+ popup->insertItem(i18n("Configure Keyboard..."), this, TQT_SLOT(configureKeyboard()));
+ popup->insertItem(i18n("Configure Mouse..."), this, TQT_SLOT(configureMouse()));
popup->insertSeparator();
- popup->insertItem(i18n("About"), this, SLOT(about()));
+ popup->insertItem(i18n("About"), this, TQT_SLOT(about()));
setCustomMenu(popup);
updateMenu();
}
@@ -263,7 +263,7 @@ int KbStateApplet::heightForWidth(int w) const {
return length*size;
}
-void KbStateApplet::mousePressEvent(QMouseEvent *e) {
+void KbStateApplet::mousePressEvent(TQMouseEvent *e) {
if (e->button() == RightButton)
popup->popup(e->globalPos());
}
@@ -286,8 +286,8 @@ void KbStateApplet::toggleFillSpace() {
emit updateLayout();
}
-void KbStateApplet::resizeEvent( QResizeEvent*e ) {
- QWidget::resizeEvent(e);
+void KbStateApplet::resizeEvent( TQResizeEvent*e ) {
+ TQWidget::resizeEvent(e);
layout();
}
@@ -546,9 +546,9 @@ void KbStateApplet::initMasks() {
}
if ((map <= 7) && !(icons[map])) {
icons[map] = new KeyIcon (i, instance, this, modifierKeys[i].name);
- QToolTip::add (icons[map], i18n (modifierKeys[i].name));
- connect (icons[map], SIGNAL(stateChangeRequest (KeyIcon*,bool,bool)),
- SLOT(stateChangeRequest (KeyIcon*,bool,bool)));
+ TQToolTip::add (icons[map], i18n (modifierKeys[i].name));
+ connect (icons[map], TQT_SIGNAL(stateChangeRequest (KeyIcon*,bool,bool)),
+ TQT_SLOT(stateChangeRequest (KeyIcon*,bool,bool)));
if (modifierKeys[i].isModifier)
modifiers.append(icons[map]);
else
@@ -623,7 +623,7 @@ bool KbStateApplet::x11Event (XEvent *evt) {
return false;
}
-void KbStateApplet::timerEvent(QTimerEvent*) {
+void KbStateApplet::timerEvent(TQTimerEvent*) {
XkbStateRec state_return;
XkbGetState (this->x11Display(), XkbUseCoreKbd, &state_return);
unsigned char latched = XkbStateMods (&state_return);
@@ -747,7 +747,7 @@ void KbStateApplet::saveConfig()
/********************************************************************/
KeyIcon::KeyIcon (int keyId, KInstance *instance,
- QWidget *parent, const char *name)
+ TQWidget *parent, const char *name)
: StatusIcon (modifierKeys[keyId].name, parent, name) {
this->instance = instance;
this->keyId = keyId;
@@ -755,7 +755,7 @@ KeyIcon::KeyIcon (int keyId, KInstance *instance,
isLocked = false;
isLatched = false;
updateImages ();
- connect (this, SIGNAL(clicked()), SLOT(clickedSlot()));
+ connect (this, TQT_SIGNAL(clicked()), TQT_SLOT(clickedSlot()));
}
KeyIcon::~KeyIcon () {
@@ -777,9 +777,9 @@ void KeyIcon::clickedSlot () {
}
-void KeyIcon::resizeEvent( QResizeEvent*e )
+void KeyIcon::resizeEvent( TQResizeEvent*e )
{
- QWidget::resizeEvent(e);
+ TQWidget::resizeEvent(e);
updateImages();
}
@@ -791,7 +791,7 @@ void KeyIcon::updateImages () {
latched = instance->iconLoader()->loadIcon(modifierKeys[keyId].icon, KIcon::NoGroup, size-4);
unlatched = instance->iconLoader()->loadIcon(modifierKeys[keyId].icon, KIcon::NoGroup, size-4);
- QImage img = latched.convertToImage();
+ TQImage img = latched.convertToImage();
KIconEffect::colorize(img, KGlobalSettings::highlightedTextColor(), 1.0);
latched.convertFromImage (img);
@@ -803,8 +803,8 @@ void KeyIcon::updateImages () {
update();
}
-void KeyIcon::drawButton (QPainter *p) {
- QColor black;
+void KeyIcon::drawButton (TQPainter *p) {
+ TQColor black;
int x = (width()-locked.width())/2;
int y = (height()-locked.height())/2;
@@ -824,12 +824,12 @@ void KeyIcon::drawButton (QPainter *p) {
black = KGlobalSettings::textColor();
}
- QString text = i18n(modifierKeys[keyId].text);
+ TQString text = i18n(modifierKeys[keyId].text);
if (!text.isEmpty() && !text.isNull()) {
- QFont font = KGlobalSettings::generalFont();
- font.setWeight(QFont::Black);
- QFontMetrics metrics(font);
- QRect rect = metrics.boundingRect (text);
+ TQFont font = KGlobalSettings::generalFont();
+ font.setWeight(TQFont::Black);
+ TQFontMetrics metrics(font);
+ TQRect rect = metrics.boundingRect (text);
int size;
if (!strcmp(modifierKeys[keyId].name, "Alt Graph"))
size = rect.width()>rect.height()?rect.width():rect.height();
@@ -855,14 +855,14 @@ void KeyIcon::drawButton (QPainter *p) {
/********************************************************************/
-MouseIcon::MouseIcon (KInstance *instance, QWidget *parent, const char *name)
+MouseIcon::MouseIcon (KInstance *instance, TQWidget *parent, const char *name)
: StatusIcon ("", parent, name)
{
this->instance = instance;
state = 0;
activekey = 0;
updateImages ();
- connect (this, SIGNAL(clicked()), SLOT(clickedSlot()));
+ connect (this, TQT_SIGNAL(clicked()), TQT_SLOT(clickedSlot()));
}
MouseIcon::~MouseIcon () {
@@ -880,17 +880,17 @@ void MouseIcon::setActiveKey (int activekey) {
update();
}
-void MouseIcon::resizeEvent( QResizeEvent*e )
+void MouseIcon::resizeEvent( TQResizeEvent*e )
{
- QWidget::resizeEvent(e);
+ TQWidget::resizeEvent(e);
updateImages();
}
-QPixmap loadIcon(KInstance *instance, int size, QColor color, QString name) {
+TQPixmap loadIcon(KInstance *instance, int size, TQColor color, TQString name) {
KIconLoader *loader = instance->iconLoader();
- QPixmap result = loader->loadIcon(name, KIcon::NoGroup, size);
+ TQPixmap result = loader->loadIcon(name, KIcon::NoGroup, size);
- QImage img = result.convertToImage();
+ TQImage img = result.convertToImage();
KIconEffect::colorize(img, color, 1.0);
result.convertFromImage (img);
@@ -900,8 +900,8 @@ QPixmap loadIcon(KInstance *instance, int size, QColor color, QString name) {
void MouseIcon::updateImages () {
int size = width()<height() ? width() : height();
- QColor textcolor = KGlobalSettings::textColor();
- QColor basecolor = KGlobalSettings::baseColor();
+ TQColor textcolor = KGlobalSettings::textColor();
+ TQColor basecolor = KGlobalSettings::baseColor();
mouse = loadIcon (instance, size, textcolor, "kbstate_mouse");
leftSelected = loadIcon (instance, size, textcolor,
"kbstate_mouse_left_selected");
@@ -922,7 +922,7 @@ void MouseIcon::updateImages () {
update();
}
-void MouseIcon::drawButton (QPainter *p) {
+void MouseIcon::drawButton (TQPainter *p) {
p->drawPixmap(0,0, mouse);
if ((state & Button1Mask) != 0)
p->drawPixmap(0,0, leftSelected);
@@ -956,15 +956,15 @@ void MouseIcon::drawButton (QPainter *p) {
/********************************************************************/
-TimeoutIcon::TimeoutIcon (KInstance *instance, const QString &text,
- const QString &featurename,
- QWidget *parent, const char *name)
+TimeoutIcon::TimeoutIcon (KInstance *instance, const TQString &text,
+ const TQString &featurename,
+ TQWidget *parent, const char *name)
: StatusIcon (text, parent, name) {
this->instance = instance;
this->featurename = featurename;
glyth = " ";
setImage (featurename);
- connect (&timer, SIGNAL(timeout()), this, SLOT(timeout()));
+ connect (&timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout()));
}
TimeoutIcon::~TimeoutIcon () {
@@ -975,19 +975,19 @@ void TimeoutIcon::update () {
if (pixmap.width() != size)
pixmap = instance->iconLoader()->loadIcon(iconname, KIcon::NoGroup, size);
- QImage img = pixmap.convertToImage();
+ TQImage img = pixmap.convertToImage();
KIconEffect::colorize(img, KGlobalSettings::textColor(), 1.0);
pixmap.convertFromImage (img);
image = pixmap;
- QWidget::update();
+ TQWidget::update();
}
-void TimeoutIcon::setGlyth (const QString &glyth) {
+void TimeoutIcon::setGlyth (const TQString &glyth) {
timer.stop();
this->glyth = glyth;
- QImage img = pixmap.convertToImage();
+ TQImage img = pixmap.convertToImage();
KIconEffect::colorize(img, KGlobalSettings::textColor(), 1.0);
pixmap.convertFromImage (img);
@@ -995,14 +995,14 @@ void TimeoutIcon::setGlyth (const QString &glyth) {
update();
}
-void TimeoutIcon::setImage (const QString &name, int timeout) {
+void TimeoutIcon::setImage (const TQString &name, int timeout) {
timer.stop();
iconname = name;
if (!name.isNull() && !name.isEmpty()) {
int size = width()<height() ? width() : height();
pixmap = instance->iconLoader()->loadIcon(iconname, KIcon::NoGroup, size);
- QImage img = pixmap.convertToImage();
+ TQImage img = pixmap.convertToImage();
KIconEffect::colorize(img, KGlobalSettings::textColor(), 1.0);
pixmap.convertFromImage (img);
@@ -1019,8 +1019,8 @@ void TimeoutIcon::timeout () {
}
-void TimeoutIcon::drawButton (QPainter *p) {
- QString text = glyth;
+void TimeoutIcon::drawButton (TQPainter *p) {
+ TQString text = glyth;
int count = 1;
int factor = 19;
@@ -1032,10 +1032,10 @@ void TimeoutIcon::drawButton (QPainter *p) {
factor = 64;
}
- QFont font = KGlobalSettings::generalFont();
- font.setWeight(QFont::Black);
- QFontMetrics metrics(font);
- QRect rect = metrics.boundingRect (text);
+ TQFont font = KGlobalSettings::generalFont();
+ font.setWeight(TQFont::Black);
+ TQFontMetrics metrics(font);
+ TQRect rect = metrics.boundingRect (text);
int size = count*rect.width() > rect.height()
? count*rect.width() : rect.height();
if (font.pixelSize() != -1)
@@ -1049,13 +1049,13 @@ void TimeoutIcon::drawButton (QPainter *p) {
p->drawText (0,0, width()/2, height()/2, Qt::AlignCenter, text);
}
else {
- QColor t = KGlobalSettings::textColor();
- QColor b = KGlobalSettings::baseColor();
- p->setPen (QColor ((2*t.red()+3*b.red())/5,
+ TQColor t = KGlobalSettings::textColor();
+ TQColor b = KGlobalSettings::baseColor();
+ 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->setPen (QColor ((2*t.red()+b.red())/3,
+ 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);
@@ -1066,14 +1066,14 @@ void TimeoutIcon::drawButton (QPainter *p) {
/********************************************************************/
-StatusIcon::StatusIcon (const QString &text, QWidget *parent, const char *name)
- : QPushButton (text, parent, name) {
- setSizePolicy(QSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored));
+StatusIcon::StatusIcon (const TQString &text, TQWidget *parent, const char *name)
+ : TQPushButton (text, parent, name) {
+ setSizePolicy(TQSizePolicy(TQSizePolicy::Ignored, TQSizePolicy::Ignored));
}
StatusIcon::~StatusIcon () {
}
-QSize StatusIcon::minimumSizeHint () const {
- return QSize (0,0);
+TQSize StatusIcon::minimumSizeHint () const {
+ return TQSize (0,0);
}
diff --git a/kbstateapplet/kbstate.h b/kbstateapplet/kbstate.h
index edcd3dc..5cf74ca 100644
--- a/kbstateapplet/kbstate.h
+++ b/kbstateapplet/kbstate.h
@@ -19,9 +19,9 @@
#define __kbstate_h__
#include <kpanelapplet.h>
-#include <qpushbutton.h>
-#include <qptrlist.h>
-#include <qtimer.h>
+#include <tqpushbutton.h>
+#include <tqptrlist.h>
+#include <tqtimer.h>
extern "C"
{
@@ -33,37 +33,37 @@ class QLabel;
class QGridLayout;
class KPopupMenu;
-class StatusIcon : public QPushButton {
+class StatusIcon : public TQPushButton {
Q_OBJECT
public:
- StatusIcon (const QString &text, QWidget *parent, const char *name=0);
+ StatusIcon (const TQString &text, TQWidget *parent, const char *name=0);
~StatusIcon ();
- QSize minimumSizeHint () const;
+ TQSize minimumSizeHint () const;
};
-typedef QPtrList<StatusIcon> IconList;
+typedef TQPtrList<StatusIcon> IconList;
class TimeoutIcon : public StatusIcon {
Q_OBJECT
public:
- TimeoutIcon (KInstance *instance, const QString &text,
- const QString &featurename,
- QWidget *parent, const char *name=0);
+ TimeoutIcon (KInstance *instance, const TQString &text,
+ const TQString &featurename,
+ TQWidget *parent, const char *name=0);
~TimeoutIcon ();
void update ();
- void setGlyth (const QString &glyth);
- void setImage (const QString &name, int timeout = 0);
+ void setGlyth (const TQString &glyth);
+ void setImage (const TQString &name, int timeout = 0);
- void drawButton (QPainter *p);
+ void drawButton (TQPainter *p);
private:
- QString glyth;
- QString iconname;
- QString featurename;
- QPixmap pixmap;
- QPixmap image;
- QTimer timer;
+ TQString glyth;
+ TQString iconname;
+ TQString featurename;
+ TQPixmap pixmap;
+ TQPixmap image;
+ TQTimer timer;
KInstance *instance;
private slots:
@@ -74,25 +74,25 @@ class KeyIcon : public StatusIcon {
Q_OBJECT
public:
KeyIcon (int keyId, KInstance *instance,
- QWidget *parent, const char *name=0);
+ TQWidget *parent, const char *name=0);
~KeyIcon ();
void setState (bool latched, bool locked);
- void drawButton (QPainter *p);
+ void drawButton (TQPainter *p);
void updateImages ();
signals:
void stateChangeRequest (KeyIcon *source, bool latched, bool locked);
protected:
- void resizeEvent(QResizeEvent*);
+ void resizeEvent(TQResizeEvent*);
private slots:
void clickedSlot();
private:
- QPixmap locked;
- QPixmap latched;
- QPixmap unlatched;
+ TQPixmap locked;
+ TQPixmap latched;
+ TQPixmap unlatched;
bool isLatched;
bool isLocked;
bool tristate;
@@ -103,27 +103,27 @@ private:
class MouseIcon : public StatusIcon {
Q_OBJECT
public:
- MouseIcon (KInstance *instance, QWidget *parent, const char *name=0);
+ MouseIcon (KInstance *instance, TQWidget *parent, const char *name=0);
~MouseIcon ();
void setState (int state);
void setActiveKey (int activekey);
- void drawButton (QPainter *p);
+ void drawButton (TQPainter *p);
void updateImages ();
protected:
- void resizeEvent(QResizeEvent*);
+ void resizeEvent(TQResizeEvent*);
private:
- QPixmap mouse;
- QPixmap leftSelected;
- QPixmap middleSelected;
- QPixmap rightSelected;
- QPixmap leftDot;
- QPixmap middleDot;
- QPixmap rightDot;
- QPixmap leftDotSelected;
- QPixmap middleDotSelected;
- QPixmap rightDotSelected;
+ TQPixmap mouse;
+ TQPixmap leftSelected;
+ TQPixmap middleSelected;
+ TQPixmap rightSelected;
+ TQPixmap leftDot;
+ TQPixmap middleDot;
+ TQPixmap rightDot;
+ TQPixmap leftDotSelected;
+ TQPixmap middleDotSelected;
+ TQPixmap rightDotSelected;
int state, activekey;
KInstance *instance;
};
@@ -132,17 +132,17 @@ class KbStateApplet : public KPanelApplet {
Q_OBJECT
public:
- KbStateApplet(const QString& configFile, Type t = Normal, int actions = 0,
- QWidget *parent = 0, const char *name = 0);
+ KbStateApplet(const TQString& configFile, Type t = Normal, int actions = 0,
+ TQWidget *parent = 0, const char *name = 0);
~KbStateApplet();
int widthForHeight(int height) const;
int heightForWidth(int width) const;
protected:
- void mousePressEvent(QMouseEvent *e);
- void timerEvent(QTimerEvent*);
- void resizeEvent(QResizeEvent*);
+ void mousePressEvent(TQMouseEvent *e);
+ void timerEvent(TQTimerEvent*);
+ void resizeEvent(TQResizeEvent*);
bool x11Event (XEvent *);
public slots:
diff --git a/kmag/kmag.cpp b/kmag/kmag.cpp
index f385c13..12d660c 100644
--- a/kmag/kmag.cpp
+++ b/kmag/kmag.cpp
@@ -18,15 +18,15 @@
***************************************************************************/
// include files for QT
-#include <qdir.h>
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qclipboard.h>
-#include <qdragobject.h>
-#include <qwhatsthis.h>
-#include <qtooltip.h>
-#include <qpopupmenu.h>
+#include <tqdir.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqclipboard.h>
+#include <tqdragobject.h>
+#include <tqwhatsthis.h>
+#include <tqtooltip.h>
+#include <tqpopupmenu.h>
#include <kdeversion.h>
@@ -57,7 +57,7 @@
#include <kwin.h>
#if KDE_VERSION < 220
-#include <qprinter.h>
+#include <tqprinter.h>
#else
#include <kprinter.h>
#endif
@@ -74,7 +74,7 @@
#endif
#endif
-KmagApp::KmagApp(QWidget* , const char* name)
+KmagApp::KmagApp(TQWidget* , const char* name)
: KMainWindow(0, name, WStyle_MinMax | WType_TopLevel | WStyle_StaysOnTop | WDestructiveClose | WStyle_ContextHelp),
m_defaultMouseCursorType(2)
{
@@ -127,91 +127,91 @@ KmagApp::~KmagApp()
void KmagApp::initActions()
{
fileNewWindow = new KAction(i18n("New &Window"), "window_new", KStdAccel::openNew(), this,
- SLOT(slotFileNewWindow()), actionCollection(),"new_window");
+ TQT_SLOT(slotFileNewWindow()), actionCollection(),"new_window");
fileNewWindow->setToolTip(i18n("Open a new KMagnifier window"));
refreshSwitch = new KAction(i18n("&Stop"), "stop", KStdAccel::reload(), this,
- SLOT(slotToggleRefresh()), actionCollection(), "start_stop_refresh");
+ TQT_SLOT(slotToggleRefresh()), actionCollection(), "start_stop_refresh");
refreshSwitch->setToolTip(i18n("Click to stop window refresh"));
refreshSwitch->setWhatsThis(i18n("Clicking on this icon will <b>start</b> / <b>stop</b>\
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,
- SLOT(saveZoomPixmap()), actionCollection(),"snapshot");
+ 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, SLOT(slotFilePrint()), actionCollection(), "print");
+ m_pPrint = KStdAction::print(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, SLOT(slotFileQuit()), actionCollection(), "quit");
+ m_pQuit = KStdAction::quit(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, SLOT(copyToClipBoard()), actionCollection(), "copy");
+ m_pCopy = KStdAction::copy(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,
- SLOT(slotShowMenu()), actionCollection(),"show_menu");
+ 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,
- SLOT(slotShowMainToolBar()), actionCollection(),"show_mainToolBar");
+ 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,
- SLOT(slotShowViewToolBar()), actionCollection(),"show_viewToolBar");
+ 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,
- SLOT(slotShowSettingsToolBar()), actionCollection(),"show_settingsToolBar");
+ 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,
- SLOT(slotModeFollowMouse()), actionCollection(), "mode_followmouse");
+ 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,
- SLOT(slotModeSelWin()), actionCollection(), "mode_selectionwindow");
+ 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,
- SLOT(slotModeEdgeTop()), actionCollection(),"mode_edgetop");
+ 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,
- SLOT(slotModeEdgeLeft()), actionCollection(),"mode_edgeleft");
+ 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,
- SLOT(slotModeEdgeRight()), actionCollection(),"mode_edgeright");
+ 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,
- SLOT(slotModeEdgeBottom()), actionCollection(),"mode_edgebottom");
+ 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,
- SLOT(slotToggleHideCursor()), actionCollection(), "hidecursor");
+ 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, SLOT(zoomIn()), actionCollection(), "zoom_in");
+ m_pZoomIn = KStdAction::zoomIn(this, TQT_SLOT(zoomIn()), actionCollection(), "zoom_in");
m_pZoomIn->setWhatsThis(i18n("Click on this button to <b>zoom-in</b> on the selected region."));
m_pZoomBox = new KSelectAction(i18n("&Zoom"),0,actionCollection(),"zoom");
@@ -219,11 +219,11 @@ void KmagApp::initActions()
m_pZoomBox->setWhatsThis(i18n("Select the zoom factor."));
m_pZoomBox->setToolTip(i18n("Zoom factor"));
- m_pZoomOut = KStdAction::zoomOut(this, SLOT(zoomOut()), actionCollection(), "zoom_out");
+ m_pZoomOut = KStdAction::zoomOut(this, TQT_SLOT(zoomOut()), actionCollection(), "zoom_out");
m_pZoomOut->setWhatsThis(i18n("Click on this button to <b>zoom-out</b> on the selected region."));
m_pInvert = new KToggleAction(i18n("&Invert Colors"), 0, Key_F6, this,
- SLOT(slotToggleInvert()), actionCollection(), "invert");
+ TQT_SLOT(slotToggleInvert()), actionCollection(), "invert");
m_pRotationBox = new KSelectAction(i18n("&Rotation"),0,actionCollection(),"rotation");
m_pRotationBox->setItems(rotationArrayString);
@@ -232,8 +232,8 @@ void KmagApp::initActions()
// KHelpMenu *newHelpMenu = new KHelpMenu(this, KGlobal::instance()->aboutData());
- m_keyConf = KStdAction::keyBindings( this, SLOT( slotConfKeys() ), actionCollection(), "key_conf");
- m_toolConf = KStdAction::configureToolbars( this, SLOT( slotEditToolbars() ),
+ m_keyConf = KStdAction::keyBindings( this, TQT_SLOT( slotConfKeys() ), actionCollection(), "key_conf");
+ m_toolConf = KStdAction::configureToolbars( this, TQT_SLOT( slotEditToolbars() ),
actionCollection(), "toolbar_conf");
m_pFPSBox = new KSelectAction(i18n("Re&fresh"),0,actionCollection(),"fps_selector");
@@ -247,9 +247,9 @@ void KmagApp::initActions()
void KmagApp::initView()
{
m_zoomView = new KMagZoomView( this, "ZoomView" );
- m_zoomView->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)7, (QSizePolicy::SizeType)7, m_zoomView->sizePolicy().hasHeightForWidth() ) );
- m_zoomView->setFrameShape( QFrame::StyledPanel );
- m_zoomView->setFrameShadow( QFrame::Raised );
+ m_zoomView->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)7, (TQSizePolicy::SizeType)7, m_zoomView->sizePolicy().hasHeightForWidth() ) );
+ m_zoomView->setFrameShape( TQFrame::StyledPanel );
+ m_zoomView->setFrameShadow( TQFrame::Raised );
setCentralWidget(m_zoomView);
}
@@ -260,21 +260,21 @@ void KmagApp::initView()
void KmagApp::initConnections()
{
// change in zoom value -> update the view
- connect(this, SIGNAL(updateZoomValue(float)), m_zoomView, SLOT(setZoom(float)));
- connect(this, SIGNAL(updateRotationValue(int)), m_zoomView, SLOT(setRotation(int)));
- connect(this, SIGNAL(updateFPSValue(float)), m_zoomView, SLOT(setRefreshRate(float)));
+ connect(this, TQT_SIGNAL(updateZoomValue(float)), m_zoomView, TQT_SLOT(setZoom(float)));
+ connect(this, TQT_SIGNAL(updateRotationValue(int)), m_zoomView, TQT_SLOT(setRotation(int)));
+ connect(this, TQT_SIGNAL(updateFPSValue(float)), m_zoomView, TQT_SLOT(setRefreshRate(float)));
// change in zoom index -> update the selector
- connect(this, SIGNAL(updateZoomIndex(int)), m_pZoomBox, SLOT(setCurrentItem(int)));
- connect(this, SIGNAL(updateRotationIndex(int)), m_pRotationBox, SLOT(setCurrentItem(int)));
- connect(this, SIGNAL(updateFPSIndex(int)), m_pFPSBox, SLOT(setCurrentItem(int)));
+ connect(this, TQT_SIGNAL(updateZoomIndex(int)), m_pZoomBox, TQT_SLOT(setCurrentItem(int)));
+ connect(this, TQT_SIGNAL(updateRotationIndex(int)), m_pRotationBox, TQT_SLOT(setCurrentItem(int)));
+ connect(this, TQT_SIGNAL(updateFPSIndex(int)), m_pFPSBox, TQT_SLOT(setCurrentItem(int)));
// selector selects a zoom index -> set the zoom index
- connect(m_pZoomBox, SIGNAL(activated(int)), this, SLOT(setZoomIndex(int)));
- connect(m_pRotationBox, SIGNAL(activated(int)), this, SLOT(setRotationIndex(int)));
- connect(m_pFPSBox, SIGNAL(activated(int)), this, SLOT(setFPSIndex(int)));
+ 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_zoomView, SIGNAL(contextMenu(QPoint)), this, SLOT(contextMenu(QPoint)));
+ connect(m_zoomView, TQT_SIGNAL(contextMenu(TQPoint)), this, TQT_SLOT(contextMenu(TQPoint)));
}
/**
@@ -322,9 +322,9 @@ void KmagApp::saveOptions()
*/
void KmagApp::readOptions()
{
- QColor blue (0,0,128);
- QColor yellow (255,255,0);
- QColor white (255,255,255);
+ TQColor blue (0,0,128);
+ TQColor yellow (255,255,0);
+ TQColor white (255,255,255);
config->setGroup ("WM");
setTitleColors (
@@ -334,8 +334,8 @@ void KmagApp::readOptions()
config->setGroup("General Options");
- QSize defSize(460,390);
- QSize size=config->readSizeEntry("Geometry", &defSize);
+ TQSize defSize(460,390);
+ TQSize size=config->readSizeEntry("Geometry", &defSize);
if(!size.isEmpty())
{
resize(size);
@@ -357,7 +357,7 @@ void KmagApp::readOptions()
setFPSIndex(fpsIndex);
emit updateFPSIndex(m_fpsIndex);
- QRect defaultRect(0,0,211,164);
+ TQRect defaultRect(0,0,211,164);
m_zoomView->setSelRectPos(config->readRectEntry("SelRect", &defaultRect));
m_mouseCursorType = config->readUnsignedNumEntry("ShowMouse", m_defaultMouseCursorType);
@@ -391,7 +391,7 @@ void KmagApp::readOptions()
config->setGroup("General Options");
edgesize = config->readNumEntry("EdgeSize", 0);
- QString mode = config->readEntry("Mode", "followmouse");
+ TQString mode = config->readEntry("Mode", "followmouse");
if (mode == "selectionwindow")
slotModeSelWin();
else if (mode == "edgetop")
@@ -419,7 +419,7 @@ bool KmagApp::queryExit()
/////////////////////////////////////////////////////////////////////
-// SLOT IMPLEMENTATION
+// TQT_SLOT IMPLEMENTATION
/////////////////////////////////////////////////////////////////////
/**
@@ -555,7 +555,7 @@ void KmagApp::saveZoomPixmap()
toggled = true;
}
- KURL url = KFileDialog::getSaveURL(QString::null,
+ KURL url = KFileDialog::getSaveURL(TQString::null,
KImageIO::pattern(KImageIO::Writing),
0,i18n("Save Snapshot As"));
@@ -636,7 +636,7 @@ void KmagApp::slotModeEdgeTop()
int newedgesize; bool ok;
newedgesize = KInputDialog::getInteger (i18n ("Magnify to Screen Edge - Select Size"),
i18n ("Size:"), edgesize > 0 ? edgesize : 300, 200,
- QApplication::desktop()->screenGeometry( this ).height()/2,
+ TQApplication::desktop()->screenGeometry( this ).height()/2,
25, 10, &ok, 0, "getedgesize");
if (ok) {
@@ -652,7 +652,7 @@ void KmagApp::slotModeEdgeLeft()
int newedgesize; bool ok;
newedgesize = KInputDialog::getInteger (i18n ("Magnify to Left Screen Edge - Select Size"),
i18n ("Size:"), edgesize > 0 ? edgesize : 300, 200,
- QApplication::desktop()->screenGeometry( this ).width()/2,
+ TQApplication::desktop()->screenGeometry( this ).width()/2,
25, 10, &ok, 0, "getedgesize");
if (ok) {
@@ -668,7 +668,7 @@ void KmagApp::slotModeEdgeRight()
int newedgesize; bool ok;
newedgesize = KInputDialog::getInteger (i18n ("Magnify to Right Screen Edge - Select Size"),
i18n ("Size:"), edgesize > 0 ? edgesize : 300, 200,
- QApplication::desktop()->screenGeometry( this ).width()/2,
+ TQApplication::desktop()->screenGeometry( this ).width()/2,
25, 10, &ok, 0, "getedgesize");
if (ok) {
@@ -684,7 +684,7 @@ void KmagApp::slotModeEdgeBottom()
int newedgesize; bool ok;
newedgesize = KInputDialog::getInteger (i18n ("Magnify to Bottom Screen Edge - Select Size"),
i18n ("Size:"), edgesize > 0 ? edgesize : 300, 200,
- QApplication::desktop()->screenGeometry( this ).height()/2,
+ TQApplication::desktop()->screenGeometry( this ).height()/2,
25, 10, &ok, 0, "getedgesize");
if (ok) {
@@ -697,11 +697,11 @@ void KmagApp::slotModeEdgeBottom()
void KmagApp::setEdgeMode (KToggleAction *mode)
{
if (m_modeEdgeLeft || mode == m_modeEdgeRight) {
- if (edgesize < 200 || edgesize > QApplication::desktop()->screenGeometry( this ).width()/2)
- edgesize = QApplication::desktop()->screenGeometry( this ).width()/4;
+ if (edgesize < 200 || edgesize > TQApplication::desktop()->screenGeometry( this ).width()/2)
+ edgesize = TQApplication::desktop()->screenGeometry( this ).width()/4;
} else {
- if (edgesize < 200 || edgesize > QApplication::desktop()->screenGeometry( this ).height()/2)
- edgesize = QApplication::desktop()->screenGeometry( this ).height()/4;
+ if (edgesize < 200 || edgesize > TQApplication::desktop()->screenGeometry( this ).height()/2)
+ edgesize = TQApplication::desktop()->screenGeometry( this ).height()/4;
}
m_modeFollowMouse->setChecked(false);
@@ -716,7 +716,7 @@ void KmagApp::setEdgeMode (KToggleAction *mode)
m_zoomView->followMouse(true);
m_zoomView->showSelRect(false);
- m_zoomView->reparent (0, QPoint(), false);
+ m_zoomView->reparent (0, TQPoint(), false);
KWin::setType(m_zoomView->winId(), NET::Dock);
KWin::setState(m_zoomView->winId(), NET::Sticky | NET::KeepBelow | NET::SkipTaskbar | NET::SkipPager);
KWin::setOnAllDesktops(m_zoomView->winId(), true);
@@ -729,27 +729,27 @@ void KmagApp::setEdgeMode (KToggleAction *mode)
hide();
if (mode == m_modeEdgeTop) {
- QRect r = QApplication::desktop()->screenGeometry( this );
+ TQRect r = TQApplication::desktop()->screenGeometry( this );
r.setBottom( r.top() + edgesize );
m_zoomView->setGeometry ( r );
KWin::setExtendedStrut (m_zoomView->winId(), 0, 0, 0, 0, 0, 0,
edgesize, r.left(), r.right(), 0, 0, 0);
} else if (mode == m_modeEdgeLeft) {
- QRect r = QApplication::desktop()->screenGeometry( this );
+ TQRect r = TQApplication::desktop()->screenGeometry( this );
r.setRight( r.left() + edgesize );
m_zoomView->setGeometry ( r );
KWin::setExtendedStrut (m_zoomView->winId(),
edgesize, r.top(), r.bottom(),
0, 0, 0, 0, 0, 0, 0, 0, 0);
} else if (mode == m_modeEdgeRight) {
- QRect r = QApplication::desktop()->screenGeometry( this );
+ TQRect r = TQApplication::desktop()->screenGeometry( this );
r.setLeft( r.right() - edgesize );
m_zoomView->setGeometry ( r );
KWin::setExtendedStrut (m_zoomView->winId(), 0, 0, 0,
edgesize, r.top(), r.bottom(),
0, 0, 0, 0, 0, 0);
} else {
- QRect r = QApplication::desktop()->screenGeometry( this );
+ TQRect r = TQApplication::desktop()->screenGeometry( this );
r.setTop( r.bottom() - edgesize );
m_zoomView->setGeometry ( r );
KWin::setExtendedStrut (m_zoomView->winId(), 0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -771,7 +771,7 @@ void KmagApp::unsetEdgeMode (KToggleAction *mode)
m_modeEdgeBottom->setChecked(false);
mode->setChecked (true);
- m_zoomView->reparent (this, QPoint(), true);
+ m_zoomView->reparent (this, TQPoint(), true);
setCentralWidget(m_zoomView);
KWin::setExtendedStrut (winId(), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
@@ -804,7 +804,7 @@ void KmagApp::slotFilePrint()
bool toggled(false);
#if KDE_VERSION < 220
- QPrinter printer;
+ TQPrinter printer;
#else
KPrinter printer;
#endif
@@ -815,7 +815,7 @@ void KmagApp::slotFilePrint()
toggled = true;
}
- const QPixmap pixmap(m_zoomView->getPixmap());
+ const TQPixmap pixmap(m_zoomView->getPixmap());
#if KDE_VERSION >= 220
// use some AI to get the best orientation
@@ -827,7 +827,7 @@ void KmagApp::slotFilePrint()
#endif
if (printer.setup(this)) {
- QPainter paint;
+ TQPainter paint;
if(!paint.begin(&printer))
return;
@@ -935,17 +935,17 @@ void KmagApp::slotEditToolbars()
{
saveMainWindowSettings( KGlobal::config(), "MainWindow" );
KEditToolbar dlg( actionCollection() );
- connect( &dlg, SIGNAL( newToolbarConfig() ), this, SLOT( slotNewToolbarConfig() ) );
+ connect( &dlg, TQT_SIGNAL( newToolbarConfig() ), this, TQT_SLOT( slotNewToolbarConfig() ) );
if ( dlg.exec() )
createGUI();
}
-void KmagApp::contextMenu (QPoint pos)
+void KmagApp::contextMenu (TQPoint pos)
{
// show popup
KXMLGUIFactory *factory = this->factory();
- QPopupMenu *popup = (QPopupMenu *)factory->container("mainPopUp",this);
+ TQPopupMenu *popup = (TQPopupMenu *)factory->container("mainPopUp",this);
if (popup != 0)
popup->popup(pos, 0);
}
diff --git a/kmag/kmag.h b/kmag/kmag.h
index bfd2e31..6a27f03 100644
--- a/kmag/kmag.h
+++ b/kmag/kmag.h
@@ -30,7 +30,7 @@
#include <vector>
// include files for Qt
-#include <qstringlist.h>
+#include <tqstringlist.h>
// include files for KDE
#include <kapplication.h>
@@ -62,7 +62,7 @@ class KmagApp : public KMainWindow
/**
* Construtor of KmagApp, calls all init functions to create the application.
*/
- KmagApp(QWidget* parent=0, const char* name=0);
+ KmagApp(TQWidget* parent=0, const char* name=0);
/// Default destructor
~KmagApp();
@@ -160,7 +160,7 @@ class KmagApp : public KMainWindow
/// Called when "configure toolbar" is clicked
void slotEditToolbars();
- void contextMenu(QPoint pos);
+ void contextMenu(TQPoint pos);
signals:
/// This signal is raised whenever the index into the zoom array is changed
@@ -213,13 +213,13 @@ class KmagApp : public KMainWindow
/// Current index into the fpsArray
unsigned int m_fpsIndex;
- QStringList zoomArrayString;
+ TQStringList zoomArrayString;
std::vector<float> zoomArray;
- QStringList rotationArrayString;
+ TQStringList rotationArrayString;
std::vector<int> rotationArray;
- QStringList fpsArrayString;
+ TQStringList fpsArrayString;
std::vector<float> fpsArray;
KMagZoomView* m_zoomView;
diff --git a/kmag/kmagselrect.cpp b/kmag/kmagselrect.cpp
index 4347d96..68e09b0 100644
--- a/kmag/kmagselrect.cpp
+++ b/kmag/kmagselrect.cpp
@@ -20,25 +20,25 @@
#include "kmagselrect.h"
#include "kmagselrect.moc"
-#include <qapplication.h>
-#include <qcursor.h>
-#include <qdesktopwidget.h>
-#include <qpixmap.h>
-#include <qbitmap.h>
+#include <tqapplication.h>
+#include <tqcursor.h>
+#include <tqdesktopwidget.h>
+#include <tqpixmap.h>
+#include <tqbitmap.h>
#include <kapplication.h>
#include <klocale.h>
static uchar line_bits[] = {0x2d, 0x96, 0x4b, 0xa5, 0xd2, 0x69, 0xb4, 0x5a};
-static QColor titleColor = QColor (0,0,128);
-static QColor titleBtnColor = QColor (255,255,0);
-static QColor textColor = QColor (255,255,255);
+static TQColor titleColor = TQColor (0,0,128);
+static TQColor titleBtnColor = TQColor (255,255,0);
+static TQColor textColor = TQColor (255,255,255);
static int frameSize = 10;
static int titleSize = 24;
-void setTitleColors (QColor title, QColor text, QColor titleBtn)
+void setTitleColors (TQColor title, TQColor text, TQColor titleBtn)
{
titleColor = title;
titleBtnColor = titleBtn;
@@ -55,17 +55,17 @@ void setTitleSize (int size)
titleSize = size;
}
-QColor getTitleColor ()
+TQColor getTitleColor ()
{
return titleColor;
}
-QColor getTitleBtnColor ()
+TQColor getTitleBtnColor ()
{
return titleBtnColor;
}
-QColor getTextColor ()
+TQColor getTextColor ()
{
return textColor;
}
@@ -87,34 +87,34 @@ int getTitleSize ()
// Construction
//--------------------------------------------------------------------------
-KMagSelRect::KMagSelRect(QWidget *parent) :
- QRect()
+KMagSelRect::KMagSelRect(TQWidget *parent) :
+ TQRect()
{
init(parent);
}
-KMagSelRect::KMagSelRect(const QPoint &topLeft, const QPoint &bottomRight,
- QWidget *parent) :
-QRect(topLeft, bottomRight)
+KMagSelRect::KMagSelRect(const TQPoint &topLeft, const TQPoint &bottomRight,
+ TQWidget *parent) :
+TQRect(topLeft, bottomRight)
{
init(parent);
}
-KMagSelRect::KMagSelRect(const QPoint &topLeft, const QSize &size,
- QWidget *parent) :
-QRect(topLeft, size)
+KMagSelRect::KMagSelRect(const TQPoint &topLeft, const TQSize &size,
+ TQWidget *parent) :
+TQRect(topLeft, size)
{
init(parent);
}
KMagSelRect::KMagSelRect(int left, int top, int width, int height,
- QWidget *parent) :
-QRect(left, top, width, height)
+ TQWidget *parent) :
+TQRect(left, top, width, height)
{
init(parent);
}
-void KMagSelRect::init(QWidget *parent)
+void KMagSelRect::init(TQWidget *parent)
{
// Make sure parent is the window itself, not a widget within the window
if (parent != 0)
@@ -162,7 +162,7 @@ void KMagSelRect::show()
{
if (selectionwindow == 0) {
selectionwindow = new KMagSelWin (selWindowParent, "selectionwindow");
- connect (selectionwindow, SIGNAL (resized ()), this, SLOT (selWinResized ()));
+ connect (selectionwindow, TQT_SIGNAL (resized ()), this, TQT_SLOT (selWinResized ()));
update();
selectionwindow->show();
@@ -184,29 +184,29 @@ void KMagSelRect::hide()
void KMagSelRect::update()
{
// make sure the selection window does not go outside of the display
- if (height() > QApplication::desktop()->geometry().height())
- setHeight (QApplication::desktop()->geometry().height());
- if (width() > QApplication::desktop()->geometry().width())
- setWidth (QApplication::desktop()->geometry().width());
+ if (height() > TQApplication::desktop()->geometry().height())
+ setHeight (TQApplication::desktop()->geometry().height());
+ if (width() > TQApplication::desktop()->geometry().width())
+ setWidth (TQApplication::desktop()->geometry().width());
if (top() < 0)
moveTop (0);
if (left() < 0)
moveLeft (0);
- if (bottom() > QApplication::desktop()->geometry().bottom())
- moveBottom (QApplication::desktop()->geometry().bottom());
- if (right() > QApplication::desktop()->geometry().right())
- moveRight (QApplication::desktop()->geometry().right());
+ if (bottom() > TQApplication::desktop()->geometry().bottom())
+ moveBottom (TQApplication::desktop()->geometry().bottom());
+ if (right() > TQApplication::desktop()->geometry().right())
+ moveRight (TQApplication::desktop()->geometry().right());
if (selectionwindow != 0)
- selectionwindow->setSelRect (QRect (topLeft(), bottomRight()));
+ selectionwindow->setSelRect (TQRect (topLeft(), bottomRight()));
}
void KMagSelRect::selWinResized()
{
if (selectionwindow != 0)
{
- QRect newRect = selectionwindow->getSelRect();
+ TQRect newRect = selectionwindow->getSelRect();
setRect (newRect.x(), newRect.y(), newRect.width(), newRect.height());
}
}
@@ -215,43 +215,43 @@ void KMagSelRect::selWinResized()
// KMagSelWin
//--------------------------------------------------------------------------
-KMagSelWin::KMagSelWin ( QWidget * parent, const char * name, WFlags ) :
- QWidget (parent, name, WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop | WType_TopLevel | WX11BypassWM)
+KMagSelWin::KMagSelWin ( TQWidget * parent, const char * name, WFlags ) :
+ TQWidget (parent, name, WStyle_Customize | WStyle_NoBorder | WStyle_StaysOnTop | WType_TopLevel | WX11BypassWM)
{
- QBitmap line (8, 8, line_bits, true);
+ TQBitmap line (8, 8, line_bits, true);
setPaletteBackgroundPixmap (line);
- setBackgroundOrigin (QWidget::WindowOrigin);
+ setBackgroundOrigin (TQWidget::WindowOrigin);
titleBar = new KMagSelWinCorner (this, "titlebar");
titleBar->setPaletteBackgroundColor (getTitleColor ());
titleBar->setPaletteForegroundColor (getTextColor ());
titleBar->setText(i18n("Selection Window")+" - "+i18n("KMagnifier"));
- connect (titleBar, SIGNAL (startResizing ()), this, SLOT (startResizing ()));
- connect (titleBar, SIGNAL (resized (QPoint)), this, SLOT (titleMoved (QPoint)));
+ connect (titleBar, TQT_SIGNAL (startResizing ()), this, TQT_SLOT (startResizing ()));
+ connect (titleBar, TQT_SIGNAL (resized (TQPoint)), this, TQT_SLOT (titleMoved (TQPoint)));
topLeftCorner = new KMagSelWinCorner (this, "topleft");
topLeftCorner->setCursor (Qt::SizeFDiagCursor);
topLeftCorner->setPaletteBackgroundColor (getTitleBtnColor ());
- connect (topLeftCorner, SIGNAL (startResizing ()), this, SLOT (startResizing ()));
- connect (topLeftCorner, SIGNAL (resized (QPoint)), this, SLOT (topLeftResized (QPoint)));
+ 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->setPaletteBackgroundColor (getTitleBtnColor ());
- connect (topRightCorner, SIGNAL (startResizing ()), this, SLOT (startResizing ()));
- connect (topRightCorner, SIGNAL (resized (QPoint)), this, SLOT (topRightResized (QPoint)));
+ 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->setPaletteBackgroundColor (getTitleBtnColor ());
- connect (bottomLeftCorner, SIGNAL (startResizing ()), this, SLOT (startResizing ()));
- connect (bottomLeftCorner, SIGNAL (resized (QPoint)), this, SLOT (bottomLeftResized (QPoint)));
+ 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->setPaletteBackgroundColor (getTitleBtnColor ());
- connect (bottomRightCorner, SIGNAL (startResizing ()), this, SLOT (startResizing ()));
- connect (bottomRightCorner, SIGNAL (resized (QPoint)), this, SLOT (bottomRightResized (QPoint)));
+ connect (bottomRightCorner, TQT_SIGNAL (startResizing ()), this, TQT_SLOT (startResizing ()));
+ connect (bottomRightCorner, TQT_SIGNAL (resized (TQPoint)), this, TQT_SLOT (bottomRightResized (TQPoint)));
}
KMagSelWin::~KMagSelWin()
@@ -263,7 +263,7 @@ KMagSelWin::~KMagSelWin()
delete bottomRightCorner;
}
-void KMagSelWin::setSelRect (QRect selRect)
+void KMagSelWin::setSelRect (TQRect selRect)
{
selRect = selRect.normalize();
@@ -271,10 +271,10 @@ void KMagSelWin::setSelRect (QRect selRect)
selRect.setLeft (0);
if (selRect.top() < 0)
selRect.setTop (0);
- if (selRect.right() > QApplication::desktop()->width())
- selRect.setRight (QApplication::desktop()->width());
- if (selRect.bottom() > QApplication::desktop()->height())
- selRect.setBottom (QApplication::desktop()->height());
+ if (selRect.right() > TQApplication::desktop()->width())
+ selRect.setRight (TQApplication::desktop()->width());
+ if (selRect.bottom() > TQApplication::desktop()->height())
+ selRect.setBottom (TQApplication::desktop()->height());
setGeometry (
selRect.left() - getFrameSize(),
@@ -290,13 +290,13 @@ void KMagSelWin::setSelRect (QRect selRect)
if (selRect.height() < h+h)
h = static_cast<int>(selRect.height()/2);
- setMask (QRegion (QRect (0, 0, width(), height ()))
- - QRegion (QRect (getFrameSize(), getTitleSize()+2, selRect.width(), selRect.height()))
- - QRegion (QRect (0, 0, getFrameSize()+w, getTitleSize()+2-getFrameSize()))
- - QRegion (QRect (width()-getFrameSize()-w, 0, getFrameSize()+w, getTitleSize()+2-getFrameSize()))
- - QRegion (QRect (0, getTitleSize()+2+h, getFrameSize()-2, selRect.height()-h-h))
- - QRegion (QRect (width()-getFrameSize()+2, getTitleSize()+2+h, getFrameSize()-2, selRect.height()-h-h))
- - QRegion (QRect (getFrameSize()+w, height()-getFrameSize()+2, selRect.width()-w-w, getFrameSize()-2)));
+ setMask (TQRegion (TQRect (0, 0, width(), height ()))
+ - TQRegion (TQRect (getFrameSize(), getTitleSize()+2, selRect.width(), selRect.height()))
+ - TQRegion (TQRect (0, 0, getFrameSize()+w, getTitleSize()+2-getFrameSize()))
+ - TQRegion (TQRect (width()-getFrameSize()-w, 0, getFrameSize()+w, getTitleSize()+2-getFrameSize()))
+ - TQRegion (TQRect (0, getTitleSize()+2+h, getFrameSize()-2, selRect.height()-h-h))
+ - TQRegion (TQRect (width()-getFrameSize()+2, getTitleSize()+2+h, getFrameSize()-2, selRect.height()-h-h))
+ - TQRegion (TQRect (getFrameSize()+w, height()-getFrameSize()+2, selRect.width()-w-w, getFrameSize()-2)));
titleBar->setGeometry (getFrameSize()+w, 0, selRect.width()-h-h, getTitleSize());
topLeftCorner->setGeometry (0, getTitleSize()+2-getFrameSize(), getFrameSize()+w, getFrameSize()+h);
@@ -305,9 +305,9 @@ void KMagSelWin::setSelRect (QRect selRect)
bottomRightCorner->setGeometry (width()-getFrameSize()-w, height()-getFrameSize()-h, getFrameSize()+w, getFrameSize()+h);
}
-QRect KMagSelWin::getSelRect ()
+TQRect KMagSelWin::getSelRect ()
{
- return QRect (
+ return TQRect (
x() + getFrameSize(),
y() + getTitleSize()+2,
width() - getFrameSize() - getFrameSize(),
@@ -319,35 +319,35 @@ void KMagSelWin::startResizing ()
oldSelRect = getSelRect();
}
-void KMagSelWin::titleMoved ( QPoint offset )
+void KMagSelWin::titleMoved ( TQPoint offset )
{
- QRect selRect = oldSelRect;
+ TQRect selRect = oldSelRect;
selRect.moveBy (offset.x(), offset.y());
setSelRect (selRect);
emit resized ();
}
-void KMagSelWin::topLeftResized ( QPoint offset )
+void KMagSelWin::topLeftResized ( TQPoint offset )
{
- setSelRect (QRect(oldSelRect.topLeft() + offset, oldSelRect.bottomRight ()));
+ setSelRect (TQRect(oldSelRect.topLeft() + offset, oldSelRect.bottomRight ()));
emit resized();
}
-void KMagSelWin::topRightResized ( QPoint offset )
+void KMagSelWin::topRightResized ( TQPoint offset )
{
- setSelRect (QRect(oldSelRect.topRight() + offset, oldSelRect.bottomLeft ()));
+ setSelRect (TQRect(oldSelRect.topRight() + offset, oldSelRect.bottomLeft ()));
emit resized();
}
-void KMagSelWin::bottomLeftResized ( QPoint offset )
+void KMagSelWin::bottomLeftResized ( TQPoint offset )
{
- setSelRect (QRect(oldSelRect.bottomLeft() + offset, oldSelRect.topRight ()));
+ setSelRect (TQRect(oldSelRect.bottomLeft() + offset, oldSelRect.topRight ()));
emit resized();
}
-void KMagSelWin::bottomRightResized ( QPoint offset )
+void KMagSelWin::bottomRightResized ( TQPoint offset )
{
- setSelRect (QRect(oldSelRect.bottomRight() + offset, oldSelRect.topLeft()));
+ setSelRect (TQRect(oldSelRect.bottomRight() + offset, oldSelRect.topLeft()));
emit resized();
}
@@ -356,10 +356,10 @@ void KMagSelWin::bottomRightResized ( QPoint offset )
// KMagSelWinCorner
//--------------------------------------------------------------------------
-KMagSelWinCorner::KMagSelWinCorner ( QWidget * parent, const char * name, WFlags f ) :
- QLabel (parent, name, f)
+KMagSelWinCorner::KMagSelWinCorner ( TQWidget * parent, const char * name, WFlags f ) :
+ TQLabel (parent, name, f)
{
- setFrameStyle (QFrame::WinPanel | QFrame::Raised);
+ setFrameStyle (TQFrame::WinPanel | TQFrame::Raised);
setLineWidth (1);
}
@@ -367,19 +367,19 @@ KMagSelWinCorner::~KMagSelWinCorner()
{
}
-void KMagSelWinCorner::mousePressEvent ( QMouseEvent * e )
+void KMagSelWinCorner::mousePressEvent ( TQMouseEvent * e )
{
oldPos = e->globalPos ();
emit startResizing ();
}
-void KMagSelWinCorner::mouseReleaseEvent ( QMouseEvent * e )
+void KMagSelWinCorner::mouseReleaseEvent ( TQMouseEvent * e )
{
- setFrameShadow (QFrame::Raised);
+ setFrameShadow (TQFrame::Raised);
emit resized (e->globalPos () - oldPos);
}
-void KMagSelWinCorner::mouseMoveEvent ( QMouseEvent * e )
+void KMagSelWinCorner::mouseMoveEvent ( TQMouseEvent * e )
{
emit resized (e->globalPos () - oldPos);
}
diff --git a/kmag/kmagselrect.h b/kmag/kmagselrect.h
index 675954c..e0e8348 100644
--- a/kmag/kmagselrect.h
+++ b/kmag/kmagselrect.h
@@ -23,9 +23,9 @@
#include <stdlib.h>
// Qt includes
-#include <qrect.h>
-#include <qwidget.h>
-#include <qlabel.h>
+#include <tqrect.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
class KMagSelWinCorner : public QLabel
{
@@ -33,22 +33,22 @@ class KMagSelWinCorner : public QLabel
public:
- KMagSelWinCorner ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
+ KMagSelWinCorner ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 );
virtual ~KMagSelWinCorner();
signals:
void startResizing ();
- void resized ( QPoint offset );
+ void resized ( TQPoint offset );
protected:
- QPoint oldPos;
+ TQPoint oldPos;
- virtual void mousePressEvent ( QMouseEvent * e );
- virtual void mouseReleaseEvent ( QMouseEvent * e );
- virtual void mouseMoveEvent ( QMouseEvent * e );
+ virtual void mousePressEvent ( TQMouseEvent * e );
+ virtual void mouseReleaseEvent ( TQMouseEvent * e );
+ virtual void mouseMoveEvent ( TQMouseEvent * e );
};
class KMagSelWin : public QWidget
@@ -57,21 +57,21 @@ class KMagSelWin : public QWidget
public:
- KMagSelWin ( QWidget * parent = 0, const char * name = 0, WFlags f = 0 );
+ KMagSelWin ( TQWidget * parent = 0, const char * name = 0, WFlags f = 0 );
virtual ~KMagSelWin();
- void setSelRect ( QRect selRect );
- QRect getSelRect ();
+ void setSelRect ( TQRect selRect );
+ TQRect getSelRect ();
public slots:
void startResizing ();
- void titleMoved ( QPoint offset );
- void topLeftResized ( QPoint offset );
- void topRightResized ( QPoint offset );
- void bottomLeftResized ( QPoint offset );
- void bottomRightResized ( QPoint offset );
+ void titleMoved ( TQPoint offset );
+ void topLeftResized ( TQPoint offset );
+ void topRightResized ( TQPoint offset );
+ void bottomLeftResized ( TQPoint offset );
+ void bottomRightResized ( TQPoint offset );
signals:
@@ -79,7 +79,7 @@ signals:
protected:
- QRect oldSelRect;
+ TQRect oldSelRect;
KMagSelWinCorner *titleBar;
KMagSelWinCorner *topLeftCorner;
@@ -95,18 +95,18 @@ protected:
* @author Original : Michael Forster
* @author Current : Sarang Lakare
*/
-class KMagSelRect : public QObject, public QRect
+class KMagSelRect : public TQObject, public QRect
{
Q_OBJECT
public:
- KMagSelRect(QWidget *parent=0);
- KMagSelRect(const QPoint &topLeft, const QPoint &bottomRight,
- QWidget *parent=0);
- KMagSelRect(const QPoint &topLeft, const QSize &size,
- QWidget *parent=0);
+ KMagSelRect(TQWidget *parent=0);
+ KMagSelRect(const TQPoint &topLeft, const TQPoint &bottomRight,
+ TQWidget *parent=0);
+ KMagSelRect(const TQPoint &topLeft, const TQSize &size,
+ TQWidget *parent=0);
KMagSelRect(int left, int top, int width, int height,
- QWidget *selWindowParent=0);
+ TQWidget *selWindowParent=0);
virtual ~KMagSelRect();
@@ -132,15 +132,15 @@ public slots:
protected:
- void init(QWidget *);
+ void init(TQWidget *);
- QWidget *selWindowParent;
+ TQWidget *selWindowParent;
KMagSelWin *selectionwindow;
bool m_alwaysVisible;
};
-void setTitleColors (QColor title, QColor text, QColor titleBtn);
+void setTitleColors (TQColor title, TQColor text, TQColor titleBtn);
void setFrameSize (int size);
#endif // KMAGSELRECT_H
diff --git a/kmag/kmagzoomview.cpp b/kmag/kmagzoomview.cpp
index a38c21c..4010fce 100644
--- a/kmag/kmagzoomview.cpp
+++ b/kmag/kmagzoomview.cpp
@@ -23,14 +23,14 @@
#include "kmagzoomview.moc"
// include files for Qt
-#include <qbitmap.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qcursor.h>
-#include <qglobal.h>
-#include <qpainter.h>
-#include <qwhatsthis.h>
-#include <qwidget.h>
+#include <tqbitmap.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqcursor.h>
+#include <tqglobal.h>
+#include <tqpainter.h>
+#include <tqwhatsthis.h>
+#include <tqwidget.h>
// include files for KDE
#include <kapplication.h>
@@ -79,7 +79,7 @@ static uchar phand_bits[] = {
-static bool obscuredRegion (QRegion &region, Window winId, Window ignoreId, Window start = 0, int level = -1) {
+static bool obscuredRegion (TQRegion &region, Window winId, Window ignoreId, Window start = 0, int level = -1) {
Window root, parent, *children; uint nchildren;
if (0 == start)
start = qt_xrootwin();
@@ -92,7 +92,7 @@ static bool obscuredRegion (QRegion &region, Window winId, Window ignoreId, Wind
XWindowAttributes atts;
XGetWindowAttributes (qt_xdisplay(), children [i], &atts);
if (atts.map_state == IsViewable)
- region -= QRegion (atts.x, atts.y, atts.width, atts.height, QRegion::Rectangle);
+ region -= TQRegion (atts.x, atts.y, atts.width, atts.height, TQRegion::Rectangle);
}
}
else if (winId == children [i])
@@ -120,8 +120,8 @@ static bool obscuredRegion (QRegion &region, Window winId, Window ignoreId, Wind
-KMagZoomView::KMagZoomView(QWidget *parent, const char *name)
- : QScrollView(parent, name),
+KMagZoomView::KMagZoomView(TQWidget *parent, const char *name)
+ : TQScrollView(parent, name),
m_selRect(0, 0, 128, 128, this),
m_grabTimer(0),
m_mouseViewTimer(0),
@@ -136,7 +136,7 @@ KMagZoomView::KMagZoomView(QWidget *parent, const char *name)
KApplication::setGlobalMouseTracking(TRUE);
viewport()->setMouseTracking(TRUE);
viewport()->setBackgroundMode (NoBackground);
- viewport()->setFocusPolicy(QWidget::StrongFocus);
+ viewport()->setFocusPolicy(TQWidget::StrongFocus);
m_ctrlKeyPressed = false;
m_shiftKeyPressed = false;
@@ -147,16 +147,16 @@ KMagZoomView::KMagZoomView(QWidget *parent, const char *name)
setRefreshRate(10);
// connect it to grabFrame()
- connect(&m_grabTimer, SIGNAL(timeout()), SLOT(grabFrame()));
+ connect(&m_grabTimer, TQT_SIGNAL(timeout()), TQT_SLOT(grabFrame()));
// start the grabTimer
m_grabTimer.start(static_cast<int>(1000.0/m_fps));
// connect it to updateMouseView()
- connect(&m_mouseViewTimer, SIGNAL(timeout()), SLOT(updateMouseView()));
+ connect(&m_mouseViewTimer, TQT_SIGNAL(timeout()), TQT_SLOT(updateMouseView()));
// start the grabTimer @ 25 frames per second!
m_mouseViewTimer.start(25);
- QWhatsThis::add(this, i18n("This is the main window which shows the contents of the\
+ TQWhatsThis::add(this, i18n("This is the main window which shows the contents of the\
selected region. The contents will be magnified according to the zoom level that is set."));
// different ways to show the cursor.
@@ -178,20 +178,20 @@ void KMagZoomView::followMouse(bool follow)
if(follow) {
m_followMouse = true;
m_mouseMode = Normal;
- setVScrollBarMode (QScrollView::AlwaysOff);
- setHScrollBarMode (QScrollView::AlwaysOff);
+ setVScrollBarMode (TQScrollView::AlwaysOff);
+ setHScrollBarMode (TQScrollView::AlwaysOff);
} else {
m_followMouse = false;
m_mouseMode = Normal;
- setVScrollBarMode (QScrollView::AlwaysOn);
- setHScrollBarMode (QScrollView::AlwaysOn);
+ setVScrollBarMode (TQScrollView::AlwaysOn);
+ setHScrollBarMode (TQScrollView::AlwaysOn);
}
}
/**
* Called when the widget is hidden. Stop refresh when this happens.
*/
-void KMagZoomView::hideEvent( QHideEvent* )
+void KMagZoomView::hideEvent( TQHideEvent* )
{
// Save the state of the refresh switch.. the state will be restored
// when showEvent is called
@@ -207,7 +207,7 @@ void KMagZoomView::hideEvent( QHideEvent* )
/**
* Called when the widget is shown. Start refresh when this happens.
*/
-void KMagZoomView::showEvent( QShowEvent* )
+void KMagZoomView::showEvent( TQShowEvent* )
{
// Check if refresh switch was ON when hide was called and if currently it is OFF
if(m_refreshSwitchStateOnHide && !m_refreshSwitch) {
@@ -219,9 +219,9 @@ void KMagZoomView::showEvent( QShowEvent* )
/**
* Called when the widget is resized. Check if fitToWindow is active when this happens.
*/
-void KMagZoomView::resizeEvent( QResizeEvent * e )
+void KMagZoomView::resizeEvent( TQResizeEvent * e )
{
- QScrollView::resizeEvent (e);
+ TQScrollView::resizeEvent (e);
if(m_fitToWindow)
fitToWindow();
}
@@ -231,35 +231,35 @@ void KMagZoomView::resizeEvent( QResizeEvent * e )
*
* @param p
*/
-void KMagZoomView::drawContents ( QPainter * p, int clipx, int clipy, int clipw, int cliph )
+void KMagZoomView::drawContents ( TQPainter * p, int clipx, int clipy, int clipw, int cliph )
{
if(m_grabbedPixmap.isNull())
return;
// A pixmap which will be eventually displayed
- QRect areaToPaint = m_invertedMatrix.mapRect (QRect(clipx, clipy, clipw, cliph));
- QPixmap clippedPixmap (areaToPaint.size());
- clippedPixmap.fill (QColor (128, 128, 128));
- areaToPaint &= QRect (QPoint (0,0), m_selRect.size());
- bitBlt(&clippedPixmap, QPoint (0,0), &m_grabbedPixmap, areaToPaint);
+ TQRect areaToPaint = m_invertedMatrix.mapRect (TQRect(clipx, clipy, clipw, cliph));
+ TQPixmap clippedPixmap (areaToPaint.size());
+ clippedPixmap.fill (TQColor (128, 128, 128));
+ areaToPaint &= TQRect (TQPoint (0,0), m_selRect.size());
+ bitBlt(&clippedPixmap, TQPoint (0,0), &m_grabbedPixmap, areaToPaint);
// show the pixel under mouse cursor
if(m_showMouse) {
// paint the mouse cursor
- paintMouseCursor(&clippedPixmap, calcMousePos (m_refreshSwitch)-QPoint (areaToPaint.x(), areaToPaint.y()));
+ paintMouseCursor(&clippedPixmap, calcMousePos (m_refreshSwitch)-TQPoint (areaToPaint.x(), areaToPaint.y()));
}
- QPixmap zoomedPixmap;
+ TQPixmap zoomedPixmap;
zoomedPixmap = clippedPixmap.xForm (m_zoomMatrix);
if (m_invert) {
- QImage zoomedImage;
+ TQImage zoomedImage;
zoomedImage = zoomedPixmap.convertToImage();
zoomedImage.invertPixels (false);
- p->drawImage (QPoint (clipx-contentsX(), clipy-contentsY()), zoomedImage, zoomedImage.rect(),
+ p->drawImage (TQPoint (clipx-contentsX(), clipy-contentsY()), zoomedImage, zoomedImage.rect(),
Qt::ThresholdDither | Qt::ThresholdAlphaDither | Qt::AvoidDither);
} else {
- p->drawPixmap (QPoint (clipx, clipy), zoomedPixmap, zoomedPixmap.rect());
+ p->drawPixmap (TQPoint (clipx, clipy), zoomedPixmap, zoomedPixmap.rect());
}
}
@@ -267,12 +267,12 @@ void KMagZoomView::drawContents ( QPainter * p, int clipx, int clipy, int clipw,
* Draws the mouse cursor according to the current selection of the type of
* mouse cursor to draw.
*/
-void KMagZoomView::paintMouseCursor(QPaintDevice *dev, QPoint mousePos)
+void KMagZoomView::paintMouseCursor(TQPaintDevice *dev, TQPoint mousePos)
{
if(!dev)
return;
- QPainter pz(dev);
+ TQPainter pz(dev);
if(m_latestCursorPos.x() >= 0 && m_latestCursorPos.x() < m_selRect.width() &&
m_latestCursorPos.y() >= 0 && m_latestCursorPos.y() < m_selRect.height() ) {
@@ -294,8 +294,8 @@ void KMagZoomView::paintMouseCursor(QPaintDevice *dev, QPoint mousePos)
pz.setPen(Qt::black);
pz.setBackgroundColor(Qt::white);
- QBitmap sCursor( 16, 16, left_ptr_bits, TRUE );
- QBitmap mask( 16, 16, left_ptrmsk_bits, TRUE );
+ TQBitmap sCursor( 16, 16, left_ptr_bits, TRUE );
+ TQBitmap mask( 16, 16, left_ptrmsk_bits, TRUE );
sCursor.setMask(mask);
// since hot spot is at 3,1
@@ -307,7 +307,7 @@ void KMagZoomView::paintMouseCursor(QPaintDevice *dev, QPoint mousePos)
{
// 3. Actual cursor
// Get the current cursor type
- QWidget *dummy = KApplication::widgetAt(QCursor::pos(), FALSE);
+ TQWidget *dummy = KApplication::widgetAt(TQCursor::pos(), FALSE);
if(!dummy)
break;
kdDebug() << ">" << dummy->name() << ":" << dummy->cursor().shape() << "-" << endl;
@@ -318,8 +318,8 @@ void KMagZoomView::paintMouseCursor(QPaintDevice *dev, QPoint mousePos)
pz.setPen(Qt::black);
pz.setBackgroundColor(Qt::white);
- QBitmap sCursor( 16, 16, left_ptr_bits, TRUE );
- QBitmap mask( 16, 16, left_ptrmsk_bits, TRUE );
+ TQBitmap sCursor( 16, 16, left_ptr_bits, TRUE );
+ TQBitmap mask( 16, 16, left_ptrmsk_bits, TRUE );
sCursor.setMask(mask);
// since hot spot is at 3,1
@@ -327,8 +327,8 @@ void KMagZoomView::paintMouseCursor(QPaintDevice *dev, QPoint mousePos)
}
break;
default:
- QBitmap sCursor( 32, 32, phand_bits, TRUE );
- QBitmap mask( 32, 32, phandm_bits, TRUE );
+ TQBitmap sCursor( 32, 32, phand_bits, TRUE );
+ TQBitmap mask( 32, 32, phandm_bits, TRUE );
sCursor.setMask(mask);
pz.drawPixmap(mousePos.x(), mousePos.y(), sCursor);
@@ -347,16 +347,16 @@ void KMagZoomView::paintMouseCursor(QPaintDevice *dev, QPoint mousePos)
}
-QPoint KMagZoomView::calcMousePos(bool updateMousePos)
+TQPoint KMagZoomView::calcMousePos(bool updateMousePos)
{
// get position of mouse wrt selRect
if(updateMousePos) { // get a new position only if asked
- m_latestCursorPos = QCursor::pos();
- m_latestCursorPos -= QPoint(m_selRect.x(), m_selRect.y());
+ m_latestCursorPos = TQCursor::pos();
+ m_latestCursorPos -= TQPoint(m_selRect.x(), m_selRect.y());
}
// get coordinates of the pixel w.r.t. the pixmap
- return QPoint (m_latestCursorPos.x(), m_latestCursorPos.y());
+ return TQPoint (m_latestCursorPos.x(), m_latestCursorPos.y());
}
@@ -367,10 +367,10 @@ QPoint KMagZoomView::calcMousePos(bool updateMousePos)
*
* @param e
*/
-void KMagZoomView::mousePressEvent(QMouseEvent *e)
+void KMagZoomView::mousePressEvent(TQMouseEvent *e)
{
switch(e->button()) {
- case QMouseEvent::LeftButton :
+ case TQMouseEvent::LeftButton :
if(m_ctrlKeyPressed) {
// check if currently in resize mode
// don't do anything if fitToWindow is enabled
@@ -386,7 +386,7 @@ void KMagZoomView::mousePressEvent(QMouseEvent *e)
m_oldMousePos.setY(e->globalY());
// set the cursor position to the bottom-right of the selected region
- QCursor::setPos(m_selRect.bottomRight());
+ TQCursor::setPos(m_selRect.bottomRight());
// show the selection rectangle
m_selRect.show();
@@ -411,7 +411,7 @@ void KMagZoomView::mousePressEvent(QMouseEvent *e)
m_oldMousePos.setY(e->globalY());
// set the cursor position to the center of the selected region
- QCursor::setPos(m_selRect.center());
+ TQCursor::setPos(m_selRect.center());
// show the selected rectangle
m_selRect.show();
@@ -449,7 +449,7 @@ void KMagZoomView::mousePressEvent(QMouseEvent *e)
}
break;
- case QMouseEvent::MidButton :
+ case TQMouseEvent::MidButton :
// check if currently in move mode
// don't do anything if follow mouse is enabled
if ((m_mouseMode != MoveSelection) && !m_followMouse) {
@@ -463,7 +463,7 @@ void KMagZoomView::mousePressEvent(QMouseEvent *e)
m_oldMousePos.setY(e->globalY());
// set the cursor position to the center of the selected region
- QCursor::setPos(m_selRect.center());
+ TQCursor::setPos(m_selRect.center());
// show the selected rectangle
m_selRect.show();
@@ -491,11 +491,11 @@ void KMagZoomView::mousePressEvent(QMouseEvent *e)
*
* @param e
*/
-void KMagZoomView::mouseReleaseEvent(QMouseEvent *e)
+void KMagZoomView::mouseReleaseEvent(TQMouseEvent *e)
{
switch(e->button()) {
- case QMouseEvent::LeftButton :
- case QMouseEvent::MidButton :
+ case TQMouseEvent::LeftButton :
+ case TQMouseEvent::MidButton :
// check if currently in move mode
if(m_mouseMode == MoveSelection) {
// hide the selection window
@@ -507,7 +507,7 @@ void KMagZoomView::mouseReleaseEvent(QMouseEvent *e)
setCursor(arrowCursor);
// restore the cursor position
- QCursor::setPos(m_oldMousePos);
+ TQCursor::setPos(m_oldMousePos);
} else if(m_mouseMode == ResizeSelection) {
// hide the selection window
m_selRect.hide();
@@ -518,7 +518,7 @@ void KMagZoomView::mouseReleaseEvent(QMouseEvent *e)
setCursor(arrowCursor);
// restore the cursor position
- QCursor::setPos(m_oldMousePos);
+ TQCursor::setPos(m_oldMousePos);
} else if(m_mouseMode == GrabSelection) {
// hide the selection window
m_selRect.hide();
@@ -531,9 +531,9 @@ void KMagZoomView::mouseReleaseEvent(QMouseEvent *e)
}
break;
- case QMouseEvent::RightButton :
+ case TQMouseEvent::RightButton :
break;
- case QMouseEvent::NoButton :
+ case TQMouseEvent::NoButton :
break;
// do nothing
@@ -548,7 +548,7 @@ void KMagZoomView::mouseReleaseEvent(QMouseEvent *e)
*
* @param e
*/
-void KMagZoomView::mouseMoveEvent(QMouseEvent *e)
+void KMagZoomView::mouseMoveEvent(TQMouseEvent *e)
{
if(m_mouseMode == ResizeSelection) {
// In resize selection mode
@@ -559,7 +559,7 @@ void KMagZoomView::mouseMoveEvent(QMouseEvent *e)
grabFrame();
} else if(m_mouseMode == MoveSelection) {
- QPoint newCenter;
+ TQPoint newCenter;
// set new center to be the current mouse position
m_selRect.moveCenter(e->globalPos());
@@ -567,11 +567,11 @@ void KMagZoomView::mouseMoveEvent(QMouseEvent *e)
grabFrame();
} else if(m_mouseMode == GrabSelection) {
- QPoint newPos;
+ TQPoint newPos;
// get new position
newPos = e->globalPos();
- QPoint delta = (newPos - m_oldMousePos)/m_zoom;
+ TQPoint delta = (newPos - m_oldMousePos)/m_zoom;
m_selRect.moveCenter(m_oldCenter-delta);
m_selRect.update();
@@ -579,19 +579,19 @@ void KMagZoomView::mouseMoveEvent(QMouseEvent *e)
}
}
-void KMagZoomView::keyPressEvent(QKeyEvent *e)
+void KMagZoomView::keyPressEvent(TQKeyEvent *e)
{
int offset = 16;
- if (e->state() & QKeyEvent::ShiftButton)
+ if (e->state() & TQKeyEvent::ShiftButton)
offset = 1;
- if (e->key() == QKeyEvent::Key_Control)
+ if (e->key() == TQKeyEvent::Key_Control)
m_ctrlKeyPressed = true;
- else if (e->key() == QKeyEvent::Key_Shift)
+ else if (e->key() == TQKeyEvent::Key_Shift)
m_shiftKeyPressed = true;
- else if (e->key() == QKeyEvent::Key_Left)
+ else if (e->key() == TQKeyEvent::Key_Left)
{
- if (e->state() & QKeyEvent::ControlButton)
+ if (e->state() & TQKeyEvent::ControlButton)
{
if (offset >= m_selRect.width())
m_selRect.setWidth (1);
@@ -615,9 +615,9 @@ void KMagZoomView::keyPressEvent(QKeyEvent *e)
}
m_selRect.update();
}
- else if (e->key() == QKeyEvent::Key_Right)
+ else if (e->key() == TQKeyEvent::Key_Right)
{
- if (e->state() & QKeyEvent::ControlButton)
+ if (e->state() & TQKeyEvent::ControlButton)
m_selRect.setRight (m_selRect.right()+offset);
else if (contentsX() < contentsWidth()-visibleWidth())
{
@@ -632,9 +632,9 @@ void KMagZoomView::keyPressEvent(QKeyEvent *e)
m_selRect.update();
}
- else if (e->key() == QKeyEvent::Key_Up)
+ else if (e->key() == TQKeyEvent::Key_Up)
{
- if (e->state() & QKeyEvent::ControlButton)
+ if (e->state() & TQKeyEvent::ControlButton)
{
if (offset >= m_selRect.height())
m_selRect.setHeight (1);
@@ -658,9 +658,9 @@ void KMagZoomView::keyPressEvent(QKeyEvent *e)
}
m_selRect.update();
}
- else if (e->key() == QKeyEvent::Key_Down)
+ else if (e->key() == TQKeyEvent::Key_Down)
{
- if (e->state() & QKeyEvent::ControlButton)
+ if (e->state() & TQKeyEvent::ControlButton)
m_selRect.setBottom (m_selRect.bottom()+offset);
else if (contentsY() < contentsHeight()-visibleHeight())
{
@@ -678,23 +678,23 @@ void KMagZoomView::keyPressEvent(QKeyEvent *e)
e->ignore();
}
-void KMagZoomView::keyReleaseEvent(QKeyEvent *e)
+void KMagZoomView::keyReleaseEvent(TQKeyEvent *e)
{
- if (e->key() == QKeyEvent::Key_Control)
+ if (e->key() == TQKeyEvent::Key_Control)
m_ctrlKeyPressed = false;
- else if (e->key() == QKeyEvent::Key_Shift)
+ else if (e->key() == TQKeyEvent::Key_Shift)
m_shiftKeyPressed = false;
else
e->ignore();
}
-void KMagZoomView::contextMenuEvent (QContextMenuEvent *e)
+void KMagZoomView::contextMenuEvent (TQContextMenuEvent *e)
{
emit contextMenu(e->globalPos());
e->accept();
}
-void KMagZoomView::focusOutEvent(QFocusEvent *e)
+void KMagZoomView::focusOutEvent(TQFocusEvent *e)
{
if(e->lostFocus() == TRUE) {
m_ctrlKeyPressed = false;
@@ -710,8 +710,8 @@ void KMagZoomView::focusOutEvent(QFocusEvent *e)
*/
void KMagZoomView::fitToWindow()
{
- QPoint currCenter = m_selRect.center();
- QRect newRect = m_invertedMatrix.mapRect (QRect(0, 0, visibleWidth(), visibleHeight()));
+ TQPoint currCenter = m_selRect.center();
+ TQRect newRect = m_invertedMatrix.mapRect (TQRect(0, 0, visibleWidth(), visibleHeight()));
m_selRect.setSize (newRect.size());
m_selRect.moveCenter(currCenter);
m_selRect.update();
@@ -739,38 +739,38 @@ void KMagZoomView::grabFrame()
// check if follow-mouse is enabled
if(m_followMouse && (m_mouseMode != ResizeSelection)) {
// in this case grab w.r.t the current mouse position
- QPoint newCenter;
+ TQPoint newCenter;
// set new center to be the current mouse position
- m_selRect.moveCenter(QCursor::pos());
+ m_selRect.moveCenter(TQCursor::pos());
m_selRect.update();
}
- //QRect r = pixmapRect();
+ //TQRect r = pixmapRect();
// define a normalized rectangle
- QRect selRect = m_selRect.normalize();
+ TQRect selRect = m_selRect.normalize();
// grab screenshot from the screen and put it in the pixmap
- m_grabbedPixmap = QPixmap::grabWindow(QApplication::desktop()->winId(), selRect.x(), selRect.y(),
+ m_grabbedPixmap = TQPixmap::grabWindow(TQApplication::desktop()->winId(), selRect.x(), selRect.y(),
selRect.width(), selRect.height());
// If the KMag window itself is in the screenshot, then it need to be filled with gray to avoid recursion
- QPoint globalPos = viewport()->mapToGlobal (viewport()->rect().topLeft());
- QRegion intersection (globalPos.x(), globalPos.y(), viewport()->width(), viewport()->height(), QRegion::Rectangle);
- intersection &= QRegion (selRect, QRegion::Rectangle);
+ TQPoint globalPos = viewport()->mapToGlobal (viewport()->rect().topLeft());
+ TQRegion intersection (globalPos.x(), globalPos.y(), viewport()->width(), viewport()->height(), TQRegion::Rectangle);
+ 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());
intersection.translate (-selRect.x(), -selRect.y());
- QPainter painter (&m_grabbedPixmap, true);
- QMemArray<QRect> rects (intersection.rects());
+ TQPainter painter (&m_grabbedPixmap, true);
+ TQMemArray<TQRect> rects (intersection.rects());
for (uint i = 0; i < rects.size(); i++)
- painter.fillRect (rects[i], QBrush (QColor (128, 128, 128)));
+ painter.fillRect (rects[i], TQBrush (TQColor (128, 128, 128)));
// call repaint to display the newly grabbed image
- QRect newSize = m_zoomMatrix.mapRect (m_grabbedPixmap.rect());
+ TQRect newSize = m_zoomMatrix.mapRect (m_grabbedPixmap.rect());
resizeContents (newSize.width(), newSize.height());
viewport()->repaint(false);
}
@@ -781,7 +781,7 @@ void KMagZoomView::grabFrame()
*/
void KMagZoomView::updateMouseView()
{
- QPoint pos(QCursor::pos());
+ TQPoint pos(TQCursor::pos());
if(m_selRect.left() <= pos.x() && pos.x() <= m_selRect.right() &&
m_selRect.top() <= pos.y() && pos.y() <= m_selRect.bottom() &&
m_refreshSwitch)
@@ -859,7 +859,7 @@ void KMagZoomView::showSelRect(bool show)
/**
* Sets the selection rectangle to the given position.
*/
-void KMagZoomView::setSelRectPos(const QRect & rect)
+void KMagZoomView::setSelRectPos(const TQRect & rect)
{
m_selRect.setRect(rect.x(), rect.y(), rect.width(), rect.height());
m_selRect.update();
@@ -881,7 +881,7 @@ unsigned int KMagZoomView::getShowMouseType() const
return (m_showMouse);
}
-QStringList KMagZoomView::getShowMouseStringList() const
+TQStringList KMagZoomView::getShowMouseStringList() const
{
return (m_showMouseTypes);
}
@@ -891,12 +891,12 @@ QStringList KMagZoomView::getShowMouseStringList() const
* Returns the image which is being displayed. Its again drawn by adding
* the mouse cursor if needed.
*/
-QPixmap KMagZoomView::getPixmap()
+TQPixmap KMagZoomView::getPixmap()
{
// show the pixel under mouse cursor
if(m_showMouse && !m_grabbedPixmap.isNull()) {
// Pixmap which will have the pixmap + mouse
- QPixmap mousePixmap(m_grabbedPixmap);
+ TQPixmap mousePixmap(m_grabbedPixmap);
// paint the mouse cursor w/o updating to a newer position
paintMouseCursor(&mousePixmap, calcMousePos(false));
diff --git a/kmag/kmagzoomview.h b/kmag/kmagzoomview.h
index a863ad6..7b631ae 100644
--- a/kmag/kmagzoomview.h
+++ b/kmag/kmagzoomview.h
@@ -25,14 +25,14 @@
#endif
// include files for Qt
-#include <qwidget.h>
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qtimer.h>
-#include <qscrollview.h>
-#include <qstringlist.h>
-#include <qrect.h>
-#include <qcursor.h>
+#include <tqwidget.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
+#include <tqscrollview.h>
+#include <tqstringlist.h>
+#include <tqrect.h>
+#include <tqcursor.h>
//class KMagSelRect;
#include "kmagselrect.h"
@@ -48,7 +48,7 @@ class KMagZoomView : public QScrollView
Q_OBJECT
public:
/// Constructor for the main view
- KMagZoomView(QWidget *parent = 0, const char *name=0);
+ KMagZoomView(TQWidget *parent = 0, const char *name=0);
/// Destructor for the main view
~KMagZoomView();
@@ -57,7 +57,7 @@ class KMagZoomView : public QScrollView
void toggleRefresh();
/// Returns the currently displayed zoomed view
- QPixmap getPixmap();
+ TQPixmap getPixmap();
/// Returns the state of the refresh switch
bool getRefreshStatus() const { return m_refreshSwitch; };
@@ -69,13 +69,13 @@ class KMagZoomView : public QScrollView
bool getShowSelRect() const { return (m_selRect.getAlwaysVisible()); };
/// Get the coordinates of the selection rectangle
- QRect getSelRectPos() const { return static_cast<QRect>(m_selRect); };
+ TQRect getSelRectPos() const { return static_cast<TQRect>(m_selRect); };
/// Returns the current state of show mouse
unsigned int getShowMouseType() const;
/// Returns the different ways of showing mouse cursor
- QStringList getShowMouseStringList() const;
+ TQStringList getShowMouseStringList() const;
/// Returns the status of "fit to window" option
bool getFitToWindow() const { return (m_fitToWindow); };
@@ -104,7 +104,7 @@ class KMagZoomView : public QScrollView
void showSelRect(bool show=true);
/// Set the position of the selection region to the given pos
- void setSelRectPos(const QRect & rect);
+ void setSelRectPos(const TQRect & rect);
/// Set the refresh rate in fps (frames per second)
void setRefreshRate(float fps);
@@ -119,75 +119,75 @@ class KMagZoomView : public QScrollView
void fitToWindow();
signals:
- void contextMenu(QPoint pos);
+ void contextMenu(TQPoint pos);
protected:
/// Called when the widget is hidden
- void hideEvent( QHideEvent * e);
+ void hideEvent( TQHideEvent * e);
/// Called when the widget is shown
- void showEvent( QShowEvent * e);
+ void showEvent( TQShowEvent * e);
/// Called when the widget has been resized
- void resizeEvent(QResizeEvent *e);
+ void resizeEvent(TQResizeEvent *e);
/// Called when the widget is to be repainted
- void drawContents ( QPainter * p, int clipx, int clipy, int clipw, int cliph );
+ void drawContents ( TQPainter * p, int clipx, int clipy, int clipw, int cliph );
/// This function calculates the mouse position relative to the image
- QPoint calcMousePos(bool updateMousePos=true);
+ TQPoint calcMousePos(bool updateMousePos=true);
/// This function draws the mouse cursor
- void paintMouseCursor(QPaintDevice *dev, QPoint mousePos);
+ void paintMouseCursor(TQPaintDevice *dev, TQPoint mousePos);
/// Called when mouse click is detected
- void mousePressEvent (QMouseEvent *e);
+ void mousePressEvent (TQMouseEvent *e);
/// Called when mouse is moved
- void mouseMoveEvent(QMouseEvent *e);
+ void mouseMoveEvent(TQMouseEvent *e);
/// Mouse button release event handler
- void mouseReleaseEvent(QMouseEvent *e);
+ void mouseReleaseEvent(TQMouseEvent *e);
/// Mouse button release event handler
- void keyPressEvent(QKeyEvent *e);
+ void keyPressEvent(TQKeyEvent *e);
/// Mouse button release event handler
- void keyReleaseEvent(QKeyEvent *e);
+ void keyReleaseEvent(TQKeyEvent *e);
/// Catch context menu events
- void contextMenuEvent (QContextMenuEvent *e);
+ void contextMenuEvent (TQContextMenuEvent *e);
/// Mouse button release event handler
- void focusOutEvent(QFocusEvent *e);
+ void focusOutEvent(TQFocusEvent *e);
/// Returns the rectangle where the pixmap will be drawn
- QRect pixmapRect();
+ TQRect pixmapRect();
private:
/// Stores the pixmap grabbed from the screen - to be zoomed
- QPixmap m_grabbedPixmap;
+ TQPixmap m_grabbedPixmap;
/// The selected rectangle which is to be grabbed
KMagSelRect m_selRect;
/// Grabs a window when the timer goes off
- QTimer m_grabTimer;
+ TQTimer m_grabTimer;
/// Updates the mouse view
- QTimer m_mouseViewTimer;
+ TQTimer m_mouseViewTimer;
/// Zoom matrix
- QWMatrix m_zoomMatrix;
+ TQWMatrix m_zoomMatrix;
/// Inverted zoom matrix
- QWMatrix m_invertedMatrix;
+ TQWMatrix m_invertedMatrix;
/// Saves the mouse position when a button is clicked and b4 the cursor is moved to new position
- QPoint m_oldMousePos;
+ TQPoint m_oldMousePos;
/// Saves the center of the grab window
- QPoint m_oldCenter;
+ TQPoint m_oldCenter;
/// Possible modes for the mouse to be in
enum KMagMouseMode {
@@ -208,10 +208,10 @@ class KMagZoomView : public QScrollView
bool m_shiftKeyPressed;
/// Store the more recent updated cursor position
- QPoint m_latestCursorPos;
+ TQPoint m_latestCursorPos;
/// Various ways of showing mouse cursor
- QStringList m_showMouseTypes;
+ TQStringList m_showMouseTypes;
// configuration options:
diff --git a/kmousetool/kmousetool/kmousetool.cpp b/kmousetool/kmousetool/kmousetool.cpp
index ee27ba4..c54da8a 100644
--- a/kmousetool/kmousetool/kmousetool.cpp
+++ b/kmousetool/kmousetool/kmousetool.cpp
@@ -30,18 +30,18 @@
#include <X11/extensions/XTest.h> /* Standard Name-String definitions*/
#include <kdialog.h>
#include <klocale.h>
-#include <qpushbutton.h>
-#include <qpoint.h>
-#include <qnamespace.h>
+#include <tqpushbutton.h>
+#include <tqpoint.h>
+#include <tqnamespace.h>
#include <kmessagebox.h>
#include <kaudioplayer.h>
#include <kstandarddirs.h>
-#include <qsound.h>
+#include <tqsound.h>
#include <kglobalsettings.h>
#include <kdebug.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
#include <ksystemtray.h>
#include <kiconloader.h>
#include <kpushbutton.h>
@@ -93,7 +93,7 @@ void KMouseTool::init_vars()
loadOptions();
// If the ~/.mousetool directory doesn't exist, create it
-// mSoundFileName = QDir::homeDirPath();
+// mSoundFileName = TQDir::homeDirPath();
mSoundFileName = locate("appdata", "sounds/mousetool_tap.wav");
mplayer = new KAudioPlayer(mSoundFileName);
@@ -107,7 +107,7 @@ void KMouseTool::init_vars()
// SimpleSoundServer server(Reference("global:Arts_SimpleSoundServer"));
// sound_server(Reference("global:Arts_SimpleSoundServer"));
- QDesktopWidget *d = QApplication::desktop();
+ TQDesktopWidget *d = TQApplication::desktop();
int w = d->width();
int h = d->height();
MTStroke::setUpperLeft(0,0);
@@ -141,7 +141,7 @@ void KMouseTool::setDefaultSettings()
}
-void KMouseTool::timerEvent( QTimerEvent * )
+void KMouseTool::timerEvent( TQTimerEvent * )
{
if (!mousetool_is_running)
return;
@@ -244,39 +244,39 @@ void KMouseTool::playTickSound()
// return;
// sound_server.play(mSoundFileName.latin1());
- // Another approach is to try using QSound.
- // QSound depends on Network Audio Server, which doesn't seem to work on my Debian Woody system.
+ // Another approach is to try using TQSound.
+ // TQSound depends on Network Audio Server, which doesn't seem to work on my Debian Woody system.
// I haven't spent much time working on it, though.
-// QSound::play(mSoundFileName);
+// TQSound::play(mSoundFileName);
}
-KMouseTool::KMouseTool(QWidget *parent, const char *name) : KMouseToolUI(parent, name)
+KMouseTool::KMouseTool(TQWidget *parent, const char *name) : KMouseToolUI(parent, name)
{
init_vars();
resetSettings();
- connect(movementEdit, SIGNAL(valueChanged(int)), this, SLOT(settingsChanged()));
- connect(dwellTimeEdit, SIGNAL(valueChanged(int)), this, SLOT(settingsChanged()));
- connect(dragTimeEdit, SIGNAL(valueChanged(int)), this, SLOT(settingsChanged()));
- connect(cbDrag, SIGNAL(stateChanged(int)), this, SLOT(settingsChanged()));
- connect(cbStroke, SIGNAL(stateChanged(int)), this, SLOT(settingsChanged()));
- connect(cbClick, SIGNAL(stateChanged(int)), this, SLOT(settingsChanged()));
- connect(cbStart, SIGNAL(stateChanged(int)), this, SLOT(settingsChanged()));
+ connect(movementEdit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(settingsChanged()));
+ connect(dwellTimeEdit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(settingsChanged()));
+ connect(dragTimeEdit, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(settingsChanged()));
+ connect(cbDrag, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(settingsChanged()));
+ connect(cbStroke, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(settingsChanged()));
+ connect(cbClick, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(settingsChanged()));
+ connect(cbStart, TQT_SIGNAL(stateChanged(int)), this, TQT_SLOT(settingsChanged()));
- connect(buttonStartStop, SIGNAL(clicked()), this, SLOT(startStopSelected()));
+ connect(buttonStartStop, TQT_SIGNAL(clicked()), this, TQT_SLOT(startStopSelected()));
buttonDefault->setGuiItem(KStdGuiItem::defaults());
- connect(buttonDefault, SIGNAL(clicked()), this, SLOT(defaultSelected()));
- connect(buttonReset, SIGNAL(clicked()), this, SLOT(resetSelected()));
+ connect(buttonDefault, TQT_SIGNAL(clicked()), this, TQT_SLOT(defaultSelected()));
+ connect(buttonReset, TQT_SIGNAL(clicked()), this, TQT_SLOT(resetSelected()));
buttonApply->setGuiItem(KStdGuiItem::apply());
- connect(buttonApply, SIGNAL(clicked()), this, SLOT(applySelected()));
+ connect(buttonApply, TQT_SIGNAL(clicked()), this, TQT_SLOT(applySelected()));
buttonHelp->setGuiItem(KStdGuiItem::help());
- connect(buttonHelp, SIGNAL(clicked()), this, SLOT(helpSelected()));
+ connect(buttonHelp, TQT_SIGNAL(clicked()), this, TQT_SLOT(helpSelected()));
buttonClose->setGuiItem(KStdGuiItem::close());
- connect(buttonClose, SIGNAL(clicked()), this, SLOT(closeSelected()));
+ connect(buttonClose, TQT_SIGNAL(clicked()), this, TQT_SLOT(closeSelected()));
#if KDE_VERSION >= KDE_MAKE_VERSION (3,1,90)
buttonQuit->setGuiItem(KStdGuiItem::quit());
#endif // KDE 3.2
- connect(buttonQuit, SIGNAL(clicked()), this, SLOT(quitSelected()));
+ connect(buttonQuit, TQT_SIGNAL(clicked()), this, TQT_SLOT(quitSelected()));
// When we first start, it's nice to not click immediately.
// So, tell MT we're just starting
@@ -285,11 +285,11 @@ KMouseTool::KMouseTool(QWidget *parent, const char *name) : KMouseToolUI(parent,
startTimer(100);
trayIcon = new KMouseToolTray (this, "systemTrayIcon");
updateStartStopText ();
- connect(trayIcon, SIGNAL(startStopSelected()), this, SLOT(startStopSelected()));
- connect(trayIcon, SIGNAL(configureSelected()), this, SLOT(configureSelected()));
- connect(trayIcon, SIGNAL(aboutSelected()), this, SLOT(aboutSelected()));
- connect(trayIcon, SIGNAL(helpSelected()), this, SLOT(helpSelected()));
- connect(trayIcon, SIGNAL(quitSelected()), this, SLOT(quitSelected()));
+ connect(trayIcon, TQT_SIGNAL(startStopSelected()), this, TQT_SLOT(startStopSelected()));
+ connect(trayIcon, TQT_SIGNAL(configureSelected()), this, TQT_SLOT(configureSelected()));
+ connect(trayIcon, TQT_SIGNAL(aboutSelected()), this, TQT_SLOT(aboutSelected()));
+ connect(trayIcon, TQT_SIGNAL(helpSelected()), this, TQT_SLOT(helpSelected()));
+ connect(trayIcon, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(quitSelected()));
aboutDlg = new KAboutApplication (0, "KMouseToolDlg", false);
}
@@ -381,19 +381,19 @@ int CursorHasMoved (int minMovement)
bool KMouseTool::isAutostart()
{
- QString sym = autostartdirname;
+ TQString sym = autostartdirname;
sym += "kmousetool"; // sym is now full path to symlink
- QFileInfo fi(sym);
+ TQFileInfo fi(sym);
return fi.exists();
}
void KMouseTool::setAutostart (bool start)
{
- QString sym = autostartdirname;
+ TQString sym = autostartdirname;
sym += "kmousetool"; // sym is now full path to symlink
- QFileInfo fi(sym);
- QString cmd;
+ TQFileInfo fi(sym);
+ TQString cmd;
if (start) {
if (!fi.exists()) // if it doesn't exist, make it
@@ -448,7 +448,7 @@ void KMouseTool::loadOptions()
min_movement = kapp->config()->readNumEntry("Movement",5);
strokesEnabled = kapp->config()->readBoolEntry("strokesEnabled",false);
- QPoint p;
+ TQPoint p;
int x = kapp->config()->readNumEntry("x",0);
int y = kapp->config()->readNumEntry("y",0);
p.setX(x);
@@ -462,7 +462,7 @@ void KMouseTool::loadOptions()
// Save options to kmousetoolrc file
void KMouseTool::saveOptions()
{
- QPoint p = pos();
+ TQPoint p = pos();
int x = p.x();
int y = p.y();
@@ -608,17 +608,17 @@ void KMouseTool::aboutSelected()
-KMouseToolTray::KMouseToolTray (QWidget *parent, const char *name) : KSystemTray (parent, name)
+KMouseToolTray::KMouseToolTray (TQWidget *parent, const char *name) : KSystemTray (parent, name)
{
- startStopId = contextMenu()->insertItem (i18n("&Start"), this, SIGNAL(startStopSelected()));
+ startStopId = contextMenu()->insertItem (i18n("&Start"), this, TQT_SIGNAL(startStopSelected()));
contextMenu()->insertSeparator();
contextMenu()->insertItem (KGlobal::iconLoader()->loadIcon("configure", KIcon::Small),
- i18n("&Configure KMouseTool..."), this, SIGNAL(configureSelected()));
+ i18n("&Configure KMouseTool..."), this, TQT_SIGNAL(configureSelected()));
contextMenu()->insertSeparator();
contextMenu()->insertItem (KGlobal::iconLoader()->loadIcon("contents", KIcon::Small),
- i18n("KMousetool &Handbook"), this, SIGNAL(helpSelected()));
+ i18n("KMousetool &Handbook"), this, TQT_SIGNAL(helpSelected()));
contextMenu()->insertItem (KGlobal::iconLoader()->loadIcon("kmousetool", KIcon::Small),
- i18n("&About KMouseTool"), this, SIGNAL(aboutSelected()));
+ i18n("&About KMouseTool"), this, TQT_SIGNAL(aboutSelected()));
}
KMouseToolTray::~KMouseToolTray() {
@@ -626,7 +626,7 @@ KMouseToolTray::~KMouseToolTray() {
void KMouseToolTray::updateStartStopText(bool mousetool_is_running)
{
- QPixmap icon;
+ TQPixmap icon;
if (mousetool_is_running) {
contextMenu()->changeItem (startStopId, i18n("&Stop"));
diff --git a/kmousetool/kmousetool/kmousetool.h b/kmousetool/kmousetool/kmousetool.h
index 88a05ec..add8f08 100644
--- a/kmousetool/kmousetool/kmousetool.h
+++ b/kmousetool/kmousetool/kmousetool.h
@@ -22,7 +22,7 @@
#ifndef KMOUSETOOL_H
#define KMOUSETOOL_H
-#include <qdir.h>
+#include <tqdir.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -32,7 +32,7 @@
#include <kapplication.h>
#include <ksystemtray.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include "mtstroke.h"
#include "kmousetoolui.h"
@@ -74,9 +74,9 @@ private:
bool moving;
bool strokesEnabled;
- QString autostartdirname;
- QString rcfilename;
- QString appfilename;
+ TQString autostartdirname;
+ TQString rcfilename;
+ TQString appfilename;
QString mSoundFileName;
KAudioPlayer *mplayer;
KMouseToolTray *trayIcon;
@@ -175,7 +175,7 @@ public:
* current mouse position to its previous position to see
* whether to send a down click, and up click, or wait.
*/
- void timerEvent (QTimerEvent *e);
+ void timerEvent (TQTimerEvent *e);
/**
* This generates a normal click event --
@@ -186,7 +186,7 @@ public:
/**
* construtor
*/
- KMouseTool(QWidget* parent=0, const char *name=0);
+ KMouseTool(TQWidget* parent=0, const char *name=0);
/** destructor */
~KMouseTool();
@@ -196,7 +196,7 @@ class KMouseToolTray : public KSystemTray {
Q_OBJECT
int startStopId;
public:
- KMouseToolTray (QWidget *parent=0, const char *name=0);
+ KMouseToolTray (TQWidget *parent=0, const char *name=0);
~KMouseToolTray();
void updateStartStopText (bool mousetool_is_running);
diff --git a/kmousetool/kmousetool/main.cpp b/kmousetool/kmousetool/main.cpp
index 29c5e30..6267d57 100644
--- a/kmousetool/kmousetool/main.cpp
+++ b/kmousetool/kmousetool/main.cpp
@@ -23,7 +23,7 @@
#include <kstandarddirs.h>
#include <kuniqueapplication.h>
#include <dcopclient.h>
-#include <qmessagebox.h>
+#include <tqmessagebox.h>
#include <kconfig.h>
#include "kmousetool.h"
@@ -57,9 +57,9 @@ int main(int argc, char *argv[])
if (!KUniqueApplication::start()) {
DCOPClient *client = new DCOPClient();
client->attach();
- QByteArray data;
- QCString replyType;
- QByteArray replyData;
+ TQByteArray data;
+ TQCString replyType;
+ TQByteArray replyData;
if ( !client->call("kmousetool", "qt/KMouseToolUI", "show()",
data, replyType, replyData, true) ||
!client->call("kmousetool", "qt/KMouseToolUI", "raise()",
diff --git a/kmousetool/kmousetool/mtstroke.cpp b/kmousetool/kmousetool/mtstroke.cpp
index 16b1078..d4ec242 100644
--- a/kmousetool/kmousetool/mtstroke.cpp
+++ b/kmousetool/kmousetool/mtstroke.cpp
@@ -23,7 +23,7 @@
// these are for locating the stroke information file
#include <kstandarddirs.h>
-#include <qstring.h>
+#include <tqstring.h>
// #include <string>
@@ -186,7 +186,7 @@ void MTStroke::getExtent()
// if unable to create it,
bool MTStroke::readSequence()
{
- QString strokefilename;
+ TQString strokefilename;
strokefilename = locate("config", "kmousetool_strokes.txt");
if (strokefilename.isEmpty()) {
// make default
@@ -222,7 +222,7 @@ bool MTStroke::readSequence()
bool MTStroke::writeSequence()
{
- QString strokefilename;
+ TQString strokefilename;
strokefilename = locateLocal("config", "kmousetool_strokes.txt");
ofstream outfile (strokefilename.ascii(), ios::out);
diff --git a/kmouth/configwizard.cpp b/kmouth/configwizard.cpp
index d22c463..3d99005 100644
--- a/kmouth/configwizard.cpp
+++ b/kmouth/configwizard.cpp
@@ -17,8 +17,8 @@
#include "configwizard.h"
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klistview.h>
#include <klocale.h>
#include <kapplication.h>
@@ -31,7 +31,7 @@
#include "wordcompletion/wordcompletion.h"
#include "wordcompletion/dictionarycreationwizard.h"
-ConfigWizard::ConfigWizard (QWidget *parent, const char *name, KConfig *config)
+ConfigWizard::ConfigWizard (TQWidget *parent, const char *name, KConfig *config)
: KWizard(parent, name, true)
{
setCaption (i18n("Initial Configuration - KMouth"));
@@ -63,7 +63,7 @@ void ConfigWizard::initCommandPage(KConfig *config) {
}
void ConfigWizard::initBookPage() {
- QString standardBook = KApplication::kApplication()->dirs()->findResource("appdata", "standard.phrasebook");
+ TQString standardBook = KApplication::kApplication()->dirs()->findResource("appdata", "standard.phrasebook");
bool displayBook = (standardBook.isNull() || standardBook.isEmpty());
if (displayBook) {
@@ -80,15 +80,15 @@ void ConfigWizard::initBookPage() {
void ConfigWizard::initCompletion (KConfig *config) {
if (!WordCompletion::isConfigured()) {
- QString dictionaryFile = KApplication::kApplication()->dirs()->findResource("appdata", "dictionary.txt");
- QFile file(dictionaryFile);
+ TQString dictionaryFile = KApplication::kApplication()->dirs()->findResource("appdata", "dictionary.txt");
+ TQFile file(dictionaryFile);
if (file.exists()) {
// If there is a word completion dictionary but no entry in the
// configuration file, we need to add it there.
config->setGroup("Dictionary 0");
config->writeEntry ("Filename", "dictionary.txt");
config->writeEntry ("Name", "Default");
- config->writeEntry ("Language", QString::null);
+ config->writeEntry ("Language", TQString::null);
config->sync();
}
}
@@ -128,7 +128,7 @@ void ConfigWizard::saveConfig (KConfig *config) {
bool ConfigWizard::requestConfiguration () {
if (commandWidget != 0 || bookWidget != 0 || completionWidget != 0)
- return (exec() == QDialog::Accepted);
+ return (exec() == TQDialog::Accepted);
else
return false;
}
diff --git a/kmouth/configwizard.h b/kmouth/configwizard.h
index 8ddcb60..112e25a 100644
--- a/kmouth/configwizard.h
+++ b/kmouth/configwizard.h
@@ -19,7 +19,7 @@
#ifndef CONFIGWIZARD_H
#define CONFIGWIZARD_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kwizard.h>
@@ -36,7 +36,7 @@ class CompletionWizardWidget;
class ConfigWizard : public KWizard {
Q_OBJECT
public:
- ConfigWizard (QWidget *parent, const char *name, KConfig *config);
+ ConfigWizard (TQWidget *parent, const char *name, KConfig *config);
~ConfigWizard();
bool configurationNeeded ();
diff --git a/kmouth/kmouth.cpp b/kmouth/kmouth.cpp
index c78a010..76c715f 100644
--- a/kmouth/kmouth.cpp
+++ b/kmouth/kmouth.cpp
@@ -16,8 +16,8 @@
***************************************************************************/
// include files for QT
-#include <qdir.h>
-#include <qpainter.h>
+#include <tqdir.h>
+#include <tqpainter.h>
// include files for KDE
#include <kiconloader.h>
@@ -40,7 +40,7 @@
#define ID_STATUS_MSG 1
-KMouthApp::KMouthApp(QWidget* , const char* name):KMainWindow(0, name)
+KMouthApp::KMouthApp(TQWidget* , const char* name):KMainWindow(0, name)
{
isConfigured = false;
config=kapp->config();
@@ -51,10 +51,10 @@ KMouthApp::KMouthApp(QWidget* , const char* name):KMainWindow(0, name)
initPhraseList();
initActions();
optionsDialog = new OptionsDialog(this);
- connect (optionsDialog, SIGNAL(configurationChanged ()),
- this, SLOT(slotConfigurationChanged ()));
- connect (optionsDialog, SIGNAL(configurationChanged ()),
- phraseList, SLOT(configureCompletion ()));
+ connect (optionsDialog, TQT_SIGNAL(configurationChanged ()),
+ this, TQT_SLOT(slotConfigurationChanged ()));
+ connect (optionsDialog, TQT_SIGNAL(configurationChanged ()),
+ phraseList, TQT_SLOT(configureCompletion ()));
phrases = new KActionCollection (this);
@@ -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, SLOT(slotFileOpen()), actionCollection(),"file_open");
+ fileOpen = new KAction(i18n("&Open as History..."), "phrasehistory_open", KStdAccel::open(), 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, SLOT(slotFileSaveAs()), actionCollection(),"file_save_as");
+ fileSaveAs = new KAction(i18n("Save &History As..."), "phrasehistory_save", KStdAccel::save(), 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, SLOT(slotFilePrint()), actionCollection(),"file_print");
+ filePrint = new KAction(i18n("&Print History..."), "phrasehistory_print", KStdAccel::print(), 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, SLOT(slotFileQuit()), actionCollection());
+ fileQuit = KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection());
fileQuit->setStatusText(i18n("Quits the application"));
fileQuit->setWhatsThis (i18n("Quits the application"));
// The "Edit" menu
- editCut = KStdAction::cut(phraseList, SLOT(cut()), actionCollection());
+ editCut = KStdAction::cut(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, SLOT(copy()), actionCollection());
+ editCopy = KStdAction::copy(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, SLOT(paste()), actionCollection());
+ editPaste = KStdAction::paste(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, SLOT(speak()), actionCollection(),"edit_speak");
+ editSpeak = new KAction (i18n("&Speak"), "speak", 0, 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, SLOT(slotEditPhrasebook()), actionCollection(),"phrasebook_edit");
+ phrasebookEdit = new KAction(i18n("&Edit..."), 0, 0, this, TQT_SLOT(slotEditPhrasebook()), actionCollection(),"phrasebook_edit");
// The "Options" menu
- viewMenuBar = KStdAction::showMenubar(this, SLOT(slotViewMenuBar()), actionCollection());
- viewToolBar = KStdAction::showToolbar(this, SLOT(slotViewToolBar()), actionCollection());
+ viewMenuBar = KStdAction::showMenubar(this, TQT_SLOT(slotViewMenuBar()), actionCollection());
+ viewToolBar = KStdAction::showToolbar(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, SLOT(slotViewPhrasebookBar()), actionCollection(), "showPhrasebookBar");
+ viewPhrasebookBar = new KToggleAction (i18n("Show P&hrasebook Bar"), 0, 0, 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, SLOT(slotViewStatusBar()), actionCollection());
+ viewStatusBar = KStdAction::showStatusbar(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, SLOT(slotConfigureTTS()), actionCollection(), "configureTTS");
+ configureTTS = new KAction (i18n("&Configure KMouth..."), "configure", 0, 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, SLOT(speakListSelection()), actionCollection(), "phraselist_speak");
+ phraseListSpeak = new KAction (i18n("&Speak"), "speak", 0, 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, SLOT(removeListSelection()), actionCollection(), "phraselist_remove");
+ phraseListRemove = new KAction (i18n("&Delete"), "editdelete", 0, 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, SLOT(cutListSelection()), actionCollection(), "phraselist_cut");
+ phraseListCut = new KAction (i18n("Cu&t"), "editcut", 0, 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, SLOT(copyListSelection()), actionCollection(), "phraselist_copy");
+ phraseListCopy = new KAction (i18n("&Copy"), "editcopy", 0, 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, SLOT(selectAllEntries()), actionCollection(),"phraselist_select_all");
+ phraselistSelectAll = new KAction (i18n("Select &All Entries"), 0, 0, 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, SLOT(deselectAllEntries()), actionCollection(),"phraselist_deselect_all");
+ phraselistDeselectAll = new KAction (i18n("D&eselect All Entries"), 0, 0, 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"));
@@ -255,7 +255,7 @@ void KMouthApp::readOptions()
toolBarPos=(KToolBar::BarPosition) config->readNumEntry("ToolBarPos", KToolBar::Top);
toolBar("mainToolBar")->setBarPos(toolBarPos);
- QSize size=config->readSizeEntry("Geometry");
+ TQSize size=config->readSizeEntry("Geometry");
if(!size.isEmpty())
{
resize(size);
@@ -266,7 +266,7 @@ void KMouthApp::readOptions()
toolBar("mainToolBar")->applySettings (config, "mainToolBar");
toolBar("phrasebookBar")->applySettings (config, "phrasebookBar");
- QString standardBook = KApplication::kApplication()->dirs()->findResource("appdata", "standard.phrasebook");
+ TQString standardBook = KApplication::kApplication()->dirs()->findResource("appdata", "standard.phrasebook");
if (!standardBook.isEmpty()) {
PhraseBook book;
book.open(KURL::fromPathOrURL( standardBook ));
@@ -302,7 +302,7 @@ void KMouthApp::enableMenuEntries(bool existSelectedEntries, bool existDeselecte
}
/////////////////////////////////////////////////////////////////////
-// SLOT IMPLEMENTATION
+// TQT_SLOT IMPLEMENTATION
/////////////////////////////////////////////////////////////////////
void KMouthApp::slotFileOpen() {
@@ -358,10 +358,10 @@ void KMouthApp::slotEditPhrasebook () {
PhraseBookDialog *phraseBookDialog = PhraseBookDialog::get();
// As we do not know whether the we are already connected to the slot,
// we first disconnect and then connect again.
- disconnect (phraseBookDialog, SIGNAL(phrasebookConfirmed (PhraseBook &)),
- this, SLOT(slotPhrasebookConfirmed (PhraseBook &)));
- connect (phraseBookDialog, SIGNAL(phrasebookConfirmed (PhraseBook &)),
- this, SLOT(slotPhrasebookConfirmed (PhraseBook &)));
+ disconnect (phraseBookDialog, TQT_SIGNAL(phrasebookConfirmed (PhraseBook &)),
+ this, TQT_SLOT(slotPhrasebookConfirmed (PhraseBook &)));
+ connect (phraseBookDialog, TQT_SIGNAL(phrasebookConfirmed (PhraseBook &)),
+ this, TQT_SLOT(slotPhrasebookConfirmed (PhraseBook &)));
// As we do not know whether the phrase book edit window is already open,
// we first open and then raise it, so that it is surely the top window.
@@ -437,7 +437,7 @@ void KMouthApp::slotConfigureTTS() {
}
-void KMouthApp::slotStatusMsg(const QString &text)
+void KMouthApp::slotStatusMsg(const TQString &text)
{
///////////////////////////////////////////////////////////////////
// change status message permanently
@@ -446,8 +446,8 @@ void KMouthApp::slotStatusMsg(const QString &text)
}
void KMouthApp::slotPhrasebookConfirmed (PhraseBook &book) {
- QString name = "phrasebooks";
- QPopupMenu *popup = (QPopupMenu *)factory()->container(name, this);
+ TQString name = "phrasebooks";
+ TQPopupMenu *popup = (TQPopupMenu *)factory()->container(name, this);
KToolBar *toolbar = toolBar ("phrasebookBar");
KActionPtrList actions = phrases->actions ();
@@ -458,9 +458,9 @@ void KMouthApp::slotPhrasebookConfirmed (PhraseBook &book) {
delete phrases;
phrases = new KActionCollection (this, actionCollection());
- book.addToGUI (popup, toolbar, phrases, this, SLOT(slotPhraseSelected (const QString &)));
+ book.addToGUI (popup, toolbar, phrases, this, TQT_SLOT(slotPhraseSelected (const TQString &)));
- QString bookLocation = KApplication::kApplication()->dirs()->saveLocation ("appdata", "/");
+ TQString bookLocation = KApplication::kApplication()->dirs()->saveLocation ("appdata", "/");
if (!bookLocation.isNull() && !bookLocation.isEmpty()) {
book.save (KURL::fromPathOrURL( bookLocation + "standard.phrasebook" ));
}
@@ -471,7 +471,7 @@ void KMouthApp::slotConfigurationChanged()
optionsDialog->saveOptions (config);
}
-void KMouthApp::slotPhraseSelected (const QString &phrase) {
+void KMouthApp::slotPhraseSelected (const TQString &phrase) {
phraseList->insert (phrase);
if (optionsDialog->isSpeakImmediately())
phraseList->speak ();
diff --git a/kmouth/kmouth.h b/kmouth/kmouth.h
index 6ff6bad..ba7756d 100644
--- a/kmouth/kmouth.h
+++ b/kmouth/kmouth.h
@@ -60,7 +60,7 @@ class KMouthApp : public KMainWindow
public:
/** construtor of KMouthApp, calls all init functions to create the application.
*/
- KMouthApp(QWidget* parent=0, const char* name=0);
+ KMouthApp(TQWidget* parent=0, const char* name=0);
~KMouthApp();
/** Returns true if the configuration wizard was not needed or when it
* was successfully completed.
@@ -139,13 +139,13 @@ class KMouthApp : public KMainWindow
/** changes the statusbar contents for the standard label permanently, used to indicate current actions.
* @param text the text that is displayed in the statusbar
*/
- void slotStatusMsg(const QString &text);
+ void slotStatusMsg(const TQString &text);
void slotPhrasebookConfirmed (PhraseBook &book);
void slotConfigurationChanged();
- void slotPhraseSelected (const QString &phrase);
+ void slotPhraseSelected (const TQString &phrase);
private:
bool isConfigured;
diff --git a/kmouth/optionsdialog.cpp b/kmouth/optionsdialog.cpp
index 4873167..a16e1e4 100644
--- a/kmouth/optionsdialog.cpp
+++ b/kmouth/optionsdialog.cpp
@@ -16,13 +16,13 @@
***************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
-#include <qgrid.h>
-#include <qtabwidget.h>
-#include <qpixmap.h>
-#include <qfile.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
+#include <tqgrid.h>
+#include <tqtabwidget.h>
+#include <tqpixmap.h>
+#include <tqfile.h>
#include <kcombobox.h>
#include <klocale.h>
@@ -39,7 +39,7 @@
#include "texttospeechconfigurationwidget.h"
#include "speech.h"
-PreferencesWidget::PreferencesWidget (QWidget *parent, const char *name)
+PreferencesWidget::PreferencesWidget (TQWidget *parent, const char *name)
: PreferencesUI (parent, name)
{
speakCombo->setCurrentItem (1);
@@ -113,16 +113,16 @@ bool PreferencesWidget::isSpeakImmediately () {
/***************************************************************************/
-OptionsDialog::OptionsDialog (QWidget *parent)
+OptionsDialog::OptionsDialog (TQWidget *parent)
: KDialogBase(IconList, i18n("Configuration"), Ok|Apply|Cancel|Help, Ok,
parent, "configuration", false, true)
{
setHelp ("config-dialog");
- QPixmap iconGeneral = KGlobal::iconLoader()->loadIcon("configure", KIcon::NoGroup, KIcon::SizeMedium);
- QGrid *pageGeneral = addGridPage (1, Qt::Horizontal, i18n("General Options"), QString::null, iconGeneral);
+ TQPixmap iconGeneral = KGlobal::iconLoader()->loadIcon("configure", KIcon::NoGroup, KIcon::SizeMedium);
+ TQGrid *pageGeneral = addGridPage (1, Qt::Horizontal, i18n("General Options"), TQString::null, iconGeneral);
- tabCtl = new QTabWidget (pageGeneral, "general");
+ tabCtl = new TQTabWidget (pageGeneral, "general");
behaviourWidget = new PreferencesWidget (tabCtl, "prefPage");
behaviourWidget->layout()->setMargin(KDialog::marginHint());
@@ -132,17 +132,17 @@ OptionsDialog::OptionsDialog (QWidget *parent)
commandWidget->layout()->setMargin(KDialog::marginHint());
tabCtl->addTab (commandWidget, i18n("&Text-to-Speech"));
- QPixmap iconCompletion = KGlobal::iconLoader()->loadIcon("keyboard", KIcon::NoGroup, KIcon::SizeMedium);
- QGrid *pageCompletion = addGridPage (1, Qt::Horizontal, i18n("Word Completion"), QString::null, iconCompletion);
+ TQPixmap iconCompletion = KGlobal::iconLoader()->loadIcon("keyboard", KIcon::NoGroup, KIcon::SizeMedium);
+ TQGrid *pageCompletion = addGridPage (1, Qt::Horizontal, i18n("Word Completion"), TQString::null, iconCompletion);
completionWidget = new WordCompletionWidget(pageCompletion, "Word Completion widget");
kttsd = loadKttsd();
if (kttsd != 0) {
- QPixmap iconKttsd = KGlobal::iconLoader()->loadIcon("multimedia", KIcon::NoGroup, KIcon::SizeMedium);
- QGrid *pageKttsd = addGridPage (1, Qt::Horizontal, i18n("KTTSD Speech Service"),
+ TQPixmap iconKttsd = KGlobal::iconLoader()->loadIcon("multimedia", KIcon::NoGroup, KIcon::SizeMedium);
+ TQGrid *pageKttsd = addGridPage (1, Qt::Horizontal, i18n("KTTSD Speech Service"),
i18n("KDE Text-to-Speech Daemon Configuration"), iconKttsd);
- kttsd->reparent(pageKttsd,0,QPoint(0,0),true);
+ kttsd->reparent(pageKttsd,0,TQPoint(0,0),true);
}
}
@@ -202,19 +202,19 @@ bool OptionsDialog::isSpeakImmediately () {
KCModule *OptionsDialog::loadKttsd () {
KLibLoader *loader = KLibLoader::self();
- QString libname = "kcm_kttsd";
- KLibrary *lib = loader->library(QFile::encodeName(libname));
+ TQString libname = "kcm_kttsd";
+ KLibrary *lib = loader->library(TQFile::encodeName(libname));
if (lib == 0) {
libname = "libkcm_kttsd";
- lib = loader->library(QFile::encodeName("libkcm_kttsd"));
+ lib = loader->library(TQFile::encodeName("libkcm_kttsd"));
}
if (lib != 0) {
- QString initSym("init_");
+ TQString initSym("init_");
initSym += libname;
- if (lib->hasSymbol(QFile::encodeName(initSym))) {
+ if (lib->hasSymbol(TQFile::encodeName(initSym))) {
// Reuse "lib" instead of letting createInstanceFromLibrary recreate it
KLibFactory *factory = lib->factory();
if (factory != 0) {
@@ -231,8 +231,8 @@ KCModule *OptionsDialog::loadKttsd () {
void OptionsDialog::unloadKttsd () {
KLibLoader *loader = KLibLoader::self();
- loader->unloadLibrary(QFile::encodeName("libkcm_kttsd"));
- loader->unloadLibrary(QFile::encodeName("kcm_kttsd"));
+ loader->unloadLibrary(TQFile::encodeName("libkcm_kttsd"));
+ loader->unloadLibrary(TQFile::encodeName("kcm_kttsd"));
}
#include "optionsdialog.moc"
diff --git a/kmouth/optionsdialog.h b/kmouth/optionsdialog.h
index 8597e70..b9b796f 100644
--- a/kmouth/optionsdialog.h
+++ b/kmouth/optionsdialog.h
@@ -20,7 +20,7 @@
#ifndef OPTIONSDIALOG_H
#define OPTIONSDIALOG_H
-#include <qobject.h>
+#include <tqobject.h>
#include "preferencesui.h"
#include "texttospeechconfigurationwidget.h"
class QTabWidget;
@@ -34,7 +34,7 @@ class WordCompletionWidget;
class PreferencesWidget : public PreferencesUI {
Q_OBJECT
public:
- PreferencesWidget(QWidget *parent, const char *name);
+ PreferencesWidget(TQWidget *parent, const char *name);
~PreferencesWidget();
void readOptions (KConfig *config);
@@ -57,7 +57,7 @@ private:
class OptionsDialog : public KDialogBase {
Q_OBJECT
public:
- OptionsDialog(QWidget *parent);
+ OptionsDialog(TQWidget *parent);
~OptionsDialog();
void slotCancel();
@@ -75,7 +75,7 @@ signals:
void configurationChanged ();
private:
- QTabWidget *tabCtl;
+ TQTabWidget *tabCtl;
TextToSpeechConfigurationWidget *commandWidget;
PreferencesWidget *behaviourWidget;
KCModule *kttsd;
diff --git a/kmouth/phrasebook/phrasebook.cpp b/kmouth/phrasebook/phrasebook.cpp
index 0ec8da3..cc5d900 100644
--- a/kmouth/phrasebook/phrasebook.cpp
+++ b/kmouth/phrasebook/phrasebook.cpp
@@ -15,12 +15,12 @@
* *
***************************************************************************/
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qfile.h>
-#include <qxml.h>
-#include <qregexp.h>
-#include <qptrstack.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqfile.h>
+#include <tqxml.h>
+#include <tqregexp.h>
+#include <tqptrstack.h>
#include <klocale.h>
#include <kaction.h>
@@ -40,29 +40,29 @@ Phrase::Phrase() {
this->shortcut = "";
}
-Phrase::Phrase (const QString &phrase) {
+Phrase::Phrase (const TQString &phrase) {
this->phrase = phrase;
this->shortcut = "";
}
-Phrase::Phrase (const QString &phrase, const QString &shortcut) {
+Phrase::Phrase (const TQString &phrase, const TQString &shortcut) {
this->phrase = phrase;
this->shortcut = shortcut;
}
-QString Phrase::getPhrase() const {
+TQString Phrase::getPhrase() const {
return phrase;
}
-QString Phrase::getShortcut() const {
+TQString Phrase::getShortcut() const {
return shortcut;
}
-void Phrase::setPhrase (const QString &phrase) {
+void Phrase::setPhrase (const TQString &phrase) {
this->phrase = phrase;
}
-void Phrase::setShortcut (const QString &shortcut) {
+void Phrase::setShortcut (const TQString &shortcut) {
this->shortcut = shortcut;
}
@@ -95,19 +95,19 @@ int PhraseBookEntry::getLevel() const {
// ***************************************************************************
void PhraseBook::print(KPrinter *pPrinter) {
- QPainter printpainter;
+ TQPainter printpainter;
printpainter.begin(pPrinter);
- QRect size = printpainter.viewport ();
+ TQRect size = printpainter.viewport ();
int x = size.x();
int y = size.y();
int w = size.width();
- printpainter.setFont (QFont (KGlobalSettings::generalFont().family(), 12));
- QFontMetrics metrics = printpainter.fontMetrics();
+ printpainter.setFont (TQFont (KGlobalSettings::generalFont().family(), 12));
+ TQFontMetrics metrics = printpainter.fontMetrics();
PhraseBookEntryList::iterator it;
for (it = begin(); it != end(); ++it) {
- QRect rect = metrics.boundingRect (x+16*(*it).getLevel(), y,
+ TQRect rect = metrics.boundingRect (x+16*(*it).getLevel(), y,
w-16*(*it).getLevel(), 0,
Qt::AlignJustify | Qt::WordBreak,
(*it).getPhrase().getPhrase());
@@ -126,15 +126,15 @@ void PhraseBook::print(KPrinter *pPrinter) {
printpainter.end();
}
-bool PhraseBook::decode (const QString &xml) {
- QXmlInputSource source;
+bool PhraseBook::decode (const TQString &xml) {
+ TQXmlInputSource source;
source.setData (xml);
return decode (source);
}
-bool PhraseBook::decode (QXmlInputSource &source) {
+bool PhraseBook::decode (TQXmlInputSource &source) {
PhraseBookParser parser;
- QXmlSimpleReader reader;
+ TQXmlSimpleReader reader;
reader.setFeature ("http://trolltech.com/xml/features/report-start-end-entity", true);
reader.setContentHandler (&parser);
@@ -147,12 +147,12 @@ bool PhraseBook::decode (QXmlInputSource &source) {
return false;
}
-QCString encodeString (const QString str) {
- QCString res = "";
+TQCString encodeString (const TQString str) {
+ TQCString res = "";
for (int i = 0; i < (int)str.length(); i++) {
- QChar ch = str.at(i);
+ TQChar ch = str.at(i);
ushort uc = ch.unicode();
- QCString number; number.setNum(uc);
+ TQCString number; number.setNum(uc);
if ((uc>127) || (uc<32) || (ch=='<') || (ch=='>') || (ch=='&') || (ch==';'))
res = res + "&#" + number + ";";
else
@@ -161,8 +161,8 @@ QCString encodeString (const QString str) {
return res;
}
-QString PhraseBook::encode () {
- QString result;
+TQString PhraseBook::encode () {
+ TQString result;
result = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
result += "<!DOCTYPE phrasebook>\n";
result += "<phrasebook>\n";
@@ -199,8 +199,8 @@ QString PhraseBook::encode () {
return result;
}
-QStringList PhraseBook::toStringList () {
- QStringList result;
+TQStringList PhraseBook::toStringList () {
+ TQStringList result;
PhraseBook::iterator it;
for (it = begin(); it != end(); ++it) {
@@ -211,12 +211,12 @@ QStringList PhraseBook::toStringList () {
}
bool PhraseBook::save (const KURL &url) {
- QRegExp pattern("*.phrasebook",true,true);
+ TQRegExp pattern("*.phrasebook",true,true);
return save (url, pattern.exactMatch(url.filename()));
}
-void PhraseBook::save (QTextStream &stream, bool asPhrasebook) {
+void PhraseBook::save (TQTextStream &stream, bool asPhrasebook) {
if (asPhrasebook)
stream << encode();
else
@@ -225,11 +225,11 @@ void PhraseBook::save (QTextStream &stream, bool asPhrasebook) {
bool PhraseBook::save (const KURL &url, bool asPhrasebook) {
if (url.isLocalFile()) {
- QFile file(url.path());
+ TQFile file(url.path());
if(!file.open(IO_WriteOnly))
return false;
- QTextStream stream(&file);
+ TQTextStream stream(&file);
save (stream, asPhrasebook);
file.close();
@@ -249,21 +249,21 @@ bool PhraseBook::save (const KURL &url, bool asPhrasebook) {
}
}
-int PhraseBook::save (QWidget *parent, const QString &title, KURL &url, bool phrasebookFirst) {
+int PhraseBook::save (TQWidget *parent, const TQString &title, KURL &url, bool phrasebookFirst) {
// KFileDialog::getSaveURL(...) is not useful here as we need
// to know the requested file type.
- QString filters;
+ TQString filters;
if (phrasebookFirst)
filters = i18n("*.phrasebook|Phrase Books (*.phrasebook)\n*.txt|Plain Text Files (*.txt)\n*|All Files");
else
filters = i18n("*.txt|Plain Text Files (*.txt)\n*.phrasebook|Phrase Books (*.phrasebook)\n*|All Files");
- KFileDialog fdlg(QString::null,filters, parent, "filedialog", true);
+ KFileDialog fdlg(TQString::null,filters, parent, "filedialog", true);
fdlg.setCaption(title);
fdlg.setOperationMode( KFileDialog::Saving );
- if (fdlg.exec() != QDialog::Accepted) {
+ if (fdlg.exec() != TQDialog::Accepted) {
return 0;
}
@@ -274,7 +274,7 @@ int PhraseBook::save (QWidget *parent, const QString &title, KURL &url, bool phr
}
if (KIO::NetAccess::exists(url)) {
- if (KMessageBox::warningContinueCancel(0,QString("<qt>%1</qt>").arg(i18n("The file %1 already exists. "
+ if (KMessageBox::warningContinueCancel(0,TQString("<qt>%1</qt>").arg(i18n("The file %1 already exists. "
"Do you want to overwrite it?").arg(url.url())),i18n("File Exists"),i18n("&Overwrite"))==KMessageBox::Cancel) {
return 0;
}
@@ -286,7 +286,7 @@ int PhraseBook::save (QWidget *parent, const QString &title, KURL &url, bool phr
url.setFileName (url.fileName(false) + ".phrasebook");
}
else if (url.fileName (false).right (11).contains (".phrasebook", false) == 0) {
- int filetype = KMessageBox::questionYesNoCancel (0,QString("<qt>%1</qt>").arg(i18n("Your chosen filename <i>%1</i> has a different extension than <i>.phrasebook</i>. "
+ int filetype = KMessageBox::questionYesNoCancel (0,TQString("<qt>%1</qt>").arg(i18n("Your chosen filename <i>%1</i> has a different extension than <i>.phrasebook</i>. "
"Do you wish to add <i>.phrasebook</i> to the filename?").arg(url.filename())),i18n("File Extension"),i18n("Add"),i18n("Do Not Add"));
if (filetype == KMessageBox::Cancel) {
return 0;
@@ -302,7 +302,7 @@ int PhraseBook::save (QWidget *parent, const QString &title, KURL &url, bool phr
result = save (url, false);
}
else {
- int filetype = KMessageBox::questionYesNoCancel (0,QString("<qt>%1</qt>").arg(i18n("Your chosen filename <i>%1</i> has the extension <i>.phrasebook</i>. "
+ int filetype = KMessageBox::questionYesNoCancel (0,TQString("<qt>%1</qt>").arg(i18n("Your chosen filename <i>%1</i> has the extension <i>.phrasebook</i>. "
"Do you wish to save in phrasebook format?").arg(url.filename())),i18n("File Extension"),i18n("As Phrasebook"),i18n("As Plain Text"));
if (filetype == KMessageBox::Cancel) {
return 0;
@@ -325,21 +325,21 @@ int PhraseBook::save (QWidget *parent, const QString &title, KURL &url, bool phr
}
bool PhraseBook::open (const KURL &url) {
- QString tempFile;
+ TQString tempFile;
KURL fileUrl = url;
- QString protocol = fileUrl.protocol();
+ TQString protocol = fileUrl.protocol();
if (protocol.isEmpty() || protocol.isNull()) {
fileUrl.setProtocol ("file");
fileUrl.setPath (url.url());
}
if (KIO::NetAccess::download (fileUrl, tempFile)) {
- QStringList list = QStringList();
+ TQStringList list = TQStringList();
// First: try to load it as a normal phrase book
- QFile file(tempFile);
- QXmlInputSource source (&file);
+ TQFile file(tempFile);
+ TQXmlInputSource source (&file);
bool error = !decode (source);
// Second: if the file does not contain a phrase book, load it as
@@ -347,12 +347,12 @@ bool PhraseBook::open (const KURL &url) {
if (error) {
// Load each line of the plain text file as a new phrase
- QFile file(tempFile);
+ TQFile file(tempFile);
if (file.open(IO_ReadOnly)) {
- QTextStream stream(&file);
+ TQTextStream stream(&file);
while (!stream.atEnd()) {
- QString s = stream.readLine();
+ TQString s = stream.readLine();
if (!(s.isNull() || s.isEmpty()))
*this += PhraseBookEntry(Phrase(s, ""), 0, true);
}
@@ -370,14 +370,14 @@ bool PhraseBook::open (const KURL &url) {
return false;
}
-void PhraseBook::addToGUI (QPopupMenu *popup, KToolBar *toolbar, KActionCollection *phrases,
- QObject *receiver, const char *slot) const {
+void PhraseBook::addToGUI (TQPopupMenu *popup, KToolBar *toolbar, KActionCollection *phrases,
+ TQObject *receiver, const char *slot) const {
if ((popup != 0) || (toolbar != 0)) {
- QPtrStack<QWidget> stack;
- QWidget *parent = popup;
+ TQPtrStack<TQWidget> stack;
+ TQWidget *parent = popup;
int level = 0;
- QValueListConstIterator<PhraseBookEntry> it;
+ TQValueListConstIterator<PhraseBookEntry> it;
for (it = begin(); it != end(); ++it) {
int newLevel = (*it).getLevel();
while (newLevel > level) {
@@ -422,10 +422,10 @@ void PhraseBook::addToGUI (QPopupMenu *popup, KToolBar *toolbar, KActionCollecti
}
}
-void PhraseBook::insert (const QString &name, const PhraseBook &book) {
+void PhraseBook::insert (const TQString &name, const PhraseBook &book) {
*this += PhraseBookEntry(Phrase(name), 0, false);
- QValueListConstIterator<PhraseBookEntry> it;
+ TQValueListConstIterator<PhraseBookEntry> it;
for (it = book.begin(); it != book.end(); ++it) {
*this += PhraseBookEntry ((*it).getPhrase(), (*it).getLevel()+1, (*it).isPhrase());
}
@@ -433,14 +433,14 @@ void PhraseBook::insert (const QString &name, const PhraseBook &book) {
// ***************************************************************************
-PhraseBookDrag::PhraseBookDrag (PhraseBook *book, QWidget *dragSource, const char *name)
- : QDragObject (dragSource, name)
+PhraseBookDrag::PhraseBookDrag (PhraseBook *book, TQWidget *dragSource, const char *name)
+ : TQDragObject (dragSource, name)
{
setBook (book);
}
-PhraseBookDrag::PhraseBookDrag (QWidget *dragSource, const char *name)
- : QDragObject (dragSource, name)
+PhraseBookDrag::PhraseBookDrag (TQWidget *dragSource, const char *name)
+ : TQDragObject (dragSource, name)
{
setBook (0);
}
@@ -451,9 +451,9 @@ PhraseBookDrag::~PhraseBookDrag () {
void PhraseBookDrag::setBook (PhraseBook *book) {
if (book == 0) {
isEmpty = true;
- xmlphrasebook.setText(QString::null);
- xml.setText(QString::null);
- plain.setText(QString::null);
+ xmlphrasebook.setText(TQString::null);
+ xml.setText(TQString::null);
+ plain.setText(TQString::null);
}
else {
isEmpty = false;
@@ -477,8 +477,8 @@ const char *PhraseBookDrag::format (int i) const {
return xmlphrasebook.format(i/3);
}
-QByteArray PhraseBookDrag::encodedData (const char* mime) const {
- QCString m(mime);
+TQByteArray PhraseBookDrag::encodedData (const char* mime) const {
+ TQCString m(mime);
m = m.lower();
if (m.contains("xml-phrasebook"))
return xmlphrasebook.encodedData(mime);
@@ -488,18 +488,18 @@ QByteArray PhraseBookDrag::encodedData (const char* mime) const {
return plain.encodedData(mime);
}
-bool PhraseBookDrag::canDecode (const QMimeSource* e) {
- return QTextDrag::canDecode(e);
+bool PhraseBookDrag::canDecode (const TQMimeSource* e) {
+ return TQTextDrag::canDecode(e);
}
-bool PhraseBookDrag::decode (const QMimeSource *e, PhraseBook *book) {
- QString string;
- QCString subtype1 = "x-xml-phrasebook";
- QCString subtype2 = "xml";
+bool PhraseBookDrag::decode (const TQMimeSource *e, PhraseBook *book) {
+ TQString string;
+ TQCString subtype1 = "x-xml-phrasebook";
+ TQCString subtype2 = "xml";
- if (!QTextDrag::decode(e, string, subtype1))
- if (!QTextDrag::decode(e, string, subtype2)) {
- if (QTextDrag::decode(e, string)) {
+ if (!TQTextDrag::decode(e, string, subtype1))
+ if (!TQTextDrag::decode(e, string, subtype2)) {
+ if (TQTextDrag::decode(e, string)) {
*book += PhraseBookEntry(Phrase(string, ""), 0, true);
return true;
}
diff --git a/kmouth/phrasebook/phrasebook.h b/kmouth/phrasebook/phrasebook.h
index 83cb3a9..b0133b1 100644
--- a/kmouth/phrasebook/phrasebook.h
+++ b/kmouth/phrasebook/phrasebook.h
@@ -18,9 +18,9 @@
#ifndef PHRASEBOOK_H
#define PHRASEBOOK_H
-#include <qobject.h>
-#include <qdragobject.h>
-#include <qxml.h>
+#include <tqobject.h>
+#include <tqdragobject.h>
+#include <tqxml.h>
#include <kaction.h>
#include <kprinter.h>
@@ -35,18 +35,18 @@ class Phrase {
friend class PhraseBookParser;
public:
Phrase();
- Phrase (const QString &phrase);
- Phrase (const QString &phrase, const QString &shortcut);
+ Phrase (const TQString &phrase);
+ Phrase (const TQString &phrase, const TQString &shortcut);
- QString getPhrase() const;
- QString getShortcut() const;
+ TQString getPhrase() const;
+ TQString getShortcut() const;
- void setPhrase (const QString &phrase);
- void setShortcut (const QString &shortcut);
+ void setPhrase (const TQString &phrase);
+ void setShortcut (const TQString &shortcut);
private:
- QString phrase;
- QString shortcut;
+ TQString phrase;
+ TQString shortcut;
};
/**
@@ -72,7 +72,7 @@ private:
int level;
};
-typedef QValueList<PhraseBookEntry> PhraseBookEntryList;
+typedef TQValueList<PhraseBookEntry> PhraseBookEntryList;
/**
* The class PhraseBook implements a phrase book. It mainly stores a
@@ -96,10 +96,10 @@ public:
bool open (const KURL &url);
/** decodes a phrase book. Returns true if successful. */
- bool decode (const QString &xml);
+ bool decode (const TQString &xml);
/** decodes a phrase book. Returns true if successful. */
- bool decode (QXmlInputSource &source);
+ bool decode (TQXmlInputSource &source);
/** Writes the phrases to a file. Returns true if successful. */
bool save (const KURL &url);
@@ -107,8 +107,8 @@ public:
/** Writes the phrases to a file. Returns true if successful. */
bool save (const KURL &url, bool asPhrasebook);
- /** Writes the phrases to a QTextStream. */
- void save (QTextStream &stream, bool asPhrasebook);
+ /** Writes the phrases to a TQTextStream. */
+ void save (TQTextStream &stream, bool asPhrasebook);
/** Prints the phrases. */
void print (KPrinter *pPrinter);
@@ -118,63 +118,63 @@ public:
* 0, if the user canceled the operation,
* -1, if there was an error when saving the file.
*/
- int save (QWidget *parent, const QString &title, KURL &url, bool phrasebookFirst = true);
+ int save (TQWidget *parent, const TQString &title, KURL &url, bool phrasebookFirst = true);
/** encodes the phrase book. Returns the encoded xml code. */
- QString encode ();
+ TQString encode ();
- /** Stores all entries in a QStringList. All hierarchy information and all
+ /** Stores all entries in a TQStringList. All hierarchy information and all
* shortcuts are ignored during this operation.
*/
- QStringList toStringList();
+ TQStringList toStringList();
/** Adds the entries of the book to both the given popup menu and the given
* toolbar. The corresponding actions will be inserted into phrases.
*/
- void addToGUI (QPopupMenu *popup, KToolBar *toolbar,
+ void addToGUI (TQPopupMenu *popup, KToolBar *toolbar,
KActionCollection *phrases,
- QObject *receiver, const char *slot) const;
+ TQObject *receiver, const char *slot) const;
/** Inserts book into a new sub phrase book.
* @param name the name of the new sub phrase book.
* @param book the phrase book to insert.
*/
- void insert (const QString &name, const PhraseBook &book);
+ void insert (const TQString &name, const PhraseBook &book);
};
/**
* The class PhraseBookDrag implements drag and drop support for phrase books.
* @author Gunnar Schmi Dt
*/
-class PhraseBookDrag: public QDragObject {
+class PhraseBookDrag: public TQDragObject {
Q_OBJECT
public:
- PhraseBookDrag (PhraseBook *book, QWidget *dragSource = 0, const char *name = 0);
- PhraseBookDrag (QWidget *dragSource = 0, const char *name = 0);
+ PhraseBookDrag (PhraseBook *book, TQWidget *dragSource = 0, const char *name = 0);
+ PhraseBookDrag (TQWidget *dragSource = 0, const char *name = 0);
~PhraseBookDrag ();
virtual void setBook (PhraseBook *book);
const char *format (int i) const;
- virtual QByteArray encodedData (const char *) const;
+ virtual TQByteArray encodedData (const char *) const;
- static bool canDecode (const QMimeSource *e);
- static bool decode (const QMimeSource *e, PhraseBook *book);
+ static bool canDecode (const TQMimeSource *e);
+ static bool decode (const TQMimeSource *e, PhraseBook *book);
private:
bool isEmpty;
- QTextDrag xmlphrasebook;
- QTextDrag xml;
- QTextDrag plain;
+ TQTextDrag xmlphrasebook;
+ TQTextDrag xml;
+ TQTextDrag plain;
};
class PhraseAction : public KAction {
Q_OBJECT
public:
- PhraseAction (const QString& phrase, const QString& cut, const QObject* receiver, const char* slot, KActionCollection* parent)
+ 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()) {
this->phrase = phrase;
- connect (this, SIGNAL(slotActivated (const QString &)), receiver, slot);
+ connect (this, TQT_SIGNAL(slotActivated (const TQString &)), receiver, slot);
};
~PhraseAction () {
}
@@ -186,10 +186,10 @@ public slots:
}
signals:
- void slotActivated (const QString &phrase);
+ void slotActivated (const TQString &phrase);
private:
- QString phrase;
+ TQString phrase;
};
#endif
diff --git a/kmouth/phrasebook/phrasebookdialog.cpp b/kmouth/phrasebook/phrasebookdialog.cpp
index cc79d2f..2abe3d0 100644
--- a/kmouth/phrasebook/phrasebookdialog.cpp
+++ b/kmouth/phrasebook/phrasebookdialog.cpp
@@ -16,18 +16,18 @@
***************************************************************************/
// include files for QT
-#include <qapplication.h>
-#include <qlayout.h>
-#include <qclipboard.h>
-#include <qradiobutton.h>
-#include <qevent.h>
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qgroupbox.h>
-#include <qpopupmenu.h>
-#include <qvaluestack.h>
-#include <qptrstack.h>
-#include <qwhatsthis.h>
+#include <tqapplication.h>
+#include <tqlayout.h>
+#include <tqclipboard.h>
+#include <tqradiobutton.h>
+#include <tqevent.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqgroupbox.h>
+#include <tqpopupmenu.h>
+#include <tqvaluestack.h>
+#include <tqptrstack.h>
+#include <tqwhatsthis.h>
// include files for KDE
#include <kpopupmenu.h>
@@ -53,9 +53,9 @@ namespace PhraseBookPrivate {
};
}
-CheckBookItem::CheckBookItem (QListViewItem *parent, QListViewItem *last,
- const QString &text, const QString &name, const QString &filename)
- : QCheckListItem (parent, text, QCheckListItem::CheckBox)
+CheckBookItem::CheckBookItem (TQListViewItem *parent, TQListViewItem *last,
+ const TQString &text, const TQString &name, const TQString &filename)
+ : TQCheckListItem (parent, text, TQCheckListItem::CheckBox)
{
moveItem (last);
setText(PhraseBookPrivate::name, name);
@@ -70,9 +70,9 @@ CheckBookItem::CheckBookItem (QListViewItem *parent, QListViewItem *last,
((CheckBookItem*)parent)->childChange (numberOfBooks, selectedBooks);
}
-CheckBookItem::CheckBookItem (QListView *parent, QListViewItem *last,
- const QString &text, const QString &name, const QString &filename)
- : QCheckListItem (parent, text, QCheckListItem::CheckBox)
+CheckBookItem::CheckBookItem (TQListView *parent, TQListViewItem *last,
+ const TQString &text, const TQString &name, const TQString &filename)
+ : TQCheckListItem (parent, text, TQCheckListItem::CheckBox)
{
moveItem (last);
setText(PhraseBookPrivate::name, name);
@@ -90,7 +90,7 @@ CheckBookItem::~CheckBookItem () {
}
void CheckBookItem::activate() {
- QListView *lv = listView();
+ TQListView *lv = listView();
if ((lv != 0) && (!lv->isEnabled()) || (!isEnabled()))
return;
@@ -100,9 +100,9 @@ void CheckBookItem::activate() {
}
void CheckBookItem::stateChange (bool on) {
- QListViewItem *item = firstChild();
+ TQListViewItem *item = firstChild();
if (item == 0) {
- QListViewItem *parent = this->parent();
+ TQListViewItem *parent = this->parent();
if (parent != 0) {
if (on)
((CheckBookItem*)parent)->childChange (0, 1);
@@ -114,10 +114,10 @@ void CheckBookItem::stateChange (bool on) {
}
void CheckBookItem::propagateStateChange () {
- QListViewItem *item = firstChild();
+ TQListViewItem *item = firstChild();
while (item != 0) {
- if (isOn() != ((QCheckListItem*)item)->isOn())
- ((QCheckListItem*)item)->setOn (isOn());
+ if (isOn() != ((TQCheckListItem*)item)->isOn())
+ ((TQCheckListItem*)item)->setOn (isOn());
else
((CheckBookItem*)item)->propagateStateChange ();
item = item->nextSibling();
@@ -127,22 +127,22 @@ void CheckBookItem::propagateStateChange () {
void CheckBookItem::childChange (int numberDiff, int selDiff) {
numberOfBooks += numberDiff;
selectedBooks += selDiff;
- QListViewItem *parent = this->parent();
+ TQListViewItem *parent = this->parent();
if (parent != 0)
((CheckBookItem*)parent)->childChange (numberDiff, selDiff);
- QString text = i18n(" (%1 of %2 books selected)");
+ TQString text = i18n(" (%1 of %2 books selected)");
text = text.arg(selectedBooks).arg(numberOfBooks);
setText(0, this->text(PhraseBookPrivate::name)+text);
}
/***************************************************************************/
-InitialPhraseBookWidget::InitialPhraseBookWidget (QWidget *parent, const char *name)
- : QWidget(parent, name)
+InitialPhraseBookWidget::InitialPhraseBookWidget (TQWidget *parent, const char *name)
+ : TQWidget(parent, name)
{
- QVBoxLayout *mainLayout = new QVBoxLayout (this, 0, KDialog::spacingHint());
- QLabel *label = new QLabel (i18n("Please decide which phrase books you need:"), this, "booksTitle");
+ TQVBoxLayout *mainLayout = new TQVBoxLayout (this, 0, KDialog::spacingHint());
+ TQLabel *label = new TQLabel (i18n("Please decide which phrase books you need:"), this, "booksTitle");
mainLayout->add (label);
books = new KListView (this, "books");
@@ -153,7 +153,7 @@ InitialPhraseBookWidget::InitialPhraseBookWidget (QWidget *parent, const char *n
books->addColumn (i18n("Book"));
books->setRootIsDecorated (true);
books->setAllColumnsShowFocus (true);
- books->setSelectionMode (QListView::Multi);
+ books->setSelectionMode (TQListView::Multi);
mainLayout->add (books);
initStandardPhraseBooks();
@@ -165,17 +165,17 @@ InitialPhraseBookWidget::~InitialPhraseBookWidget () {
void InitialPhraseBookWidget::initStandardPhraseBooks() {
StandardBookList bookPaths = PhraseBookDialog::standardPhraseBooks();
- QListViewItem *parent = 0;
- QListViewItem *last = 0;
- QStringList currentNamePath = "";
- QPtrStack<QListViewItem> stack;
+ TQListViewItem *parent = 0;
+ TQListViewItem *last = 0;
+ TQStringList currentNamePath = "";
+ TQPtrStack<TQListViewItem> stack;
StandardBookList::iterator it;
for (it = bookPaths.begin(); it != bookPaths.end(); ++it) {
- QString namePath = (*it).path;
- QStringList dirs = QStringList::split("/", namePath);
+ TQString namePath = (*it).path;
+ TQStringList dirs = TQStringList::split("/", namePath);
- QStringList::iterator it1=currentNamePath.begin();
- QStringList::iterator it2=dirs.begin();
+ TQStringList::iterator it1=currentNamePath.begin();
+ TQStringList::iterator it2=dirs.begin();
for (; (it1 != currentNamePath.end())
&& (it1 != dirs.end()) && (*it1 == *it2); ++it1, ++it2);
for (; it1 != currentNamePath.end(); ++it1) {
@@ -184,17 +184,17 @@ void InitialPhraseBookWidget::initStandardPhraseBooks() {
}
for (; it2 != dirs.end(); ++it2) {
stack.push (parent);
- QListViewItem *newParent;
+ TQListViewItem *newParent;
if (parent == 0)
- newParent = new CheckBookItem (books, last, *it2, *it2, QString::null);
+ newParent = new CheckBookItem (books, last, *it2, *it2, TQString::null);
else
- newParent = new CheckBookItem (parent, last, *it2, *it2, QString::null);
+ newParent = new CheckBookItem (parent, last, *it2, *it2, TQString::null);
parent = newParent;
last = 0;
}
currentNamePath = dirs;
- QListViewItem *book;
+ TQListViewItem *book;
if (parent == 0)
book = new CheckBookItem (books, last, (*it).name, (*it).name, (*it).filename);
else
@@ -205,13 +205,13 @@ void InitialPhraseBookWidget::initStandardPhraseBooks() {
void InitialPhraseBookWidget::createBook () {
PhraseBook book;
- QListViewItem *item = books->firstChild();
+ TQListViewItem *item = books->firstChild();
while (item != 0) {
if (item->firstChild() != 0) {
item = item->firstChild();
}
else {
- if (((QCheckListItem*)item)->isOn()) {
+ if (((TQCheckListItem*)item)->isOn()) {
PhraseBook localBook;
localBook.open(KURL( item->text(PhraseBookPrivate::filename )));
book += localBook;
@@ -225,7 +225,7 @@ void InitialPhraseBookWidget::createBook () {
}
}
- QString bookLocation = KApplication::kApplication()->dirs()->saveLocation ("appdata", "/");
+ TQString bookLocation = KApplication::kApplication()->dirs()->saveLocation ("appdata", "/");
if (!bookLocation.isNull() && !bookLocation.isEmpty()) {
book.save (KURL( bookLocation + "standard.phrasebook" ));
}
@@ -233,15 +233,15 @@ void InitialPhraseBookWidget::createBook () {
/***************************************************************************/
-ButtonBoxWidget::ButtonBoxWidget (QWidget *parent, const char *name)
+ButtonBoxWidget::ButtonBoxWidget (TQWidget *parent, const char *name)
: ButtonBoxUI (parent, name) {
- keyButtonPlaceLayout = new QGridLayout (keyButtonPlace, 1, 1, 0, 0, "keyButtonPlaceLayout");
+ keyButtonPlaceLayout = new TQGridLayout (keyButtonPlace, 1, 1, 0, 0, "keyButtonPlaceLayout");
keyButton = new KKeyButton (keyButtonPlace, "key");
keyButtonPlaceLayout->addWidget (keyButton, 1,1);
- QWhatsThis::add (keyButton, i18n("By clicking on this button you can select the keyboard shortcut associated with the selected phrase."));
+ TQWhatsThis::add (keyButton, i18n("By clicking on this button you can select the keyboard shortcut associated with the selected phrase."));
- group = new QButtonGroup (phrasebox);
+ group = new TQButtonGroup (phrasebox);
group->hide();
group->setExclusive (true);
group->insert (noKey);
@@ -264,7 +264,7 @@ PhraseBookDialog::PhraseBookDialog ()
initGUI();
initActions();
initStandardPhraseBooks();
- QString standardBook = KApplication::kApplication()->dirs()->findResource("appdata", "standard.phrasebook");
+ TQString standardBook = KApplication::kApplication()->dirs()->findResource("appdata", "standard.phrasebook");
if (!standardBook.isNull() && !standardBook.isEmpty()) {
PhraseBook book;
book.open(KURL( standardBook ));
@@ -288,9 +288,9 @@ PhraseBookDialog::~PhraseBookDialog() {
}
void PhraseBookDialog::initGUI () {
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setCentralWidget(page);
- QVBoxLayout *mainLayout = new QVBoxLayout (page, 0);
+ TQVBoxLayout *mainLayout = new TQVBoxLayout (page, 0);
treeView = new PhraseTree (page, "phrasetree");
treeView->setSorting (-1);
@@ -301,19 +301,19 @@ void PhraseBookDialog::initGUI () {
treeView->addColumn (i18n("Shortcut"));
treeView->setRootIsDecorated (true);
treeView->setAllColumnsShowFocus (true);
- treeView->setSelectionMode (QListView::Extended);
- QWhatsThis::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, SIGNAL(selectionChanged()), this, SLOT(selectionChanged()));
- connect (treeView, SIGNAL(contextMenuRequested (QListViewItem *, const QPoint &, int)), this, SLOT(contextMenuRequested (QListViewItem *, const QPoint &, int)));
- connect (treeView, SIGNAL(dropped (QDropEvent *, QListViewItem *, QListViewItem *)), this, SLOT(slotDropped (QDropEvent *, QListViewItem *, QListViewItem *)));
- connect (treeView, SIGNAL(moved (QListViewItem *, QListViewItem *, QListViewItem *)), this, SLOT(slotMoved (QListViewItem *, QListViewItem *, QListViewItem *)));
+ 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 *)));
mainLayout->addWidget (treeView);
buttonBox = new ButtonBoxWidget (page, "buttonbox");
- connect (buttonBox->lineEdit, SIGNAL(textChanged(const QString &)), SLOT(slotTextChanged(const QString &)));
- connect (buttonBox->noKey, SIGNAL(clicked()), SLOT(slotNoKey()));
- connect (buttonBox->customKey, SIGNAL(clicked()), SLOT(slotCustomKey()));
- connect (buttonBox->keyButton, SIGNAL(capturedShortcut(const KShortcut&)), SLOT(capturedShortcut(const KShortcut&)));
+ connect (buttonBox->lineEdit, TQT_SIGNAL(textChanged(const TQString &)), TQT_SLOT(slotTextChanged(const TQString &)));
+ connect (buttonBox->noKey, TQT_SIGNAL(clicked()), TQT_SLOT(slotNoKey()));
+ connect (buttonBox->customKey, TQT_SIGNAL(clicked()), TQT_SLOT(slotCustomKey()));
+ connect (buttonBox->keyButton, TQT_SIGNAL(capturedShortcut(const KShortcut&)), TQT_SLOT(capturedShortcut(const KShortcut&)));
mainLayout->addWidget (buttonBox);
treeView->setFocus();
@@ -322,23 +322,23 @@ void PhraseBookDialog::initGUI () {
void PhraseBookDialog::initActions() {
// The file menu
- fileNewPhrase = new KAction (i18n("&New Phrase"), "phrase_new", 0, this, SLOT(slotAddPhrase()), actionCollection(),"file_new_phrase");
+ fileNewPhrase = new KAction (i18n("&New Phrase"), "phrase_new", 0, 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, SLOT(slotAddPhrasebook()), actionCollection(),"file_new_book");
+ fileNewBook = new KAction (i18n("New Phrase &Book"), "phrasebook_new", 0, 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, SLOT(slotSave()), actionCollection());
+ fileSave = KStdAction::save(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, SLOT(slotImportPhrasebook()), actionCollection(),"file_import");
+ fileImport = new KAction (i18n("&Import..."), "phrasebook_open", 0, 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, SLOT(slotImportPhrasebook()), actionCollection(),"toolbar_import");
+ toolbarImport = new KToolBarPopupAction (i18n("&Import..."), "phrasebook_open", 0, 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, SLOT(slotExportPhrasebook()), actionCollection(),"file_export");
+ fileExport = new KAction (i18n("&Export..."), "phrasebook_save", 0, 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, SLOT(slotPrint()), actionCollection());
+ filePrint = KStdAction::print(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, SLOT(close()), actionCollection());
+ fileClose = KStdAction::close(this, TQT_SLOT(close()), actionCollection());
fileClose->setStatusText(i18n("Closes the window"));
fileClose->setWhatsThis (i18n("Closes the window"));
// The edit menu
- editCut = KStdAction::cut(this, SLOT(slotCut()), actionCollection());
+ editCut = KStdAction::cut(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, SLOT(slotCopy()), actionCollection());
+ editCopy = KStdAction::copy(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, SLOT(slotPaste()), actionCollection());
+ editPaste = KStdAction::paste(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, SLOT(slotRemove()), actionCollection(),"edit_delete");
+ editDelete = new KAction (i18n("&Delete"), "editdelete", 0, 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"));
@@ -379,17 +379,17 @@ void PhraseBookDialog::initActions() {
createGUI("phrasebookdialogui.rc");
}
-QString PhraseBookDialog::displayPath (QString filename) {
- QFileInfo file(filename);
- QString path = file.dirPath();
- QString dispPath = "";
- uint position = path.find("/kmouth/books/")+QString("/kmouth/books/").length();
+TQString PhraseBookDialog::displayPath (TQString filename) {
+ TQFileInfo file(filename);
+ TQString path = file.dirPath();
+ TQString dispPath = "";
+ uint position = path.find("/kmouth/books/")+TQString("/kmouth/books/").length();
while (path.length() > position) {
file.setFile(path);
KDesktopFile *dirDesc = new KDesktopFile(path+"/.directory", true, "data");
- QString name = dirDesc->readName();
+ TQString name = dirDesc->readName();
delete dirDesc;
if (name.isNull() || name.isEmpty())
@@ -403,11 +403,11 @@ QString PhraseBookDialog::displayPath (QString filename) {
}
StandardBookList PhraseBookDialog::standardPhraseBooks() {
- QStringList bookPaths = KGlobal::instance()->dirs()->findAllResources (
+ TQStringList bookPaths = KGlobal::instance()->dirs()->findAllResources (
"data", "kmouth/books/*.phrasebook", true, true);
- QStringList bookNames;
- QMap<QString,StandardBook> bookMap;
- QStringList::iterator it;
+ TQStringList bookNames;
+ TQMap<TQString,StandardBook> bookMap;
+ TQStringList::iterator it;
for (it = bookPaths.begin(); it != bookPaths.end(); ++it) {
PhraseBook pbook;
if (pbook.open (KURL( *it ))) {
@@ -435,18 +435,18 @@ void PhraseBookDialog::initStandardPhraseBooks () {
StandardBookList bookPaths = standardPhraseBooks();
KActionMenu *parent = fileImportStandardBook;
- QStringList currentNamePath = "x";
- QPtrStack<KActionMenu> stack;
+ TQStringList currentNamePath = "x";
+ TQPtrStack<KActionMenu> stack;
StandardBookList::iterator it;
for (it = bookPaths.begin(); it != bookPaths.end(); ++it) {
KURL url;
url.setPath((*it).filename);
- QString namePath = "x/"+(*it).path;
- QStringList dirs = QStringList::split("/", namePath);
+ TQString namePath = "x/"+(*it).path;
+ TQStringList dirs = TQStringList::split("/", namePath);
- QStringList::iterator it1=currentNamePath.begin();
- QStringList::iterator it2=dirs.begin();
+ TQStringList::iterator it1=currentNamePath.begin();
+ TQStringList::iterator it2=dirs.begin();
for (; (it1 != currentNamePath.end())
&& (it1 != dirs.end()) && (*it1 == *it2); ++it1, ++it2);
for (; it1 != currentNamePath.end(); ++it1)
@@ -462,21 +462,21 @@ void PhraseBookDialog::initStandardPhraseBooks () {
currentNamePath = dirs;
KAction *book = new StandardPhraseBookInsertAction (
- url, (*it).name, this, SLOT(slotImportPhrasebook (const KURL &)), actionCollection());
+ url, (*it).name, this, TQT_SLOT(slotImportPhrasebook (const KURL &)), actionCollection());
parent->insert(book);
if (parent == fileImportStandardBook)
book->plug(toolbarImport->popupMenu());
}
}
-PhraseTreeItem *selectedItem (QListView *treeView) {
+PhraseTreeItem *selectedItem (TQListView *treeView) {
PhraseTreeItem *currentItem = (PhraseTreeItem *)treeView->currentItem();
if ((currentItem == 0) || (!currentItem->isSelected()))
return 0;
- QListViewItemIterator it(treeView);
+ TQListViewItemIterator it(treeView);
while (it.current()) {
- QListViewItem *item = it.current();
+ TQListViewItem *item = it.current();
if (item->isSelected() && (item != currentItem))
return 0;
++it;
@@ -508,7 +508,7 @@ void PhraseBookDialog::selectionChanged () {
buttonBox->lineEdit->setText(currentItem->text(0));
buttonBox->lineEdit->setEnabled(true);
buttonBox->shortcutLabel->setEnabled(true);
- QString shortcut = currentItem->text(1);
+ TQString shortcut = currentItem->text(1);
buttonBox->keyButton->setShortcut(currentItem->cut(), false);
if (shortcut.isEmpty() || shortcut.isNull()) {
buttonBox->noKey->setChecked (true);
@@ -554,7 +554,7 @@ bool PhraseBookDialog::queryClose() {
return true;
}
-void PhraseBookDialog::slotTextChanged (const QString &s) {
+void PhraseBookDialog::slotTextChanged (const TQString &s) {
PhraseTreeItem *currentItem = selectedItem (treeView);
if (currentItem != 0)
currentItem->setText(0, s);
@@ -567,7 +567,7 @@ void PhraseBookDialog::slotNoKey() {
PhraseTreeItem *currentItem = selectedItem (treeView);
if (currentItem != 0) {
- currentItem->setCut (KShortcut(QString::null));
+ currentItem->setCut (KShortcut(TQString::null));
buttonBox->keyButton->setShortcut(currentItem->cut(), false);
}
phrasebookChanged = true;
@@ -593,11 +593,11 @@ void PhraseBookDialog::setShortcut( const KShortcut& cut ) {
const KKey& key = seq.key(0);
if (key.modFlags() == 0 && key.sym() < 0x3000
- && QChar(key.sym()).isLetterOrNumber())
+ && TQChar(key.sym()).isLetterOrNumber())
{
- QString s = i18n("In order to use the '%1' key as a shortcut, "
+ 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(QChar(key.sym()));
+ "Win, Alt, Ctrl, and/or Shift keys.").arg(TQChar(key.sym()));
KMessageBox::sorry( this, s, i18n("Invalid Shortcut Key") );
return;
}
@@ -615,8 +615,8 @@ void PhraseBookDialog::setShortcut( const KShortcut& cut ) {
}
}
-QListViewItem *PhraseBookDialog::addBook (QListViewItem *parent, QListViewItem *after, PhraseBook *book) {
- QListViewItem *newItem = treeView->addBook(parent, after, book);
+TQListViewItem *PhraseBookDialog::addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book) {
+ TQListViewItem *newItem = treeView->addBook(parent, after, book);
if (newItem != 0) {
treeView->clearSelection();
treeView->ensureItemVisible(newItem);
@@ -627,7 +627,7 @@ QListViewItem *PhraseBookDialog::addBook (QListViewItem *parent, QListViewItem *
return newItem;
}
-QListViewItem *PhraseBookDialog::addBook (QListViewItem *item, PhraseBook *book) {
+TQListViewItem *PhraseBookDialog::addBook (TQListViewItem *item, PhraseBook *book) {
if (item == 0)
return addBook(0, 0, book);
else if (((PhraseTreeItem *)item)->isPhrase() || !item->isOpen())
@@ -639,14 +639,14 @@ QListViewItem *PhraseBookDialog::addBook (QListViewItem *item, PhraseBook *book)
return addBook(item, 0, book);
}
-void PhraseBookDialog::contextMenuRequested(QListViewItem *, const QPoint &pos, int) {
- QString name;
+void PhraseBookDialog::contextMenuRequested(TQListViewItem *, const TQPoint &pos, int) {
+ TQString name;
if (treeView->hasSelectedItems())
name = "phrasebook_popup_sel";
else
name = "phrasebook_popup_nosel";
- QPopupMenu *popup = (QPopupMenu *)factory()->container(name,this);
+ TQPopupMenu *popup = (TQPopupMenu *)factory()->container(name,this);
if (popup != 0) {
popup->popup(pos, 0);
}
@@ -667,24 +667,24 @@ void PhraseBookDialog::slotCut () {
void PhraseBookDialog::slotCopy () {
PhraseBook book;
treeView->fillBook (&book, true);
- QApplication::clipboard()->setData(new PhraseBookDrag(&book));
+ TQApplication::clipboard()->setData(new PhraseBookDrag(&book));
}
void PhraseBookDialog::slotPaste () {
PhraseBook book;
- if (PhraseBookDrag::decode(QApplication::clipboard()->data(), &book)) {
+ if (PhraseBookDrag::decode(TQApplication::clipboard()->data(), &book)) {
addBook (treeView->currentItem(), &book);
}
}
-void PhraseBookDialog::slotDropped (QDropEvent *e, QListViewItem *parent, QListViewItem *after) {
+void PhraseBookDialog::slotDropped (TQDropEvent *e, TQListViewItem *parent, TQListViewItem *after) {
PhraseBook book;
if (PhraseBookDrag::decode(e, &book)) {
addBook(parent, after, &book);
}
}
-void PhraseBookDialog::slotMoved (QListViewItem *item, QListViewItem *, QListViewItem *) {
+void PhraseBookDialog::slotMoved (TQListViewItem *item, TQListViewItem *, TQListViewItem *) {
treeView->ensureItemVisible(item);
treeView->setSelected (item, true);
phrasebookChanged = true;
@@ -695,7 +695,7 @@ void PhraseBookDialog::slotAddPhrasebook () {
Phrase phrase(i18n("(New Phrase Book)"), "");
book += PhraseBookEntry(phrase, 0, false);
- QListViewItem *item = addBook (treeView->currentItem(), &book);
+ TQListViewItem *item = addBook (treeView->currentItem(), &book);
item->setOpen (true);
buttonBox->lineEdit->selectAll();
buttonBox->lineEdit->setFocus();
@@ -719,7 +719,7 @@ void PhraseBookDialog::slotSave () {
}
void PhraseBookDialog::slotImportPhrasebook () {
- KURL url=KFileDialog::getOpenURL(QString::null,
+ KURL url=KFileDialog::getOpenURL(TQString::null,
i18n("*.phrasebook|Phrase Books (*.phrasebook)\n*.txt|Plain Text Files (*.txt)\n*|All Files"), this, i18n("Import Phrasebook"));
slotImportPhrasebook (url);
diff --git a/kmouth/phrasebook/phrasebookdialog.h b/kmouth/phrasebook/phrasebookdialog.h
index 774387f..d086299 100644
--- a/kmouth/phrasebook/phrasebookdialog.h
+++ b/kmouth/phrasebook/phrasebookdialog.h
@@ -18,11 +18,11 @@
#ifndef PHRASEBOOKDIALOG_H
#define PHRASEBOOKDIALOG_H
-#include <qbutton.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qlistview.h>
+#include <tqbutton.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlistview.h>
#include <kmainwindow.h>
#include <klineedit.h>
#include <kkeybutton.h>
@@ -38,22 +38,22 @@ class QString;
class KListView;
struct StandardBook {
- QString name;
- QString path;
- QString filename;
+ TQString name;
+ TQString path;
+ TQString filename;
};
-typedef QValueList<StandardBook> StandardBookList;
+typedef TQValueList<StandardBook> StandardBookList;
/**The class PhraseTreeItem is an ListViewItem for either a phrase or a phrase book.
*@author Gunnar Schmi Dt
*/
-class CheckBookItem : public QCheckListItem {
+class CheckBookItem : public TQCheckListItem {
public:
- CheckBookItem (QListViewItem *parent, QListViewItem *last,
- const QString &text, const QString &name, const QString &filename);
- CheckBookItem (QListView *parent, QListViewItem *last,
- const QString &text, const QString &name, const QString &filename);
+ CheckBookItem (TQListViewItem *parent, TQListViewItem *last,
+ const TQString &text, const TQString &name, const TQString &filename);
+ CheckBookItem (TQListView *parent, TQListViewItem *last,
+ const TQString &text, const TQString &name, const TQString &filename);
~CheckBookItem();
protected:
@@ -72,10 +72,10 @@ private:
* @author Gunnar Schmi Dt
*/
-class InitialPhraseBookWidget : public QWidget {
+class InitialPhraseBookWidget : public TQWidget {
Q_OBJECT
public:
- InitialPhraseBookWidget(QWidget *parent, const char *name);
+ InitialPhraseBookWidget(TQWidget *parent, const char *name);
~InitialPhraseBookWidget();
void createBook();
@@ -95,10 +95,10 @@ private:
class StandardPhraseBookInsertAction : public KAction {
Q_OBJECT
public:
- StandardPhraseBookInsertAction (const KURL &url, const QString& name, const QObject* receiver, const char* slot, KActionCollection* parent)
+ StandardPhraseBookInsertAction (const KURL &url, const TQString& name, const TQObject* receiver, const char* slot, KActionCollection* parent)
: KAction (name, "phrasebook", 0, 0, 0, parent, 0) {
this->url = url;
- connect (this, SIGNAL(slotActivated (const KURL &)), receiver, slot);
+ connect (this, TQT_SIGNAL(slotActivated (const KURL &)), receiver, slot);
};
~StandardPhraseBookInsertAction () {
};
@@ -123,14 +123,14 @@ private:
*/
class ButtonBoxWidget : public ButtonBoxUI {
public:
- ButtonBoxWidget (QWidget *parent = 0, const char *name = 0);
+ ButtonBoxWidget (TQWidget *parent = 0, const char *name = 0);
~ButtonBoxWidget ();
KKeyButton *keyButton;
- QButtonGroup *group;
+ TQButtonGroup *group;
protected:
- QGridLayout *keyButtonPlaceLayout;
+ TQGridLayout *keyButtonPlaceLayout;
};
/**
@@ -147,7 +147,7 @@ private:
*/
PhraseBookDialog ();
- static QString displayPath (QString path);
+ static TQString displayPath (TQString path);
public:
/** Returns a pointer to the instance of this dialog. As a part off the
@@ -162,13 +162,13 @@ public:
bool queryClose ();
public slots:
- void slotTextChanged (const QString &s);
+ void slotTextChanged (const TQString &s);
void slotNoKey();
void slotCustomKey();
void capturedShortcut (const KShortcut& cut);
void selectionChanged ();
- void contextMenuRequested(QListViewItem *, const QPoint &pos, int);
+ void contextMenuRequested(TQListViewItem *, const TQPoint &pos, int);
void slotRemove ();
void slotCut ();
@@ -184,8 +184,8 @@ public slots:
void slotExportPhrasebook ();
void slotPrint ();
- void slotDropped (QDropEvent *e, QListViewItem *parent, QListViewItem *after);
- void slotMoved (QListViewItem *item, QListViewItem *, QListViewItem *);
+ void slotDropped (TQDropEvent *e, TQListViewItem *parent, TQListViewItem *after);
+ void slotMoved (TQListViewItem *item, TQListViewItem *, TQListViewItem *);
signals:
void phrasebookConfirmed (PhraseBook &book);
@@ -199,12 +199,12 @@ private:
/** initializes the list of standard phrase books */
void initStandardPhraseBooks ();
- QListViewItem *addBook (QListViewItem *parent, QListViewItem *after, PhraseBook *book);
- QListViewItem *addBook (QListViewItem *item, PhraseBook *book);
+ TQListViewItem *addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book);
+ TQListViewItem *addBook (TQListViewItem *item, PhraseBook *book);
void setShortcut (const KShortcut &cut);
- void _warning (const KKeySequence &cut, QString sAction, QString sTitle);
+ void _warning (const KKeySequence &cut, TQString sAction, TQString sTitle);
bool isGlobalKeyPresent (const KShortcut& cut, bool warnUser);
bool isPhraseKeyPresent (const KShortcut& cut, bool warnUser);
diff --git a/kmouth/phrasebook/phrasebookparser.cpp b/kmouth/phrasebook/phrasebookparser.cpp
index 9883e49..441ab55 100644
--- a/kmouth/phrasebook/phrasebookparser.cpp
+++ b/kmouth/phrasebook/phrasebookparser.cpp
@@ -23,19 +23,19 @@ PhraseBookParser::PhraseBookParser() {
PhraseBookParser::~PhraseBookParser() {
}
-bool PhraseBookParser::warning (const QXmlParseException &) {
+bool PhraseBookParser::warning (const TQXmlParseException &) {
return false;
}
-bool PhraseBookParser::error (const QXmlParseException &) {
+bool PhraseBookParser::error (const TQXmlParseException &) {
return false;
}
-bool PhraseBookParser::fatalError (const QXmlParseException &) {
+bool PhraseBookParser::fatalError (const TQXmlParseException &) {
return false;
}
-QString PhraseBookParser::errorString() {
+TQString PhraseBookParser::errorString() {
return "";
}
@@ -48,9 +48,9 @@ bool PhraseBookParser::startDocument() {
return true;
}
-bool PhraseBookParser::startElement (const QString &, const QString &,
- const QString &name,
- const QXmlAttributes &attributes)
+bool PhraseBookParser::startElement (const TQString &, const TQString &,
+ const TQString &name,
+ const TQXmlAttributes &attributes)
{
if (name == "phrase") {
if (isInPhrase)
@@ -77,18 +77,18 @@ bool PhraseBookParser::startElement (const QString &, const QString &,
return true;
}
-bool PhraseBookParser::characters (const QString &ch) {
+bool PhraseBookParser::characters (const TQString &ch) {
phrase.phrase += ch;
return true;
}
-bool PhraseBookParser::ignorableWhitespace (const QString &ch) {
+bool PhraseBookParser::ignorableWhitespace (const TQString &ch) {
phrase.phrase += ch;
return true;
}
-bool PhraseBookParser::endElement (const QString &, const QString &,
- const QString &name)
+bool PhraseBookParser::endElement (const TQString &, const TQString &,
+ const TQString &name)
{
if (name == "phrase") {
list += PhraseBookEntry (phrase, level, true);
diff --git a/kmouth/phrasebook/phrasebookparser.h b/kmouth/phrasebook/phrasebookparser.h
index a6e436a..a858b4f 100644
--- a/kmouth/phrasebook/phrasebookparser.h
+++ b/kmouth/phrasebook/phrasebookparser.h
@@ -18,8 +18,8 @@
#ifndef PHRASEBOOKPARSER_H
#define PHRASEBOOKPARSER_H
-#include <qxml.h>
-#include <qvaluestack.h>
+#include <tqxml.h>
+#include <tqvaluestack.h>
#include "phrasebook.h"
/**
@@ -28,31 +28,31 @@
* @author Gunnar Schmi Dt
*/
-class PhraseBookParser : public QXmlDefaultHandler {
+class PhraseBookParser : public TQXmlDefaultHandler {
public:
PhraseBookParser();
~PhraseBookParser();
- bool warning (const QXmlParseException &exception);
- bool error (const QXmlParseException &exception);
- bool fatalError (const QXmlParseException &exception);
- QString errorString();
+ bool warning (const TQXmlParseException &exception);
+ bool error (const TQXmlParseException &exception);
+ bool fatalError (const TQXmlParseException &exception);
+ TQString errorString();
/** Processes the start of the document. */
bool startDocument();
/** Processes the start tag of an element. */
- bool startElement (const QString &, const QString &, const QString &name,
- const QXmlAttributes &attributes);
+ bool startElement (const TQString &, const TQString &, const TQString &name,
+ const TQXmlAttributes &attributes);
/** Processes a chunk of normal character data. */
- bool characters (const QString &ch);
+ bool characters (const TQString &ch);
/** Processes whitespace. */
- bool ignorableWhitespace (const QString &ch);
+ bool ignorableWhitespace (const TQString &ch);
/** Processes the end tag of an element. */
- bool endElement (const QString &, const QString &, const QString &name);
+ bool endElement (const TQString &, const TQString &, const TQString &name);
/** Processes the end of the document. */
bool endDocument();
diff --git a/kmouth/phrasebook/phrasetree.cpp b/kmouth/phrasebook/phrasetree.cpp
index 57d4f5e..6ffbaee 100644
--- a/kmouth/phrasebook/phrasetree.cpp
+++ b/kmouth/phrasebook/phrasetree.cpp
@@ -28,7 +28,7 @@
#include "phrasebookdialog.h"
#include "phrasebook.h"
-PhraseTreeItem::PhraseTreeItem (QListView *parent, QListViewItem *after, QString phrase, KShortcut shortcut, QPixmap icon)
+PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon)
: KListViewItem (parent, after, phrase)
{
isPhraseValue = true;
@@ -38,7 +38,7 @@ PhraseTreeItem::PhraseTreeItem (QListView *parent, QListViewItem *after, QString
setExpandable (false);
}
-PhraseTreeItem::PhraseTreeItem (QListViewItem *parent, QListViewItem *after, QString phrase, KShortcut shortcut, QPixmap icon)
+PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon)
: KListViewItem (parent, after, phrase)
{
isPhraseValue = true;
@@ -47,14 +47,14 @@ PhraseTreeItem::PhraseTreeItem (QListViewItem *parent, QListViewItem *after, QSt
setPixmap(0, icon);
setExpandable (false);
}
-PhraseTreeItem::PhraseTreeItem (QListView *parent, QListViewItem *after, QString name, QPixmap icon)
+PhraseTreeItem::PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon)
: KListViewItem (parent, after, name)
{
isPhraseValue = false;
setPixmap(0, icon);
setExpandable (true);
}
-PhraseTreeItem::PhraseTreeItem (QListViewItem *parent, QListViewItem *after, QString name, QPixmap icon)
+PhraseTreeItem::PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString name, TQPixmap icon)
: KListViewItem (parent, after, name)
{
isPhraseValue = false;
@@ -74,24 +74,24 @@ void PhraseTreeItem::setCut (KShortcut cut) {
// ***************************************************************************
-PhraseTree::PhraseTree (QWidget *parent, const char *name)
+PhraseTree::PhraseTree (TQWidget *parent, const char *name)
: KListView (parent, name)
{
phrasebook_open = KGlobal::iconLoader()->loadIcon("phrasebook", KIcon::Small);
phrasebook_closed = KGlobal::iconLoader()->loadIcon("phrasebook_closed", KIcon::Small);
phrase = KGlobal::iconLoader()->loadIcon("phrase", KIcon::Small);
- connect (this, SIGNAL(expanded (QListViewItem *)), this, SLOT(itemExpanded (QListViewItem *)));
- connect (this, SIGNAL(collapsed (QListViewItem *)), this, SLOT(itemCollapsed (QListViewItem *)));
+ connect (this, TQT_SIGNAL(expanded (TQListViewItem *)), this, TQT_SLOT(itemExpanded (TQListViewItem *)));
+ connect (this, TQT_SIGNAL(collapsed (TQListViewItem *)), this, TQT_SLOT(itemCollapsed (TQListViewItem *)));
}
PhraseTree::~PhraseTree (){
}
namespace PhraseTreePrivate {
- QListViewItem *prevSibling (QListViewItem *item) {
- QListViewItem *parent = item->parent();
- QListViewItem *above = item->itemAbove();
+ TQListViewItem *prevSibling (TQListViewItem *item) {
+ TQListViewItem *parent = item->parent();
+ TQListViewItem *above = item->itemAbove();
if (above == parent)
return 0;
@@ -102,15 +102,15 @@ namespace PhraseTreePrivate {
return above;
}
- bool findAbovePosition (QListViewItem *item,
- QListViewItem **newParent,
- QListViewItem **newAbove)
+ bool findAbovePosition (TQListViewItem *item,
+ TQListViewItem **newParent,
+ TQListViewItem **newAbove)
{
if (item == 0)
return false;
- QListViewItem *parent = item->parent();
- QListViewItem *above = item->itemAbove();
+ TQListViewItem *parent = item->parent();
+ TQListViewItem *above = item->itemAbove();
if (above == 0)
return false;
@@ -133,15 +133,15 @@ namespace PhraseTreePrivate {
}
}
- bool findBelowPosition (QListViewItem *item,
- QListViewItem **newParent,
- QListViewItem **newAbove)
+ bool findBelowPosition (TQListViewItem *item,
+ TQListViewItem **newParent,
+ TQListViewItem **newAbove)
{
if (item == 0)
return false;
- QListViewItem *parent = item->parent();
- QListViewItem *below = item->nextSibling();
+ TQListViewItem *parent = item->parent();
+ TQListViewItem *below = item->nextSibling();
if (parent == 0 && below == 0)
return false;
@@ -162,14 +162,14 @@ namespace PhraseTreePrivate {
}
}
- bool findRightPosition (QListViewItem *item,
- QListViewItem **newParent,
- QListViewItem **newAbove)
+ bool findRightPosition (TQListViewItem *item,
+ TQListViewItem **newParent,
+ TQListViewItem **newAbove)
{
if (item == 0)
return false;
- QListViewItem *above = prevSibling (item);
+ TQListViewItem *above = prevSibling (item);
if (above == 0)
return false;
@@ -188,14 +188,14 @@ namespace PhraseTreePrivate {
}
}
- bool findLeftPosition (QListViewItem *item,
- QListViewItem **newParent,
- QListViewItem **newAbove)
+ bool findLeftPosition (TQListViewItem *item,
+ TQListViewItem **newParent,
+ TQListViewItem **newAbove)
{
if (item == 0)
return false;
- QListViewItem *parent = item->parent();
+ TQListViewItem *parent = item->parent();
if (parent == 0)
return false;
@@ -207,9 +207,9 @@ namespace PhraseTreePrivate {
}
}
-void PhraseTree::moveItem (QListViewItem *item,
- QListViewItem *parent,
- QListViewItem *above)
+void PhraseTree::moveItem (TQListViewItem *item,
+ TQListViewItem *parent,
+ TQListViewItem *above)
{
if (item != 0) {
if (item->parent() == 0)
@@ -227,7 +227,7 @@ void PhraseTree::moveItem (QListViewItem *item,
}
bool PhraseTree::hasSelectedItems() {
- QListViewItem *i = firstChild();
+ TQListViewItem *i = firstChild();
if ( !i )
return false;
int level = 0;
@@ -254,10 +254,10 @@ bool PhraseTree::hasSelectedItems() {
}
void PhraseTree::deleteSelectedItems() {
- QListViewItem *i = firstChild();
+ TQListViewItem *i = firstChild();
if ( !i )
return;
- QListViewItem *deleteItem = 0;
+ TQListViewItem *deleteItem = 0;
do {
if (i->isSelected())
deleteItem = i;
@@ -280,13 +280,13 @@ void PhraseTree::deleteSelectedItems() {
while (i != 0);
}
-void PhraseTree::keyPressEvent (QKeyEvent *e) {
+void PhraseTree::keyPressEvent (TQKeyEvent *e) {
if ((e->state() & Qt::KeyButtonMask) == Qt::AltButton) {
if (e->key() == Qt::Key_Up) {
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if ((item != 0) && (item->isSelected())) {
- QListViewItem *parent;
- QListViewItem *above;
+ TQListViewItem *parent;
+ TQListViewItem *above;
if (PhraseTreePrivate::findAbovePosition (item, &parent, &above)) {
moveItem(item, parent, above);
@@ -298,10 +298,10 @@ void PhraseTree::keyPressEvent (QKeyEvent *e) {
return;
}
else if (e->key() == Qt::Key_Down) {
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if ((item != 0) && (item->isSelected())) {
- QListViewItem *parent;
- QListViewItem *above;
+ TQListViewItem *parent;
+ TQListViewItem *above;
if (PhraseTreePrivate::findBelowPosition (item, &parent, &above)) {
moveItem(item, parent, above);
@@ -313,10 +313,10 @@ void PhraseTree::keyPressEvent (QKeyEvent *e) {
return;
}
else if (e->key() == Qt::Key_Left) {
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if ((item != 0) && (item->isSelected())) {
- QListViewItem *parent;
- QListViewItem *above;
+ TQListViewItem *parent;
+ TQListViewItem *above;
if (PhraseTreePrivate::findLeftPosition (item, &parent, &above)) {
moveItem(item, parent, above);
@@ -328,10 +328,10 @@ void PhraseTree::keyPressEvent (QKeyEvent *e) {
return;
}
else if (e->key() == Qt::Key_Right) {
- QListViewItem *item = currentItem();
+ TQListViewItem *item = currentItem();
if ((item != 0) && (item->isSelected())) {
- QListViewItem *parent;
- QListViewItem *above;
+ TQListViewItem *parent;
+ TQListViewItem *above;
if (PhraseTreePrivate::findRightPosition (item, &parent, &above)) {
moveItem(item, parent, above);
@@ -346,10 +346,10 @@ void PhraseTree::keyPressEvent (QKeyEvent *e) {
KListView::keyPressEvent(e);
}
-PhraseTreeItem *PhraseTree::insertPhrase (QListViewItem *parent, QListViewItem *after, QString phrase, QString shortcut) {
+PhraseTreeItem *PhraseTree::insertPhrase (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TQString shortcut) {
KShortcut cut = KShortcut(shortcut);
if (isKeyPresent (cut, 0, false))
- cut = KShortcut(QString::null);
+ cut = KShortcut(TQString::null);
if (parent == 0)
return new PhraseTreeItem (this, after, phrase, cut, this->phrase);
@@ -357,15 +357,15 @@ PhraseTreeItem *PhraseTree::insertPhrase (QListViewItem *parent, QListViewItem *
return new PhraseTreeItem (parent, after, phrase, cut, this->phrase);
}
-PhraseTreeItem *PhraseTree::insertBook (QListViewItem *parent, QListViewItem *after, QString name) {
+PhraseTreeItem *PhraseTree::insertBook (TQListViewItem *parent, TQListViewItem *after, TQString name) {
if (parent == 0)
return new PhraseTreeItem (this, after, name, phrasebook_closed);
else
return new PhraseTreeItem (parent, after, name, phrasebook_closed);
}
-QListViewItem *PhraseTree::addBook (QListViewItem *parent, QListViewItem *after, PhraseBook *book) {
- QListViewItem *last = after;
+TQListViewItem *PhraseTree::addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book) {
+ TQListViewItem *last = after;
int level = 0;
PhraseBookEntryList::iterator it;
for (it = book->begin(); it != book->end(); ++it) {
@@ -403,7 +403,7 @@ QListViewItem *PhraseTree::addBook (QListViewItem *parent, QListViewItem *after,
}
void PhraseTree::fillBook (PhraseBook *book, bool respectSelection) {
- QListViewItem *i = firstChild();
+ TQListViewItem *i = firstChild();
int level = 0;
if ( !i )
return;
@@ -432,11 +432,11 @@ void PhraseTree::fillBook (PhraseBook *book, bool respectSelection) {
while (i != 0);
}
-QDragObject *PhraseTree::dragObject () {
+TQDragObject *PhraseTree::dragObject () {
return dragObject (true);
}
-QDragObject *PhraseTree::dragObject (bool isDependent) {
+TQDragObject *PhraseTree::dragObject (bool isDependent) {
PhraseBook book;
fillBook (&book, true);
if (isDependent)
@@ -444,7 +444,7 @@ QDragObject *PhraseTree::dragObject (bool isDependent) {
return new PhraseBookDrag(&book);
}
-bool PhraseTree::acceptDrag (QDropEvent* event) const {
+bool PhraseTree::acceptDrag (TQDropEvent* event) const {
if (KListView::acceptDrag (event))
return true;
else
@@ -463,10 +463,10 @@ static int keyConflict (const KShortcut& cut, const KShortcut& cut2) {
return -1;
}
-void PhraseTree::_warning (const KKeySequence& cut, QString sAction, QString sTitle) {
+void PhraseTree::_warning (const KKeySequence& cut, TQString sAction, TQString sTitle) {
sAction = sAction.stripWhiteSpace();
- QString s =
+ TQString s =
i18n("The '%1' key combination has already been allocated "
"to %2.\n"
"Please choose a unique key combination.").
@@ -494,8 +494,8 @@ bool PhraseTree::isStdAccelPresent (const KShortcut& cut, bool warnUser) {
}
bool PhraseTree::isGlobalKeyPresent (const KShortcut& cut, bool warnUser) {
- QMap<QString, QString> mapEntry = KGlobal::config()->entryMap ("Global Shortcuts");
- QMap<QString, QString>::Iterator it;
+ TQMap<TQString, TQString> mapEntry = KGlobal::config()->entryMap ("Global Shortcuts");
+ TQMap<TQString, TQString>::Iterator it;
for (it = mapEntry.begin(); it != mapEntry.end(); ++it) {
int iSeq = keyConflict (cut, KShortcut(*it));
if (iSeq > -1) {
@@ -510,7 +510,7 @@ bool PhraseTree::isGlobalKeyPresent (const KShortcut& cut, bool warnUser) {
}
bool PhraseTree::isPhraseKeyPresent (const KShortcut& cut, PhraseTreeItem* cutItem, bool warnUser) {
- for (QListViewItemIterator it(this); it.current(); ++it) {
+ for (TQListViewItemIterator it(this); it.current(); ++it) {
PhraseTreeItem* item = dynamic_cast<PhraseTreeItem*>(it.current());
if ((item != 0) && (item != cutItem)) {
int iSeq = keyConflict (cut, item->cut());
@@ -539,13 +539,13 @@ bool PhraseTree::isKeyPresent (const KShortcut& cut, PhraseTreeItem* cutItem, bo
return false;
}
-void PhraseTree::itemExpanded (QListViewItem *item) {
+void PhraseTree::itemExpanded (TQListViewItem *item) {
PhraseTreeItem *i = (PhraseTreeItem *)item;
if (!i->isPhrase())
i->setPixmap(0, phrasebook_open);
}
-void PhraseTree::itemCollapsed (QListViewItem *item) {
+void PhraseTree::itemCollapsed (TQListViewItem *item) {
PhraseTreeItem *i = (PhraseTreeItem *)item;
if (!i->isPhrase())
i->setPixmap(0, phrasebook_closed);
diff --git a/kmouth/phrasebook/phrasetree.h b/kmouth/phrasebook/phrasetree.h
index bd0e1f5..45ae26c 100644
--- a/kmouth/phrasebook/phrasetree.h
+++ b/kmouth/phrasebook/phrasetree.h
@@ -18,7 +18,7 @@
#ifndef PHRASETREE_H
#define PHRASETREE_H
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <kshortcut.h>
#include <klistview.h>
@@ -33,13 +33,13 @@ class PhraseTreeItem : public KListViewItem {
friend class PhraseTree;
private:
/** Creates a phrase item within a sub phrase book */
- PhraseTreeItem (QListView *parent, QListViewItem *after, QString phrase, KShortcut shortcut, QPixmap icon);
+ PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon);
/** Creates a phrase item at the top level */
- PhraseTreeItem (QListViewItem *parent, QListViewItem *after, QString phrase, KShortcut shortcut, QPixmap icon);
+ PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString phrase, KShortcut shortcut, TQPixmap icon);
/** Creates a phrase book item within a sub phrase book */
- PhraseTreeItem (QListView *parent, QListViewItem *after, QString name, QPixmap icon);
+ PhraseTreeItem (TQListView *parent, TQListViewItem *after, TQString name, TQPixmap icon);
/** Creates a phrase book item at the top level */
- PhraseTreeItem (QListViewItem *parent, QListViewItem *after, QString name, QPixmap icon);
+ PhraseTreeItem (TQListViewItem *parent, TQListViewItem *after, TQString name, TQPixmap icon);
public:
bool isPhrase();
@@ -61,30 +61,30 @@ class PhraseTree : public KListView {
friend class PhraseTreeItem;
Q_OBJECT
public:
- PhraseTree (QWidget *parent = 0, const char *name = 0);
+ PhraseTree (TQWidget *parent = 0, const char *name = 0);
~PhraseTree ();
- void keyPressEvent (QKeyEvent *e);
+ void keyPressEvent (TQKeyEvent *e);
- PhraseTreeItem *insertPhrase (QListViewItem *parent, QListViewItem *after, QString phrase, QString shortcut);
- PhraseTreeItem *insertBook (QListViewItem *parent, QListViewItem *after, QString name);
+ PhraseTreeItem *insertPhrase (TQListViewItem *parent, TQListViewItem *after, TQString phrase, TQString shortcut);
+ PhraseTreeItem *insertBook (TQListViewItem *parent, TQListViewItem *after, TQString name);
- QListViewItem *addBook (QListViewItem *parent, QListViewItem *after, PhraseBook *book);
+ TQListViewItem *addBook (TQListViewItem *parent, TQListViewItem *after, PhraseBook *book);
void fillBook (PhraseBook *book, bool respectSelection);
- QDragObject *dragObject ();
- QDragObject *dragObject (bool isDependent);
+ TQDragObject *dragObject ();
+ TQDragObject *dragObject (bool isDependent);
- void moveItem (QListViewItem *item, QListViewItem *parent, QListViewItem *above);
+ void moveItem (TQListViewItem *item, TQListViewItem *parent, TQListViewItem *above);
bool hasSelectedItems();
void deleteSelectedItems();
protected:
- bool acceptDrag (QDropEvent* event) const;
+ bool acceptDrag (TQDropEvent* event) const;
private:
- void _warning (const KKeySequence& cut, QString sAction, QString sTitle);
+ void _warning (const KKeySequence& cut, TQString sAction, TQString sTitle);
bool isStdAccelPresent (const KShortcut& cut, bool warnUser);
bool isGlobalKeyPresent (const KShortcut& cut, bool warnUser);
bool isApplicationKeyPresent (const KShortcut& cut, bool warnUser);
@@ -93,16 +93,16 @@ public:
bool isKeyPresent (const KShortcut& cut, PhraseTreeItem* cutItem, bool warnUser);
public slots:
- void itemExpanded (QListViewItem *item);
- void itemCollapsed (QListViewItem *item);
+ void itemExpanded (TQListViewItem *item);
+ void itemCollapsed (TQListViewItem *item);
signals:
void shortcutRequest (PhraseShortcutRequest *request);
private:
- QPixmap phrasebook_open;
- QPixmap phrasebook_closed;
- QPixmap phrase;
+ TQPixmap phrasebook_open;
+ TQPixmap phrasebook_closed;
+ TQPixmap phrase;
};
#endif
diff --git a/kmouth/phraseedit.cpp b/kmouth/phraseedit.cpp
index 0f2e319..000a1f5 100644
--- a/kmouth/phraseedit.cpp
+++ b/kmouth/phraseedit.cpp
@@ -17,14 +17,14 @@
#include "phraseedit.h"
-PhraseEdit::PhraseEdit(const QString &string, QWidget *parent)
+PhraseEdit::PhraseEdit(const TQString &string, TQWidget *parent)
: KLineEdit (string, parent) {
}
PhraseEdit::~PhraseEdit() {
}
-void PhraseEdit::keyPressEvent (QKeyEvent *e) {
+void PhraseEdit::keyPressEvent (TQKeyEvent *e) {
if ((e->state() & Qt::KeyButtonMask) == Qt::ControlButton) {
if (e->key() == Qt::Key_C) {
if (!this->hasSelectedText()) {
diff --git a/kmouth/phraseedit.h b/kmouth/phraseedit.h
index a7a065e..0ebd132 100644
--- a/kmouth/phraseedit.h
+++ b/kmouth/phraseedit.h
@@ -27,10 +27,10 @@
class PhraseEdit : public KLineEdit {
public:
- PhraseEdit(const QString &string, QWidget *parent);
+ PhraseEdit(const TQString &string, TQWidget *parent);
virtual ~PhraseEdit();
- void keyPressEvent (QKeyEvent *e);
+ void keyPressEvent (TQKeyEvent *e);
};
#endif
diff --git a/kmouth/phraselist.cpp b/kmouth/phraselist.cpp
index d57682a..48148c3 100644
--- a/kmouth/phraselist.cpp
+++ b/kmouth/phraselist.cpp
@@ -16,12 +16,12 @@
***************************************************************************/
// include files for Qt
-#include <qprinter.h>
-#include <qpainter.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
-#include <qclipboard.h>
+#include <tqprinter.h>
+#include <tqpainter.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
+#include <tqclipboard.h>
// include files for KDE
#include <klistbox.h>
@@ -45,18 +45,18 @@
#include "phrasebook/phrasebook.h"
#include "wordcompletion/wordcompletion.h"
-PhraseList::PhraseList(QWidget *parent, const char *name) : QWidget(parent,name) {
+PhraseList::PhraseList(TQWidget *parent, const char *name) : TQWidget(parent,name) {
isInSlot = false;
setBackgroundMode(PaletteBase);
- QVBoxLayout *layout = new QVBoxLayout (this);
+ TQVBoxLayout *layout = new TQVBoxLayout (this);
listBox = new KListBox (this);
- listBox->setFocusPolicy(QWidget::NoFocus);
- listBox->setSelectionMode (QListBox::Extended);
- QWhatsThis::add (listBox, i18n("This list contains the history of spoken sentences. You can select sentences and press the speak button for re-speaking."));
+ listBox->setFocusPolicy(TQWidget::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);
- QHBoxLayout *rowLayout = new QHBoxLayout ();
+ TQHBoxLayout *rowLayout = new TQHBoxLayout ();
layout->addLayout(rowLayout);
completion = new WordCompletion();
@@ -66,29 +66,29 @@ PhraseList::PhraseList(QWidget *parent, const char *name) : QWidget(parent,name)
rowLayout->addWidget(dictionaryCombo);
lineEdit = new PhraseEdit ("", this);
- lineEdit->setFocusPolicy(QWidget::StrongFocus);
+ lineEdit->setFocusPolicy(TQWidget::StrongFocus);
lineEdit->setFrame(true);
- lineEdit->setEchoMode(QLineEdit::Normal);
+ lineEdit->setEchoMode(TQLineEdit::Normal);
lineEdit->setCompletionObject (completion);
lineEdit->setAutoDeleteCompletionObject(true);
- QWhatsThis::add (lineEdit, i18n("Into this edit field you can type a phrase. Click on the speak button in order to speak the entered phrase."));
+ TQWhatsThis::add (lineEdit, i18n("Into this edit field you can type a phrase. Click on the speak button in order to speak the entered phrase."));
rowLayout->addWidget(lineEdit);
lineEdit->setFocus();
- QIconSet icon = KGlobal::iconLoader()->loadIconSet("speak", KIcon::Small);
- speakButton = new QPushButton (icon, i18n("&Speak"), this);
- speakButton->setFocusPolicy(QWidget::NoFocus);
+ TQIconSet icon = KGlobal::iconLoader()->loadIconSet("speak", KIcon::Small);
+ speakButton = new TQPushButton (icon, i18n("&Speak"), this);
+ speakButton->setFocusPolicy(TQWidget::NoFocus);
speakButton->setAutoDefault(false);
- QWhatsThis::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."));
+ 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);
- connect(dictionaryCombo, SIGNAL (activated (const QString &)), completion, SLOT (setWordList(const QString &)));
- connect(completion, SIGNAL (wordListsChanged (const QStringList &)), this, SLOT (configureCompletionCombo (const QStringList &)));
- connect(listBox, SIGNAL(selectionChanged()), SLOT(selectionChanged()));
- connect(listBox, SIGNAL(contextMenuRequested (QListBoxItem *, const QPoint &)), SLOT(contextMenuRequested (QListBoxItem *, const QPoint &)));
- connect(lineEdit, SIGNAL(returnPressed(const QString &)), SLOT(lineEntered(const QString &)));
- connect(lineEdit, SIGNAL(textChanged (const QString &)), SLOT(textChanged(const QString &)));
- connect(speakButton, SIGNAL( clicked ()), SLOT(speak()));
+ connect(dictionaryCombo, TQT_SIGNAL (activated (const TQString &)), completion, TQT_SLOT (setWordList(const TQString &)));
+ connect(completion, TQT_SIGNAL (wordListsChanged (const TQStringList &)), this, TQT_SLOT (configureCompletionCombo (const TQStringList &)));
+ connect(listBox, TQT_SIGNAL(selectionChanged()), TQT_SLOT(selectionChanged()));
+ connect(listBox, TQT_SIGNAL(contextMenuRequested (TQListBoxItem *, const TQPoint &)), TQT_SLOT(contextMenuRequested (TQListBoxItem *, const TQPoint &)));
+ connect(lineEdit, TQT_SIGNAL(returnPressed(const TQString &)), TQT_SLOT(lineEntered(const TQString &)));
+ connect(lineEdit, TQT_SIGNAL(textChanged (const TQString &)), TQT_SLOT(textChanged(const TQString &)));
+ connect(speakButton, TQT_SIGNAL( clicked ()), TQT_SLOT(speak()));
}
PhraseList::~PhraseList() {
@@ -99,17 +99,17 @@ PhraseList::~PhraseList() {
void PhraseList::print(KPrinter *pPrinter) {
PhraseBook book;
- for (QListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) {
+ for (TQListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) {
book += PhraseBookEntry(Phrase(item->text()));
}
book.print (pPrinter);
}
-QStringList PhraseList::getListSelection() {
- QStringList res = QStringList();
+TQStringList PhraseList::getListSelection() {
+ TQStringList res = TQStringList();
- for (QListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) {
+ for (TQListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) {
if (item->isSelected())
res += item->text();
}
@@ -118,7 +118,7 @@ QStringList PhraseList::getListSelection() {
}
bool PhraseList::existListSelection() {
- for (QListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) {
+ for (TQListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) {
if (item->isSelected())
return true;
}
@@ -133,7 +133,7 @@ bool PhraseList::existEditSelection() {
void PhraseList::enableMenuEntries() {
bool deselected = false;
bool selected = false;
- for (QListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) {
+ for (TQListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) {
if (item->isSelected())
selected = true;
else
@@ -147,8 +147,8 @@ void PhraseList::configureCompletion() {
completion->configure();
}
-void PhraseList::configureCompletionCombo(const QStringList &list) {
- QString current = completion->currentWordList();
+void PhraseList::configureCompletionCombo(const TQStringList &list) {
+ TQString current = completion->currentWordList();
dictionaryCombo->clear();
if (list.isEmpty())
dictionaryCombo->hide();
@@ -161,7 +161,7 @@ void PhraseList::configureCompletionCombo(const QStringList &list) {
dictionaryCombo->insertStringList (list);
dictionaryCombo->show();
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
int i = 0;
for (it = list.begin(), i = 0; it != list.end(); ++it, ++i) {
if (current == *it) {
@@ -191,9 +191,9 @@ void PhraseList::readCompletionOptions(KConfig *config) {
int mode = config->readNumEntry ("Mode", KGlobalSettings::completionMode());
lineEdit->setCompletionMode (static_cast<KGlobalSettings::Completion>(mode));
- QString current = config->readEntry ("List", QString::null);
- QStringList list = completion->wordLists();
- QStringList::ConstIterator it;
+ TQString current = config->readEntry ("List", TQString::null);
+ TQStringList list = completion->wordLists();
+ TQStringList::ConstIterator it;
int i = 0;
for (it = list.begin(), i = 0; it != list.end(); ++it, ++i) {
if (current == *it) {
@@ -218,7 +218,7 @@ void PhraseList::deselectAllEntries () {
}
void PhraseList::speak () {
- QString phrase = lineEdit->text();
+ TQString phrase = lineEdit->text();
if (phrase.isNull() || phrase.isEmpty())
speakListSelection();
else {
@@ -245,7 +245,7 @@ void PhraseList::paste() {
lineEdit->paste();
}
-void PhraseList::insert (const QString &s) {
+void PhraseList::insert (const TQString &s) {
setEditLineText(s);
}
@@ -254,8 +254,8 @@ void PhraseList::speakListSelection () {
}
void PhraseList::removeListSelection () {
- QListBoxItem *next;
- for (QListBoxItem *item = listBox->firstItem(); item != 0; item = next) {
+ TQListBoxItem *next;
+ for (TQListBoxItem *item = listBox->firstItem(); item != 0; item = next) {
next = item->next();
if (item->isSelected()) {
@@ -271,10 +271,10 @@ void PhraseList::cutListSelection () {
}
void PhraseList::copyListSelection () {
- QApplication::clipboard()->setText (getListSelection().join ("\n"));
+ TQApplication::clipboard()->setText (getListSelection().join ("\n"));
}
-void PhraseList::lineEntered (const QString &phrase) {
+void PhraseList::lineEntered (const TQString &phrase) {
if (phrase.isNull() || phrase.isEmpty())
speakListSelection();
else {
@@ -283,15 +283,15 @@ void PhraseList::lineEntered (const QString &phrase) {
}
}
-void PhraseList::speakPhrase (const QString &phrase) {
- QApplication::setOverrideCursor (KCursor::WaitCursor, false);
+void PhraseList::speakPhrase (const TQString &phrase) {
+ TQApplication::setOverrideCursor (KCursor::WaitCursor, false);
KMouthApp *theApp=(KMouthApp *) parentWidget();
- QString language = completion->languageOfWordList (completion->currentWordList());
+ TQString language = completion->languageOfWordList (completion->currentWordList());
theApp->getTTSSystem()->speak(phrase, language);
- QApplication::restoreOverrideCursor ();
+ TQApplication::restoreOverrideCursor ();
}
-void PhraseList::insertIntoPhraseList (const QString &phrase, bool clearEditLine) {
+void PhraseList::insertIntoPhraseList (const TQString &phrase, bool clearEditLine) {
int lastLine = listBox->count() - 1;
if ((lastLine == -1) || (phrase != listBox->text(lastLine))) {
listBox->insertItem(new PhraseListItem(phrase));
@@ -306,8 +306,8 @@ void PhraseList::insertIntoPhraseList (const QString &phrase, bool clearEditLine
enableMenuEntries ();
}
-void PhraseList::contextMenuRequested (QListBoxItem *, const QPoint &pos) {
- QString name;
+void PhraseList::contextMenuRequested (TQListBoxItem *, const TQPoint &pos) {
+ TQString name;
if (existListSelection())
name = "phraselist_selection_popup";
else
@@ -315,13 +315,13 @@ void PhraseList::contextMenuRequested (QListBoxItem *, const QPoint &pos) {
KMouthApp *theApp=(KMouthApp *) parentWidget();
KXMLGUIFactory *factory = theApp->factory();
- QPopupMenu *popup = (QPopupMenu *)factory->container(name,theApp);
+ TQPopupMenu *popup = (TQPopupMenu *)factory->container(name,theApp);
if (popup != 0) {
popup->popup(pos, 0);
}
}
-void PhraseList::textChanged (const QString &s) {
+void PhraseList::textChanged (const TQString &s) {
if (!isInSlot) {
isInSlot = true;
line = s;
@@ -335,7 +335,7 @@ void PhraseList::selectionChanged () {
if (!isInSlot) {
isInSlot = true;
- QStringList sel = getListSelection();
+ TQStringList sel = getListSelection();
if (sel.empty())
setEditLineText(line);
@@ -349,17 +349,17 @@ void PhraseList::selectionChanged () {
enableMenuEntries ();
}
-void PhraseList::setEditLineText(const QString &s) {
+void PhraseList::setEditLineText(const TQString &s) {
lineEdit->end(false);
while (!(lineEdit->text().isNull() || lineEdit->text().isEmpty()))
lineEdit->backspace();
lineEdit->insert(s);
}
-void PhraseList::keyPressEvent (QKeyEvent *e) {
+void PhraseList::keyPressEvent (TQKeyEvent *e) {
if (e->key() == Qt::Key_Up) {
bool selected = false;
- for (QListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) {
+ for (TQListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) {
if (item->isSelected()) {
selected = true;
}
@@ -396,7 +396,7 @@ void PhraseList::keyPressEvent (QKeyEvent *e) {
}
else if (e->key() == Qt::Key_Down) {
bool selected = false;
- for (QListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) {
+ for (TQListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) {
if (item->isSelected()) {
selected = true;
}
@@ -440,7 +440,7 @@ void PhraseList::save () {
// format we use that method here.
PhraseBook book;
- for (QListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) {
+ for (TQListBoxItem *item = listBox->firstItem(); item != 0; item = item->next()) {
book += PhraseBookEntry(Phrase(item->text()));
}
@@ -450,7 +450,7 @@ void PhraseList::save () {
}
void PhraseList::open () {
- KURL url=KFileDialog::getOpenURL(QString::null,
+ KURL url=KFileDialog::getOpenURL(TQString::null,
i18n("*|All Files\n*.phrasebook|Phrase Books (*.phrasebook)\n*.txt|Plain Text Files (*.txt)"), this, i18n("Open File as History"));
if(!url.isEmpty())
@@ -465,9 +465,9 @@ void PhraseList::open (KURL url) {
PhraseBook book;
if (book.open (url)) {
// convert PhraseBookEntryList -> QStringList
- QStringList list = book.toStringList();
+ TQStringList list = book.toStringList();
listBox->clear();
- QStringList::iterator it;
+ TQStringList::iterator it;
for (it = list.begin(); it != list.end(); ++it)
insertIntoPhraseList (*it, false);
}
diff --git a/kmouth/phraselist.h b/kmouth/phraselist.h
index 7f56306..702e135 100644
--- a/kmouth/phraselist.h
+++ b/kmouth/phraselist.h
@@ -24,8 +24,8 @@
#include <kprinter.h>
// include files for Qt
-#include <qwidget.h>
-#include <qpushbutton.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
class WordCompletion;
@@ -38,16 +38,16 @@ class WordCompletion;
* @author Gunnar Schmi Dt
*/
-class PhraseList : public QWidget {
+class PhraseList : public TQWidget {
Q_OBJECT
public:
- PhraseList(QWidget *parent=0, const char *name=0);
+ PhraseList(TQWidget *parent=0, const char *name=0);
~PhraseList();
/** contains the implementation for printing functionality */
void print(KPrinter *pPrinter);
- QStringList getListSelection();
+ TQStringList getListSelection();
bool existListSelection();
bool existEditSelection();
@@ -61,7 +61,7 @@ public slots:
void paste();
/** Insert s into the edit field. */
- void insert (const QString &s);
+ void insert (const TQString &s);
/** Called whenever the user wants the selected list entries to be spoken. */
void speakListSelection ();
@@ -83,26 +83,26 @@ public slots:
void readCompletionOptions(KConfig *config);
protected slots:
- void lineEntered (const QString &phrase);
- void contextMenuRequested (QListBoxItem *, const QPoint &pos);
- void textChanged (const QString &s);
+ void lineEntered (const TQString &phrase);
+ void contextMenuRequested (TQListBoxItem *, const TQPoint &pos);
+ void textChanged (const TQString &s);
void selectionChanged ();
- void keyPressEvent (QKeyEvent *e);
- void configureCompletionCombo(const QStringList &list);
+ void keyPressEvent (TQKeyEvent *e);
+ void configureCompletionCombo(const TQStringList &list);
private:
KListBox *listBox;
KComboBox *dictionaryCombo;
KLineEdit *lineEdit;
- QPushButton *speakButton;
- QString line;
+ TQPushButton *speakButton;
+ TQString line;
WordCompletion *completion;
bool isInSlot;
- void speakPhrase (const QString &phrase);
- void setEditLineText(const QString &s);
- void insertIntoPhraseList (const QString &phrase, bool clearEditLine);
+ void speakPhrase (const TQString &phrase);
+ void setEditLineText(const TQString &s);
+ void insertIntoPhraseList (const TQString &phrase, bool clearEditLine);
void enableMenuEntries ();
};
diff --git a/kmouth/phraselistitem.cpp b/kmouth/phraselistitem.cpp
index 6156054..721e893 100644
--- a/kmouth/phraselistitem.cpp
+++ b/kmouth/phraselistitem.cpp
@@ -16,21 +16,21 @@
***************************************************************************/
#include "phraselistitem.h"
-#include <qstyle.h>
-#include <qpainter.h>
+#include <tqstyle.h>
+#include <tqpainter.h>
-PhraseListItem::PhraseListItem (const QString & text)
- : QListBoxText::QListBoxText(text) {
+PhraseListItem::PhraseListItem (const TQString & text)
+ : TQListBoxText::TQListBoxText(text) {
}
PhraseListItem::~PhraseListItem() {
}
bool PhraseListItem::drawCursor() const {
- if ((QListBoxItem *)this != listBox()->item (listBox()->currentItem()))
+ if ((TQListBoxItem *)this != listBox()->item (listBox()->currentItem()))
return false;
- for (QListBoxItem *item = listBox()->firstItem(); item != 0; item = item->next() ) {
+ for (TQListBoxItem *item = listBox()->firstItem(); item != 0; item = item->next() ) {
if (item->isSelected())
return true;
}
@@ -41,12 +41,12 @@ int PhraseListItem::rtti() const {
return RTTI;
}
-void PhraseListItem::paint (QPainter *p) {
- QListBoxText::paint (p);
+void PhraseListItem::paint (TQPainter *p) {
+ TQListBoxText::paint (p);
if (drawCursor()) {
- QRect r (0, 0, listBox()->maxItemWidth(), height (listBox()));
- listBox()->style().drawPrimitive (QStyle::PE_FocusRect, p, r,
+ TQRect r (0, 0, listBox()->maxItemWidth(), height (listBox()));
+ listBox()->style().drawPrimitive (TQStyle::PE_FocusRect, p, r,
listBox()->colorGroup());
}
}
diff --git a/kmouth/phraselistitem.h b/kmouth/phraselistitem.h
index 24d5e49..3afc85b 100644
--- a/kmouth/phraselistitem.h
+++ b/kmouth/phraselistitem.h
@@ -18,17 +18,17 @@
#ifndef PHRASELISTITEM_H
#define PHRASELISTITEM_H
-#include <qlistbox.h>
+#include <tqlistbox.h>
/**
* This class represents a phrase in the list of spoken phrases. It extends
- * QListBoxText for providing support for a visible list cursor.
+ * TQListBoxText for providing support for a visible list cursor.
* @author Gunnar Schmi Dt
*/
-class PhraseListItem : public QListBoxText {
+class PhraseListItem : public TQListBoxText {
public:
- PhraseListItem (const QString & text);
+ PhraseListItem (const TQString & text);
~PhraseListItem();
bool drawCursor() const;
@@ -37,7 +37,7 @@ public:
static const int RTTI = 982734;
protected:
- void paint( QPainter * );
+ void paint( TQPainter * );
};
#endif
diff --git a/kmouth/speech.cpp b/kmouth/speech.cpp
index d2f7db8..8fc8f19 100644
--- a/kmouth/speech.cpp
+++ b/kmouth/speech.cpp
@@ -16,13 +16,13 @@
***************************************************************************/
#include "speech.h"
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qvaluestack.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqvaluestack.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
+#include <tqfile.h>
#include <kdebug.h>
#include <kdeversion.h>
@@ -39,25 +39,25 @@ Speech::Speech() {
Speech::~Speech() {
}
-QString Speech::prepareCommand (QString command, const QString &text,
- const QString &filename, const QString &language) {
+TQString Speech::prepareCommand (TQString command, const TQString &text,
+ const TQString &filename, const TQString &language) {
#ifdef macroExpander
- QMap<QChar,QString> map;
+ TQMap<TQChar,TQString> map;
map['t'] = text;
map['f'] = filename;
map['l'] = language;
return KMacroExpander::expandMacrosShellQuote (command, map);
#else
- QValueStack<bool> stack; // saved isdoublequote values during parsing of braces
+ TQValueStack<bool> stack; // saved isdoublequote values during parsing of braces
bool issinglequote=false; // inside '...' ?
bool isdoublequote=false; // inside "..." ?
int noreplace=0; // nested braces when within ${...}
- QString escText = KShellProcess::quote(text);
+ TQString escText = KShellProcess::quote(text);
// character sequences that change the state or need to be otherwise processed
- QRegExp re_singlequote("('|%%|%t|%f|%l)");
- QRegExp re_doublequote("(\"|\\\\|`|\\$\\(|\\$\\{|%%|%t|%f|%l)");
- QRegExp re_noquote ("('|\"|\\\\|`|\\$\\(|\\$\\{|\\(|\\{|\\)|\\}|%%|%t|%f|%l)");
+ TQRegExp re_singlequote("('|%%|%t|%f|%l)");
+ TQRegExp re_doublequote("(\"|\\\\|`|\\$\\(|\\$\\{|%%|%t|%f|%l)");
+ TQRegExp re_noquote ("('|\"|\\\\|`|\\$\\(|\\$\\{|\\(|\\{|\\)|\\}|%%|%t|%f|%l)");
// parse the command:
for (int i = re_noquote.search(command);
@@ -108,7 +108,7 @@ QString Speech::prepareCommand (QString command, const QString &text,
else if (command[i]=='`') {
// Replace all `...` with safer $(...)
command.replace (i, 1, "$(");
- QRegExp re_backticks("(`|\\\\`|\\\\\\\\|\\\\\\$)");
+ TQRegExp re_backticks("(`|\\\\`|\\\\\\\\|\\\\\\$)");
for (int i2=re_backticks.search(command,i+2);
i2!=-1;
i2=re_backticks.search(command,i2)
@@ -135,7 +135,7 @@ QString Speech::prepareCommand (QString command, const QString &text,
i+=re_noquote.matchedLength();
}
else { // replace macro
- QString match, v;
+ TQString match, v;
// get match
if (issinglequote)
@@ -169,35 +169,35 @@ QString Speech::prepareCommand (QString command, const QString &text,
#endif
}
-void Speech::speak(QString command, bool stdIn, const QString &text, const QString &language, int encoding, QTextCodec *codec) {
+void Speech::speak(TQString command, bool stdIn, const TQString &text, const TQString &language, int encoding, TQTextCodec *codec) {
if (text.length () > 0) {
// 1. prepare the text:
// 1.a) encode the text
- QTextStream ts (encText, IO_WriteOnly);
+ TQTextStream ts (encText, IO_WriteOnly);
if (encoding == Local)
- ts.setEncoding (QTextStream::Locale);
+ ts.setEncoding (TQTextStream::Locale);
else if (encoding == Latin1)
- ts.setEncoding (QTextStream::Latin1);
+ ts.setEncoding (TQTextStream::Latin1);
else if (encoding == Unicode)
- ts.setEncoding (QTextStream::Unicode);
+ ts.setEncoding (TQTextStream::Unicode);
else
ts.setCodec (codec);
ts << text;
// 1.b) create a temporary file for the text
tempFile.setAutoDelete(true);
- QTextStream* fs = tempFile.textStream();
+ TQTextStream* fs = tempFile.textStream();
if (encoding == Local)
- fs->setEncoding (QTextStream::Locale);
+ fs->setEncoding (TQTextStream::Locale);
else if (encoding == Latin1)
- fs->setEncoding (QTextStream::Latin1);
+ fs->setEncoding (TQTextStream::Latin1);
else if (encoding == Unicode)
- fs->setEncoding (QTextStream::Unicode);
+ fs->setEncoding (TQTextStream::Unicode);
else
fs->setCodec (codec);
*fs << text;
*fs << endl;
- QString filename = tempFile.file()->name();
+ TQString filename = tempFile.file()->name();
tempFile.close();
// 2. prepare the command:
@@ -206,10 +206,10 @@ void Speech::speak(QString command, bool stdIn, const QString &text, const QStri
// 3. create a new process
process << command;
- connect(&process, SIGNAL(processExited(KProcess *)), this, SLOT(processExited(KProcess *)));
- connect(&process, SIGNAL(wroteStdin(KProcess *)), this, SLOT(wroteStdin(KProcess *)));
- connect(&process, SIGNAL(receivedStdout(KProcess *, char *, int)), this, SLOT(receivedStdout(KProcess *, char *, int)));
- connect(&process, SIGNAL(receivedStderr(KProcess *, char *, int)), this, SLOT(receivedStderr(KProcess *, char *, int)));
+ connect(&process, TQT_SIGNAL(processExited(KProcess *)), this, TQT_SLOT(processExited(KProcess *)));
+ connect(&process, TQT_SIGNAL(wroteStdin(KProcess *)), this, TQT_SLOT(wroteStdin(KProcess *)));
+ connect(&process, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)), this, TQT_SLOT(receivedStdout(KProcess *, char *, int)));
+ connect(&process, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)), this, TQT_SLOT(receivedStderr(KProcess *, char *, int)));
// 4. start the process
if (stdIn) {
@@ -225,10 +225,10 @@ void Speech::speak(QString command, bool stdIn, const QString &text, const QStri
}
void Speech::receivedStdout (KProcess *, char *buffer, int buflen) {
- kdDebug() << QString::fromLatin1(buffer, buflen) + "\n";
+ kdDebug() << TQString::fromLatin1(buffer, buflen) + "\n";
}
void Speech::receivedStderr (KProcess *, char *buffer, int buflen) {
- kdDebug() << QString::fromLatin1(buffer, buflen) + "\n";
+ kdDebug() << TQString::fromLatin1(buffer, buflen) + "\n";
}
void Speech::wroteStdin(KProcess *) {
diff --git a/kmouth/speech.h b/kmouth/speech.h
index 83c728c..11331cf 100644
--- a/kmouth/speech.h
+++ b/kmouth/speech.h
@@ -18,8 +18,8 @@
#ifndef SPEECH_H
#define SPEECH_H
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kprocess.h>
#include <ktempfile.h>
@@ -27,7 +27,7 @@
*@author Gunnar Schmi Dt
*/
-class Speech : public QObject {
+class Speech : public TQObject {
Q_OBJECT
public:
enum CharacterCodec {
@@ -46,7 +46,7 @@ public:
* @param stdin true if the program shall receive its data via standard input
* @param text The text that shall be spoken
*/
- void speak(QString command, bool use_stdin, const QString &text, const QString &language, int encoding, QTextCodec *codec);
+ void speak(TQString command, bool use_stdin, const TQString &text, const TQString &language, int encoding, TQTextCodec *codec);
/**
* Prepares a command for being executed. During the preparation the
@@ -54,8 +54,8 @@ public:
* @param command the command that shall be executed for speaking
* @param text the quoted text that can be inserted into the command
*/
- QString prepareCommand (QString command, const QString &text,
- const QString &filename, const QString &language);
+ TQString prepareCommand (TQString command, const TQString &text,
+ const TQString &filename, const TQString &language);
public slots:
void wroteStdin (KProcess *p);
@@ -65,7 +65,7 @@ public slots:
private:
KShellProcess process;
- QByteArray encText;
+ TQByteArray encText;
KTempFile tempFile;
};
diff --git a/kmouth/texttospeechconfigurationwidget.cpp b/kmouth/texttospeechconfigurationwidget.cpp
index f697061..f7fe16a 100644
--- a/kmouth/texttospeechconfigurationwidget.cpp
+++ b/kmouth/texttospeechconfigurationwidget.cpp
@@ -18,20 +18,20 @@
#include "texttospeechconfigurationwidget.h"
#include <kconfig.h>
-#include <qtextcodec.h>
-#include <qptrlist.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
+#include <tqtextcodec.h>
+#include <tqptrlist.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
#include <kcombobox.h>
#include <klocale.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include "speech.h"
-#include <qlineedit.h>
-#include <qpushbutton.h>
-#include <qcheckbox.h>
+#include <tqlineedit.h>
+#include <tqpushbutton.h>
+#include <tqcheckbox.h>
#include <kurlrequester.h>
-TextToSpeechConfigurationWidget::TextToSpeechConfigurationWidget (QWidget *parent, const char *name)
+TextToSpeechConfigurationWidget::TextToSpeechConfigurationWidget (TQWidget *parent, const char *name)
: texttospeechconfigurationui (parent, name)
{
ttsSystem = new TextToSpeechSystem();
@@ -44,8 +44,8 @@ TextToSpeechConfigurationWidget::~TextToSpeechConfigurationWidget() {
}
void TextToSpeechConfigurationWidget::buildCodecList () {
- QString local = i18n("Local")+" (";
- local += QTextCodec::codecForLocale()->name();
+ TQString local = i18n("Local")+" (";
+ local += TQTextCodec::codecForLocale()->name();
local += ")";
characterCodingBox->insertItem (local, Speech::Local);
characterCodingBox->insertItem (i18n("Latin1"), Speech::Latin1);
@@ -72,7 +72,7 @@ TextToSpeechSystem *TextToSpeechConfigurationWidget::getTTSSystem() const {
return ttsSystem;
}
-void TextToSpeechConfigurationWidget::readOptions (KConfig *config, const QString &langGroup) {
+void TextToSpeechConfigurationWidget::readOptions (KConfig *config, const TQString &langGroup) {
ttsSystem->readOptions (config, langGroup);
urlReq->setURL (ttsSystem->ttsCommand);
stdInButton->setChecked (ttsSystem->stdIn);
@@ -80,7 +80,7 @@ void TextToSpeechConfigurationWidget::readOptions (KConfig *config, const QStrin
useKttsd->setChecked (ttsSystem->useKttsd);
}
-void TextToSpeechConfigurationWidget::saveOptions (KConfig *config, const QString &langGroup) {
+void TextToSpeechConfigurationWidget::saveOptions (KConfig *config, const TQString &langGroup) {
ttsSystem->saveOptions (config, langGroup);
}
diff --git a/kmouth/texttospeechconfigurationwidget.h b/kmouth/texttospeechconfigurationwidget.h
index 439ae4f..a5ef3ba 100644
--- a/kmouth/texttospeechconfigurationwidget.h
+++ b/kmouth/texttospeechconfigurationwidget.h
@@ -30,13 +30,13 @@
class TextToSpeechConfigurationWidget : public texttospeechconfigurationui {
friend class TextToSpeechConfigurationDialog;
public:
- TextToSpeechConfigurationWidget(QWidget *parent, const char *name);
+ TextToSpeechConfigurationWidget(TQWidget *parent, const char *name);
~TextToSpeechConfigurationWidget();
TextToSpeechSystem *getTTSSystem() const;
- void readOptions (KConfig *config, const QString &langGroup);
- void saveOptions (KConfig *config, const QString &langGroup);
+ void readOptions (KConfig *config, const TQString &langGroup);
+ void saveOptions (KConfig *config, const TQString &langGroup);
void ok();
void cancel();
diff --git a/kmouth/texttospeechsystem.cpp b/kmouth/texttospeechsystem.cpp
index 4aeb0f9..f7f9515 100644
--- a/kmouth/texttospeechsystem.cpp
+++ b/kmouth/texttospeechsystem.cpp
@@ -17,9 +17,9 @@
#include "texttospeechsystem.h"
-#include <qregexp.h>
-#include <qtextcodec.h>
-#include <qptrlist.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
+#include <tqptrlist.h>
#include <stdlib.h>
#include <kapplication.h>
@@ -40,18 +40,18 @@ TextToSpeechSystem::~TextToSpeechSystem() {
delete codecList;
}
-bool kttsdSay (const QString &text, const QString &language) {
+bool kttsdSay (const TQString &text, const TQString &language) {
DCOPClient *client = kapp->dcopClient();
- QByteArray data;
- QCString replyType;
- QByteArray replyData;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQCString replyType;
+ TQByteArray replyData;
+ TQDataStream arg(data, IO_WriteOnly);
arg << text << language;
- return client->call("kttsd", "KSpeech", "sayWarning(QString,QString)",
+ return client->call("kttsd", "KSpeech", "sayWarning(TQString,TQString)",
data, replyType, replyData, true);
}
-void TextToSpeechSystem::speak (const QString &text, const QString &language) {
+void TextToSpeechSystem::speak (const TQString &text, const TQString &language) {
if (text.length() > 0) {
if (useKttsd) {
if (kttsdSay(text, language))
@@ -66,13 +66,13 @@ void TextToSpeechSystem::speak (const QString &text, const QString &language) {
}
}
-void TextToSpeechSystem::readOptions (KConfig *config, const QString &langGroup) {
+void TextToSpeechSystem::readOptions (KConfig *config, const TQString &langGroup) {
config->setGroup(langGroup);
ttsCommand = config->readPathEntry("Command");
stdIn = config->readBoolEntry("StdIn", true);
useKttsd = config->readBoolEntry("useKttsd", true);
- QString codecString = config->readEntry("Codec", "Local");
+ TQString codecString = config->readEntry("Codec", "Local");
if (codecString == "Local")
codec = Speech::Local;
else if (codecString == "Latin1")
@@ -87,7 +87,7 @@ void TextToSpeechSystem::readOptions (KConfig *config, const QString &langGroup)
}
}
-void TextToSpeechSystem::saveOptions (KConfig *config, const QString &langGroup) {
+void TextToSpeechSystem::saveOptions (KConfig *config, const TQString &langGroup) {
config->setGroup(langGroup);
config->writePathEntry("Command", ttsCommand);
config->writeEntry("StdIn", stdIn);
@@ -104,10 +104,10 @@ void TextToSpeechSystem::saveOptions (KConfig *config, const QString &langGroup)
}
void TextToSpeechSystem::buildCodecList () {
- codecList = new QPtrList<QTextCodec>;
- QTextCodec *codec;
+ codecList = new TQPtrList<TQTextCodec>;
+ TQTextCodec *codec;
int i;
- for (i = 0; (codec = QTextCodec::codecForIndex(i)); i++)
+ for (i = 0; (codec = TQTextCodec::codecForIndex(i)); i++)
codecList->append (codec);
}
diff --git a/kmouth/texttospeechsystem.h b/kmouth/texttospeechsystem.h
index fc9b018..f435585 100644
--- a/kmouth/texttospeechsystem.h
+++ b/kmouth/texttospeechsystem.h
@@ -19,9 +19,9 @@
#ifndef TEXTTOSPEECHSYSTEM_H
#define TEXTTOSPEECHSYSTEM_H
-#include <qstring.h>
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
class KConfig;
@@ -36,18 +36,18 @@ public:
TextToSpeechSystem();
~TextToSpeechSystem();
- void readOptions (KConfig *config, const QString &langGroup);
- void saveOptions (KConfig *config, const QString &langGroup);
+ void readOptions (KConfig *config, const TQString &langGroup);
+ void saveOptions (KConfig *config, const TQString &langGroup);
public slots:
- void speak (const QString &text, const QString &language);
+ void speak (const TQString &text, const TQString &language);
private:
void buildCodecList ();
- QPtrList<QTextCodec> *codecList;
+ TQPtrList<TQTextCodec> *codecList;
int codec;
- QString ttsCommand;
+ TQString ttsCommand;
bool stdIn;
bool useKttsd;
};
diff --git a/kmouth/wordcompletion/creationsourcedetailsui.ui.h b/kmouth/wordcompletion/creationsourcedetailsui.ui.h
index 956f021..16ecdc5 100644
--- a/kmouth/wordcompletion/creationsourcedetailsui.ui.h
+++ b/kmouth/wordcompletion/creationsourcedetailsui.ui.h
@@ -12,23 +12,23 @@ void CreationSourceDetailsUI::init() {
languageButton = new KLanguageButton (this, "languageButton");
CreationSourceDetailsUILayout->addWidget (languageButton, 2, 1);
languageLabel->setBuddy (languageButton);
- QWhatsThis::add (languageButton, i18n("With this combo box you decide which language should be associated with the new dictionary."));
+ 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"), QString::fromLatin1("l10n/"), QString::null);
+ languageButton->insertLanguage("??", i18n("Other"), TQString::fromLatin1("l10n/"), TQString::null);
- connect (languageButton, SIGNAL(activated(int)), this, SLOT(languageButton_activated(int)));
+ connect (languageButton, TQT_SIGNAL(activated(int)), this, TQT_SLOT(languageButton_activated(int)));
}
void CreationSourceDetailsUI::languageButton_activated (int) {
if (languageButton->currentTag() == "??") {
- QString customLanguage = KInputDialog::getText(i18n("Create Custom Language"), i18n("Please enter the code for the custom language:"));
+ TQString customLanguage = KInputDialog::getText(i18n("Create Custom Language"), i18n("Please enter the code for the custom language:"));
if (languageButton->containsTag(customLanguage)) {
languageButton->setCurrentItem(customLanguage);
}
else {
- languageButton->insertLanguage(customLanguage, i18n("without name"), QString::fromLatin1("l10n/"), QString::null);
+ languageButton->insertLanguage(customLanguage, i18n("without name"), TQString::fromLatin1("l10n/"), TQString::null);
languageButton->setCurrentItem(customLanguage);
}
}
diff --git a/kmouth/wordcompletion/creationsourceui.ui.h b/kmouth/wordcompletion/creationsourceui.ui.h
index d78a439..f9f3dad 100644
--- a/kmouth/wordcompletion/creationsourceui.ui.h
+++ b/kmouth/wordcompletion/creationsourceui.ui.h
@@ -9,11 +9,11 @@
void CreationSourceUI::init() {
- group1 = new QButtonGroup (0);
+ group1 = new TQButtonGroup (0);
group1->insert (createButton);
group1->insert (mergeButton);
group1->insert (emptyButton);
- group2 = new QButtonGroup (0);
+ group2 = new TQButtonGroup (0);
group2->insert (kdeDocButton);
group2->insert (fileButton);
group2->insert (directoryButton);
diff --git a/kmouth/wordcompletion/dictionarycreationwizard.cpp b/kmouth/wordcompletion/dictionarycreationwizard.cpp
index a0711ce..13c770e 100644
--- a/kmouth/wordcompletion/dictionarycreationwizard.cpp
+++ b/kmouth/wordcompletion/dictionarycreationwizard.cpp
@@ -15,14 +15,14 @@
* *
***************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qtextcodec.h>
-#include <qwhatsthis.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqtextcodec.h>
+#include <tqwhatsthis.h>
#include <klistview.h>
#include <klineedit.h>
@@ -42,9 +42,9 @@
#include "kdedocsourceui.h"
#include "wordlist.h"
-DictionaryCreationWizard::DictionaryCreationWizard (QWidget *parent, const char *name,
- QStringList dictionaryNames, QStringList dictionaryFiles,
- QStringList dictionaryLanguages)
+DictionaryCreationWizard::DictionaryCreationWizard (TQWidget *parent, const char *name,
+ TQStringList dictionaryNames, TQStringList dictionaryFiles,
+ TQStringList dictionaryLanguages)
: KWizard (parent, name)
{
buildCodecList ();
@@ -61,9 +61,9 @@ DictionaryCreationWizard::DictionaryCreationWizard (QWidget *parent, const char
dirWidget= new CreationSourceDetailsUI (this, "directory source page");
addPage (dirWidget, i18n("Source of New Dictionary (2)"));
dirWidget->urlLabel->setText (i18n("&Directory:"));
- QWhatsThis::add (dirWidget->urlLabel, i18n("With this input field you specify which directory you want to load for creating the new dictionary."));
+ TQWhatsThis::add (dirWidget->urlLabel, i18n("With this input field you specify which directory you want to load for creating the new dictionary."));
dirWidget->url->setMode(KFile::Directory);
- QWhatsThis::add (dirWidget->url, i18n("With this input field you specify which directory you want to load for creating the new dictionary."));
+ TQWhatsThis::add (dirWidget->url, i18n("With this input field you specify which directory you want to load for creating the new dictionary."));
buildCodecCombo (dirWidget->encodingCombo);
kdeDocWidget= new KDEDocSourceUI (this, "KDE documentation source page");
@@ -72,11 +72,11 @@ DictionaryCreationWizard::DictionaryCreationWizard (QWidget *parent, const char
mergeWidget = new MergeWidget (this, "merge source page", dictionaryNames, dictionaryFiles, dictionaryLanguages);
addPage (mergeWidget, i18n("Source of New Dictionary (2)"));
- connect (creationSource->fileButton, SIGNAL (toggled(bool)), this, SLOT(calculateAppropriate(bool)) );
- connect (creationSource->directoryButton,SIGNAL(toggled(bool)), this, SLOT(calculateAppropriate(bool)) );
- connect (creationSource->kdeDocButton, SIGNAL (toggled(bool)), this, SLOT(calculateAppropriate(bool)) );
- connect (creationSource->mergeButton, SIGNAL (toggled(bool)), this, SLOT(calculateAppropriate(bool)) );
- connect (creationSource->emptyButton, SIGNAL (toggled(bool)), this, SLOT(calculateAppropriate(bool)) );
+ connect (creationSource->fileButton, TQT_SIGNAL (toggled(bool)), this, TQT_SLOT(calculateAppropriate(bool)) );
+ connect (creationSource->directoryButton,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(calculateAppropriate(bool)) );
+ connect (creationSource->kdeDocButton, TQT_SIGNAL (toggled(bool)), this, TQT_SLOT(calculateAppropriate(bool)) );
+ connect (creationSource->mergeButton, TQT_SIGNAL (toggled(bool)), this, TQT_SLOT(calculateAppropriate(bool)) );
+ connect (creationSource->emptyButton, TQT_SIGNAL (toggled(bool)), this, TQT_SLOT(calculateAppropriate(bool)) );
calculateAppropriate (true);
}
@@ -90,16 +90,16 @@ DictionaryCreationWizard::~DictionaryCreationWizard () {
}
void DictionaryCreationWizard::buildCodecList () {
- codecList = new QPtrList<QTextCodec>;
- QTextCodec *codec;
+ codecList = new TQPtrList<TQTextCodec>;
+ TQTextCodec *codec;
int i;
- for (i = 0; (codec = QTextCodec::codecForIndex(i)); i++)
+ for (i = 0; (codec = TQTextCodec::codecForIndex(i)); i++)
codecList->append (codec);
}
-void DictionaryCreationWizard::buildCodecCombo (QComboBox *combo) {
- QString local = i18n("Local")+" (";
- local += QTextCodec::codecForLocale()->name();
+void DictionaryCreationWizard::buildCodecCombo (TQComboBox *combo) {
+ TQString local = i18n("Local")+" (";
+ local += TQTextCodec::codecForLocale()->name();
local += ")";
combo->insertItem (local, 0);
combo->insertItem (i18n("Latin1"), 1);
@@ -154,58 +154,58 @@ void DictionaryCreationWizard::calculateAppropriate (bool) {
}
}
-QString DictionaryCreationWizard::createDictionary() {
+TQString DictionaryCreationWizard::createDictionary() {
WordList::WordMap map;
- QString dicFile = "";
+ TQString dicFile = "";
KProgressDialog *pdlg = WordList::progressDialog();
if (creationSource->mergeButton->isChecked()) {
map = WordList::mergeFiles (mergeWidget->mergeParameters(), pdlg);
- dicFile = QString::null;
+ dicFile = TQString::null;
}
else if (creationSource->emptyButton->isChecked()) {
- dicFile = QString::null;
+ dicFile = TQString::null;
}
else if (creationSource->fileButton->isChecked()) {
- QString filename = fileWidget->url->url();
+ TQString filename = fileWidget->url->url();
int encoding = fileWidget->encodingCombo->currentItem();
if (fileWidget->spellCheckBox->isChecked())
dicFile = fileWidget->ooDictURL->url();
switch (encoding) {
case 0:
- map = WordList::parseFile (filename, QTextStream::Locale, 0, pdlg);
+ map = WordList::parseFile (filename, TQTextStream::Locale, 0, pdlg);
break;
case 1:
- map = WordList::parseFile (filename, QTextStream::Latin1, 0, pdlg);
+ map = WordList::parseFile (filename, TQTextStream::Latin1, 0, pdlg);
break;
case 2:
- map = WordList::parseFile (filename, QTextStream::Unicode, 0, pdlg);
+ map = WordList::parseFile (filename, TQTextStream::Unicode, 0, pdlg);
break;
default:
- map = WordList::parseFile (filename, (QTextStream::Encoding)0, codecList->at(encoding-3), pdlg);
+ map = WordList::parseFile (filename, (TQTextStream::Encoding)0, codecList->at(encoding-3), pdlg);
}
}
else if (creationSource->directoryButton->isChecked()) {
- QString directory = dirWidget->url->url();
+ TQString directory = dirWidget->url->url();
int encoding = dirWidget->encodingCombo->currentItem();
if (dirWidget->spellCheckBox->isChecked())
dicFile = dirWidget->ooDictURL->url();
switch (encoding) {
case 0:
- map = WordList::parseDir (directory, QTextStream::Locale, 0, pdlg);
+ map = WordList::parseDir (directory, TQTextStream::Locale, 0, pdlg);
break;
case 1:
- map = WordList::parseDir (directory, QTextStream::Latin1, 0, pdlg);
+ map = WordList::parseDir (directory, TQTextStream::Latin1, 0, pdlg);
break;
case 2:
- map = WordList::parseDir (directory, QTextStream::Unicode, 0, pdlg);
+ map = WordList::parseDir (directory, TQTextStream::Unicode, 0, pdlg);
break;
default:
- map = WordList::parseDir (directory, (QTextStream::Encoding)0, codecList->at(encoding-3), pdlg);
+ map = WordList::parseDir (directory, (TQTextStream::Encoding)0, codecList->at(encoding-3), pdlg);
}
}
else { // creationSource->kdeDocButton must be checked
- QString language = kdeDocWidget->languageButton->currentTag();
+ TQString language = kdeDocWidget->languageButton->currentTag();
if (kdeDocWidget->spellCheckBox->isChecked())
dicFile = kdeDocWidget->ooDictURL->url();
map = WordList::parseKDEDoc (language, pdlg);
@@ -217,11 +217,11 @@ QString DictionaryCreationWizard::createDictionary() {
delete pdlg;
int dictnumber = 0;
- QString filename;
- QString dictionaryFile;
+ TQString filename;
+ TQString dictionaryFile;
do {
dictnumber++;
- filename = QString("wordcompletion%1.dict").arg(dictnumber);
+ filename = TQString("wordcompletion%1.dict").arg(dictnumber);
dictionaryFile = KApplication::kApplication()->dirs()->findResource("appdata", filename);
}
while (KStandardDirs::exists(dictionaryFile));
@@ -233,7 +233,7 @@ QString DictionaryCreationWizard::createDictionary() {
return "";
}
-QString DictionaryCreationWizard::name() {
+TQString DictionaryCreationWizard::name() {
if (creationSource->mergeButton->isChecked()) {
return i18n("Merge result");
}
@@ -251,7 +251,7 @@ QString DictionaryCreationWizard::name() {
}
}
-QString DictionaryCreationWizard::language() {
+TQString DictionaryCreationWizard::language() {
if (creationSource->mergeButton->isChecked()) {
return mergeWidget->language();
}
@@ -275,25 +275,25 @@ QString DictionaryCreationWizard::language() {
/***************************************************************************/
MergeWidget::MergeWidget(KWizard *parent, const char *name,
- QStringList dictionaryNames, QStringList dictionaryFiles,
- QStringList dictionaryLanguages)
-: QScrollView (parent, name) {
+ TQStringList dictionaryNames, TQStringList dictionaryFiles,
+ TQStringList dictionaryLanguages)
+: TQScrollView (parent, name) {
dictionaries.setAutoDelete (false);
weights.setAutoDelete (false);
- QWidget *contents = new QWidget(viewport());
+ TQWidget *contents = new TQWidget(viewport());
addChild(contents);
- QGridLayout *layout = new QGridLayout (contents);
- setResizePolicy (QScrollView::AutoOneFit);
+ TQGridLayout *layout = new TQGridLayout (contents);
+ setResizePolicy (TQScrollView::AutoOneFit);
layout->setColStretch (0, 0);
layout->setColStretch (1, 1);
int row = 0;
- QStringList::Iterator nIt = dictionaryNames.begin();
- QStringList::Iterator fIt = dictionaryFiles.begin();
- QStringList::Iterator lIt = dictionaryLanguages.begin();
+ TQStringList::Iterator nIt = dictionaryNames.begin();
+ TQStringList::Iterator fIt = dictionaryFiles.begin();
+ TQStringList::Iterator lIt = dictionaryLanguages.begin();
for (; nIt != dictionaryNames.end(); ++nIt, ++fIt, ++lIt) {
- QCheckBox *checkbox = new QCheckBox(*nIt, contents);
+ TQCheckBox *checkbox = new TQCheckBox(*nIt, contents);
KIntNumInput *numInput = new KIntNumInput(contents);
layout->addWidget (checkbox, row, 0);
layout->addWidget (numInput, row, 1);
@@ -301,7 +301,7 @@ MergeWidget::MergeWidget(KWizard *parent, const char *name,
checkbox->setChecked (true);
numInput->setRange (1, 100, 10, true);
numInput->setValue (100);
- connect (checkbox, SIGNAL (toggled(bool)), numInput, SLOT(setEnabled(bool)));
+ connect (checkbox, TQT_SIGNAL (toggled(bool)), numInput, TQT_SLOT(setEnabled(bool)));
dictionaries.insert(*fIt, checkbox);
weights.insert(*fIt, numInput);
@@ -313,13 +313,13 @@ MergeWidget::MergeWidget(KWizard *parent, const char *name,
MergeWidget::~MergeWidget() {
}
-QMap <QString, int> MergeWidget::mergeParameters () {
- QMap <QString, int> files;
- QDictIterator<QCheckBox> it(dictionaries);
+TQMap <TQString, int> MergeWidget::mergeParameters () {
+ TQMap <TQString, int> files;
+ TQDictIterator<TQCheckBox> it(dictionaries);
for (; it.current(); ++it) {
if (it.current()->isChecked()) {
- QString name = it.currentKey();
- QString dictionaryFile = KApplication::kApplication()->dirs()->findResource("appdata", name);
+ TQString name = it.currentKey();
+ TQString dictionaryFile = KApplication::kApplication()->dirs()->findResource("appdata", name);
files[dictionaryFile] = weights[name]->value();
}
}
@@ -327,15 +327,15 @@ QMap <QString, int> MergeWidget::mergeParameters () {
return files;
}
-QString MergeWidget::language () {
- QDictIterator<QCheckBox> it(dictionaries);
+TQString MergeWidget::language () {
+ TQDictIterator<TQCheckBox> it(dictionaries);
for (; it.current(); ++it) {
if (it.current()->isChecked()) {
return languages [it.currentKey()];
}
}
- return QString::null;
+ return TQString::null;
}
/***************************************************************************/
@@ -351,7 +351,7 @@ void CompletionWizardWidget::ok (KConfig *config) {
WordList::WordMap map;
KProgressDialog *pdlg = WordList::progressDialog();
- QString language = languageButton->currentTag();
+ TQString language = languageButton->currentTag();
map = WordList::parseKDEDoc (language, pdlg);
if (spellCheckBox->isChecked())
@@ -360,8 +360,8 @@ void CompletionWizardWidget::ok (KConfig *config) {
pdlg->close();
delete pdlg;
- QString filename;
- QString dictionaryFile;
+ TQString filename;
+ TQString dictionaryFile;
dictionaryFile = KApplication::kApplication()->dirs()->saveLocation ("appdata", "/") + "wordcompletion1.dict";
if (WordList::saveWordList (map, dictionaryFile)) {
diff --git a/kmouth/wordcompletion/dictionarycreationwizard.h b/kmouth/wordcompletion/dictionarycreationwizard.h
index 18928e1..0977680 100644
--- a/kmouth/wordcompletion/dictionarycreationwizard.h
+++ b/kmouth/wordcompletion/dictionarycreationwizard.h
@@ -20,8 +20,8 @@
#ifndef DICTIONARYCREATIONWIZARD_H
#define DICTIONARYCREATIONWIZARD_H
-#include <qptrlist.h>
-#include <qmap.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
#include <kwizard.h>
#include <knuminput.h>
@@ -43,22 +43,22 @@ class MergeWidget;
class DictionaryCreationWizard : public KWizard {
Q_OBJECT
public:
- DictionaryCreationWizard (QWidget *parent, const char *name,
- QStringList dictionaryNames,
- QStringList dictionaryFiles,
- QStringList dictionaryLanguages);
+ DictionaryCreationWizard (TQWidget *parent, const char *name,
+ TQStringList dictionaryNames,
+ TQStringList dictionaryFiles,
+ TQStringList dictionaryLanguages);
~DictionaryCreationWizard();
- QString createDictionary();
- QString name();
- QString language();
+ TQString createDictionary();
+ TQString name();
+ TQString language();
private slots:
void calculateAppropriate (bool);
private:
void buildCodecList ();
- void buildCodecCombo (QComboBox *combo);
+ void buildCodecCombo (TQComboBox *combo);
CreationSourceUI *creationSource;
CreationSourceDetailsUI *fileWidget;
@@ -66,7 +66,7 @@ private:
KDEDocSourceUI *kdeDocWidget;
MergeWidget *mergeWidget;
- QPtrList<QTextCodec> *codecList;
+ TQPtrList<TQTextCodec> *codecList;
};
/**
@@ -74,22 +74,22 @@ private:
* KDE documentation.
* @author Gunnar Schmi Dt
*/
-class MergeWidget : public QScrollView {
+class MergeWidget : public TQScrollView {
Q_OBJECT
public:
MergeWidget(KWizard *parent, const char *name,
- QStringList dictionaryNames,
- QStringList dictionaryFiles,
- QStringList dictionaryLanguages);
+ TQStringList dictionaryNames,
+ TQStringList dictionaryFiles,
+ TQStringList dictionaryLanguages);
~MergeWidget();
- QMap <QString, int> mergeParameters ();
- QString language ();
+ TQMap <TQString, int> mergeParameters ();
+ TQString language ();
private:
- QDict<QCheckBox> dictionaries;
- QDict<KIntNumInput> weights;
- QMap<QString,QString> languages;
+ TQDict<TQCheckBox> dictionaries;
+ TQDict<KIntNumInput> weights;
+ TQMap<TQString,TQString> languages;
};
/**
diff --git a/kmouth/wordcompletion/kdedocsourceui.ui.h b/kmouth/wordcompletion/kdedocsourceui.ui.h
index 4c42b32..92a4c6b 100644
--- a/kmouth/wordcompletion/kdedocsourceui.ui.h
+++ b/kmouth/wordcompletion/kdedocsourceui.ui.h
@@ -11,7 +11,7 @@ void KDEDocSourceUI::init() {
languageButton = new KLanguageButton (this, "languageButton");
KDEDocSourceUILayout->addWidget (languageButton, 0, 1);
languageLabel->setBuddy (languageButton);
- QWhatsThis::add (languageButton, i18n("With this combo box you select which of the installed languages is used for creating the new dictionary. KMouth will only parse documentation files of this language."));
+ TQWhatsThis::add (languageButton, i18n("With this combo box you select which of the installed languages is used for creating the new dictionary. KMouth will only parse documentation files of this language."));
loadLanguageList(languageButton);
diff --git a/kmouth/wordcompletion/klanguagebutton.cpp b/kmouth/wordcompletion/klanguagebutton.cpp
index 72182d4..b954a62 100644
--- a/kmouth/wordcompletion/klanguagebutton.cpp
+++ b/kmouth/wordcompletion/klanguagebutton.cpp
@@ -23,7 +23,7 @@
*/
#define INCLUDE_MENUITEM_DEF
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include <kstandarddirs.h>
#include "klanguagebutton.h"
@@ -31,7 +31,7 @@
#include <kdebug.h>
-static inline void checkInsertPos( QPopupMenu *popup, const QString & str,
+static inline void checkInsertPos( TQPopupMenu *popup, const TQString & str,
int &index )
{
if ( index == -2 )
@@ -57,15 +57,15 @@ static inline void checkInsertPos( QPopupMenu *popup, const QString & str,
index = a; // it doesn't really matter ... a == b here.
}
-static inline QPopupMenu * checkInsertIndex( QPopupMenu *popup,
- const QStringList *tags, const QString &submenu )
+static inline TQPopupMenu * checkInsertIndex( TQPopupMenu *popup,
+ const TQStringList *tags, const TQString &submenu )
{
int pos = tags->findIndex( submenu );
- QPopupMenu *pi = 0;
+ TQPopupMenu *pi = 0;
if ( pos != -1 )
{
- QMenuItem *p = popup->findItem( pos );
+ TQMenuItem *p = popup->findItem( pos );
pi = p ? p->popup() : 0;
}
if ( !pi )
@@ -80,8 +80,8 @@ KLanguageButton::~KLanguageButton()
delete m_tags;
}
-KLanguageButton::KLanguageButton( QWidget * parent, const char *name )
-: QPushButton( parent, name ),
+KLanguageButton::KLanguageButton( TQWidget * parent, const char *name )
+: TQPushButton( parent, name ),
m_popup( 0 ),
m_oldPopup( 0 )
{
@@ -90,54 +90,54 @@ KLanguageButton::KLanguageButton( QWidget * parent, const char *name )
clear();
}
-void KLanguageButton::insertItem( const QIconSet& icon, const QString &text,
- const QString &tag, const QString &submenu, int index )
+void KLanguageButton::insertItem( const TQIconSet& icon, const TQString &text,
+ const TQString &tag, const TQString &submenu, int index )
{
- QPopupMenu *pi = checkInsertIndex( m_popup, m_tags, submenu );
+ TQPopupMenu *pi = checkInsertIndex( m_popup, m_tags, submenu );
checkInsertPos( pi, text, index );
pi->insertItem( icon, text, count(), index );
m_tags->append( tag );
}
-void KLanguageButton::insertItem( const QString &text, const QString &tag,
- const QString &submenu, int index )
+void KLanguageButton::insertItem( const TQString &text, const TQString &tag,
+ const TQString &submenu, int index )
{
- QPopupMenu *pi = checkInsertIndex( m_popup, m_tags, submenu );
+ TQPopupMenu *pi = checkInsertIndex( m_popup, m_tags, submenu );
checkInsertPos( pi, text, index );
pi->insertItem( text, count(), index );
m_tags->append( tag );
}
-void KLanguageButton::insertSeparator( const QString &submenu, int index )
+void KLanguageButton::insertSeparator( const TQString &submenu, int index )
{
- QPopupMenu *pi = checkInsertIndex( m_popup, m_tags, submenu );
+ TQPopupMenu *pi = checkInsertIndex( m_popup, m_tags, submenu );
pi->insertSeparator( index );
- m_tags->append( QString::null );
+ m_tags->append( TQString::null );
}
-void KLanguageButton::insertSubmenu( const QString &text, const QString &tag,
- const QString &submenu, int index )
+void KLanguageButton::insertSubmenu( const TQString &text, const TQString &tag,
+ const TQString &submenu, int index )
{
- QPopupMenu *pi = checkInsertIndex( m_popup, m_tags, submenu );
- QPopupMenu *p = new QPopupMenu( pi );
+ TQPopupMenu *pi = checkInsertIndex( m_popup, m_tags, submenu );
+ TQPopupMenu *p = new TQPopupMenu( pi );
checkInsertPos( pi, text, index );
pi->insertItem( text, p, count(), index );
m_tags->append( tag );
- connect( p, SIGNAL( activated( int ) ),
- SLOT( slotActivated( int ) ) );
- connect( p, SIGNAL( highlighted( int ) ), this,
- SIGNAL( highlighted( int ) ) );
+ connect( p, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotActivated( int ) ) );
+ connect( p, TQT_SIGNAL( highlighted( int ) ), this,
+ TQT_SIGNAL( highlighted( int ) ) );
}
-void KLanguageButton::insertLanguage( const QString& path, const QString& name,
- const QString& sub, const QString &submenu, int index )
+void KLanguageButton::insertLanguage( const TQString& path, const TQString& name,
+ const TQString& sub, const TQString &submenu, int index )
{
- QString output = name + QString::fromLatin1( " (" ) + path +
- QString::fromLatin1( ")" );
+ TQString output = name + TQString::fromLatin1( " (" ) + path +
+ TQString::fromLatin1( ")" );
#if 0
// Nooooo ! Country != language
- QPixmap flag( locate( "locale", sub + path +
- QString::fromLatin1( "/flag.png" ) ) );
+ TQPixmap flag( locate( "locale", sub + path +
+ TQString::fromLatin1( "/flag.png" ) ) );
#endif
insertItem( output, path, submenu, index );
}
@@ -165,44 +165,44 @@ void KLanguageButton::clear()
delete m_oldPopup;
m_oldPopup = m_popup;
- m_popup = new QPopupMenu( this );
+ m_popup = new TQPopupMenu( this );
setPopup( m_popup );
- connect( m_popup, SIGNAL( activated( int ) ),
- SLOT( slotActivated( int ) ) );
- connect( m_popup, SIGNAL( highlighted( int ) ),
- SIGNAL( highlighted( int ) ) );
+ connect( m_popup, TQT_SIGNAL( activated( int ) ),
+ TQT_SLOT( slotActivated( int ) ) );
+ connect( m_popup, TQT_SIGNAL( highlighted( int ) ),
+ TQT_SIGNAL( highlighted( int ) ) );
- setText( QString::null );
- setIconSet( QIconSet() );
+ setText( TQString::null );
+ setIconSet( TQIconSet() );
}
-/*void KLanguageButton::changeLanguage( const QString& name, int i )
+/*void KLanguageButton::changeLanguage( const TQString& name, int i )
{
if ( i < 0 || i >= count() )
return;
- QString output = name + QString::fromLatin1( " (" ) + tag( i ) +
- QString::fromLatin1( ")" );
+ TQString output = name + TQString::fromLatin1( " (" ) + tag( i ) +
+ TQString::fromLatin1( ")" );
changeItem( output, i );
}*/
-bool KLanguageButton::containsTag( const QString &str ) const
+bool KLanguageButton::containsTag( const TQString &str ) const
{
return m_tags->contains( str ) > 0;
}
-QString KLanguageButton::currentTag() const
+TQString KLanguageButton::currentTag() const
{
return *m_tags->at( currentItem() );
}
-QString KLanguageButton::tag( int i ) const
+TQString KLanguageButton::tag( int i ) const
{
if ( i < 0 || i >= count() )
{
kdDebug() << "KLanguageButton::tag(), unknown tag " << i << endl;
- return QString::null;
+ return TQString::null;
}
return *m_tags->at( i );
}
@@ -219,14 +219,14 @@ void KLanguageButton::setCurrentItem( int i )
m_current = i;
setText( m_popup->text( m_current ) );
- QIconSet *icon = m_popup->iconSet( m_current );
+ TQIconSet *icon = m_popup->iconSet( m_current );
if( icon )
setIconSet( *icon );
else
- setIconSet( QPixmap() );
+ setIconSet( TQPixmap() );
}
-void KLanguageButton::setCurrentItem( const QString &code )
+void KLanguageButton::setCurrentItem( const TQString &code )
{
int i = m_tags->findIndex( code );
if ( code.isNull() )
diff --git a/kmouth/wordcompletion/klanguagebutton.h b/kmouth/wordcompletion/klanguagebutton.h
index ee1d58f..0ebe5c7 100644
--- a/kmouth/wordcompletion/klanguagebutton.h
+++ b/kmouth/wordcompletion/klanguagebutton.h
@@ -30,9 +30,9 @@
#include "kpushbutton.h"
/*
- * Extended QPushButton that shows a menu with submenu for language selection.
+ * Extended TQPushButton that shows a menu with submenu for language selection.
* Essentially just a combo box with a 2-D dataset, but using a real
- * QComboBox will produce ugly results.
+ * TQComboBox will produce ugly results.
*
* Combined version of KTagCombo and KLanguageCombo but using a QPushButton
* instead.
@@ -42,39 +42,39 @@ class KLanguageButton : public QPushButton
Q_OBJECT
public:
- KLanguageButton(QWidget *parent=0, const char *name=0);
+ KLanguageButton(TQWidget *parent=0, const char *name=0);
~KLanguageButton();
- void insertItem( const QIconSet& icon, const QString &text,
- const QString &tag, const QString &submenu = QString::null,
+ void insertItem( const TQIconSet& icon, const TQString &text,
+ const TQString &tag, const TQString &submenu = TQString::null,
int index = -1 );
- void insertItem( const QString &text, const QString &tag,
- const QString &submenu = QString::null, int index = -1 );
- void insertSeparator( const QString &submenu = QString::null,
+ void insertItem( const TQString &text, const TQString &tag,
+ const TQString &submenu = TQString::null, int index = -1 );
+ void insertSeparator( const TQString &submenu = TQString::null,
int index = -1 );
- void insertSubmenu( const QString &text, const QString &tag,
- const QString &submenu = QString::null, int index = -1);
+ void insertSubmenu( const TQString &text, const TQString &tag,
+ const TQString &submenu = TQString::null, int index = -1);
int count() const;
void clear();
- void insertLanguage( const QString& path, const QString& name,
- const QString& sub = QString::null,
- const QString &submenu = QString::null, int index = -1);
+ void insertLanguage( const TQString& path, const TQString& name,
+ const TQString& sub = TQString::null,
+ const TQString &submenu = TQString::null, int index = -1);
/*
* Tag of the selected item
*/
- QString currentTag() const;
- QString tag( int i ) const;
- bool containsTag( const QString &str ) const;
+ TQString currentTag() const;
+ TQString tag( int i ) const;
+ bool containsTag( const TQString &str ) const;
/*
* Set the current item
*/
int currentItem() const;
void setCurrentItem( int i );
- void setCurrentItem( const QString &code );
+ void setCurrentItem( const TQString &code );
signals:
void activated( int index );
@@ -85,8 +85,8 @@ private slots:
private:
// work space for the new class
- QStringList *m_tags;
- QPopupMenu *m_popup, *m_oldPopup;
+ TQStringList *m_tags;
+ TQPopupMenu *m_popup, *m_oldPopup;
int m_current;
};
diff --git a/kmouth/wordcompletion/klanguagebuttonhelper.cpp b/kmouth/wordcompletion/klanguagebuttonhelper.cpp
index 918553e..a68007b 100644
--- a/kmouth/wordcompletion/klanguagebuttonhelper.cpp
+++ b/kmouth/wordcompletion/klanguagebuttonhelper.cpp
@@ -29,32 +29,32 @@
#include <ksimpleconfig.h>
#include "klanguagebutton.h"
-QString languageName (QString languageCode) {
- QString filename = KGlobal::dirs()->findResource("locale",
- languageCode + QString::fromLatin1("/entry.desktop"));
+TQString languageName (TQString languageCode) {
+ TQString filename = KGlobal::dirs()->findResource("locale",
+ languageCode + TQString::fromLatin1("/entry.desktop"));
KSimpleConfig entry(filename);
- entry.setGroup(QString::fromLatin1("KCM Locale"));
- return entry.readEntry(QString::fromLatin1("Name"), i18n("without name"));
+ entry.setGroup(TQString::fromLatin1("KCM Locale"));
+ return entry.readEntry(TQString::fromLatin1("Name"), i18n("without name"));
}
void loadLanguageList(KLanguageButton *combo)
// This function was taken from kdebase/kcontrol/kdm/kdm-appear.cpp
{
- QStringList langlist = KGlobal::dirs()->findAllResources("locale",
- QString::fromLatin1("*/entry.desktop"));
+ TQStringList langlist = KGlobal::dirs()->findAllResources("locale",
+ TQString::fromLatin1("*/entry.desktop"));
langlist.sort();
- for ( QStringList::ConstIterator it = langlist.begin();
+ for ( TQStringList::ConstIterator it = langlist.begin();
it != langlist.end(); ++it )
{
- QString fpath = (*it).left((*it).length() - 14);
+ TQString fpath = (*it).left((*it).length() - 14);
int index = fpath.findRev('/');
- QString nid = fpath.mid(index + 1);
+ TQString nid = fpath.mid(index + 1);
KSimpleConfig entry(*it);
- entry.setGroup(QString::fromLatin1("KCM Locale"));
- QString name = entry.readEntry(QString::fromLatin1("Name"), i18n("without name"));
- combo->insertLanguage(nid, name, QString::fromLatin1("l10n/"), QString::null);
+ 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);
}
if (KGlobal::locale())
diff --git a/kmouth/wordcompletion/klanguagebuttonhelper.h b/kmouth/wordcompletion/klanguagebuttonhelper.h
index 9bee5f7..a33cdb9 100644
--- a/kmouth/wordcompletion/klanguagebuttonhelper.h
+++ b/kmouth/wordcompletion/klanguagebuttonhelper.h
@@ -24,5 +24,5 @@
class QString;
class KLanguageButton;
-QString languageName (QString languageCode);
+TQString languageName (TQString languageCode);
void loadLanguageList(KLanguageButton *combo);
diff --git a/kmouth/wordcompletion/wordcompletion.cpp b/kmouth/wordcompletion/wordcompletion.cpp
index d4ae651..268872a 100644
--- a/kmouth/wordcompletion/wordcompletion.cpp
+++ b/kmouth/wordcompletion/wordcompletion.cpp
@@ -1,5 +1,5 @@
-#include <qregexp.h>
-#include <qfile.h>
+#include <tqregexp.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kstandarddirs.h>
@@ -10,18 +10,18 @@
class WordCompletion::WordCompletionPrivate {
friend class WordCompletion;
private:
- typedef QMap<QString,int> WordMap;
+ typedef TQMap<TQString,int> WordMap;
struct DictionaryDetails {
- QString filename;
- QString language;
+ TQString filename;
+ TQString language;
};
- QString lastText;
- QMap<QString,int> map;
- QMap<QString,int> addedWords;
- QMap<QString,DictionaryDetails> dictDetails;
- QStringList dictionaries;
- QString current;
+ TQString lastText;
+ TQMap<TQString,int> map;
+ TQMap<TQString,int> addedWords;
+ TQMap<TQString,DictionaryDetails> dictDetails;
+ TQStringList dictionaries;
+ TQString current;
bool blockCurrentListSignal;
bool wordsToSave;
};
@@ -38,21 +38,21 @@ WordCompletion::~WordCompletion() {
delete d;
}
-typedef QPair<int,QString> Match;
-typedef QValueList<Match> MatchList;
+typedef QPair<int,TQString> Match;
+typedef TQValueList<Match> MatchList;
-QString WordCompletion::makeCompletion(const QString &text) {
+TQString WordCompletion::makeCompletion(const TQString &text) {
if (d->lastText != text) {
d->lastText = text;
KCompletion::clear();
- int border = text.findRev(QRegExp("\\W"));
- QString suffix = text.right (text.length() - border - 1).lower();
- QString prefix = text.left (border + 1);
+ int border = text.findRev(TQRegExp("\\W"));
+ TQString suffix = text.right (text.length() - border - 1).lower();
+ TQString prefix = text.left (border + 1);
if (suffix.length() > 0) {
MatchList matches;
- QMap<QString,int>::ConstIterator it;
+ TQMap<TQString,int>::ConstIterator it;
for (it = d->map.begin(); it != d->map.end(); ++it)
if (it.key().startsWith(suffix))
matches += Match (-it.data(), it.key());
@@ -70,27 +70,27 @@ QString WordCompletion::makeCompletion(const QString &text) {
return KCompletion::makeCompletion (text);
}
-QStringList WordCompletion::wordLists() {
+TQStringList WordCompletion::wordLists() {
return d->dictionaries;
}
-QStringList WordCompletion::wordLists(const QString &language) {
- QStringList result;
- for (QStringList::Iterator it = d->dictionaries.begin();
+TQStringList WordCompletion::wordLists(const TQString &language) {
+ TQStringList result;
+ for (TQStringList::Iterator it = d->dictionaries.begin();
it != d->dictionaries.end(); ++it)
if (d->dictDetails[*it].language == language)
result += *it;
return result;
}
-QString WordCompletion::languageOfWordList(const QString &wordlist) {
+TQString WordCompletion::languageOfWordList(const TQString &wordlist) {
if (d->dictDetails.contains(wordlist))
return d->dictDetails[wordlist].language;
else
- return QString::null;
+ return TQString::null;
}
-QString WordCompletion::currentWordList() {
+TQString WordCompletion::currentWordList() {
return d->current;
}
@@ -111,14 +111,14 @@ void WordCompletion::configure() {
d->dictDetails.clear();
KConfig *config = new KConfig("kmouthrc");
- QStringList groups = config->groupList();
- for (QStringList::Iterator it = groups.begin(); it != groups.end(); ++it)
+ TQStringList groups = config->groupList();
+ for (TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it)
if ((*it).startsWith ("Dictionary ")) {
config->setGroup(*it);
WordCompletionPrivate::DictionaryDetails details;
details.filename = config->readEntry("Filename");
details.language = config->readEntry("Language");
- QString name = config->readEntry("Name");
+ TQString name = config->readEntry("Name");
d->dictDetails[name] = details;
d->dictionaries += name;
}
@@ -131,7 +131,7 @@ void WordCompletion::configure() {
emit currentListChanged (d->current);
}
-bool WordCompletion::setWordList(const QString &wordlist) {
+bool WordCompletion::setWordList(const TQString &wordlist) {
if (d->wordsToSave)
save ();
d->wordsToSave = false;
@@ -143,18 +143,18 @@ bool WordCompletion::setWordList(const QString &wordlist) {
else
d->current = d->dictionaries[0];
- QString filename = d->dictDetails[d->current].filename;
- QString dictionaryFile = KApplication::kApplication()->dirs()->findResource("appdata", filename);
- QFile file(dictionaryFile);
+ TQString filename = d->dictDetails[d->current].filename;
+ TQString dictionaryFile = KApplication::kApplication()->dirs()->findResource("appdata", filename);
+ TQFile file(dictionaryFile);
if (file.exists() && file.open(IO_ReadOnly)) {
- QTextStream stream(&file);
- stream.setEncoding (QTextStream::UnicodeUTF8);
+ TQTextStream stream(&file);
+ stream.setEncoding (TQTextStream::UnicodeUTF8);
if (!stream.atEnd()) {
if (stream.readLine() == "WPDictFile") {
while (!stream.atEnd()) {
- QString s = stream.readLine();
+ TQString s = stream.readLine();
if (!(s.isNull() || s.isEmpty())) {
- QStringList list = QStringList::split("\t", s);
+ TQStringList list = TQStringList::split("\t", s);
bool ok;
int weight = list[1].toInt(&ok);
if (ok && (weight > 0))
@@ -172,13 +172,13 @@ bool WordCompletion::setWordList(const QString &wordlist) {
return result;
}
-void WordCompletion::addSentence (const QString &sentence) {
- QStringList words = QStringList::split(QRegExp("\\W"), sentence);
+void WordCompletion::addSentence (const TQString &sentence) {
+ TQStringList words = TQStringList::split(TQRegExp("\\W"), sentence);
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = words.begin(); it != words.end(); ++it) {
- if (!(*it).contains(QRegExp("\\d|_"))) {
- QString key = (*it).lower();
+ if (!(*it).contains(TQRegExp("\\d|_"))) {
+ TQString key = (*it).lower();
if (d->map.contains(key))
d->map[key] += 1;
else
@@ -194,19 +194,19 @@ void WordCompletion::addSentence (const QString &sentence) {
void WordCompletion::save () {
if (d->wordsToSave) {
- QString filename = d->dictDetails[d->current].filename;
- QString dictionaryFile = KApplication::kApplication()->dirs()->findResource("appdata", filename);
- QFile file(dictionaryFile);
+ TQString filename = d->dictDetails[d->current].filename;
+ TQString dictionaryFile = KApplication::kApplication()->dirs()->findResource("appdata", filename);
+ TQFile file(dictionaryFile);
if (!file.exists())
return;
if (!file.open(IO_WriteOnly))
return;
- QTextStream stream(&file);
- stream.setEncoding (QTextStream::UnicodeUTF8);
+ TQTextStream stream(&file);
+ stream.setEncoding (TQTextStream::UnicodeUTF8);
stream << "WPDictFile\n";
- QMap<QString,int>::ConstIterator it;
+ TQMap<TQString,int>::ConstIterator it;
for (it = d->map.begin(); it != d->map.end(); ++it) {
if (d->addedWords.contains(it.key())) {
stream << it.key() << "\t" << d->addedWords[it.key()] << "\t1\n";
diff --git a/kmouth/wordcompletion/wordcompletion.h b/kmouth/wordcompletion/wordcompletion.h
index f0cb812..2bc5ceb 100644
--- a/kmouth/wordcompletion/wordcompletion.h
+++ b/kmouth/wordcompletion/wordcompletion.h
@@ -16,35 +16,35 @@ public:
/**
* Returns the names for the available word lists
*/
- QStringList wordLists();
+ TQStringList wordLists();
/**
* Returns the names for those word lists that contain
* words of a given language.
*/
- QStringList wordLists(const QString &language);
+ TQStringList wordLists(const TQString &language);
/**
* Returns the language of a given word list.
*/
- QString languageOfWordList(const QString &wordlist);
+ TQString languageOfWordList(const TQString &wordlist);
/**
* Returns the name of the currently active word list.
*/
- QString currentWordList();
+ TQString currentWordList();
/**
* Finds completions to the given text.
*/
- virtual QString makeCompletion(const QString&);
+ virtual TQString makeCompletion(const TQString&);
static bool isConfigured();
/**
* Adds the words from the given sentence to the list of words.
*/
- void addSentence (const QString &sentence);
+ void addSentence (const TQString &sentence);
public slots:
/**
@@ -58,7 +58,7 @@ public slots:
* list gets used.
* The method returns true if the specified word list was found.
*/
- bool setWordList(const QString &wordlist);
+ bool setWordList(const TQString &wordlist);
/**
* Saves the added words to disk.
@@ -66,8 +66,8 @@ public slots:
void save ();
signals:
- void wordListsChanged (const QStringList &wordLists);
- void currentListChanged (const QString &wordList);
+ void wordListsChanged (const TQStringList &wordLists);
+ void currentListChanged (const TQString &wordList);
private:
class WordCompletionPrivate;
diff --git a/kmouth/wordcompletion/wordcompletionui.ui.h b/kmouth/wordcompletion/wordcompletionui.ui.h
index 96878da..9a428df 100644
--- a/kmouth/wordcompletion/wordcompletionui.ui.h
+++ b/kmouth/wordcompletion/wordcompletionui.ui.h
@@ -12,23 +12,23 @@ void WordCompletionUI::init() {
languageButton = new KLanguageButton (selectedDictionaryDetails, "languageButton");
selectedDictionaryDetailsLayout->addWidget (languageButton, 1, 1);
languageLabel->setBuddy (languageButton);
- QWhatsThis::add (languageButton, i18n("With this combo box you select the language associated with the selected dictionary."));
+ TQWhatsThis::add (languageButton, i18n("With this combo box you select the language associated with the selected dictionary."));
loadLanguageList(languageButton);
- languageButton->insertLanguage("??", i18n("Other"), QString::fromLatin1("l10n/"), QString::null);
+ languageButton->insertLanguage("??", i18n("Other"), TQString::fromLatin1("l10n/"), TQString::null);
- connect (languageButton, SIGNAL(activated(int)), this, SLOT(languageButton_activated(int)));
+ connect (languageButton, TQT_SIGNAL(activated(int)), this, TQT_SLOT(languageButton_activated(int)));
}
void WordCompletionUI::languageButton_activated (int) {
if (languageButton->currentTag() == "??") {
- QString customLanguage = KInputDialog::getText(i18n("Create Custom Language"), i18n("Please enter the code for the custom language:"));
+ TQString customLanguage = KInputDialog::getText(i18n("Create Custom Language"), i18n("Please enter the code for the custom language:"));
if (languageButton->containsTag(customLanguage)) {
languageButton->setCurrentItem(customLanguage);
}
else {
- languageButton->insertLanguage(customLanguage, i18n("without name"), QString::fromLatin1("l10n/"), QString::null);
+ languageButton->insertLanguage(customLanguage, i18n("without name"), TQString::fromLatin1("l10n/"), TQString::null);
languageButton->setCurrentItem(customLanguage);
}
}
diff --git a/kmouth/wordcompletion/wordcompletionwidget.cpp b/kmouth/wordcompletion/wordcompletionwidget.cpp
index e5eab23..b25df12 100644
--- a/kmouth/wordcompletion/wordcompletionwidget.cpp
+++ b/kmouth/wordcompletion/wordcompletionwidget.cpp
@@ -15,10 +15,10 @@
* *
***************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
#include <klistview.h>
#include <klineedit.h>
@@ -39,17 +39,17 @@
class DictionaryListItem : public KListViewItem {
public:
- DictionaryListItem (QListView *parent, QString filename, QString name, QString language, QString languageCode)
+ DictionaryListItem (TQListView *parent, TQString filename, TQString name, TQString language, TQString languageCode)
: KListViewItem (parent, name) {
setFilename (filename);
setLanguage (language, languageCode);
};
- DictionaryListItem (QListView *parent, QString filename, QString name, QString languageCode)
+ DictionaryListItem (TQListView *parent, TQString filename, TQString name, TQString languageCode)
: KListViewItem (parent, name) {
setFilename (filename);
setLanguage (languageCode);
};
- DictionaryListItem (QListView *parent, QListViewItem *after, QString filename, QString name, QString languageCode)
+ DictionaryListItem (TQListView *parent, TQListViewItem *after, TQString filename, TQString name, TQString languageCode)
: KListViewItem (parent, after, name) {
setFilename (filename);
setLanguage (languageCode);
@@ -57,53 +57,53 @@ public:
~DictionaryListItem () {
};
- QString filename() {
+ TQString filename() {
return myFilename;
}
- QString languageCode() {
+ TQString languageCode() {
return myLanguageCode;
}
- void setFilename(QString filename) {
+ void setFilename(TQString filename) {
myFilename = filename;
}
- void setLanguage (QString languageCode) {
- QString filename = KGlobal::dirs()->findResource("locale",
- languageCode + QString::fromLatin1("/entry.desktop"));
+ void setLanguage (TQString languageCode) {
+ TQString filename = KGlobal::dirs()->findResource("locale",
+ languageCode + TQString::fromLatin1("/entry.desktop"));
KSimpleConfig entry(filename);
- entry.setGroup(QString::fromLatin1("KCM Locale"));
- QString name = entry.readEntry(QString::fromLatin1("Name"), i18n("without name"));
+ entry.setGroup(TQString::fromLatin1("KCM Locale"));
+ TQString name = entry.readEntry(TQString::fromLatin1("Name"), i18n("without name"));
setLanguage (name + " (" + languageCode + ")", languageCode);
}
- void setLanguage (QString name, QString languageCode) {
+ void setLanguage (TQString name, TQString languageCode) {
myLanguageCode = languageCode;
setText (1, name);
}
private:
- QString myFilename;
- QString myLanguageCode;
+ TQString myFilename;
+ TQString myLanguageCode;
};
/***************************************************************************/
-WordCompletionWidget::WordCompletionWidget(QWidget *parent, const char *name) : WordCompletionUI (parent, name) {
+WordCompletionWidget::WordCompletionWidget(TQWidget *parent, const char *name) : WordCompletionUI (parent, name) {
dictionaryList->setSorting (-1); // no sorted list
// Connect the signals from hte KCMKTTSDWidget to this class
- connect (addButton, SIGNAL (clicked()), this, SLOT(addDictionary()) );
- connect (deleteButton, SIGNAL (clicked()), this, SLOT (deleteDictionary()) );
- connect (moveUpButton, SIGNAL (clicked()), this, SLOT (moveUp()) );
- connect (moveDownButton, SIGNAL (clicked()), this, SLOT (moveDown()) );
- connect (exportButton, SIGNAL (clicked()), this, SLOT (exportDictionary()) );
+ connect (addButton, TQT_SIGNAL (clicked()), this, TQT_SLOT(addDictionary()) );
+ connect (deleteButton, TQT_SIGNAL (clicked()), this, TQT_SLOT (deleteDictionary()) );
+ connect (moveUpButton, TQT_SIGNAL (clicked()), this, TQT_SLOT (moveUp()) );
+ connect (moveDownButton, TQT_SIGNAL (clicked()), this, TQT_SLOT (moveDown()) );
+ connect (exportButton, TQT_SIGNAL (clicked()), this, TQT_SLOT (exportDictionary()) );
- connect (dictionaryList, SIGNAL (selectionChanged()), this, SLOT (selectionChanged()) );
- connect (dictionaryName, SIGNAL (textChanged (const QString &)), this, SLOT (nameChanged (const QString &)) );
- connect (languageButton, SIGNAL (activated (int)), this, SLOT (languageSelected(int)) );
+ connect (dictionaryList, TQT_SIGNAL (selectionChanged()), this, TQT_SLOT (selectionChanged()) );
+ connect (dictionaryName, TQT_SIGNAL (textChanged (const TQString &)), this, TQT_SLOT (nameChanged (const TQString &)) );
+ connect (languageButton, TQT_SIGNAL (activated (int)), this, TQT_SLOT (languageSelected(int)) );
// Object for the KCMKTTSD configuration
config = new KConfig("kmouthrc");
@@ -125,41 +125,41 @@ void WordCompletionWidget::load() {
dictionaryList->clear();
// Set the group general for the configuration of kttsd itself (no plug ins)
- QStringList groups = config->groupList();
+ TQStringList groups = config->groupList();
DictionaryListItem *last = 0;
- for (QStringList::Iterator it = groups.begin(); it != groups.end(); ++it)
+ for (TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it)
if ((*it).startsWith ("Dictionary ")) {
config->setGroup(*it);
- QString languageTag = config->readEntry("Language");
+ TQString languageTag = config->readEntry("Language");
last = new DictionaryListItem (dictionaryList, last,
config->readEntry("Filename"),
config->readEntry("Name"),
languageTag);
if (!languageButton->containsTag(languageTag))
- languageButton->insertLanguage(languageTag, i18n("without name"), QString::fromLatin1("l10n/"), QString::null);
+ languageButton->insertLanguage(languageTag, i18n("without name"), TQString::fromLatin1("l10n/"), TQString::null);
}
// Clean up disc space
- for (QStringList::Iterator it = newDictionaryFiles.begin(); it != newDictionaryFiles.end(); ++it) {
- QString filename = KGlobal::dirs()->findResource ("appdata", *it);
+ for (TQStringList::Iterator it = newDictionaryFiles.begin(); it != newDictionaryFiles.end(); ++it) {
+ TQString filename = KGlobal::dirs()->findResource ("appdata", *it);
if (!filename.isEmpty() && !filename.isNull())
- QFile::remove (filename);
+ TQFile::remove (filename);
}
newDictionaryFiles.clear();
}
void WordCompletionWidget::save() {
- QStringList groups = config->groupList();
- for (QStringList::Iterator it = groups.begin(); it != groups.end(); ++it)
+ TQStringList groups = config->groupList();
+ for (TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it)
if ((*it).startsWith ("Dictionary "))
config->deleteGroup (*it);
int number = 0;
- QListViewItemIterator it(dictionaryList);
+ TQListViewItemIterator it(dictionaryList);
while (it.current()) {
DictionaryListItem *item = dynamic_cast<DictionaryListItem*>(it.current());
if (item != 0) {
- config->setGroup(QString("Dictionary %1").arg(number));
+ config->setGroup(TQString("Dictionary %1").arg(number));
config->writeEntry ("Filename", item->filename());
config->writeEntry ("Name", item->text (0));
config->writeEntry ("Language", item->languageCode());
@@ -170,10 +170,10 @@ void WordCompletionWidget::save() {
config->sync();
// Clean up disc space
- for (QStringList::Iterator it = removedDictionaryFiles.begin(); it != removedDictionaryFiles.end(); ++it) {
- QString filename = KGlobal::dirs()->findResource ("appdata", *it);
+ for (TQStringList::Iterator it = removedDictionaryFiles.begin(); it != removedDictionaryFiles.end(); ++it) {
+ TQString filename = KGlobal::dirs()->findResource ("appdata", *it);
if (!filename.isEmpty() && !filename.isNull())
- QFile::remove (filename);
+ TQFile::remove (filename);
}
removedDictionaryFiles.clear();
}
@@ -181,10 +181,10 @@ void WordCompletionWidget::save() {
/***************************************************************************/
void WordCompletionWidget::addDictionary() {
- QStringList dictionaryNames;
- QStringList dictionaryFiles;
- QStringList dictionaryLanguages;
- QListViewItemIterator it(dictionaryList);
+ TQStringList dictionaryNames;
+ TQStringList dictionaryFiles;
+ TQStringList dictionaryLanguages;
+ TQListViewItemIterator it(dictionaryList);
while (it.current()) {
DictionaryListItem *item = dynamic_cast<DictionaryListItem*>(it.current());
if (item != 0) {
@@ -195,12 +195,12 @@ void WordCompletionWidget::addDictionary() {
++it;
}
DictionaryCreationWizard *wizard = new DictionaryCreationWizard (this, "Dictionary creation wizard", dictionaryNames, dictionaryFiles, dictionaryLanguages);
- if (wizard->exec() == QDialog::Accepted) {
- QString filename = wizard->createDictionary();
+ if (wizard->exec() == TQDialog::Accepted) {
+ TQString filename = wizard->createDictionary();
newDictionaryFiles += filename;
- QString languageTag = wizard->language();
+ TQString languageTag = wizard->language();
if (!languageButton->containsTag(languageTag)) {
- languageButton->insertLanguage(languageTag, i18n("without name"), QString::fromLatin1("l10n/"), QString::null);
+ languageButton->insertLanguage(languageTag, i18n("without name"), TQString::fromLatin1("l10n/"), TQString::null);
}
KListViewItem *item = new DictionaryListItem (dictionaryList,
filename, wizard->name(), languageTag);
@@ -219,10 +219,10 @@ void WordCompletionWidget::deleteDictionary() {
}
void WordCompletionWidget::moveUp() {
- QListViewItem *item = dictionaryList->selectedItem ();
+ TQListViewItem *item = dictionaryList->selectedItem ();
if (item != 0) {
- QListViewItem *above = item->itemAbove();
+ TQListViewItem *above = item->itemAbove();
if (above != 0) {
above->moveItem (item);
@@ -231,10 +231,10 @@ void WordCompletionWidget::moveUp() {
}
void WordCompletionWidget::moveDown() {
- QListViewItem *item = dictionaryList->selectedItem ();
+ TQListViewItem *item = dictionaryList->selectedItem ();
if (item != 0) {
- QListViewItem *next = item->itemBelow();
+ TQListViewItem *next = item->itemBelow();
if (next != 0) {
item->moveItem (next);
@@ -246,12 +246,12 @@ void WordCompletionWidget::exportDictionary() {
DictionaryListItem *item = dynamic_cast<DictionaryListItem*>(dictionaryList->selectedItem ());
if (item != 0) {
- KURL url = KFileDialog::getSaveURL(QString::null, QString::null, this, i18n("Export Dictionary"));
+ KURL url = KFileDialog::getSaveURL(TQString::null, TQString::null, this, i18n("Export Dictionary"));
if (url.isEmpty() || !url.isValid())
return;
if (KIO::NetAccess::exists(url, false, this)) {
- if (KMessageBox::warningContinueCancel(0,QString("<qt>%1</qt>").arg(i18n("The file %1 already exists. "
+ if (KMessageBox::warningContinueCancel(0,TQString("<qt>%1</qt>").arg(i18n("The file %1 already exists. "
"Do you want to overwrite it?").arg(url.url())),i18n("File Exists"),i18n("&Overwrite"))==KMessageBox::Cancel) {
return;
}
@@ -295,11 +295,11 @@ void WordCompletionWidget::selectionChanged() {
}
}
-void WordCompletionWidget::nameChanged (const QString &text) {
- QListViewItem *item = dictionaryList->selectedItem ();
+void WordCompletionWidget::nameChanged (const TQString &text) {
+ TQListViewItem *item = dictionaryList->selectedItem ();
if (item != 0) {
- QString old = item->text(0);
+ TQString old = item->text(0);
if (old != text) {
item->setText(0, text);
@@ -312,8 +312,8 @@ void WordCompletionWidget::languageSelected (int) {
DictionaryListItem *item = dynamic_cast<DictionaryListItem*>(dictionaryList->selectedItem ());
if (item != 0) {
- QString old = item->text(1);
- QString text = languageButton->currentTag();
+ TQString old = item->text(1);
+ TQString text = languageButton->currentTag();
if (old != text) {
item->setLanguage(languageButton->text(), text);
diff --git a/kmouth/wordcompletion/wordcompletionwidget.h b/kmouth/wordcompletion/wordcompletionwidget.h
index 574a4e9..fddf074 100644
--- a/kmouth/wordcompletion/wordcompletionwidget.h
+++ b/kmouth/wordcompletion/wordcompletionwidget.h
@@ -31,7 +31,7 @@ class KLanguageButton;
class WordCompletionWidget : public WordCompletionUI {
Q_OBJECT
public:
- WordCompletionWidget(QWidget *parent, const char *name);
+ WordCompletionWidget(TQWidget *parent, const char *name);
~WordCompletionWidget();
/**
@@ -57,7 +57,7 @@ private slots:
void exportDictionary();
void selectionChanged();
- void nameChanged (const QString &text);
+ void nameChanged (const TQString &text);
void languageSelected (int);
/**
@@ -73,8 +73,8 @@ private:
* Object holding all the configuration
*/
KConfig *config;
- QStringList newDictionaryFiles;
- QStringList removedDictionaryFiles;
+ TQStringList newDictionaryFiles;
+ TQStringList removedDictionaryFiles;
};
#endif
diff --git a/kmouth/wordcompletion/wordlist.cpp b/kmouth/wordcompletion/wordlist.cpp
index 67f05d8..f10feaf 100644
--- a/kmouth/wordcompletion/wordlist.cpp
+++ b/kmouth/wordcompletion/wordlist.cpp
@@ -17,8 +17,8 @@
// $Id$
-#include <qregexp.h>
-#include <qdir.h>
+#include <tqregexp.h>
+#include <tqdir.h>
#include <kapplication.h>
#include <kstandarddirs.h>
@@ -28,7 +28,7 @@
#include "wordlist.h"
namespace WordList {
-void addWords (WordMap &map, QString line);
+void addWords (WordMap &map, TQString line);
XMLParser::XMLParser() {
}
@@ -36,57 +36,57 @@ XMLParser::XMLParser() {
XMLParser::~XMLParser() {
}
-bool XMLParser::warning (const QXmlParseException &) {
+bool XMLParser::warning (const TQXmlParseException &) {
return false;
}
-bool XMLParser::error (const QXmlParseException &) {
+bool XMLParser::error (const TQXmlParseException &) {
return false;
}
-bool XMLParser::fatalError (const QXmlParseException &) {
+bool XMLParser::fatalError (const TQXmlParseException &) {
return false;
}
-QString XMLParser::errorString() {
+TQString XMLParser::errorString() {
return "";
}
bool XMLParser::startDocument() {
- text = QString::null;
+ text = TQString::null;
return true;
}
-bool XMLParser::startElement (const QString &, const QString &,
- const QString &,
- const QXmlAttributes &)
+bool XMLParser::startElement (const TQString &, const TQString &,
+ const TQString &,
+ const TQXmlAttributes &)
{
if (!text.isNull() && !text.isEmpty()) {
addWords (list, text);
- text = QString::null;
+ text = TQString::null;
}
return true;
}
-bool XMLParser::characters (const QString &ch) {
+bool XMLParser::characters (const TQString &ch) {
text += ch;
return true;
}
-bool XMLParser::ignorableWhitespace (const QString &) {
+bool XMLParser::ignorableWhitespace (const TQString &) {
if (!text.isNull() && !text.isEmpty()) {
addWords (list, text);
- text = QString::null;
+ text = TQString::null;
}
return true;
}
-bool XMLParser::endElement (const QString &, const QString &,
- const QString &)
+bool XMLParser::endElement (const TQString &, const TQString &,
+ const TQString &)
{
if (!text.isNull() && !text.isEmpty()) {
addWords (list, text);
- text = QString::null;
+ text = TQString::null;
}
return true;
}
@@ -94,7 +94,7 @@ bool XMLParser::endElement (const QString &, const QString &,
bool XMLParser::endDocument() {
if (!text.isNull() && !text.isEmpty()) {
addWords (list, text);
- text = QString::null;
+ text = TQString::null;
}
return true;
}
@@ -116,13 +116,13 @@ KProgressDialog *progressDialog() {
return pdlg;
}
-bool saveWordList (WordMap map, QString filename) {
- QFile file(filename);
+bool saveWordList (WordMap map, TQString filename) {
+ TQFile file(filename);
if(!file.open(IO_WriteOnly))
return false;
- QTextStream stream(&file);
- stream.setEncoding (QTextStream::UnicodeUTF8);
+ TQTextStream stream(&file);
+ stream.setEncoding (TQTextStream::UnicodeUTF8);
stream << "WPDictFile\n";
WordMap::ConstIterator it;
@@ -134,13 +134,13 @@ bool saveWordList (WordMap map, QString filename) {
/***************************************************************************/
-void addWords (WordMap &map, QString line) {
- QStringList words = QStringList::split(QRegExp("\\W"), line);
+void addWords (WordMap &map, TQString line) {
+ TQStringList words = TQStringList::split(TQRegExp("\\W"), line);
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = words.begin(); it != words.end(); ++it) {
- if (!(*it).contains(QRegExp("\\d|_"))) {
- QString key = (*it).lower();
+ if (!(*it).contains(TQRegExp("\\d|_"))) {
+ TQString key = (*it).lower();
if (map.contains(key))
map[key] += 1;
else
@@ -158,11 +158,11 @@ void addWords (WordMap &map, WordMap add) {
map[it.key()] = it.data();
}
-void addWordsFromFile (WordMap &map, QString filename, QTextStream::Encoding encoding, QTextCodec *codec) {
- QFile xmlfile(filename);
- QXmlInputSource source (&xmlfile);
+void addWordsFromFile (WordMap &map, TQString filename, TQTextStream::Encoding encoding, TQTextCodec *codec) {
+ TQFile xmlfile(filename);
+ TQXmlInputSource source (&xmlfile);
XMLParser parser;
- QXmlSimpleReader reader;
+ TQXmlSimpleReader reader;
reader.setFeature ("http://trolltech.com/xml/features/report-start-end-entity", true);
reader.setContentHandler (&parser);
@@ -170,19 +170,19 @@ void addWordsFromFile (WordMap &map, QString filename, QTextStream::Encoding enc
if (reader.parse(source)) // try to load the file as an xml-file
addWords(map, parser.getList());
else {
- QFile wpdfile(filename);
+ TQFile wpdfile(filename);
if (wpdfile.open(IO_ReadOnly)) {
- QTextStream stream(&wpdfile);
- stream.setEncoding (QTextStream::UnicodeUTF8);
+ TQTextStream stream(&wpdfile);
+ stream.setEncoding (TQTextStream::UnicodeUTF8);
if (!stream.atEnd()) {
- QString s = stream.readLine();
+ TQString s = stream.readLine();
if (s == "WPDictFile") { // Contains the file a weighted word list?
// We can assume that weighted word lists are always UTF8 coded.
while (!stream.atEnd()) {
- QString s = stream.readLine();
+ TQString s = stream.readLine();
if (!(s.isNull() || s.isEmpty())) {
- QStringList list = QStringList::split("\t", s);
+ TQStringList list = TQStringList::split("\t", s);
bool ok;
int weight = list[1].toInt(&ok);
if (ok && (weight > 0)) {
@@ -195,9 +195,9 @@ void addWordsFromFile (WordMap &map, QString filename, QTextStream::Encoding enc
}
}
else { // Count the words in an ordinary text file
- QFile file(filename);
+ TQFile file(filename);
if (file.open(IO_ReadOnly)) {
- QTextStream stream(&file);
+ TQTextStream stream(&file);
if (codec != 0)
stream.setCodec (codec);
else
@@ -215,13 +215,13 @@ void addWordsFromFile (WordMap &map, QString filename, QTextStream::Encoding enc
#include <kdebug.h>
namespace WordList {
-WordMap parseFiles (QStringList files, QTextStream::Encoding encoding, QTextCodec *codec, KProgressDialog *pdlg) {
+WordMap parseFiles (TQStringList files, TQTextStream::Encoding encoding, TQTextCodec *codec, KProgressDialog *pdlg) {
int progress = 0;
int steps = files.count();
int percent = 0;
WordMap map;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (progress = 1, it = files.begin(); it != files.end(); ++progress, ++it) {
addWordsFromFile (map, *it, encoding, codec);
@@ -234,7 +234,7 @@ WordMap parseFiles (QStringList files, QTextStream::Encoding encoding, QTextCode
return map;
}
-WordMap mergeFiles (QMap<QString,int> files, KProgressDialog *pdlg) {
+WordMap mergeFiles (TQMap<TQString,int> files, KProgressDialog *pdlg) {
pdlg->setLabel (i18n("Merging dictionaries..."));
pdlg->show();
qApp->processEvents (20);
@@ -245,11 +245,11 @@ WordMap mergeFiles (QMap<QString,int> files, KProgressDialog *pdlg) {
float totalWeight = 0;
long long maxWeight = 0;
- QMap<QString,float> map;
- QMap<QString,int>::ConstIterator it;
+ TQMap<TQString,float> map;
+ TQMap<TQString,int>::ConstIterator it;
for (progress = 1, it = files.begin(); it != files.end(); ++progress, ++it) {
WordMap fileMap;
- addWordsFromFile (fileMap, it.key(), QTextStream::UnicodeUTF8, 0);
+ addWordsFromFile (fileMap, it.key(), TQTextStream::UnicodeUTF8, 0);
long long weight = 0;
WordMap::ConstIterator iter;
@@ -280,52 +280,52 @@ WordMap mergeFiles (QMap<QString,int> files, KProgressDialog *pdlg) {
factor = 1.0 * maxWeight;
WordMap resultMap;
- QMap<QString,float>::ConstIterator iter;
+ TQMap<TQString,float>::ConstIterator iter;
for (iter = map.begin(); iter != map.end(); ++iter)
resultMap[iter.key()] = (int)(factor * iter.data() + 0.5);
return resultMap;
}
-WordMap parseKDEDoc (QString language, KProgressDialog *pdlg) {
+WordMap parseKDEDoc (TQString language, KProgressDialog *pdlg) {
pdlg->setLabel (i18n("Parsing the KDE documentation..."));
pdlg->show();
qApp->processEvents (20);
- QStringList files = KApplication::kApplication()->dirs()->findAllResources ("html", language + "/*.docbook", true, true);
+ TQStringList files = KApplication::kApplication()->dirs()->findAllResources ("html", language + "/*.docbook", true, true);
if ((files.count() == 0) && (language.length() == 5)) {
language = language.left(2);
files = KApplication::kApplication()->dirs()->findAllResources ("html", language + "/*.docbook", true, true);
}
- return parseFiles (files, QTextStream::UnicodeUTF8, 0, pdlg);
+ return parseFiles (files, TQTextStream::UnicodeUTF8, 0, pdlg);
}
-WordMap parseFile (QString filename, QTextStream::Encoding encoding, QTextCodec *codec, KProgressDialog *pdlg) {
+WordMap parseFile (TQString filename, TQTextStream::Encoding encoding, TQTextCodec *codec, KProgressDialog *pdlg) {
pdlg->setLabel (i18n("Parsing file..."));
pdlg->show();
qApp->processEvents (20);
- QStringList files = filename;
+ TQStringList files = filename;
return parseFiles (files, encoding, codec, pdlg);
}
-WordMap parseDir (QString directory, QTextStream::Encoding encoding, QTextCodec *codec, KProgressDialog *pdlg) {
+WordMap parseDir (TQString directory, TQTextStream::Encoding encoding, TQTextCodec *codec, KProgressDialog *pdlg) {
pdlg->setLabel (i18n("Parsing directory..."));
pdlg->show();
qApp->processEvents (20);
- QStringList directories;
+ TQStringList directories;
directories += directory;
- QStringList files;
- for (QStringList::Iterator it = directories.begin(); it != directories.end(); it = directories.remove(it)) {
- QDir dir(*it);
- const QFileInfoList *entries = dir.entryInfoList ("*", QDir::Dirs | QDir::Files | QDir::NoSymLinks | QDir::Readable);
+ 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);
if (entries != 0) {
QFileInfoListIterator iter (*entries);
while ((iter.current()) != 0) {
- QString name = iter.current()->fileName();
+ TQString name = iter.current()->fileName();
if (name != "." && name != "..") {
if (iter.current()->isDir())
directories += iter.current()->filePath ();
@@ -347,23 +347,23 @@ WordMap parseDir (QString directory, QTextStream::Encoding encoding, QTextCodec
struct AffEntry {
bool cross;
int charsToRemove;
- QString add;
- QStringList condition;
+ TQString add;
+ TQStringList condition;
};
-typedef QValueList<AffEntry> AffList;
-typedef QMap<QChar,AffList> AffMap;
+typedef TQValueList<AffEntry> AffList;
+typedef TQMap<TQChar,AffList> AffMap;
/** Loads an *.aff file (part of OpenOffice.org dictionaries)
*/
-void loadAffFile(const QString &filename, AffMap &prefixes, AffMap &suffixes) {
+void loadAffFile(const TQString &filename, AffMap &prefixes, AffMap &suffixes) {
bool cross = false;
- QFile afile(filename);
+ TQFile afile(filename);
if (afile.open(IO_ReadOnly)) {
- QTextStream stream(&afile);
+ TQTextStream stream(&afile);
while (!stream.atEnd()) {
- QString s = stream.readLine();
- QStringList fields = QStringList::split(QRegExp("\\s"), s);
+ TQString s = stream.readLine();
+ TQStringList fields = TQStringList::split(TQRegExp("\\s"), s);
if (fields.count() == 4) {
cross = (fields[2] == "Y");
@@ -379,16 +379,16 @@ void loadAffFile(const QString &filename, AffMap &prefixes, AffMap &suffixes) {
e.add = fields[3];
if (fields[4] != ".") {
- QString condition = fields[4];
+ TQString condition = fields[4];
for (uint idx = 0; idx < condition.length(); ++idx) {
if (condition[idx] == '[') {
- QString code;
+ TQString code;
for (++idx; (idx < condition.length()) && condition[idx] != ']'; ++idx)
code += condition[idx];
e.condition << code;
}
else
- e.condition << QString(condition[idx]);
+ e.condition << TQString(condition[idx]);
}
}
@@ -413,20 +413,20 @@ void loadAffFile(const QString &filename, AffMap &prefixes, AffMap &suffixes) {
}
/** Checks if the given word matches the given condition. Each entry of the
- * QStringList "condition" describes one character of the word. (If the word
+ * TQStringList "condition" describes one character of the word. (If the word
* has more characters than condition entries only the last characters are
* compared).
* Each entry contains either all valid characters (if it does _not_ start
* with "^") or all invalid characters (if it starts with "^").
*/
-inline bool checkCondition (const QString &word, const QStringList &condition) {
+inline bool checkCondition (const TQString &word, const TQStringList &condition) {
if (condition.count() == 0)
return true;
if (word.length() < condition.count())
return false;
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
int idx;
for (it = condition.begin(), idx = word.length()-condition.count();
it != condition.end();
@@ -443,7 +443,7 @@ inline bool checkCondition (const QString &word, const QStringList &condition) {
* @param modifiers discribes which suffixes are valid
* @param cross true if the word has a prefix
*/
-inline void checkWord(const QString &word, const QString &modifiers, bool cross, const WordMap &map, WordMap &checkedMap, const AffMap &suffixes) {
+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])) {
AffList sList = suffixes[modifiers[i]];
@@ -453,7 +453,7 @@ inline void checkWord(const QString &word, const QString &modifiers, bool cross,
if (((*sIt).cross || !cross)
&& (checkCondition(word, (*sIt).condition)))
{
- QString sWord = word.left(word.length()-(*sIt).charsToRemove) + (*sIt).add;
+ TQString sWord = word.left(word.length()-(*sIt).charsToRemove) + (*sIt).add;
if (map.contains(sWord))
checkedMap[sWord] = map[sWord];
}
@@ -466,7 +466,7 @@ inline void checkWord(const QString &word, const QString &modifiers, bool cross,
* copies the resulting words from map to checkedMap.
* @param modifiers discribes which pre- and suffixes are valid
*/
-void checkWord (const QString &word, const QString &modifiers, const WordMap &map, WordMap &checkedMap, const AffMap &prefixes, const AffMap &suffixes) {
+void checkWord (const TQString &word, const TQString &modifiers, const WordMap &map, WordMap &checkedMap, const AffMap &prefixes, const AffMap &suffixes) {
if (map.contains(word))
checkedMap[word] = map[word];
@@ -478,7 +478,7 @@ void checkWord (const QString &word, const QString &modifiers, const WordMap &ma
AffList::ConstIterator pIt;
for (pIt = pList.begin(); pIt != pList.end(); ++pIt) {
- QString pWord = (*pIt).add + word;
+ TQString pWord = (*pIt).add + word;
if (map.contains(pWord))
checkedMap[pWord] = map[pWord];
@@ -488,7 +488,7 @@ void checkWord (const QString &word, const QString &modifiers, const WordMap &ma
}
}
-WordMap spellCheck (WordMap map, QString dictionary, KProgressDialog *pdlg) {
+WordMap spellCheck (WordMap map, TQString dictionary, KProgressDialog *pdlg) {
if (dictionary.endsWith(".dic")) {
AffMap prefixes;
@@ -509,20 +509,20 @@ WordMap spellCheck (WordMap map, QString dictionary, KProgressDialog *pdlg) {
int steps = 0;
int percent = 0;
- QFile dfile(dictionary);
+ TQFile dfile(dictionary);
if (dfile.open(IO_ReadOnly)) {
- QTextStream stream(&dfile);
+ TQTextStream stream(&dfile);
if (!stream.atEnd()) {
- QString s = stream.readLine(); // Number of words
+ TQString s = stream.readLine(); // Number of words
steps = s.toInt();
}
while (!stream.atEnd()) {
- QString s = stream.readLine();
+ TQString s = stream.readLine();
if (s.contains("/")) {
- QString word = s.left(s.find("/")).lower();
- QString modifiers = s.right(s.length() - s.find("/"));
+ TQString word = s.left(s.find("/")).lower();
+ TQString modifiers = s.right(s.length() - s.find("/"));
checkWord(word, modifiers, map, checkedMap, prefixes, suffixes);
}
diff --git a/kmouth/wordcompletion/wordlist.h b/kmouth/wordcompletion/wordlist.h
index d2f85ac..1e8da1a 100644
--- a/kmouth/wordcompletion/wordlist.h
+++ b/kmouth/wordcompletion/wordlist.h
@@ -20,29 +20,29 @@
#ifndef WORDLIST_H
#define WORDLIST_H
-#include <qxml.h>
-#include <qvaluestack.h>
-#include <qstring.h>
-#include <qobject.h>
-#include <qmap.h>
+#include <tqxml.h>
+#include <tqvaluestack.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqmap.h>
class QTextCodec;
class KProgressDialog;
namespace WordList {
-typedef QMap<QString,int> WordMap;
+typedef TQMap<TQString,int> WordMap;
KProgressDialog *progressDialog();
-WordMap parseKDEDoc (QString language, KProgressDialog *pdlg);
-WordMap parseFile (QString filename, QTextStream::Encoding encoding, QTextCodec *codec, KProgressDialog *pdlg);
-WordMap parseDir (QString directory, QTextStream::Encoding encoding, QTextCodec *codec, KProgressDialog *pdlg);
-WordMap mergeFiles (QMap<QString,int> files, KProgressDialog *pdlg);
+WordMap parseKDEDoc (TQString language, KProgressDialog *pdlg);
+WordMap parseFile (TQString filename, TQTextStream::Encoding encoding, TQTextCodec *codec, KProgressDialog *pdlg);
+WordMap parseDir (TQString directory, TQTextStream::Encoding encoding, TQTextCodec *codec, KProgressDialog *pdlg);
+WordMap mergeFiles (TQMap<TQString,int> files, KProgressDialog *pdlg);
-WordMap spellCheck (WordMap wordlist, QString dictionary, KProgressDialog *pdlg);
+WordMap spellCheck (WordMap wordlist, TQString dictionary, KProgressDialog *pdlg);
-bool saveWordList (WordMap map, QString filename);
+bool saveWordList (WordMap map, TQString filename);
/**
* This class implements a parser for reading docbooks and generating word
@@ -50,31 +50,31 @@ bool saveWordList (WordMap map, QString filename);
* @author Gunnar Schmi Dt
*/
-class XMLParser : public QXmlDefaultHandler {
+class XMLParser : public TQXmlDefaultHandler {
public:
XMLParser();
~XMLParser();
- bool warning (const QXmlParseException &exception);
- bool error (const QXmlParseException &exception);
- bool fatalError (const QXmlParseException &exception);
- QString errorString();
+ bool warning (const TQXmlParseException &exception);
+ bool error (const TQXmlParseException &exception);
+ bool fatalError (const TQXmlParseException &exception);
+ TQString errorString();
/** Processes the start of the document. */
bool startDocument();
/** Processes the start tag of an element. */
- bool startElement (const QString &, const QString &, const QString &name,
- const QXmlAttributes &attributes);
+ bool startElement (const TQString &, const TQString &, const TQString &name,
+ const TQXmlAttributes &attributes);
/** Processes a chunk of normal character data. */
- bool characters (const QString &ch);
+ bool characters (const TQString &ch);
/** Processes whitespace. */
- bool ignorableWhitespace (const QString &ch);
+ bool ignorableWhitespace (const TQString &ch);
/** Processes the end tag of an element. */
- bool endElement (const QString &, const QString &, const QString &name);
+ bool endElement (const TQString &, const TQString &, const TQString &name);
/** Processes the end of the document. */
bool endDocument();
@@ -84,7 +84,7 @@ public:
private:
WordMap list;
- QString text;
+ TQString text;
};
}
diff --git a/ksayit/Freeverb_plugin/freeverbsetupimpl.cpp b/ksayit/Freeverb_plugin/freeverbsetupimpl.cpp
index cf16c0d..4fd00be 100644
--- a/ksayit/Freeverb_plugin/freeverbsetupimpl.cpp
+++ b/ksayit/Freeverb_plugin/freeverbsetupimpl.cpp
@@ -19,8 +19,8 @@
using namespace std;
// QT includes
-#include <qslider.h>
-#include <qlcdnumber.h>
+#include <tqslider.h>
+#include <tqlcdnumber.h>
// KDE includes
#include <kdebug.h>
@@ -28,7 +28,7 @@ using namespace std;
// App specific includes
#include "freeverbsetupimpl.h"
-FreeverbSetupImpl::FreeverbSetupImpl(QWidget *parent, const char *name, bool modal, KConfig *config )
+FreeverbSetupImpl::FreeverbSetupImpl(TQWidget *parent, const char *name, bool modal, KConfig *config )
: Freeverb_Setup(parent,name,modal), m_config(config) {
// initialize Widgets
diff --git a/ksayit/Freeverb_plugin/freeverbsetupimpl.h b/ksayit/Freeverb_plugin/freeverbsetupimpl.h
index 8bee5bb..b243faf 100644
--- a/ksayit/Freeverb_plugin/freeverbsetupimpl.h
+++ b/ksayit/Freeverb_plugin/freeverbsetupimpl.h
@@ -19,7 +19,7 @@
#define FREEVERBSETUPIMPL_H
// QT includes
-#include <qwidget.h>
+#include <tqwidget.h>
// KDE includes
#include <kconfig.h>
@@ -34,7 +34,7 @@
class FreeverbSetupImpl : public Freeverb_Setup {
Q_OBJECT
public:
- FreeverbSetupImpl(QWidget *parent=0, const char *name=0, bool modal=true, KConfig *config=0);
+ FreeverbSetupImpl(TQWidget *parent=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 1edf874..bb91885 100644
--- a/ksayit/Freeverb_plugin/ksayitfreeverblib.cpp
+++ b/ksayit/Freeverb_plugin/ksayitfreeverblib.cpp
@@ -11,8 +11,8 @@
//
// QT includes
-// #include <qtextcodec.h>
-#include <qstringlist.h>
+// #include <tqtextcodec.h>
+#include <tqstringlist.h>
// KDE includes
#include <kdebug.h>
@@ -41,19 +41,19 @@ KInstance *FreeverbPluginFactory::p_instance = 0L;
// Factory Constructor
-FreeverbPluginFactory::FreeverbPluginFactory(QObject *parent, const char* name)
+FreeverbPluginFactory::FreeverbPluginFactory(TQObject *parent, const char* name)
{
p_instance = new KInstance("FreeverbPluginFactory");
}
-QObject* FreeverbPluginFactory::createObject(QObject *parent, const char* name,
+TQObject* FreeverbPluginFactory::createObject(TQObject *parent, const char* name,
const char*,
- const QStringList &)
+ const TQStringList &)
{
kdDebug(100200) << "FreeverbPluginFactory::createObject()" << endl;
- QObject* obj = new FreeverbPlugin( parent, name );
+ TQObject* obj = new FreeverbPlugin( parent, name );
emit objectCreated( obj );
return obj;
}
@@ -62,7 +62,7 @@ QObject* FreeverbPluginFactory::createObject(QObject *parent, const char* name,
// Plugin Constructor
-FreeverbPlugin::FreeverbPlugin(QObject *parent, const char* name) //, KApplication *Appl)
+FreeverbPlugin::FreeverbPlugin(TQObject *parent, const char* name) //, KApplication *Appl)
: FXPlugin(parent, name) //, m_Appl(Appl)
{
m_config = new KSimpleConfig("ksayit_freeverbrc");
@@ -84,14 +84,14 @@ void FreeverbPlugin::setApplication(KApplication *Appl)
/** returns the Name of the Plugin
*/
-QString FreeverbPlugin::getName_KS() const
+TQString FreeverbPlugin::getName_KS() const
{
return "Synth_FREEVERB";
}
/** returns a description of the plugin
*/
-QString FreeverbPlugin::getDescription_KS() const
+TQString FreeverbPlugin::getDescription_KS() const
{
return i18n("This is a freeverb effect.");
}
diff --git a/ksayit/Freeverb_plugin/ksayitfreeverblib.h b/ksayit/Freeverb_plugin/ksayitfreeverblib.h
index 50bfa62..e9731d4 100644
--- a/ksayit/Freeverb_plugin/ksayitfreeverblib.h
+++ b/ksayit/Freeverb_plugin/ksayitfreeverblib.h
@@ -13,8 +13,8 @@
#define KSAYITFREEVERBLIB_H
// QT includes
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
// KDE includes
#include <ksimpleconfig.h>
@@ -29,14 +29,14 @@ class FreeverbPluginFactory : public KLibFactory
Q_OBJECT
public:
// Consturctor
- FreeverbPluginFactory(QObject *parent=0, const char* name=0);
+ FreeverbPluginFactory(TQObject *parent=0, const char* name=0);
// Destructor
virtual ~FreeverbPluginFactory(){ delete p_instance; };
- QObject* createObject(QObject *parent=0, const char* name=0,
- const char* className="QObject",
- const QStringList &args=QStringList());
+ TQObject* createObject(TQObject *parent=0, const char* name=0,
+ const char* className="TQObject",
+ const TQStringList &args=TQStringList());
private:
static KInstance* p_instance;
@@ -52,7 +52,7 @@ class FreeverbPlugin : public FXPlugin
Q_OBJECT
public:
// Constructor
- FreeverbPlugin(QObject *parent=0, const char* name=0); //, KApplication *Appl=0);
+ FreeverbPlugin(TQObject *parent=0, const char* name=0); //, KApplication *Appl=0);
// Destructor
~FreeverbPlugin();
@@ -63,11 +63,11 @@ public:
/** returns the Name of the Plugin
*/
- QString getName_KS() const;
+ TQString getName_KS() const;
/** returns a description of the plugin
*/
- QString getDescription_KS() const;
+ TQString getDescription_KS() const;
/** shows the GUI to configure the plugin
*/
diff --git a/ksayit/KTTSD_Lib/kttsdlib.cpp b/ksayit/KTTSD_Lib/kttsdlib.cpp
index 224cd21..f41670b 100644
--- a/ksayit/KTTSD_Lib/kttsdlib.cpp
+++ b/ksayit/KTTSD_Lib/kttsdlib.cpp
@@ -12,8 +12,8 @@
// #include <time.h> // nanosleep
// Qt includes
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
// KDE includes
#include <kglobal.h>
@@ -27,17 +27,17 @@
#include "kttsdlibsetupimpl.h"
-KTTSDLib::KTTSDLib(QObject *parent, const char *name, KApplication *Appl)
- : QObject(parent, name), m_Appl(Appl)
+KTTSDLib::KTTSDLib(TQObject *parent, const char *name, KApplication *Appl)
+ : TQObject(parent, name), m_Appl(Appl)
{
KGlobal::locale()->insertCatalogue("libKTTSD");
- m_talker = new kttsdlibtalker2(static_cast<QObject*>(this), "kttsdlibtalker");
- connect(m_talker, SIGNAL(signalTextFinished(const uint)),
- this, SLOT(slotTextFinished(const uint)) );
- connect(m_talker, SIGNAL(signalTextStopped(const uint)),
- this, SLOT(slotTextStopped(const uint)) );
- connect(m_talker, SIGNAL(signalTextStarted(const uint)),
- this, SLOT(slotTextStarted(const uint)) );
+ m_talker = new kttsdlibtalker2(static_cast<TQObject*>(this), "kttsdlibtalker");
+ connect(m_talker, TQT_SIGNAL(signalTextFinished(const uint)),
+ this, TQT_SLOT(slotTextFinished(const uint)) );
+ connect(m_talker, TQT_SIGNAL(signalTextStopped(const uint)),
+ this, TQT_SLOT(slotTextStopped(const uint)) );
+ connect(m_talker, TQT_SIGNAL(signalTextStarted(const uint)),
+ this, TQT_SLOT(slotTextStarted(const uint)) );
// reset list of currently processed jobs
while ( !jobList.empty() ){
@@ -59,15 +59,15 @@ KTTSDLib::~KTTSDLib()
}
-QString KTTSDLib::getName() const
+TQString KTTSDLib::getName() const
{
return "KDE KTTSD";
}
-QString KTTSDLib::getDescription() const
+TQString KTTSDLib::getDescription() const
{
- QString str;
+ TQString str;
str = i18n("<qt><big><u>Description:</u></big><br>");
str += i18n("This plugin uses the KDE TTS Daemon for speech output.");
@@ -87,7 +87,7 @@ int KTTSDLib::getStatus() const
}
-const QWidget* KTTSDLib::getGUI(QFrame *frame)
+const TQWidget* KTTSDLib::getGUI(TQFrame *frame)
{
kdDebug(100200) << "KTTSDLib::getGUI()" << endl;
@@ -111,7 +111,7 @@ bool KTTSDLib::saveWasClicked() const
}
-void KTTSDLib::setText(const QString &text)
+void KTTSDLib::setText(const TQString &text)
{
kdDebug(100200) << "KTTSDLib::setText()" << endl;
diff --git a/ksayit/KTTSD_Lib/kttsdlib.h b/ksayit/KTTSD_Lib/kttsdlib.h
index 6d8de9b..eb57912 100644
--- a/ksayit/KTTSD_Lib/kttsdlib.h
+++ b/ksayit/KTTSD_Lib/kttsdlib.h
@@ -17,9 +17,9 @@
using namespace std;
// QT includes
-#include <qobject.h>
-#include <qwidget.h>
-#include <qframe.h>
+#include <tqobject.h>
+#include <tqwidget.h>
+#include <tqframe.h>
#include <kdemacros.h>
#include "kdeexportfix.h"
@@ -70,25 +70,25 @@ public slots:
void slotTextStarted(const uint job);
public:
- KTTSDLib(QObject *parent=0, const char *name=0, KApplication *Appl=0);
+ KTTSDLib(TQObject *parent=0, const char *name=0, KApplication *Appl=0);
~KTTSDLib();
/** Reimplementations from the base class.
*/
- QString getName() const;
+ TQString getName() const;
- QString getDescription() const;
+ TQString getDescription() const;
int getActions();
- const QWidget* getGUI(QFrame *frame);
+ const TQWidget* getGUI(TQFrame *frame);
void reloadConfiguration();
bool saveWasClicked() const;
- void setText(const QString &text);
+ void setText(const TQString &text);
void sayText();
diff --git a/ksayit/KTTSD_Lib/kttsdlibsetupimpl.cpp b/ksayit/KTTSD_Lib/kttsdlibsetupimpl.cpp
index 0c7bc8f..1cb8bc9 100644
--- a/ksayit/KTTSD_Lib/kttsdlibsetupimpl.cpp
+++ b/ksayit/KTTSD_Lib/kttsdlibsetupimpl.cpp
@@ -13,7 +13,7 @@
#include <stdio.h>
// Qt includes
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
// KDE includes
#include <kdebug.h>
@@ -23,7 +23,7 @@
// App specific includes
#include "kttsdlibsetupimpl.h"
-KTTSDlibSetupImpl::KTTSDlibSetupImpl(QWidget *parent, const char *name)
+KTTSDlibSetupImpl::KTTSDlibSetupImpl(TQWidget *parent, const char *name)
: KTTSDlibSetup(parent, name)
{
}
@@ -47,16 +47,16 @@ void KTTSDlibSetupImpl::slotLaunchControlcenter()
fgets(cmdresult, 18, fp);
pclose(fp);
}
- if ( !QCString(cmdresult).contains("kcmkttsd") ){
- QString error = i18n("Control Center Module for KTTSD not found.");
+ if ( !TQCString(cmdresult).contains("kcmkttsd") ){
+ TQString error = i18n("Control Center Module for KTTSD not found.");
KMessageBox::sorry(this, error, i18n("Problem"));
return;
}
// invoke the Control Center Module
KProcess *kcmproc = new KProcess();
- connect(kcmproc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotKCMProcessExited(KProcess*)) );
+ connect(kcmproc, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(slotKCMProcessExited(KProcess*)) );
(*kcmproc) << "kcmshell";
(*kcmproc) << "kcmkttsd";
kcmproc->start(KProcess::NotifyOnExit);
diff --git a/ksayit/KTTSD_Lib/kttsdlibsetupimpl.h b/ksayit/KTTSD_Lib/kttsdlibsetupimpl.h
index 1fcf585..cd36430 100644
--- a/ksayit/KTTSD_Lib/kttsdlibsetupimpl.h
+++ b/ksayit/KTTSD_Lib/kttsdlibsetupimpl.h
@@ -27,7 +27,7 @@ class KTTSDlibSetupImpl : public KTTSDlibSetup
{
Q_OBJECT
public:
- KTTSDlibSetupImpl(QWidget *parent = 0, const char *name = 0);
+ KTTSDlibSetupImpl(TQWidget *parent = 0, const char *name = 0);
~KTTSDlibSetupImpl();
diff --git a/ksayit/KTTSD_Lib/kttsdlibtalker2.cpp b/ksayit/KTTSD_Lib/kttsdlibtalker2.cpp
index 808f8f2..c88a96b 100644
--- a/ksayit/KTTSD_Lib/kttsdlibtalker2.cpp
+++ b/ksayit/KTTSD_Lib/kttsdlibtalker2.cpp
@@ -13,7 +13,7 @@
#include <unistd.h> //sleep
// Qt includes
-#include <qstring.h>
+#include <tqstring.h>
// KDE includes
#include <kdebug.h>
@@ -21,22 +21,22 @@
// App specific includes
#include "kttsdlibtalker2.h"
-kttsdlibtalker2::kttsdlibtalker2(QObject *parent, const char *name)
- : QObject(parent, name), DCOPStub("kttsd", "KSpeech")
+kttsdlibtalker2::kttsdlibtalker2(TQObject *parent, const char *name)
+ : TQObject(parent, name), DCOPStub("kttsd", "KSpeech")
{
m_client = NULL;
connectDCOPSignal("kttsd", "KSpeech",
- "textStarted(QCString, uint)",
- "textStarted(QCString, uint)", false);
+ "textStarted(TQCString, uint)",
+ "textStarted(TQCString, uint)", false);
connectDCOPSignal("kttsd", "KSpeech",
- "textFinished(QCString, uint)",
- "textFinished(QCString, uint)", false);
+ "textFinished(TQCString, uint)",
+ "textFinished(TQCString, uint)", false);
connectDCOPSignal("kttsd", "KSpeech",
- "textStopped(QCString, uint)",
- "textStopped(QCString, uint)", false);
+ "textStopped(TQCString, uint)",
+ "textStopped(TQCString, uint)", false);
}
@@ -52,8 +52,8 @@ void kttsdlibtalker2::KTTSD_init(KApplication *Appl)
m_client = Appl->dcopClient();
if ( !m_client->isApplicationRegistered("kttsd")){
- QString error;
- if ( Appl->startServiceByDesktopName("kttsd", QStringList(), &error) ){
+ TQString error;
+ if ( Appl->startServiceByDesktopName("kttsd", TQStringList(), &error) ){
// throw(error);
kdDebug() << "Starting KTTSD failed with message " << error << endl;
}
@@ -64,7 +64,7 @@ void kttsdlibtalker2::KTTSD_init(KApplication *Appl)
}
-uint kttsdlibtalker2::KTTSD_setText(const QString &text, QString lang)
+uint kttsdlibtalker2::KTTSD_setText(const TQString &text, TQString lang)
{
kdDebug(100200) << "kttsdlibtalker2::KTTSD_setText()" << endl;
uint jobNum = setText(text, lang);
@@ -134,7 +134,7 @@ int kttsdlibtalker2::KTTSD_getCurrentTextJob()
// DCOP signals
////////////////////////////////////////////
-ASYNC kttsdlibtalker2::textStarted(const QCString &appID,
+ASYNC kttsdlibtalker2::textStarted(const TQCString &appID,
const uint jobNum)
{
kdDebug(100200) << "*** kttsdlibtalker2::textStarted()" << endl;
@@ -144,7 +144,7 @@ ASYNC kttsdlibtalker2::textStarted(const QCString &appID,
}
-ASYNC kttsdlibtalker2::textFinished(const QCString &appID,
+ASYNC kttsdlibtalker2::textFinished(const TQCString &appID,
const uint jobNum)
{
kdDebug(100200) << "*** kttsdlibtalker2::textFinished()" << endl;
@@ -154,7 +154,7 @@ ASYNC kttsdlibtalker2::textFinished(const QCString &appID,
}
-ASYNC kttsdlibtalker2::textStopped(const QCString &appID,
+ASYNC kttsdlibtalker2::textStopped(const TQCString &appID,
const uint jobNum)
{
kdDebug(100200) << "*** kttsdlibtalker2::textStopped()" << endl;
diff --git a/ksayit/KTTSD_Lib/kttsdlibtalker2.h b/ksayit/KTTSD_Lib/kttsdlibtalker2.h
index e39f1c8..29b6371 100644
--- a/ksayit/KTTSD_Lib/kttsdlibtalker2.h
+++ b/ksayit/KTTSD_Lib/kttsdlibtalker2.h
@@ -13,8 +13,8 @@
#define KTTSDLIBTALKER2_H
// Qt includes
-#include <qobject.h>
-#include <qcstring.h>
+#include <tqobject.h>
+#include <tqcstring.h>
#include <kspeech_stub.h>
#include <kspeechsink.h>
@@ -26,7 +26,7 @@
/**
@author Robert Vogl
*/
-class kttsdlibtalker2 : public QObject, public KSpeech_stub, virtual public KSpeechSink
+class kttsdlibtalker2 : public TQObject, public KSpeech_stub, virtual public KSpeechSink
{
Q_OBJECT
@@ -36,7 +36,7 @@ signals:
void signalTextStopped(const uint);
public:
- kttsdlibtalker2(QObject *parent = 0, const char *name = 0);
+ kttsdlibtalker2(TQObject *parent = 0, const char *name = 0);
~kttsdlibtalker2();
@@ -46,7 +46,7 @@ public:
/** See \p KSpeech Class Reference. Returns the job number.
*/
- uint KTTSD_setText(const QString &text, QString lang);
+ uint KTTSD_setText(const TQString &text, TQString lang);
/** See \p KSpeech Class Reference.
*/
@@ -85,12 +85,12 @@ protected:
////////////////////////////////////////////
// Slots for DCOP signals
////////////////////////////////////////////
- ASYNC textStarted(const QCString &appID, const uint jobNum);
- ASYNC textFinished(const QCString &appID, const uint jobNum);
- ASYNC textStopped(const QCString &appID, const uint jobNum);
+ ASYNC textStarted(const TQCString &appID, const uint jobNum);
+ ASYNC textFinished(const TQCString &appID, const uint jobNum);
+ ASYNC textStopped(const TQCString &appID, const uint jobNum);
private:
- QCString m_objID;
+ TQCString m_objID;
KApplication *m_Appl;
DCOPClient *m_client;
uint m_jobNum;
diff --git a/ksayit/src/DocTreeView.ui.h b/ksayit/src/DocTreeView.ui.h
index 39720c1..9807a7c 100644
--- a/ksayit/src/DocTreeView.ui.h
+++ b/ksayit/src/DocTreeView.ui.h
@@ -11,7 +11,7 @@
*****************************************************************************/
-void DocTreeView::slotItemClicked( QListViewItem * )
+void DocTreeView::slotItemClicked( TQListViewItem * )
{
}
@@ -126,7 +126,7 @@ void DocTreeView::slotNewSection_5()
}
-void DocTreeView::slotRightButtonPressed( QListViewItem *i, const QPoint &, int )
+void DocTreeView::slotRightButtonPressed( TQListViewItem *i, const TQPoint &, int )
{
}
diff --git a/ksayit/src/Types.h b/ksayit/src/Types.h
index 017f721..506e67f 100644
--- a/ksayit/src/Types.h
+++ b/ksayit/src/Types.h
@@ -21,14 +21,14 @@
// #include <vector>
// QT includes
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
// KDE includes
#include <klistview.h>
-typedef QValueList<int> ParameterList_type;
-typedef QMap<QString, ParameterList_type> EffectConfig_type;
+typedef TQValueList<int> ParameterList_type;
+typedef TQMap<TQString, ParameterList_type> EffectConfig_type;
namespace KSayItGlobal {
static const int item_initial_id = 100;
@@ -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, QString label=QString::null);
- ListViewInterface(ListViewInterface *parent=0, ListViewInterface *after=0, QString label=QString::null);
- ListViewInterface(KListView *lv=0, QString label=QString::null);
+ 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);
// ~ListViewItemInterface();
@@ -67,15 +67,15 @@ public:
* \returns <tt>true</tt> if the operation was successfully performed,
* in all other cases <tt>false</tt>.
*/
- virtual bool setValue( unsigned int index, QVariant data ) = 0;
+ virtual bool setValue( unsigned int index, TQVariant data ) = 0;
/**
* Requests data from the item referenced by the index.
* \param index See <tt>setValue()</tt>.
- * \returns The requested data as a <tt>QVariant</tt> or a invalid
- * <tt>QVariant()</tt> if the data was not available.
+ * \returns The requested data as a <tt>TQVariant</tt> or a invalid
+ * <tt>TQVariant()</tt> if the data was not available.
*/
- virtual QVariant getValue( unsigned int index ) const = 0;
+ virtual TQVariant getValue( unsigned int index ) const = 0;
};
diff --git a/ksayit/src/contextmenuhandler.cpp b/ksayit/src/contextmenuhandler.cpp
index 311a39a..26e8831 100644
--- a/ksayit/src/contextmenuhandler.cpp
+++ b/ksayit/src/contextmenuhandler.cpp
@@ -11,8 +11,8 @@
//
// Qt includes
-#include <qfile.h>
-#include <qvariant.h>
+#include <tqfile.h>
+#include <tqvariant.h>
// KDE includes
#include <kdebug.h>
@@ -29,14 +29,14 @@
* XML-ActionHandler
*/
ContextActionHandler::ContextActionHandler(ContextMenuHandler *menuhandler)
- : QXmlDefaultHandler(), m_menuhandler(menuhandler)
+ : TQXmlDefaultHandler(), m_menuhandler(menuhandler)
{
- m_subName = QString::null;
- m_actionName = QString::null;
- m_qty = QString::null;
+ m_subName = TQString::null;
+ m_actionName = TQString::null;
+ m_qty = TQString::null;
m_popup = menuhandler->m_popupmenu;
m_hit = false;
- m_searchID = QString::null;
+ m_searchID = TQString::null;
}
ContextActionHandler::~ContextActionHandler()
@@ -44,16 +44,16 @@ ContextActionHandler::~ContextActionHandler()
}
-void ContextActionHandler::setSearchID( const QString xmlID )
+void ContextActionHandler::setSearchID( const TQString xmlID )
{
m_searchID = xmlID;
}
-bool ContextActionHandler::startElement( const QString &,
- const QString &,
- const QString &qName,
- const QXmlAttributes &atts )
+bool ContextActionHandler::startElement( const TQString &,
+ const TQString &,
+ const TQString &qName,
+ const TQXmlAttributes &atts )
{
if ( qName == "Item" ){
if ( atts.value("id") == m_searchID ){
@@ -84,9 +84,9 @@ bool ContextActionHandler::startElement( const QString &,
}
-bool ContextActionHandler::endElement( const QString &,
- const QString &,
- const QString &qName )
+bool ContextActionHandler::endElement( const TQString &,
+ const TQString &,
+ const TQString &qName )
{
if ( !(m_hit && m_menuhandler->m_popupmenu) )
return true;
@@ -106,7 +106,7 @@ bool ContextActionHandler::endElement( const QString &,
}
-bool ContextActionHandler::characters( const QString &ch )
+bool ContextActionHandler::characters( const TQString &ch )
{
m_actionName += ch;
return true;
@@ -117,8 +117,8 @@ bool ContextActionHandler::characters( const QString &ch )
/**
* MenuHandler
*/
-ContextMenuHandler::ContextMenuHandler(QObject *parent, const char *name)
- : QObject(parent, name), m_DocTreeView(parent)
+ContextMenuHandler::ContextMenuHandler(TQObject *parent, const char *name)
+ : TQObject(parent, name), m_DocTreeView(parent)
{
m_popupmenu = NULL;
m_item = NULL;
@@ -158,75 +158,75 @@ void ContextMenuHandler::initActions()
// User defined actions
renameItem = new KAction (i18n("Rename..."),
0,
- m_DocTreeView, SLOT (slotRenameItem()), NULL );
+ m_DocTreeView, TQT_SLOT (slotRenameItem()), NULL );
deleteItem = new KAction (i18n("Delete..."),
0,
- m_DocTreeView, SLOT (slotDeleteItem()), NULL );
+ m_DocTreeView, TQT_SLOT (slotDeleteItem()), NULL );
newBookInfo = new KAction ( i18n("Overview"),
0,
- m_DocTreeView, SLOT (slotNewBookInfo()), NULL );
+ m_DocTreeView, TQT_SLOT (slotNewBookInfo()), NULL );
newChapter = new KAction ( i18n("Chapter"),
0,
- m_DocTreeView, SLOT (slotNewChapter()), NULL );
+ m_DocTreeView, TQT_SLOT (slotNewChapter()), NULL );
newKeywordSet = new KAction ( i18n("Keywords"),
0,
- m_DocTreeView, SLOT (slotNewKeywordSet()), NULL );
+ m_DocTreeView, TQT_SLOT (slotNewKeywordSet()), NULL );
newKeyword = new KAction ( i18n("Keyword"),
0,
- m_DocTreeView, SLOT (slotNewKeyword()), NULL );
+ m_DocTreeView, TQT_SLOT (slotNewKeyword()), NULL );
newAbstract = new KAction ( i18n("Abstract"),
0,
- m_DocTreeView, SLOT (slotNewAbstract()), NULL );
+ m_DocTreeView, TQT_SLOT (slotNewAbstract()), NULL );
newAuthorGroup = new KAction ( i18n("Authors"),
0,
- m_DocTreeView, SLOT (slotNewAuthorGroup()), NULL );
+ m_DocTreeView, TQT_SLOT (slotNewAuthorGroup()), NULL );
newAuthor = new KAction ( i18n("Author"),
0,
- m_DocTreeView, SLOT (slotNewAuthor()), NULL );
+ m_DocTreeView, TQT_SLOT (slotNewAuthor()), NULL );
newDate = new KAction ( i18n("Date"),
0,
- m_DocTreeView, SLOT (slotNewDate()), NULL );
+ m_DocTreeView, TQT_SLOT (slotNewDate()), NULL );
newReleaseInfo = new KAction ( i18n("Release Info"),
0,
- m_DocTreeView, SLOT (slotNewReleaseInfo()), NULL );
+ m_DocTreeView, TQT_SLOT (slotNewReleaseInfo()), NULL );
newTitle = new KAction ( i18n("Title"),
0,
- m_DocTreeView, SLOT (slotNewTitle()), NULL );
+ m_DocTreeView, TQT_SLOT (slotNewTitle()), NULL );
newParagraph = new KAction ( i18n("Paragraph"),
0,
- m_DocTreeView, SLOT (slotNewParagraph()), NULL );
+ m_DocTreeView, TQT_SLOT (slotNewParagraph()), NULL );
newSection_1 = new KAction ( i18n("Section Level 1"),
0,
- m_DocTreeView, SLOT (slotNewSection_1()), NULL );
+ m_DocTreeView, TQT_SLOT (slotNewSection_1()), NULL );
newSection_2 = new KAction ( i18n("Section Level 2"),
0,
- m_DocTreeView, SLOT (slotNewSection_2()), NULL );
+ m_DocTreeView, TQT_SLOT (slotNewSection_2()), NULL );
newSection_3 = new KAction ( i18n("Section Level 3"),
0,
- m_DocTreeView, SLOT (slotNewSection_3()), NULL );
+ m_DocTreeView, TQT_SLOT (slotNewSection_3()), NULL );
newSection_4 = new KAction ( i18n("Section Level 4"),
0,
- m_DocTreeView, SLOT (slotNewSection_4()), NULL );
+ m_DocTreeView, TQT_SLOT (slotNewSection_4()), NULL );
newSection_5 = new KAction ( i18n("Section Level 5"),
0,
- m_DocTreeView, SLOT (slotNewSection_5()), NULL );
+ m_DocTreeView, TQT_SLOT (slotNewSection_5()), NULL );
}
@@ -237,7 +237,7 @@ KPopupMenu* ContextMenuHandler::getPopupMenu(ListViewInterface *item)
m_item = item;
- QString xmlID = ( item->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString xmlID = ( item->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( xmlID.isNull() )
return NULL;
@@ -268,7 +268,7 @@ void ContextMenuHandler::registerPopupMenu(ListViewInterface *item)
m_item = item;
- QString xmlID = ( item->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString xmlID = ( item->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( xmlID.isNull() )
return;
@@ -283,13 +283,13 @@ void ContextMenuHandler::registerPopupMenu(ListViewInterface *item)
}
-bool ContextMenuHandler::parseXmlFile(const QString &xmlID)
+bool ContextMenuHandler::parseXmlFile(const TQString &xmlID)
{
kdDebug(100200) << "ContextMenuHandler::parseXmlFile()" << endl;
kdDebug(100200) << "XML-File: " << m_XmlFilePath << endl;
- QFile xmlFile( m_XmlFilePath );
- QXmlSimpleReader parser;
+ TQFile xmlFile( m_XmlFilePath );
+ TQXmlSimpleReader parser;
ContextActionHandler handler(this);
handler.setSearchID(xmlID);
parser.setContentHandler( &handler );
@@ -297,7 +297,7 @@ bool ContextMenuHandler::parseXmlFile(const QString &xmlID)
}
-KAction* ContextMenuHandler::ActionFactory( const QString &actionName, const QString &qty )
+KAction* ContextMenuHandler::ActionFactory( const TQString &actionName, const TQString &qty )
{
bool enabled;
if ( qty.lower() == "n" ){
@@ -307,7 +307,7 @@ KAction* ContextMenuHandler::ActionFactory( const QString &actionName, const QSt
// check if qty is within allowed limits
ListViewInterface *i = static_cast<ListViewInterface*>(m_item->firstChild());
int count = 0;
- QString name = QString::null;
+ TQString name = TQString::null;
while (i){
name = ( i->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( name.lower() == actionName.lower() ){
@@ -391,7 +391,7 @@ void ContextMenuHandler::setItemEditable( bool editable )
}
-void ContextMenuHandler::setItemMaxlines( const QString &maxlines )
+void ContextMenuHandler::setItemMaxlines( const TQString &maxlines )
{
if ( maxlines == "" )
return;
diff --git a/ksayit/src/contextmenuhandler.h b/ksayit/src/contextmenuhandler.h
index 102181a..148bb04 100644
--- a/ksayit/src/contextmenuhandler.h
+++ b/ksayit/src/contextmenuhandler.h
@@ -13,9 +13,9 @@
#define CONTEXTMENUHANDLER_H
// Qt includes
-#include <qobject.h>
-#include <qstring.h>
-#include <qxml.h>
+#include <tqobject.h>
+#include <tqstring.h>
+#include <tqxml.h>
// KDE includes
#include <kaction.h>
@@ -28,36 +28,36 @@ class ListViewInterface;
/**
@author Robert Vogl
*/
-class ContextActionHandler : public QXmlDefaultHandler
+class ContextActionHandler : public TQXmlDefaultHandler
{
public:
ContextActionHandler(ContextMenuHandler *menuhandler = 0);
~ContextActionHandler();
// Reimplementations from base class
- bool startElement( const QString &namespaceURI,
- const QString &localName,
- const QString &qName,
- const QXmlAttributes &atts );
+ bool startElement( const TQString &namespaceURI,
+ const TQString &localName,
+ const TQString &qName,
+ const TQXmlAttributes &atts );
// Reimplementations from base class
- bool endElement( const QString &namespaceURI,
- const QString &localName,
- const QString &qName );
+ bool endElement( const TQString &namespaceURI,
+ const TQString &localName,
+ const TQString &qName );
// Reimplementations from base class
- bool characters( const QString &ch );
+ bool characters( const TQString &ch );
- void setSearchID( const QString xmlID );
+ void setSearchID( const TQString xmlID );
private:
ContextMenuHandler *m_menuhandler;
- QString m_subName;
- QString m_actionName;
- QString m_qty;
+ TQString m_subName;
+ TQString m_actionName;
+ TQString m_qty;
KPopupMenu *m_popup;
bool m_hit;
- QString m_searchID;
+ TQString m_searchID;
};
@@ -68,7 +68,7 @@ class ContextMenuHandler : public QObject
{
Q_OBJECT
public:
- ContextMenuHandler(QObject *parent = 0, const char *name = 0);
+ ContextMenuHandler(TQObject *parent = 0, const char *name = 0);
~ContextMenuHandler();
@@ -94,7 +94,7 @@ public:
* given element.
* \returns A Pointer to the action.
*/
- KAction* ActionFactory( const QString &actionName, const QString &qty );
+ KAction* ActionFactory( const TQString &actionName, const TQString &qty );
/**
* Creates a Popup context menu for the given item and stores a
@@ -111,11 +111,11 @@ public:
* Sets the number of lines a editable item can hold.
* -1 = unlimited.
*/
- void setItemMaxlines( const QString &maxlines );
+ void setItemMaxlines( const TQString &maxlines );
private: // Methods
void initActions();
- bool parseXmlFile(const QString &xmlID);
+ bool parseXmlFile(const TQString &xmlID);
public: // Attributes
KPopupMenu* m_popupmenu;
@@ -143,9 +143,9 @@ private:
KAction* newSection_5;
// mixed stuff
- QString m_XmlFilePath;
+ TQString m_XmlFilePath;
ListViewInterface* m_item;
- QObject* m_DocTreeView;
+ TQObject* m_DocTreeView;
};
diff --git a/ksayit/src/docbookclasses.cpp b/ksayit/src/docbookclasses.cpp
index 7e5c677..9a3af1b 100644
--- a/ksayit/src/docbookclasses.cpp
+++ b/ksayit/src/docbookclasses.cpp
@@ -10,11 +10,11 @@
//
//
// Qt includes
-#include <qwidget.h>
-#include <qtextstream.h>
-#include <qpixmap.h>
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqwidget.h>
+#include <tqtextstream.h>
+#include <tqpixmap.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
//KDE includes
#include <kdebug.h>
@@ -31,16 +31,16 @@
//////////////////////////////////////
// Interface
//////////////////////////////////////
-ListViewInterface::ListViewInterface(ListViewInterface *parent, QString label)
+ListViewInterface::ListViewInterface(ListViewInterface *parent, TQString label)
: KListViewItem( parent, label )
{
}
-ListViewInterface::ListViewInterface(ListViewInterface *parent, ListViewInterface *after, QString label) : KListViewItem( parent, after, label )
+ListViewInterface::ListViewInterface(ListViewInterface *parent, ListViewInterface *after, TQString label) : KListViewItem( parent, after, label )
{
}
-ListViewInterface::ListViewInterface(KListView *lv, QString label)
+ListViewInterface::ListViewInterface(KListView *lv, TQString label)
: KListViewItem( lv, label )
{
}
@@ -52,23 +52,23 @@ ListViewInterface::ListViewInterface(KListView *lv, QString label)
/**
* RobDocument
*/
-RobDocument::RobDocument(KListView *lv, QString label)
+RobDocument::RobDocument(KListView *lv, TQString label)
: ListViewInterface( lv, label )
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon("contents", KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("contents", KIcon::Small);
this->setPixmap(0, pixmap);
// new Concept (begin)
m_valueList.clear();
- m_valueList.append( QString("RobDocument") ); // XmlContextName
+ m_valueList.append( TQString("RobDocument") ); // XmlContextName
m_valueList.append( (bool)false ); // isEditable
m_valueList.append( (int)0 ); // MaxLines
- m_valueList.append(QString::null); // Summary
- m_valueList.append(QString::null); // RawData
+ m_valueList.append(TQString::null); // Summary
+ m_valueList.append(TQString::null); // RawData
m_valueList.append("<H1><center>" + i18n("unnamed") + "</center></H1>"); // RTFHeader
- m_valueList.append(QString::null); // RTFData
+ m_valueList.append(TQString::null); // RTFData
m_valueList.append(i18n("unnamed") + "\n"); // SpeakerHeader
- m_valueList.append(QString::null); // SpeakerData
+ m_valueList.append(TQString::null); // SpeakerData
// new Concept (end)
}
@@ -76,12 +76,12 @@ RobDocument::~RobDocument()
{
}
-bool RobDocument::setValue( unsigned int index, QVariant data )
+bool RobDocument::setValue( unsigned int index, TQVariant data )
{
if ( index<1 || index > m_valueList.count() )
return false;
- QValueList<QVariant>::Iterator it = m_valueList.at(index);
+ TQValueList<TQVariant>::Iterator it = m_valueList.at(index);
switch (index){
case KSayItGlobal::ISEDITABLE:
*it = data;
@@ -98,12 +98,12 @@ bool RobDocument::setValue( unsigned int index, QVariant data )
return true;
}
-QVariant RobDocument::getValue( unsigned int index ) const
+TQVariant RobDocument::getValue( unsigned int index ) const
{
if ( index > m_valueList.count() )
- return QVariant(); // a invalid QVariant
+ return TQVariant(); // a invalid QVariant
- QVariant data;
+ TQVariant data;
data = m_valueList[index];
return data;
@@ -116,24 +116,24 @@ QVariant RobDocument::getValue( unsigned int index ) const
/**
* Overview
*/
-Overview::Overview(ListViewInterface *parent, ListViewInterface *after, QString label)
+Overview::Overview(ListViewInterface *parent, ListViewInterface *after, TQString label)
: ListViewInterface(parent, after, label)
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon("filenew", KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("filenew", KIcon::Small);
this->setPixmap(0, pixmap);
this->setText(3, "0"); // upmost element
// new Concept (begin)
m_valueList.clear();
- m_valueList.append( QString("BookInfo") ); // XmlContextName
+ m_valueList.append( TQString("BookInfo") ); // XmlContextName
m_valueList.append( (bool)false ); // isEditable
m_valueList.append( (int)0 ); // MaxLines
- m_valueList.append(QString::null); // Summary
- m_valueList.append(QString::null); // RawData
+ m_valueList.append(TQString::null); // Summary
+ m_valueList.append(TQString::null); // RawData
m_valueList.append("<H1>" + i18n("Overview") + "</H1>"); // RTFHeader
- m_valueList.append(QString::null); // RTFData
+ m_valueList.append(TQString::null); // RTFData
m_valueList.append(i18n("Overview") + "\n"); // SpeakerHeader
- m_valueList.append(QString::null); // SpeakerData
+ m_valueList.append(TQString::null); // SpeakerData
// new Concept (end)
}
@@ -141,12 +141,12 @@ Overview::~Overview()
{
}
-bool Overview::setValue( unsigned int index, QVariant data )
+bool Overview::setValue( unsigned int index, TQVariant data )
{
if ( index<1 || index > m_valueList.count() )
return false;
- QValueList<QVariant>::Iterator it = m_valueList.at(index);
+ TQValueList<TQVariant>::Iterator it = m_valueList.at(index);
switch (index){
case KSayItGlobal::ISEDITABLE:
*it = data;
@@ -157,12 +157,12 @@ bool Overview::setValue( unsigned int index, QVariant data )
return true;
}
-QVariant Overview::getValue( unsigned int index ) const
+TQVariant Overview::getValue( unsigned int index ) const
{
if ( index > m_valueList.count() )
- return QVariant(); // a invalid QVariant
+ return TQVariant(); // a invalid QVariant
- QVariant data;
+ TQVariant data;
data = m_valueList[index];
return data;
@@ -171,24 +171,24 @@ QVariant Overview::getValue( unsigned int index ) const
/**
* Date
*/
-Date::Date(ListViewInterface *parent, ListViewInterface *after, QString label)
+Date::Date(ListViewInterface *parent, ListViewInterface *after, TQString label)
: ListViewInterface(parent, after, label)
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon("filenew", KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("filenew", KIcon::Small);
this->setPixmap(0, pixmap);
this->setText(3, "00000001");
// new Concept (begin)
m_valueList.clear();
- m_valueList.append( QString("Date") ); // XmlContextName
+ m_valueList.append( TQString("Date") ); // XmlContextName
m_valueList.append( (bool)false ); // isEditable
m_valueList.append( (int)1 ); // MaxLines
- m_valueList.append(QString::null); // Summary
- m_valueList.append(QString::null); // RawData
+ m_valueList.append(TQString::null); // Summary
+ m_valueList.append(TQString::null); // RawData
m_valueList.append("<B>" + i18n("Date") +": </B>"); // RTFHeader
- m_valueList.append(QString::null); // RTFData
+ m_valueList.append(TQString::null); // RTFData
m_valueList.append(i18n("Date") + ": "); // SpeakerHeader
- m_valueList.append(QString::null); // SpeakerData
+ m_valueList.append(TQString::null); // SpeakerData
// new Concept (end)
}
@@ -196,12 +196,12 @@ Date::~Date()
{
}
-bool Date::setValue( unsigned int index, QVariant data )
+bool Date::setValue( unsigned int index, TQVariant data )
{
if ( index<1 || index > m_valueList.count() )
return false;
- QValueList<QVariant>::Iterator it = m_valueList.at(index);
+ TQValueList<TQVariant>::Iterator it = m_valueList.at(index);
switch (index){
case KSayItGlobal::ISEDITABLE:
*it = data;
@@ -224,12 +224,12 @@ bool Date::setValue( unsigned int index, QVariant data )
return true;
}
-QVariant Date::getValue( unsigned int index ) const
+TQVariant Date::getValue( unsigned int index ) const
{
if ( index > m_valueList.count() )
- return QVariant(); // a invalid QVariant
+ return TQVariant(); // a invalid QVariant
- QVariant data;
+ TQVariant data;
data = m_valueList[index];
return data;
@@ -238,24 +238,24 @@ QVariant Date::getValue( unsigned int index ) const
/**
* ReleaseInfo
*/
-ReleaseInfo::ReleaseInfo(ListViewInterface *parent, ListViewInterface *after, QString label)
+ReleaseInfo::ReleaseInfo(ListViewInterface *parent, ListViewInterface *after, TQString label)
: ListViewInterface(parent, after, label)
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon("filenew", KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("filenew", KIcon::Small);
this->setPixmap(0, pixmap);
this->setText(3, "00000002");
// new Concept (begin)
m_valueList.clear();
- m_valueList.append( QString("ReleaseInfo") ); // XmlContextName
+ m_valueList.append( TQString("ReleaseInfo") ); // XmlContextName
m_valueList.append( (bool)false ); // isEditable
m_valueList.append( (int)1 ); // MaxLines
- m_valueList.append(QString::null); // Summary
- m_valueList.append(QString::null); // RawData
+ m_valueList.append(TQString::null); // Summary
+ m_valueList.append(TQString::null); // RawData
m_valueList.append("<B>" + i18n("Release") + ": </B>"); // RTFHeader
- m_valueList.append(QString::null); // RTFData
+ m_valueList.append(TQString::null); // RTFData
m_valueList.append(i18n("Release") + ": "); // SpeakerHeader
- m_valueList.append(QString::null); // SpeakerData
+ m_valueList.append(TQString::null); // SpeakerData
// new Concept (end)
}
@@ -263,12 +263,12 @@ ReleaseInfo::~ReleaseInfo()
{
}
-bool ReleaseInfo::setValue( unsigned int index, QVariant data )
+bool ReleaseInfo::setValue( unsigned int index, TQVariant data )
{
if ( index<1 || index > m_valueList.count() )
return false;
- QValueList<QVariant>::Iterator it = m_valueList.at(index);
+ TQValueList<TQVariant>::Iterator it = m_valueList.at(index);
switch (index){
case KSayItGlobal::ISEDITABLE:
*it = data;
@@ -291,12 +291,12 @@ bool ReleaseInfo::setValue( unsigned int index, QVariant data )
return true;
}
-QVariant ReleaseInfo::getValue( unsigned int index ) const
+TQVariant ReleaseInfo::getValue( unsigned int index ) const
{
if ( index > m_valueList.count() )
- return QVariant(); // a invalid QVariant
+ return TQVariant(); // a invalid QVariant
- QVariant data;
+ TQVariant data;
data = m_valueList[index];
return data;
@@ -305,24 +305,24 @@ QVariant ReleaseInfo::getValue( unsigned int index ) const
/**
* Authorgroup
*/
-AuthorGroup::AuthorGroup(ListViewInterface *parent, ListViewInterface *after, QString label)
+AuthorGroup::AuthorGroup(ListViewInterface *parent, ListViewInterface *after, TQString label)
: ListViewInterface(parent, after, label)
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon("kdmconfig", KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("kdmconfig", KIcon::Small);
this->setPixmap(0, pixmap);
this->setText(3, "00000003");
// new Concept (begin)
m_valueList.clear();
- m_valueList.append( QString("AuthorGroup") ); // XmlContextName
+ m_valueList.append( TQString("AuthorGroup") ); // XmlContextName
m_valueList.append( (bool)false ); // isEditable
m_valueList.append( (int)0 ); // MaxLines
- m_valueList.append(QString::null); // Summary
- m_valueList.append(QString::null); // RawData
+ m_valueList.append(TQString::null); // Summary
+ m_valueList.append(TQString::null); // RawData
m_valueList.append("<H2>" + i18n("Author(s)")+ "</H2>"); // RTFHeader
- m_valueList.append(QString::null); // RTFData
+ m_valueList.append(TQString::null); // RTFData
m_valueList.append(i18n("Author(s)") + "\n"); // SpeakerHeader
- m_valueList.append(QString::null); // SpeakerData
+ m_valueList.append(TQString::null); // SpeakerData
// new Concept (end)
}
@@ -330,12 +330,12 @@ AuthorGroup::~AuthorGroup()
{
}
-bool AuthorGroup::setValue( unsigned int index, QVariant data )
+bool AuthorGroup::setValue( unsigned int index, TQVariant data )
{
if ( index<1 || index > m_valueList.count() )
return false;
- QValueList<QVariant>::Iterator it = m_valueList.at(index);
+ TQValueList<TQVariant>::Iterator it = m_valueList.at(index);
switch (index){
case KSayItGlobal::ISEDITABLE:
*it = data;
@@ -346,12 +346,12 @@ bool AuthorGroup::setValue( unsigned int index, QVariant data )
return true;
}
-QVariant AuthorGroup::getValue( unsigned int index ) const
+TQVariant AuthorGroup::getValue( unsigned int index ) const
{
if ( index > m_valueList.count() )
- return QVariant(); // a invalid QVariant
+ return TQVariant(); // a invalid QVariant
- QVariant data;
+ TQVariant data;
data = m_valueList[index];
return data;
@@ -361,23 +361,23 @@ QVariant AuthorGroup::getValue( unsigned int index ) const
/**
* Author
*/
-Author::Author(ListViewInterface *parent, ListViewInterface *after, QString label)
+Author::Author(ListViewInterface *parent, ListViewInterface *after, TQString label)
: ListViewInterface(parent, after, label)
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon("personal", KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("personal", KIcon::Small);
this->setPixmap(0, pixmap);
// new Concept (begin)
m_valueList.clear();
- m_valueList.append( QString("Author") ); // XmlContextName
+ m_valueList.append( TQString("Author") ); // XmlContextName
m_valueList.append( (bool)false ); // isEditable
m_valueList.append( (int)1 ); // MaxLines
- m_valueList.append(QString::null); // Summary
- m_valueList.append(QString::null); // RawData
+ m_valueList.append(TQString::null); // Summary
+ m_valueList.append(TQString::null); // RawData
m_valueList.append("<B>" + i18n("Author") + ": </B>"); // RTFHeader
- m_valueList.append(QString::null); // RTFData
+ m_valueList.append(TQString::null); // RTFData
m_valueList.append(i18n("Author") + ": "); // SpeakerHeader
- m_valueList.append(QString::null); // SpeakerData
+ m_valueList.append(TQString::null); // SpeakerData
// new Concept (end)
}
@@ -385,16 +385,16 @@ Author::~Author()
{
}
-// void Author::setData(const QString &data, QDomDocument &)
+// void Author::setData(const TQString &data, TQDomDocument &)
// {
// // canonify string
-// QString m_data = data;
-// m_data.replace( QRegExp("\n"), "" ); // remove Newlines
-// m_data.replace( QRegExp(" {2,}"), " " ); // remove multiple spaces
-// m_data.replace( QRegExp("[\t|\r]{1,}"), ""); // remove Tabs
+// 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
// // split string "firstname surname"
-// QString firstname = m_data.section(' ', 0, 0);
-// QString surname = m_data.section(' ', 1, 1);
+// TQString firstname = m_data.section(' ', 0, 0);
+// TQString surname = m_data.section(' ', 1, 1);
// // update node elements
// m_node1.setNodeValue(firstname);
// m_node2.setNodeValue(surname);
@@ -402,12 +402,12 @@ Author::~Author()
// this->setText(1, firstname + " " + surname);
// }
-bool Author::setValue( unsigned int index, QVariant data )
+bool Author::setValue( unsigned int index, TQVariant data )
{
if ( index<1 || index > m_valueList.count() )
return false;
- QValueList<QVariant>::Iterator it = m_valueList.at(index);
+ TQValueList<TQVariant>::Iterator it = m_valueList.at(index);
switch (index){
case KSayItGlobal::ISEDITABLE:
*it = data;
@@ -431,12 +431,12 @@ bool Author::setValue( unsigned int index, QVariant data )
return true;
}
-QVariant Author::getValue( unsigned int index ) const
+TQVariant Author::getValue( unsigned int index ) const
{
if ( index > m_valueList.count() )
- return QVariant(); // a invalid QVariant
+ return TQVariant(); // a invalid QVariant
- QVariant data;
+ TQVariant data;
data = m_valueList[index];
return data;
@@ -445,24 +445,24 @@ QVariant Author::getValue( unsigned int index ) const
/**
* KeywordSet
*/
-KeywordSet::KeywordSet(ListViewInterface *parent, ListViewInterface *after, QString label)
+KeywordSet::KeywordSet(ListViewInterface *parent, ListViewInterface *after, TQString label)
: ListViewInterface(parent, after, label)
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon("txt", KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("txt", KIcon::Small);
this->setPixmap(0, pixmap);
this->setText(3, "00000004");
// new Concept (begin)
m_valueList.clear();
- m_valueList.append( QString("KeywordSet") ); // XmlContextName
+ m_valueList.append( TQString("KeywordSet") ); // XmlContextName
m_valueList.append( (bool)false ); // isEditable
m_valueList.append( (int)0 ); // MaxLines
- m_valueList.append(QString::null); // Summary
- m_valueList.append(QString::null); // RawData
+ m_valueList.append(TQString::null); // Summary
+ m_valueList.append(TQString::null); // RawData
m_valueList.append("<H2>" + i18n("Keywords") + "</H2>"); // RTFHeader
- m_valueList.append(QString::null); // RTFData
+ m_valueList.append(TQString::null); // RTFData
m_valueList.append(i18n("Keywords") + "\n"); // SpeakerHeader
- m_valueList.append(QString::null); // SpeakerData
+ m_valueList.append(TQString::null); // SpeakerData
// new Concept (end)
}
@@ -470,12 +470,12 @@ KeywordSet::~KeywordSet()
{
}
-bool KeywordSet::setValue( unsigned int index, QVariant data )
+bool KeywordSet::setValue( unsigned int index, TQVariant data )
{
if ( index<1 || index > m_valueList.count() )
return false;
- QValueList<QVariant>::Iterator it = m_valueList.at(index);
+ TQValueList<TQVariant>::Iterator it = m_valueList.at(index);
switch (index){
case KSayItGlobal::ISEDITABLE:
*it = data;
@@ -486,12 +486,12 @@ bool KeywordSet::setValue( unsigned int index, QVariant data )
return true;
}
-QVariant KeywordSet::getValue( unsigned int index ) const
+TQVariant KeywordSet::getValue( unsigned int index ) const
{
if ( index > m_valueList.count() )
- return QVariant(); // a invalid QVariant
+ return TQVariant(); // a invalid QVariant
- QVariant data;
+ TQVariant data;
data = m_valueList[index];
return data;
@@ -500,20 +500,20 @@ QVariant KeywordSet::getValue( unsigned int index ) const
/**
* Keyword
*/
-Keyword::Keyword(ListViewInterface *parent, ListViewInterface *after, QString label)
+Keyword::Keyword(ListViewInterface *parent, ListViewInterface *after, TQString label)
: ListViewInterface(parent, after, label)
{
// new Concept (begin)
m_valueList.clear();
- m_valueList.append( QString("Keyword") ); // XmlContextName
+ m_valueList.append( TQString("Keyword") ); // XmlContextName
m_valueList.append( (bool)false ); // isEditable
m_valueList.append( (bool)1 ); // MaxLines
- m_valueList.append(QString::null); // Summary
- m_valueList.append(QString::null); // RawData
- m_valueList.append(QString::null); // RTFHeader
- m_valueList.append(QString::null); // RTFData
- m_valueList.append(QString::null); // SpeakerHeader
- m_valueList.append(QString::null); // SpeakerData
+ 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
// new Concept (end)
}
@@ -521,12 +521,12 @@ Keyword::~Keyword()
{
}
-bool Keyword::setValue( unsigned int index, QVariant data )
+bool Keyword::setValue( unsigned int index, TQVariant data )
{
if ( index<1 || index > m_valueList.count() )
return false;
- QValueList<QVariant>::Iterator it = m_valueList.at(index);
+ TQValueList<TQVariant>::Iterator it = m_valueList.at(index);
switch (index){
case KSayItGlobal::ISEDITABLE:
*it = data;
@@ -550,12 +550,12 @@ bool Keyword::setValue( unsigned int index, QVariant data )
return true;
}
-QVariant Keyword::getValue( unsigned int index ) const
+TQVariant Keyword::getValue( unsigned int index ) const
{
if ( index > m_valueList.count() )
- return QVariant(); // a invalid QVariant
+ return TQVariant(); // a invalid QVariant
- QVariant data;
+ TQVariant data;
data = m_valueList[index];
return data;
@@ -566,24 +566,24 @@ QVariant Keyword::getValue( unsigned int index ) const
/**
* Abstract
*/
-Abstract::Abstract(ListViewInterface *parent, ListViewInterface *after, QString label)
+Abstract::Abstract(ListViewInterface *parent, ListViewInterface *after, TQString label)
: ListViewInterface(parent, after, label)
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon("filenew", KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("filenew", KIcon::Small);
this->setPixmap(0, pixmap);
this->setText(3, "00000005");
// new Concept (begin)
m_valueList.clear();
- m_valueList.append( QString("Abstract") ); // XmlContextName
+ m_valueList.append( TQString("Abstract") ); // XmlContextName
m_valueList.append( (bool)false ); // isEditable
m_valueList.append( (int)0 ); // MaxLines
- m_valueList.append(QString::null); // Summary
- m_valueList.append(QString::null); // RawData
+ m_valueList.append(TQString::null); // Summary
+ m_valueList.append(TQString::null); // RawData
m_valueList.append("<H2>" + i18n("Abstract") + "</H2>"); // RTFHeader
- m_valueList.append(QString::null); // RTFData
+ m_valueList.append(TQString::null); // RTFData
m_valueList.append(i18n("Abstract") + "\n"); // SpeakerHeader
- m_valueList.append(QString::null); // SpeakerData
+ m_valueList.append(TQString::null); // SpeakerData
// new Concept (end)
}
@@ -591,12 +591,12 @@ Abstract::~Abstract()
{
}
-bool Abstract::setValue( unsigned int index, QVariant data )
+bool Abstract::setValue( unsigned int index, TQVariant data )
{
if ( index<1 || index > m_valueList.count() )
return false;
- QValueList<QVariant>::Iterator it = m_valueList.at(index);
+ TQValueList<TQVariant>::Iterator it = m_valueList.at(index);
switch (index){
case KSayItGlobal::ISEDITABLE:
*it = data;
@@ -607,12 +607,12 @@ bool Abstract::setValue( unsigned int index, QVariant data )
return true;
}
-QVariant Abstract::getValue( unsigned int index ) const
+TQVariant Abstract::getValue( unsigned int index ) const
{
if ( index > m_valueList.count() )
- return QVariant(); // a invalid QVariant
+ return TQVariant(); // a invalid QVariant
- QVariant data;
+ TQVariant data;
data = m_valueList[index];
return data;
@@ -622,23 +622,23 @@ QVariant Abstract::getValue( unsigned int index ) const
/**
* Para
*/
-Para::Para(ListViewInterface *parent, ListViewInterface *after, QString label)
+Para::Para(ListViewInterface *parent, ListViewInterface *after, TQString label)
: ListViewInterface(parent, after, label)
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small);
this->setPixmap(0, pixmap);
// new Concept (begin)
m_valueList.clear();
- m_valueList.append( QString("Para") ); // XmlContextName
+ m_valueList.append( TQString("Para") ); // XmlContextName
m_valueList.append( (bool)false ); // isEditable
m_valueList.append( (int)-1 ); // MaxLines
- m_valueList.append(QString::null); // Summary
- m_valueList.append(QString::null); // RawData
- m_valueList.append(QString::null); // RTFHeader
- m_valueList.append(QString::null); // RTFData
+ 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(i18n("Paragraph") + "\n"); // SpeakerHeader
- m_valueList.append(QString::null); // SpeakerData
+ m_valueList.append(TQString::null); // SpeakerData
// new Concept (end)
}
@@ -646,13 +646,13 @@ Para::~Para()
{
}
-bool Para::setValue( unsigned int index, QVariant data )
+bool Para::setValue( unsigned int index, TQVariant data )
{
if ( index<1 || index > m_valueList.count() )
return false;
- QValueList<QVariant>::Iterator it = m_valueList.at(index);
- QString sData = QString::null;
+ TQValueList<TQVariant>::Iterator it = m_valueList.at(index);
+ TQString sData = TQString::null;
ParaSaxParser *p = ParaSaxParser::Instance();
switch (index){
case KSayItGlobal::ISEDITABLE:
@@ -681,12 +681,12 @@ bool Para::setValue( unsigned int index, QVariant data )
return true;
}
-QVariant Para::getValue( unsigned int index ) const
+TQVariant Para::getValue( unsigned int index ) const
{
if ( index > m_valueList.count() )
- return QVariant(); // a invalid QVariant
+ return TQVariant(); // a invalid QVariant
- QVariant data;
+ TQVariant data;
data = m_valueList[index];
return data;
@@ -696,23 +696,23 @@ QVariant Para::getValue( unsigned int index ) const
/**
* Chapter
*/
-Chapter::Chapter(ListViewInterface *parent, ListViewInterface *after, QString label)
+Chapter::Chapter(ListViewInterface *parent, ListViewInterface *after, TQString label)
: ListViewInterface(parent, after, label)
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small);
this->setPixmap(0, pixmap);
// new Concept (begin)
m_valueList.clear();
- m_valueList.append( QString("Chapter") ); // XmlContextName
+ m_valueList.append( TQString("Chapter") ); // XmlContextName
m_valueList.append( (bool)false ); // isEditable
m_valueList.append( (int)0 ); // MaxLines
- m_valueList.append(QString::null); // Summary
- m_valueList.append(QString::null); // RawData
- m_valueList.append(QString::null); // RTFHeader
- m_valueList.append(QString::null); // RTFData
- m_valueList.append(QString::null); // SpeakerHeader
- m_valueList.append(QString::null); // SpeakerData
+ 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
// new Concept (end)
}
@@ -720,12 +720,12 @@ Chapter::~Chapter()
{
}
-bool Chapter::setValue( unsigned int index, QVariant data )
+bool Chapter::setValue( unsigned int index, TQVariant data )
{
if ( index<1 || index > m_valueList.count() )
return false;
- QValueList<QVariant>::Iterator it = m_valueList.at(index);
+ TQValueList<TQVariant>::Iterator it = m_valueList.at(index);
switch (index){
case KSayItGlobal::ISEDITABLE:
*it = data;
@@ -742,12 +742,12 @@ bool Chapter::setValue( unsigned int index, QVariant data )
return true;
}
-QVariant Chapter::getValue( unsigned int index ) const
+TQVariant Chapter::getValue( unsigned int index ) const
{
if ( index > m_valueList.count() )
- return QVariant(); // a invalid QVariant
+ return TQVariant(); // a invalid QVariant
- QVariant data;
+ TQVariant data;
data = m_valueList[index];
return data;
@@ -757,23 +757,23 @@ QVariant Chapter::getValue( unsigned int index ) const
/**
* Sect1
*/
-Sect1::Sect1(ListViewInterface *parent, ListViewInterface *after, QString label)
+Sect1::Sect1(ListViewInterface *parent, ListViewInterface *after, TQString label)
: ListViewInterface(parent, after, label)
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small);
this->setPixmap(0, pixmap);
// new Concept (begin)
m_valueList.clear();
- m_valueList.append( QString("Sect1") ); // XmlContextName
+ m_valueList.append( TQString("Sect1") ); // XmlContextName
m_valueList.append( (bool)false ); // isEditable
m_valueList.append( (int)0 ); // MaxLines
- m_valueList.append(QString::null); // Summary
- m_valueList.append(QString::null); // RawData
- m_valueList.append(QString::null); // RTFHeader
- m_valueList.append(QString::null); // RTFData
- m_valueList.append(QString::null); // SpeakerHeader
- m_valueList.append(QString::null); // SpeakerData
+ 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
// new Concept (end)
}
@@ -781,12 +781,12 @@ Sect1::~Sect1()
{
}
-bool Sect1::setValue( unsigned int index, QVariant data )
+bool Sect1::setValue( unsigned int index, TQVariant data )
{
if ( index<1 || index > m_valueList.count() )
return false;
- QValueList<QVariant>::Iterator it = m_valueList.at(index);
+ TQValueList<TQVariant>::Iterator it = m_valueList.at(index);
switch (index){
case KSayItGlobal::ISEDITABLE:
*it = data;
@@ -803,12 +803,12 @@ bool Sect1::setValue( unsigned int index, QVariant data )
return true;
}
-QVariant Sect1::getValue( unsigned int index ) const
+TQVariant Sect1::getValue( unsigned int index ) const
{
if ( index > m_valueList.count() )
- return QVariant(); // a invalid QVariant
+ return TQVariant(); // a invalid QVariant
- QVariant data;
+ TQVariant data;
data = m_valueList[index];
return data;
@@ -817,23 +817,23 @@ QVariant Sect1::getValue( unsigned int index ) const
/**
* Sect2
*/
-Sect2::Sect2(ListViewInterface *parent, ListViewInterface *after, QString label)
+Sect2::Sect2(ListViewInterface *parent, ListViewInterface *after, TQString label)
: ListViewInterface(parent, after, label)
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small);
this->setPixmap(0, pixmap);
// new Concept (begin)
m_valueList.clear();
- m_valueList.append( QString("Sect2") ); // XmlContextName
+ m_valueList.append( TQString("Sect2") ); // XmlContextName
m_valueList.append( (bool)false ); // isEditable
m_valueList.append( (int)0 ); // MaxLines
- m_valueList.append(QString::null); // Summary
- m_valueList.append(QString::null); // RawData
- m_valueList.append(QString::null); // RTFHeader
- m_valueList.append(QString::null); // RTFData
- m_valueList.append(QString::null); // SpeakerHeader
- m_valueList.append(QString::null); // SpeakerData
+ 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
// new Concept (end)
}
@@ -841,12 +841,12 @@ Sect2::~Sect2()
{
}
-bool Sect2::setValue( unsigned int index, QVariant data )
+bool Sect2::setValue( unsigned int index, TQVariant data )
{
if ( index<1 || index > m_valueList.count() )
return false;
- QValueList<QVariant>::Iterator it = m_valueList.at(index);
+ TQValueList<TQVariant>::Iterator it = m_valueList.at(index);
switch (index){
case KSayItGlobal::ISEDITABLE:
*it = data;
@@ -863,12 +863,12 @@ bool Sect2::setValue( unsigned int index, QVariant data )
return true;
}
-QVariant Sect2::getValue( unsigned int index ) const
+TQVariant Sect2::getValue( unsigned int index ) const
{
if ( index > m_valueList.count() )
- return QVariant(); // a invalid QVariant
+ return TQVariant(); // a invalid QVariant
- QVariant data;
+ TQVariant data;
data = m_valueList[index];
return data;
@@ -877,23 +877,23 @@ QVariant Sect2::getValue( unsigned int index ) const
/**
* Sect3
*/
-Sect3::Sect3(ListViewInterface *parent, ListViewInterface *after, QString label)
+Sect3::Sect3(ListViewInterface *parent, ListViewInterface *after, TQString label)
: ListViewInterface(parent, after, label)
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small);
this->setPixmap(0, pixmap);
// new Concept (begin)
m_valueList.clear();
- m_valueList.append( QString("Sect3") ); // XmlContextName
+ m_valueList.append( TQString("Sect3") ); // XmlContextName
m_valueList.append( (bool)false ); // isEditable
m_valueList.append( (int)0 ); // MaxLines
- m_valueList.append(QString::null); // Summary
- m_valueList.append(QString::null); // RawData
- m_valueList.append(QString::null); // RTFHeader
- m_valueList.append(QString::null); // RTFData
- m_valueList.append(QString::null); // SpeakerHeader
- m_valueList.append(QString::null); // SpeakerData
+ 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
// new Concept (end)
}
@@ -901,12 +901,12 @@ Sect3::~Sect3()
{
}
-bool Sect3::setValue( unsigned int index, QVariant data )
+bool Sect3::setValue( unsigned int index, TQVariant data )
{
if ( index<1 || index > m_valueList.count() )
return false;
- QValueList<QVariant>::Iterator it = m_valueList.at(index);
+ TQValueList<TQVariant>::Iterator it = m_valueList.at(index);
switch (index){
case KSayItGlobal::ISEDITABLE:
*it = data;
@@ -923,12 +923,12 @@ bool Sect3::setValue( unsigned int index, QVariant data )
return true;
}
-QVariant Sect3::getValue( unsigned int index ) const
+TQVariant Sect3::getValue( unsigned int index ) const
{
if ( index > m_valueList.count() )
- return QVariant(); // a invalid QVariant
+ return TQVariant(); // a invalid QVariant
- QVariant data;
+ TQVariant data;
data = m_valueList[index];
return data;
@@ -937,23 +937,23 @@ QVariant Sect3::getValue( unsigned int index ) const
/**
* Sect4
*/
-Sect4::Sect4(ListViewInterface *parent, ListViewInterface *after, QString label)
+Sect4::Sect4(ListViewInterface *parent, ListViewInterface *after, TQString label)
: ListViewInterface(parent, after, label)
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small);
this->setPixmap(0, pixmap);
// new Concept (begin)
m_valueList.clear();
- m_valueList.append( QString("Sect4") ); // XmlContextName
+ m_valueList.append( TQString("Sect4") ); // XmlContextName
m_valueList.append( (bool)false ); // isEditable
m_valueList.append( (int)0 ); // MaxLines
- m_valueList.append(QString::null); // Summary
- m_valueList.append(QString::null); // RawData
- m_valueList.append(QString::null); // RTFHeader
- m_valueList.append(QString::null); // RTFData
- m_valueList.append(QString::null); // SpeakerHeader
- m_valueList.append(QString::null); // SpeakerData
+ 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
// new Concept (end)
}
@@ -961,12 +961,12 @@ Sect4::~Sect4()
{
}
-bool Sect4::setValue( unsigned int index, QVariant data )
+bool Sect4::setValue( unsigned int index, TQVariant data )
{
if ( index<1 || index > m_valueList.count() )
return false;
- QValueList<QVariant>::Iterator it = m_valueList.at(index);
+ TQValueList<TQVariant>::Iterator it = m_valueList.at(index);
switch (index){
case KSayItGlobal::ISEDITABLE:
*it = data;
@@ -983,12 +983,12 @@ bool Sect4::setValue( unsigned int index, QVariant data )
return true;
}
-QVariant Sect4::getValue( unsigned int index ) const
+TQVariant Sect4::getValue( unsigned int index ) const
{
if ( index > m_valueList.count() )
- return QVariant(); // a invalid QVariant
+ return TQVariant(); // a invalid QVariant
- QVariant data;
+ TQVariant data;
data = m_valueList[index];
return data;
@@ -997,23 +997,23 @@ QVariant Sect4::getValue( unsigned int index ) const
/**
* Sect5
*/
-Sect5::Sect5(ListViewInterface *parent, ListViewInterface *after, QString label)
+Sect5::Sect5(ListViewInterface *parent, ListViewInterface *after, TQString label)
: ListViewInterface(parent, after, label)
{
- QPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small);
+ TQPixmap pixmap = KGlobal::iconLoader()->loadIcon("leftjust", KIcon::Small);
this->setPixmap(0, pixmap);
// new Concept (begin)
m_valueList.clear();
- m_valueList.append( QString("Sect5") ); // XmlContextName
+ m_valueList.append( TQString("Sect5") ); // XmlContextName
m_valueList.append( (bool)false ); // isEditable
m_valueList.append( (int)0 ); // MaxLines
- m_valueList.append(QString::null); // Summary
- m_valueList.append(QString::null); // RawData
- m_valueList.append(QString::null); // RTFHeader
- m_valueList.append(QString::null); // RTFData
- m_valueList.append(QString::null); // SpeakerHeader
- m_valueList.append(QString::null); // SpeakerData
+ 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
// new Concept (end)
}
@@ -1021,12 +1021,12 @@ Sect5::~Sect5()
{
}
-bool Sect5::setValue( unsigned int index, QVariant data )
+bool Sect5::setValue( unsigned int index, TQVariant data )
{
if ( index<1 || index > m_valueList.count() )
return false;
- QValueList<QVariant>::Iterator it = m_valueList.at(index);
+ TQValueList<TQVariant>::Iterator it = m_valueList.at(index);
switch (index){
case KSayItGlobal::ISEDITABLE:
*it = data;
@@ -1043,12 +1043,12 @@ bool Sect5::setValue( unsigned int index, QVariant data )
return true;
}
-QVariant Sect5::getValue( unsigned int index ) const
+TQVariant Sect5::getValue( unsigned int index ) const
{
if ( index > m_valueList.count() )
- return QVariant(); // a invalid QVariant
+ return TQVariant(); // a invalid QVariant
- QVariant data;
+ TQVariant data;
data = m_valueList[index];
return data;
diff --git a/ksayit/src/docbookclasses.h b/ksayit/src/docbookclasses.h
index a7f84af..30da84c 100644
--- a/ksayit/src/docbookclasses.h
+++ b/ksayit/src/docbookclasses.h
@@ -13,10 +13,10 @@
#define DOCBOOKCLASSES_H
// Qt includes
-#include <qstring.h>
+#include <tqstring.h>
-#include <qvariant.h>
-#include <qvaluelist.h>
+#include <tqvariant.h>
+#include <tqvaluelist.h>
// KDE includes
#include <klistview.h>
@@ -32,7 +32,7 @@ class QStringList;
//
/**
Represents the root item of the document, therefore it expects
- a \p QListView object as parent.\n
+ a \p TQListView object as parent.\n
Structural item only (no references to a DOM node).
@author Robert Vogl
*/
@@ -45,14 +45,14 @@ public:
* \param label The label is shown in column 0 of the TreeView and is also
* used as bookmark title.
*/
- RobDocument(KListView *lv=0, QString label=QString::null);
+ RobDocument(KListView *lv=0, TQString label=TQString::null);
~RobDocument();
- bool setValue( unsigned int index, QVariant data );
- QVariant getValue( unsigned int index ) const;
+ bool setValue( unsigned int index, TQVariant data );
+ TQVariant getValue( unsigned int index ) const;
private:
- QValueList<QVariant> m_valueList;
+ TQValueList<TQVariant> m_valueList;
};
@@ -67,14 +67,14 @@ private:
class Overview : public ListViewInterface
{
public:
- Overview(ListViewInterface *parent=0, ListViewInterface *after=0, QString label=QString::null);
+ Overview(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null);
~Overview();
- bool setValue( unsigned int index, QVariant data );
- QVariant getValue( unsigned int index ) const;
+ bool setValue( unsigned int index, TQVariant data );
+ TQVariant getValue( unsigned int index ) const;
private:
- QValueList<QVariant> m_valueList;
+ TQValueList<TQVariant> m_valueList;
};
@@ -85,15 +85,15 @@ private:
class Date : public ListViewInterface
{
public:
- Date(ListViewInterface *parent=0, ListViewInterface *after=0, QString label=QString::null);
+ Date(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null);
~Date();
- bool setValue( unsigned int index, QVariant data );
- QVariant getValue( unsigned int index ) const;
+ bool setValue( unsigned int index, TQVariant data );
+ TQVariant getValue( unsigned int index ) const;
private:
// Pointer to the associated Data
- QValueList<QVariant> m_valueList;
+ TQValueList<TQVariant> m_valueList;
};
@@ -104,15 +104,15 @@ private:
class ReleaseInfo : public ListViewInterface
{
public:
- ReleaseInfo(ListViewInterface *parent=0, ListViewInterface *after=0, QString label=QString::null);
+ ReleaseInfo(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null);
~ReleaseInfo();
- bool setValue( unsigned int index, QVariant data );
- QVariant getValue( unsigned int index ) const;
+ bool setValue( unsigned int index, TQVariant data );
+ TQVariant getValue( unsigned int index ) const;
private:
// Pointer to the associated Data
- QValueList<QVariant> m_valueList;
+ TQValueList<TQVariant> m_valueList;
};
@@ -124,14 +124,14 @@ private:
class AuthorGroup : public ListViewInterface
{
public:
- AuthorGroup(ListViewInterface *parent=0, ListViewInterface *after=0, QString label=QString::null);
+ AuthorGroup(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null);
~AuthorGroup();
- bool setValue( unsigned int index, QVariant data );
- QVariant getValue( unsigned int index ) const;
+ bool setValue( unsigned int index, TQVariant data );
+ TQVariant getValue( unsigned int index ) const;
private:
- QValueList<QVariant> m_valueList;
+ TQValueList<TQVariant> m_valueList;
};
@@ -143,14 +143,14 @@ private:
class Author : public ListViewInterface
{
public:
- Author(ListViewInterface *parent=0, ListViewInterface *after=0, QString label=QString::null);
+ Author(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null);
~Author();
- bool setValue( unsigned int index, QVariant data );
- QVariant getValue( unsigned int index ) const;
+ bool setValue( unsigned int index, TQVariant data );
+ TQVariant getValue( unsigned int index ) const;
private:
- QValueList<QVariant> m_valueList;
+ TQValueList<TQVariant> m_valueList;
};
@@ -162,14 +162,14 @@ private:
class KeywordSet : public ListViewInterface
{
public:
- KeywordSet(ListViewInterface *parent=0, ListViewInterface *after=0, QString label=QString::null);
+ KeywordSet(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null);
~KeywordSet();
- bool setValue( unsigned int index, QVariant data );
- QVariant getValue( unsigned int index ) const;
+ bool setValue( unsigned int index, TQVariant data );
+ TQVariant getValue( unsigned int index ) const;
private:
- QValueList<QVariant> m_valueList;
+ TQValueList<TQVariant> m_valueList;
};
@@ -180,14 +180,14 @@ private:
class Keyword : public ListViewInterface
{
public:
- Keyword(ListViewInterface *parent=0, ListViewInterface *after=0, QString label=QString::null);
+ Keyword(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null);
~Keyword();
- bool setValue( unsigned int index, QVariant data );
- QVariant getValue( unsigned int index ) const;
+ bool setValue( unsigned int index, TQVariant data );
+ TQVariant getValue( unsigned int index ) const;
private:
- QValueList<QVariant> m_valueList;
+ TQValueList<TQVariant> m_valueList;
};
@@ -199,14 +199,14 @@ private:
class Abstract : public ListViewInterface
{
public:
- Abstract(ListViewInterface *parent=0, ListViewInterface *after=0, QString label=QString::null);
+ Abstract(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null);
~Abstract();
- bool setValue( unsigned int index, QVariant data );
- QVariant getValue( unsigned int index ) const;
+ bool setValue( unsigned int index, TQVariant data );
+ TQVariant getValue( unsigned int index ) const;
private:
- QValueList<QVariant> m_valueList;
+ TQValueList<TQVariant> m_valueList;
};
@@ -217,14 +217,14 @@ private:
class Para : public ListViewInterface
{
public:
- Para(ListViewInterface *parent=0, ListViewInterface *after=0, QString label=QString::null);
+ Para(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null);
~Para();
- bool setValue( unsigned int index, QVariant data );
- QVariant getValue( unsigned int index ) const;
+ bool setValue( unsigned int index, TQVariant data );
+ TQVariant getValue( unsigned int index ) const;
private:
- QValueList<QVariant> m_valueList;
+ TQValueList<TQVariant> m_valueList;
};
@@ -236,14 +236,14 @@ private:
class Chapter : public ListViewInterface
{
public:
- Chapter(ListViewInterface *parent=0, ListViewInterface *after=0, QString label=QString::null);
+ Chapter(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null);
~Chapter();
- bool setValue( unsigned int index, QVariant data );
- QVariant getValue( unsigned int index ) const;
+ bool setValue( unsigned int index, TQVariant data );
+ TQVariant getValue( unsigned int index ) const;
private:
- QValueList<QVariant> m_valueList;
+ TQValueList<TQVariant> m_valueList;
};
@@ -255,14 +255,14 @@ private:
class Sect1 : public ListViewInterface
{
public:
- Sect1(ListViewInterface *parent=0, ListViewInterface *after=0, QString label=QString::null);
+ Sect1(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null);
~Sect1();
- bool setValue( unsigned int index, QVariant data );
- QVariant getValue( unsigned int index ) const;
+ bool setValue( unsigned int index, TQVariant data );
+ TQVariant getValue( unsigned int index ) const;
private:
- QValueList<QVariant> m_valueList;
+ TQValueList<TQVariant> m_valueList;
};
@@ -274,14 +274,14 @@ private:
class Sect2 : public ListViewInterface
{
public:
- Sect2(ListViewInterface *parent=0, ListViewInterface *after=0, QString label=QString::null);
+ Sect2(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null);
~Sect2();
- bool setValue( unsigned int index, QVariant data );
- QVariant getValue( unsigned int index ) const;
+ bool setValue( unsigned int index, TQVariant data );
+ TQVariant getValue( unsigned int index ) const;
private:
- QValueList<QVariant> m_valueList;
+ TQValueList<TQVariant> m_valueList;
};
@@ -293,14 +293,14 @@ private:
class Sect3 : public ListViewInterface
{
public:
- Sect3(ListViewInterface *parent=0, ListViewInterface *after=0, QString label=QString::null);
+ Sect3(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null);
~Sect3();
- bool setValue( unsigned int index, QVariant data );
- QVariant getValue( unsigned int index ) const;
+ bool setValue( unsigned int index, TQVariant data );
+ TQVariant getValue( unsigned int index ) const;
private:
- QValueList<QVariant> m_valueList;
+ TQValueList<TQVariant> m_valueList;
};
@@ -312,14 +312,14 @@ private:
class Sect4 : public ListViewInterface
{
public:
- Sect4(ListViewInterface *parent=0, ListViewInterface *after=0, QString label=QString::null);
+ Sect4(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null);
~Sect4();
- bool setValue( unsigned int index, QVariant data );
- QVariant getValue( unsigned int index ) const;
+ bool setValue( unsigned int index, TQVariant data );
+ TQVariant getValue( unsigned int index ) const;
private:
- QValueList<QVariant> m_valueList;
+ TQValueList<TQVariant> m_valueList;
};
@@ -331,14 +331,14 @@ private:
class Sect5 : public ListViewInterface
{
public:
- Sect5(ListViewInterface *parent=0, ListViewInterface *after=0, QString label=QString::null);
+ Sect5(ListViewInterface *parent=0, ListViewInterface *after=0, TQString label=TQString::null);
~Sect5();
- bool setValue( unsigned int index, QVariant data );
- QVariant getValue( unsigned int index ) const;
+ bool setValue( unsigned int index, TQVariant data );
+ TQVariant getValue( unsigned int index ) const;
private:
- QValueList<QVariant> m_valueList;
+ TQValueList<TQVariant> m_valueList;
};
#endif
diff --git a/ksayit/src/docbookgenerator.cpp b/ksayit/src/docbookgenerator.cpp
index 1d6db9c..4b792b2 100644
--- a/ksayit/src/docbookgenerator.cpp
+++ b/ksayit/src/docbookgenerator.cpp
@@ -11,8 +11,8 @@
//
// Qt includes
-#include <qstring.h>
-#include <qvariant.h>
+#include <tqstring.h>
+#include <tqvariant.h>
//KDE includes
#include <kdebug.h>
@@ -33,11 +33,11 @@ DocbookGenerator::~DocbookGenerator()
}
-void DocbookGenerator::writeBook(QTextStream &doc, ListViewInterface *item)
+void DocbookGenerator::writeBook(TQTextStream &doc, ListViewInterface *item)
{
kdDebug(100200) << "DocTreeViewImpl::writeBook()" << endl;
// read item's content
- QString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
+ TQString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( whoAmI != "RobDocument" )
return;
@@ -46,7 +46,7 @@ void DocbookGenerator::writeBook(QTextStream &doc, ListViewInterface *item)
// process childs
ListViewInterface *i = static_cast<ListViewInterface*>(item->firstChild());
- QString itemType;
+ TQString itemType;
while( i ){
itemType = (i->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( itemType == "BookInfo" ){
@@ -61,11 +61,11 @@ void DocbookGenerator::writeBook(QTextStream &doc, ListViewInterface *item)
}
-void DocbookGenerator::writeBookInfo(QTextStream &doc, ListViewInterface *item)
+void DocbookGenerator::writeBookInfo(TQTextStream &doc, ListViewInterface *item)
{
kdDebug(100200) << "DocTreeViewImpl::writeBookInfo()" << endl;
// read item's content
- QString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
+ TQString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( whoAmI != "BookInfo" )
return;
@@ -75,7 +75,7 @@ void DocbookGenerator::writeBookInfo(QTextStream &doc, ListViewInterface *item)
// process childs
ListViewInterface *i = static_cast<ListViewInterface*>(item->firstChild());
- QString itemType;
+ TQString itemType;
while( i ){
itemType = (i->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( itemType == "KeywordSet" ){
@@ -97,18 +97,18 @@ void DocbookGenerator::writeBookInfo(QTextStream &doc, ListViewInterface *item)
}
-void DocbookGenerator::writeTitleOfBook(QTextStream &doc, ListViewInterface *item)
+void DocbookGenerator::writeTitleOfBook(TQTextStream &doc, ListViewInterface *item)
{
kdDebug(100200) << "DocTreeViewImpl::writeTitle()" << endl;
// read item's content
- QString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
+ TQString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( whoAmI != "BookInfo" )
return;
// Documents title is stored in root element (parent of BookInfo)
ListViewInterface *parent = static_cast<ListViewInterface*>(item->parent());
if ( parent ){
- QString title = parent->text(0);
+ TQString title = parent->text(0);
// add node to document
doc << "<Title>" << title << "</Title>" << endl;
@@ -116,11 +116,11 @@ void DocbookGenerator::writeTitleOfBook(QTextStream &doc, ListViewInterface *ite
}
-void DocbookGenerator::writeAuthorGroup(QTextStream &doc, ListViewInterface *item)
+void DocbookGenerator::writeAuthorGroup(TQTextStream &doc, ListViewInterface *item)
{
kdDebug(100200) << "DocTreeViewImpl::writeAuthorGroup()" << endl;
// read item's content
- QString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
+ TQString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( whoAmI != "AuthorGroup" )
return;
@@ -129,7 +129,7 @@ void DocbookGenerator::writeAuthorGroup(QTextStream &doc, ListViewInterface *ite
// process childs
ListViewInterface *i = static_cast<ListViewInterface*>(item->firstChild());
- QString itemType;
+ TQString itemType;
while( i ){
itemType = (i->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( itemType == "Author" ){
@@ -143,15 +143,15 @@ void DocbookGenerator::writeAuthorGroup(QTextStream &doc, ListViewInterface *ite
}
-void DocbookGenerator::writeAuthor(QTextStream &doc, ListViewInterface *item)
+void DocbookGenerator::writeAuthor(TQTextStream &doc, ListViewInterface *item)
{
kdDebug(100200) << "DocTreeViewImpl::writeAuthor()" << endl;
// read item's content
- QString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
+ TQString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( whoAmI != "Author" )
return;
- QString author = QString::null;
+ TQString author = TQString::null;
author = ( item->getValue(KSayItGlobal::RAWDATA) ).toString();
// add node to document
@@ -165,41 +165,41 @@ void DocbookGenerator::writeAuthor(QTextStream &doc, ListViewInterface *item)
}
-void DocbookGenerator::writeDate(QTextStream &doc, ListViewInterface *item)
+void DocbookGenerator::writeDate(TQTextStream &doc, ListViewInterface *item)
{
kdDebug(100200) << "DocTreeViewImpl::writeDate()" << endl;
// read item's content
- QString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
+ TQString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( whoAmI != "Date" )
return;
- QString date = item->text(1);
+ TQString date = item->text(1);
// add node to document
doc << "<Date>" << date << "</Date>" << endl;
}
-void DocbookGenerator::writeReleaseInfo(QTextStream &doc, ListViewInterface *item)
+void DocbookGenerator::writeReleaseInfo(TQTextStream &doc, ListViewInterface *item)
{
kdDebug(100200) << "DocTreeViewImpl::writeReleaseInfo()" << endl;
// read item's content
- QString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
+ TQString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( whoAmI != "ReleaseInfo" )
return;
- QString releaseinfo = item->text(1);
+ TQString releaseinfo = item->text(1);
// add node to document
doc << "<ReleaseInfo>" << releaseinfo << "</ReleaseInfo>" << endl;
}
-void DocbookGenerator::writeKeywordSet(QTextStream &doc, ListViewInterface *item)
+void DocbookGenerator::writeKeywordSet(TQTextStream &doc, ListViewInterface *item)
{
kdDebug(100200) << "DocTreeViewImpl::writeKeywordSet()" << endl;
// read item's content
- QString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
+ TQString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( whoAmI != "KeywordSet" )
return;
@@ -208,7 +208,7 @@ void DocbookGenerator::writeKeywordSet(QTextStream &doc, ListViewInterface *item
// process childs
ListViewInterface *i = static_cast<ListViewInterface*>(item->firstChild());
- QString itemType;
+ TQString itemType;
while( i ){
itemType = ( i->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( itemType == "Keyword" ){
@@ -222,16 +222,16 @@ void DocbookGenerator::writeKeywordSet(QTextStream &doc, ListViewInterface *item
}
-void DocbookGenerator::writeKeyword(QTextStream &doc, ListViewInterface *item)
+void DocbookGenerator::writeKeyword(TQTextStream &doc, ListViewInterface *item)
{
kdDebug(100200) << "DocTreeViewImpl::writeKeyword()" << endl;
// read item's content
- QString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
+ TQString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( whoAmI != "Keyword" )
return;
- // QString keyword = item->text( 0 );
- QString keyword = QString::null;
+ // TQString keyword = item->text( 0 );
+ TQString keyword = TQString::null;
keyword = (item->getValue(3)).toString();
// add node to document
@@ -242,11 +242,11 @@ void DocbookGenerator::writeKeyword(QTextStream &doc, ListViewInterface *item)
}
-void DocbookGenerator::writeAbstract(QTextStream &doc, ListViewInterface *item)
+void DocbookGenerator::writeAbstract(TQTextStream &doc, ListViewInterface *item)
{
kdDebug(100200) << "DocTreeViewImpl::writeAbstract()" << endl;
// read item's content
- QString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
+ TQString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( whoAmI != "Abstract" )
return;
@@ -255,7 +255,7 @@ void DocbookGenerator::writeAbstract(QTextStream &doc, ListViewInterface *item)
// process childs
ListViewInterface *i = static_cast<ListViewInterface*>(item->firstChild());
- QString itemType;
+ TQString itemType;
while( i ){
itemType = (i->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( itemType == "Para" ){
@@ -269,15 +269,15 @@ void DocbookGenerator::writeAbstract(QTextStream &doc, ListViewInterface *item)
}
-void DocbookGenerator::writeChapter( QTextStream &doc, ListViewInterface *item)
+void DocbookGenerator::writeChapter( TQTextStream &doc, ListViewInterface *item)
{
kdDebug(100200) << "DocTreeViewImpl::writeChapter()" << endl;
// read item's content
- QString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
+ TQString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( whoAmI != "Chapter" )
return;
- QString title = item->text(0);
+ TQString title = item->text(0);
// add node to document
doc << "<Chapter>" << endl;
@@ -285,7 +285,7 @@ void DocbookGenerator::writeChapter( QTextStream &doc, ListViewInterface *item)
// process childs
ListViewInterface *i = static_cast<ListViewInterface*>(item->firstChild());
- QString itemType;
+ TQString itemType;
while( i ){
itemType = (i->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( itemType == "Para" ){
@@ -301,15 +301,15 @@ void DocbookGenerator::writeChapter( QTextStream &doc, ListViewInterface *item)
}
-void DocbookGenerator::writeSect1(QTextStream &doc, ListViewInterface *item)
+void DocbookGenerator::writeSect1(TQTextStream &doc, ListViewInterface *item)
{
kdDebug(100200) << "DocTreeViewImpl::writeSect1()" << endl;
// read item's content
- QString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
+ TQString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( whoAmI != "Sect1" )
return;
- QString title = item->text(0);
+ TQString title = item->text(0);
// add node to document
doc << "<Sect1>" << endl;
@@ -317,7 +317,7 @@ void DocbookGenerator::writeSect1(QTextStream &doc, ListViewInterface *item)
// process childs
ListViewInterface *i = static_cast<ListViewInterface*>(item->firstChild());
- QString itemType;
+ TQString itemType;
while( i ){
itemType = (i->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( itemType == "Para" ){
@@ -333,15 +333,15 @@ void DocbookGenerator::writeSect1(QTextStream &doc, ListViewInterface *item)
}
-void DocbookGenerator::writeSect2(QTextStream &doc, ListViewInterface *item)
+void DocbookGenerator::writeSect2(TQTextStream &doc, ListViewInterface *item)
{
kdDebug(100200) << "DocTreeViewImpl::writeSect1()" << endl;
// read item's content
- QString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
+ TQString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( whoAmI != "Sect2" )
return;
- QString title = item->text(0);
+ TQString title = item->text(0);
// add node to document
doc << "<Sect2>" << endl;
@@ -349,7 +349,7 @@ void DocbookGenerator::writeSect2(QTextStream &doc, ListViewInterface *item)
// process childs
ListViewInterface *i = static_cast<ListViewInterface*>(item->firstChild());
- QString itemType;
+ TQString itemType;
while( i ){
itemType = ( i->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( itemType == "Para" ){
@@ -365,15 +365,15 @@ void DocbookGenerator::writeSect2(QTextStream &doc, ListViewInterface *item)
}
-void DocbookGenerator::writeSect3(QTextStream &doc, ListViewInterface *item)
+void DocbookGenerator::writeSect3(TQTextStream &doc, ListViewInterface *item)
{
kdDebug(100200) << "DocTreeViewImpl::writeSect3()" << endl;
// read item's content
- QString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
+ TQString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( whoAmI != "Sect3" )
return;
- QString title = item->text(0);
+ TQString title = item->text(0);
// add node to document
doc << "<Sect3>" << endl;
@@ -381,7 +381,7 @@ void DocbookGenerator::writeSect3(QTextStream &doc, ListViewInterface *item)
// process childs
ListViewInterface *i = static_cast<ListViewInterface*>(item->firstChild());
- QString itemType;
+ TQString itemType;
while( i ){
itemType = (i->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( itemType == "Para" ){
@@ -397,15 +397,15 @@ void DocbookGenerator::writeSect3(QTextStream &doc, ListViewInterface *item)
}
-void DocbookGenerator::writeSect4(QTextStream &doc, ListViewInterface *item)
+void DocbookGenerator::writeSect4(TQTextStream &doc, ListViewInterface *item)
{
kdDebug(100200) << "DocTreeViewImpl::writeSect4()" << endl;
// read item's content
- QString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
+ TQString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( whoAmI != "Sect4" )
return;
- QString title = item->text(0);
+ TQString title = item->text(0);
// add node to document
doc << "<Sect4>" << endl;
@@ -413,7 +413,7 @@ void DocbookGenerator::writeSect4(QTextStream &doc, ListViewInterface *item)
// process childs
ListViewInterface *i = static_cast<ListViewInterface*>(item->firstChild());
- QString itemType;
+ TQString itemType;
while( i ){
itemType = (i->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( itemType == "Para" ){
@@ -429,15 +429,15 @@ void DocbookGenerator::writeSect4(QTextStream &doc, ListViewInterface *item)
}
-void DocbookGenerator::writeSect5(QTextStream &doc, ListViewInterface *item)
+void DocbookGenerator::writeSect5(TQTextStream &doc, ListViewInterface *item)
{
kdDebug(100200) << "DocTreeViewImpl::writeSect5()" << endl;
// read item's content
- QString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
+ TQString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( whoAmI != "Sect5" )
return;
- QString title = item->text(0);
+ TQString title = item->text(0);
// add node to document
doc << "<Sect5>" << endl;
@@ -445,7 +445,7 @@ void DocbookGenerator::writeSect5(QTextStream &doc, ListViewInterface *item)
// process childs
ListViewInterface *i = static_cast<ListViewInterface*>(item->firstChild());
- QString itemType;
+ TQString itemType;
while( i ){
itemType = (i->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( itemType == "Para" ){
@@ -459,15 +459,15 @@ void DocbookGenerator::writeSect5(QTextStream &doc, ListViewInterface *item)
}
-void DocbookGenerator::writePara(QTextStream &doc, ListViewInterface *item)
+void DocbookGenerator::writePara(TQTextStream &doc, ListViewInterface *item)
{
kdDebug(100200) << "DocTreeViewImpl::writePara()" << endl;
// read item's content
- QString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
+ TQString whoAmI = (item->getValue(KSayItGlobal::XMLCONTEXTNAME)).toString();
if ( whoAmI != "Para" )
return;
- QString data = ( item->getValue(KSayItGlobal::RAWDATA) ).toString();
+ TQString data = ( item->getValue(KSayItGlobal::RAWDATA) ).toString();
// add node to document
doc << "<Para>" << endl;
diff --git a/ksayit/src/docbookgenerator.h b/ksayit/src/docbookgenerator.h
index 80f526b..b5fb251 100644
--- a/ksayit/src/docbookgenerator.h
+++ b/ksayit/src/docbookgenerator.h
@@ -13,7 +13,7 @@
#define DOCBOOKGENERATOR_H
// Qt includes
-#include <qtextstream.h>
+#include <tqtextstream.h>
// KDE includes
@@ -36,26 +36,26 @@ public:
* \param item A pointer to the root item of the tree. Must be of type
* \p RobDocument.
*/
- void writeBook(QTextStream &doc, ListViewInterface *item);
+ void writeBook(TQTextStream &doc, ListViewInterface *item);
private:
- void writeBookInfo(QTextStream &doc, ListViewInterface *item);
- void writeTitleOfBook(QTextStream &doc, ListViewInterface *item);
- void writeChapter(QTextStream &doc, ListViewInterface *item);
- void writeKeywordSet(QTextStream &doc, ListViewInterface *item);
- void writeKeyword(QTextStream &doc, ListViewInterface *item);
- void writeAbstract(QTextStream &doc, ListViewInterface *item);
- void writePara(QTextStream &doc, ListViewInterface *item);
- void writeAuthorGroup(QTextStream &doc, ListViewInterface *item);
- void writeAuthor(QTextStream &doc, ListViewInterface *item);
- void writeDate(QTextStream &doc, ListViewInterface *item);
- void writeReleaseInfo(QTextStream &doc, ListViewInterface *item);
- void writeSect1(QTextStream &doc, ListViewInterface *item);
- void writeSect2(QTextStream &doc, ListViewInterface *item);
- void writeSect3(QTextStream &doc, ListViewInterface *item);
- void writeSect4(QTextStream &doc, ListViewInterface *item);
- void writeSect5(QTextStream &doc, ListViewInterface *item);
+ void writeBookInfo(TQTextStream &doc, ListViewInterface *item);
+ void writeTitleOfBook(TQTextStream &doc, ListViewInterface *item);
+ void writeChapter(TQTextStream &doc, ListViewInterface *item);
+ void writeKeywordSet(TQTextStream &doc, ListViewInterface *item);
+ void writeKeyword(TQTextStream &doc, ListViewInterface *item);
+ void writeAbstract(TQTextStream &doc, ListViewInterface *item);
+ void writePara(TQTextStream &doc, ListViewInterface *item);
+ void writeAuthorGroup(TQTextStream &doc, ListViewInterface *item);
+ void writeAuthor(TQTextStream &doc, ListViewInterface *item);
+ void writeDate(TQTextStream &doc, ListViewInterface *item);
+ void writeReleaseInfo(TQTextStream &doc, ListViewInterface *item);
+ void writeSect1(TQTextStream &doc, ListViewInterface *item);
+ void writeSect2(TQTextStream &doc, ListViewInterface *item);
+ void writeSect3(TQTextStream &doc, ListViewInterface *item);
+ void writeSect4(TQTextStream &doc, ListViewInterface *item);
+ void writeSect5(TQTextStream &doc, ListViewInterface *item);
diff --git a/ksayit/src/docbookparser.cpp b/ksayit/src/docbookparser.cpp
index 03b9f73..679a44b 100644
--- a/ksayit/src/docbookparser.cpp
+++ b/ksayit/src/docbookparser.cpp
@@ -11,9 +11,9 @@
//
// Qt includes
-#include <qregexp.h>
-#include <qstring.h>
-#include <qtextstream.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
//KDE includes
#include <kdebug.h>
@@ -36,13 +36,13 @@ DocbookParser::~DocbookParser()
}
-QString DocbookParser::node2raw(QDomNode node) const
+TQString DocbookParser::node2raw(TQDomNode node) const
{
- QString ret;
+ TQString ret;
// get content of element
- QTextStream in(ret, IO_WriteOnly);
- in.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream in(ret, IO_WriteOnly);
+ in.setEncoding(TQTextStream::UnicodeUTF8);
in << node;
return ret;
@@ -55,17 +55,17 @@ QString DocbookParser::node2raw(QDomNode node) const
//
// DocBook parser
//
-void DocbookParser::parseBook(const QDomElement &element, ListViewInterface *item)
+void DocbookParser::parseBook(const TQDomElement &element, ListViewInterface *item)
{
kdDebug(100200) << "+++ entering parseBook()" << endl;
- item->setText(3, QString("%1").arg(++m_idCounter).rightJustify(8,'0') );
+ item->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') );
// register Popup menu
m_contextmenuhandler->registerPopupMenu( item );
// TODO: Attributes Id, Lang
// Elements (parse BookInfo before Chapter)
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ){
if( node.isElement() && node.nodeName().lower()=="bookinfo" ){
parseBookInfo( node.toElement(), item );
@@ -84,17 +84,17 @@ void DocbookParser::parseBook(const QDomElement &element, ListViewInterface *ite
}
-void DocbookParser::parseBookInfo(const QDomElement &element, ListViewInterface *item)
+void DocbookParser::parseBookInfo(const TQDomElement &element, ListViewInterface *item)
{
kdDebug(100200) << "+++ entering parseBookInfo()" << endl;
Overview *overview = new Overview(item, NULL, i18n("Overview"));
- overview->setText(3, QString("%1").arg(++m_idCounter).rightJustify(8,'0') );
+ overview->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') );
// register Popup menu
m_contextmenuhandler->registerPopupMenu( overview );
- QDomText data;
- QDomNode node = element.firstChild();
+ TQDomText data;
+ TQDomNode node = element.firstChild();
// fixed order
while( !node.isNull() ){
if( node.isElement() && node.nodeName().lower()=="title" ){
@@ -122,7 +122,7 @@ void DocbookParser::parseBookInfo(const QDomElement &element, ListViewInterface
data = node.firstChild().toText();
if( !data.isNull() ){
Date *date = new Date(overview, NULL, i18n("Date"));
- date->setText(3, QString("%1").arg(++m_idCounter).rightJustify(8,'0') );
+ date->setText(3, TQString("%1").arg(++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 QDomElement &element, ListViewInterface
data = node.firstChild().toText();
if( !data.isNull() ){
ReleaseInfo *relinfo = new ReleaseInfo(overview, NULL, i18n("Release"));
- relinfo->setText(3, QString("%1").arg(++m_idCounter).rightJustify(8,'0') );
+ relinfo->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') );
relinfo->setText( 1, data.nodeValue() );
relinfo->setValue(KSayItGlobal::RTFDATA, data.nodeValue());
relinfo->setValue(KSayItGlobal::SPEAKERDATA, data.nodeValue());
@@ -170,17 +170,17 @@ void DocbookParser::parseBookInfo(const QDomElement &element, ListViewInterface
}
-void DocbookParser::parseAuthorGroup(const QDomElement &element, ListViewInterface *item)
+void DocbookParser::parseAuthorGroup(const TQDomElement &element, ListViewInterface *item)
{
kdDebug(100200) << "+++ entering parseAuthorGroup()" << endl;
// item = overview
AuthorGroup *authorgroup = new AuthorGroup(item, NULL, i18n("Author(s)"));
- authorgroup->setText(3, QString("%1").arg(++m_idCounter).rightJustify(8,'0') );
+ authorgroup->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') );
// register Popup menu
m_contextmenuhandler->registerPopupMenu( authorgroup );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ){
if( node.isElement() && node.nodeName().lower()=="author" ){
parseAuthor( node.toElement(), authorgroup );
@@ -191,21 +191,21 @@ void DocbookParser::parseAuthorGroup(const QDomElement &element, ListViewInterfa
}
-void DocbookParser::parseAuthor(const QDomElement &element, ListViewInterface *item)
+void DocbookParser::parseAuthor(const TQDomElement &element, ListViewInterface *item)
{
kdDebug(100200) << "+++ entering parseAuthor()" << endl;
// item = authorgroup
- QDomText data;
- QDomText firstname = QDomText();
- QDomText surname = QDomText();
- QString s_firstname = QString::null;
- QString s_surname = QString::null;
+ TQDomText data;
+ TQDomText firstname = TQDomText();
+ TQDomText surname = TQDomText();
+ TQString s_firstname = TQString::null;
+ TQString s_surname = TQString::null;
Author *author = new Author(item);
- author->setText(3, QString("%1").arg(++m_idCounter).rightJustify(8,'0') );
+ author->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ){
if( node.isElement() && node.nodeName().lower()=="firstname" ){
data = node.firstChild().toText();
@@ -235,24 +235,24 @@ void DocbookParser::parseAuthor(const QDomElement &element, ListViewInterface *i
}
-void DocbookParser::parseKeywordSet(const QDomElement &element, ListViewInterface *item)
+void DocbookParser::parseKeywordSet(const TQDomElement &element, ListViewInterface *item)
{
kdDebug(100200) << "+++ entering parseKeywordSet()" << endl;
// item = overview
KeywordSet *keywordset = new KeywordSet(item, NULL, i18n("Keywords"));
- keywordset->setText(3, QString("%1").arg(++m_idCounter).rightJustify(8,'0') );
+ keywordset->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') );
// register Popup menu
m_contextmenuhandler->registerPopupMenu( keywordset );
- QDomText data;
- QDomNode node = element.firstChild();
+ TQDomText data;
+ TQDomNode node = element.firstChild();
while( !node.isNull() ){
if( node.isElement() && node.nodeName().lower()=="keyword" ){
data = node.firstChild().toText();
if( !data.isNull() ){
Keyword *keyword = new Keyword(keywordset);
- keyword->setText(3, QString("%1").arg(++m_idCounter).rightJustify(8,'0') );
+ keyword->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') );
keyword->setText(0, data.nodeValue() );
keyword->setValue(KSayItGlobal::RTFDATA, data.nodeValue() );
keyword->setValue(KSayItGlobal::SPEAKERDATA, data.nodeValue() );
@@ -268,18 +268,18 @@ void DocbookParser::parseKeywordSet(const QDomElement &element, ListViewInterfac
}
-void DocbookParser::parseAbstract(const QDomElement &element, ListViewInterface *item)
+void DocbookParser::parseAbstract(const TQDomElement &element, ListViewInterface *item)
{
kdDebug(100200) << "+++ entering parseAbstract()" << endl;
// item = overview
- QDomText data;
+ TQDomText data;
Abstract *abstract = new Abstract(item, NULL, i18n("Abstract"));
- abstract->setText(3, QString("%1").arg(++m_idCounter).rightJustify(8,'0') );
+ abstract->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') );
// register Popup menu
m_contextmenuhandler->registerPopupMenu( abstract );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ){
if( node.isElement() && node.nodeName().lower()=="para" ){
parsePara( node.toElement(), abstract );
@@ -290,17 +290,17 @@ void DocbookParser::parseAbstract(const QDomElement &element, ListViewInterface
}
-void DocbookParser::parseChapter(const QDomElement &element, ListViewInterface *item)
+void DocbookParser::parseChapter(const TQDomElement &element, ListViewInterface *item)
{
kdDebug(100200) << "+++ entering parseChapter()" << endl;
- QDomText data;
+ TQDomText data;
Chapter *chapter = new Chapter(item, NULL, i18n("Chapter"));
- chapter->setText(3, QString("%1").arg(++m_idCounter).rightJustify(8,'0') );
+ chapter->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') );
// register Popup menu
m_contextmenuhandler->registerPopupMenu( chapter );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ){
if( node.isElement() && node.nodeName().lower()=="title" ){
data = node.firstChild().toText();
@@ -320,17 +320,17 @@ void DocbookParser::parseChapter(const QDomElement &element, ListViewInterface *
}
-void DocbookParser::parseSect1(const QDomElement &element, ListViewInterface *item)
+void DocbookParser::parseSect1(const TQDomElement &element, ListViewInterface *item)
{
kdDebug(100200) << "+++ entering parseSect1()" << endl;
- QDomText data;
+ TQDomText data;
Sect1 *sect1 = new Sect1(item, NULL, i18n("Section Level 1"));
- sect1->setText(3, QString("%1").arg(++m_idCounter).rightJustify(8,'0') );
+ sect1->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') );
// register Popup menu
m_contextmenuhandler->registerPopupMenu( sect1 );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ){
if( node.isElement() && node.nodeName().lower()=="title" ){
data = node.firstChild().toText();
@@ -350,17 +350,17 @@ void DocbookParser::parseSect1(const QDomElement &element, ListViewInterface *it
}
-void DocbookParser::parseSect2(const QDomElement &element, ListViewInterface *item)
+void DocbookParser::parseSect2(const TQDomElement &element, ListViewInterface *item)
{
kdDebug(100200) << "+++ entering parseSect2()" << endl;
- QDomText data;
+ TQDomText data;
Sect2 *sect2 = new Sect2(item, NULL, i18n("Section Level 2"));
- sect2->setText(3, QString("%1").arg(++m_idCounter).rightJustify(8,'0') );
+ sect2->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') );
// register Popup menu
m_contextmenuhandler->registerPopupMenu( sect2 );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ){
if( node.isElement() && node.nodeName().lower()=="title" ){
data = node.firstChild().toText();
@@ -380,17 +380,17 @@ void DocbookParser::parseSect2(const QDomElement &element, ListViewInterface *it
}
-void DocbookParser::parseSect3(const QDomElement &element, ListViewInterface *item)
+void DocbookParser::parseSect3(const TQDomElement &element, ListViewInterface *item)
{
kdDebug(100200) << "+++ entering parseSect3()" << endl;
- QDomText data;
+ TQDomText data;
Sect3 *sect3 = new Sect3(item, NULL, i18n("Section Level 3"));
- sect3->setText(3, QString("%1").arg(++m_idCounter).rightJustify(8,'0') );
+ sect3->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') );
// register Popup menu
m_contextmenuhandler->registerPopupMenu( sect3 );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ){
if( node.isElement() && node.nodeName().lower()=="title" ){
data = node.firstChild().toText();
@@ -410,17 +410,17 @@ void DocbookParser::parseSect3(const QDomElement &element, ListViewInterface *it
}
-void DocbookParser::parseSect4(const QDomElement &element, ListViewInterface *item)
+void DocbookParser::parseSect4(const TQDomElement &element, ListViewInterface *item)
{
kdDebug(100200) << "+++ entering parseSect4()" << endl;
- QDomText data;
+ TQDomText data;
Sect4 *sect4 = new Sect4(item, NULL, i18n("Section Level 4"));
- sect4->setText(3, QString("%1").arg(++m_idCounter).rightJustify(8,'0') );
+ sect4->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') );
// register Popup menu
m_contextmenuhandler->registerPopupMenu( sect4 );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ){
if( node.isElement() && node.nodeName().lower()=="title" ){
data = node.firstChild().toText();
@@ -440,17 +440,17 @@ void DocbookParser::parseSect4(const QDomElement &element, ListViewInterface *it
}
-void DocbookParser::parseSect5(const QDomElement &element, ListViewInterface *item)
+void DocbookParser::parseSect5(const TQDomElement &element, ListViewInterface *item)
{
kdDebug(100200) << "+++ entering parseSect5()" << endl;
- QDomText data;
+ TQDomText data;
Sect5 *sect5 = new Sect5(item, NULL, i18n("Section Level 4"));
- sect5->setText(3, QString("%1").arg(++m_idCounter).rightJustify(8,'0') );
+ sect5->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') );
// register Popup menu
m_contextmenuhandler->registerPopupMenu( sect5 );
- QDomNode node = element.firstChild();
+ TQDomNode node = element.firstChild();
while( !node.isNull() ){
if( node.isElement() && node.nodeName().lower()=="title" ){
data = node.firstChild().toText();
@@ -468,20 +468,20 @@ void DocbookParser::parseSect5(const QDomElement &element, ListViewInterface *it
}
-void DocbookParser::parsePara(const QDomElement &element, ListViewInterface *item)
+void DocbookParser::parsePara(const TQDomElement &element, ListViewInterface *item)
{
kdDebug(100200) << "+++ entering parsePara()" << endl;
Para *para = new Para(item, NULL, i18n("Paragraph"));
- para->setText(3, QString("%1").arg(++m_idCounter).rightJustify(8,'0') );
+ para->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') );
// register Popup menu
m_contextmenuhandler->registerPopupMenu( para );
- QString raw = node2raw(element);
+ TQString raw = node2raw(element);
// remove <para> tags
- raw.replace( QRegExp("</?(para|Para|PARA)/?>"),"");
- raw.replace( QRegExp("^ "),"" );
- raw.replace( QRegExp("^\n"), "" );
+ raw.replace( TQRegExp("</?(para|Para|PARA)/?>"),"");
+ raw.replace( TQRegExp("^ "),"" );
+ raw.replace( 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 e603e93..5c84e30 100644
--- a/ksayit/src/docbookparser.h
+++ b/ksayit/src/docbookparser.h
@@ -13,7 +13,7 @@
#define DOCBOOKPARSER_H
// Qt includes
-#include <qdom.h>
+#include <tqdom.h>
// KDE includes
@@ -31,27 +31,27 @@ public:
// Destructor
~DocbookParser();
- void parseBook(const QDomElement &element, ListViewInterface *item);
+ void parseBook(const TQDomElement &element, ListViewInterface *item);
int getIdCounter(){ return m_idCounter; };
private: // Methods
// a selection of DocBook elements
- void parseBookInfo(const QDomElement &element, ListViewInterface *item);
- void parseAuthorGroup(const QDomElement &element, ListViewInterface *item);
- void parseAuthor(const QDomElement &element, ListViewInterface *item);
- void parseKeywordSet(const QDomElement &element, ListViewInterface *item);
- void parseAbstract(const QDomElement &element, ListViewInterface *item);
- void parseChapter(const QDomElement &element, ListViewInterface *item);
- void parseSect1(const QDomElement &element, ListViewInterface *item);
- void parseSect2(const QDomElement &element, ListViewInterface *item);
- void parseSect3(const QDomElement &element, ListViewInterface *item);
- void parseSect4(const QDomElement &element, ListViewInterface *item);
- void parseSect5(const QDomElement &element, ListViewInterface *item);
- void parsePara(const QDomElement &element, ListViewInterface *item);
+ void parseBookInfo(const TQDomElement &element, ListViewInterface *item);
+ void parseAuthorGroup(const TQDomElement &element, ListViewInterface *item);
+ void parseAuthor(const TQDomElement &element, ListViewInterface *item);
+ void parseKeywordSet(const TQDomElement &element, ListViewInterface *item);
+ void parseAbstract(const TQDomElement &element, ListViewInterface *item);
+ void parseChapter(const TQDomElement &element, ListViewInterface *item);
+ void parseSect1(const TQDomElement &element, ListViewInterface *item);
+ void parseSect2(const TQDomElement &element, ListViewInterface *item);
+ void parseSect3(const TQDomElement &element, ListViewInterface *item);
+ void parseSect4(const TQDomElement &element, ListViewInterface *item);
+ void parseSect5(const TQDomElement &element, ListViewInterface *item);
+ void parsePara(const TQDomElement &element, ListViewInterface *item);
// Helpers
- QString node2raw(QDomNode node) const;
+ TQString node2raw(TQDomNode node) const;
private: // Attributes
ContextMenuHandler *m_contextmenuhandler;
diff --git a/ksayit/src/doctreeviewimpl.cpp b/ksayit/src/doctreeviewimpl.cpp
index 663933b..11e22ce 100644
--- a/ksayit/src/doctreeviewimpl.cpp
+++ b/ksayit/src/doctreeviewimpl.cpp
@@ -12,14 +12,14 @@
#include <stdlib.h> // getenv
// Qt includes
-#include <qdom.h>
-#include <qfile.h>
-#include <qwidget.h>
-#include <qtextstream.h>
-#include <qregexp.h>
-#include <qdatetime.h>
-#include <qcolor.h>
-#include <qlistview.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqwidget.h>
+#include <tqtextstream.h>
+#include <tqregexp.h>
+#include <tqdatetime.h>
+#include <tqcolor.h>
+#include <tqlistview.h>
//KDE includes
#include <kdebug.h>
@@ -41,7 +41,7 @@
//////////////////////////////////////
// TreeView Implementation
//////////////////////////////////////
-DocTreeViewImpl::DocTreeViewImpl(QWidget* parent, const char* name, WFlags fl)
+DocTreeViewImpl::DocTreeViewImpl(TQWidget* parent, const char* name, WFlags fl)
: DocTreeView(parent, name, fl)
{
m_rootItem = NULL;
@@ -58,7 +58,7 @@ DocTreeViewImpl::DocTreeViewImpl(QWidget* parent, const char* name, WFlags fl)
listView->setColumnWidthMode(2, KListView::Maximum );
listView->setColumnWidthMode(3, KListView::Manual );
listView->setColumnWidth(3, 0);
- listView->setAlternateBackground( QColor(230, 230, 240) );
+ listView->setAlternateBackground( TQColor(230, 230, 240) );
listView->setSelectionModeExt( KListView::Single );
m_idCounter = KSayItGlobal::item_initial_id;
@@ -66,7 +66,7 @@ DocTreeViewImpl::DocTreeViewImpl(QWidget* parent, const char* name, WFlags fl)
m_currentItem = m_rootItem;
m_parasaxparser = ParaSaxParser::Instance();
m_editMode = false;
- m_changedContent = QString::null;
+ m_changedContent = TQString::null;
m_contextmenuhandler = NULL;
m_contextmenu = NULL;
@@ -105,7 +105,7 @@ void DocTreeViewImpl::clear()
// inform BookmarkHandler
//
- emit signalSetBookmarkFilename( QString::null );
+ emit signalSetBookmarkFilename( TQString::null );
listView->clear();
m_rootItem = new RobDocument( listView, i18n("unnamed") );
@@ -119,16 +119,16 @@ void DocTreeViewImpl::createEmptyDocument()
{
kdDebug(100200) << "DocTreeViewImpl::createEmptyDocument()" << endl;
// create empty document
- QByteArray data;
- QTextStream wrapped(data, IO_ReadWrite);
- wrapped.setEncoding(QTextStream::UnicodeUTF8);
+ TQByteArray data;
+ TQTextStream wrapped(data, IO_ReadWrite);
+ wrapped.setEncoding(TQTextStream::UnicodeUTF8);
wrapped << "<?xml version=\"1.0\" ?>" << endl;
wrapped << "<!--" << endl;
wrapped << "!DOCTYPE book PUBLIC \"-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN\" \"dtd/kdex.dtd\"" << endl;
wrapped << "-->" << endl;
- QString header(data);
+ TQString header(data);
m_parasaxparser->setProcessingInstruction( header );
wrapped << "<book>" << endl;
@@ -153,15 +153,15 @@ void DocTreeViewImpl::createEmptyDocument()
wrapped << "</chapter>" << endl;
wrapped << "</book>" << endl;
- QDomDocument domTree;
+ TQDomDocument domTree;
if ( ! domTree.setContent( data ) ){
kdDebug(100200) << "Kein gueltiges Dokument!!" << endl;
};
// inform BookmarkHandler
emit signalSetBookmarkFilename( i18n("Untitled") );
- QDomElement root = domTree.documentElement();
- QDomNode node;
+ TQDomElement root = domTree.documentElement();
+ TQDomNode node;
if( root.tagName().lower() == "book" ){ // DocBook
DocbookParser docbookparser(m_contextmenuhandler);
docbookparser.parseBook(root , m_rootItem);
@@ -182,19 +182,19 @@ void DocTreeViewImpl::openFile(const KURL &url)
m_url = url;
// open file
- QString err;
- QFile file( url.path() );
+ TQString err;
+ TQFile file( url.path() );
if( !file.open(IO_ReadOnly) ){
err = i18n("Unable to open File.");
throw(err);
}
- QDomDocument domTree;
+ TQDomDocument domTree;
// check document
if( domTree.setContent(&file) ){
// extract Header
file.reset();
- QString header = QString::null;
- QString line;
+ TQString header = TQString::null;
+ TQString line;
int offset;
file.readLine( line, file.size() );
while( !file.atEnd() && (offset = line.find("<book", 0, false)) < 0 ){
@@ -210,16 +210,16 @@ void DocTreeViewImpl::openFile(const KURL &url)
} else {
// File is not a valid XML-File. Wrap it
file.reset();
- QByteArray data;
- QTextStream wrapped(data, IO_ReadWrite);
- wrapped.setEncoding(QTextStream::UnicodeUTF8);
+ TQByteArray data;
+ TQTextStream wrapped(data, IO_ReadWrite);
+ wrapped.setEncoding(TQTextStream::UnicodeUTF8);
wrapped << "<?xml version=\"1.0\" ?>" << endl;
wrapped << "<!--" << endl;
wrapped << "!DOCTYPE book PUBLIC \"-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN\" \"dtd/kdex.dtd\"" << endl;
wrapped << "-->" << endl;
- QString header(data);
+ TQString header(data);
kdDebug(100200) << "Header (Wrapper): " << endl << header << endl;
m_parasaxparser->setProcessingInstruction( header );
@@ -240,7 +240,7 @@ void DocTreeViewImpl::openFile(const KURL &url)
wrapped << "<chapter>" << endl;
wrapped << "<title><![CDATA[" << i18n("Plain File") << "]]></title>" << endl;
wrapped << "<para><![CDATA[";
- wrapped << QString( file.readAll() );
+ wrapped << TQString( file.readAll() );
wrapped << "]]></para>" << endl;
wrapped << "</chapter>" << endl;
wrapped << "</book>" << endl;
@@ -255,7 +255,7 @@ void DocTreeViewImpl::openFile(const KURL &url)
}
// check if correct document type
- QDomElement root = domTree.documentElement();
+ TQDomElement root = domTree.documentElement();
if( root.tagName().lower() == "book" ){ // DocBook
DocbookParser docbookparser(m_contextmenuhandler);
docbookparser.parseBook(root , m_rootItem);
@@ -277,10 +277,10 @@ void DocTreeViewImpl::saveFile()
makeCurrentNodePersistent();
- QString err;
+ TQString err;
if ( m_url.isEmpty() ){ // file has no name, ask user
- QString usershome( getenv("HOME") );
+ TQString usershome( getenv("HOME") );
m_url = KFileDialog::getSaveURL(usershome, "*.docbook", this, i18n("Save File"));
}
if ( m_url.isEmpty() ) // dialog cancelled
@@ -290,14 +290,14 @@ void DocTreeViewImpl::saveFile()
throw( err );
}
if ( m_url.isLocalFile() ){
- QFile file( m_url.path() );
+ TQFile file( m_url.path() );
if ( !file.open(IO_WriteOnly) ){
err = i18n("Unable open file to write.");
throw( err );
}
// write file
- QTextStream doc(&file);
- doc.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream doc(&file);
+ doc.setEncoding(TQTextStream::UnicodeUTF8);
doc << "<?xml version=\"1.0\" ?>" << endl;
doc << "<!--" << endl;
@@ -325,11 +325,11 @@ void DocTreeViewImpl::saveFile()
void DocTreeViewImpl::saveFileAs()
{
kdDebug(100200) << "DocTreeViewImpl::saveFileAs()" << endl;
- QString err;
+ TQString err;
makeCurrentNodePersistent();
- m_url = KFileDialog::getSaveURL(QString::null, "*.docbook", this, i18n("Save File As"));
+ m_url = KFileDialog::getSaveURL(TQString::null, "*.docbook", this, i18n("Save File As"));
if ( m_url.isEmpty() ) // dialog cancelled
return;
if ( !m_url.isValid() ){
@@ -337,15 +337,15 @@ void DocTreeViewImpl::saveFileAs()
throw( err );
}
if ( m_url.isLocalFile() ){
- QFile file( m_url.path() );
+ TQFile file( m_url.path() );
if ( !file.open(IO_WriteOnly) ){
err = i18n("Unable open file to write.");
throw( err );
}
// write file
- QTextStream doc(&file);
- doc.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream doc(&file);
+ doc.setEncoding(TQTextStream::UnicodeUTF8);
doc << "<?xml version=\"1.0\" ?>" << endl;
doc << "<!--" << endl;
@@ -388,35 +388,35 @@ void DocTreeViewImpl::setEditMode(bool mode)
}
-void DocTreeViewImpl::makeToSingleLine( QString &content )
+void DocTreeViewImpl::makeToSingleLine( TQString &content )
{
// canonify string
- content.replace( QRegExp("\n"), "" ); // remove Newlines
- content.replace( QRegExp(" {2,}"), " " ); // remove multiple spaces
- content.replace( QRegExp("[\t|\r]{1,}"), ""); // remove Tabs
+ content.replace( TQRegExp("\n"), "" ); // remove Newlines
+ content.replace( TQRegExp(" {2,}"), " " ); // remove multiple spaces
+ content.replace( TQRegExp("[\t|\r]{1,}"), ""); // remove Tabs
}
-QString DocTreeViewImpl::selectItemByID(const QString &ID, const QString title)
+TQString DocTreeViewImpl::selectItemByID(const TQString &ID, const TQString title)
{
kdDebug(100200) << "DocTreeViewImpl::selectItemByID(" << ID << ")" << endl;
if ( ID.isNull() )
- return QString::null;
+ return TQString::null;
- QString sTitle = title.lower();
- QString err = QString::null;
+ TQString sTitle = title.lower();
+ TQString err = TQString::null;
/**
* Search on structure (URL)
* e.g. 1=RobDokument|1=BookInfo|1=KeywordSet|2=Keyword
*/
- QStringList partList;
- partList = QStringList::split("|", ID);
- QStringList::Iterator it = partList.begin();
+ TQStringList partList;
+ partList = TQStringList::split("|", ID);
+ TQStringList::Iterator it = partList.begin();
it++; // skip first element (allways RobDocument)
int childNum = 0;
- QString childType = QString::null;
+ TQString childType = TQString::null;
ListViewInterface *item = m_rootItem;
bool hit = false;
@@ -436,7 +436,7 @@ QString DocTreeViewImpl::selectItemByID(const QString &ID, const QString title)
}
if ( !item )
break; // expected item does not exist
- QString type = ( item->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString type = ( item->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
type = type.lower();
if ( childType != type )
break; // structure has been changed
@@ -444,7 +444,7 @@ QString DocTreeViewImpl::selectItemByID(const QString &ID, const QString title)
}
if ( item ){
- QString itemTitle = getItemTitle( item );
+ TQString itemTitle = getItemTitle( item );
itemTitle = itemTitle.lower();
if ( sTitle.left(itemTitle.length()) == itemTitle )
// Title made unique by KDE by appending "(2)", "(3)"...
@@ -458,8 +458,8 @@ QString DocTreeViewImpl::selectItemByID(const QString &ID, const QString title)
// walk trough the entire tree and try to find an item
// with the given title.
item = NULL;
- QListViewItemIterator sit( m_rootItem );
- QString itemTitle = QString::null;
+ TQListViewItemIterator sit( m_rootItem );
+ TQString itemTitle = TQString::null;
while ( sit.current() ) {
item = static_cast<ListViewInterface*>(sit.current());
if ( !item )
@@ -493,7 +493,7 @@ QString DocTreeViewImpl::selectItemByID(const QString &ID, const QString title)
}
-void DocTreeViewImpl::slotItemClicked(QListViewItem *item)
+void DocTreeViewImpl::slotItemClicked(TQListViewItem *item)
{
kdDebug(100200) << "DocTreeViewImpl::slotItemClicked()" << endl;
@@ -503,9 +503,9 @@ void DocTreeViewImpl::slotItemClicked(QListViewItem *item)
if ( item ){
m_currentItem = static_cast<ListViewInterface*>(item);
- QString str = QString::null;
- QTextStream msg(&str, IO_ReadWrite);
- msg.setEncoding(QTextStream::UnicodeUTF8);
+ TQString str = TQString::null;
+ TQTextStream msg(&str, IO_ReadWrite);
+ msg.setEncoding(TQTextStream::UnicodeUTF8);
// check if item has a child and check state
// of Edit Mode.
@@ -517,20 +517,20 @@ void DocTreeViewImpl::slotItemClicked(QListViewItem *item)
// Create Bookmark-ID depending on the location of the item
// within the tree
- QString idstring = QString::null;
- QTextStream id(&idstring, IO_ReadWrite);
- id.setEncoding(QTextStream::UnicodeUTF8);
+ TQString idstring = TQString::null;
+ TQTextStream id(&idstring, IO_ReadWrite);
+ id.setEncoding(TQTextStream::UnicodeUTF8);
id << "1=RobDocument";
recursiveBuildItemIdentifier( m_currentItem, id );
// inform the Bookmark Manager about the new item.
- QString title = getItemTitle( m_currentItem );
+ TQString title = getItemTitle( m_currentItem );
emit signalNotifyBookmarkManager(idstring, title);
}
}
-void DocTreeViewImpl::slotRightButtonPressed(QListViewItem *item, const QPoint &pos, int)
+void DocTreeViewImpl::slotRightButtonPressed(TQListViewItem *item, const TQPoint &pos, int)
{
kdDebug(100200) << "DocTreeViewImpl::slotRightButtonPressed()" << endl;
slotItemClicked( item );
@@ -546,7 +546,7 @@ void DocTreeViewImpl::slotRightButtonPressed(QListViewItem *item, const QPoint &
}
-void DocTreeViewImpl::recursiveBuildItemIdentifier(ListViewInterface* item, QTextStream &idstring)
+void DocTreeViewImpl::recursiveBuildItemIdentifier(ListViewInterface* item, TQTextStream &idstring)
{
kdDebug(100200) << "DocTreeViewImpl::recursiveBuildItemIdentifier()" << endl;
@@ -566,7 +566,7 @@ void DocTreeViewImpl::recursiveBuildItemIdentifier(ListViewInterface* item, QTex
// 2. Which child of the parentItem are we? Append no. to idstring.
int childno = 0;
- QString itemID = item->text(3);
+ TQString itemID = item->text(3);
ListViewInterface *i = static_cast<ListViewInterface*>( parentItem->firstChild() );
while( i ){
childno++;
@@ -577,25 +577,25 @@ void DocTreeViewImpl::recursiveBuildItemIdentifier(ListViewInterface* item, QTex
idstring << "|" << childno;
// 3. Who are we? Append ID to idstring.
- QString itemType = ( item->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString itemType = ( item->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
idstring << "=" << itemType;
}
-QString DocTreeViewImpl::getItemTitle( ListViewInterface *item )
+TQString DocTreeViewImpl::getItemTitle( ListViewInterface *item )
{
if ( !item )
- return QString::null;
+ return TQString::null;
- QString col0 = item->text(0);
- QString title = QString::null;
+ TQString col0 = item->text(0);
+ TQString title = TQString::null;
// 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( QRegExp("^( |\t|\n)+"), "");
- title.replace( QRegExp("( |\t|\n)$+"), "");
+ title.replace( TQRegExp("^( |\t|\n)+"), "");
+ title.replace( TQRegExp("( |\t|\n)$+"), "");
} else {
title = col0.left(32);
}
@@ -603,11 +603,11 @@ QString DocTreeViewImpl::getItemTitle( ListViewInterface *item )
}
-void DocTreeViewImpl::recursiveTextCollector(ListViewInterface* item, QTextStream &msg, bool header)
+void DocTreeViewImpl::recursiveTextCollector(ListViewInterface* item, TQTextStream &msg, bool header)
{
kdDebug(100200) << "DocTreeViewImpl::recursiveTextCollector()" << endl;
- QString text;
+ TQString text;
if ( header ){
// if header==true get Headers
msg << ( item->getValue(KSayItGlobal::RTFHEADER) ).toString();
@@ -648,9 +648,9 @@ void DocTreeViewImpl::recursiveSayNodes(ListViewInterface* item)
{
kdDebug(100200) << "DocTreeViewImpl::recursiveSayNodes()" << endl;
- QString str;
- QTextStream msg(&str, IO_ReadWrite);
- msg.setEncoding(QTextStream::UnicodeUTF8);
+ TQString str;
+ TQTextStream msg(&str, IO_ReadWrite);
+ msg.setEncoding(TQTextStream::UnicodeUTF8);
msg << ( item->getValue(KSayItGlobal::SPEAKERHEADER) ).toString();
msg << ( item->getValue(KSayItGlobal::SPEAKERDATA) ).toString() << "\n" << endl;
@@ -678,7 +678,7 @@ void DocTreeViewImpl::stop()
}
-void DocTreeViewImpl::setNodeContent(QString &text)
+void DocTreeViewImpl::setNodeContent(TQString &text)
{
kdDebug(100200) << "DocTreeViewImpl::setNodeContent()" << endl;
m_changedContent = text;
@@ -700,12 +700,12 @@ void DocTreeViewImpl::makeCurrentNodePersistent()
m_currentItem->setValue( KSayItGlobal::RTFDATA, m_changedContent );
m_currentItem->setValue( KSayItGlobal::SPEAKERDATA, m_changedContent );
- m_changedContent = QString::null;
+ m_changedContent = TQString::null;
}
/** replaced by slotRightButtonPressed()
*/
-// void DocTreeViewImpl::contextMenuEvent(QContextMenuEvent *e)
+// void DocTreeViewImpl::contextMenuEvent(TQContextMenuEvent *e)
// {
// kdDebug(100200) << "DocTreeViewImpl::contextMenuEvent()" << endl;
//
@@ -732,7 +732,7 @@ void DocTreeViewImpl::slotRenameItem()
return;
bool responseOK;
- QString newname;
+ TQString newname;
newname = KInputDialog::getText(
i18n("Rename Item"),
i18n("Please enter the new name of the item:"),
@@ -762,12 +762,12 @@ void DocTreeViewImpl::slotDeleteItem()
return; // delete only items with parent
// try to delete bookmark
- QString url = QString::null;
- QTextStream id(&url, IO_ReadWrite);
- id.setEncoding(QTextStream::UnicodeUTF8);
+ TQString url = TQString::null;
+ TQTextStream id(&url, IO_ReadWrite);
+ id.setEncoding(TQTextStream::UnicodeUTF8);
id << "ksayit://1=RobDocument";
recursiveBuildItemIdentifier( itemToDelete, id );
- QString title = getItemTitle( itemToDelete );
+ TQString title = getItemTitle( itemToDelete );
emit signalDeleteBookmark( url, title );
// remove TreeView item
@@ -776,10 +776,10 @@ void DocTreeViewImpl::slotDeleteItem()
// reindex entire remaining tree
ListViewInterface *item = NULL;
m_idCounter = KSayItGlobal::item_initial_id;
- QListViewItemIterator itr( m_rootItem );
+ TQListViewItemIterator itr( m_rootItem );
while ( itr.current() ) {
item = static_cast<ListViewInterface*>(itr.current());
- item->setText(3, QString("%1").arg(++m_idCounter).rightJustify(8,'0') );
+ item->setText(3, TQString("%1").arg(++m_idCounter).rightJustify(8,'0') );
++itr;
}
@@ -793,11 +793,11 @@ void DocTreeViewImpl::slotDeleteItem()
void DocTreeViewImpl::slotNewBookInfo()
{
- QString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( whoAmI == "RobDocument" ){
int newIndex = newIndexFirstChild();
Overview *overview = new Overview( m_currentItem, NULL, i18n("Overview") );
- overview->setText(3, QString("%1").arg(newIndex).rightJustify(8,'0') );
+ overview->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') );
m_contextmenuhandler->registerPopupMenu( overview );
}
@@ -806,13 +806,13 @@ void DocTreeViewImpl::slotNewBookInfo()
void DocTreeViewImpl::slotNewChapter()
{
- QString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( whoAmI == "RobDocument" ){
int newIndex = newIndexLastChild();
Chapter *chapter = new Chapter( m_currentItem, NULL, i18n("Chapter") );
- chapter->setText(3, QString("%1").arg(newIndex).rightJustify(8,'0') );
+ chapter->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') );
- QString newTitle = i18n("New Chapter Title");
+ TQString newTitle = i18n("New Chapter Title");
chapter->setText(0, newTitle );
chapter->setValue(KSayItGlobal::RTFHEADER, newTitle );
chapter->setValue(KSayItGlobal::SPEAKERHEADER, newTitle );
@@ -824,12 +824,12 @@ void DocTreeViewImpl::slotNewChapter()
void DocTreeViewImpl::slotNewKeywordSet()
{
- QString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( whoAmI == "BookInfo" ){
// New TreeView item
int newIndex = newIndexFirstChild();
KeywordSet *keywordset = new KeywordSet(m_currentItem, NULL, i18n("Keywords"));
- keywordset->setText(3, QString("%1").arg(newIndex).rightJustify(8,'0') );
+ keywordset->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') );
m_contextmenuhandler->registerPopupMenu( keywordset );
}
@@ -838,14 +838,14 @@ void DocTreeViewImpl::slotNewKeywordSet()
void DocTreeViewImpl::slotNewKeyword()
{
- QString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( whoAmI == "KeywordSet" ){
// New TreeView item
int newIndex = newIndexLastChild();
Keyword *keyword = new Keyword(m_currentItem, NULL, i18n("Keyword"));
- keyword->setText(3, QString("%1").arg(newIndex).rightJustify(8,'0') );
+ keyword->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') );
- QString newKeyword = i18n("New Keyword");
+ TQString newKeyword = i18n("New Keyword");
keyword->setText(0, newKeyword );
keyword->setValue(KSayItGlobal::RAWDATA, newKeyword);
keyword->setValue(KSayItGlobal::RTFDATA, newKeyword);
@@ -858,12 +858,12 @@ void DocTreeViewImpl::slotNewKeyword()
void DocTreeViewImpl::slotNewAbstract()
{
- QString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( whoAmI == "BookInfo" ){
// New TreeView item
int newIndex = newIndexLastChild();
Abstract *abstract = new Abstract(m_currentItem, NULL, i18n("Abstract"));
- abstract->setText(3, QString("%1").arg(newIndex).rightJustify(8,'0') );
+ abstract->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') );
m_contextmenuhandler->registerPopupMenu( abstract );
@@ -878,12 +878,12 @@ void DocTreeViewImpl::slotNewAbstract()
void DocTreeViewImpl::slotNewAuthorGroup()
{
- QString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( whoAmI == "BookInfo" ){
// New TreeView item
int newIndex = newIndexFirstChild();
AuthorGroup *authorgroup = new AuthorGroup(m_currentItem, NULL, i18n("Author(s)"));
- authorgroup->setText(3, QString("%1").arg(newIndex).rightJustify(8,'0') );
+ authorgroup->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') );
m_contextmenuhandler->registerPopupMenu( authorgroup );
@@ -898,15 +898,15 @@ void DocTreeViewImpl::slotNewAuthorGroup()
void DocTreeViewImpl::slotNewAuthor()
{
- QString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( whoAmI == "AuthorGroup" ){
// New TreeView item
int newIndex = newIndexLastChild();
Author *author = new Author(m_currentItem);
- author->setText(3, QString("%1").arg(newIndex).rightJustify(8,'0') );
+ author->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') );
author->setText(0, i18n("Author") );
- QString newAuthor = i18n("Firstname Surname");
+ TQString newAuthor = i18n("Firstname Surname");
author->setText(1, newAuthor );
author->setValue( KSayItGlobal::RAWDATA, newAuthor );
author->setValue( KSayItGlobal::RTFDATA, newAuthor );
@@ -919,15 +919,15 @@ void DocTreeViewImpl::slotNewAuthor()
void DocTreeViewImpl::slotNewDate()
{
- QString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( whoAmI == "BookInfo" ){
// New TreeView item
int newIndex = newIndexLastChild();
Date *date = new Date(m_currentItem, NULL, i18n("Date"));
- date->setText(3, QString("%1").arg(newIndex).rightJustify(8,'0') );
+ date->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') );
// get current date
- QString today;
- today = KGlobal::locale()->formatDate(QDate::currentDate(Qt::LocalTime), true);
+ TQString today;
+ today = KGlobal::locale()->formatDate(TQDate::currentDate(Qt::LocalTime), true);
date->setText( 1, today);
date->setValue( KSayItGlobal::RAWDATA, today );
date->setValue( KSayItGlobal::RTFDATA, today );
@@ -940,14 +940,14 @@ void DocTreeViewImpl::slotNewDate()
void DocTreeViewImpl::slotNewReleaseInfo()
{
- QString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( whoAmI == "BookInfo" ){
// New TreeView item
int newIndex = newIndexLastChild();
ReleaseInfo *relinfo = new ReleaseInfo(m_currentItem, NULL, i18n("Release"));
- relinfo->setText(3, QString("%1").arg(newIndex).rightJustify(8,'0') );
+ relinfo->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') );
- QString newRelease = "0.0.0";
+ TQString newRelease = "0.0.0";
relinfo->setText( 1, newRelease );
relinfo->setValue( KSayItGlobal::RAWDATA, newRelease );
relinfo->setValue( KSayItGlobal::RTFDATA, newRelease );
@@ -966,7 +966,7 @@ void DocTreeViewImpl::slotNewTitle()
void DocTreeViewImpl::slotNewParagraph()
{
/* // Create Null element
- QDomElement parentElement = QDomElement();
+ TQDomElement parentElement = TQDomElement();
NodeList_type list;
list.clear();
@@ -979,7 +979,7 @@ void DocTreeViewImpl::slotNewParagraph()
// New TreeView item
int newIndex = newIndexLastChild();
Para *para = new Para(m_currentItem, NULL, i18n("Paragraph"));
- para->setText(3, QString("%1").arg(newIndex).rightJustify(8,'0') );
+ para->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') );
m_contextmenuhandler->registerPopupMenu( para );
@@ -988,13 +988,13 @@ void DocTreeViewImpl::slotNewParagraph()
void DocTreeViewImpl::slotNewSection_1()
{
- QString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( whoAmI == "Chapter" ){
int newIndex = newIndexLastChild();
Sect1 *sect1 = new Sect1(m_currentItem, NULL, i18n("Section Level 1"));
- sect1->setText(3, QString("%1").arg(newIndex).rightJustify(8,'0') );
+ sect1->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') );
- QString newTitle = i18n("New Section Title");
+ TQString newTitle = i18n("New Section Title");
sect1->setValue( KSayItGlobal::RTFHEADER, newTitle );
sect1->setValue( KSayItGlobal::SPEAKERHEADER, newTitle );
@@ -1005,13 +1005,13 @@ void DocTreeViewImpl::slotNewSection_1()
void DocTreeViewImpl::slotNewSection_2()
{
- QString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( whoAmI == "Sect1" ){
int newIndex = newIndexLastChild();
Sect2 *sect2 = new Sect2(m_currentItem, NULL, i18n("Section Level 2"));
- sect2->setText(3, QString("%1").arg(newIndex).rightJustify(8,'0') );
+ sect2->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') );
- QString newTitle = i18n("New Section Title");
+ TQString newTitle = i18n("New Section Title");
sect2->setValue( KSayItGlobal::RTFHEADER, newTitle );
sect2->setValue( KSayItGlobal::SPEAKERHEADER, newTitle );
@@ -1022,13 +1022,13 @@ void DocTreeViewImpl::slotNewSection_2()
void DocTreeViewImpl::slotNewSection_3()
{
- QString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( whoAmI == "Sect2" ){
int newIndex = newIndexLastChild();
Sect3 *sect3 = new Sect3(m_currentItem, NULL, i18n("Section Level 3"));
- sect3->setText(3, QString("%1").arg(newIndex).rightJustify(8,'0') );
+ sect3->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') );
- QString newTitle = i18n("New Section Title");
+ TQString newTitle = i18n("New Section Title");
sect3->setValue( KSayItGlobal::RTFHEADER, newTitle );
sect3->setValue( KSayItGlobal::SPEAKERHEADER, newTitle );
@@ -1039,13 +1039,13 @@ void DocTreeViewImpl::slotNewSection_3()
void DocTreeViewImpl::slotNewSection_4()
{
- QString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( whoAmI == "Sect3" ){
int newIndex = newIndexLastChild();
Sect4 *sect4 = new Sect4(m_currentItem, NULL, i18n("Section Level 4"));
- sect4->setText(3, QString("%1").arg(newIndex).rightJustify(8,'0') );
+ sect4->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') );
- QString newTitle = i18n("New Section Title");
+ TQString newTitle = i18n("New Section Title");
sect4->setValue( KSayItGlobal::RTFHEADER, newTitle );
sect4->setValue( KSayItGlobal::SPEAKERHEADER, newTitle );
@@ -1056,13 +1056,13 @@ void DocTreeViewImpl::slotNewSection_4()
void DocTreeViewImpl::slotNewSection_5()
{
- QString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
+ TQString whoAmI = ( m_currentItem->getValue(KSayItGlobal::XMLCONTEXTNAME) ).toString();
if ( whoAmI == "Sect4" ){
int newIndex = newIndexLastChild();
Sect5 *sect5 = new Sect5(m_currentItem, NULL, i18n("Section Level 5"));
- sect5->setText(3, QString("%1").arg(newIndex).rightJustify(8,'0') );
+ sect5->setText(3, TQString("%1").arg(newIndex).rightJustify(8,'0') );
- QString newTitle = i18n("New Section Title");
+ TQString newTitle = i18n("New Section Title");
sect5->setValue( KSayItGlobal::RTFHEADER, newTitle );
sect5->setValue( KSayItGlobal::SPEAKERHEADER, newTitle );
@@ -1081,12 +1081,12 @@ int DocTreeViewImpl::newIndexFirstChild()
// indices greater than currentIndex
ListViewInterface *item = NULL;
int itemIndex;
- QListViewItemIterator it( m_rootItem );
+ TQListViewItemIterator it( m_rootItem );
while ( it.current() ) {
item = static_cast<ListViewInterface*>(it.current());
itemIndex = (item->text(3)).toInt();
if ( itemIndex > currentIndex ){
- item->setText(3, QString("%1").arg(itemIndex+1).rightJustify(8,'0') );;
+ item->setText(3, TQString("%1").arg(itemIndex+1).rightJustify(8,'0') );;
}
++it;
}
@@ -1111,12 +1111,12 @@ int DocTreeViewImpl::newIndexLastChild()
// indices greater than lastIndex
int itemIndex;
ListViewInterface *item;
- QListViewItemIterator it( m_rootItem );
+ TQListViewItemIterator it( m_rootItem );
while ( it.current() ) {
item = static_cast<ListViewInterface*>(it.current());
itemIndex = (item->text(3)).toInt();
if ( itemIndex > lastIndex ){
- item->setText(3, QString("%1").arg(itemIndex+1).rightJustify(8,'0') );
+ item->setText(3, TQString("%1").arg(itemIndex+1).rightJustify(8,'0') );
}
++it;
}
diff --git a/ksayit/src/doctreeviewimpl.h b/ksayit/src/doctreeviewimpl.h
index 4ad0c38..c42cab8 100644
--- a/ksayit/src/doctreeviewimpl.h
+++ b/ksayit/src/doctreeviewimpl.h
@@ -13,7 +13,7 @@
#define DOCTREEVIEWIMPL_H
// Qt includes
-#include <qstring.h>
+#include <tqstring.h>
// KDE includes
#include <kurl.h>
@@ -32,7 +32,7 @@ class ContextMenuHandler;
/**
This class implements the TreeView object.\n
It takes a XML/DocBook file, parses it and builds up a hierarchical
-\p QListView structure corresponding to the structure of the document.
+\p TQListView structure corresponding to the structure of the document.
The objective of this class is to maintain the document and provide
all required methods to access or manipulate its content.
@author Robert Vogl
@@ -40,7 +40,7 @@ all required methods to access or manipulate its content.
class DocTreeViewImpl : public DocTreeView
{
public:
- DocTreeViewImpl(QWidget* parent=0, const char* name=0, WFlags fl=0);
+ DocTreeViewImpl(TQWidget* parent=0, const char* name=0, WFlags fl=0);
~DocTreeViewImpl();
@@ -78,7 +78,7 @@ public:
* persistent.
* \param text The content of the TextEdit view.
*/
- void setNodeContent(QString &text);
+ void setNodeContent(TQString &text);
/**
* Starting from the current selected node it travels recursively
@@ -102,10 +102,10 @@ public:
/**
* Sets the item active designated by the ID.
* \param ID The ID (column 3) of the TreeView item.
- * \returns <tt>QString::null</tt> if the operation was successfull,\n
+ * \returns <tt>TQString::null</tt> if the operation was successfull,\n
* an error message, if the item was not found.
*/
- QString selectItemByID(const QString &ID, const QString title);
+ TQString selectItemByID(const TQString &ID, const TQString title);
/**
* Enables/disables the contextmenus
@@ -145,30 +145,30 @@ protected slots:
*
* \param item The new active item of the TreeView.
*/
- void slotItemClicked(QListViewItem *item);
+ void slotItemClicked(TQListViewItem *item);
/**
* Reimplemented from base class.
* Called when the right button was pressed.
* \param item The new active item of the TreeView.
*/
- void slotRightButtonPressed(QListViewItem *item, const QPoint &pos, int);
+ void slotRightButtonPressed(TQListViewItem *item, const TQPoint &pos, int);
/**
- * Reimplemented from QWidget class.
+ * Reimplemented from TQWidget class.
*/
- // void contextMenuEvent(QContextMenuEvent *e);
+ // void contextMenuEvent(TQContextMenuEvent *e);
private: // Methods
- void recursiveTextCollector(ListViewInterface* item, QTextStream &msg, bool header=true);
+ void recursiveTextCollector(ListViewInterface* item, TQTextStream &msg, bool header=true);
void recursiveSayNodes(ListViewInterface* item);
- void recursiveBuildItemIdentifier(ListViewInterface* item, QTextStream &idstring);
+ void recursiveBuildItemIdentifier(ListViewInterface* item, TQTextStream &idstring);
void makeCurrentNodePersistent();
int newIndexFirstChild();
int newIndexLastChild();
void findHighestIndex(ListViewInterface* item, int &index);
- QString getItemTitle( ListViewInterface *item);
- void makeToSingleLine( QString &content );
+ TQString getItemTitle( ListViewInterface *item);
+ void makeToSingleLine( TQString &content );
private: // Attributes
@@ -176,7 +176,7 @@ private: // Attributes
KPopupMenu *m_contextmenu;
ListViewInterface *m_rootItem;
ListViewInterface *m_currentItem;
- QString m_changedContent;
+ TQString m_changedContent;
int m_idCounter;
bool m_stopped;
KURL m_url;
diff --git a/ksayit/src/effectstack.cpp b/ksayit/src/effectstack.cpp
index 7497847..67cfb44 100644
--- a/ksayit/src/effectstack.cpp
+++ b/ksayit/src/effectstack.cpp
@@ -11,7 +11,7 @@
//
// Qt includes
-#include <qstringlist.h>
+#include <tqstringlist.h>
// KDE includes
#include <kdebug.h>
@@ -37,8 +37,8 @@ bool EffectStack::loadEffects()
{
kdDebug(100200) << "EffectStack::loadEffects()" << endl;
- QStringList c_active;
- QStringList::Iterator fx_it;
+ TQStringList c_active;
+ TQStringList::Iterator fx_it;
// create filterstack
FX_Stack = server.server().outstack();
diff --git a/ksayit/src/fxpluginhandler.cpp b/ksayit/src/fxpluginhandler.cpp
index 8e6f68d..ec68de8 100644
--- a/ksayit/src/fxpluginhandler.cpp
+++ b/ksayit/src/fxpluginhandler.cpp
@@ -11,7 +11,7 @@
//
// QT includes
-#include <qdir.h>
+#include <tqdir.h>
// KDE includes
#include <kdebug.h>
@@ -26,8 +26,8 @@
#include "ksayit_ttsplugin.h"
-FXPluginHandler::FXPluginHandler(QObject *parent, const char *name, KConfig *config)
- : QObject(parent, name), m_config(config)
+FXPluginHandler::FXPluginHandler(TQObject *parent, const char *name, KConfig *config)
+ : TQObject(parent, name), m_config(config)
{
m_mapPluginList.clear();
m_lstActivePlugins.clear();
@@ -36,7 +36,7 @@ FXPluginHandler::FXPluginHandler(QObject *parent, const char *name, KConfig *con
FXPluginHandler::~FXPluginHandler()
{
- QMap<QString, fx_struct>::Iterator mit;
+ TQMap<TQString, fx_struct>::Iterator mit;
for (mit=m_mapPluginList.begin(); mit!=m_mapPluginList.end(); ++mit){
if ( (*mit).p != 0 ){
@@ -50,7 +50,7 @@ void FXPluginHandler::searchPlugins()
{
kdDebug(100200) << "FXPluginHandler::searchPlugins()" << endl;
- QStringList sRegistered;
+ TQStringList sRegistered;
fx_struct plugin;
sRegistered.clear();
@@ -58,8 +58,8 @@ void FXPluginHandler::searchPlugins()
KTrader::OfferList offers = KTrader::self()->query("KSayIt/FXPlugin");
KLibFactory *factory = NULL;
- QString library = QString::null;
- QString name = QString::null;
+ TQString library = TQString::null;
+ TQString name = TQString::null;
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( QString(name) )){
- sRegistered.append( QString(name) );
+ if ( !sRegistered.contains( TQString(name) )){
+ sRegistered.append( TQString(name) );
plugin.name = name;
plugin.library = library;
- plugin.description = QString::null;
+ plugin.description = TQString::null;
plugin.EffectID = 0;
plugin.p = NULL;
m_mapPluginList[plugin.name] = plugin; // update Plugin Map
@@ -90,8 +90,8 @@ void FXPluginHandler::readConfiguration()
kdDebug(100200) << "+++ entering FXPluginHandler::readConfiguration()" << endl;
fx_struct plugin;
- QMap<QString, fx_struct>::Iterator mit;
- QStringList::Iterator lit;
+ TQMap<TQString, fx_struct>::Iterator mit;
+ TQStringList::Iterator lit;
// unload all plugins and destroy the effect objects
lit = m_lstActivePlugins.begin();
@@ -112,7 +112,7 @@ void FXPluginHandler::readConfiguration()
// load active plugins as given in config file
m_config->setGroup("Effect Stack Configuration");
- QStringList conf_active = m_config->readListEntry("Activated");
+ TQStringList conf_active = m_config->readListEntry("Activated");
KLibFactory *factory = NULL;
for (lit=conf_active.begin(); lit!=conf_active.end(); ++lit){ // for all in config
@@ -123,7 +123,7 @@ void FXPluginHandler::readConfiguration()
// load plugin
factory = KLibLoader::self()->factory( (plugin.library).latin1() );
if ( factory ){
- plugin.p = static_cast<FXPlugin*>( factory->create( (QObject*)this, (plugin.name).latin1() ) );
+ plugin.p = static_cast<FXPlugin*>( factory->create( (TQObject*)this, (plugin.name).latin1() ) );
if ( plugin.p ){ // Plugin found
plugin.p->setApplication( KApplication::kApplication() );
plugin.description = plugin.p->getDescription_KS();
@@ -138,11 +138,11 @@ void FXPluginHandler::readConfiguration()
}
-void FXPluginHandler::showEffectGUI(const QString &pname)
+void FXPluginHandler::showEffectGUI(const TQString &pname)
{
kdDebug(100200) << "FXPluginHandler::showEffectGUI(): " << pname << endl;
- QMap<QString, fx_struct>::Iterator mit;
+ TQMap<TQString, fx_struct>::Iterator mit;
fx_struct plugin;
// find plugin with name==pname in list and show its GUI
@@ -156,7 +156,7 @@ void FXPluginHandler::showEffectGUI(const QString &pname)
kdDebug(100200) << "Effect not active yet. Loading..." << endl;
KLibFactory *factory = KLibLoader::self()->factory( (plugin.library).latin1() );
if ( factory ){
- plugin.p = static_cast<FXPlugin*>( factory->create( (QObject*)this, (plugin.name).latin1() ) );
+ plugin.p = static_cast<FXPlugin*>( factory->create( (TQObject*)this, (plugin.name).latin1() ) );
if ( plugin.p ){ // Plugin found
plugin.p->setApplication( KApplication::kApplication() );
plugin.description = plugin.p->getDescription_KS();
@@ -173,14 +173,14 @@ void FXPluginHandler::showEffectGUI(const QString &pname)
}
-void FXPluginHandler::getPlugins(QStringList &pluginlist)
+void FXPluginHandler::getPlugins(TQStringList &pluginlist)
{
// kdDebug(100200) << "FXPluginHandler::getPlugins" << endl;
pluginlist.clear();
- QString sPname;
+ TQString sPname;
- QMap<QString, fx_struct>::Iterator mit;
+ TQMap<TQString, fx_struct>::Iterator mit;
for (mit=m_mapPluginList.begin(); mit!=m_mapPluginList.end(); ++mit){
sPname = (*mit).name; //testing
pluginlist.append( sPname );
@@ -188,13 +188,13 @@ void FXPluginHandler::getPlugins(QStringList &pluginlist)
}
-void FXPluginHandler::activateEffect(const QString &pname,
+void FXPluginHandler::activateEffect(const TQString &pname,
KArtsServer *server,
StereoEffectStack *fx_stack)
{
kdDebug(100200) << "FXPluginHandler::activateEffect: " << pname << endl;
- QMap<QString, fx_struct>::Iterator mit;
+ TQMap<TQString, fx_struct>::Iterator mit;
fx_struct plugin;
// find plugin with name==pname
@@ -215,7 +215,7 @@ void FXPluginHandler::deactivateEffects(StereoEffectStack *fx_stack)
{
kdDebug(100200) << "FXPluginHandler::deactivateEffects." << endl;
- QMap<QString, fx_struct>::Iterator mit;
+ TQMap<TQString, fx_struct>::Iterator mit;
fx_struct plugin;
for (mit=m_mapPluginList.begin(); mit!=m_mapPluginList.end(); ++mit){
diff --git a/ksayit/src/fxpluginhandler.h b/ksayit/src/fxpluginhandler.h
index 1a3d54a..43c820f 100644
--- a/ksayit/src/fxpluginhandler.h
+++ b/ksayit/src/fxpluginhandler.h
@@ -13,12 +13,12 @@
#define FXPLUGINHANDLER_H
// QT includes
-#include <qobject.h>
-#include <qlibrary.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
-// #include <qvaluelist.h>
+#include <tqobject.h>
+#include <tqlibrary.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+// #include <tqvaluelist.h>
// KDE includes
#include <kconfig.h>
@@ -36,9 +36,9 @@ using namespace Arts;
/** Internal structure of the effect plugin
*/
typedef struct {
- QString name; // KService::Ptr->name()
- QString library; // KService::Ptr->library()
- QString description;
+ TQString name; // KService::Ptr->name()
+ TQString library; // KService::Ptr->library()
+ TQString description;
long EffectID; // !=0, if effect is on the effect stack.
FXPlugin *p; // factory->create(...)
} fx_struct;
@@ -48,7 +48,7 @@ class FXPluginHandler : public QObject
{
Q_OBJECT
public:
- FXPluginHandler(QObject *parent = 0, const char *name = 0, KConfig *config=0);
+ FXPluginHandler(TQObject *parent = 0, const char *name = 0, KConfig *config=0);
~FXPluginHandler();
public: // Methods
@@ -64,14 +64,14 @@ public: // Methods
/** Shows the GUI to setup the effect named name
\param pname The name of the effect to configure.
*/
- void showEffectGUI(const QString &pname);
+ void showEffectGUI(const TQString &pname);
/** Activates the named effect
\param pname Name of the effect to activate.
\param server A pointer to the soundserver instance.
\param fx_stack A pointer to the effect stack of the soundserver.
*/
- void activateEffect(const QString &pname,
+ void activateEffect(const TQString &pname,
KArtsServer *server,
StereoEffectStack *fx_stack);
@@ -81,15 +81,15 @@ public: // Methods
void deactivateEffects(StereoEffectStack *fx_stack);
/** Returns a list of all available plugins.
- \param pluginlist A reference to a QStringList that contains the available plugins.
+ \param pluginlist A reference to a TQStringList that contains the available plugins.
*/
- void getPlugins(QStringList &pluginlist);
+ void getPlugins(TQStringList &pluginlist);
private: // Attributes
KConfig *m_config;
- QMap<QString, fx_struct> m_mapPluginList; // holds all plugins found on the system
- // QMap<QString, fx_struct> m_mapActivePlugins; // holds the active effects
- QStringList m_lstActivePlugins;
+ TQMap<TQString, fx_struct> m_mapPluginList; // holds all plugins found on the system
+ // TQMap<TQString, fx_struct> m_mapActivePlugins; // holds the active effects
+ TQStringList m_lstActivePlugins;
};
diff --git a/ksayit/src/fxsetupimpl.cpp b/ksayit/src/fxsetupimpl.cpp
index cb85080..fc0100e 100644
--- a/ksayit/src/fxsetupimpl.cpp
+++ b/ksayit/src/fxsetupimpl.cpp
@@ -16,8 +16,8 @@
***************************************************************************/
// QT includes
-#include <qstringlist.h>
-#include <qpushbutton.h>
+#include <tqstringlist.h>
+#include <tqpushbutton.h>
// KDE includes
#include <kdebug.h>
@@ -27,7 +27,7 @@
// #include "freeverbsetupimpl.h"
#include "fxpluginhandler.h"
-FX_SetupImpl::FX_SetupImpl(QWidget *parent, const char *name,
+FX_SetupImpl::FX_SetupImpl(TQWidget *parent, const char *name,
KConfig *config,
FXPluginHandler *fxpluginhandler )
: FX_Setup(parent,name), m_config(config), m_fxpluginhandler(fxpluginhandler)
@@ -89,18 +89,18 @@ void FX_SetupImpl::slotReload()
}
-void FX_SetupImpl::slotConfigureEffect(QListBoxItem *item)
+void FX_SetupImpl::slotConfigureEffect(TQListBoxItem *item)
{
m_fxpluginhandler->showEffectGUI(item->text());
}
-void FX_SetupImpl::Init(QStringList c_avail)
+void FX_SetupImpl::Init(TQStringList c_avail)
{
m_config->setGroup("Effect Stack Configuration");
- QStringList conf_active = m_config->readListEntry("Activated");
- QStringList c_active;
- QStringList::Iterator sit, it;
+ TQStringList conf_active = m_config->readListEntry("Activated");
+ TQStringList c_active;
+ TQStringList::Iterator sit, it;
listBox_Available->clear();
listBox_Active->clear();
@@ -135,7 +135,7 @@ void FX_SetupImpl::slotSaveWasClicked()
m_config->setGroup("Effect Stack Configuration");
// Read ListBox Available FX
- QStringList slist;
+ TQStringList slist;
for(uint i=0; i<listBox_Available->count(); i++){
slist.append( listBox_Available->text( (int)i) );
}
@@ -144,7 +144,7 @@ void FX_SetupImpl::slotSaveWasClicked()
// Read ListBox Activated FX
slist.clear();
- QString t;
+ TQString t;
for(uint i=0; i<listBox_Active->count(); i++){
t = listBox_Active->text( (int)i );
slist.append( t );
diff --git a/ksayit/src/fxsetupimpl.h b/ksayit/src/fxsetupimpl.h
index 403631d..ac256ed 100644
--- a/ksayit/src/fxsetupimpl.h
+++ b/ksayit/src/fxsetupimpl.h
@@ -19,8 +19,8 @@
#define FXSETUPIMPL_H
// QT includes
-#include <qwidget.h>
-#include <qlistbox.h>
+#include <tqwidget.h>
+#include <tqlistbox.h>
// KDE includes
@@ -39,7 +39,7 @@ class FX_SetupImpl : public FX_Setup {
Q_OBJECT
public:
- FX_SetupImpl(QWidget *parent=0, const char *name=0,
+ FX_SetupImpl(TQWidget *parent=0, const char *name=0,
KConfig *config=0,
FXPluginHandler *fxpluginhandler=0);
~FX_SetupImpl();
@@ -65,7 +65,7 @@ public slots:
Opens a modal dialog to configure the efffect.
\param item The double clicked item.
*/
- void slotConfigureEffect(QListBoxItem *item);
+ void slotConfigureEffect(TQListBoxItem *item);
/** Saves the configuration
*/
@@ -75,12 +75,12 @@ private: // Methods
/** Loads the configuration and initializes the widget.
\param c_avail List of available plugins.
*/
- void Init(QStringList c_avail);
+ void Init(TQStringList c_avail);
private:
KConfig *m_config;
FXPluginHandler *m_fxpluginhandler;
- QStringList pluginlist;
+ TQStringList pluginlist;
};
diff --git a/ksayit/src/ksayit.cpp b/ksayit/src/ksayit.cpp
index 131db8c..877c60a 100644
--- a/ksayit/src/ksayit.cpp
+++ b/ksayit/src/ksayit.cpp
@@ -17,11 +17,11 @@
#include <stdlib.h> // getenv, system
// include files for QT
-#include <qdir.h>
-#include <qapplication.h>
-#include <qdockwindow.h>
-#include <qfileinfo.h>
-#include <qfile.h>
+#include <tqdir.h>
+#include <tqapplication.h>
+#include <tqdockwindow.h>
+#include <tqfileinfo.h>
+#include <tqfile.h>
// include files for KDE
#include <klocale.h>
@@ -55,8 +55,8 @@
#define KSAYITUI "ksayitui.rc"
#define ID_STATUS_MSG 1
-KSayItApp::KSayItApp(QWidget* parent, const char* name, WFlags f,
- const QCString &objID)
+KSayItApp::KSayItApp(TQWidget* parent, const char* name, WFlags f,
+ const TQCString &objID)
: KMainWindow(parent, name, f), DCOPObject(objID)
{
config = NULL;
@@ -67,7 +67,7 @@ KSayItApp::KSayItApp(QWidget* parent, const char* name, WFlags f,
bkManager = NULL;
bkHandler = NULL;
bkMenu = NULL;
- m_currentBookmarkFile = QString::null;
+ m_currentBookmarkFile = TQString::null;
config=kapp->config();
m_kttslib = new KTTSDLib(this, "KTTSD-Library", kapp);
@@ -83,27 +83,27 @@ KSayItApp::KSayItApp(QWidget* parent, const char* name, WFlags f,
readOptions();
// connect TTS plugin handler to this object
- connect(m_kttslib, SIGNAL(signalFinished()),
- this, SLOT(slotTTSFinished()) );
+ connect(m_kttslib, TQT_SIGNAL(signalFinished()),
+ 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, SIGNAL(signalCallPreferences()),
- this, SLOT(slotPreferences()) );
+ connect(m_kttslib, TQT_SIGNAL(signalCallPreferences()),
+ this, TQT_SLOT(slotPreferences()) );
// init Clipboard
- cb = QApplication::clipboard();
- connect(cb, SIGNAL(dataChanged()), this, SLOT(slotClipboardChanged()) );
+ cb = TQApplication::clipboard();
+ connect(cb, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(slotClipboardChanged()) );
// create SystemTray object
tray = new KSayItSystemTray(this, "system_tray");
- connect(tray, SIGNAL(signalCallPreferences()), this, SLOT(slotPreferences()) );
- connect(tray, SIGNAL(signalSayActivated()), this, SLOT(slotSayText()) );
- connect(tray, SIGNAL(signalSayClipboard()), this, SLOT(slotSayClipboard()) );
- connect(tray, SIGNAL(signalShutUpActivated()), this, SLOT(slotStopActivated()) );
- connect(tray, SIGNAL(signalPauseActivated()), this, SLOT(slotPauseActivated()) );
- connect(tray, SIGNAL(signalNextActivated()), this, SLOT(slotNextSentenceActivated()) );
- connect(tray, SIGNAL(signalPrevActivated()), this, SLOT(slotPrevSentenceActivated()) );
+ 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()) );
tray->show();
tray->setEnabled(true);
@@ -141,61 +141,61 @@ KSayItApp::~KSayItApp()
void KSayItApp::initActions()
{
// Standard-Actions
- open = KStdAction::open(this, SLOT(slotFileOpen()), actionCollection());
- save = KStdAction::save(this, SLOT(slotFileSave()), actionCollection());
- saveAs = KStdAction::saveAs(this, SLOT(slotFileSaveAs()), actionCollection());
- KStdAction::quit(this, SLOT(slotFileQuit()), actionCollection());
- KStdAction::close(this, SLOT(slotCloseMainWindow()), actionCollection());
- cut = KStdAction::cut(view, SLOT(slotCut()), actionCollection());
- copy = KStdAction::copy(view, SLOT(slotCopy()), actionCollection());
- paste = KStdAction::paste(view, SLOT(slotPaste()), actionCollection());
- preferences = KStdAction::preferences(this, SLOT(slotPreferences()), actionCollection());
- KStdAction::keyBindings(this, SLOT(slotEditKeys()), actionCollection());
- KStdAction::configureToolbars(this, SLOT(slotConfigureToolbar()), actionCollection());
+ 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());
KStdAction::showToolbar("mainToolBar", actionCollection());
- statusBarAction = KStdAction::showStatusbar(this, SLOT(slotToggleStatusBar()), actionCollection());
+ statusBarAction = KStdAction::showStatusbar(this, TQT_SLOT(slotToggleStatusBar()), actionCollection());
// User defined actions
say = new KAction (i18n("Say"),
Qt::Key_F9,
- this, SLOT (slotSayText()),
+ this, TQT_SLOT (slotSayText()),
actionCollection(),
"say_it");
pause = new KAction (i18n("Pause"),
Qt::Key_Pause,
- this, SLOT (slotPauseActivated()),
+ this, TQT_SLOT (slotPauseActivated()),
actionCollection(),
"pause");
shutup = new KAction (i18n("Shut Up"),
Qt::Key_F10,
- this, SLOT (slotStopActivated()),
+ this, TQT_SLOT (slotStopActivated()),
actionCollection(),
"shut_up");
next_sentence = new KAction (i18n("Next Sentence"),
Qt::Key_Next,
- this, SLOT (slotNextSentenceActivated()),
+ this, TQT_SLOT (slotNextSentenceActivated()),
actionCollection(),
"next_sentence");
prev_sentence = new KAction (i18n("Previous Sentence"),
Qt::Key_Prior,
- this, SLOT(slotPrevSentenceActivated()),
+ this, TQT_SLOT(slotPrevSentenceActivated()),
actionCollection(),
"prev_sentence");
clear = new KAction (i18n("Clear"),
Qt::Key_F12,
- this, SLOT(slotClear()),
+ this, TQT_SLOT(slotClear()),
actionCollection(),
"clear");
edit = new KToggleAction( i18n("Edit Text"),
0,
- this, SLOT(slotEditToggled()),
+ this, TQT_SLOT(slotEditToggled()),
actionCollection(),
"edittext");
@@ -225,9 +225,9 @@ void KSayItApp::initActions()
}
-void KSayItApp::initBookmarkManager(const QString &filename)
+void KSayItApp::initBookmarkManager(const TQString &filename)
{
- QString bkFile = getBookmarkDir( filename );
+ TQString bkFile = getBookmarkDir( filename );
if ( bkFile.isNull() )
return;
@@ -247,14 +247,14 @@ void KSayItApp::initBookmarkManager(const QString &filename)
}
-void KSayItApp::slotNotifyBookmarkHandler(const QString &ID, const QString &title)
+void KSayItApp::slotNotifyBookmarkHandler(const TQString &ID, const TQString &title)
{
if ( bkHandler )
bkHandler->notifyBookmarkHandler(ID, title);
}
-void KSayItApp::slotDeleteBookmark(const QString &url, const QString &title)
+void KSayItApp::slotDeleteBookmark(const TQString &url, const TQString &title)
{
kdDebug(100200) << "KSayItApp::slotDeleteBookmark(" << url << ")" << endl;
if ( bkHandler )
@@ -262,16 +262,16 @@ void KSayItApp::slotDeleteBookmark(const QString &url, const QString &title)
}
-QString KSayItApp::getBookmarkDir(const QString &filename)
+TQString KSayItApp::getBookmarkDir(const TQString &filename)
{
- QString bkRelPath = "ksayit/ksayit_bookmarks/" + filename + ".bookmarks";
- QString bkFile;
+ TQString bkRelPath = "ksayit/ksayit_bookmarks/" + filename + ".bookmarks";
+ TQString bkFile;
bkFile = locateLocal("data", bkRelPath);
return bkFile;
}
-void KSayItApp::slotSetBookmarkFilename(const QString &newname)
+void KSayItApp::slotSetBookmarkFilename(const TQString &newname)
{
kdDebug(100200) << "KSayItApp::slotSetBookmarkFilename(" << newname << ")" << endl;
@@ -279,21 +279,21 @@ void KSayItApp::slotSetBookmarkFilename(const QString &newname)
}
-void KSayItApp::slotChangeBookmarkFilename(const QString &newname)
+void KSayItApp::slotChangeBookmarkFilename(const TQString &newname)
{
kdDebug(100200) << "KSayItApp::slotChangeBookmarkFilename(" << newname << ")" << endl;
if ( m_currentBookmarkFile.isNull() )
return;
- QString newbkFile = getBookmarkDir(newname);
+ TQString newbkFile = getBookmarkDir(newname);
if ( newbkFile.isNull() )
return;
// copy old bookmarkfile to new file
if ( m_currentBookmarkFile != newbkFile ){
- if ( QFile::exists(m_currentBookmarkFile) ){
- QString command = QString("cp %1 %2").arg(m_currentBookmarkFile).arg(newbkFile);
+ if ( TQFile::exists(m_currentBookmarkFile) ){
+ TQString command = TQString("cp %1 %2").arg(m_currentBookmarkFile).arg(newbkFile);
system( command.ascii() );
}
// install new BookmarkHandler based on the new file
@@ -302,9 +302,9 @@ void KSayItApp::slotChangeBookmarkFilename(const QString &newname)
}
-QString KSayItApp::setItemByBookmark( const QString &ID, const QString &title )
+TQString KSayItApp::setItemByBookmark( const TQString &ID, const TQString &title )
{
- QString result;
+ TQString result;
result = treeview->selectItemByID( ID, title );
return result;
}
@@ -325,17 +325,17 @@ void KSayItApp::initView()
view->setMinimumSize(view->sizeHint());
setCentralWidget(view);
// connections
- connect( view, SIGNAL(signalEnableCopyCut(bool)),
- this, SLOT(slotEnableCopyCut(bool)));
- connect( view, SIGNAL(signalShowStatus(const QString &)),
- this, SLOT(slotStatusMsg(const QString &)));
- connect( view, SIGNAL(signalSetCaption(const QString &)),
- this, SLOT(slotSetCaption(const QString &)));
- connect( view, SIGNAL(signalTextChanged(bool)),
- this, SLOT(slotTextChanged(bool)) );
+ connect( view, TQT_SIGNAL(signalEnableCopyCut(bool)),
+ this, TQT_SLOT(slotEnableCopyCut(bool)));
+ connect( view, TQT_SIGNAL(signalShowStatus(const TQString &)),
+ this, TQT_SLOT(slotStatusMsg(const TQString &)));
+ connect( view, TQT_SIGNAL(signalSetCaption(const TQString &)),
+ this, TQT_SLOT(slotSetCaption(const TQString &)));
+ connect( view, TQT_SIGNAL(signalTextChanged(bool)),
+ this, TQT_SLOT(slotTextChanged(bool)) );
// DockWindow
- QDockWindow *docview = new QDockWindow(QDockWindow::InDock, this, "docview");
+ TQDockWindow *docview = new TQDockWindow(TQDockWindow::InDock, this, "docview");
treeview = new DocTreeViewImpl(docview, "treeview");
treeview->enableContextMenus( true );
// treeview->clear();
@@ -344,22 +344,22 @@ void KSayItApp::initView()
this->setDockEnabled(docview, Qt::DockTop, false);
this->setDockEnabled(docview, Qt::DockBottom, false);
this->moveDockWindow(docview, Qt::DockLeft);
- connect( treeview, SIGNAL(signalContentChanged(const QString&)),
- this, SLOT(slotTreeViewChanged(const QString&)) );
- connect( treeview, SIGNAL(signalSetText(const QString&)),
- this, SLOT(slotSetText(const QString&)) );
- connect( treeview, SIGNAL(signalAllNodesProcessed()),
- this, SLOT(slotSayNode()) );
- connect( treeview, SIGNAL(signalEnableTextedit(bool)),
- this, SLOT(slotEnableTextedit(bool)) );
- connect( treeview, SIGNAL(signalNotifyBookmarkManager(const QString&, const QString&)),
- this, SLOT(slotNotifyBookmarkHandler(const QString&, const QString&)) );
- connect( treeview, SIGNAL(signalSetBookmarkFilename(const QString&)),
- this, SLOT(slotSetBookmarkFilename(const QString&)) );
- connect( treeview, SIGNAL(signalChangeBookmarkFilename(const QString&)),
- this, SLOT(slotChangeBookmarkFilename(const QString&)) );
- connect( treeview, SIGNAL(signalDeleteBookmark(const QString&, const QString&)),
- this, SLOT(slotDeleteBookmark(const QString&, const QString&)) );
+ connect( treeview, TQT_SIGNAL(signalContentChanged(const TQString&)),
+ this, TQT_SLOT(slotTreeViewChanged(const TQString&)) );
+ connect( treeview, TQT_SIGNAL(signalSetText(const TQString&)),
+ this, TQT_SLOT(slotSetText(const TQString&)) );
+ connect( treeview, TQT_SIGNAL(signalAllNodesProcessed()),
+ this, TQT_SLOT(slotSayNode()) );
+ connect( treeview, TQT_SIGNAL(signalEnableTextedit(bool)),
+ this, TQT_SLOT(slotEnableTextedit(bool)) );
+ connect( treeview, TQT_SIGNAL(signalNotifyBookmarkManager(const TQString&, const TQString&)),
+ this, TQT_SLOT(slotNotifyBookmarkHandler(const TQString&, const TQString&)) );
+ connect( treeview, TQT_SIGNAL(signalSetBookmarkFilename(const TQString&)),
+ this, TQT_SLOT(slotSetBookmarkFilename(const TQString&)) );
+ connect( treeview, TQT_SIGNAL(signalChangeBookmarkFilename(const TQString&)),
+ this, TQT_SLOT(slotChangeBookmarkFilename(const TQString&)) );
+ connect( treeview, TQT_SIGNAL(signalDeleteBookmark(const TQString&, const TQString&)),
+ this, TQT_SLOT(slotDeleteBookmark(const TQString&, const TQString&)) );
}
@@ -369,7 +369,7 @@ void KSayItApp::readOptions()
statusBarAction->setChecked(!statusBar()->isHidden());
}
-void KSayItApp::closeEvent(QCloseEvent *ce)
+void KSayItApp::closeEvent(TQCloseEvent *ce)
{
ce->ignore();
if ( !this->isVisible() ){
@@ -384,7 +384,7 @@ void KSayItApp::closeEvent(QCloseEvent *ce)
// DCOP FUNCTIONS
/////////////////////////////////////////////////////////////////////
-ASYNC KSayItApp::dcopSayText(QString msg)
+ASYNC KSayItApp::dcopSayText(TQString msg)
{
slotSetText( msg );
sayActivated();
@@ -412,7 +412,7 @@ ASYNC KSayItApp::dcopSayXmlFile(KURL url)
treeview->setEditMode( false );
}
}
- catch( QString err ){
+ catch( TQString err ){
KMessageBox::error(this, err);
save ->setEnabled(false);
saveAs->setEnabled(true);
@@ -425,7 +425,7 @@ ASYNC KSayItApp::dcopSayXmlFile(KURL url)
/////////////////////////////////////////////////////////////////////
-// SLOT IMPLEMENTATION
+// TQT_SLOT IMPLEMENTATION
/////////////////////////////////////////////////////////////////////
void KSayItApp::slotEditToggled()
@@ -451,7 +451,7 @@ void KSayItApp::slotConfigureToolbar()
{
saveMainWindowSettings( config, "MainWindow" );
KEditToolbar dlg(actionCollection(), KSAYITUI);
- connect(&dlg,SIGNAL(newToolbarConfig()),this,SLOT(slotNewToolbarConfig()));
+ connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(slotNewToolbarConfig()));
if (dlg.exec())
{
createGUI(KSAYITUI);
@@ -471,9 +471,9 @@ void KSayItApp::slotFileOpen()
m_enableChangeNotifications = false;
// open filerequester
- QString fn;
- QString usershome( getenv("HOME") );
- KURL url = KFileDialog::getOpenURL(usershome, QString::null, this, i18n("File to Speak") );
+ TQString fn;
+ TQString usershome( getenv("HOME") );
+ KURL url = KFileDialog::getOpenURL(usershome, TQString::null, this, i18n("File to Speak") );
try{
if ( !url.isEmpty() ){
resetView();
@@ -486,7 +486,7 @@ void KSayItApp::slotFileOpen()
bookmarkmenu->setEnabled(true);
}
}
- catch( QString err ){
+ catch( TQString err ){
KMessageBox::error(this, err);
save ->setEnabled(false);
saveAs->setEnabled(true);
@@ -505,7 +505,7 @@ void KSayItApp::slotFileSave()
save ->setEnabled(false);
saveAs->setEnabled(true);
}
- catch ( QString err )
+ catch ( TQString err )
{
KMessageBox::error(this, err);
save ->setEnabled(false);
@@ -523,7 +523,7 @@ void KSayItApp::slotFileSaveAs()
saveAs->setEnabled(true);
bookmarkmenu->setEnabled(true);
}
- catch ( QString err )
+ catch ( TQString err )
{
KMessageBox::error(this, err);
save ->setEnabled(true);
@@ -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?"), QString::null, KStdGuiItem::quit(), KStdGuiItem::cancel() );
+ int really = KMessageBox::questionYesNo( this, i18n("Do you really want to quit?"), TQString::null, KStdGuiItem::quit(), KStdGuiItem::cancel() );
if (really == KMessageBox::Yes){
slotSaveOptions();
kapp->quit();
@@ -578,7 +578,7 @@ void KSayItApp::slotToggleStatusBar()
}
-void KSayItApp::slotStatusMsg(const QString &text)
+void KSayItApp::slotStatusMsg(const TQString &text)
{
// change status message permanently
statusBar()->clear();
@@ -586,7 +586,7 @@ void KSayItApp::slotStatusMsg(const QString &text)
}
-void KSayItApp::slotSetCaption(const QString &caption)
+void KSayItApp::slotSetCaption(const TQString &caption)
{
this->setCaption(caption);
}
@@ -600,7 +600,7 @@ void KSayItApp::slotPreferences()
m_fxpluginhandler,
m_kttslib);
- if (prefs->exec() == QDialog::Accepted){
+ if (prefs->exec() == TQDialog::Accepted){
delete prefs;
m_kttslib->reloadConfiguration();
m_fxpluginhandler ->readConfiguration();
@@ -719,7 +719,7 @@ void KSayItApp::slotSayNode()
}
-void KSayItApp::slotSetText(const QString &text)
+void KSayItApp::slotSetText(const TQString &text)
{
// also invoked by the treeview for the each node
if ( text.isNull() )
@@ -739,7 +739,7 @@ void KSayItApp::sayActivated()
try {
m_kttslib->sayText();
}
- catch (QString err){
+ catch (TQString err){
kdDebug(100200) << "Exception catched in KSayItApp::sayActivated()" << endl;
KMessageBox::sorry(0, err, i18n("Unable to speak text"));
slotFinished();
@@ -813,7 +813,7 @@ void KSayItApp::setActions(int actions)
// Get the mask of supported actions from the plugin.
int mask = m_kttslib->getActions();
- kdDebug(100200) << QString("KSayItApp:PSA: %1").arg(mask, 0, 2) << endl;
+ kdDebug(100200) << TQString("KSayItApp:PSA: %1").arg(mask, 0, 2) << endl;
// disable actions not supported by the plugin
int ma = actions & mask;
@@ -849,7 +849,7 @@ void KSayItApp::setActions(int actions)
}
-void KSayItApp::slotTreeViewChanged(const QString &str)
+void KSayItApp::slotTreeViewChanged(const TQString &str)
{
kdDebug(100200) << "KSayItApp::slotTreeViewChanged()" << endl;
diff --git a/ksayit/src/ksayit.h b/ksayit/src/ksayit.h
index 6da1465..fc8fef9 100644
--- a/ksayit/src/ksayit.h
+++ b/ksayit/src/ksayit.h
@@ -25,8 +25,8 @@
using namespace std;
// include files for Qt
-#include <qstringlist.h>
-#include <qclipboard.h>
+#include <tqstringlist.h>
+#include <tqclipboard.h>
// include files for KDE
#include <kapplication.h>
@@ -73,15 +73,15 @@ class KSayItApp : public KMainWindow, public DCOPObject
public:
/** construtor of KSayItApp, calls all init functions to create the application.
*/
- KSayItApp(QWidget* parent=0, const char* name=0, WFlags f=0,
- const QCString &objID=0);
+ KSayItApp(TQWidget* parent=0, const char* name=0, WFlags f=0,
+ const TQCString &objID=0);
~KSayItApp();
k_dcop:
/** DCOP interface for say operation
\param msg The text to speak.
*/
- ASYNC dcopSayText(QString msg);
+ ASYNC dcopSayText(TQString msg);
/** DCOP interface for stop operation
*/
@@ -101,7 +101,7 @@ private slots:
/** Puts the given text on the Job-Stack of KTTSD.
* \param text The text to say.
*/
- void slotSetText(const QString &text);
+ void slotSetText(const TQString &text);
/** Called from the ListView widget after one or many
* 'setText'-Calls. Starts to say the text.
@@ -112,7 +112,7 @@ private slots:
* new content in the edit window must be shown.
* \str The new content of the EditView.
*/
- void slotTreeViewChanged(const QString &str);
+ void slotTreeViewChanged(const TQString &str);
/** save general Options like all bar positions and status as well as the geometry to
* the configuration file.
@@ -127,7 +127,7 @@ private slots:
* current actions.
* @param text the text that is displayed in the statusbar
*/
- void slotStatusMsg(const QString &text);
+ void slotStatusMsg(const TQString &text);
/** opens the Preferences-Dialog.
*/
@@ -167,7 +167,7 @@ private slots:
void slotEnableCopyCut(bool enable);
/** sets the Caption of the MainWindow */
- void slotSetCaption(const QString &caption);
+ void slotSetCaption(const TQString &caption);
/** called when the Text was changed.
* \param empty True if the TextEdit view is empty.
@@ -193,7 +193,7 @@ private slots:
/** Called to delete a bookmark
*/
- void slotDeleteBookmark(const QString &url, const QString &title);
+ void slotDeleteBookmark(const TQString &url, const TQString &title);
/** Called to edit bookmarks.
*/
@@ -245,7 +245,7 @@ private slots:
* Catches the signal from the TreeView object
* and forwards it to the BookmarkHandler object.
*/
- void slotNotifyBookmarkHandler(const QString &ID, const QString &title);
+ void slotNotifyBookmarkHandler(const TQString &ID, const TQString &title);
/**
* Copies the content of the current bookmark file to the
@@ -253,22 +253,22 @@ private slots:
* BookmarkHandler.
* \param newname The name of the new bookmark file.
*/
- void slotChangeBookmarkFilename(const QString &newname);
+ void slotChangeBookmarkFilename(const TQString &newname);
/** Loads bookmark file corresponding to the given file.
* \param newname The name of the new file.
*/
- void slotSetBookmarkFilename(const QString &newname);
+ void slotSetBookmarkFilename(const TQString &newname);
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 <tt>QString::null</tt>, if the operation was successfull,
+ * \returns <tt>TQString::null</tt>, if the operation was successfull,
* an error message, if the ID was not found.
*/
- QString setItemByBookmark( const QString &ID, const QString &title );
+ TQString setItemByBookmark( const TQString &ID, const TQString &title );
private: // Methods
/** read general Options again and initialize all variables.
@@ -284,7 +284,7 @@ private: // Methods
/**
*/
- void initBookmarkManager(const QString &filename);
+ void initBookmarkManager(const TQString &filename);
/** creates the centerwidget of the KTMainWindow instance and sets it as the view.
*/
@@ -300,7 +300,7 @@ private: // Methods
/** reimplemented from baseclass
*/
- virtual void closeEvent(QCloseEvent *ce);
+ virtual void closeEvent(TQCloseEvent *ce);
/** disable/enable Actions.
* \param actions An OR'ed integer of enum ACTIONS. A '1' is supposed
@@ -315,9 +315,9 @@ 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 QString::null if the operation was not successfull.
+ * Returns \p TQString::null if the operation was not successfull.
*/
- QString getBookmarkDir(const QString &filename);
+ TQString getBookmarkDir(const TQString &filename);
private:
@@ -350,14 +350,14 @@ private:
// Misc stuff
QClipboard *cb;
- QString clip;
+ TQString clip;
KTTSDLib *m_kttslib;
FXPluginHandler *m_fxpluginhandler;
bool m_ap_saying;
bool m_ap_paused;
bool m_textview_empty;
bool m_enableChangeNotifications;
- QString m_currentBookmarkFile;
+ TQString m_currentBookmarkFile;
};
diff --git a/ksayit/src/ksayit_fxplugin.h b/ksayit/src/ksayit_fxplugin.h
index 9956df6..852c522 100644
--- a/ksayit/src/ksayit_fxplugin.h
+++ b/ksayit/src/ksayit_fxplugin.h
@@ -13,8 +13,8 @@
#define FXPLUGIN_H
// QT includes
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
// KDE includes
#include <kapplication.h>
@@ -37,7 +37,7 @@ class FXPlugin : public QObject
{
// Q_OBJECT
public:
- FXPlugin(QObject *parent=0, const char* name=0){};
+ FXPlugin(TQObject *parent=0, const char* name=0){};
/** Sets the Main application object. Useful for config objects etc.
*/
@@ -49,12 +49,12 @@ public:
* The PluginHandler internally references to each effect plugin by this name.\n
* Has to be reimplemented by the plugin implementation.
*/
- virtual QString getName_KS() const = 0;
+ virtual TQString getName_KS() const = 0;
/** Returns the description of the plugin.\n
* Has to be reimplemented by the plugin implementation.
*/
- virtual QString getDescription_KS() const = 0;
+ virtual TQString getDescription_KS() const = 0;
/** Shows the GUI to configure the plugin. The configuration can to be
* stored in the global configuration file of KSayIt.\n
diff --git a/ksayit/src/ksayit_ttsplugin.h b/ksayit/src/ksayit_ttsplugin.h
index 1035993..e0f8d31 100644
--- a/ksayit/src/ksayit_ttsplugin.h
+++ b/ksayit/src/ksayit_ttsplugin.h
@@ -14,10 +14,10 @@
#define KSAYIT_TTSPLUGIN
// QT includes
-#include <qobject.h>
-#include <qwidget.h>
-#include <qframe.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqwidget.h>
+#include <tqframe.h>
+#include <tqstring.h>
// KDE includes
@@ -65,7 +65,7 @@
class TTSPlugin : public QObject
{
protected:
- TTSPlugin(QObject *parent, const char *name) : QObject(parent, name){};
+ TTSPlugin(TQObject *parent, const char *name) : TQObject(parent, name){};
public:
/** Returns the name of the plugin. This name is the unique identifier
@@ -74,12 +74,12 @@ public:
* The PluginHandler internally references to each TTS plugin by this name.\n
* Has to be reimplemented by the plugin implementation.
*/
- virtual QString getName_KS() const = 0;
+ virtual TQString getName_KS() const = 0;
/** Returns the description of the plugin.\n
* Has to be reimplemented by the plugin implementation.
*/
- virtual QString getDescription_KS() const = 0;
+ virtual TQString getDescription_KS() const = 0;
/** Returns the supported control actions of the plugin.
* It is represented as an OR'ed value of enum \pACTIONS.
@@ -88,10 +88,10 @@ public:
/** Returnes a pointer to the GUI widget to configure the plugin.\n
* Will be deleted by the PluginHandler.\n
- * \param frame A pointer to the QFrame object in which the dialog will
+ * \param frame A pointer to the TQFrame object in which the dialog will
* be embedded.
*/
- virtual const QWidget* getGUI_KS(QFrame *frame) = 0;
+ virtual const TQWidget* getGUI_KS(TQFrame *frame) = 0;
/** Let the plugin (re)load its configuration
*/
@@ -109,14 +109,14 @@ 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 QString::null.\n
+ * \p TQString::null.\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
* be performed by the status flags (see \p getStatus_KS()).
* \param text The text to speach.
*/
- virtual QString sayText_KS(const QString &text) = 0;
+ virtual TQString sayText_KS(const TQString &text) = 0;
/** Returns an OR'ed value of status bits of the plugin.\n
* Currently only \p TTS::AUDIOFILE is defined.\n This
diff --git a/ksayit/src/ksayitbookmarkhandler.cpp b/ksayit/src/ksayitbookmarkhandler.cpp
index b52cdd7..7a45247 100644
--- a/ksayit/src/ksayitbookmarkhandler.cpp
+++ b/ksayit/src/ksayitbookmarkhandler.cpp
@@ -11,7 +11,7 @@
//
// Qt include
-#include <qregexp.h>
+#include <tqregexp.h>
// KDE includes
#include <kdebug.h>
@@ -26,8 +26,8 @@
KSayItBookmarkHandler::KSayItBookmarkHandler(KBookmarkManager *bkManager, KSayItApp* parent)
: KBookmarkOwner(), m_bkManager(bkManager), m_parent(parent)
{
- m_ID = QString::null;
- m_title = QString::null;
+ m_ID = TQString::null;
+ m_title = TQString::null;
}
KSayItBookmarkHandler::~KSayItBookmarkHandler()
@@ -35,7 +35,7 @@ KSayItBookmarkHandler::~KSayItBookmarkHandler()
}
-void KSayItBookmarkHandler::notifyBookmarkHandler(const QString &ID, const QString &title)
+void KSayItBookmarkHandler::notifyBookmarkHandler(const TQString &ID, const TQString &title)
{
kdDebug(100200) << "KSayItBookmarkHandler::notifyBookmarkManager()" << endl;
@@ -44,15 +44,15 @@ void KSayItBookmarkHandler::notifyBookmarkHandler(const QString &ID, const QStri
}
-void KSayItBookmarkHandler::openBookmarkURL(const QString &url)
+void KSayItBookmarkHandler::openBookmarkURL(const TQString &url)
{
kdDebug(100200) << "KSayItBookmarkHandler::openBookmarkURL(" << url << ")" << endl;
- QString l_url = url;
- QString title = QString::null;
- QString type = l_url.section( "://", 0, 0 );
- QString ID = l_url.section( QRegExp("/+"), 1, 1 );
- QString err = QString::null;
+ TQString l_url = url;
+ TQString title = TQString::null;
+ TQString type = l_url.section( "://", 0, 0 );
+ TQString ID = l_url.section( TQRegExp("/+"), 1, 1 );
+ TQString err = TQString::null;
// Some checks
if ( type != "ksayit" ){
@@ -71,7 +71,7 @@ void KSayItBookmarkHandler::openBookmarkURL(const QString &url)
title = bookmark.text();
}
- QString result = QString::null;
+ TQString result = TQString::null;
result = m_parent->setItemByBookmark( ID, title );
if ( !result.isNull() ){
KMessageBox::sorry( 0, result, i18n("Bookmark not found") );
@@ -79,11 +79,11 @@ void KSayItBookmarkHandler::openBookmarkURL(const QString &url)
}
-QString KSayItBookmarkHandler::currentTitle() const
+TQString KSayItBookmarkHandler::currentTitle() const
{
kdDebug(100200) << "KSayItBookmarkHandler::currentTitle()" << endl;
- QString result;
+ TQString result;
if ( m_title.isEmpty()){
result = i18n("untitled");
} else {
@@ -94,18 +94,18 @@ QString KSayItBookmarkHandler::currentTitle() const
}
-QString KSayItBookmarkHandler::currentURL() const
+TQString KSayItBookmarkHandler::currentURL() const
{
kdDebug(100200) << "KSayItBookmarkHandler::currentURL()" << endl;
- QString url;
+ TQString url;
url = "ksayit://" + m_ID;
return url;
}
-void KSayItBookmarkHandler::deleteBookmark(const QString &url, const QString &title)
+void KSayItBookmarkHandler::deleteBookmark(const TQString &url, const TQString &title)
{
kdDebug(100200) << "KSayItBookmarkHandler::deleteBookmark()" << endl;
@@ -129,8 +129,8 @@ void KSayItBookmarkHandler::deleteBookmark(const QString &url, const QString &ti
int qty = 0;
qty = recursiveGetBkByTitle( bookmark, group, bkRoot, title );
if ( qty == 1 ){
- QString url = bookmark.url().url();
- QString title = bookmark.text();
+ TQString url = bookmark.url().url();
+ TQString title = bookmark.text();
group.deleteBookmark( bookmark );
m_bkManager->emitChanged( group );
m_bkManager->save(); // make persistent
@@ -142,7 +142,7 @@ bool KSayItBookmarkHandler::recursiveGetBkByURL(
KBookmark &bookmark,
KBookmarkGroup &group,
const KBookmarkGroup &bkGroup,
- const QString &url)
+ const TQString &url)
{
KBookmark bkNext;
bool found = false;
@@ -156,7 +156,7 @@ bool KSayItBookmarkHandler::recursiveGetBkByURL(
return true;
bkNext = bkGroup.next( bk );
} else {
- QString l_url = bk.url().url();
+ TQString l_url = bk.url().url();
if ( l_url == url ){
bookmark = bk;
group = bkGroup;
@@ -174,7 +174,7 @@ int KSayItBookmarkHandler::recursiveGetBkByTitle(
KBookmark &bookmark,
KBookmarkGroup &group,
const KBookmarkGroup &bkGroup,
- const QString &title)
+ const TQString &title)
{
KBookmark bkNext;
int qty = 0;
@@ -186,7 +186,7 @@ int KSayItBookmarkHandler::recursiveGetBkByTitle(
qty += recursiveGetBkByTitle( bookmark, group, bk.toGroup(), title );
bkNext = bkGroup.next( bk );
} else {
- QString l_title = bk.text();
+ TQString l_title = bk.text();
if ( l_title == title ){
bookmark = bk;
group = bkGroup;
@@ -208,7 +208,7 @@ void KSayItBookmarkHandler::traverseBookmarks(KBookmarkGroup bkGroup)
return;
KURL url;
- QString title;
+ TQString title;
KBookmark bkNext, bkPrev, bkNew;
KBookmark bk = bkGroup.first();
@@ -228,7 +228,7 @@ void KSayItBookmarkHandler::traverseBookmarks(KBookmarkGroup bkGroup)
//
// Modifications on URL/Title END
- bkNew = bkGroup.addBookmark( m_bkManager, title, url, QString::null, false );
+ bkNew = bkGroup.addBookmark( m_bkManager, title, url, TQString::null, false );
bkGroup.moveItem( bkNew, bkPrev );
bkGroup.deleteBookmark( bk );
}
diff --git a/ksayit/src/ksayitbookmarkhandler.h b/ksayit/src/ksayitbookmarkhandler.h
index edab6d6..018ea39 100644
--- a/ksayit/src/ksayitbookmarkhandler.h
+++ b/ksayit/src/ksayitbookmarkhandler.h
@@ -13,7 +13,7 @@
#define KSAYITBOOKMARKHANDLER_H
// Qt includes
-#include <qstring.h>
+#include <tqstring.h>
// KDE includes
#include <kbookmarkmanager.h>
@@ -40,14 +40,14 @@ public:
* Called when a bookmark in the menu was clicked.
* \param url The URL of the selected bookmark.
*/
- void openBookmarkURL(const QString &url);
+ void openBookmarkURL(const TQString &url);
/**
* Reimplemented from base class.\n
* Returns the Title when a new bookmark is about to be created.
* \returns The title of the bookmark.
*/
- QString currentTitle() const;
+ TQString currentTitle() const;
/**
@@ -55,20 +55,20 @@ public:
* Returns the URL when a new bookmark is about to be created.
* \returns The URL of the bookmark.
*/
- QString currentURL() const;
+ TQString currentURL() const;
/**
* Sets ID and title of the current TreeView item.
* \param ID The unique ID of the item.
* \param title The bookmark title of the item.
*/
- void notifyBookmarkHandler(const QString &ID, const QString &title);
+ void notifyBookmarkHandler(const TQString &ID, const TQString &title);
/**
* Deletes the bookmark designated by the given url.
* \param url The url of the bookmark.
*/
- void deleteBookmark(const QString &url, const QString &title);
+ void deleteBookmark(const TQString &url, const TQString &title);
/**
* Iterates recursively through all bookmarks below the
@@ -92,7 +92,7 @@ private:
KBookmark &bookmark,
KBookmarkGroup &group,
const KBookmarkGroup &bkGroup,
- const QString &url);
+ const TQString &url);
/**
* Searches the Bookmark designted by its URL.
@@ -108,10 +108,10 @@ private:
KBookmark &bookmark,
KBookmarkGroup &group,
const KBookmarkGroup &bkGroup,
- const QString &title);
+ const TQString &title);
private:
- QString m_ID;
- QString m_title;
+ TQString m_ID;
+ TQString m_title;
KBookmarkManager *m_bkManager;
KSayItApp *m_parent;
diff --git a/ksayit/src/ksayitsystemtray.cpp b/ksayit/src/ksayitsystemtray.cpp
index 82bda61..e2001cd 100644
--- a/ksayit/src/ksayitsystemtray.cpp
+++ b/ksayit/src/ksayitsystemtray.cpp
@@ -17,7 +17,7 @@
#include <iostream>
// QT includes
-#include <qtranslator.h>
+#include <tqtranslator.h>
// KDE includes
#include <kglobal.h>
@@ -26,7 +26,7 @@
// App specific includes
#include "ksayitsystemtray.h"
-KSayItSystemTray::KSayItSystemTray(QWidget *parent, const char *name)
+KSayItSystemTray::KSayItSystemTray(TQWidget *parent, const char *name)
: KSystemTray(parent,name)
{
initActions();
@@ -46,36 +46,36 @@ void KSayItSystemTray::initActions()
menu = this->contextMenu();
help = new KHelpMenu(this, kapp->aboutData(), false, actionCollection());
// Standard actions
- settings = KStdAction::preferences(this, SLOT(slotPreferences()), actionCollection());
- help_about = KStdAction::aboutApp(help, SLOT(aboutApplication()), actionCollection());
- help_kde = KStdAction::aboutKDE(help, SLOT(aboutKDE()), actionCollection());
+ settings = KStdAction::preferences(this, TQT_SLOT(slotPreferences()), actionCollection());
+ help_about = KStdAction::aboutApp(help, TQT_SLOT(aboutApplication()), actionCollection());
+ help_kde = KStdAction::aboutKDE(help, TQT_SLOT(aboutKDE()), actionCollection());
// User defined actions
say = new KAction(i18n("Say"),
"player_play",
0,
- this, SLOT (slotSayActivated()),
+ this, TQT_SLOT (slotSayActivated()),
actionCollection(),
"say_it");
shutup = new KAction(i18n("Shut Up"),
"player_stop",
0,
- this, SLOT (slotStopActivated()),
+ this, TQT_SLOT (slotStopActivated()),
actionCollection(),
"shut_up");
pause = new KAction (i18n("Pause"),
"player_pause",
0,
- this, SLOT (slotPauseActivated()),
+ this, TQT_SLOT (slotPauseActivated()),
actionCollection(),
"pause");
next_sentence = new KAction (i18n("Next Sentence"),
"2rightarrow",
0,
- this, SLOT (slotNextSentenceActivated()),
+ this, TQT_SLOT (slotNextSentenceActivated()),
actionCollection(),
"next_sentence");
@@ -83,7 +83,7 @@ void KSayItSystemTray::initActions()
prev_sentence = new KAction (i18n("Previous Sentence"),
"2leftarrow",
0,
- this, SLOT(slotPrevSentenceActivated()),
+ this, TQT_SLOT(slotPrevSentenceActivated()),
actionCollection(),
"prev_sentence");
@@ -112,12 +112,12 @@ void KSayItSystemTray::slotPreferences()
emit signalCallPreferences();
}
-void KSayItSystemTray::mousePressEvent(QMouseEvent *me)
+void KSayItSystemTray::mousePressEvent(TQMouseEvent *me)
{
_state->mousePressEvent(this, me);
}
-void KSayItSystemTray::mouseReleaseEvent(QMouseEvent *me)
+void KSayItSystemTray::mouseReleaseEvent(TQMouseEvent *me)
{
_state->mouseReleaseEvent(this, me);
}
@@ -170,12 +170,12 @@ void KSayItSystemTray::setActions(bool sayEnabled, bool pauseEnabled, bool shutu
}
-void KSayItSystemTray::normalMousePressEvent(QMouseEvent *e)
+void KSayItSystemTray::normalMousePressEvent(TQMouseEvent *e)
{
KSystemTray::mousePressEvent(e);
}
-void KSayItSystemTray::normalMouseReleaseEvent(QMouseEvent *e)
+void KSayItSystemTray::normalMouseReleaseEvent(TQMouseEvent *e)
{
KSystemTray::mouseReleaseEvent(e);
}
@@ -194,12 +194,12 @@ State::State(){
State::~State(){
}
-void State::mousePressEvent(KSayItSystemTray *caller, QMouseEvent *e)
+void State::mousePressEvent(KSayItSystemTray *caller, TQMouseEvent *e)
{
// reimplemented by subclasses
}
-void State::mouseReleaseEvent(KSayItSystemTray *caller, QMouseEvent *e)
+void State::mouseReleaseEvent(KSayItSystemTray *caller, TQMouseEvent *e)
{
// reimplemented by subclasses
}
@@ -219,12 +219,12 @@ void State::say(KSayItSystemTray *caller)
caller->sayClipboard();
}
-void State::mousePressEventCall(KSayItSystemTray *caller, QMouseEvent *e)
+void State::mousePressEventCall(KSayItSystemTray *caller, TQMouseEvent *e)
{
caller->normalMousePressEvent(e);
}
-void State::mouseReleaseEventCall(KSayItSystemTray *caller, QMouseEvent *e)
+void State::mouseReleaseEventCall(KSayItSystemTray *caller, TQMouseEvent *e)
{
caller->normalMouseReleaseEvent(e);
}
@@ -251,16 +251,16 @@ void StateWAIT::setContext(KSayItSystemTray *caller)
caller->setPixmap( m_traypixmap );
}
-void StateWAIT::mousePressEvent(KSayItSystemTray *caller, QMouseEvent *e)
+void StateWAIT::mousePressEvent(KSayItSystemTray *caller, TQMouseEvent *e)
{
if (e->button()==LeftButton){ // left Mouse-button pressed
- QWidget::mousePressEvent(e); // do nothing (see mouseReleaseEvent)
+ TQWidget::mousePressEvent(e); // do nothing (see mouseReleaseEvent)
} else {
mousePressEventCall(caller, e); // normal mouse-handling
}
}
-void StateWAIT::mouseReleaseEvent(KSayItSystemTray *caller, QMouseEvent *e)
+void StateWAIT::mouseReleaseEvent(KSayItSystemTray *caller, TQMouseEvent *e)
{
if (e->button()==LeftButton){ // left Mouse-button released
say(caller);
@@ -292,19 +292,19 @@ void StateSAY::setContext(KSayItSystemTray *caller)
caller->setPixmap( m_traypixmap );
}
-void StateSAY::mousePressEvent(KSayItSystemTray *caller, QMouseEvent *e)
+void StateSAY::mousePressEvent(KSayItSystemTray *caller, TQMouseEvent *e)
{
if (e->button()==LeftButton){ // left Mouse-button pressed
- QWidget::mousePressEvent(e); // do nothing (see mouseReleaseEvent)
+ TQWidget::mousePressEvent(e); // do nothing (see mouseReleaseEvent)
} else {
mousePressEventCall(caller, e); // normal mouse-handling
}
}
-void StateSAY::mouseReleaseEvent(KSayItSystemTray *caller, QMouseEvent *e)
+void StateSAY::mouseReleaseEvent(KSayItSystemTray *caller, TQMouseEvent *e)
{
if (e->button()==LeftButton){ // left Mouse-button released
- QWidget::mouseReleaseEvent(e); // do nothing (see mouseReleaseEvent)
+ TQWidget::mouseReleaseEvent(e); // do nothing (see mouseReleaseEvent)
} else {
mouseReleaseEventCall(caller, e); // normal mouse-handling
}
@@ -334,19 +334,19 @@ void StateCLIPEMPTY::setContext(KSayItSystemTray *caller)
caller->setPixmap( m_traypixmap );
}
-void StateCLIPEMPTY::mousePressEvent(KSayItSystemTray *caller, QMouseEvent *e)
+void StateCLIPEMPTY::mousePressEvent(KSayItSystemTray *caller, TQMouseEvent *e)
{
if (e->button()==LeftButton){ // left Mouse-button pressed
- QWidget::mousePressEvent(e); // do nothing (see mouseReleaseEvent)
+ TQWidget::mousePressEvent(e); // do nothing (see mouseReleaseEvent)
} else {
mousePressEventCall(caller, e); // normal mouse-handling
}
}
-void StateCLIPEMPTY::mouseReleaseEvent(KSayItSystemTray *caller, QMouseEvent *e)
+void StateCLIPEMPTY::mouseReleaseEvent(KSayItSystemTray *caller, TQMouseEvent *e)
{
if (e->button()==LeftButton){ // left Mouse-button released
- QWidget::mouseReleaseEvent(e); // do nothing (see mouseReleaseEvent)
+ 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 90db592..90b15fb 100644
--- a/ksayit/src/ksayitsystemtray.h
+++ b/ksayit/src/ksayitsystemtray.h
@@ -19,8 +19,8 @@
#define KSAYITSYSTEMTRAY_H
// QT includes
-#include <qwidget.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
// KDE includes
#include <kapplication.h>
@@ -43,7 +43,7 @@ class KSayItSystemTray : public KSystemTray {
friend class State;
public:
- KSayItSystemTray(QWidget *parent=0, const char *name=0);
+ KSayItSystemTray(TQWidget *parent=0, const char *name=0);
~KSayItSystemTray();
signals:
@@ -105,19 +105,19 @@ public:
protected: // Methods
/** Reimplementation from base class
*/
- void mousePressEvent(QMouseEvent *);
+ void mousePressEvent(TQMouseEvent *);
/** Reimplementation from base class
*/
- void mouseReleaseEvent(QMouseEvent *);
+ void mouseReleaseEvent(TQMouseEvent *);
/** KSystemTray default mouse handling
*/
- void normalMousePressEvent(QMouseEvent *e);
+ void normalMousePressEvent(TQMouseEvent *e);
/** KSystemTray default mouse handling
*/
- void normalMouseReleaseEvent(QMouseEvent *e);
+ void normalMouseReleaseEvent(TQMouseEvent *e);
/** Called if the Tray icon was clicked.
*/
@@ -153,15 +153,15 @@ public:
State();
~State();
- virtual void mousePressEvent(KSayItSystemTray *caller, QMouseEvent *e);
- virtual void mouseReleaseEvent(KSayItSystemTray *caller, QMouseEvent *e);
+ virtual void mousePressEvent(KSayItSystemTray *caller, TQMouseEvent *e);
+ virtual void mouseReleaseEvent(KSayItSystemTray *caller, TQMouseEvent *e);
virtual void setContext(KSayItSystemTray *caller);
protected:
void changeState(KSayItSystemTray *caller, State *state);
void say(KSayItSystemTray *caller);
- void mousePressEventCall(KSayItSystemTray *caller, QMouseEvent *e);
- void mouseReleaseEventCall(KSayItSystemTray *caller, QMouseEvent *e);
+ void mousePressEventCall(KSayItSystemTray *caller, TQMouseEvent *e);
+ void mouseReleaseEventCall(KSayItSystemTray *caller, TQMouseEvent *e);
};
@@ -175,13 +175,13 @@ public:
protected:
StateWAIT();
- void mousePressEvent(KSayItSystemTray *caller, QMouseEvent *e);
- void mouseReleaseEvent(KSayItSystemTray *caller, QMouseEvent *e);
+ void mousePressEvent(KSayItSystemTray *caller, TQMouseEvent *e);
+ void mouseReleaseEvent(KSayItSystemTray *caller, TQMouseEvent *e);
void setContext(KSayItSystemTray *caller);
private:
static StateWAIT *_instance;
- QPixmap m_traypixmap;
+ TQPixmap m_traypixmap;
};
@@ -195,13 +195,13 @@ public:
protected:
StateSAY();
- void mousePressEvent(KSayItSystemTray *caller, QMouseEvent *e);
- void mouseReleaseEvent(KSayItSystemTray *caller, QMouseEvent *e);
+ void mousePressEvent(KSayItSystemTray *caller, TQMouseEvent *e);
+ void mouseReleaseEvent(KSayItSystemTray *caller, TQMouseEvent *e);
void setContext(KSayItSystemTray *caller);
private:
static StateSAY *_instance;
- QPixmap m_traypixmap;
+ TQPixmap m_traypixmap;
};
@@ -215,13 +215,13 @@ public:
protected:
StateCLIPEMPTY();
- void mousePressEvent(KSayItSystemTray *caller, QMouseEvent *e);
- void mouseReleaseEvent(KSayItSystemTray *caller, QMouseEvent *e);
+ void mousePressEvent(KSayItSystemTray *caller, TQMouseEvent *e);
+ void mouseReleaseEvent(KSayItSystemTray *caller, TQMouseEvent *e);
void setContext(KSayItSystemTray *caller);
private:
static StateCLIPEMPTY *_instance;
- QPixmap m_traypixmap;
+ TQPixmap m_traypixmap;
};
diff --git a/ksayit/src/ksayitviewimpl.cpp b/ksayit/src/ksayitviewimpl.cpp
index e619f8c..dfda154 100644
--- a/ksayit/src/ksayitviewimpl.cpp
+++ b/ksayit/src/ksayitviewimpl.cpp
@@ -20,9 +20,9 @@
using namespace std;
// QT includes
-#include <qradiobutton.h>
-#include <qtextstream.h>
-#include <qstring.h>
+#include <tqradiobutton.h>
+#include <tqtextstream.h>
+#include <tqstring.h>
// KDE includes
#include <kdebug.h>
@@ -33,7 +33,7 @@ using namespace std;
// App specific includes
#include "ksayitviewimpl.h"
-KSayItViewImpl::KSayItViewImpl(QWidget *parent, const char *name ) : KSayItView(parent,name) {
+KSayItViewImpl::KSayItViewImpl(TQWidget *parent, const char *name ) : KSayItView(parent,name) {
// some presets
@@ -41,7 +41,7 @@ KSayItViewImpl::KSayItViewImpl(QWidget *parent, const char *name ) : KSayItView(
KSayItViewImpl::~KSayItViewImpl(){
}
-QString& KSayItViewImpl::getText(){
+TQString& KSayItViewImpl::getText(){
t = TextEdit->text();
return t;
}
@@ -104,7 +104,7 @@ void KSayItViewImpl::textClear()
TextEdit->clear();
}
-void KSayItViewImpl::setText(const QString &text)
+void KSayItViewImpl::setText(const TQString &text)
{
// set text to text
TextEdit->setText( text );
diff --git a/ksayit/src/ksayitviewimpl.h b/ksayit/src/ksayitviewimpl.h
index fea6c36..eb288e7 100644
--- a/ksayit/src/ksayitviewimpl.h
+++ b/ksayit/src/ksayitviewimpl.h
@@ -19,8 +19,8 @@
#define KSAYITVIEWIMPL_H
// QT includes
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
// KDE includes
@@ -35,12 +35,12 @@ class KSayItViewImpl : public KSayItView {
Q_OBJECT
public:
- KSayItViewImpl(QWidget *parent=0, const char *name=0);
+ KSayItViewImpl(TQWidget *parent=0, const char *name=0);
~KSayItViewImpl();
signals:
- void signalSetCaption(const QString &caption);
- void signalShowStatus(const QString &status);
+ void signalSetCaption(const TQString &caption);
+ void signalShowStatus(const TQString &status);
void signalEnableCopyCut(bool enable);
/** Emitted when the text in the TextEditor view cahnges.
@@ -73,11 +73,11 @@ private slots:
public: // Methods
/** Returns the text of the TextEdit-Widget
*/
- QString& getText();
+ TQString& getText();
/** Set the content of the textEdit-Widget to text
*/
- void setText(const QString &text);
+ void setText(const TQString &text);
/** Enables/disables the Textedit
* \param enable true=enabled, false=diabled
@@ -89,7 +89,7 @@ public: // Methods
void textClear();
private:
- QString t;
+ TQString t;
};
diff --git a/ksayit/src/main.cpp b/ksayit/src/main.cpp
index 9dcf0fe..61935da 100644
--- a/ksayit/src/main.cpp
+++ b/ksayit/src/main.cpp
@@ -52,7 +52,7 @@ int main(int argc, char *argv[])
KArtsDispatcher dispatcher;
// setup DCOP
- QCString appID = app.dcopClient()->registerAs( app.name(), false );
+ TQCString appID = app.dcopClient()->registerAs( app.name(), false );
KSayItApp *ksayit = new KSayItApp(0, "MainWindow", 0, appID);
// ksayit->hide();
diff --git a/ksayit/src/parasaxparser.cpp b/ksayit/src/parasaxparser.cpp
index 575df06..9a61e0a 100644
--- a/ksayit/src/parasaxparser.cpp
+++ b/ksayit/src/parasaxparser.cpp
@@ -22,7 +22,7 @@
ParaSaxParser::ParaSaxParser()
{
- m_reader = new QXmlSimpleReader();
+ m_reader = new TQXmlSimpleReader();
m_handler = new SaxHandler();
m_reader->setContentHandler(m_handler);
@@ -30,8 +30,8 @@ ParaSaxParser::ParaSaxParser()
m_reader->setEntityResolver(m_handler);
m_reader->setDeclHandler(m_handler);
- m_XmlInputHeader = QString::null;
- m_XmlInputBody = QString::null;
+ m_XmlInputHeader = TQString::null;
+ m_XmlInputBody = TQString::null;
}
ParaSaxParser::~ParaSaxParser()
@@ -51,23 +51,23 @@ ParaSaxParser* ParaSaxParser::Instance()
}
-void ParaSaxParser::setProcessingInstruction(const QString &data)
+void ParaSaxParser::setProcessingInstruction(const TQString &data)
{
m_XmlInputHeader = data;
}
-void ParaSaxParser::setData(const QString &data)
+void ParaSaxParser::setData(const TQString &data)
{
m_XmlInputBody = data;
}
-void ParaSaxParser::getText(QString &data)
+void ParaSaxParser::getText(TQString &data)
{
- QString XmlPart = m_XmlInputHeader + m_XmlInputBody;
+ TQString XmlPart = m_XmlInputHeader + m_XmlInputBody;
- QXmlInputSource input;
+ TQXmlInputSource input;
input.setData(XmlPart);
m_handler->reset();
@@ -78,12 +78,12 @@ void ParaSaxParser::getText(QString &data)
}
-void ParaSaxParser::getRTFText(QString &data)
+void ParaSaxParser::getRTFText(TQString &data)
{
- QString XmlPart = m_XmlInputHeader + m_XmlInputBody;
+ TQString XmlPart = m_XmlInputHeader + m_XmlInputBody;
kdDebug(100200) << "ParaSaxParser::getRTFText(): " << XmlPart << endl;
- QXmlInputSource input;
+ TQXmlInputSource input;
input.setData(XmlPart);
m_handler->reset();
diff --git a/ksayit/src/parasaxparser.h b/ksayit/src/parasaxparser.h
index e76d652..6f46156 100644
--- a/ksayit/src/parasaxparser.h
+++ b/ksayit/src/parasaxparser.h
@@ -13,8 +13,8 @@
#define PARASAXPARSER_H
// Qt includes
-#include <qxml.h>
-#include <qstring.h>
+#include <tqxml.h>
+#include <tqstring.h>
// App specific includes
#include "saxhandler.h"
@@ -39,27 +39,27 @@ public:
* info, e.g. to resolve entities defined in the internal DTD.
* \param data The header (preamble) of the DocBook document.
*/
- void setProcessingInstruction(const QString &data);
+ void setProcessingInstruction(const TQString &data);
/**
* This is the 'para' element to parse. It has to be encapsulated
* in <para> and </para>. Nested 'para' elements are not supported.
* \param data See description.
*/
- void setData(const QString &data);
+ void setData(const TQString &data);
/**
* Returns the pure text content of the paragraph without tags.
* \param data See description.
*/
- void getText(QString &data);
+ void getText(TQString &data);
/**
* Returns the text in RTF format, i.e. replaces DocBook tags
* with RTF tags.
* \param data See description.
*/
- void getRTFText(QString &data);
+ void getRTFText(TQString &data);
protected:
ParaSaxParser();
@@ -67,9 +67,9 @@ protected:
private:
static ParaSaxParser* _instance;
SaxHandler* m_handler;
- QXmlSimpleReader* m_reader;
- QString m_XmlInputHeader;
- QString m_XmlInputBody;
+ TQXmlSimpleReader* m_reader;
+ TQString m_XmlInputHeader;
+ TQString m_XmlInputBody;
};
diff --git a/ksayit/src/saxhandler.cpp b/ksayit/src/saxhandler.cpp
index 2f8d49c..9f6354c 100644
--- a/ksayit/src/saxhandler.cpp
+++ b/ksayit/src/saxhandler.cpp
@@ -21,9 +21,9 @@
#include "saxhandler.h"
SaxHandler::SaxHandler()
- : QXmlDefaultHandler()
+ : TQXmlDefaultHandler()
{
- m_output = QString::null;
+ m_output = TQString::null;
m_rtf = true;
m_tagmap["action"] = "B";
m_tagmap["application"] = "B";
@@ -74,21 +74,21 @@ void SaxHandler::setRTF(bool rtf)
}
-bool SaxHandler::startElement(const QString &,
- const QString &,
- const QString & qName,
- const QXmlAttributes & atts )
+bool SaxHandler::startElement(const TQString &,
+ const TQString &,
+ const TQString & qName,
+ const TQXmlAttributes & atts )
{
if ( !m_rtf )
return true;
- QString tag = qName.lower();
+ TQString tag = qName.lower();
TagMapT::iterator it;
it = m_tagmap.find(tag);
if ( it != m_tagmap.end() ){
// tag found in hash table
- QString rtftag = (*it).second;
+ TQString rtftag = (*it).second;
m_output += "<" + rtftag + ">";
}
@@ -96,20 +96,20 @@ bool SaxHandler::startElement(const QString &,
}
-bool SaxHandler::endElement(const QString &,
- const QString &,
- const QString & qName)
+bool SaxHandler::endElement(const TQString &,
+ const TQString &,
+ const TQString & qName)
{
if ( !m_rtf )
return true;
- QString tag = qName.lower();
+ TQString tag = qName.lower();
TagMapT::iterator it;
it = m_tagmap.find(tag);
if ( it != m_tagmap.end() ){
// tag found in hash table
- QString rtftag = (*it).second;
+ TQString rtftag = (*it).second;
m_output += "</" + rtftag.section(" ", 0, 0) + ">";
}
@@ -117,50 +117,50 @@ bool SaxHandler::endElement(const QString &,
}
-bool SaxHandler::characters(const QString & ch)
+bool SaxHandler::characters(const TQString & ch)
{
m_output += ch;
return true;
}
-bool SaxHandler::fatalError(const QXmlParseException &exc)
+bool SaxHandler::fatalError(const TQXmlParseException &exc)
{
- QString err = i18n("Fatal error while parsing XML-Paragraph:\n");
+ TQString err = i18n("Fatal error while parsing XML-Paragraph:\n");
err += i18n("%1, Line: %2").arg(exc.message()).arg(exc.lineNumber());
KMessageBox::error(0, err, i18n("Fatal error") );
return false;
}
-bool SaxHandler::resolveEntity(const QString &publicId,
- const QString &systemId,
- QXmlInputSource* &ret)
+bool SaxHandler::resolveEntity(const TQString &publicId,
+ const TQString &systemId,
+ TQXmlInputSource* &ret)
{
return true;
}
-bool SaxHandler::externalEntityDecl(const QString & name,
- const QString & publicId,
- const QString & systemId)
+bool SaxHandler::externalEntityDecl(const TQString & name,
+ const TQString & publicId,
+ const TQString & systemId)
{
kdDebug(100200) << "externalEntityDecl(): " << name << ", " << publicId << ", " << systemId << endl;
return true;
}
-bool SaxHandler::internalEntityDecl(const QString & name,
- const QString & value)
+bool SaxHandler::internalEntityDecl(const TQString & name,
+ const TQString & value)
{
kdDebug() << "internalEntityDecl(): " << name << ", " << value << endl;
return true;
}
-bool SaxHandler::skippedEntity(const QString &name)
+bool SaxHandler::skippedEntity(const TQString &name)
{
- QString warn = i18n("Unresolved entity found: %1.\n").arg(name);
+ TQString warn = i18n("Unresolved entity found: %1.\n").arg(name);
warn += i18n("KSayIt does not support DocBook files with external entities. ");
warn += i18n("Parsing can continue, but the resulting text will contain gaps.");
@@ -173,7 +173,7 @@ bool SaxHandler::skippedEntity(const QString &name)
}
-void SaxHandler::getData( QString &data ) const
+void SaxHandler::getData( TQString &data ) const
{
data = m_output;
}
@@ -181,7 +181,7 @@ void SaxHandler::getData( QString &data ) const
void SaxHandler::reset()
{
- m_output = QString::null;
+ m_output = TQString::null;
}
diff --git a/ksayit/src/saxhandler.h b/ksayit/src/saxhandler.h
index 45061f3..4e611b7 100644
--- a/ksayit/src/saxhandler.h
+++ b/ksayit/src/saxhandler.h
@@ -17,10 +17,10 @@
using namespace std;
// Qt includes
-#include <qxml.h>
-#include <qstring.h>
+#include <tqxml.h>
+#include <tqstring.h>
-typedef map<QString, QString> TagMapT;
+typedef map<TQString, TQString> TagMapT;
/**
@@ -33,36 +33,36 @@ public:
~SaxHandler();
// Reimplementations from base class
- bool startElement(const QString &namespaceURI,
- const QString &localName,
- const QString &qName,
- const QXmlAttributes &atts );
+ bool startElement(const TQString &namespaceURI,
+ const TQString &localName,
+ const TQString &qName,
+ const TQXmlAttributes &atts );
- bool endElement(const QString &namespaceURI,
- const QString &localName,
- const QString &qName);
+ bool endElement(const TQString &namespaceURI,
+ const TQString &localName,
+ const TQString &qName);
- bool characters(const QString &ch);
+ bool characters(const TQString &ch);
- bool fatalError(const QXmlParseException &exc);
+ bool fatalError(const TQXmlParseException &exc);
- bool resolveEntity(const QString &publicId,
- const QString &systemId,
- QXmlInputSource* &ret);
+ bool resolveEntity(const TQString &publicId,
+ const TQString &systemId,
+ TQXmlInputSource* &ret);
- bool externalEntityDecl(const QString &name,
- const QString &publicId,
- const QString &systemId);
+ bool externalEntityDecl(const TQString &name,
+ const TQString &publicId,
+ const TQString &systemId);
- bool internalEntityDecl(const QString &name,
- const QString &value);
+ bool internalEntityDecl(const TQString &name,
+ const TQString &value);
- bool skippedEntity(const QString &name);
+ bool skippedEntity(const TQString &name);
/**
* Returns the parser result.
*/
- void getData( QString &data ) const;
+ void getData( TQString &data ) const;
/**
* Reset
@@ -78,7 +78,7 @@ public:
private:
- QString m_output;
+ TQString m_output;
bool m_rtf;
TagMapT m_tagmap;
diff --git a/ksayit/src/voicesetupdlg.cpp b/ksayit/src/voicesetupdlg.cpp
index bdf6db3..d8df70a 100644
--- a/ksayit/src/voicesetupdlg.cpp
+++ b/ksayit/src/voicesetupdlg.cpp
@@ -19,12 +19,12 @@
// using namespace std;
// QT includes
-#include <qpixmap.h>
-#include <qstringlist.h>
-#include <qcombobox.h>
-#include <qcolor.h>
-#include <qlayout.h>
-#include <qwidget.h>
+#include <tqpixmap.h>
+#include <tqstringlist.h>
+#include <tqcombobox.h>
+#include <tqcolor.h>
+#include <tqlayout.h>
+#include <tqwidget.h>
// KDE includes
#include <kdebug.h>
@@ -39,7 +39,7 @@
#include "fxpluginhandler.h"
#include "kttsdlib.h"
-VoiceSetupDlg::VoiceSetupDlg(QWidget *parent, const char *name, const QString &caption,
+VoiceSetupDlg::VoiceSetupDlg(TQWidget *parent, const char *name, const TQString &caption,
bool modal,
KConfig *config,
FXPluginHandler *fxpluginhandler,
@@ -51,7 +51,7 @@ VoiceSetupDlg::VoiceSetupDlg(QWidget *parent, const char *name, const QString &c
{
setIconListAllVisible(true);
- connect (this, SIGNAL(aboutToShowPage(QWidget*)), this, SLOT(slotPageChanged(QWidget*)));
+ connect (this, TQT_SIGNAL(aboutToShowPage(TQWidget*)), this, TQT_SLOT(slotPageChanged(TQWidget*)));
initVoicePage();
initFXPage();
@@ -66,26 +66,26 @@ VoiceSetupDlg::~VoiceSetupDlg()
void VoiceSetupDlg::initVoicePage()
{
- QPixmap icon = KGlobal::iconLoader()->loadIcon("ksayit", KIcon::Toolbar, KIcon::SizeMedium);
- QFrame *voicePage = addPage( i18n( "Voice" ), i18n("Voice Settings"), icon );
- QVBoxLayout *voiceLayout = new QVBoxLayout( voicePage, 0, spacingHint() );
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon("ksayit", KIcon::Toolbar, KIcon::SizeMedium);
+ TQFrame *voicePage = addPage( i18n( "Voice" ), i18n("Voice Settings"), icon );
+ TQVBoxLayout *voiceLayout = new TQVBoxLayout( voicePage, 0, spacingHint() );
- const QWidget *voiceDialog = m_kttslib->getGUI( voicePage );
- voiceLayout->addWidget( const_cast<QWidget*>(voiceDialog) );
+ const TQWidget *voiceDialog = m_kttslib->getGUI( voicePage );
+ voiceLayout->addWidget( const_cast<TQWidget*>(voiceDialog) );
}
void VoiceSetupDlg::initFXPage()
{
- QPixmap icon = KGlobal::iconLoader()->loadIcon("ksysguard", KIcon::Toolbar, KIcon::SizeMedium);
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon("ksysguard", KIcon::Toolbar, KIcon::SizeMedium);
m_fxPage = addPage( i18n( "Audio FX" ), i18n("Effect Stack"), icon );
- QVBoxLayout *fxLayout = new QVBoxLayout( m_fxPage, 0, spacingHint() );
+ TQVBoxLayout *fxLayout = new TQVBoxLayout( m_fxPage, 0, spacingHint() );
FX_SetupImpl *fxDialog = new FX_SetupImpl(m_fxPage, "fxsetup", m_config, m_fxpluginhandler);
fxLayout->addWidget(fxDialog);
- connect( this, SIGNAL(signalOKWasClicked()), fxDialog, SLOT(slotSaveWasClicked()) );
- connect( this, SIGNAL(signalRemoveAllFX()), fxDialog, SLOT(slotRemoveAll()) );
- connect( this, SIGNAL(signalReloadFX()), fxDialog, SLOT(slotReload()) );
+ connect( this, TQT_SIGNAL(signalOKWasClicked()), fxDialog, TQT_SLOT(slotSaveWasClicked()) );
+ connect( this, TQT_SIGNAL(signalRemoveAllFX()), fxDialog, TQT_SLOT(slotRemoveAll()) );
+ 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;
@@ -98,7 +98,7 @@ void VoiceSetupDlg::initFXPage()
}
-void VoiceSetupDlg::slotPageChanged(QWidget *page)
+void VoiceSetupDlg::slotPageChanged(TQWidget *page)
{
kdDebug(100200) << "+++ entering VoiceSetupDlg::slotPageChanged: " << page << endl;
@@ -109,7 +109,7 @@ void VoiceSetupDlg::slotPageChanged(QWidget *page)
if ( status ){
m_fxPage->setEnabled(true);
} else {
- QString q = i18n("The active TTS system does not make use of aRts effects.");
+ TQString q = i18n("The active TTS system does not make use of aRts effects.");
KMessageBox::information( this, q, i18n("Plugin Configuration"), "KSayIt_Audiofile" );
m_fxPage->setEnabled(false);
}
@@ -131,7 +131,7 @@ void VoiceSetupDlg::slotOk()
// check if configuration was saved O.K.
if ( m_kttslib->saveWasClicked() ){
kdDebug(100200) << "--- leaving VoiceSetupDlg::slotOk" << endl;
- QDialog::accept();
+ TQDialog::accept();
}
}
@@ -139,7 +139,7 @@ void VoiceSetupDlg::slotOk()
void VoiceSetupDlg::slotCancel()
{
kdDebug(100200) << "VoiceSetupDlg::slotCancel()" << endl;
- QDialog::reject();
+ TQDialog::reject();
}
#include "voicesetupdlg.moc"
diff --git a/ksayit/src/voicesetupdlg.h b/ksayit/src/voicesetupdlg.h
index 510c591..c9063e4 100644
--- a/ksayit/src/voicesetupdlg.h
+++ b/ksayit/src/voicesetupdlg.h
@@ -19,7 +19,7 @@
#define VOICESETUPDLG_H
// QT includes
-#include <qframe.h>
+#include <tqframe.h>
// KDE includes
#include <kdialogbase.h>
@@ -35,7 +35,7 @@ class VoiceSetupDlg : public KDialogBase {
Q_OBJECT
public:
- VoiceSetupDlg(QWidget *parent=0, const char *name=0, const QString &caption=NULL,
+ VoiceSetupDlg(TQWidget *parent=0, const char *name=0, const TQString &caption=NULL,
bool modal=true,
KConfig *config=0,
FXPluginHandler *fxpluginhandler=0,
@@ -69,7 +69,7 @@ private: // Methods
private slots:
/** Called when the Page changes.
*/
- void slotPageChanged(QWidget *page);
+ void slotPageChanged(TQWidget *page);
/** Reimplementation from base class.
*/
@@ -83,7 +83,7 @@ private:
KConfig *m_config;
FXPluginHandler *m_fxpluginhandler;
KTTSDLib *m_kttslib;
- QFrame *m_fxPage;
+ TQFrame *m_fxPage;
};
diff --git a/kttsd/app-plugins/kate/katekttsd.cpp b/kttsd/app-plugins/kate/katekttsd.cpp
index a2e64e6..47837fb 100644
--- a/kttsd/app-plugins/kate/katekttsd.cpp
+++ b/kttsd/app-plugins/kate/katekttsd.cpp
@@ -18,9 +18,9 @@
***************************************************************************/
// Qt includes.
-#include <qmessagebox.h>
+#include <tqmessagebox.h>
#include <dcopclient.h>
-#include <qtimer.h>
+#include <tqtimer.h>
// KDE includes.
#include <ktexteditor/editinterface.h>
@@ -38,7 +38,7 @@
K_EXPORT_COMPONENT_FACTORY( ktexteditor_kttsd, KGenericFactory<KateKttsdPlugin>( "ktexteditor_kttsd" ) )
-KateKttsdPlugin::KateKttsdPlugin( QObject *parent, const char* name, const QStringList& )
+KateKttsdPlugin::KateKttsdPlugin( TQObject *parent, const char* name, const TQStringList& )
: KTextEditor::Plugin ( (KTextEditor::Document*) parent, name )
{
}
@@ -68,13 +68,13 @@ void KateKttsdPlugin::removeView(KTextEditor::View *view)
KateKttsdPluginView::KateKttsdPluginView( KTextEditor::View *view, const char *name )
- : QObject( view, name ),
+ : TQObject( view, name ),
KXMLGUIClient( view )
{
view->insertChildClient( this );
setInstance( KGenericFactory<KateKttsdPlugin>::instance() );
KGlobal::locale()->insertCatalogue("kttsd");
- (void) new KAction( i18n("Speak Text"), "kttsd", 0, this, SLOT(slotReadOut()), actionCollection(), "tools_kttsd" );
+ (void) new KAction( i18n("Speak Text"), "kttsd", 0, this, TQT_SLOT(slotReadOut()), actionCollection(), "tools_kttsd" );
setXMLFile( "ktexteditor_kttsdui.rc" );
}
@@ -82,7 +82,7 @@ void KateKttsdPluginView::slotReadOut()
{
KTextEditor::View *v = (KTextEditor::View*)parent();
KTextEditor::SelectionInterface *si = KTextEditor::selectionInterface( v->document() );
- QString text;
+ TQString text;
if ( si->hasSelection() )
text = si->selection();
@@ -95,26 +95,26 @@ void KateKttsdPluginView::slotReadOut()
// If KTTSD not running, start it.
if (!client->isApplicationRegistered("kttsd"))
{
- QString error;
- if (kapp->startServiceByDesktopName("kttsd", QStringList(), &error))
- QMessageBox::warning(0, i18n( "Starting KTTSD Failed"), error );
+ TQString error;
+ if (kapp->startServiceByDesktopName("kttsd", TQStringList(), &error))
+ TQMessageBox::warning(0, i18n( "Starting KTTSD Failed"), error );
}
- QByteArray data;
- QByteArray data2;
- QCString replyType;
- QByteArray replyData;
- QDataStream arg(data, IO_WriteOnly);
+ TQByteArray data;
+ TQByteArray data2;
+ TQCString replyType;
+ TQByteArray replyData;
+ TQDataStream arg(data, IO_WriteOnly);
arg << text << "";
- if ( !client->call("kttsd", "KSpeech", "setText(QString,QString)",
+ if ( !client->call("kttsd", "KSpeech", "setText(TQString,TQString)",
data, replyType, replyData, true) )
- QMessageBox::warning( 0, i18n( "DCOP Call Failed" ),
+ TQMessageBox::warning( 0, i18n( "DCOP Call Failed" ),
i18n( "The DCOP call setText failed." ));
- QDataStream arg2(data2, IO_WriteOnly);
+ TQDataStream arg2(data2, IO_WriteOnly);
arg2 << 0;
if ( !client->call("kttsd", "KSpeech", "startText(uint)",
data2, replyType, replyData, true) )
- QMessageBox::warning( 0, i18n( "DCOP Call Failed" ),
+ TQMessageBox::warning( 0, i18n( "DCOP Call Failed" ),
i18n( "The DCOP call startText failed." ));
}
diff --git a/kttsd/app-plugins/kate/katekttsd.h b/kttsd/app-plugins/kate/katekttsd.h
index cbab720..c30f3cf 100644
--- a/kttsd/app-plugins/kate/katekttsd.h
+++ b/kttsd/app-plugins/kate/katekttsd.h
@@ -23,26 +23,26 @@
#include <ktexteditor/plugin.h>
#include <ktexteditor/view.h>
#include <kxmlguiclient.h>
-#include <qobject.h>
+#include <tqobject.h>
class KateKttsdPlugin : public KTextEditor::Plugin, public KTextEditor::PluginViewInterface
{
Q_OBJECT
public:
- KateKttsdPlugin( QObject *parent = 0,
+ KateKttsdPlugin( TQObject *parent = 0,
const char* name = 0,
- const QStringList &args = QStringList() );
+ const TQStringList &args = TQStringList() );
virtual ~KateKttsdPlugin();
void addView (KTextEditor::View *view);
void removeView (KTextEditor::View *view);
private:
- QPtrList<class KateKttsdPluginView> m_views;
+ TQPtrList<class KateKttsdPluginView> m_views;
};
-class KateKttsdPluginView : public QObject, public KXMLGUIClient
+class KateKttsdPluginView : public TQObject, public KXMLGUIClient
{
Q_OBJECT
diff --git a/kttsd/compat/interfaces/kspeech/kspeech.h b/kttsd/compat/interfaces/kspeech/kspeech.h
index e4a831c..d321528 100644
--- a/kttsd/compat/interfaces/kspeech/kspeech.h
+++ b/kttsd/compat/interfaces/kspeech/kspeech.h
@@ -22,7 +22,7 @@
#define _KSPEECH_H_
#include <dcopobject.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
/**
* @interface KSpeech
@@ -207,7 +207,7 @@
* "kttsd", object "KSpeech".
*
@verbatim
- MyPart::MyPart(QWidget *parent, const char *name) :
+ MyPart::MyPart(TQWidget *parent, const char *name) :
KParts::ReadOnlyPart(parent, name),
DCOPStub("kttsd", "KSpeech") {
@endverbatim
@@ -218,8 +218,8 @@
DCOPClient *client = dcopClient();
client->attach();
if (!client->isApplicationRegistered("kttsd")) {
- QString error;
- if (KApplication::startServiceByDesktopName("kttsd", QStringList(), &error))
+ TQString error;
+ if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error))
cout << "Starting KTTSD failed with message " << error << endl;
}
@endverbatim
@@ -271,7 +271,7 @@
virtual public KSpeechSink
{
protected:
- ASYNC sentenceStarted(const QCString& appId, const uint jobNum, const uint seq);
+ ASYNC sentenceStarted(const TQCString& appId, const uint jobNum, const uint seq);
@endverbatim
*
* You can combine sending and receiving in one object.
@@ -284,7 +284,7 @@
virtual public KSpeechSink
{
protected:
- ASYNC sentenceStarted(const QCString& appId, const uint jobNum, const uint seq);
+ ASYNC sentenceStarted(const TQCString& appId, const uint jobNum, const uint seq);
@endverbatim
*
* See below for the signals you can declare.
@@ -293,7 +293,7 @@
* receiving object.
*
@verbatim
- MyPart::MyPart(QWidget *parent, const char *name) :
+ MyPart::MyPart(TQWidget *parent, const char *name) :
KParts::ReadOnlyPart(parent, name),
DCOPObject("mypart_kspeechsink") {
@endverbatim
@@ -314,8 +314,8 @@
}
// Connect KTTSD DCOP signals to our slots.
connectDCOPSignal("kttsd", "KSpeech",
- "sentenceStarted(QCString,uint,uint)",
- "sentenceStarted(QCString,uint,uint)",
+ "sentenceStarted(TQCString,uint,uint)",
+ "sentenceStarted(TQCString,uint,uint)",
false);
@endverbatim
*
@@ -323,13 +323,13 @@
* example
*
@verbatim
- ASYNC sentenceStarted(const QCString& appId, const uint jobNum, const uint seq);
+ ASYNC sentenceStarted(const TQCString& appId, const uint jobNum, const uint seq);
@endverbatim
*
* becomes
*
@verbatim
- "sentenceStarted(QCString,uint,uint)",
+ "sentenceStarted(TQCString,uint,uint)",
@endverbatim
*
* in the connectDCOPSignal call.
@@ -338,7 +338,7 @@
* is intended for your application.
*
@verbatim
- ASYNC MyPart::sentenceStarted(const QCString& appId, const uint jobNum, const uint seq)
+ ASYNC MyPart::sentenceStarted(const TQCString& appId, const uint jobNum, const uint seq)
{
// Check appId to determine if this is our signal.
if (appId != dcopClient()->appId()) return;
@@ -685,7 +685,7 @@ class KSpeech : virtual public DCOPObject {
* talker supports the indicated speech markup language.
* @see kttsdMarkupType
*/
- virtual bool supportsMarkup(const QString &talker, uint markupType = 0) const = 0;
+ virtual bool supportsMarkup(const TQString &talker, uint markupType = 0) const = 0;
/**
* Determine whether the currently-configured speech plugin supports markers in speech markup.
@@ -694,7 +694,7 @@ class KSpeech : virtual public DCOPObject {
* @return True if the plugin currently configured for the indicated
* talker supports markers.
*/
- virtual bool supportsMarkers(const QString &talker) const = 0;
+ virtual bool supportsMarkers(const TQString &talker) const = 0;
/**
* Say a message as soon as possible, interrupting any other speech in progress.
@@ -709,7 +709,7 @@ class KSpeech : virtual public DCOPObject {
* If an existing Screen Reader output is in progress, it is stopped and discarded and
* replaced with this new message.
*/
- virtual ASYNC sayScreenReaderOutput(const QString &msg, const QString &talker) = 0;
+ virtual ASYNC sayScreenReaderOutput(const TQString &msg, const TQString &talker) = 0;
/**
* Say a warning. The warning will be spoken when the current sentence
@@ -722,7 +722,7 @@ class KSpeech : virtual public DCOPObject {
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
- virtual ASYNC sayWarning(const QString &warning, const QString &talker) = 0;
+ virtual ASYNC sayWarning(const TQString &warning, const TQString &talker) = 0;
/**
* Say a message. The message will be spoken when the current sentence stops speaking
@@ -735,7 +735,7 @@ class KSpeech : virtual public DCOPObject {
* If no talker has been configured for the specified talker code,
* defaults to the closest matching talker.
*/
- virtual ASYNC sayMessage(const QString &message, const QString &talker) = 0;
+ virtual ASYNC sayMessage(const TQString &message, const TQString &talker) = 0;
/**
* Sets the GREP pattern that will be used as the sentence delimiter.
@@ -751,7 +751,7 @@ class KSpeech : virtual public DCOPObject {
* with a single space, and then replaces the sentence delimiters using
* the following statement:
@verbatim
- QString::replace(sentenceDelimiter, "\\1\t");
+ TQString::replace(sentenceDelimiter, "\\1\t");
@endverbatim
*
* which replaces all sentence delimiters with a tab, but
@@ -763,7 +763,7 @@ class KSpeech : virtual public DCOPObject {
*
* @see sentenceparsing
*/
- virtual ASYNC setSentenceDelimiter(const QString &delimiter) = 0;
+ virtual ASYNC setSentenceDelimiter(const TQString &delimiter) = 0;
/**
* Queue a text job. Does not start speaking the text.
@@ -789,7 +789,7 @@ class KSpeech : virtual public DCOPObject {
* @see getTextCount
* @see startText
*/
- virtual uint setText(const QString &text, const QString &talker) = 0;
+ virtual uint setText(const TQString &text, const TQString &talker) = 0;
/**
* Say a plain text job. This is a convenience method that
@@ -819,7 +819,7 @@ class KSpeech : virtual public DCOPObject {
*
* @since KDE 3.5
*/
- virtual uint sayText(const QString &text, const QString &talker) = 0;
+ virtual uint sayText(const TQString &text, const TQString &talker) = 0;
/**
* Adds another part to a text job. Does not start speaking the text.
@@ -836,7 +836,7 @@ class KSpeech : virtual public DCOPObject {
* @see setText.
* @see startText.
*/
- virtual int appendText(const QString &text, uint jobNum=0) = 0;
+ virtual int appendText(const TQString &text, uint jobNum=0) = 0;
/**
* Queue a text job from the contents of a file. Does not start speaking the text.
@@ -863,8 +863,8 @@ class KSpeech : virtual public DCOPObject {
* @see getTextCount
* @see startText
*/
- virtual uint setFile(const QString &filename, const QString &talker,
- const QString& encoding) = 0;
+ virtual uint setFile(const TQString &filename, const TQString &talker,
+ const TQString& encoding) = 0;
/**
* Get the number of sentences in a text job.
@@ -900,7 +900,7 @@ class KSpeech : virtual public DCOPObject {
* Get a comma-separated list of text job numbers in the queue.
* @return Comma-separated list of text job numbers in the queue.
*/
- virtual QString getTextJobNumbers() = 0;
+ virtual TQString getTextJobNumbers() = 0;
/**
* Get the state of a text job.
@@ -918,13 +918,13 @@ class KSpeech : virtual public DCOPObject {
* @param jobNum Job number of the text job.
* If zero, applies to the last job queued by the application,
* but if no such job, applies to the current job (if any).
- * @return A QDataStream containing information about the job.
+ * @return A TQDataStream containing information about the job.
* Blank if no such job.
*
* The stream contains the following elements:
* - int state - Job state.
- * - QCString appId - DCOP senderId of the application that requested the speech job.
- * - QString talker - Talker Code requested by application.
+ * - TQCString appId - DCOP senderId of the application that requested the speech job.
+ * - TQString talker - Talker Code requested by application.
* - int seq - Current sentence being spoken. Sentences are numbered starting at 1.
* - int sentenceCount - Total number of sentences in the job.
* - int partNum - Current part of the job begin spoken. Parts are numbered starting at 1.
@@ -935,11 +935,11 @@ class KSpeech : virtual public DCOPObject {
*
* The following sample code will decode the stream:
@code
- QByteArray jobInfo = getTextJobInfo(jobNum);
- QDataStream stream(jobInfo, IO_ReadOnly);
+ TQByteArray jobInfo = getTextJobInfo(jobNum);
+ TQDataStream stream(jobInfo, IO_ReadOnly);
int state;
- QCString appId;
- QString talker;
+ TQCString appId;
+ TQString talker;
int seq;
int sentenceCount;
int partNum;
@@ -953,7 +953,7 @@ class KSpeech : virtual public DCOPObject {
stream >> partCount;
@endcode
*/
- virtual QByteArray getTextJobInfo(uint jobNum=0) = 0;
+ virtual TQByteArray getTextJobInfo(uint jobNum=0) = 0;
/**
* Given a Talker Code, returns the Talker ID of the talker that would speak
@@ -961,7 +961,7 @@ class KSpeech : virtual public DCOPObject {
* @param talkerCode Talker Code.
* @return Talker ID of the talker that would speak the text job.
*/
- virtual QString talkerCodeToTalkerId(const QString& talkerCode) = 0;
+ virtual TQString talkerCodeToTalkerId(const TQString& talkerCode) = 0;
/**
* Return a sentence of a job.
@@ -972,7 +972,7 @@ class KSpeech : virtual public DCOPObject {
* @return The specified sentence in the specified job. If no such
* job or sentence, returns "".
*/
- virtual QString getTextJobSentence(uint jobNum=0, uint seq=0) = 0;
+ virtual TQString getTextJobSentence(uint jobNum=0, uint seq=0) = 0;
/**
* Determine if kttsd is currently speaking any text jobs.
@@ -1080,12 +1080,12 @@ class KSpeech : virtual public DCOPObject {
/**
* Get a list of the talkers configured in KTTS.
- * @return A QStringList of fully-specified talker codes, one
+ * @return A TQStringList of fully-specified talker codes, one
* for each talker user has configured.
*
* @see talkers
*/
- virtual QStringList getTalkers() = 0;
+ virtual TQStringList getTalkers() = 0;
/**
* Change the talker for a text job.
@@ -1097,7 +1097,7 @@ class KSpeech : virtual public DCOPObject {
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
- virtual ASYNC changeTextTalker(const QString &talker, uint jobNum=0 ) = 0;
+ virtual ASYNC changeTextTalker(const TQString &talker, uint jobNum=0 ) = 0;
/**
* Get the user's default talker.
@@ -1106,7 +1106,7 @@ class KSpeech : virtual public DCOPObject {
* @see talkers
* @see getTalkers
*/
- virtual QString userDefaultTalker() = 0;
+ virtual TQString userDefaultTalker() = 0;
/**
* Move a text job down in the queue so that it is spoken later.
@@ -1175,7 +1175,7 @@ class KSpeech : virtual public DCOPObject {
* Return the KTTSD deamon version number.
* @since KDE 3.5
*/
- virtual QString version() = 0;
+ virtual TQString version() = 0;
//@}
k_dcop_signals:
@@ -1199,7 +1199,7 @@ class KSpeech : virtual public DCOPObject {
*
* @see markers
*/
- void markerSeen(const QCString& appId, const QString& markerName);
+ void markerSeen(const TQCString& appId, const TQString& markerName);
/**
* This signal is emitted whenever a sentence begins speaking.
* @param appId DCOP application ID of the application that queued the text.
@@ -1208,7 +1208,7 @@ class KSpeech : virtual public DCOPObject {
*
* @see getTextCount
*/
- void sentenceStarted(const QCString& appId, uint jobNum, uint seq);
+ void sentenceStarted(const TQCString& appId, uint jobNum, uint seq);
/**
* This signal is emitted when a sentence has finished speaking.
* @param appId DCOP application ID of the application that queued the text.
@@ -1217,14 +1217,14 @@ class KSpeech : virtual public DCOPObject {
*
* @see getTextCount
*/
- void sentenceFinished(const QCString& appId, uint jobNum, uint seq);
+ void sentenceFinished(const TQCString& appId, uint jobNum, uint seq);
/**
* This signal is emitted whenever a new text job is added to the queue.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textSet(const QCString& appId, uint jobNum);
+ void textSet(const TQCString& appId, uint jobNum);
/**
* This signal is emitted whenever a new part is appended to a text job.
@@ -1233,14 +1233,14 @@ class KSpeech : virtual public DCOPObject {
* @param partNum Part number of the new part. Parts are numbered starting
* at 1.
*/
- void textAppended(const QCString& appId, uint jobNum, int partNum);
+ void textAppended(const TQCString& appId, uint jobNum, int partNum);
/**
* This signal is emitted whenever speaking of a text job begins.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textStarted(const QCString& appId, uint jobNum);
+ void textStarted(const TQCString& appId, uint jobNum);
/**
* This signal is emitted whenever a text job is finished. The job has
* been marked for deletion from the queue and will be deleted when another
@@ -1250,7 +1250,7 @@ class KSpeech : virtual public DCOPObject {
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textFinished(const QCString& appId, uint jobNum);
+ void textFinished(const TQCString& appId, uint jobNum);
/**
* This signal is emitted whenever a speaking text job stops speaking.
* @param appId The DCOP senderId of the application that created the job.
@@ -1259,26 +1259,26 @@ class KSpeech : virtual public DCOPObject {
* The signal is only emitted if stopText() is called and the job is currently
* speaking.
*/
- void textStopped(const QCString& appId, uint jobNum);
+ void textStopped(const TQCString& appId, uint jobNum);
/**
* This signal is emitted whenever a speaking text job is paused.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textPaused(const QCString& appId, uint jobNum);
+ void textPaused(const TQCString& appId, uint jobNum);
/**
* This signal is emitted when a text job, that was previously paused, resumes speaking.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textResumed(const QCString& appId, uint jobNum);
+ void textResumed(const TQCString& appId, uint jobNum);
/**
* This signal is emitted whenever a text job is deleted from the queue.
* The job is no longer in the queue when this signal is emitted.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textRemoved(const QCString& appId, uint jobNum);
+ void textRemoved(const TQCString& appId, uint jobNum);
//@}
};
diff --git a/kttsd/compat/interfaces/kspeech/kspeechsink.h b/kttsd/compat/interfaces/kspeech/kspeechsink.h
index e90a005..51715b9 100644
--- a/kttsd/compat/interfaces/kspeech/kspeechsink.h
+++ b/kttsd/compat/interfaces/kspeech/kspeechsink.h
@@ -84,7 +84,7 @@ class KSpeechSink : virtual public DCOPObject {
* @param markerName The name of the marker seen.
* @see markers
*/
- virtual ASYNC markerSeen(const QCString& appId, const QString& markerName) { Q_UNUSED(appId); Q_UNUSED(markerName); };
+ virtual ASYNC markerSeen(const TQCString& appId, const TQString& markerName) { Q_UNUSED(appId); Q_UNUSED(markerName); };
/**
* This signal is emitted whenever a sentence begins speaking.
* @param appId DCOP application ID of the application that queued the text.
@@ -92,7 +92,7 @@ class KSpeechSink : virtual public DCOPObject {
* @param seq Sequence number of the text.
* @see getTextCount
*/
- virtual ASYNC sentenceStarted(const QCString& appId, uint jobNum, uint seq) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(seq); };
+ virtual ASYNC sentenceStarted(const TQCString& appId, uint jobNum, uint seq) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(seq); };
/**
* This signal is emitted when a sentence has finished speaking.
* @param appId DCOP application ID of the application that queued the text.
@@ -100,14 +100,14 @@ class KSpeechSink : virtual public DCOPObject {
* @param seq Sequence number of the text.
* @see getTextCount
*/
- virtual ASYNC sentenceFinished(const QCString& appId, uint jobNum, uint seq) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(seq); };
+ virtual ASYNC sentenceFinished(const TQCString& appId, uint jobNum, uint seq) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(seq); };
/**
* This signal is emitted whenever a new text job is added to the queue.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textSet(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textSet(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted whenever a new part is appended to a text job.
@@ -116,14 +116,14 @@ class KSpeechSink : virtual public DCOPObject {
* @param partNum Part number of the new part. Parts are numbered starting
* at 1.
*/
- virtual ASYNC textAppended(const QCString& appId, uint jobNum, int partNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(partNum); };
+ virtual ASYNC textAppended(const TQCString& appId, uint jobNum, int partNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); Q_UNUSED(partNum); };
/**
* This signal is emitted whenever speaking of a text job begins.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textStarted(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textStarted(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted whenever a text job is finished. The job has
* been marked for deletion from the queue and will be deleted when another
@@ -133,32 +133,32 @@ class KSpeechSink : virtual public DCOPObject {
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textFinished(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textFinished(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted whenever a speaking text job stops speaking.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textStopped(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textStopped(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted whenever a speaking text job is paused.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textPaused(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textPaused(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted when a text job, that was previously paused, resumes speaking.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textResumed(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textResumed(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
/**
* This signal is emitted whenever a text job is deleted from the queue.
* The job is no longer in the queue when this signal is emitted.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- virtual ASYNC textRemoved(const QCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
+ virtual ASYNC textRemoved(const TQCString& appId, uint jobNum) { Q_UNUSED(appId); Q_UNUSED(jobNum); };
};
#endif // _KSPEECHSINK_H_
diff --git a/kttsd/filters/main.cpp b/kttsd/filters/main.cpp
index d358da8..f33d771 100644
--- a/kttsd/filters/main.cpp
+++ b/kttsd/filters/main.cpp
@@ -21,11 +21,11 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
******************************************************************************/
-#include <qstring.h>
+#include <tqstring.h>
#include <iostream>
using namespace std;
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <kdebug.h>
#include <klocale.h>
@@ -81,17 +81,17 @@ int main(int argc, char *argv[])
const int offersCount = offers.count();
for(int ndx=0; ndx < offersCount ; ++ndx)
{
- QString name = offers[ndx]->name();
+ TQString name = offers[ndx]->name();
cout << name.latin1() << endl;
}
return 0;
}
- QString filterName;
+ TQString filterName;
if (args->count() > 0) filterName = args->arg(0);
- QString talker = args->getOption("talker");
- QCString appId = args->getOption("appid");
- QString groupName = args->getOption("group");
+ TQString talker = args->getOption("talker");
+ TQCString appId = args->getOption("appid");
+ TQString groupName = args->getOption("group");
if (filterName.isEmpty()) kdError(1) << "No filter name given." << endl;
@@ -111,14 +111,14 @@ int main(int argc, char *argv[])
KttsFilterProc *plugIn =
KParts::ComponentFactory::createInstanceFromLibrary<KttsFilterProc>(
offers[ndx]->library().latin1(), NULL, offers[ndx]->library().latin1(),
- QStringList(), &errorNo);
+ TQStringList(), &errorNo);
if(plugIn)
{
KConfig* config = new KConfig("kttsdrc");
config->setGroup( "General" );
plugIn->init( config, groupName );
- QTextStream inp ( stdin, IO_ReadOnly );
- QString text;
+ TQTextStream inp ( stdin, IO_ReadOnly );
+ TQString text;
text = inp.read();
TalkerCode* talkerCode = new TalkerCode( talker );
text = plugIn->convert( text, talkerCode, appId );
diff --git a/kttsd/filters/sbd/sbdconf.cpp b/kttsd/filters/sbd/sbdconf.cpp
index 2d4cf5d..5244974 100644
--- a/kttsd/filters/sbd/sbdconf.cpp
+++ b/kttsd/filters/sbd/sbdconf.cpp
@@ -22,14 +22,14 @@
******************************************************************************/
// Qt includes.
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qradiobutton.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqradiobutton.h>
// KDE includes.
#include <kglobal.h>
@@ -56,13 +56,13 @@
/**
* Constructor
*/
-SbdConf::SbdConf( QWidget *parent, const char *name, const QStringList& /*args*/) :
+SbdConf::SbdConf( TQWidget *parent, const char *name, const TQStringList& /*args*/) :
KttsFilterConf(parent, name)
{
// kdDebug() << "SbdConf::SbdConf: Running" << endl;
// Create configuration widget.
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "SbdConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new SbdConfWidget(this, "SbdConfigWidget");
@@ -73,24 +73,24 @@ SbdConf::SbdConf( QWidget *parent, const char *name, const QStringList& /*args*/
m_widget->reButton->setEnabled( m_reEditorInstalled );
if ( m_reEditorInstalled )
- connect( m_widget->reButton, SIGNAL(clicked()), this, SLOT(slotReButton_clicked()) );
+ connect( m_widget->reButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotReButton_clicked()) );
- connect( m_widget->reLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
- connect( m_widget->sbLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
- connect( m_widget->nameLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
- connect( m_widget->appIdLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
- connect(m_widget->languageBrowseButton, SIGNAL(clicked()),
- this, SLOT(slotLanguageBrowseButton_clicked()));
- connect(m_widget->loadButton, SIGNAL(clicked()),
- this, SLOT(slotLoadButton_clicked()));
- connect(m_widget->saveButton, SIGNAL(clicked()),
- this, SLOT(slotSaveButton_clicked()));
- connect(m_widget->clearButton, SIGNAL(clicked()),
- this, SLOT(slotClearButton_clicked()));
+ connect( m_widget->reLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
+ connect( m_widget->sbLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
+ connect( m_widget->nameLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
+ connect( m_widget->appIdLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
+ connect(m_widget->languageBrowseButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotLanguageBrowseButton_clicked()));
+ connect(m_widget->loadButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotLoadButton_clicked()));
+ connect(m_widget->saveButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSaveButton_clicked()));
+ connect(m_widget->clearButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotClearButton_clicked()));
// Set up defaults.
defaults();
@@ -116,7 +116,7 @@ SbdConf::~SbdConf(){
* @param configGroup Call config->setGroup with this argument before
* loading your configuration.
*/
-void SbdConf::load(KConfig* config, const QString& configGroup){
+void SbdConf::load(KConfig* config, const TQString& configGroup){
// kdDebug() << "SbdConf::load: Running" << endl;
config->setGroup( configGroup );
m_widget->nameLineEdit->setText(
@@ -125,10 +125,10 @@ void SbdConf::load(KConfig* config, const QString& configGroup){
config->readEntry("SentenceDelimiterRegExp", m_widget->reLineEdit->text()) );
m_widget->sbLineEdit->setText(
config->readEntry("SentenceBoundary", m_widget->sbLineEdit->text()) );
- QStringList langCodeList = config->readListEntry("LanguageCodes");
+ TQStringList langCodeList = config->readListEntry("LanguageCodes");
if (!langCodeList.isEmpty())
m_languageCodeList = langCodeList;
- QString language = "";
+ TQString language = "";
for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx)
{
if (!language.isEmpty()) language += ",";
@@ -149,7 +149,7 @@ void SbdConf::load(KConfig* config, const QString& configGroup){
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
-void SbdConf::save(KConfig* config, const QString& configGroup){
+void SbdConf::save(KConfig* config, const TQString& configGroup){
// kdDebug() << "SbdConf::save: Running" << endl;
config->setGroup( configGroup );
config->writeEntry("UserFilterName", m_widget->nameLineEdit->text() );
@@ -192,10 +192,10 @@ bool SbdConf::supportsMultiInstance() { return true; }
* return an empty string.
* @return Filter instance name.
*/
-QString SbdConf::userPlugInName()
+TQString SbdConf::userPlugInName()
{
if ( m_widget->reLineEdit->text().isEmpty() )
- return QString::null;
+ return TQString::null;
else
return m_widget->nameLineEdit->text();
}
@@ -210,8 +210,8 @@ void SbdConf::slotReButton_clicked()
{
// Show Regular Expression Editor dialog if it is installed.
if ( !m_reEditorInstalled ) return;
- QDialog *editorDialog =
- KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor" );
+ TQDialog *editorDialog =
+ KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" );
if ( editorDialog )
{
// kdeutils was installed, so the dialog was found. Fetch the editor interface.
@@ -220,9 +220,9 @@ void SbdConf::slotReButton_clicked()
Q_ASSERT( reEditor ); // This should not fail!// now use the editor.
reEditor->setRegExp( m_widget->reLineEdit->text() );
int dlgResult = editorDialog->exec();
- if ( dlgResult == QDialog::Accepted )
+ if ( dlgResult == TQDialog::Accepted )
{
- QString re = reEditor->regExp();
+ TQString re = reEditor->regExp();
m_widget->reLineEdit->setText( re );
configChanged();
}
@@ -232,21 +232,21 @@ void SbdConf::slotReButton_clicked()
void SbdConf::slotLanguageBrowseButton_clicked()
{
- // Create a QHBox to host KListView.
- QHBox* hBox = new QHBox(m_widget, "SelectLanguage_hbox");
+ // Create a TQHBox to host KListView.
+ TQHBox* hBox = new TQHBox(m_widget, "SelectLanguage_hbox");
// Create a KListView and fill with all known languages.
KListView* langLView = new KListView(hBox, "SelectLanguage_lview");
langLView->addColumn(i18n("Language"));
langLView->addColumn(i18n("Code"));
- langLView->setSelectionMode(QListView::Extended);
- QStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha();
- QString locale;
- QString languageCode;
- QString countryCode;
- QString charSet;
- QString language;
+ langLView->setSelectionMode(TQListView::Extended);
+ TQStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha();
+ TQString locale;
+ TQString languageCode;
+ TQString countryCode;
+ TQString charSet;
+ TQString language;
// Blank line so user can select no language.
- QListViewItem* item = new KListViewItem(langLView, "", "");
+ TQListViewItem* item = new KListViewItem(langLView, "", "");
if (m_languageCodeList.isEmpty()) item->setSelected(true);
const int allLocalesCount = allLocales.count();
for (int ndx=0; ndx < allLocalesCount; ++ndx)
@@ -256,7 +256,7 @@ void SbdConf::slotLanguageBrowseButton_clicked()
language = KGlobal::locale()->twoAlphaToLanguageName(languageCode);
if (!countryCode.isEmpty()) language +=
" (" + KGlobal::locale()->twoAlphaToCountryName(countryCode)+")";
- QListViewItem* item = new KListViewItem(langLView, language, locale);
+ TQListViewItem* item = new KListViewItem(langLView, language, locale);
if (m_languageCodeList.contains(locale)) item->setSelected(true);
}
// Sort by language.
@@ -274,13 +274,13 @@ void SbdConf::slotLanguageBrowseButton_clicked()
true);
dlg->setMainWidget(hBox);
dlg->setHelp("", "kttsd");
- dlg->setInitialSize(QSize(300, 500), false);
+ dlg->setInitialSize(TQSize(300, 500), false);
int dlgResult = dlg->exec();
- languageCode = QString::null;
- if (dlgResult == QDialog::Accepted)
+ languageCode = TQString::null;
+ if (dlgResult == TQDialog::Accepted)
{
m_languageCodeList.clear();
- QListViewItem* item = langLView->firstChild();
+ TQListViewItem* item = langLView->firstChild();
while (item)
{
if (item->isSelected()) m_languageCodeList += item->text(1);
@@ -289,7 +289,7 @@ void SbdConf::slotLanguageBrowseButton_clicked()
}
delete dlg;
// TODO: Also delete KListView and QHBox?
- if (dlgResult != QDialog::Accepted) return;
+ if (dlgResult != TQDialog::Accepted) return;
language = "";
for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx)
{
@@ -302,9 +302,9 @@ void SbdConf::slotLanguageBrowseButton_clicked()
void SbdConf::slotLoadButton_clicked()
{
- // QString dataDir = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/stringreplacer/";
- QString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/sbd/").last();
- QString filename = KFileDialog::getOpenFileName(
+ // TQString dataDir = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/stringreplacer/";
+ TQString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/sbd/").last();
+ TQString filename = KFileDialog::getOpenFileName(
dataDir,
"*rc|SBD Config (*rc)",
m_widget,
@@ -318,7 +318,7 @@ void SbdConf::slotLoadButton_clicked()
void SbdConf::slotSaveButton_clicked()
{
- QString filename = KFileDialog::getSaveFileName(
+ TQString filename = KFileDialog::getSaveFileName(
KGlobal::dirs()->saveLocation( "data" ,"kttsd/sbd/", false ),
"*rc|SBD Config (*rc)",
m_widget,
@@ -331,11 +331,11 @@ void SbdConf::slotSaveButton_clicked()
void SbdConf::slotClearButton_clicked()
{
- m_widget->nameLineEdit->setText( QString::null );
- m_widget->reLineEdit->setText( QString::null );
- m_widget->sbLineEdit->setText( QString::null );
+ m_widget->nameLineEdit->setText( TQString::null );
+ m_widget->reLineEdit->setText( TQString::null );
+ m_widget->sbLineEdit->setText( TQString::null );
m_languageCodeList.clear();
- m_widget->languageLineEdit->setText( QString::null );
- m_widget->appIdLineEdit->setText( QString::null );
+ m_widget->languageLineEdit->setText( TQString::null );
+ m_widget->appIdLineEdit->setText( TQString::null );
configChanged();
}
diff --git a/kttsd/filters/sbd/sbdconf.h b/kttsd/filters/sbd/sbdconf.h
index 131a759..eb1b817 100644
--- a/kttsd/filters/sbd/sbdconf.h
+++ b/kttsd/filters/sbd/sbdconf.h
@@ -25,7 +25,7 @@
#define _SBDCONF_H_
// Qt includes.
-#include <qwidget.h>
+#include <tqwidget.h>
// KDE includes.
#include <kconfig.h>
@@ -48,7 +48,7 @@ class SbdConf : public KttsFilterConf
/**
* Constructor
*/
- SbdConf( QWidget *parent, const char *name, const QStringList &args = QStringList() );
+ SbdConf( TQWidget *parent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor
@@ -73,7 +73,7 @@ class SbdConf : public KttsFilterConf
* any instance-specific parameters to load, but it may still wish
* to load parameters that apply to all instances of the plugin.
*/
- virtual void load(KConfig *config, const QString &configGroup);
+ virtual void load(KConfig *config, const TQString &configGroup);
/**
* This function gets called when the user wants to save the settings in
@@ -85,7 +85,7 @@ class SbdConf : public KttsFilterConf
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
- virtual void save(KConfig *config, const QString &configGroup);
+ virtual void save(KConfig *config, const TQString &configGroup);
/**
* This function is called to set the settings in the module to sensible
@@ -111,7 +111,7 @@ class SbdConf : public KttsFilterConf
* return an empty string.
* @return Filter instance name.
*/
- virtual QString userPlugInName();
+ virtual TQString userPlugInName();
/**
* Returns True if this filter is a Sentence Boundary Detector.
@@ -133,7 +133,7 @@ class SbdConf : public KttsFilterConf
// True if kdeutils Regular Expression Editor is installed.
bool m_reEditorInstalled;
// Language Code.
- QStringList m_languageCodeList;
+ TQStringList m_languageCodeList;
};
#endif //_SBDCONF_H_
diff --git a/kttsd/filters/sbd/sbdproc.cpp b/kttsd/filters/sbd/sbdproc.cpp
index cdc80d9..6117b11 100644
--- a/kttsd/filters/sbd/sbdproc.cpp
+++ b/kttsd/filters/sbd/sbdproc.cpp
@@ -22,9 +22,9 @@
******************************************************************************/
// Qt includes.
-#include <qregexp.h>
-#include <qdom.h>
-#include <qapplication.h>
+#include <tqregexp.h>
+#include <tqdom.h>
+#include <tqapplication.h>
// KDE includes.
#include <kdebug.h>
@@ -41,9 +41,9 @@
/**
* Constructor.
*/
-SbdThread::SbdThread( QObject *parent, const char *name ) :
- QObject( parent, name ),
- QThread()
+SbdThread::SbdThread( TQObject *parent, const char *name ) :
+ TQObject( parent, name ),
+ TQThread()
{
}
@@ -57,8 +57,8 @@ SbdThread::SbdThread( QObject *parent, const char *name ) :
/**
* Get/Set text being processed.
*/
-void SbdThread::setText( const QString& text ) { m_text = text; }
-QString SbdThread::text() { return m_text; }
+void SbdThread::setText( const TQString& text ) { m_text = text; }
+TQString SbdThread::text() { return m_text; }
/**
* Set/Get TalkerCode.
@@ -72,14 +72,14 @@ TalkerCode* SbdThread::talkerCode() { return m_talkerCode; }
*
* @param re The sentence delimiter regular expression.
*/
-void SbdThread::setSbRegExp( const QString& re ) { m_re = re; }
+void SbdThread::setSbRegExp( const TQString& re ) { m_re = re; }
/**
* The configured Sentence Boundary Regular Expression.
*
* @param re The sentence delimiter regular expression.
*/
-void SbdThread::setConfiguredSbRegExp( const QString& re ) { m_configuredRe = re; }
+void SbdThread::setConfiguredSbRegExp( const TQString& re ) { m_configuredRe = re; }
/**
* The configured Sentence Boundary that replaces SB regular expression.
@@ -87,7 +87,7 @@ void SbdThread::setConfiguredSbRegExp( const QString& re ) { m_configuredRe = re
* @param sb The sentence boundary replacement.
*
*/
-void SbdThread::setConfiguredSentenceBoundary( const QString& sb ) { m_configuredSentenceBoundary = sb; }
+void SbdThread::setConfiguredSentenceBoundary( const TQString& sb ) { m_configuredSentenceBoundary = sb; }
/**
* Did this filter do anything? If the filter returns the input as output
@@ -97,7 +97,7 @@ void SbdThread::setWasModified(bool wasModified) { m_wasModified = wasModified;
bool SbdThread::wasModified() { return m_wasModified; }
// Given a tag name, returns SsmlElemType.
-SbdThread::SsmlElemType SbdThread::tagToSsmlElemType( const QString tagName )
+SbdThread::SsmlElemType SbdThread::tagToSsmlElemType( const TQString tagName )
{
if ( tagName == "speak" ) return etSpeak;
if ( tagName == "voice" ) return etVoice;
@@ -110,12 +110,12 @@ SbdThread::SsmlElemType SbdThread::tagToSsmlElemType( const QString tagName )
}
// Parses an SSML element, pushing current settings onto the context stack.
-void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem )
+void SbdThread::pushSsmlElem( SsmlElemType et, const TQDomElement& elem )
{
// TODO: Need to convert relative values into absolute values and also convert
// only to values recognized by SSML2SABLE stylesheet. Either that or enhance all
// the synth stylesheets.
- QDomNamedNodeMap attrList = elem.attributes();
+ TQDomNamedNodeMap attrList = elem.attributes();
int attrCount = attrList.count();
switch ( et )
{
@@ -123,7 +123,7 @@ void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem )
SpeakElem e = m_speakStack.top();
for ( int ndx=0; ndx < attrCount; ++ndx )
{
- QDomAttr a = attrList.item( ndx ).toAttr();
+ TQDomAttr a = attrList.item( ndx ).toAttr();
if ( a.name() == "lang" ) e.lang = a.value();
}
m_speakStack.push( e );
@@ -139,7 +139,7 @@ void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem )
ProsodyElem e = m_prosodyStack.top();
for ( int ndx=0; ndx < attrCount; ++ndx )
{
- QDomAttr a = attrList.item( ndx ).toAttr();
+ TQDomAttr a = attrList.item( ndx ).toAttr();
if ( a.name() == "pitch" ) e.pitch = a.value();
if ( a.name() == "contour" ) e.contour = a.value();
if ( a.name() == "range" ) e.range = a.value();
@@ -153,7 +153,7 @@ void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem )
EmphasisElem e = m_emphasisStack.top();
for ( int ndx=0; ndx < attrCount; ++ndx )
{
- QDomAttr a = attrList.item( ndx ).toAttr();
+ TQDomAttr a = attrList.item( ndx ).toAttr();
if ( a.name() == "level" ) e.level = a.value();
}
m_emphasisStack.push( e );
@@ -162,7 +162,7 @@ void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem )
PSElem e = m_psStack.top();
for ( int ndx=0; ndx < attrCount; ++ndx )
{
- QDomAttr a = attrList.item( ndx ).toAttr();
+ TQDomAttr a = attrList.item( ndx ).toAttr();
if ( a.name() == "lang" ) e.lang = a.value();
}
m_psStack.push( e );
@@ -173,17 +173,17 @@ void SbdThread::pushSsmlElem( SsmlElemType et, const QDomElement& elem )
// Given an attribute name and value, constructs an XML representation of the attribute,
// i.e., name="value".
-QString SbdThread::makeAttr( const QString& name, const QString& value )
+TQString SbdThread::makeAttr( const TQString& name, const TQString& value )
{
- if ( value.isEmpty() ) return QString::null;
+ if ( value.isEmpty() ) return TQString::null;
return " " + name + "=\"" + value + "\"";
}
// Returns an XML representation of an SSML tag from the top of the context stack.
-QString SbdThread::makeSsmlElem( SsmlElemType et )
+TQString SbdThread::makeSsmlElem( SsmlElemType et )
{
- QString s;
- QString a;
+ TQString s;
+ TQString a;
switch ( et )
{
// Must always output speak tag, otherwise kttsd won't think each sentence is SSML.
@@ -198,7 +198,7 @@ QString SbdThread::makeSsmlElem( SsmlElemType et )
VoiceElem e = m_voiceStack.top();
a += makeAttr( "lang", e.lang );
a += makeAttr( "gender", e.gender );
- a += makeAttr( "age", QString::number(e.age) );
+ a += makeAttr( "age", TQString::number(e.age) );
a += makeAttr( "name", e.name );
a += makeAttr( "variant", e.variant );
if ( !a.isEmpty() ) s = "<voice" + a + ">";
@@ -240,14 +240,14 @@ void SbdThread::popSsmlElem( SsmlElemType et )
}
// Returns an XML representation of a break element.
-QString SbdThread::makeBreakElem( const QDomElement& e )
+TQString SbdThread::makeBreakElem( const TQDomElement& e )
{
- QString s = "<break";
- QDomNamedNodeMap attrList = e.attributes();
+ TQString s = "<break";
+ TQDomNamedNodeMap attrList = e.attributes();
int attrCount = attrList.count();
for ( int ndx=0; ndx < attrCount; ++ndx )
{
- QDomAttr a = attrList.item( ndx ).toAttr();
+ TQDomAttr a = attrList.item( ndx ).toAttr();
s += makeAttr( a.name(), a.value() );
}
s += ">";
@@ -255,9 +255,9 @@ QString SbdThread::makeBreakElem( const QDomElement& e )
}
// Converts a text fragment into a CDATA section.
-QString SbdThread::makeCDATA( const QString& text )
+TQString SbdThread::makeCDATA( const TQString& text )
{
- QString s = "<![CDATA[";
+ TQString s = "<![CDATA[";
s += text;
s += "]]>";
return s;
@@ -265,20 +265,20 @@ QString SbdThread::makeCDATA( const QString& text )
// Returns an XML representation of an utterance node consisting of voice,
// prosody, and emphasis elements.
-QString SbdThread::makeSentence( const QString& text )
+TQString SbdThread::makeSentence( const TQString& text )
{
- QString s;
- QString v = makeSsmlElem( etVoice );
- QString p = makeSsmlElem( etProsody );
- QString e = makeSsmlElem( etEmphasis );
+ TQString s;
+ TQString v = makeSsmlElem( etVoice );
+ TQString p = makeSsmlElem( etProsody );
+ TQString e = makeSsmlElem( etEmphasis );
// TODO: Lang settings from psStack.
if ( !v.isEmpty() ) s += v;
if ( !p.isEmpty() ) s += p;
if ( !e.isEmpty() ) s += e;
// Escape ampersands and less thans.
- QString newText = text;
- newText.replace(QRegExp("&(?!amp;)"), "&amp;");
- newText.replace(QRegExp("<(?!lt;)"), "&lt;");
+ TQString newText = text;
+ newText.replace(TQRegExp("&(?!amp;)"), "&amp;");
+ newText.replace(TQRegExp("<(?!lt;)"), "&lt;");
s += newText;
if ( !e.isEmpty() ) s += "</emphasis>";
if ( !p.isEmpty() ) s += "</prosody>";
@@ -287,20 +287,20 @@ QString SbdThread::makeSentence( const QString& text )
}
// Starts a sentence by returning a speak tag.
-QString SbdThread::startSentence()
+TQString SbdThread::startSentence()
{
- if ( m_sentenceStarted ) return QString::null;
- QString s;
+ if ( m_sentenceStarted ) return TQString::null;
+ TQString s;
s += makeSsmlElem( etSpeak );
m_sentenceStarted = true;
return s;
}
// Ends a sentence and appends a Tab.
-QString SbdThread::endSentence()
+TQString SbdThread::endSentence()
{
- if ( !m_sentenceStarted ) return QString::null;
- QString s = "</speak>";
+ if ( !m_sentenceStarted ) return TQString::null;
+ TQString s = "</speak>";
s += "\t";
m_sentenceStarted = false;
return s;
@@ -308,14 +308,14 @@ QString SbdThread::endSentence()
// Parses a node of the SSML tree and recursively parses its children.
// Returns the filtered text with each sentence a complete ssml tree.
-QString SbdThread::parseSsmlNode( QDomNode& n, const QString& re )
+TQString SbdThread::parseSsmlNode( TQDomNode& n, const TQString& re )
{
- QString result;
+ TQString result;
switch ( n.nodeType() )
{
- case QDomNode::ElementNode: { // = 1
- QDomElement e = n.toElement();
- QString tagName = e.tagName();
+ case TQDomNode::ElementNode: { // = 1
+ TQDomElement e = n.toElement();
+ TQString tagName = e.tagName();
SsmlElemType et = tagToSsmlElemType( tagName );
switch ( et )
{
@@ -326,7 +326,7 @@ QString SbdThread::parseSsmlNode( QDomNode& n, const QString& re )
case etPS:
{
pushSsmlElem( et, e );
- QDomNode t = n.firstChild();
+ TQDomNode t = n.firstChild();
while ( !t.isNull() )
{
result += parseSsmlNode( t, re );
@@ -346,14 +346,14 @@ QString SbdThread::parseSsmlNode( QDomNode& n, const QString& re )
default: break;
}
break; }
- case QDomNode::AttributeNode: { // = 2
+ case TQDomNode::AttributeNode: { // = 2
break; }
- case QDomNode::TextNode: { // = 3
- QString s = parsePlainText( n.toText().data(), re );
- // QString d = s;
+ case TQDomNode::TextNode: { // = 3
+ TQString s = parsePlainText( n.toText().data(), re );
+ // TQString d = s;
// d.replace("\t", "\\t");
// kdDebug() << "SbdThread::parseSsmlNode: parsedPlainText = [" << d << "]" << endl;
- QStringList sentenceList = QStringList::split( '\t', s, false );
+ TQStringList sentenceList = TQStringList::split( '\t', s, false );
int lastNdx = sentenceList.count() - 1;
for ( int ndx=0; ndx < lastNdx; ++ndx )
{
@@ -369,9 +369,9 @@ QString SbdThread::parseSsmlNode( QDomNode& n, const QString& re )
if ( s.endsWith( "\t" ) ) result += endSentence();
}
break; }
- case QDomNode::CDATASectionNode: { // = 4
- QString s = parsePlainText( n.toCDATASection().data(), re );
- QStringList sentenceList = QStringList::split( '\t', s, false );
+ case TQDomNode::CDATASectionNode: { // = 4
+ TQString s = parsePlainText( n.toCDATASection().data(), re );
+ TQStringList sentenceList = TQStringList::split( '\t', s, false );
int lastNdx = sentenceList.count() - 1;
for ( int ndx=0; ndx < lastNdx; ++ndx )
{
@@ -387,37 +387,37 @@ QString SbdThread::parseSsmlNode( QDomNode& n, const QString& re )
if ( s.endsWith( "\t" ) ) result += endSentence();
}
break; }
- case QDomNode::EntityReferenceNode: { // = 5
+ case TQDomNode::EntityReferenceNode: { // = 5
break; }
- case QDomNode::EntityNode: { // = 6
+ case TQDomNode::EntityNode: { // = 6
break; }
- case QDomNode::ProcessingInstructionNode: { // = 7
+ case TQDomNode::ProcessingInstructionNode: { // = 7
break; }
- case QDomNode::CommentNode: { // = 8
+ case TQDomNode::CommentNode: { // = 8
break; }
- case QDomNode::DocumentNode: { // = 9
+ case TQDomNode::DocumentNode: { // = 9
break; }
- case QDomNode::DocumentTypeNode: { // = 10
+ case TQDomNode::DocumentTypeNode: { // = 10
break; }
- case QDomNode::DocumentFragmentNode: { // = 11
+ case TQDomNode::DocumentFragmentNode: { // = 11
break; }
- case QDomNode::NotationNode: { // = 12
+ case TQDomNode::NotationNode: { // = 12
break; }
- case QDomNode::BaseNode: { // = 21
+ case TQDomNode::BaseNode: { // = 21
break; }
- case QDomNode::CharacterDataNode: { // = 22
+ case TQDomNode::CharacterDataNode: { // = 22
break; }
}
return result;
}
// Parses Ssml.
-QString SbdThread::parseSsml( const QString& inputText, const QString& re )
+TQString SbdThread::parseSsml( const TQString& inputText, const TQString& re )
{
- QRegExp sentenceDelimiter = QRegExp( re );
+ TQRegExp sentenceDelimiter = TQRegExp( re );
// Read the text into xml dom tree.
- QDomDocument doc( "" );
+ TQDomDocument doc( "" );
// If an error occurs parsing the SSML, return "invalid S S M L".
if ( !doc.setContent( inputText ) ) return i18n("Invalid S S M L.");
@@ -442,9 +442,9 @@ QString SbdThread::parseSsml( const QString& inputText, const QString& re )
m_sentenceStarted = false;
// Get the root element (speak) and recursively process its children.
- QDomElement docElem = doc.documentElement();
- QDomNode n = docElem.firstChild();
- QString ssml = parseSsmlNode( docElem, re );
+ TQDomElement docElem = doc.documentElement();
+ TQDomNode n = docElem.firstChild();
+ TQString ssml = parseSsmlNode( docElem, re );
// Close out last sentence.
if ( m_sentenceStarted ) ssml += "</speak>";
@@ -453,37 +453,37 @@ QString SbdThread::parseSsml( const QString& inputText, const QString& re )
}
// Parses code. Each newline is converted into a tab character (\t).
-QString SbdThread::parseCode( const QString& inputText )
+TQString SbdThread::parseCode( const TQString& inputText )
{
- QString temp = inputText;
+ TQString temp = inputText;
// Replace newlines with tabs.
temp.replace("\n","\t");
// Remove leading spaces.
- temp.replace(QRegExp("\\t +"), "\t");
+ temp.replace(TQRegExp("\\t +"), "\t");
// Remove trailing spaces.
- temp.replace(QRegExp(" +\\t"), "\t");
+ temp.replace(TQRegExp(" +\\t"), "\t");
// Remove blank lines.
- temp.replace(QRegExp("\t\t+"),"\t");
+ temp.replace(TQRegExp("\t\t+"),"\t");
return temp;
}
// Parses plain text.
-QString SbdThread::parsePlainText( const QString& inputText, const QString& re )
+TQString SbdThread::parsePlainText( const TQString& inputText, const TQString& re )
{
// kdDebug() << "SbdThread::parsePlainText: parsing " << inputText << " with re " << re << endl;
- QRegExp sentenceDelimiter = QRegExp( re );
- QString temp = inputText;
+ TQRegExp sentenceDelimiter = TQRegExp( re );
+ TQString temp = inputText;
// Replace sentence delimiters with tab.
temp.replace(sentenceDelimiter, m_configuredSentenceBoundary);
// Replace remaining newlines with spaces.
temp.replace("\n"," ");
temp.replace("\r"," ");
// Remove leading spaces.
- temp.replace(QRegExp("\\t +"), "\t");
+ temp.replace(TQRegExp("\\t +"), "\t");
// Remove trailing spaces.
- temp.replace(QRegExp(" +\\t"), "\t");
+ temp.replace(TQRegExp(" +\\t"), "\t");
// Remove blank lines.
- temp.replace(QRegExp("\t\t+"),"\t");
+ temp.replace(TQRegExp("\t\t+"),"\t");
return temp;
}
@@ -502,8 +502,8 @@ QString SbdThread::parsePlainText( const QString& inputText, const QString& re )
else
{
// Examine just the first 500 chars to see if it is code.
- QString p = m_text.left( 500 );
- if ( p.contains( QRegExp( "(/\\*)|(if\\b\\()|(^#include\\b)" ) ) )
+ TQString p = m_text.left( 500 );
+ if ( p.contains( TQRegExp( "(/\\*)|(if\\b\\()|(^#include\\b)" ) ) )
textType = ttCode;
else
textType = ttPlain;
@@ -511,11 +511,11 @@ QString SbdThread::parsePlainText( const QString& inputText, const QString& re )
// If application specified a sentence delimiter regular expression, use that,
// otherwise use configured default.
- QString re = m_re;
+ TQString re = m_re;
if ( re.isEmpty() ) re = m_configuredRe;
// Replace spaces, tabs, and formfeeds with a single space.
- m_text.replace(QRegExp("[ \\t\\f]+"), " ");
+ m_text.replace(TQRegExp("[ \\t\\f]+"), " ");
// Perform the filtering based on type of text.
switch ( textType )
@@ -534,7 +534,7 @@ QString SbdThread::parsePlainText( const QString& inputText, const QString& re )
}
// Clear app-specified sentence delimiter. App must call setSbRegExp for each conversion.
- m_re = QString::null;
+ m_re = TQString::null;
// kdDebug() << "SbdThread::run: filtered text = " << m_text << endl;
@@ -542,13 +542,13 @@ QString SbdThread::parsePlainText( const QString& inputText, const QString& re )
// Post an event. We need to emit filterFinished signal, but not from the
// separate thread.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 301);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 301);
+ TQApplication::postEvent(this, ev);
}
-bool SbdThread::event ( QEvent * e )
+bool SbdThread::event ( TQEvent * e )
{
- if ( e->type() == (QEvent::User + 301) )
+ if ( e->type() == (TQEvent::User + 301) )
{
// kdDebug() << "SbdThread::event: emitting filteringFinished signal." << endl;
emit filteringFinished();
@@ -562,12 +562,12 @@ bool SbdThread::event ( QEvent * e )
/**
* Constructor.
*/
-SbdProc::SbdProc( QObject *parent, const char *name, const QStringList& /*args*/) :
+SbdProc::SbdProc( TQObject *parent, const char *name, const TQStringList& /*args*/) :
KttsFilterProc(parent, name)
{
// kdDebug() << "SbdProc::SbdProc: Running" << endl;
m_sbdThread = new SbdThread( parent, *name + "_thread" );
- connect( m_sbdThread, SIGNAL(filteringFinished()), this, SLOT(slotSbdThreadFilteringFinished()) );
+ connect( m_sbdThread, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotSbdThreadFilteringFinished()) );
}
/**
@@ -596,13 +596,13 @@ SbdProc::~SbdProc()
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
-bool SbdProc::init(KConfig* config, const QString& configGroup){
+bool SbdProc::init(KConfig* config, const TQString& configGroup){
// kdDebug() << "PlugInProc::init: Running" << endl;
config->setGroup( configGroup );
// m_configuredRe = config->readEntry( "SentenceDelimiterRegExp", "([\\.\\?\\!\\:\\;])\\s|(\\n *\\n)" );
m_configuredRe = config->readEntry( "SentenceDelimiterRegExp", "([\\.\\?\\!\\:\\;])(\\s|$|(\\n *\\n))" );
m_sbdThread->setConfiguredSbRegExp( m_configuredRe );
- QString sb = config->readEntry( "SentenceBoundary", "\\1\t" );
+ TQString sb = config->readEntry( "SentenceBoundary", "\\1\t" );
sb.replace( "\\t", "\t" );
m_sbdThread->setConfiguredSentenceBoundary( sb );
m_appIdList = config->readListEntry( "AppID" );
@@ -638,7 +638,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
-/*virtual*/ QString SbdProc::convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId)
+/*virtual*/ TQString SbdProc::convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId)
{
if ( asyncConvert( inputText, talkerCode, appId) )
{
@@ -662,14 +662,14 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){
* program may then call @ref getOutput to retrieve converted text. Calling
* program must call @ref ackFinished to acknowledge the conversion.
*/
-/*virtual*/ bool SbdProc::asyncConvert(const QString& inputText, TalkerCode* talkerCode,
- const QCString& appId)
+/*virtual*/ bool SbdProc::asyncConvert(const TQString& inputText, TalkerCode* talkerCode,
+ const TQCString& appId)
{
m_sbdThread->setWasModified( false );
// If language doesn't match, return input unmolested.
if ( !m_languageCodeList.isEmpty() )
{
- QString languageCode = talkerCode->languageCode();
+ TQString languageCode = talkerCode->languageCode();
// kdDebug() << "StringReplacerProc::convert: converting " << inputText <<
// " if language code " << languageCode << " matches " << m_languageCodeList << endl;
if ( !m_languageCodeList.contains( languageCode ) )
@@ -689,7 +689,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){
// kdDebug() << "SbdProc::convert: converting " << inputText << " if appId "
// << appId << " matches " << m_appIdList << endl;
bool found = false;
- QString appIdStr = appId;
+ TQString appIdStr = appId;
for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx )
{
if ( appIdStr.contains(m_appIdList[ndx]) )
@@ -729,7 +729,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){
/**
* Returns the filtered output.
*/
-/*virtual*/ QString SbdProc::getOutput() { return m_sbdThread->text(); }
+/*virtual*/ TQString SbdProc::getOutput() { return m_sbdThread->text(); }
/**
* Acknowledges the finished filtering.
@@ -737,7 +737,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){
/*virtual*/ void SbdProc::ackFinished()
{
m_state = fsIdle;
- m_sbdThread->setText( QString::null );
+ m_sbdThread->setText( TQString::null );
}
/**
@@ -753,7 +753,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){
delete m_sbdThread;
m_sbdThread = new SbdThread();
m_sbdThread->setConfiguredSbRegExp( m_configuredRe );
- connect( m_sbdThread, SIGNAL(filteringFinished()), this, SLOT(slotSbdThreadFilteringFinished()) );
+ connect( m_sbdThread, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotSbdThreadFilteringFinished()) );
m_state = fsIdle;
emit filteringStopped();
}
@@ -771,7 +771,7 @@ bool SbdProc::init(KConfig* config, const QString& configGroup){
*
* @param re The sentence delimiter regular expression.
*/
-/*virtual*/ void SbdProc::setSbRegExp(const QString& re) { m_sbdThread->setSbRegExp( re ); }
+/*virtual*/ void SbdProc::setSbRegExp(const TQString& re) { m_sbdThread->setSbRegExp( re ); }
// Received when SBD Thread finishes.
void SbdProc::slotSbdThreadFilteringFinished()
diff --git a/kttsd/filters/sbd/sbdproc.h b/kttsd/filters/sbd/sbdproc.h
index 6c181d5..75e4d59 100644
--- a/kttsd/filters/sbd/sbdproc.h
+++ b/kttsd/filters/sbd/sbdproc.h
@@ -46,11 +46,11 @@
#define _SBDPROC_H_
// Qt includes.
-#include <qobject.h>
-#include <qstringlist.h>
-#include <qthread.h>
-#include <qvaluestack.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
+#include <tqthread.h>
+#include <tqvaluestack.h>
+#include <tqevent.h>
// KTTS includes.
#include "filterproc.h"
@@ -60,7 +60,7 @@ class KConfig;
class QDomElement;
class QDomNode;
-class SbdThread: public QObject, public QThread
+class SbdThread: public TQObject, public QThread
{
Q_OBJECT
@@ -68,7 +68,7 @@ class SbdThread: public QObject, public QThread
/**
* Constructor.
*/
- SbdThread( QObject *parent = 0, const char *name = 0);
+ SbdThread( TQObject *parent = 0, const char *name = 0);
/**
* Destructor.
@@ -78,8 +78,8 @@ class SbdThread: public QObject, public QThread
/**
* Get/Set text being processed.
*/
- void setText( const QString& text );
- QString text();
+ void setText( const TQString& text );
+ TQString text();
/**
* Set/Get TalkerCode.
@@ -93,14 +93,14 @@ class SbdThread: public QObject, public QThread
*
* @param re The sentence delimiter regular expression.
*/
- void setSbRegExp( const QString& re );
+ void setSbRegExp( const TQString& re );
/**
* The configured Sentence Boundary Regular Expression.
*
* @param re The sentence delimiter regular expression.
*/
- void setConfiguredSbRegExp( const QString& re );
+ void setConfiguredSbRegExp( const TQString& re );
/**
* The configured Sentence Boundary that replaces SB regular expression.
@@ -108,7 +108,7 @@ class SbdThread: public QObject, public QThread
* @param sb The sentence boundary replacement.
*
*/
- void setConfiguredSentenceBoundary( const QString& sb );
+ void setConfiguredSentenceBoundary( const TQString& sb );
/**
* Did this filter do anything? If the filter returns the input as output
@@ -122,7 +122,7 @@ class SbdThread: public QObject, public QThread
protected:
virtual void run();
- virtual bool event ( QEvent * e );
+ virtual bool event ( TQEvent * e );
private:
enum TextType {
@@ -143,94 +143,94 @@ class SbdThread: public QObject, public QThread
// Speak Element.
struct SpeakElem {
- QString lang; // xml:lang="en".
+ TQString lang; // xml:lang="en".
};
// Voice Element.
struct VoiceElem {
- QString lang; // xml:lang="en".
- QString gender; // "male", "female", or "neutral".
+ TQString lang; // xml:lang="en".
+ TQString gender; // "male", "female", or "neutral".
uint age; // Age in years.
- QString name; // Synth-specific voice name.
- QString variant; // Ignored.
+ TQString name; // Synth-specific voice name.
+ TQString variant; // Ignored.
};
// Prosody Element.
struct ProsodyElem {
- QString pitch; // "x-low", "low", "medium", "high", "x-high", "default".
- QString contour; // Pitch contour (ignored).
- QString range; // "x-low", "low", "medium", "high", "x-high", "default".
- QString rate; // "x-slow", "slow", "medium", "fast", "x-fast", "default".
- QString duration; // Ignored.
- QString volume; // "silent", "x-soft", "soft", "medium", "load", "x-load", "default".
+ TQString pitch; // "x-low", "low", "medium", "high", "x-high", "default".
+ TQString contour; // Pitch contour (ignored).
+ TQString range; // "x-low", "low", "medium", "high", "x-high", "default".
+ TQString rate; // "x-slow", "slow", "medium", "fast", "x-fast", "default".
+ TQString duration; // Ignored.
+ TQString volume; // "silent", "x-soft", "soft", "medium", "load", "x-load", "default".
};
// Emphasis Element.
struct EmphasisElem {
- QString level; // "strong", "moderate", "none" and "reduced"
+ TQString level; // "strong", "moderate", "none" and "reduced"
};
// Break Element.
struct BreakElem {
- QString strength; // "x-weak", "weak", "medium" (default value), "strong",
+ TQString strength; // "x-weak", "weak", "medium" (default value), "strong",
// or "x-strong", "none"
- QString time; // Ignored.
+ TQString time; // Ignored.
};
// Paragraph and Sentence Elements.
struct PSElem {
- QString lang; // xml:lang="en".
+ TQString lang; // xml:lang="en".
};
// Given a tag name, returns SsmlElemType.
- SsmlElemType tagToSsmlElemType(const QString tagName);
+ SsmlElemType tagToSsmlElemType(const TQString tagName);
// Parses an SSML element, pushing current settings onto the context stack.
- void pushSsmlElem( SsmlElemType et, const QDomElement& elem );
+ void pushSsmlElem( SsmlElemType et, const TQDomElement& elem );
// Given an attribute name and value, constructs an XML representation of the attribute,
// i.e., name="value".
- QString makeAttr( const QString& name, const QString& value );
+ TQString makeAttr( const TQString& name, const TQString& value );
// Returns an XML representation of an SSML tag from the top of the context stack.
- QString makeSsmlElem( SsmlElemType et );
+ TQString makeSsmlElem( SsmlElemType et );
// Pops element from the indicated context stack.
void popSsmlElem( SsmlElemType et );
- QString makeBreakElem( const QDomElement& e );
+ TQString makeBreakElem( const TQDomElement& e );
// Converts a text fragment into a CDATA section.
- QString makeCDATA( const QString& text );
+ TQString makeCDATA( const TQString& text );
// Returns an XML representation of an utterance node consisting of voice,
// prosody, and emphasis elements.
- QString makeSentence( const QString& text );
+ TQString makeSentence( const TQString& text );
// Starts a sentence by returning a speak tag.
- QString startSentence();
+ TQString startSentence();
// Ends a sentence and appends a Tab.
- QString endSentence();
+ TQString endSentence();
// Parses a node of the SSML tree and recursively parses its children.
// Returns the filtered text with each sentence a complete ssml tree.
- QString parseSsmlNode( QDomNode& n, const QString& re );
+ TQString parseSsmlNode( TQDomNode& n, const TQString& re );
// Parses Ssml.
- QString parseSsml( const QString& inputText, const QString& re );
+ TQString parseSsml( const TQString& inputText, const TQString& re );
// Parses code. Each newline is converted into a tab character (\t).
- QString parseCode( const QString& inputText );
+ TQString parseCode( const TQString& inputText );
// Parses plain text.
- QString parsePlainText( const QString& inputText, const QString& re );
+ TQString parsePlainText( const TQString& inputText, const TQString& re );
// Context stacks.
- QValueStack<SpeakElem> m_speakStack;
- QValueStack<VoiceElem> m_voiceStack;
- QValueStack<ProsodyElem> m_prosodyStack;
- QValueStack<EmphasisElem> m_emphasisStack;
- QValueStack<PSElem> m_psStack;
+ TQValueStack<SpeakElem> m_speakStack;
+ TQValueStack<VoiceElem> m_voiceStack;
+ TQValueStack<ProsodyElem> m_prosodyStack;
+ TQValueStack<EmphasisElem> m_emphasisStack;
+ TQValueStack<PSElem> m_psStack;
// The text being processed.
- QString m_text;
+ TQString m_text;
// Talker Code.
TalkerCode* m_talkerCode;
// Configured default Sentence Delimiter regular expression.
- QString m_configuredRe;
+ TQString m_configuredRe;
// Configured Sentence Boundary replacement expression.
- QString m_configuredSentenceBoundary;
+ TQString m_configuredSentenceBoundary;
// Application-specified Sentence Delimiter regular expression (if any).
- QString m_re;
+ TQString m_re;
// False if input was not modified.
bool m_wasModified;
// True when a sentence has been started.
@@ -245,7 +245,7 @@ class SbdProc : virtual public KttsFilterProc
/**
* Constructor.
*/
- SbdProc( QObject *parent, const char *name, const QStringList &args = QStringList() );
+ SbdProc( TQObject *parent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor.
@@ -261,7 +261,7 @@ class SbdProc : virtual public KttsFilterProc
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
- virtual bool init( KConfig *config, const QString &configGroup );
+ virtual bool init( KConfig *config, const TQString &configGroup );
/**
* Returns True if this filter is a Sentence Boundary Detector.
@@ -291,7 +291,7 @@ class SbdProc : virtual public KttsFilterProc
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
- virtual QString convert( const QString& inputText, TalkerCode* talkerCode, const QCString& appId );
+ virtual TQString convert( const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId );
/**
* Convert input. Runs asynchronously.
@@ -307,7 +307,7 @@ class SbdProc : virtual public KttsFilterProc
* program may then call @ref getOutput to retrieve converted text. Calling
* program must call @ref ackFinished to acknowledge the conversion.
*/
- virtual bool asyncConvert( const QString& inputText, TalkerCode* talkerCode, const QCString& appId );
+ virtual bool asyncConvert( const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId );
/**
* Waits for a previous call to asyncConvert to finish.
@@ -322,7 +322,7 @@ class SbdProc : virtual public KttsFilterProc
/**
* Returns the filtered output.
*/
- virtual QString getOutput();
+ virtual TQString getOutput();
/**
* Acknowledges the finished filtering.
@@ -344,7 +344,7 @@ class SbdProc : virtual public KttsFilterProc
/**
* Set Sentence Boundary Regular Expression.
*/
- virtual void setSbRegExp( const QString& re );
+ virtual void setSbRegExp( const TQString& re );
private slots:
// Received when SBD Thread finishes.
@@ -352,15 +352,15 @@ class SbdProc : virtual public KttsFilterProc
private:
// If not empty, apply filters only to apps using talkers speaking these language codes.
- QStringList m_languageCodeList;
+ TQStringList m_languageCodeList;
// If not empty, apply filter only to apps containing this string.
- QStringList m_appIdList;
+ TQStringList m_appIdList;
// SBD Thread Object.
SbdThread* m_sbdThread;
// State.
int m_state;
// Configured default Sentence Delimiter regular expression.
- QString m_configuredRe;
+ TQString m_configuredRe;
};
#endif // _SBDPROC_H_
diff --git a/kttsd/filters/stringreplacer/stringreplacerconf.cpp b/kttsd/filters/stringreplacer/stringreplacerconf.cpp
index 9afa2d5..72f50d8 100644
--- a/kttsd/filters/stringreplacer/stringreplacerconf.cpp
+++ b/kttsd/filters/stringreplacer/stringreplacerconf.cpp
@@ -22,15 +22,15 @@
******************************************************************************/
// Qt includes.
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstring.h>
-#include <qhbox.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qradiobutton.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqradiobutton.h>
// KDE includes.
#include <kglobal.h>
@@ -59,7 +59,7 @@
/**
* Constructor
*/
-StringReplacerConf::StringReplacerConf( QWidget *parent, const char *name, const QStringList& /*args*/) :
+StringReplacerConf::StringReplacerConf( TQWidget *parent, const char *name, const TQStringList& /*args*/) :
KttsFilterConf(parent, name),
m_editDlg(0),
m_editWidget(0)
@@ -67,37 +67,37 @@ StringReplacerConf::StringReplacerConf( QWidget *parent, const char *name, const
// kdDebug() << "StringReplacerConf::StringReplacerConf: Running" << endl;
// Create configuration widget.
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "StringReplacerConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new StringReplacerConfWidget(this, "StringReplacerConfigWidget");
layout->addWidget(m_widget);
m_widget->substLView->setSortColumn(-1);
- connect(m_widget->nameLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->languageBrowseButton, SIGNAL(clicked()),
- this, SLOT(slotLanguageBrowseButton_clicked()));
- connect(m_widget->addButton, SIGNAL(clicked()),
- this, SLOT(slotAddButton_clicked()));
- connect(m_widget->upButton, SIGNAL(clicked()),
- this, SLOT(slotUpButton_clicked()));
- connect(m_widget->downButton, SIGNAL(clicked()),
- this, SLOT(slotDownButton_clicked()));
- connect(m_widget->editButton, SIGNAL(clicked()),
- this, SLOT(slotEditButton_clicked()));
- connect(m_widget->removeButton, SIGNAL(clicked()),
- this, SLOT(slotRemoveButton_clicked()));
- connect(m_widget->loadButton, SIGNAL(clicked()),
- this, SLOT(slotLoadButton_clicked()));
- connect(m_widget->saveButton, SIGNAL(clicked()),
- this, SLOT(slotSaveButton_clicked()));
- connect(m_widget->clearButton, SIGNAL(clicked()),
- this, SLOT(slotClearButton_clicked()));
- connect(m_widget->substLView, SIGNAL(selectionChanged()),
- this, SLOT(enableDisableButtons()));
- connect(m_widget->appIdLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
+ connect(m_widget->nameLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->languageBrowseButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotLanguageBrowseButton_clicked()));
+ connect(m_widget->addButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotAddButton_clicked()));
+ connect(m_widget->upButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotUpButton_clicked()));
+ connect(m_widget->downButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotDownButton_clicked()));
+ connect(m_widget->editButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotEditButton_clicked()));
+ connect(m_widget->removeButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotRemoveButton_clicked()));
+ connect(m_widget->loadButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotLoadButton_clicked()));
+ connect(m_widget->saveButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSaveButton_clicked()));
+ connect(m_widget->clearButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotClearButton_clicked()));
+ connect(m_widget->substLView, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(enableDisableButtons()));
+ connect(m_widget->appIdLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
// Determine if kdeutils Regular Expression Editor is installed.
m_reEditorInstalled = !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty();
@@ -126,14 +126,14 @@ StringReplacerConf::~StringReplacerConf(){
* @param configGroup Call config->setGroup with this argument before
* loading your configuration.
*/
-void StringReplacerConf::load(KConfig* config, const QString& configGroup){
+void StringReplacerConf::load(KConfig* config, const TQString& configGroup){
// kdDebug() << "StringReplacerConf::load: Running" << endl;
// See if this filter previously save its word list.
config->setGroup( configGroup );
- QString wordsFilename = config->readEntry( "WordListFile" );
+ TQString wordsFilename = config->readEntry( "WordListFile" );
if ( !wordsFilename.isEmpty() )
{
- QString errMsg = loadFromFile( wordsFilename, true );
+ TQString errMsg = loadFromFile( wordsFilename, true );
if ( !errMsg.isEmpty() )
kdDebug() << "StringReplacerConf::load: " << errMsg << endl;
enableDisableButtons();
@@ -141,16 +141,16 @@ void StringReplacerConf::load(KConfig* config, const QString& configGroup){
}
// Loads word list and settings from a file. Clearing configuration if clear is True.
-QString StringReplacerConf::loadFromFile( const QString& filename, bool clear)
+TQString StringReplacerConf::loadFromFile( const TQString& filename, bool clear)
{
// Open existing word list.
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_ReadOnly ) )
{
return i18n("Unable to open file.") + filename;
}
- // QDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" );
- QDomDocument doc( "" );
+ // TQDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" );
+ TQDomDocument doc( "" );
if ( !doc.setContent( &file ) ) {
file.close();
return i18n("File not in proper XML format.");
@@ -162,26 +162,26 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear)
if ( clear ) m_widget->substLView->clear();
// Name setting.
- QDomNodeList nameList = doc.elementsByTagName( "name" );
- QDomNode nameNode = nameList.item( 0 );
+ TQDomNodeList nameList = doc.elementsByTagName( "name" );
+ TQDomNode nameNode = nameList.item( 0 );
m_widget->nameLineEdit->setText( nameNode.toElement().text() );
// kdDebug() << "StringReplacerConf::load: name = " << nameNode.toElement().text() << endl;
// Language Codes setting. List may be single element of comma-separated values,
// or multiple elements.
- QString languageCodes;
- QDomNodeList languageList = doc.elementsByTagName( "language-code" );
+ TQString languageCodes;
+ TQDomNodeList languageList = doc.elementsByTagName( "language-code" );
for ( uint ndx=0; ndx < languageList.count(); ++ndx )
{
- QDomNode languageNode = languageList.item( ndx );
+ TQDomNode languageNode = languageList.item( ndx );
if (!languageCodes.isEmpty()) languageCodes += ",";
languageCodes += languageNode.toElement().text();
}
if ( clear )
- m_languageCodeList = QStringList::split(',', languageCodes, false);
+ m_languageCodeList = TQStringList::split(',', languageCodes, false);
else
- m_languageCodeList += QStringList::split(',', languageCodes, false);
- QString language;
+ m_languageCodeList += TQStringList::split(',', languageCodes, false);
+ TQString language;
m_languageCodeList.sort();
// Eliminate dups.
for ( int ndx = m_languageCodeList.count() - 2; ndx >= 0; --ndx )
@@ -199,11 +199,11 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear)
// AppId. Apply this filter only if DCOP appId of application that queued
// the text contains this string. List may be single element of comma-separated values,
// or multiple elements.
- QDomNodeList appIdList = doc.elementsByTagName( "appid" );
- QString appIds;
+ TQDomNodeList appIdList = doc.elementsByTagName( "appid" );
+ TQString appIds;
for ( uint ndx=0; ndx < appIdList.count(); ++ndx )
{
- QDomNode appIdNode = appIdList.item( ndx );
+ TQDomNode appIdNode = appIdList.item( ndx );
if (!appIds.isEmpty()) appIds += ",";
appIds += appIdNode.toElement().text();
}
@@ -211,32 +211,32 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear)
m_widget->appIdLineEdit->setText( appIds );
// Word list.
- QListViewItem* item = 0;
+ TQListViewItem* item = 0;
if ( !clear ) item = m_widget->substLView->lastChild();
- QDomNodeList wordList = doc.elementsByTagName("word");
+ TQDomNodeList wordList = doc.elementsByTagName("word");
const int wordListCount = wordList.count();
for (int wordIndex = 0; wordIndex < wordListCount; ++wordIndex)
{
// kdDebug() << "StringReplacerConf::load: start parsing of word " << wordIndex << endl;
- QDomNode wordNode = wordList.item(wordIndex);
- QDomNodeList propList = wordNode.childNodes();
- QString wordType;
- QString matchCase = "No"; // Default for old (v<=3.5.3) config files with no <case/>.
- QString match;
- QString subst;
+ TQDomNode wordNode = wordList.item(wordIndex);
+ TQDomNodeList propList = wordNode.childNodes();
+ TQString wordType;
+ TQString matchCase = "No"; // Default for old (v<=3.5.3) config files with no <case/>.
+ TQString match;
+ TQString subst;
const int propListCount = propList.count();
for (int propIndex = 0; propIndex < propListCount; ++propIndex)
{
- QDomNode propNode = propList.item(propIndex);
- QDomElement prop = propNode.toElement();
+ TQDomNode propNode = propList.item(propIndex);
+ TQDomElement prop = propNode.toElement();
if (prop.tagName() == "type") wordType = prop.text();
if (prop.tagName() == "case") matchCase = prop.text();
if (prop.tagName() == "match") match = prop.text();
if (prop.tagName() == "subst") subst = prop.text();
}
- QString wordTypeStr =
+ TQString wordTypeStr =
(wordType=="RegExp"?i18n("Abbreviation for 'Regular Expression'", "RegExp"):i18n("Word"));
- QString matchCaseStr =
+ TQString matchCaseStr =
(matchCase=="Yes"?i18n("Yes"):i18n("No"));
if (!item)
item = new KListViewItem(m_widget->substLView, wordTypeStr, matchCaseStr, match, subst);
@@ -244,7 +244,7 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear)
item = new KListViewItem(m_widget->substLView, item, wordTypeStr, matchCaseStr, match, subst);
}
- return QString::null;
+ return TQString::null;
}
/**
@@ -257,9 +257,9 @@ QString StringReplacerConf::loadFromFile( const QString& filename, bool clear)
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
-void StringReplacerConf::save(KConfig* config, const QString& configGroup){
+void StringReplacerConf::save(KConfig* config, const TQString& configGroup){
// kdDebug() << "StringReplacerConf::save: Running" << endl;
- QString wordsFilename =
+ TQString wordsFilename =
KGlobal::dirs()->saveLocation( "data" ,"kttsd/stringreplacer/", true );
if ( wordsFilename.isEmpty() )
{
@@ -267,7 +267,7 @@ void StringReplacerConf::save(KConfig* config, const QString& configGroup){
return;
}
wordsFilename += configGroup;
- QString errMsg = saveToFile( wordsFilename );
+ TQString errMsg = saveToFile( wordsFilename );
if ( errMsg.isEmpty() )
{
config->setGroup( configGroup );
@@ -278,43 +278,43 @@ void StringReplacerConf::save(KConfig* config, const QString& configGroup){
}
// Saves word list and settings to a file.
-QString StringReplacerConf::saveToFile(const QString& filename)
+TQString StringReplacerConf::saveToFile(const TQString& filename)
{
// kdDebug() << "StringReplacerConf::saveToFile: saving to file " << wordsFilename << endl;
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_WriteOnly ) )
return i18n("Unable to open file ") + filename;
- // QDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" );
- QDomDocument doc( "" );
+ // TQDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" );
+ TQDomDocument doc( "" );
- QDomElement root = doc.createElement( "wordlist" );
+ TQDomElement root = doc.createElement( "wordlist" );
doc.appendChild( root );
// Name.
- QDomElement name = doc.createElement( "name" );
+ TQDomElement name = doc.createElement( "name" );
root.appendChild( name );
- QDomText t = doc.createTextNode( m_widget->nameLineEdit->text() );
+ TQDomText t = doc.createTextNode( m_widget->nameLineEdit->text() );
name.appendChild( t );
// Language code.
for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx )
{
- QDomElement languageCode = doc.createElement( "language-code" );
+ TQDomElement languageCode = doc.createElement( "language-code" );
root.appendChild( languageCode );
t = doc.createTextNode( m_languageCodeList[ndx] );
languageCode.appendChild( t );
}
// Application ID
- QString appId = m_widget->appIdLineEdit->text().replace(" ", "");
+ TQString appId = m_widget->appIdLineEdit->text().replace(" ", "");
if ( !appId.isEmpty() )
{
- QStringList appIdList = QStringList::split(",", appId);
+ TQStringList appIdList = TQStringList::split(",", appId);
for ( uint ndx=0; ndx < appIdList.count(); ++ndx )
{
- QDomElement appIdElem = doc.createElement( "appid" );
+ TQDomElement appIdElem = doc.createElement( "appid" );
root.appendChild( appIdElem );
t = doc.createTextNode( appIdList[ndx] );
appIdElem.appendChild( t );
@@ -322,15 +322,15 @@ QString StringReplacerConf::saveToFile(const QString& filename)
}
// Words.
- QListView* lView = m_widget->substLView;
- QListViewItem* item = lView->firstChild();
+ TQListView* lView = m_widget->substLView;
+ TQListViewItem* item = lView->firstChild();
while (item)
{
- QDomElement wordTag = doc.createElement( "word" );
+ TQDomElement wordTag = doc.createElement( "word" );
root.appendChild( wordTag );
- QDomElement propTag = doc.createElement( "type" );
+ TQDomElement propTag = doc.createElement( "type" );
wordTag.appendChild( propTag);
- QDomText t = doc.createTextNode( item->text(0)==i18n("Word")?"Word":"RegExp" );
+ TQDomText t = doc.createTextNode( item->text(0)==i18n("Word")?"Word":"RegExp" );
propTag.appendChild( t );
propTag = doc.createElement( "case" );
@@ -352,14 +352,14 @@ QString StringReplacerConf::saveToFile(const QString& filename)
}
// Write it all out.
- QTextStream ts( &file );
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream ts( &file );
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
ts << doc.toString();
// kdDebug() << "StringReplacerConf::saveToFile: writing out " << doc.toString() << endl;
file.close();
- return QString::null;
+ return TQString::null;
}
/**
@@ -398,13 +398,13 @@ bool StringReplacerConf::supportsMultiInstance() { return true; }
* return an empty string.
* @return Filter instance name.
*/
-QString StringReplacerConf::userPlugInName()
+TQString StringReplacerConf::userPlugInName()
{
- if ( m_widget->substLView->childCount() == 0 ) return QString::null;
- QString instName = m_widget->nameLineEdit->text();
+ if ( m_widget->substLView->childCount() == 0 ) return TQString::null;
+ TQString instName = m_widget->nameLineEdit->text();
if ( instName.isEmpty() )
{
- QString language;
+ TQString language;
if (m_languageCodeList.count() == 1)
language = KGlobal::locale()->twoAlphaToLanguageName(m_languageCodeList[0]);
if (m_languageCodeList.count() > 1)
@@ -417,21 +417,21 @@ QString StringReplacerConf::userPlugInName()
void StringReplacerConf::slotLanguageBrowseButton_clicked()
{
- // Create a QHBox to host KListView.
- QHBox* hBox = new QHBox(m_widget, "SelectLanguage_hbox");
+ // Create a TQHBox to host KListView.
+ TQHBox* hBox = new TQHBox(m_widget, "SelectLanguage_hbox");
// Create a KListView and fill with all known languages.
KListView* langLView = new KListView(hBox, "SelectLanguage_lview");
langLView->addColumn(i18n("Language"));
langLView->addColumn(i18n("Code"));
- langLView->setSelectionMode(QListView::Extended);
- QStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha();
- QString locale;
- QString languageCode;
- QString countryCode;
- QString charSet;
- QString language;
+ langLView->setSelectionMode(TQListView::Extended);
+ TQStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha();
+ TQString locale;
+ TQString languageCode;
+ TQString countryCode;
+ TQString charSet;
+ TQString language;
// Blank line so user can select no language.
- QListViewItem* item = new KListViewItem(langLView, "", "");
+ TQListViewItem* item = new KListViewItem(langLView, "", "");
if (m_languageCodeList.isEmpty()) item->setSelected(true);
const int allLocalesCount = allLocales.count();
for (int ndx=0; ndx < allLocalesCount; ++ndx)
@@ -459,13 +459,13 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked()
true);
dlg->setMainWidget(hBox);
dlg->setHelp("", "kttsd");
- dlg->setInitialSize(QSize(300, 500), false);
+ dlg->setInitialSize(TQSize(300, 500), false);
int dlgResult = dlg->exec();
- languageCode = QString::null;
- if (dlgResult == QDialog::Accepted)
+ languageCode = TQString::null;
+ if (dlgResult == TQDialog::Accepted)
{
m_languageCodeList.clear();
- QListViewItem* item = langLView->firstChild();
+ TQListViewItem* item = langLView->firstChild();
while (item)
{
if (item->isSelected()) m_languageCodeList += item->text(1);
@@ -474,17 +474,17 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked()
}
delete dlg;
// TODO: Also delete KListView and QHBox?
- if (dlgResult != QDialog::Accepted) return;
+ if (dlgResult != TQDialog::Accepted) return;
language = "";
for ( uint ndx=0; ndx < m_languageCodeList.count(); ++ndx)
{
if (!language.isEmpty()) language += ",";
language += KGlobal::locale()->twoAlphaToLanguageName(m_languageCodeList[ndx]);
}
- QString s1 = m_widget->languageLineEdit->text();
+ TQString s1 = m_widget->languageLineEdit->text();
m_widget->languageLineEdit->setText(language);
// Replace language in the user's filter name.
- QString s2 = m_widget->nameLineEdit->text();
+ TQString s2 = m_widget->nameLineEdit->text();
if (m_languageCodeList.count() > 1) language = i18n("Multiple Languages");
if ( !s1.isEmpty() )
{
@@ -518,9 +518,9 @@ void StringReplacerConf::enableDisableButtons()
void StringReplacerConf::slotUpButton_clicked()
{
- QListViewItem* item = m_widget->substLView->selectedItem();
+ TQListViewItem* item = m_widget->substLView->selectedItem();
if (!item) return;
- QListViewItem* prevItem = item->itemAbove();
+ TQListViewItem* prevItem = item->itemAbove();
if (!prevItem) return;
prevItem->moveItem(item);
m_widget->substLView->setSelected(item, true);
@@ -531,9 +531,9 @@ void StringReplacerConf::slotUpButton_clicked()
void StringReplacerConf::slotDownButton_clicked()
{
- QListViewItem* item = m_widget->substLView->selectedItem();
+ TQListViewItem* item = m_widget->substLView->selectedItem();
if (!item) return;
- QListViewItem* nextItem = item->itemBelow();
+ TQListViewItem* nextItem = item->itemBelow();
if (!nextItem) return;
item->moveItem(nextItem);
m_widget->substLView->setSelected(item, true);
@@ -555,7 +555,7 @@ void StringReplacerConf::slotEditButton_clicked()
// Displays the add/edit string replacement dialog.
void StringReplacerConf::addOrEditSubstitution(bool isAdd)
{
- QListViewItem* item = 0;
+ TQListViewItem* item = 0;
if (isAdd)
item = m_widget->substLView->lastChild();
else
@@ -563,8 +563,8 @@ void StringReplacerConf::addOrEditSubstitution(bool isAdd)
item = m_widget->substLView->selectedItem();
if (!item) return;
}
- // Create a QHBox to host widget.
- QHBox* hBox = new QHBox(m_widget, "AddOrEditSubstitution_hbox" );
+ // Create a TQHBox to host widget.
+ TQHBox* hBox = new TQHBox(m_widget, "AddOrEditSubstitution_hbox" );
// Create widget.
m_editWidget = new EditReplacementWidget( hBox, "AddOrEditSubstitution_widget" );
// Set controls if editing existing.
@@ -581,14 +581,14 @@ void StringReplacerConf::addOrEditSubstitution(bool isAdd)
m_editWidget->substLineEdit->setText( item->text(3) );
}
// The match box may not be blank.
- connect( m_editWidget->matchLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotMatchLineEdit_textChanged(const QString&)) );
- connect( m_editWidget->regexpRadioButton, SIGNAL(clicked()),
- this, SLOT(slotTypeButtonGroup_clicked()) );
- connect( m_editWidget->wordRadioButton, SIGNAL(clicked()),
- this, SLOT(slotTypeButtonGroup_clicked()) );
- connect( m_editWidget->matchButton, SIGNAL(clicked()),
- this, SLOT(slotMatchButton_clicked()) );
+ connect( m_editWidget->matchLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotMatchLineEdit_textChanged(const TQString&)) );
+ connect( m_editWidget->regexpRadioButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotTypeButtonGroup_clicked()) );
+ connect( m_editWidget->wordRadioButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotTypeButtonGroup_clicked()) );
+ connect( m_editWidget->matchButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotMatchButton_clicked()) );
// Display the box in a dialog.
m_editDlg = new KDialogBase(
KDialogBase::Swallow,
@@ -604,17 +604,17 @@ void StringReplacerConf::addOrEditSubstitution(bool isAdd)
m_editDlg->setHelp( "", "kttsd" );
m_editDlg->enableButton( KDialogBase::Ok, !m_editWidget->matchLineEdit->text().isEmpty() );
int dlgResult = m_editDlg->exec();
- QString substType = i18n( "Word" );
+ TQString substType = i18n( "Word" );
if ( m_editWidget->regexpRadioButton->isChecked() )
substType = i18n("Abbreviation for 'Regular Expression'", "RegExp");
- QString matchCase = i18n("No");
+ TQString matchCase = i18n("No");
if ( m_editWidget->caseCheckBox->isChecked() ) matchCase = i18n("Yes");
- QString match = m_editWidget->matchLineEdit->text();
- QString subst = m_editWidget->substLineEdit->text();
+ TQString match = m_editWidget->matchLineEdit->text();
+ TQString subst = m_editWidget->substLineEdit->text();
delete m_editDlg;
m_editDlg = 0;
m_editWidget = 0;
- if (dlgResult != QDialog::Accepted) return;
+ if (dlgResult != TQDialog::Accepted) return;
// TODO: Also delete hBox and w?
if ( match.isEmpty() ) return;
if ( isAdd )
@@ -637,7 +637,7 @@ void StringReplacerConf::addOrEditSubstitution(bool isAdd)
configChanged();
}
-void StringReplacerConf::slotMatchLineEdit_textChanged(const QString& text)
+void StringReplacerConf::slotMatchLineEdit_textChanged(const TQString& text)
{
// Disable OK button if match field blank.
if ( !m_editDlg ) return;
@@ -646,7 +646,7 @@ void StringReplacerConf::slotMatchLineEdit_textChanged(const QString& text)
void StringReplacerConf::slotRemoveButton_clicked()
{
- QListViewItem* item = m_widget->substLView->selectedItem();
+ TQListViewItem* item = m_widget->substLView->selectedItem();
if (!item) return;
delete item;
enableDisableButtons();
@@ -666,8 +666,8 @@ void StringReplacerConf::slotMatchButton_clicked()
if ( !m_editWidget ) return;
if ( !m_editDlg ) return;
if ( !m_reEditorInstalled ) return;
- QDialog *editorDialog =
- KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor" );
+ TQDialog *editorDialog =
+ KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" );
if ( editorDialog )
{
// kdeutils was installed, so the dialog was found. Fetch the editor interface.
@@ -676,9 +676,9 @@ void StringReplacerConf::slotMatchButton_clicked()
Q_ASSERT( reEditor ); // This should not fail!// now use the editor.
reEditor->setRegExp( m_editWidget->matchLineEdit->text() );
int dlgResult = editorDialog->exec();
- if ( dlgResult == QDialog::Accepted )
+ if ( dlgResult == TQDialog::Accepted )
{
- QString re = reEditor->regExp();
+ TQString re = reEditor->regExp();
m_editWidget->matchLineEdit->setText( re );
m_editDlg->enableButton( KDialogBase::Ok, !re.isEmpty() );
}
@@ -688,15 +688,15 @@ void StringReplacerConf::slotMatchButton_clicked()
void StringReplacerConf::slotLoadButton_clicked()
{
- // QString dataDir = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/stringreplacer/";
- QString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/stringreplacer/").last();
- QString filename = KFileDialog::getOpenFileName(
+ // TQString dataDir = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/stringreplacer/";
+ TQString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/stringreplacer/").last();
+ TQString filename = KFileDialog::getOpenFileName(
dataDir,
"*.xml|String Replacer Word List (*.xml)",
m_widget,
"stringreplacer_loadfile");
if ( filename.isEmpty() ) return;
- QString errMsg = loadFromFile( filename, false );
+ TQString errMsg = loadFromFile( filename, false );
enableDisableButtons();
if ( !errMsg.isEmpty() )
KMessageBox::sorry( m_widget, errMsg, i18n("Error Opening File") );
@@ -706,13 +706,13 @@ void StringReplacerConf::slotLoadButton_clicked()
void StringReplacerConf::slotSaveButton_clicked()
{
- QString filename = KFileDialog::getSaveFileName(
+ TQString filename = KFileDialog::getSaveFileName(
KGlobal::dirs()->saveLocation( "data" ,"kttsd/stringreplacer/", false ),
"*.xml|String Replacer Word List (*.xml)",
m_widget,
"stringreplacer_savefile");
if ( filename.isEmpty() ) return;
- QString errMsg = saveToFile( filename );
+ TQString errMsg = saveToFile( filename );
enableDisableButtons();
if ( !errMsg.isEmpty() )
KMessageBox::sorry( m_widget, errMsg, i18n("Error Opening File") );
diff --git a/kttsd/filters/stringreplacer/stringreplacerconf.h b/kttsd/filters/stringreplacer/stringreplacerconf.h
index f0312a6..1606390 100644
--- a/kttsd/filters/stringreplacer/stringreplacerconf.h
+++ b/kttsd/filters/stringreplacer/stringreplacerconf.h
@@ -25,7 +25,7 @@
#define _STRINGREPLACERCONF_H_
// Qt includes.
-#include <qwidget.h>
+#include <tqwidget.h>
// KDE includes.
#include <kconfig.h>
@@ -48,7 +48,7 @@ class StringReplacerConf : public KttsFilterConf
/**
* Constructor
*/
- StringReplacerConf( QWidget *parent, const char *name, const QStringList &args = QStringList() );
+ StringReplacerConf( TQWidget *parent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor
@@ -78,7 +78,7 @@ class StringReplacerConf : public KttsFilterConf
* any instance-specific parameters to load, but it may still wish
* to load parameters that apply to all instances of the plugin.
*/
- virtual void load(KConfig *config, const QString &configGroup);
+ virtual void load(KConfig *config, const TQString &configGroup);
/**
* This function gets called when the user wants to save the settings in
@@ -90,7 +90,7 @@ class StringReplacerConf : public KttsFilterConf
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
- virtual void save(KConfig *config, const QString &configGroup);
+ virtual void save(KConfig *config, const TQString &configGroup);
/**
* This function is called to set the settings in the module to sensible
@@ -116,7 +116,7 @@ class StringReplacerConf : public KttsFilterConf
* return an empty string.
* @return Filter instance name.
*/
- virtual QString userPlugInName();
+ virtual TQString userPlugInName();
private slots:
void slotLanguageBrowseButton_clicked();
@@ -125,7 +125,7 @@ class StringReplacerConf : public KttsFilterConf
void slotDownButton_clicked();
void slotEditButton_clicked();
void slotRemoveButton_clicked();
- void slotMatchLineEdit_textChanged(const QString& text);
+ void slotMatchLineEdit_textChanged(const TQString& text);
void slotTypeButtonGroup_clicked();
void slotMatchButton_clicked();
void slotLoadButton_clicked();
@@ -139,9 +139,9 @@ class StringReplacerConf : public KttsFilterConf
// Displays the add/edit string replacement dialog.
void addOrEditSubstitution(bool isAdd);
// Loads word list and settings from a file. Clearing configuration if clear is True.
- QString loadFromFile( const QString& filename, bool clear);
+ TQString loadFromFile( const TQString& filename, bool clear);
// Saves word list and settings to a file.
- QString saveToFile( const QString& filename );
+ TQString saveToFile( const TQString& filename );
// Configuration Widget.
@@ -152,7 +152,7 @@ class StringReplacerConf : public KttsFilterConf
// True if kdeutils Regular Expression Editor is installed.
bool m_reEditorInstalled;
// Language Codes.
- QStringList m_languageCodeList;
+ TQStringList m_languageCodeList;
};
#endif //_STRINGREPLACERCONF_H_
diff --git a/kttsd/filters/stringreplacer/stringreplacerproc.cpp b/kttsd/filters/stringreplacer/stringreplacerproc.cpp
index 1b03810..8987d79 100644
--- a/kttsd/filters/stringreplacer/stringreplacerproc.cpp
+++ b/kttsd/filters/stringreplacer/stringreplacerproc.cpp
@@ -22,9 +22,9 @@
******************************************************************************/
// Qt includes.
-#include <qdom.h>
-#include <qfile.h>
-#include <qlistview.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqlistview.h>
// KDE includes.
#include <kdebug.h>
@@ -44,7 +44,7 @@
/**
* Constructor.
*/
-StringReplacerProc::StringReplacerProc( QObject *parent, const char *name, const QStringList& ) :
+StringReplacerProc::StringReplacerProc( TQObject *parent, const char *name, const TQStringList& ) :
KttsFilterProc(parent, name)
{
}
@@ -68,9 +68,9 @@ StringReplacerProc::StringReplacerProc( QObject *parent, const char *name, const
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
-bool StringReplacerProc::init(KConfig* config, const QString& configGroup){
+bool StringReplacerProc::init(KConfig* config, const TQString& configGroup){
// kdDebug() << "StringReplacerProc::init: Running" << endl;
- QString wordsFilename =
+ TQString wordsFilename =
KGlobal::dirs()->saveLocation( "data" ,"kttsd/stringreplacer/", false );
if ( wordsFilename.isEmpty() ) return false;
wordsFilename += configGroup;
@@ -78,10 +78,10 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){
wordsFilename = config->readEntry( "WordListFile", wordsFilename );
// Open existing word list.
- QFile file( wordsFilename );
+ TQFile file( wordsFilename );
if ( !file.open( IO_ReadOnly ) )
return false;
- QDomDocument doc( "" );
+ TQDomDocument doc( "" );
if ( !doc.setContent( &file ) ) {
file.close();
return false;
@@ -94,54 +94,54 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){
m_substList.clear();
// Name setting.
- // QDomNodeList nameList = doc.elementsByTagName( "name" );
- // QDomNode nameNode = nameList.item( 0 );
+ // TQDomNodeList nameList = doc.elementsByTagName( "name" );
+ // TQDomNode nameNode = nameList.item( 0 );
// m_widget->nameLineEdit->setText( nameNode.toElement().text() );
// Language Codes setting. List may be single element of comma-separated values,
// or multiple elements.
m_languageCodeList.clear();
- QDomNodeList languageList = doc.elementsByTagName( "language-code" );
+ TQDomNodeList languageList = doc.elementsByTagName( "language-code" );
for ( uint ndx=0; ndx < languageList.count(); ++ndx )
{
- QDomNode languageNode = languageList.item( ndx );
- m_languageCodeList += QStringList::split(',', languageNode.toElement().text(), false);
+ TQDomNode languageNode = languageList.item( ndx );
+ m_languageCodeList += TQStringList::split(',', languageNode.toElement().text(), false);
}
// AppId. Apply this filter only if DCOP appId of application that queued
// the text contains this string. List may be single element of comma-separated values,
// or multiple elements.
m_appIdList.clear();
- QDomNodeList appIdList = doc.elementsByTagName( "appid" );
+ TQDomNodeList appIdList = doc.elementsByTagName( "appid" );
for ( uint ndx=0; ndx < appIdList.count(); ++ndx )
{
- QDomNode appIdNode = appIdList.item( ndx );
- m_appIdList += QStringList::split(',', appIdNode.toElement().text(), false);
+ TQDomNode appIdNode = appIdList.item( ndx );
+ m_appIdList += TQStringList::split(',', appIdNode.toElement().text(), false);
}
// Word list.
- QDomNodeList wordList = doc.elementsByTagName("word");
+ TQDomNodeList wordList = doc.elementsByTagName("word");
const int wordListCount = wordList.count();
for (int wordIndex = 0; wordIndex < wordListCount; ++wordIndex)
{
- QDomNode wordNode = wordList.item(wordIndex);
- QDomNodeList propList = wordNode.childNodes();
- QString wordType;
- QString matchCase = "No"; // Default for old (v<=3.5.3) config files with no <case/>.
- QString match;
- QString subst;
+ TQDomNode wordNode = wordList.item(wordIndex);
+ TQDomNodeList propList = wordNode.childNodes();
+ TQString wordType;
+ TQString matchCase = "No"; // Default for old (v<=3.5.3) config files with no <case/>.
+ TQString match;
+ TQString subst;
const int propListCount = propList.count();
for (int propIndex = 0; propIndex < propListCount; ++propIndex)
{
- QDomNode propNode = propList.item(propIndex);
- QDomElement prop = propNode.toElement();
+ TQDomNode propNode = propList.item(propIndex);
+ TQDomElement prop = propNode.toElement();
if (prop.tagName() == "type") wordType = prop.text();
if (prop.tagName() == "case") matchCase = prop.text();
if (prop.tagName() == "match") match = prop.text();
if (prop.tagName() == "subst") subst = prop.text();
}
// Build Regular Expression for each word's match string.
- QRegExp rx;
+ TQRegExp rx;
rx.setCaseSensitive(matchCase == "Yes");
if ( wordType == "Word" )
{
@@ -171,13 +171,13 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
-/*virtual*/ QString StringReplacerProc::convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId)
+/*virtual*/ TQString StringReplacerProc::convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId)
{
m_wasModified = false;
// If language doesn't match, return input unmolested.
if ( !m_languageCodeList.isEmpty() )
{
- QString languageCode = talkerCode->languageCode();
+ TQString languageCode = talkerCode->languageCode();
// kdDebug() << "StringReplacerProc::convert: converting " << inputText <<
// " if language code " << languageCode << " matches " << m_languageCodeList << endl;
if ( !m_languageCodeList.contains( languageCode ) )
@@ -197,7 +197,7 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){
// kdDebug() << "StringReplacerProc::convert: converting " << inputText << " if appId "
// << appId << " matches " << m_appIdList << endl;
bool found = false;
- QString appIdStr = appId;
+ TQString appIdStr = appId;
for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx )
{
if ( appIdStr.contains(m_appIdList[ndx]) )
@@ -212,7 +212,7 @@ bool StringReplacerProc::init(KConfig* config, const QString& configGroup){
return inputText;
}
}
- QString newText = inputText;
+ TQString newText = inputText;
const int listCount = m_matchList.count();
for ( int index = 0; index < listCount; ++index )
{
diff --git a/kttsd/filters/stringreplacer/stringreplacerproc.h b/kttsd/filters/stringreplacer/stringreplacerproc.h
index 114ebaf..b679113 100644
--- a/kttsd/filters/stringreplacer/stringreplacerproc.h
+++ b/kttsd/filters/stringreplacer/stringreplacerproc.h
@@ -26,11 +26,11 @@
#define _STRINGREPLACERPROC_H_
// Qt includes.
-#include <qobject.h>
-#include <qtextstream.h>
-#include <qvaluelist.h>
-#include <qregexp.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqtextstream.h>
+#include <tqvaluelist.h>
+#include <tqregexp.h>
+#include <tqstringlist.h>
// KTTS includes.
#include "filterproc.h"
@@ -43,7 +43,7 @@ public:
/**
* Constructor.
*/
- StringReplacerProc( QObject *parent, const char *name, const QStringList &args = QStringList() );
+ StringReplacerProc( TQObject *parent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor.
@@ -59,7 +59,7 @@ public:
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Convert input, returning output.
@@ -70,7 +70,7 @@ public:
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
- virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId);
+ virtual TQString convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId);
/**
* Did this filter do anything? If the filter returns the input as output
@@ -80,16 +80,16 @@ public:
private:
// Language codes supported by the filter.
- QStringList m_languageCodeList;
+ TQStringList m_languageCodeList;
// If not empty, apply filter only to apps containing one or more of these strings.
- QStringList m_appIdList;
+ TQStringList m_appIdList;
// List of regular expressions to match.
- QValueList<QRegExp> m_matchList;
+ TQValueList<TQRegExp> m_matchList;
// List of match case flag
- QValueList<QString> m_caseList;
+ TQValueList<TQString> m_caseList;
// List of substitutions to replace matches.
- QValueList<QString> m_substList;
+ TQValueList<TQString> m_substList;
// True if this filter did anything to the text.
bool m_wasModified;
};
diff --git a/kttsd/filters/talkerchooser/talkerchooserconf.cpp b/kttsd/filters/talkerchooser/talkerchooserconf.cpp
index 0dbf53f..cc811a3 100644
--- a/kttsd/filters/talkerchooser/talkerchooserconf.cpp
+++ b/kttsd/filters/talkerchooser/talkerchooserconf.cpp
@@ -22,9 +22,9 @@
******************************************************************************/
// Qt includes.
-#include <qstring.h>
-#include <qhbox.h>
-#include <qlayout.h>
+#include <tqstring.h>
+#include <tqhbox.h>
+#include <tqlayout.h>
// KDE includes.
#include <klocale.h>
@@ -49,13 +49,13 @@
/**
* Constructor
*/
-TalkerChooserConf::TalkerChooserConf( QWidget *parent, const char *name, const QStringList& /*args*/) :
+TalkerChooserConf::TalkerChooserConf( TQWidget *parent, const char *name, const TQStringList& /*args*/) :
KttsFilterConf(parent, name)
{
// kdDebug() << "TalkerChooserConf::TalkerChooserConf: Running" << endl;
// Create configuration widget.
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "TalkerChooserConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new TalkerChooserConfWidget(this, "TalkerChooserConfigWidget");
@@ -65,23 +65,23 @@ TalkerChooserConf::TalkerChooserConf( QWidget *parent, const char *name, const Q
m_reEditorInstalled = !KTrader::self()->query("KRegExpEditor/KRegExpEditor").isEmpty();
m_widget->reEditorButton->setEnabled(m_reEditorInstalled);
- connect(m_widget->nameLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->reLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->reEditorButton, SIGNAL(clicked()),
- this, SLOT(slotReEditorButton_clicked()));
- connect(m_widget->appIdLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->talkerButton, SIGNAL(clicked()),
- this, SLOT(slotTalkerButton_clicked()));
+ connect(m_widget->nameLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->reLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->reEditorButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotReEditorButton_clicked()));
+ connect(m_widget->appIdLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->talkerButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotTalkerButton_clicked()));
- connect(m_widget->loadButton, SIGNAL(clicked()),
- this, SLOT(slotLoadButton_clicked()));
- connect(m_widget->saveButton, SIGNAL(clicked()),
- this, SLOT(slotSaveButton_clicked()));
- connect(m_widget->clearButton, SIGNAL(clicked()),
- this, SLOT(slotClearButton_clicked()));
+ connect(m_widget->loadButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotLoadButton_clicked()));
+ connect(m_widget->saveButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotSaveButton_clicked()));
+ connect(m_widget->clearButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotClearButton_clicked()));
// Set up defaults.
defaults();
@@ -107,7 +107,7 @@ TalkerChooserConf::~TalkerChooserConf(){
* @param configGroup Call config->setGroup with this argument before
* loading your configuration.
*/
-void TalkerChooserConf::load(KConfig* config, const QString& configGroup){
+void TalkerChooserConf::load(KConfig* config, const TQString& configGroup){
// kdDebug() << "TalkerChooserConf::load: Running" << endl;
config->setGroup( configGroup );
m_widget->nameLineEdit->setText( config->readEntry( "UserFilterName", m_widget->nameLineEdit->text() ) );
@@ -118,7 +118,7 @@ void TalkerChooserConf::load(KConfig* config, const QString& configGroup){
m_talkerCode = TalkerCode(config->readEntry("TalkerCode"), false);
// Legacy settings.
- QString s = config->readEntry( "LanguageCode" );
+ TQString s = config->readEntry( "LanguageCode" );
if (!s.isEmpty()) m_talkerCode.setFullLanguageCode(s);
s = config->readEntry( "SynthInName" );
if (!s.isEmpty()) m_talkerCode.setPlugInName(s);
@@ -142,7 +142,7 @@ void TalkerChooserConf::load(KConfig* config, const QString& configGroup){
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
-void TalkerChooserConf::save(KConfig* config, const QString& configGroup){
+void TalkerChooserConf::save(KConfig* config, const TQString& configGroup){
// kdDebug() << "TalkerChooserConf::save: Running" << endl;
config->setGroup( configGroup );
config->writeEntry( "UserFilterName", m_widget->nameLineEdit->text() );
@@ -167,7 +167,7 @@ void TalkerChooserConf::defaults(){
// Default App ID is blank.
m_widget->appIdLineEdit->setText( "" );
// Default to using default Talker.
- m_talkerCode = TalkerCode( QString::null, false );
+ m_talkerCode = TalkerCode( TQString::null, false );
m_widget->talkerLineEdit->setText( m_talkerCode.getTranslatedDescription() );
}
@@ -186,13 +186,13 @@ bool TalkerChooserConf::supportsMultiInstance() { return true; }
* return an empty string.
* @return Filter instance name.
*/
-QString TalkerChooserConf::userPlugInName()
+TQString TalkerChooserConf::userPlugInName()
{
- if (m_widget->talkerLineEdit->text().isEmpty()) return QString::null;
+ if (m_widget->talkerLineEdit->text().isEmpty()) return TQString::null;
if (m_widget->appIdLineEdit->text().isEmpty() &&
- m_widget->reLineEdit->text().isEmpty()) return QString::null;
- QString instName = m_widget->nameLineEdit->text();
- if (instName.isEmpty()) return QString::null;
+ m_widget->reLineEdit->text().isEmpty()) return TQString::null;
+ TQString instName = m_widget->nameLineEdit->text();
+ if (instName.isEmpty()) return TQString::null;
return instName;
}
@@ -200,8 +200,8 @@ void TalkerChooserConf::slotReEditorButton_clicked()
{
// Show Regular Expression Editor dialog if it is installed.
if ( !m_reEditorInstalled ) return;
- QDialog *editorDialog =
- KParts::ComponentFactory::createInstanceFromQuery<QDialog>( "KRegExpEditor/KRegExpEditor" );
+ TQDialog *editorDialog =
+ KParts::ComponentFactory::createInstanceFromQuery<TQDialog>( "KRegExpEditor/KRegExpEditor" );
if ( editorDialog )
{
// kdeutils was installed, so the dialog was found. Fetch the editor interface.
@@ -210,9 +210,9 @@ void TalkerChooserConf::slotReEditorButton_clicked()
Q_ASSERT( reEditor ); // This should not fail!// now use the editor.
reEditor->setRegExp( m_widget->reLineEdit->text() );
int dlgResult = editorDialog->exec();
- if ( dlgResult == QDialog::Accepted )
+ if ( dlgResult == TQDialog::Accepted )
{
- QString re = reEditor->regExp();
+ TQString re = reEditor->regExp();
m_widget->reLineEdit->setText( re );
}
delete editorDialog;
@@ -221,7 +221,7 @@ void TalkerChooserConf::slotReEditorButton_clicked()
void TalkerChooserConf::slotTalkerButton_clicked()
{
- QString talkerCode = m_talkerCode.getTalkerCode();
+ TQString talkerCode = m_talkerCode.getTalkerCode();
SelectTalkerDlg dlg( m_widget, "selecttalkerdialog", i18n("Select Talker"), talkerCode, true );
int dlgResult = dlg.exec();
if ( dlgResult != KDialogBase::Accepted ) return;
@@ -232,8 +232,8 @@ void TalkerChooserConf::slotTalkerButton_clicked()
void TalkerChooserConf::slotLoadButton_clicked()
{
- QString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/talkerchooser/").last();
- QString filename = KFileDialog::getOpenFileName(
+ TQString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/talkerchooser/").last();
+ TQString filename = KFileDialog::getOpenFileName(
dataDir,
"*rc|Talker Chooser Config (*rc)",
m_widget,
@@ -247,7 +247,7 @@ void TalkerChooserConf::slotLoadButton_clicked()
void TalkerChooserConf::slotSaveButton_clicked()
{
- QString filename = KFileDialog::getSaveFileName(
+ TQString filename = KFileDialog::getSaveFileName(
KGlobal::dirs()->saveLocation( "data" ,"kttsd/talkerchooser/", false ),
"*rc|Talker Chooser Config (*rc)",
m_widget,
@@ -260,10 +260,10 @@ void TalkerChooserConf::slotSaveButton_clicked()
void TalkerChooserConf::slotClearButton_clicked()
{
- m_widget->nameLineEdit->setText( QString::null );
- m_widget->reLineEdit->setText( QString::null );
- m_widget->appIdLineEdit->setText( QString::null );
- m_talkerCode = TalkerCode( QString::null, false );
+ m_widget->nameLineEdit->setText( TQString::null );
+ m_widget->reLineEdit->setText( TQString::null );
+ m_widget->appIdLineEdit->setText( TQString::null );
+ m_talkerCode = TalkerCode( TQString::null, false );
m_widget->talkerLineEdit->setText( m_talkerCode.getTranslatedDescription() );
configChanged();
}
diff --git a/kttsd/filters/talkerchooser/talkerchooserconf.h b/kttsd/filters/talkerchooser/talkerchooserconf.h
index d6b3959..38a6c49 100644
--- a/kttsd/filters/talkerchooser/talkerchooserconf.h
+++ b/kttsd/filters/talkerchooser/talkerchooserconf.h
@@ -25,7 +25,7 @@
#define _TALKERCHOOSERCONF_H_
// Qt includes.
-#include <qwidget.h>
+#include <tqwidget.h>
// KDE includes.
#include <kconfig.h>
@@ -50,7 +50,7 @@ class TalkerChooserConf : public KttsFilterConf
/**
* Constructor
*/
- TalkerChooserConf( QWidget *parent, const char *name, const QStringList &args = QStringList() );
+ TalkerChooserConf( TQWidget *parent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor
@@ -75,7 +75,7 @@ class TalkerChooserConf : public KttsFilterConf
* any instance-specific parameters to load, but it may still wish
* to load parameters that apply to all instances of the plugin.
*/
- virtual void load(KConfig *config, const QString &configGroup);
+ virtual void load(KConfig *config, const TQString &configGroup);
/**
* This function gets called when the user wants to save the settings in
@@ -87,7 +87,7 @@ class TalkerChooserConf : public KttsFilterConf
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
- virtual void save(KConfig *config, const QString &configGroup);
+ virtual void save(KConfig *config, const TQString &configGroup);
/**
* This function is called to set the settings in the module to sensible
@@ -113,7 +113,7 @@ class TalkerChooserConf : public KttsFilterConf
* return an empty string.
* @return Filter instance name.
*/
- virtual QString userPlugInName();
+ virtual TQString userPlugInName();
private slots:
void slotReEditorButton_clicked();
diff --git a/kttsd/filters/talkerchooser/talkerchooserproc.cpp b/kttsd/filters/talkerchooser/talkerchooserproc.cpp
index 628b68a..5758df2 100644
--- a/kttsd/filters/talkerchooser/talkerchooserproc.cpp
+++ b/kttsd/filters/talkerchooser/talkerchooserproc.cpp
@@ -22,7 +22,7 @@
******************************************************************************/
// Qt includes.
-#include <qregexp.h>
+#include <tqregexp.h>
// KDE includes.
#include <kdebug.h>
@@ -38,7 +38,7 @@
/**
* Constructor.
*/
-TalkerChooserProc::TalkerChooserProc( QObject *parent, const char *name, const QStringList& /*args*/ ) :
+TalkerChooserProc::TalkerChooserProc( TQObject *parent, const char *name, const TQStringList& /*args*/ ) :
KttsFilterProc(parent, name)
{
// kdDebug() << "TalkerChooserProc::TalkerChooserProc: Running" << endl;
@@ -61,14 +61,14 @@ TalkerChooserProc::~TalkerChooserProc()
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
-bool TalkerChooserProc::init(KConfig* config, const QString& configGroup){
+bool TalkerChooserProc::init(KConfig* config, const TQString& configGroup){
// kdDebug() << "PlugInProc::init: Running" << endl;
config->setGroup( configGroup );
m_re = config->readEntry( "MatchRegExp" );
m_appIdList = config->readListEntry( "AppIDs" );
m_chosenTalkerCode = TalkerCode(config->readEntry("TalkerCode"), false);
// Legacy settings.
- QString s = config->readEntry( "LanguageCode" );
+ TQString s = config->readEntry( "LanguageCode" );
if (!s.isEmpty()) m_chosenTalkerCode.setFullLanguageCode(s);
s = config->readEntry( "SynthInName" );
if (!s.isEmpty()) m_chosenTalkerCode.setPlugInName(s);
@@ -102,12 +102,12 @@ bool TalkerChooserProc::init(KConfig* config, const QString& configGroup){
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
-/*virtual*/ QString TalkerChooserProc::convert(const QString& inputText, TalkerCode* talkerCode,
- const QCString& appId)
+/*virtual*/ TQString TalkerChooserProc::convert(const TQString& inputText, TalkerCode* talkerCode,
+ const TQCString& appId)
{
if ( !m_re.isEmpty() )
{
- int pos = inputText.find( QRegExp(m_re) );
+ int pos = inputText.find( TQRegExp(m_re) );
if ( pos < 0 ) return inputText;
}
// If appId doesn't match, return input unmolested.
@@ -116,7 +116,7 @@ bool TalkerChooserProc::init(KConfig* config, const QString& configGroup){
// kdDebug() << "TalkerChooserProc::convert: converting " << inputText << " if appId "
// << appId << " matches " << m_appIdList << endl;
bool found = false;
- QString appIdStr = appId;
+ TQString appIdStr = appId;
for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx )
{
if ( appIdStr.contains(m_appIdList[ndx]) )
diff --git a/kttsd/filters/talkerchooser/talkerchooserproc.h b/kttsd/filters/talkerchooser/talkerchooserproc.h
index 07cde68..8c9ab01 100644
--- a/kttsd/filters/talkerchooser/talkerchooserproc.h
+++ b/kttsd/filters/talkerchooser/talkerchooserproc.h
@@ -36,7 +36,7 @@ public:
/**
* Constructor.
*/
- TalkerChooserProc( QObject *parent, const char *name, const QStringList &args = QStringList() );
+ TalkerChooserProc( TQObject *parent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor.
@@ -52,7 +52,7 @@ public:
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Returns True if the plugin supports asynchronous processing,
@@ -75,12 +75,12 @@ public:
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
- virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId);
+ virtual TQString convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId);
private:
- QString m_re;
- QStringList m_appIdList;
+ TQString m_re;
+ TQStringList m_appIdList;
TalkerCode m_chosenTalkerCode;
};
diff --git a/kttsd/filters/xhtml2ssml/main.cpp b/kttsd/filters/xhtml2ssml/main.cpp
index 822d068..01655ad 100644
--- a/kttsd/filters/xhtml2ssml/main.cpp
+++ b/kttsd/filters/xhtml2ssml/main.cpp
@@ -1,17 +1,17 @@
-#include <qapplication.h>
-#include <qfile.h>
-#include <qxml.h>
-#include <qmap.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqxml.h>
+#include <tqmap.h>
#include <iostream>
#include "xhtml2ssml.h"
#include "xmlelement.h"
int main(int argc, char *argv[]) {
- QApplication a(argc, argv);
- QFile f("demonstration.html");
- QXmlInputSource input(&f);
- QXmlSimpleReader reader;
+ TQApplication a(argc, argv);
+ TQFile f("demonstration.html");
+ TQXmlInputSource input(&f);
+ TQXmlSimpleReader reader;
XHTMLToSSMLParser *parser = new XHTMLToSSMLParser();
reader.setContentHandler(parser);
reader.parse(input);
diff --git a/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp b/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp
index 7c77b9e..5649cc9 100644
--- a/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp
+++ b/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp
@@ -19,10 +19,10 @@
* *
***************************************************************************/
-#include <qstring.h>
-#include <qdict.h>
-#include <qxml.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqdict.h>
+#include <tqxml.h>
+#include <tqfile.h>
#include <iostream>
#include "xmlelement.h"
@@ -32,13 +32,13 @@
/// Document parsing begin. Init stuff here.
bool XHTMLToSSMLParser::startDocument() {
/// Read the file which maps xhtml tags -> ssml tags. Look at the file for more information.
- QFile file("tagmappingrc");
+ TQFile file("tagmappingrc");
if(!file.open(IO_ReadOnly)) {
std::cerr << "Could not read config file 'tagmappingrc'. Please check that it exists and is readable.\n";
// Kill further parsing
return false;
}
- QTextStream stream(&file);
+ TQTextStream stream(&file);
// File parsing.
bool linestatus = true;
while(!stream.atEnd()) {
@@ -51,37 +51,37 @@ bool XHTMLToSSMLParser::startDocument() {
return true;
}
-bool XHTMLToSSMLParser::startElement(const QString &, const QString &, const QString &qName, const QXmlAttributes &atts) {
- QString attributes = "";
+bool XHTMLToSSMLParser::startElement(const TQString &, const TQString &, const TQString &qName, const TQXmlAttributes &atts) {
+ TQString attributes = "";
if(atts.length() > 0) {
const int attsLength = atts.lenght();
for(int i = 0; i < attsLength; ++i)
attributes += " " + atts.qName(i) + "=\"" + atts.value(i) + "\"";
}
- QString fromelement = qName + attributes;
+ TQString fromelement = qName + attributes;
// If this element is one of the keys that was specified in the configuration file, get what it should be converted to and
// append to the output string.
- QString toelement = m_xhtml2ssml[fromelement];
+ TQString toelement = m_xhtml2ssml[fromelement];
if(toelement)
m_output.append(XMLElement::fromQString(toelement).startTag());
return true;
}
-bool XHTMLToSSMLParser::endElement(const QString &, const QString &, const QString &qName) {
- QString fromelement = qName;
- QString toelement = m_xhtml2ssml[fromelement];
+bool XHTMLToSSMLParser::endElement(const TQString &, const TQString &, const TQString &qName) {
+ TQString fromelement = qName;
+ TQString toelement = m_xhtml2ssml[fromelement];
if(toelement)
m_output.append(XMLElement::fromQString(toelement).endTag());
return true;
}
-bool XHTMLToSSMLParser::characters(const QString &characters) {
+bool XHTMLToSSMLParser::characters(const TQString &characters) {
m_output.append(characters);
return true;
}
-QString XHTMLToSSMLParser::convertedText() {
+TQString XHTMLToSSMLParser::convertedText() {
return m_output.simplifyWhiteSpace();
}
@@ -89,7 +89,7 @@ QString XHTMLToSSMLParser::convertedText() {
/// It makes entries in the m_xhtml2ssml map accordingly.
/// @param line A line from a file to parse
/// @returns true if the syntax of the line was okay and the parsing succeeded - false otherwise.
-bool XHTMLToSSMLParser::readFileConfigEntry(const QString &line) {
+bool XHTMLToSSMLParser::readFileConfigEntry(const TQString &line) {
// comments
if(line.stripWhiteSpace().startsWith("#")) {
return true;
@@ -97,7 +97,7 @@ bool XHTMLToSSMLParser::readFileConfigEntry(const QString &line) {
// break into QStringList
// the second parameter to split is the string, with all space simplified and all space around the : removed, i.e
// "something : somethingelse" -> "something:somethingelse"
- QStringList keyvalue = QStringList::split(":", line.simplifyWhiteSpace().replace(" :", ":").replace(": ", ":"));
+ TQStringList keyvalue = TQStringList::split(":", line.simplifyWhiteSpace().replace(" :", ":").replace(": ", ":"));
if(keyvalue.count() != 2)
return false;
m_xhtml2ssml[keyvalue[0]] = keyvalue[1];
diff --git a/kttsd/filters/xhtml2ssml/xhtml2ssml.h b/kttsd/filters/xhtml2ssml/xhtml2ssml.h
index 7271dc0..2e45dee 100644
--- a/kttsd/filters/xhtml2ssml/xhtml2ssml.h
+++ b/kttsd/filters/xhtml2ssml/xhtml2ssml.h
@@ -22,40 +22,40 @@
#ifndef _XHTML2SSML_H_
#define _XHTML2SSML_H_
-#include <qxml.h>
-#include <qmap.h>
+#include <tqxml.h>
+#include <tqmap.h>
-typedef QMap<QString, QString> QStringMap;
+typedef TQMap<TQString, TQString> QStringMap;
class QString;
-class XHTMLToSSMLParser : public QXmlDefaultHandler {
+class XHTMLToSSMLParser : public TQXmlDefaultHandler {
public:
/// No need to reimplement constructor..
/// The document parsing starts
bool startDocument();
/// start of an element encountered (<element foo="bar">)
- bool startElement(const QString &namespaceURI, const QString &localName, const QString &qName, const QXmlAttributes &atts);
+ bool startElement(const TQString &namespaceURI, const TQString &localName, const TQString &qName, const TQXmlAttributes &atts);
/// end of an element encountered (</element>)
- bool endElement(const QString &namespaceURI, const QString &localName, const QString &qName);
+ bool endElement(const TQString &namespaceURI, const TQString &localName, const TQString &qName);
/// text encountered (blah bah blah)
- bool characters(const QString &);
+ bool characters(const TQString &);
/// Get the output text that was generated during the parsing.
/// @returns The converted text.
- QString convertedText();
+ TQString convertedText();
/// Parse a line from the configuration file which maps xhtml : ssml equivalent.
/// It makes entries in the m_xhtml2ssml map accordingly.
/// @param line A line from a file to parse
/// @returns true if the syntax of the line was okay and the parsing succeeded - false otherwise.
- bool readFileConfigEntry(const QString &line);
+ bool readFileConfigEntry(const TQString &line);
private:
/// Dict of xhtml tags -> ssml tags
QStringMap m_xhtml2ssml;
/// The output of the conversion
- QString m_output;
+ TQString m_output;
};
#endif
diff --git a/kttsd/filters/xhtml2ssml/xmlelement.cpp b/kttsd/filters/xhtml2ssml/xmlelement.cpp
index 53fa4f6..920fd57 100644
--- a/kttsd/filters/xhtml2ssml/xmlelement.cpp
+++ b/kttsd/filters/xhtml2ssml/xmlelement.cpp
@@ -19,7 +19,7 @@
***************************************************************************/
#include "xmlelement.h"
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <iostream>
/// Constructors
@@ -27,7 +27,7 @@ XMLElement::XMLElement() {
m_name = "";
m_attrmapper = AttributeToValueMap();
}
-XMLElement::XMLElement(const QString &name) {
+XMLElement::XMLElement(const TQString &name) {
m_name = name;
m_attrmapper = AttributeToValueMap();
}
@@ -49,11 +49,11 @@ XMLElement XMLElement::operator=(const XMLElement &element) {
return *this;
}
-QString XMLElement::name() {
+TQString XMLElement::name() {
return m_name;
}
-QString XMLElement::startTag() {
- QString output = "<" + m_name + " ";
+TQString XMLElement::startTag() {
+ TQString output = "<" + m_name + " ";
for(AttributeToValueMap::Iterator it = m_attrmapper.begin(); it != m_attrmapper.end(); ++it) {
output.append(it.key() + "=\"" + it.data() + "\" ");
}
@@ -63,25 +63,25 @@ QString XMLElement::startTag() {
return output;
}
-QString XMLElement::endTag() {
+TQString XMLElement::endTag() {
return "</" + m_name + ">";
}
-void XMLElement::setAttribute(const QString &attr, const QString &value) {
+void XMLElement::setAttribute(const TQString &attr, const TQString &value) {
m_attrmapper[attr] = value;
}
-QString XMLElement::attribute(const QString &attr) {
+TQString XMLElement::attribute(const TQString &attr) {
return m_attrmapper[attr];
}
-QString XMLElement::toQString() {
- QString tag = startTag();
+TQString XMLElement::toQString() {
+ TQString tag = startTag();
return tag.left(tag.length() - 1).right(tag.length() - 2);
}
-XMLElement XMLElement::fromQString(const QString &str) {
- QStringList sections = QStringList::split(" ", str);
- QString tagname = sections[0];
+XMLElement XMLElement::fromQString(const TQString &str) {
+ TQStringList sections = TQStringList::split(" ", str);
+ TQString tagname = sections[0];
XMLElement e(tagname.latin1());
sections.pop_front();
@@ -89,7 +89,7 @@ XMLElement XMLElement::fromQString(const QString &str) {
if(sections.count()) {
const int sectionsCount = sections.count();
for(int i = 0; i < sectionsCount; ++i) {
- QStringList list = QStringList::split("=", sections[i]);
+ TQStringList list = TQStringList::split("=", sections[i]);
if(list.count() != 2) {
std::cerr << "XMLElement::fromQString: Cannot convert list: " << list.join("|") << ". `" << str << "' is not in valid format.\n";
return XMLElement(" ");
diff --git a/kttsd/filters/xhtml2ssml/xmlelement.h b/kttsd/filters/xhtml2ssml/xmlelement.h
index c78cd6f..f3d8789 100644
--- a/kttsd/filters/xhtml2ssml/xmlelement.h
+++ b/kttsd/filters/xhtml2ssml/xmlelement.h
@@ -22,16 +22,16 @@
#ifndef XMLELEMENT_H
#define XMLELEMENT_H
-#include <qmap.h>
+#include <tqmap.h>
class QString;
-typedef QMap<QString, QString> AttributeToValueMap;
+typedef TQMap<TQString, TQString> AttributeToValueMap;
class XMLElement {
public:
XMLElement();
- XMLElement(const QString &name);
+ XMLElement(const TQString &name);
~XMLElement();
/// Copy constructor
@@ -42,11 +42,11 @@ public:
/// Get the name of the tag (the text between the greater than and less than symbols).
/// @returns the name of the tag.
- QString name();
+ TQString name();
/// set the name of the tag.
/// @param name the new name of the tag.
- void setName(const QString &name);
+ void setName(const TQString &name);
/// Get a textual representation of the starting of the tag with all attributes and their values set out.
/// @verbatim
@@ -55,35 +55,35 @@ public:
/// element.startTag(); <- <elem foo="bar">
/// @endverbatim
/// @returns A textual representation of the start of the element.
- QString startTag();
+ TQString startTag();
/// Get a textual representation of the closed tag that XMLElement represents.
/// @returns A textual representation of the closed tag represented by the XMLElement.
- QString endTag();
+ TQString endTag();
/// Create an attribute and set its value.
/// @param attr The attribute.
/// @param value The value of the attribute.
- void setAttribute(const QString &attr, const QString &value);
+ void setAttribute(const TQString &attr, const TQString &value);
/// Get the value of an attribute.
/// @param attr The attribute.
/// @returns The value of @param attr
- QString attribute(const QString &attr);
+ TQString attribute(const TQString &attr);
- /// Convert to a QString.
- /// Had issues with QMap and custom classes. For now you can just convert to/from QString and use
+ /// Convert to a TQString.
+ /// Had issues with TQMap and custom classes. For now you can just convert to/from TQString and use
/// That as the key/value pair.
- /// @returns A QString representation of the XMLAttribute.
- QString toQString();
+ /// @returns A TQString representation of the XMLAttribute.
+ TQString toQString();
- /// Create an XMLElement from a QString.
- /// @param str The QString to convert from. Must be of the following syntax- "foo name=\"bar\""
- static XMLElement fromQString(const QString &str);
+ /// Create an XMLElement from a TQString.
+ /// @param str The TQString to convert from. Must be of the following syntax- "foo name=\"bar\""
+ static XMLElement fromQString(const TQString &str);
private:
/// The name of the tag.
- QString m_name;
+ TQString m_name;
/// Attribute : value mappings.
AttributeToValueMap m_attrmapper;
};
diff --git a/kttsd/filters/xmltransformer/xmltransformerconf.cpp b/kttsd/filters/xmltransformer/xmltransformerconf.cpp
index 76cfd70..c70c449 100644
--- a/kttsd/filters/xmltransformer/xmltransformerconf.cpp
+++ b/kttsd/filters/xmltransformer/xmltransformerconf.cpp
@@ -22,8 +22,8 @@
******************************************************************************/
// Qt includes.
-#include <qstring.h>
-#include <qlayout.h>
+#include <tqstring.h>
+#include <tqlayout.h>
// KDE includes.
#include <klocale.h>
@@ -43,13 +43,13 @@
/**
* Constructor
*/
-XmlTransformerConf::XmlTransformerConf( QWidget *parent, const char *name, const QStringList& /*args*/) :
+XmlTransformerConf::XmlTransformerConf( TQWidget *parent, const char *name, const TQStringList& /*args*/) :
KttsFilterConf(parent, name)
{
// kdDebug() << "XmlTransformerConf::XmlTransformerConf: Running" << endl;
// Create configuration widget.
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "XmlTransformerConfWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new XmlTransformerConfWidget(this, "XmlTransformerConfigWidget");
@@ -59,18 +59,18 @@ XmlTransformerConf::XmlTransformerConf( QWidget *parent, const char *name, const
defaults();
// Connect signals.
- connect( m_widget->nameLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect( m_widget->xsltPath, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
- connect( m_widget->xsltprocPath, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
- connect( m_widget->rootElementLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
- connect( m_widget->doctypeLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
- connect( m_widget->appIdLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
+ connect( m_widget->nameLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect( m_widget->xsltPath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
+ connect( m_widget->xsltprocPath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
+ connect( m_widget->rootElementLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
+ connect( m_widget->doctypeLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
+ connect( m_widget->appIdLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
}
/**
@@ -93,7 +93,7 @@ XmlTransformerConf::~XmlTransformerConf(){
* @param configGroup Call config->setGroup with this argument before
* loading your configuration.
*/
-void XmlTransformerConf::load(KConfig* config, const QString& configGroup){
+void XmlTransformerConf::load(KConfig* config, const TQString& configGroup){
// kdDebug() << "XmlTransformerConf::load: Running" << endl;
config->setGroup( configGroup );
m_widget->nameLineEdit->setText( config->readEntry( "UserFilterName", m_widget->nameLineEdit->text() ) );
@@ -117,7 +117,7 @@ void XmlTransformerConf::load(KConfig* config, const QString& configGroup){
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
-void XmlTransformerConf::save(KConfig* config, const QString& configGroup){
+void XmlTransformerConf::save(KConfig* config, const TQString& configGroup){
// kdDebug() << "XmlTransformerConf::save: Running" << endl;
config->setGroup( configGroup );
config->writeEntry( "UserFilterName", m_widget->nameLineEdit->text() );
@@ -167,16 +167,16 @@ bool XmlTransformerConf::supportsMultiInstance() { return true; }
* return an empty string.
* @return Filter instance name.
*/
-QString XmlTransformerConf::userPlugInName()
+TQString XmlTransformerConf::userPlugInName()
{
- QString filePath = realFilePath(m_widget->xsltprocPath->url());
- if (filePath.isEmpty()) return QString::null;
- if (getLocation(filePath).isEmpty()) return QString::null;
+ TQString filePath = realFilePath(m_widget->xsltprocPath->url());
+ if (filePath.isEmpty()) return TQString::null;
+ if (getLocation(filePath).isEmpty()) return TQString::null;
filePath = realFilePath(m_widget->xsltPath->url());
- if (filePath.isEmpty()) return QString::null;
- if (getLocation(filePath).isEmpty()) return QString::null;
- if (!QFileInfo(filePath).isFile()) return QString::null;
+ if (filePath.isEmpty()) return TQString::null;
+ if (getLocation(filePath).isEmpty()) return TQString::null;
+ if (!TQFileInfo(filePath).isFile()) return TQString::null;
return m_widget->nameLineEdit->text();
}
diff --git a/kttsd/filters/xmltransformer/xmltransformerconf.h b/kttsd/filters/xmltransformer/xmltransformerconf.h
index 86df0e2..caec175 100644
--- a/kttsd/filters/xmltransformer/xmltransformerconf.h
+++ b/kttsd/filters/xmltransformer/xmltransformerconf.h
@@ -25,7 +25,7 @@
#define _XMLTRANSFORMERCONF_H_
// Qt includes.
-#include <qwidget.h>
+#include <tqwidget.h>
// KDE includes.
#include <kconfig.h>
@@ -45,7 +45,7 @@ class XmlTransformerConf : public KttsFilterConf
/**
* Constructor
*/
- XmlTransformerConf( QWidget *parent, const char *name, const QStringList &args = QStringList() );
+ XmlTransformerConf( TQWidget *parent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor
@@ -70,7 +70,7 @@ class XmlTransformerConf : public KttsFilterConf
* any instance-specific parameters to load, but it may still wish
* to load parameters that apply to all instances of the plugin.
*/
- virtual void load(KConfig *config, const QString &configGroup);
+ virtual void load(KConfig *config, const TQString &configGroup);
/**
* This function gets called when the user wants to save the settings in
@@ -82,7 +82,7 @@ class XmlTransformerConf : public KttsFilterConf
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
- virtual void save(KConfig *config, const QString &configGroup);
+ virtual void save(KConfig *config, const TQString &configGroup);
/**
* This function is called to set the settings in the module to sensible
@@ -108,7 +108,7 @@ class XmlTransformerConf : public KttsFilterConf
* return an empty string.
* @return Filter instance name.
*/
- virtual QString userPlugInName();
+ virtual TQString userPlugInName();
private slots:
diff --git a/kttsd/filters/xmltransformer/xmltransformerproc.cpp b/kttsd/filters/xmltransformer/xmltransformerproc.cpp
index d4aa1c5..b4b9f71 100644
--- a/kttsd/filters/xmltransformer/xmltransformerproc.cpp
+++ b/kttsd/filters/xmltransformer/xmltransformerproc.cpp
@@ -22,8 +22,8 @@
******************************************************************************/
// Qt includes.
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqregexp.h>
// KDE includes.
#include <kdeversion.h>
@@ -44,7 +44,7 @@
/**
* Constructor.
*/
-XmlTransformerProc::XmlTransformerProc( QObject *parent, const char *name, const QStringList& ) :
+XmlTransformerProc::XmlTransformerProc( TQObject *parent, const char *name, const TQStringList& ) :
KttsFilterProc(parent, name)
{
m_xsltProc = 0;
@@ -56,8 +56,8 @@ XmlTransformerProc::XmlTransformerProc( QObject *parent, const char *name, const
/*virtual*/ XmlTransformerProc::~XmlTransformerProc()
{
delete m_xsltProc;
- if (!m_inFilename.isEmpty()) QFile::remove(m_inFilename);
- if (!m_outFilename.isEmpty()) QFile::remove(m_outFilename);
+ if (!m_inFilename.isEmpty()) TQFile::remove(m_inFilename);
+ if (!m_outFilename.isEmpty()) TQFile::remove(m_outFilename);
}
/**
@@ -69,7 +69,7 @@ XmlTransformerProc::XmlTransformerProc( QObject *parent, const char *name, const
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
-bool XmlTransformerProc::init(KConfig* config, const QString& configGroup)
+bool XmlTransformerProc::init(KConfig* config, const TQString& configGroup)
{
// kdDebug() << "XmlTransformerProc::init: Running." << endl;
config->setGroup( configGroup );
@@ -105,8 +105,8 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup)
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
-/*virtual*/ QString XmlTransformerProc::convert(const QString& inputText, TalkerCode* talkerCode,
- const QCString& appId)
+/*virtual*/ TQString XmlTransformerProc::convert(const TQString& inputText, TalkerCode* talkerCode,
+ const TQCString& appId)
{
// kdDebug() << "XmlTransformerProc::convert: Running." << endl;
// If not properly configured, do nothing.
@@ -139,8 +139,8 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup)
* program may then call @ref getOutput to retrieve converted text. Calling
* program must call @ref ackFinished to acknowledge the conversion.
*/
-/*virtual*/ bool XmlTransformerProc::asyncConvert(const QString& inputText, TalkerCode* /*talkerCode*/,
- const QCString& appId)
+/*virtual*/ bool XmlTransformerProc::asyncConvert(const TQString& inputText, TalkerCode* /*talkerCode*/,
+ const TQCString& appId)
{
m_wasModified = false;
@@ -192,7 +192,7 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup)
// If appId doesn't match, return input unmolested.
if ( !m_appIdList.isEmpty() )
{
- QString appIdStr = appId;
+ TQString appIdStr = appId;
// kdDebug() << "XmlTransformrProc::convert: converting " << inputText << " if appId "
// << appId << " matches " << m_appIdList << endl;
found = false;
@@ -214,7 +214,7 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup)
/// Write @param text to a temporary file.
KTempFile inFile(locateLocal("tmp", "kttsd-"), ".xml");
m_inFilename = inFile.file()->name();
- QTextStream* wstream = inFile.textStream();
+ TQTextStream* wstream = inFile.textStream();
if (wstream == 0) {
/// wtf...
kdDebug() << "XmlTransformerProc::convert: Can't write to " << m_inFilename << endl;;
@@ -226,8 +226,8 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup)
// FIXME: Temporary Fix until Konqi returns properly formatted xhtml with & coded as &amp;
// This will change & inside a CDATA section, which is not good, and also within comments and
// processing instructions, which is OK because we don't speak those anyway.
- QString text = inputText;
- text.replace(QRegExp("&(?!amp;)"),"&amp;");
+ TQString text = inputText;
+ text.replace(TQRegExp("&(?!amp;)"),"&amp;");
*wstream << text;
inFile.close();
#if KDE_VERSION >= KDE_MAKE_VERSION (3,3,0)
@@ -250,12 +250,12 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup)
// m_xsltProc->args() << endl;
m_state = fsFiltering;
- connect(m_xsltProc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)));
- connect(m_xsltProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_xsltProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
+ connect(m_xsltProc, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(slotProcessExited(KProcess*)));
+ connect(m_xsltProc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(m_xsltProc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)));
if (!m_xsltProc->start(KProcess::NotifyOnExit,
static_cast<KProcess::Communication>(KProcess::Stdout | KProcess::Stderr)))
{
@@ -269,7 +269,7 @@ bool XmlTransformerProc::init(KConfig* config, const QString& configGroup)
// Process output when xsltproc exits.
void XmlTransformerProc::processOutput()
{
- QFile::remove(m_inFilename);
+ TQFile::remove(m_inFilename);
int exitStatus = 11;
if (m_xsltProc->normalExit())
@@ -284,27 +284,27 @@ void XmlTransformerProc::processOutput()
{
kdDebug() << "XmlTransformerProc::processOutput: xsltproc abnormal exit. Status = " << exitStatus << endl;
m_state = fsFinished;
- QFile::remove(m_outFilename);
+ TQFile::remove(m_outFilename);
emit filteringFinished();
return;
}
/// Read back the data that was written to /tmp/fileName.output.
- QFile readfile(m_outFilename);
+ TQFile readfile(m_outFilename);
if(!readfile.open(IO_ReadOnly)) {
/// uhh yeah... Issues writing to the output file.
kdDebug() << "XmlTransformerProc::processOutput: Could not read file " << m_outFilename << endl;
m_state = fsFinished;
emit filteringFinished();
}
- QTextStream rstream(&readfile);
+ TQTextStream rstream(&readfile);
m_text = rstream.read();
readfile.close();
kdDebug() << "XmlTransformerProc::processOutput: Read file at " + m_inFilename + " and created " + m_outFilename + " based on the stylesheet at " << m_xsltFilePath << endl;
// Clean up.
- QFile::remove(m_outFilename);
+ TQFile::remove(m_outFilename);
m_state = fsFinished;
m_wasModified = true;
@@ -338,7 +338,7 @@ void XmlTransformerProc::processOutput()
/**
* Returns the filtered output.
*/
-/*virtual*/ QString XmlTransformerProc::getOutput() { return m_text; }
+/*virtual*/ TQString XmlTransformerProc::getOutput() { return m_text; }
/**
* Acknowledges the finished filtering.
@@ -346,7 +346,7 @@ void XmlTransformerProc::processOutput()
/*virtual*/ void XmlTransformerProc::ackFinished()
{
m_state = fsIdle;
- m_text = QString::null;
+ m_text = TQString::null;
}
/**
@@ -373,13 +373,13 @@ void XmlTransformerProc::slotProcessExited(KProcess*)
void XmlTransformerProc::slotReceivedStdout(KProcess*, char* /*buffer*/, int /*buflen*/)
{
- // QString buf = QString::fromLatin1(buffer, buflen);
+ // TQString buf = TQString::fromLatin1(buffer, buflen);
// kdDebug() << "XmlTransformerProc::slotReceivedStdout: Received from xsltproc: " << buf << endl;
}
void XmlTransformerProc::slotReceivedStderr(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "XmlTransformerProc::slotReceivedStderr: Received error from xsltproc: " << buf << endl;
}
diff --git a/kttsd/filters/xmltransformer/xmltransformerproc.h b/kttsd/filters/xmltransformer/xmltransformerproc.h
index 7c88dd1..d50adeb 100644
--- a/kttsd/filters/xmltransformer/xmltransformerproc.h
+++ b/kttsd/filters/xmltransformer/xmltransformerproc.h
@@ -25,8 +25,8 @@
#define _XMLTRANSFORMERPROC_H_
// Qt includes.
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
// KTTS includes.
#include "filterproc.h"
@@ -41,7 +41,7 @@ public:
/**
* Constructor.
*/
- XmlTransformerProc( QObject *parent, const char *name, const QStringList &args = QStringList() );
+ XmlTransformerProc( TQObject *parent, const char *name, const TQStringList &args = TQStringList() );
/**
* Destructor.
@@ -57,7 +57,7 @@ public:
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Returns True if the plugin supports asynchronous processing,
@@ -80,7 +80,7 @@ public:
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
- virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId);
+ virtual TQString convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId);
/**
* Convert input. Runs asynchronously.
@@ -96,7 +96,7 @@ public:
* program may then call @ref getOutput to retrieve converted text. Calling
* program must call @ref ackFinished to acknowledge the conversion.
*/
- virtual bool asyncConvert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId);
+ virtual bool asyncConvert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId);
/**
* Waits for a previous call to asyncConvert to finish.
@@ -111,7 +111,7 @@ public:
/**
* Returns the filtered output.
*/
- virtual QString getOutput();
+ virtual TQString getOutput();
/**
* Acknowledges the finished filtering.
@@ -140,26 +140,26 @@ private:
void processOutput();
// If not empty, only apply to text queued by an applications containing one of these strings.
- QStringList m_appIdList;
+ TQStringList m_appIdList;
// If not empty, only apply to XML that has the specified root element.
- QStringList m_rootElementList;
+ TQStringList m_rootElementList;
// If not empty, only apply to XML that has the specified DOCTYPE spec.
- QStringList m_doctypeList;
+ TQStringList m_doctypeList;
// The text that is being filtered.
- QString m_text;
+ TQString m_text;
// Processing state.
int m_state;
// xsltproc process.
KProcess* m_xsltProc;
// Input and Output filenames.
- QString m_inFilename;
- QString m_outFilename;
+ TQString m_inFilename;
+ TQString m_outFilename;
// User's name for the filter.
- QString m_UserFilterName;
+ TQString m_UserFilterName;
// XSLT file.
- QString m_xsltFilePath;
+ TQString m_xsltFilePath;
// Path to xsltproc processor.
- QString m_xsltprocPath;
+ TQString m_xsltprocPath;
// Did this filter modify the text?
bool m_wasModified;
};
diff --git a/kttsd/kcmkttsmgr/addtalker.cpp b/kttsd/kcmkttsmgr/addtalker.cpp
index 2353ada..4a94cf3 100644
--- a/kttsd/kcmkttsmgr/addtalker.cpp
+++ b/kttsd/kcmkttsmgr/addtalker.cpp
@@ -23,7 +23,7 @@
******************************************************************************/
// Qt includes.
-#include <qradiobutton.h>
+#include <tqradiobutton.h>
// KDE includes.
#include <kcombobox.h>
@@ -34,7 +34,7 @@
// KTTS includes.
#include "addtalker.h"
-AddTalker::AddTalker(SynthToLangMap synthToLangMap, QWidget* parent, const char* name, WFlags fl)
+AddTalker::AddTalker(SynthToLangMap synthToLangMap, TQWidget* parent, const char* name, WFlags fl)
: AddTalkerWidget(parent,name,fl)
{
// Build maps.
@@ -44,13 +44,13 @@ AddTalker::AddTalker(SynthToLangMap synthToLangMap, QWidget* parent, const char*
applyFilter();
// Default to user's desktop language.
- QString languageCode = KGlobal::locale()->defaultLanguage();
+ TQString languageCode = KGlobal::locale()->defaultLanguage();
// If there is not a synth that supports the locale, try stripping country code.
if (!m_langToSynthMap.contains(languageCode))
{
- QString countryCode;
- QString charSet;
- QString twoAlpha;
+ TQString countryCode;
+ TQString charSet;
+ TQString twoAlpha;
KGlobal::locale()->splitLocale(languageCode, twoAlpha, countryCode, charSet);
languageCode = twoAlpha;
}
@@ -58,17 +58,17 @@ AddTalker::AddTalker(SynthToLangMap synthToLangMap, QWidget* parent, const char*
if (!m_langToSynthMap.contains(languageCode)) languageCode = "other";
// Select the language in the language combobox.
- QString language = languageCodeToLanguage(languageCode);
+ TQString language = languageCodeToLanguage(languageCode);
languageSelection->setCurrentItem(language, false);
// Filter comboboxes.
applyFilter();
// Connect widgets to slots.
- connect(languageRadioButton, SIGNAL(clicked()), this, SLOT(applyFilter()));
- connect(synthesizerRadioButton, SIGNAL(clicked()), this, SLOT(applyFilter()));
- connect(languageSelection, SIGNAL(activated(int)), this, SLOT(applyFilter()));
- connect(synthesizerSelection, SIGNAL(activated(int)), this, SLOT(applyFilter()));
+ connect(languageRadioButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(applyFilter()));
+ connect(synthesizerRadioButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(applyFilter()));
+ connect(languageSelection, TQT_SIGNAL(activated(int)), this, TQT_SLOT(applyFilter()));
+ connect(synthesizerSelection, TQT_SIGNAL(activated(int)), this, TQT_SLOT(applyFilter()));
}
AddTalker::~AddTalker()
@@ -78,7 +78,7 @@ AddTalker::~AddTalker()
/**
* Returns user's chosen language code.
*/
-QString AddTalker::getLanguageCode()
+TQString AddTalker::getLanguageCode()
{
return m_languageToLanguageCodeMap[languageSelection->currentText()];
}
@@ -86,47 +86,47 @@ QString AddTalker::getLanguageCode()
/**
* Returns user's chosen synthesizer.
*/
-QString AddTalker::getSynthesizer() { return synthesizerSelection->currentText(); }
+TQString AddTalker::getSynthesizer() { return synthesizerSelection->currentText(); }
// Set the synthesizer-to-languages map.
-// @param synthToLang QMap of supported language codes indexed by synthesizer.
+// @param synthToLang TQMap of supported language codes indexed by synthesizer.
void AddTalker::setSynthToLangMap(SynthToLangMap synthToLangMap)
{
m_synthToLangMap = synthToLangMap;
// "Invert" the map, i.e., map language codes to synthesizers.
- QStringList synthList = m_synthToLangMap.keys();
+ TQStringList synthList = m_synthToLangMap.keys();
const int synthListCount = synthList.count();
for (int synthNdx=0; synthNdx < synthListCount; ++synthNdx)
{
- QString synth = synthList[synthNdx];
- QStringList languageCodeList = m_synthToLangMap[synth];
+ TQString synth = synthList[synthNdx];
+ TQStringList languageCodeList = m_synthToLangMap[synth];
const int languageCodeListCount = languageCodeList.count();
for (int langNdx=0; langNdx < languageCodeListCount; ++langNdx)
{
- QString languageCode = languageCodeList[langNdx];
- QStringList synthesizerList = m_langToSynthMap[languageCode];
+ TQString languageCode = languageCodeList[langNdx];
+ TQStringList synthesizerList = m_langToSynthMap[languageCode];
synthesizerList.append(synth);
m_langToSynthMap[languageCode] = synthesizerList;
}
}
// Fill language to language code map.
- QStringList languageCodeList = m_langToSynthMap.keys();
+ TQStringList languageCodeList = m_langToSynthMap.keys();
const int languageCodeListCount = languageCodeList.count();
for (int ndx = 0; ndx < languageCodeListCount; ++ndx)
{
- QString languageCode = languageCodeList[ndx];
- QString language = languageCodeToLanguage(languageCode);
+ TQString languageCode = languageCodeList[ndx];
+ TQString language = languageCodeToLanguage(languageCode);
m_languageToLanguageCodeMap[language] = languageCode;
}
}
// Converts a language code plus optional country code to language description.
-QString AddTalker::languageCodeToLanguage(const QString &languageCode)
+TQString AddTalker::languageCodeToLanguage(const TQString &languageCode)
{
- QString twoAlpha;
- QString countryCode;
- QString charSet;
- QString language;
+ TQString twoAlpha;
+ TQString countryCode;
+ TQString charSet;
+ TQString language;
if (languageCode == "other")
language = i18n("Other");
else
@@ -146,12 +146,12 @@ void AddTalker::applyFilter()
if (languageRadioButton->isChecked())
{
// Get current language.
- QString language = languageSelection->currentText();
+ TQString language = languageSelection->currentText();
// Fill language combobox will all possible languages.
languageSelection->clear();
- QStringList languageCodeList = m_langToSynthMap.keys();
+ TQStringList languageCodeList = m_langToSynthMap.keys();
const int languageCodeListCount = languageCodeList.count();
- QStringList languageList;
+ TQStringList languageList;
for (int ndx=0; ndx < languageCodeListCount; ++ndx)
{
languageList.append(languageCodeToLanguage(languageCodeList[ndx]));
@@ -166,11 +166,11 @@ void AddTalker::applyFilter()
// Get current language selection.
language = languageSelection->currentText();
// Map current language to language code.
- QString languageCode = m_languageToLanguageCodeMap[language];
+ TQString languageCode = m_languageToLanguageCodeMap[language];
// Get list of synths that support this language code.
- QStringList synthList = m_langToSynthMap[languageCode];
+ TQStringList synthList = m_langToSynthMap[languageCode];
// Get current user's synth selection.
- QString synth = synthesizerSelection->currentText();
+ TQString synth = synthesizerSelection->currentText();
// Fill synthesizer combobox.
synthesizerSelection->clear();
synthList.sort();
@@ -185,10 +185,10 @@ void AddTalker::applyFilter()
else
{
// Get current synth selection.
- QString synth = synthesizerSelection->currentText();
+ TQString synth = synthesizerSelection->currentText();
// Fill synthesizer combobox with all possible synths.
synthesizerSelection->clear();
- QStringList synthList = m_synthToLangMap.keys();
+ TQStringList synthList = m_synthToLangMap.keys();
synthList.sort();
const int synthListCount = synthList.count();
for (int ndx=0; ndx < synthListCount; ++ndx)
@@ -200,13 +200,13 @@ void AddTalker::applyFilter()
// Get current synth selection.
synth = synthesizerSelection->currentText();
// Get list of supported language codes.
- QStringList languageCodeList = m_synthToLangMap[synth];
+ TQStringList languageCodeList = m_synthToLangMap[synth];
// Get current user's language selection.
- QString language = languageSelection->currentText();
+ TQString language = languageSelection->currentText();
// Fill language combobox with language descriptions.
languageSelection->clear();
const int languageCodeListCount = languageCodeList.count();
- QStringList languageList;
+ TQStringList languageList;
for (int ndx=0; ndx < languageCodeListCount; ++ndx)
{
languageList.append(languageCodeToLanguage(languageCodeList[ndx]));
diff --git a/kttsd/kcmkttsmgr/addtalker.h b/kttsd/kcmkttsmgr/addtalker.h
index 29bbfb5..33b9ba8 100644
--- a/kttsd/kcmkttsmgr/addtalker.h
+++ b/kttsd/kcmkttsmgr/addtalker.h
@@ -26,12 +26,12 @@
#define ADDTALKER_H
// Qt includes.
-#include <qmap.h>
+#include <tqmap.h>
#include "addtalkerwidget.h"
-typedef QMap<QString,QStringList> SynthToLangMap;
-typedef QMap<QString,QStringList> LangToSynthMap;
+typedef TQMap<TQString,TQStringList> SynthToLangMap;
+typedef TQMap<TQString,TQStringList> LangToSynthMap;
class AddTalker : public AddTalkerWidget
{
@@ -40,11 +40,11 @@ class AddTalker : public AddTalkerWidget
public:
/**
* Constructor.
- * @param synthToLangMap QMap of supported language codes indexed by synthesizer.
+ * @param synthToLangMap TQMap of supported language codes indexed by synthesizer.
* @param parent Inherited KDialog parameter.
* @param name Inherited KDialog parameter.
*/
- AddTalker(SynthToLangMap synthToLangMap, QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ AddTalker(SynthToLangMap synthToLangMap, TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
/**
* Destructor.
@@ -54,29 +54,29 @@ public:
/**
* Returns user's chosen language code.
*/
- QString getLanguageCode();
+ TQString getLanguageCode();
/**
* Returns user's chosen synthesizer.
*/
- QString getSynthesizer();
+ TQString getSynthesizer();
private:
/**
* Set the synthesizer-to-languages map.
- * @param synthToLang QMap of supported language codes indexed by synthesizer.
+ * @param synthToLang TQMap of supported language codes indexed by synthesizer.
*/
void setSynthToLangMap(SynthToLangMap synthToLangMap);
// Converts a language code plus optional country code to language description.
- QString languageCodeToLanguage(const QString &languageCode);
+ TQString languageCodeToLanguage(const TQString &languageCode);
- // QMap of language descriptions to language codes.
- QMap<QString,QString> m_languageToLanguageCodeMap;
- // QMap of supported languages indexed by synthesizer.
+ // TQMap of language descriptions to language codes.
+ TQMap<TQString,TQString> m_languageToLanguageCodeMap;
+ // TQMap of supported languages indexed by synthesizer.
SynthToLangMap m_synthToLangMap;
- // QMap of synthesizers indexed by language code they support.
+ // TQMap of synthesizers indexed by language code they support.
LangToSynthMap m_langToSynthMap;
private slots:
diff --git a/kttsd/kcmkttsmgr/kcmkttsmgr.cpp b/kttsd/kcmkttsmgr/kcmkttsmgr.cpp
index d890446..b8cf367 100644
--- a/kttsd/kcmkttsmgr/kcmkttsmgr.cpp
+++ b/kttsd/kcmkttsmgr/kcmkttsmgr.cpp
@@ -24,16 +24,16 @@
#include <math.h>
// Qt includes.
-#include <qwidget.h>
-#include <qtabwidget.h>
-#include <qcheckbox.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qslider.h>
-#include <qlabel.h>
-#include <qpopupmenu.h>
-#include <qbuttongroup.h>
+#include <tqwidget.h>
+#include <tqtabwidget.h>
+#include <tqcheckbox.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqslider.h>
+#include <tqlabel.h>
+#include <tqpopupmenu.h>
+#include <tqbuttongroup.h>
// KDE includes.
#include <dcopclient.h>
@@ -80,23 +80,23 @@ const bool notifyEnableCheckBoxValue = false;
const bool notifyExcludeEventsWithSoundCheckBoxValue = true;
const bool textPreMsgCheckValue = true;
-const QString textPreMsgValue = i18n("Text interrupted. Message.");
+const TQString textPreMsgValue = i18n("Text interrupted. Message.");
const bool textPreSndCheckValue = false;
-const QString textPreSndValue = "";
+const TQString textPreSndValue = "";
const bool textPostMsgCheckValue = true;
-const QString textPostMsgValue = i18n("Resuming text.");
+const TQString textPostMsgValue = i18n("Resuming text.");
const bool textPostSndCheckValue = false;
-const QString textPostSndValue = "";
+const TQString textPostSndValue = "";
const int timeBoxValue = 100;
const bool keepAudioCheckBoxValue = false;
// Make this a plug in.
-typedef KGenericFactory<KCMKttsMgr, QWidget> KCMKttsMgrFactory;
+typedef KGenericFactory<KCMKttsMgr, TQWidget> KCMKttsMgrFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kttsd, KCMKttsMgrFactory("kttsd") )
/**
@@ -104,7 +104,7 @@ K_EXPORT_COMPONENT_FACTORY( kcm_kttsd, KCMKttsMgrFactory("kttsd") )
* Makes the list of plug ins.
* And the languages acording to the plug ins.
*/
-KCMKttsMgr::KCMKttsMgr(QWidget *parent, const char *name, const QStringList &) :
+KCMKttsMgr::KCMKttsMgr(TQWidget *parent, const char *name, const TQStringList &) :
DCOPStub("kttsd", "KSpeech"),
DCOPObject("kcmkttsmgr_kspeechsink"),
KCModule(KCMKttsMgrFactory::instance(), parent, name)
@@ -119,7 +119,7 @@ KCMKttsMgr::KCMKttsMgr(QWidget *parent, const char *name, const QStringList &) :
m_suppressConfigChanged = false;
// Add the KTTS Manager widget
- QGridLayout *layout = new QGridLayout(this, 0, 0);
+ TQGridLayout *layout = new TQGridLayout(this, 0, 0);
m_kttsmgrw = new KCMKttsMgrWidget(this, "kttsmgrw");
// m_kttsmgrw = new KCMKttsMgrWidget(this);
layout->addWidget(m_kttsmgrw, 0, 0);
@@ -162,14 +162,14 @@ KCMKttsMgr::KCMKttsMgr(QWidget *parent, const char *name, const QStringList &) :
m_kttsmgrw->pcmComboBox->setEditable(false);
// Construct a popup menu for the Sentence Boundary Detector buttons on Filter tab.
- m_sbdPopmenu = new QPopupMenu( m_kttsmgrw, "SbdPopupMenu" );
- m_sbdPopmenu->insertItem( i18n("&Edit..."), this, SLOT(slot_configureSbdFilter()), 0, sbdBtnEdit );
+ m_sbdPopmenu = new TQPopupMenu( m_kttsmgrw, "SbdPopupMenu" );
+ m_sbdPopmenu->insertItem( i18n("&Edit..."), this, TQT_SLOT(slot_configureSbdFilter()), 0, sbdBtnEdit );
m_sbdPopmenu->insertItem( KGlobal::iconLoader()->loadIconSet("up", KIcon::Small),
- i18n("U&p"), this, SLOT(slot_higherSbdFilterPriority()), 0, sbdBtnUp );
+ i18n("U&p"), this, TQT_SLOT(slot_higherSbdFilterPriority()), 0, sbdBtnUp );
m_sbdPopmenu->insertItem( KGlobal::iconLoader()->loadIconSet("down", KIcon::Small),
- i18n("Do&wn"), this, SLOT(slot_lowerSbdFilterPriority()), 0, sbdBtnDown );
- m_sbdPopmenu->insertItem( i18n("&Add..."), this, SLOT(slot_addSbdFilter()), 0, sbdBtnAdd );
- m_sbdPopmenu->insertItem( i18n("&Remove"), this, SLOT(slot_removeSbdFilter()), 0, sbdBtnRemove );
+ i18n("Do&wn"), this, TQT_SLOT(slot_lowerSbdFilterPriority()), 0, sbdBtnDown );
+ m_sbdPopmenu->insertItem( i18n("&Add..."), this, TQT_SLOT(slot_addSbdFilter()), 0, sbdBtnAdd );
+ m_sbdPopmenu->insertItem( i18n("&Remove"), this, TQT_SLOT(slot_removeSbdFilter()), 0, sbdBtnRemove );
m_kttsmgrw->sbdButton->setPopup( m_sbdPopmenu );
// If aRts is available, enable its radio button.
@@ -192,7 +192,7 @@ KCMKttsMgr::KCMKttsMgr(QWidget *parent, const char *name, const QStringList &) :
m_kttsmgrw->gstreamerRadioButton->setEnabled(true);
m_kttsmgrw->sinkLabel->setEnabled(true);
m_kttsmgrw->sinkComboBox->setEnabled(true);
- QStringList sinkList = player->getPluginList("Sink/Audio");
+ TQStringList sinkList = player->getPluginList("Sink/Audio");
// kdDebug() << "KCMKttsMgr::KCMKttsMgr: GStreamer Sink List = " << sinkList << endl;
m_kttsmgrw->sinkComboBox->clear();
m_kttsmgrw->sinkComboBox->insertStringList(sinkList);
@@ -209,7 +209,7 @@ KCMKttsMgr::KCMKttsMgr(QWidget *parent, const char *name, const QStringList &) :
m_kttsmgrw->alsaRadioButton->setEnabled(true);
m_kttsmgrw->pcmLabel->setEnabled(true);
m_kttsmgrw->pcmComboBox->setEnabled(true);
- QStringList pcmList = player->getPluginList("");
+ TQStringList pcmList = player->getPluginList("");
pcmList.append("custom");
kdDebug() << "KCMKttsMgr::KCMKttsMgr: ALSA pcmList = " << pcmList << endl;
m_kttsmgrw->pcmComboBox->clear();
@@ -227,7 +227,7 @@ KCMKttsMgr::KCMKttsMgr(QWidget *parent, const char *name, const QStringList &) :
m_kttsmgrw->akodeRadioButton->setEnabled(true);
m_kttsmgrw->akodeSinkLabel->setEnabled(true);
m_kttsmgrw->akodeComboBox->setEnabled(true);
- QStringList pcmList = player->getPluginList("");
+ TQStringList pcmList = player->getPluginList("");
kdDebug() << "KCMKttsMgr::KCMKttsMgr: aKode Sink List = " << pcmList << endl;
m_kttsmgrw->akodeComboBox->clear();
m_kttsmgrw->akodeComboBox->insertStringList(pcmList);
@@ -248,94 +248,94 @@ KCMKttsMgr::KCMKttsMgr(QWidget *parent, const char *name, const QStringList &) :
// Connect the signals from the KCMKtssMgrWidget to this class.
// Talker tab.
- connect(m_kttsmgrw->addTalkerButton, SIGNAL(clicked()),
- this, SLOT(slot_addTalker()));
- connect(m_kttsmgrw->higherTalkerPriorityButton, SIGNAL(clicked()),
- this, SLOT(slot_higherTalkerPriority()));
- connect(m_kttsmgrw->lowerTalkerPriorityButton, SIGNAL(clicked()),
- this, SLOT(slot_lowerTalkerPriority()));
- connect(m_kttsmgrw->removeTalkerButton, SIGNAL(clicked()),
- this, SLOT(slot_removeTalker()));
- connect(m_kttsmgrw->configureTalkerButton, SIGNAL(clicked()),
- this, SLOT(slot_configureTalker()));
- connect(m_kttsmgrw->talkersList, SIGNAL(selectionChanged()),
- this, SLOT(updateTalkerButtons()));
+ connect(m_kttsmgrw->addTalkerButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_addTalker()));
+ connect(m_kttsmgrw->higherTalkerPriorityButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_higherTalkerPriority()));
+ connect(m_kttsmgrw->lowerTalkerPriorityButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_lowerTalkerPriority()));
+ connect(m_kttsmgrw->removeTalkerButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_removeTalker()));
+ connect(m_kttsmgrw->configureTalkerButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_configureTalker()));
+ connect(m_kttsmgrw->talkersList, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(updateTalkerButtons()));
// Filter tab.
- connect(m_kttsmgrw->addFilterButton, SIGNAL(clicked()),
- this, SLOT(slot_addNormalFilter()));
- connect(m_kttsmgrw->higherFilterPriorityButton, SIGNAL(clicked()),
- this, SLOT(slot_higherNormalFilterPriority()));
- connect(m_kttsmgrw->lowerFilterPriorityButton, SIGNAL(clicked()),
- this, SLOT(slot_lowerNormalFilterPriority()));
- connect(m_kttsmgrw->removeFilterButton, SIGNAL(clicked()),
- this, SLOT(slot_removeNormalFilter()));
- connect(m_kttsmgrw->configureFilterButton, SIGNAL(clicked()),
- this, SLOT(slot_configureNormalFilter()));
- connect(m_kttsmgrw->filtersList, SIGNAL(selectionChanged()),
- this, SLOT(updateFilterButtons()));
- //connect(m_kttsmgrw->filtersList, SIGNAL(stateChanged()),
- // this, SLOT(configChanged()));
- connect(m_kttsmgrw->sbdsList, SIGNAL(selectionChanged()),
- this, SLOT(updateSbdButtons()));
+ connect(m_kttsmgrw->addFilterButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_addNormalFilter()));
+ connect(m_kttsmgrw->higherFilterPriorityButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_higherNormalFilterPriority()));
+ connect(m_kttsmgrw->lowerFilterPriorityButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_lowerNormalFilterPriority()));
+ connect(m_kttsmgrw->removeFilterButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_removeNormalFilter()));
+ connect(m_kttsmgrw->configureFilterButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slot_configureNormalFilter()));
+ connect(m_kttsmgrw->filtersList, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(updateFilterButtons()));
+ //connect(m_kttsmgrw->filtersList, TQT_SIGNAL(stateChanged()),
+ // this, TQT_SLOT(configChanged()));
+ connect(m_kttsmgrw->sbdsList, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(updateSbdButtons()));
// Audio tab.
- connect(m_kttsmgrw->gstreamerRadioButton, SIGNAL(toggled(bool)),
- this, SLOT(slotGstreamerRadioButton_toggled(bool)));
- connect(m_kttsmgrw->alsaRadioButton, SIGNAL(toggled(bool)),
- this, SLOT(slotAlsaRadioButton_toggled(bool)));
- connect(m_kttsmgrw->pcmComboBox, SIGNAL(activated(int)),
- this, SLOT(slotPcmComboBox_activated()));
- connect(m_kttsmgrw->akodeRadioButton, SIGNAL(toggled(bool)),
- this, SLOT(slotAkodeRadioButton_toggled(bool)));
- connect(m_kttsmgrw->timeBox, SIGNAL(valueChanged(int)),
- this, SLOT(timeBox_valueChanged(int)));
- connect(m_kttsmgrw->timeSlider, SIGNAL(valueChanged(int)),
- this, SLOT(timeSlider_valueChanged(int)));
- connect(m_kttsmgrw->timeBox, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_kttsmgrw->timeSlider, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_kttsmgrw->keepAudioCheckBox, SIGNAL(toggled(bool)),
- this, SLOT(keepAudioCheckBox_toggled(bool)));
- connect(m_kttsmgrw->keepAudioPath, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
+ connect(m_kttsmgrw->gstreamerRadioButton, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotGstreamerRadioButton_toggled(bool)));
+ connect(m_kttsmgrw->alsaRadioButton, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotAlsaRadioButton_toggled(bool)));
+ connect(m_kttsmgrw->pcmComboBox, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotPcmComboBox_activated()));
+ connect(m_kttsmgrw->akodeRadioButton, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotAkodeRadioButton_toggled(bool)));
+ connect(m_kttsmgrw->timeBox, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(timeBox_valueChanged(int)));
+ connect(m_kttsmgrw->timeSlider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(timeSlider_valueChanged(int)));
+ connect(m_kttsmgrw->timeBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_kttsmgrw->timeSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_kttsmgrw->keepAudioCheckBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(keepAudioCheckBox_toggled(bool)));
+ connect(m_kttsmgrw->keepAudioPath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
// General tab.
- connect(m_kttsmgrw->enableKttsdCheckBox, SIGNAL(toggled(bool)),
- SLOT(enableKttsdToggled(bool)));
+ connect(m_kttsmgrw->enableKttsdCheckBox, TQT_SIGNAL(toggled(bool)),
+ TQT_SLOT(enableKttsdToggled(bool)));
// Notify tab.
- connect(m_kttsmgrw->notifyEnableCheckBox, SIGNAL(toggled(bool)),
- this, SLOT(slotNotifyEnableCheckBox_toggled(bool)));
- connect(m_kttsmgrw->notifyExcludeEventsWithSoundCheckBox, SIGNAL(toggled(bool)),
- this, SLOT(configChanged()));
- connect(m_kttsmgrw->notifyAddButton, SIGNAL(clicked()),
- this, SLOT(slotNotifyAddButton_clicked()));
- connect(m_kttsmgrw->notifyRemoveButton, SIGNAL(clicked()),
- this, SLOT(slotNotifyRemoveButton_clicked()));
- connect(m_kttsmgrw->notifyClearButton, SIGNAL(clicked()),
- this, SLOT(slotNotifyClearButton_clicked()));
- connect(m_kttsmgrw->notifyLoadButton, SIGNAL(clicked()),
- this, SLOT(slotNotifyLoadButton_clicked()));
- connect(m_kttsmgrw->notifySaveButton, SIGNAL(clicked()),
- this, SLOT(slotNotifySaveButton_clicked()));
- connect(m_kttsmgrw->notifyListView, SIGNAL(selectionChanged()),
- this, SLOT(slotNotifyListView_selectionChanged()));
- connect(m_kttsmgrw->notifyPresentComboBox, SIGNAL(activated(int)),
- this, SLOT(slotNotifyPresentComboBox_activated(int)));
- connect(m_kttsmgrw->notifyActionComboBox, SIGNAL(activated(int)),
- this, SLOT(slotNotifyActionComboBox_activated(int)));
- connect(m_kttsmgrw->notifyTestButton, SIGNAL(clicked()),
- this, SLOT(slotNotifyTestButton_clicked()));
- connect(m_kttsmgrw->notifyMsgLineEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotNotifyMsgLineEdit_textChanged(const QString&)));
- connect(m_kttsmgrw->notifyTalkerButton, SIGNAL(clicked()),
- this, SLOT(slotNotifyTalkerButton_clicked()));
+ connect(m_kttsmgrw->notifyEnableCheckBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(slotNotifyEnableCheckBox_toggled(bool)));
+ connect(m_kttsmgrw->notifyExcludeEventsWithSoundCheckBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_kttsmgrw->notifyAddButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNotifyAddButton_clicked()));
+ connect(m_kttsmgrw->notifyRemoveButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNotifyRemoveButton_clicked()));
+ connect(m_kttsmgrw->notifyClearButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNotifyClearButton_clicked()));
+ connect(m_kttsmgrw->notifyLoadButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNotifyLoadButton_clicked()));
+ connect(m_kttsmgrw->notifySaveButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNotifySaveButton_clicked()));
+ connect(m_kttsmgrw->notifyListView, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotNotifyListView_selectionChanged()));
+ connect(m_kttsmgrw->notifyPresentComboBox, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotNotifyPresentComboBox_activated(int)));
+ connect(m_kttsmgrw->notifyActionComboBox, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(slotNotifyActionComboBox_activated(int)));
+ connect(m_kttsmgrw->notifyTestButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNotifyTestButton_clicked()));
+ connect(m_kttsmgrw->notifyMsgLineEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotNotifyMsgLineEdit_textChanged(const TQString&)));
+ connect(m_kttsmgrw->notifyTalkerButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotNotifyTalkerButton_clicked()));
// Others.
- connect(m_kttsmgrw, SIGNAL( configChanged() ),
- this, SLOT( configChanged() ) );
- connect(m_kttsmgrw->mainTab, SIGNAL(currentChanged(QWidget*)),
- this, SLOT(slotTabChanged()));
+ connect(m_kttsmgrw, TQT_SIGNAL( configChanged() ),
+ this, TQT_SLOT( configChanged() ) );
+ connect(m_kttsmgrw->mainTab, TQT_SIGNAL(currentChanged(TQWidget*)),
+ this, TQT_SLOT(slotTabChanged()));
// Connect KTTSD DCOP signals to our slots.
if (!connectDCOPSignal("kttsd", "KSpeech",
@@ -430,7 +430,7 @@ void KCMKttsMgr::load()
loadNotifyEventsFromFile( locateLocal("config", "kttsd_notifyevents.xml"), true );
slotNotifyEnableCheckBox_toggled( m_kttsmgrw->notifyEnableCheckBox->isChecked() );
// Auto-expand and position on the Default item.
- QListViewItem* item = m_kttsmgrw->notifyListView->findItem( "default", nlvcEventSrc );
+ TQListViewItem* item = m_kttsmgrw->notifyListView->findItem( "default", nlvcEventSrc );
if ( item )
if ( item->childCount() > 0 ) item = item->firstChild();
if ( item ) m_kttsmgrw->notifyListView->ensureItemVisible( item );
@@ -477,30 +477,30 @@ void KCMKttsMgr::load()
// Load existing Talkers into the listview.
m_kttsmgrw->talkersList->clear();
m_kttsmgrw->talkersList->setSortColumn(-1);
- QStringList talkerIDsList = m_config->readListEntry("TalkerIDs", ',');
+ TQStringList talkerIDsList = m_config->readListEntry("TalkerIDs", ',');
if (!talkerIDsList.isEmpty())
{
- QListViewItem* talkerItem = 0;
- QStringList::ConstIterator itEnd = talkerIDsList.constEnd();
- for (QStringList::ConstIterator it = talkerIDsList.constBegin(); it != itEnd; ++it)
+ TQListViewItem* talkerItem = 0;
+ TQStringList::ConstIterator itEnd = talkerIDsList.constEnd();
+ for (TQStringList::ConstIterator it = talkerIDsList.constBegin(); it != itEnd; ++it)
{
- QString talkerID = *it;
+ TQString talkerID = *it;
// kdDebug() << "KCMKttsMgr::load: talkerID = " << talkerID << endl;
- m_config->setGroup(QString("Talker_") + talkerID);
- QString talkerCode = m_config->readEntry("TalkerCode");
- QString fullLanguageCode;
+ m_config->setGroup(TQString("Talker_") + talkerID);
+ TQString talkerCode = m_config->readEntry("TalkerCode");
+ TQString fullLanguageCode;
talkerCode = TalkerCode::normalizeTalkerCode(talkerCode, fullLanguageCode);
- QString language = TalkerCode::languageCodeToLanguage(fullLanguageCode);
- QString desktopEntryName = m_config->readEntry("DesktopEntryName", QString::null);
+ TQString language = TalkerCode::languageCodeToLanguage(fullLanguageCode);
+ TQString desktopEntryName = m_config->readEntry("DesktopEntryName", TQString::null);
// If a DesktopEntryName is not in the config file, it was configured before
// we started using them, when we stored translated plugin names instead.
// Try to convert the translated plugin name to a DesktopEntryName.
// DesktopEntryNames are better because user can change their desktop language
// and DesktopEntryName won't change.
- QString synthName;
+ TQString synthName;
if (desktopEntryName.isEmpty())
{
- synthName = m_config->readEntry("PlugIn", QString::null);
+ synthName = m_config->readEntry("PlugIn", TQString::null);
// See if the translated name will untranslate. If not, well, sorry.
desktopEntryName = TalkerCode::TalkerNameToDesktopEntryName(synthName);
// Record the DesktopEntryName from now on.
@@ -529,13 +529,13 @@ void KCMKttsMgr::load()
// Iterate thru the possible plug ins getting their language support codes.
for(unsigned int i=0; i < offers.count() ; ++i)
{
- QString synthName = offers[i]->name();
- QStringList languageCodes = offers[i]->property("X-KDE-Languages").toStringList();
+ TQString synthName = offers[i]->name();
+ TQStringList languageCodes = offers[i]->property("X-KDE-Languages").toStringList();
// Add language codes to the language-to-language code map.
- QStringList::ConstIterator endLanguages(languageCodes.constEnd());
- for( QStringList::ConstIterator it = languageCodes.constBegin(); it != endLanguages; ++it )
+ TQStringList::ConstIterator endLanguages(languageCodes.constEnd());
+ for( TQStringList::ConstIterator it = languageCodes.constBegin(); it != endLanguages; ++it )
{
- QString language = TalkerCode::languageCodeToLanguage(*it);
+ TQString language = TalkerCode::languageCodeToLanguage(*it);
m_languagesToCodes[language] = *it;
}
@@ -552,32 +552,32 @@ void KCMKttsMgr::load()
m_languagesToCodes[i18n("Other")] = "other";
// Load Filters.
- QListViewItem* filterItem = 0;
+ TQListViewItem* filterItem = 0;
m_kttsmgrw->filtersList->clear();
m_kttsmgrw->sbdsList->clear();
m_kttsmgrw->filtersList->setSortColumn(-1);
m_kttsmgrw->sbdsList->setSortColumn(-1);
m_config->setGroup("General");
- QStringList filterIDsList = m_config->readListEntry("FilterIDs", ',');
+ TQStringList filterIDsList = m_config->readListEntry("FilterIDs", ',');
// kdDebug() << "KCMKttsMgr::load: FilterIDs = " << filterIDsList << endl;
if (!filterIDsList.isEmpty())
{
- QStringList::ConstIterator itEnd = filterIDsList.constEnd();
- for (QStringList::ConstIterator it = filterIDsList.constBegin(); it != itEnd; ++it)
+ TQStringList::ConstIterator itEnd = filterIDsList.constEnd();
+ for (TQStringList::ConstIterator it = filterIDsList.constBegin(); it != itEnd; ++it)
{
- QString filterID = *it;
+ TQString filterID = *it;
// kdDebug() << "KCMKttsMgr::load: filterID = " << filterID << endl;
m_config->setGroup("Filter_" + filterID);
- QString desktopEntryName = m_config->readEntry("DesktopEntryName", QString::null);
+ TQString desktopEntryName = m_config->readEntry("DesktopEntryName", TQString::null);
// If a DesktopEntryName is not in the config file, it was configured before
// we started using them, when we stored translated plugin names instead.
// Try to convert the translated plugin name to a DesktopEntryName.
// DesktopEntryNames are better because user can change their desktop language
// and DesktopEntryName won't change.
- QString filterPlugInName;
+ TQString filterPlugInName;
if (desktopEntryName.isEmpty())
{
- filterPlugInName = m_config->readEntry("PlugInName", QString::null);
+ filterPlugInName = m_config->readEntry("PlugInName", TQString::null);
// See if the translated name will untranslate. If not, well, sorry.
desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
// Record the DesktopEntryName from now on.
@@ -586,7 +586,7 @@ void KCMKttsMgr::load()
filterPlugInName = FilterDesktopEntryNameToName(desktopEntryName);
if (!filterPlugInName.isEmpty())
{
- QString userFilterName = m_config->readEntry("UserFilterName", filterPlugInName);
+ TQString userFilterName = m_config->readEntry("UserFilterName", filterPlugInName);
bool multiInstance = m_config->readBoolEntry("MultiInstance", false);
// Determine if this filter is a Sentence Boundary Detector (SBD).
bool isSbd = m_config->readBoolEntry("IsSBD", false);
@@ -604,11 +604,11 @@ void KCMKttsMgr::load()
filterItem = m_kttsmgrw->filtersList->lastChild();
if (!filterItem)
filterItem = new KttsCheckListItem(m_kttsmgrw->filtersList,
- userFilterName, QCheckListItem::CheckBox, this);
+ userFilterName, TQCheckListItem::CheckBox, this);
else
filterItem = new KttsCheckListItem(m_kttsmgrw->filtersList, filterItem,
- userFilterName, QCheckListItem::CheckBox, this);
- dynamic_cast<QCheckListItem*>(filterItem)->setOn(checked);
+ userFilterName, TQCheckListItem::CheckBox, this);
+ dynamic_cast<TQCheckListItem*>(filterItem)->setOn(checked);
}
filterItem->setText(flvcFilterID, filterID);
filterItem->setText(flvcPlugInName, filterPlugInName);
@@ -626,8 +626,8 @@ void KCMKttsMgr::load()
offers = KTrader::self()->query("KTTSD/FilterPlugin");
for (unsigned int i=0; i < offers.count() ; ++i)
{
- QString filterPlugInName = offers[i]->name();
- QString desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
+ TQString filterPlugInName = offers[i]->name();
+ TQString desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
if (!desktopEntryName.isEmpty() && (countFilterPlugins(filterPlugInName) == 0))
{
// Must load plugin to determine if it supports multiple instances
@@ -636,10 +636,10 @@ void KCMKttsMgr::load()
if (filterPlugIn)
{
++m_lastFilterID;
- QString filterID = QString::number(m_lastFilterID);
- QString groupName = "Filter_" + filterID;
+ TQString filterID = TQString::number(m_lastFilterID);
+ TQString groupName = "Filter_" + filterID;
filterPlugIn->load(m_config, groupName);
- QString userFilterName = filterPlugIn->userPlugInName();
+ TQString userFilterName = filterPlugIn->userPlugInName();
if (!userFilterName.isEmpty())
{
kdDebug() << "KCMKttsMgr::load: auto-configuring filter " << userFilterName << endl;
@@ -659,11 +659,11 @@ void KCMKttsMgr::load()
filterItem = m_kttsmgrw->filtersList->lastChild();
if (!filterItem)
filterItem = new KttsCheckListItem(m_kttsmgrw->filtersList,
- userFilterName, QCheckListItem::CheckBox, this);
+ userFilterName, TQCheckListItem::CheckBox, this);
else
filterItem = new KttsCheckListItem(m_kttsmgrw->filtersList, filterItem,
- userFilterName, QCheckListItem::CheckBox, this);
- dynamic_cast<QCheckListItem*>(filterItem)->setOn(false);
+ userFilterName, TQCheckListItem::CheckBox, this);
+ dynamic_cast<TQCheckListItem*>(filterItem)->setOn(false);
}
filterItem->setText(flvcFilterID, filterID);
filterItem->setText(flvcPlugInName, filterPlugInName);
@@ -688,7 +688,7 @@ void KCMKttsMgr::load()
}
}
// Rewrite list of FilterIDs in case we added any.
- QString filterIDs = filterIDsList.join(",");
+ TQString filterIDs = filterIDsList.join(",");
m_config->setGroup("General");
m_config->writeEntry("FilterIDs", filterIDs);
m_config->sync();
@@ -801,67 +801,67 @@ void KCMKttsMgr::save()
m_config->writeEntry("KeepAudioPath", m_kttsmgrw->keepAudioPath->url());
// Get ordered list of all talker IDs.
- QStringList talkerIDsList;
- QListViewItem* talkerItem = m_kttsmgrw->talkersList->firstChild();
+ TQStringList talkerIDsList;
+ TQListViewItem* talkerItem = m_kttsmgrw->talkersList->firstChild();
while (talkerItem)
{
- QListViewItem* nextTalkerItem = talkerItem->itemBelow();
- QString talkerID = talkerItem->text(tlvcTalkerID);
+ TQListViewItem* nextTalkerItem = talkerItem->itemBelow();
+ TQString talkerID = talkerItem->text(tlvcTalkerID);
talkerIDsList.append(talkerID);
talkerItem = nextTalkerItem;
}
- QString talkerIDs = talkerIDsList.join(",");
+ TQString talkerIDs = talkerIDsList.join(",");
m_config->writeEntry("TalkerIDs", talkerIDs);
// Erase obsolete Talker_nn sections.
- QStringList groupList = m_config->groupList();
+ TQStringList groupList = m_config->groupList();
int groupListCount = groupList.count();
for (int groupNdx = 0; groupNdx < groupListCount; ++groupNdx)
{
- QString groupName = groupList[groupNdx];
+ TQString groupName = groupList[groupNdx];
if (groupName.left(7) == "Talker_")
{
- QString groupTalkerID = groupName.mid(7);
+ TQString groupTalkerID = groupName.mid(7);
if (!talkerIDsList.contains(groupTalkerID)) m_config->deleteGroup(groupName);
}
}
// Get ordered list of all filter IDs. Record enabled state of each filter.
- QStringList filterIDsList;
- QListViewItem* filterItem = m_kttsmgrw->filtersList->firstChild();
+ TQStringList filterIDsList;
+ TQListViewItem* filterItem = m_kttsmgrw->filtersList->firstChild();
while (filterItem)
{
- QListViewItem* nextFilterItem = filterItem->itemBelow();
- QString filterID = filterItem->text(flvcFilterID);
+ TQListViewItem* nextFilterItem = filterItem->itemBelow();
+ TQString filterID = filterItem->text(flvcFilterID);
filterIDsList.append(filterID);
- bool checked = dynamic_cast<QCheckListItem*>(filterItem)->isOn();
+ bool checked = dynamic_cast<TQCheckListItem*>(filterItem)->isOn();
m_config->setGroup("Filter_" + filterID);
m_config->writeEntry("Enabled", checked);
m_config->writeEntry("IsSBD", false);
filterItem = nextFilterItem;
}
- QListViewItem* sbdItem = m_kttsmgrw->sbdsList->firstChild();
+ TQListViewItem* sbdItem = m_kttsmgrw->sbdsList->firstChild();
while (sbdItem)
{
- QListViewItem* nextSbdItem = sbdItem->itemBelow();
- QString filterID = sbdItem->text(slvcFilterID);
+ TQListViewItem* nextSbdItem = sbdItem->itemBelow();
+ TQString filterID = sbdItem->text(slvcFilterID);
filterIDsList.append(filterID);
m_config->setGroup("Filter_" + filterID);
m_config->writeEntry("Enabled", true);
m_config->writeEntry("IsSBD", true);
sbdItem = nextSbdItem;
}
- QString filterIDs = filterIDsList.join(",");
+ TQString filterIDs = filterIDsList.join(",");
m_config->setGroup("General");
m_config->writeEntry("FilterIDs", filterIDs);
// Erase obsolete Filter_nn sections.
for (int groupNdx = 0; groupNdx < groupListCount; ++groupNdx)
{
- QString groupName = groupList[groupNdx];
+ TQString groupName = groupList[groupNdx];
if (groupName.left(7) == "Filter_")
{
- QString groupFilterID = groupName.mid(7);
+ TQString groupFilterID = groupName.mid(7);
if (!filterIDsList.contains(groupFilterID)) m_config->deleteGroup(groupName);
}
}
@@ -892,7 +892,7 @@ void KCMKttsMgr::save()
if (kttsdRunning)
{
kdDebug() << "Restarting KTTSD" << endl;
- QByteArray data;
+ TQByteArray data;
client->send("kttsd", "KSpeech", "reinit()", data);
}
}
@@ -1066,7 +1066,7 @@ int KCMKttsMgr::buttons() {
* This function returns the small quickhelp.
* That is displayed in the sidebar in the KControl
*/
-QString KCMKttsMgr::quickHelp() const{
+TQString KCMKttsMgr::quickHelp() const{
// kdDebug() << "KCMKttsMgr::quickHelp: Running"<< endl;
return i18n(
"<h1>Text-to-Speech</h1>"
@@ -1094,13 +1094,13 @@ const KAboutData* KCMKttsMgr::aboutData() const{
* @param name DesktopEntryName of the Synthesizer.
* @return Pointer to the configuration plugin for the Talker.
*/
-PlugInConf* KCMKttsMgr::loadTalkerPlugin(const QString& name)
+PlugInConf* KCMKttsMgr::loadTalkerPlugin(const TQString& name)
{
// kdDebug() << "KCMKttsMgr::loadPlugin: Running"<< endl;
// Find the plugin.
KTrader::OfferList offers = KTrader::self()->query("KTTSD/SynthPlugin",
- QString("DesktopEntryName == '%1'").arg(name));
+ TQString("DesktopEntryName == '%1'").arg(name));
if (offers.count() == 1)
{
@@ -1138,13 +1138,13 @@ PlugInConf* KCMKttsMgr::loadTalkerPlugin(const QString& name)
* @param plugInName DesktopEntryName of the plugin.
* @return Pointer to the configuration plugin for the Filter.
*/
-KttsFilterConf* KCMKttsMgr::loadFilterPlugin(const QString& plugInName)
+KttsFilterConf* KCMKttsMgr::loadFilterPlugin(const TQString& plugInName)
{
// kdDebug() << "KCMKttsMgr::loadPlugin: Running"<< endl;
// Find the plugin.
KTrader::OfferList offers = KTrader::self()->query("KTTSD/FilterPlugin",
- QString("DesktopEntryName == '%1'").arg(plugInName));
+ TQString("DesktopEntryName == '%1'").arg(plugInName));
if (offers.count() == 1)
{
@@ -1158,7 +1158,7 @@ KttsFilterConf* KCMKttsMgr::loadFilterPlugin(const QString& plugInName)
KttsFilterConf *plugIn =
KParts::ComponentFactory::createInstanceFromLibrary<KttsFilterConf>(
offers[0]->library().latin1(), NULL, offers[0]->library().latin1(),
- QStringList(), &errorNo);
+ TQStringList(), &errorNo);
if(plugIn){
// If everything went ok, return the plug in pointer.
return plugIn;
@@ -1180,16 +1180,16 @@ KttsFilterConf* KCMKttsMgr::loadFilterPlugin(const QString& plugInName)
/**
* Given an item in the talker listview and a talker code, sets the columns of the item.
-* @param talkerItem QListViewItem.
+* @param talkerItem TQListViewItem.
* @param talkerCode Talker Code.
*/
-void KCMKttsMgr::updateTalkerItem(QListViewItem* talkerItem, const QString &talkerCode)
+void KCMKttsMgr::updateTalkerItem(TQListViewItem* talkerItem, const TQString &talkerCode)
{
TalkerCode parsedTalkerCode(talkerCode);
- QString fullLanguageCode = parsedTalkerCode.fullLanguageCode();
+ TQString fullLanguageCode = parsedTalkerCode.fullLanguageCode();
if (!fullLanguageCode.isEmpty())
{
- QString language = TalkerCode::languageCodeToLanguage(fullLanguageCode);
+ TQString language = TalkerCode::languageCodeToLanguage(fullLanguageCode);
if (!language.isEmpty())
{
m_languagesToCodes[language] = fullLanguageCode;
@@ -1227,26 +1227,26 @@ void KCMKttsMgr::slot_addTalker()
dlg->setMainWidget(addTalkerWidget);
dlg->setHelp("select-plugin", "kttsd");
int dlgResult = dlg->exec();
- QString languageCode = addTalkerWidget->getLanguageCode();
- QString synthName = addTalkerWidget->getSynthesizer();
+ TQString languageCode = addTalkerWidget->getLanguageCode();
+ TQString synthName = addTalkerWidget->getSynthesizer();
delete dlg;
// TODO: Also delete addTalkerWidget?
- if (dlgResult != QDialog::Accepted) return;
+ if (dlgResult != TQDialog::Accepted) return;
// If user chose "Other", must now get a language from him.
if(languageCode == "other")
{
- // Create a QHBox to host KListView.
- QHBox* hBox = new QHBox(m_kttsmgrw, "SelectLanguage_hbox");
+ // Create a TQHBox to host KListView.
+ TQHBox* hBox = new TQHBox(m_kttsmgrw, "SelectLanguage_hbox");
// Create a KListView and fill with all known languages.
KListView* langLView = new KListView(hBox, "SelectLanguage_lview");
langLView->addColumn(i18n("Language"));
langLView->addColumn(i18n("Code"));
- QStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha();
- QString locale;
- QString countryCode;
- QString charSet;
- QString language;
+ TQStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha();
+ TQString locale;
+ TQString countryCode;
+ TQString charSet;
+ TQString language;
const int allLocalesCount = allLocales.count();
for (int ndx=0; ndx < allLocalesCount; ++ndx)
{
@@ -1269,30 +1269,30 @@ void KCMKttsMgr::slot_addTalker()
true);
dlg->setMainWidget(hBox);
dlg->setHelp("select-plugin", "kttsd");
- dlg->setInitialSize(QSize(200, 500), false);
+ dlg->setInitialSize(TQSize(200, 500), false);
dlgResult = dlg->exec();
- languageCode = QString::null;
+ languageCode = TQString::null;
if (langLView->selectedItem()) languageCode = langLView->selectedItem()->text(1);
delete dlg;
// TODO: Also delete KListView and QHBox?
- if (dlgResult != QDialog::Accepted) return;
+ if (dlgResult != TQDialog::Accepted) return;
}
if (languageCode.isEmpty()) return;
- QString language = TalkerCode::languageCodeToLanguage(languageCode);
+ TQString language = TalkerCode::languageCodeToLanguage(languageCode);
if (language.isEmpty()) return;
m_languagesToCodes[language] = languageCode;
// Assign a new Talker ID for the talker. Wraps around to 1.
- QString talkerID = QString::number(m_lastTalkerID + 1);
+ TQString talkerID = TQString::number(m_lastTalkerID + 1);
// Erase extraneous Talker configuration entries that might be there.
- m_config->deleteGroup(QString("Talker_")+talkerID);
+ m_config->deleteGroup(TQString("Talker_")+talkerID);
m_config->sync();
// Convert translated plugin name to DesktopEntryName.
- QString desktopEntryName = TalkerCode::TalkerNameToDesktopEntryName(synthName);
+ TQString desktopEntryName = TalkerCode::TalkerNameToDesktopEntryName(synthName);
// This shouldn't happen, but just in case.
if (desktopEntryName.isEmpty()) return;
@@ -1302,11 +1302,11 @@ void KCMKttsMgr::slot_addTalker()
// Give plugin the user's language code and permit plugin to autoconfigure itself.
m_loadedTalkerPlugIn->setDesiredLanguage(languageCode);
- m_loadedTalkerPlugIn->load(m_config, QString("Talker_")+talkerID);
+ m_loadedTalkerPlugIn->load(m_config, TQString("Talker_")+talkerID);
// If plugin was able to configure itself, it returns a full talker code.
// If not, display configuration dialog for user to configure the plugin.
- QString talkerCode = m_loadedTalkerPlugIn->getTalkerCode();
+ TQString talkerCode = m_loadedTalkerPlugIn->getTalkerCode();
if (talkerCode.isEmpty())
{
// Display configuration dialog.
@@ -1326,27 +1326,27 @@ void KCMKttsMgr::slot_addTalker()
if (!talkerCode.isEmpty())
{
// Let plugin save its configuration.
- m_config->setGroup(QString("Talker_")+talkerID);
- m_loadedTalkerPlugIn->save(m_config, QString("Talker_"+talkerID));
+ m_config->setGroup(TQString("Talker_")+talkerID);
+ m_loadedTalkerPlugIn->save(m_config, TQString("Talker_"+talkerID));
// Record last Talker ID used for next add.
m_lastTalkerID = talkerID.toInt();
// Record configuration data. Note, might as well do this now.
- m_config->setGroup(QString("Talker_")+talkerID);
+ m_config->setGroup(TQString("Talker_")+talkerID);
m_config->writeEntry("DesktopEntryName", desktopEntryName);
talkerCode = TalkerCode::normalizeTalkerCode(talkerCode, languageCode);
m_config->writeEntry("TalkerCode", talkerCode);
m_config->sync();
// Add listview item.
- QListViewItem* talkerItem = m_kttsmgrw->talkersList->lastChild();
+ TQListViewItem* talkerItem = m_kttsmgrw->talkersList->lastChild();
if (talkerItem)
talkerItem = new KListViewItem(m_kttsmgrw->talkersList, talkerItem,
- QString::number(m_lastTalkerID), language, synthName);
+ TQString::number(m_lastTalkerID), language, synthName);
else
talkerItem = new KListViewItem(m_kttsmgrw->talkersList,
- QString::number(m_lastTalkerID), language, synthName);
+ TQString::number(m_lastTalkerID), language, synthName);
// Set additional columns of the listview item.
updateTalkerItem(talkerItem, talkerCode);
@@ -1394,8 +1394,8 @@ void KCMKttsMgr::addFilter( bool sbd)
KListView* lView = m_kttsmgrw->filtersList;
if (sbd) lView = m_kttsmgrw->sbdsList;
- QStringList filterPlugInNames;
- QListViewItem* item = lView->firstChild();
+ TQStringList filterPlugInNames;
+ TQListViewItem* item = lView->firstChild();
while (item)
{
if (item->text(flvcMultiInstance) == "T")
@@ -1409,10 +1409,10 @@ void KCMKttsMgr::addFilter( bool sbd)
KTrader::OfferList offers = KTrader::self()->query("KTTSD/FilterPlugin");
for (unsigned int i=0; i < offers.count() ; ++i)
{
- QString filterPlugInName = offers[i]->name();
+ TQString filterPlugInName = offers[i]->name();
if (countFilterPlugins(filterPlugInName) == 0)
{
- QString desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
+ TQString desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
KttsFilterConf* filterConf = loadFilterPlugin(desktopEntryName);
if (filterConf)
{
@@ -1429,7 +1429,7 @@ void KCMKttsMgr::addFilter( bool sbd)
// If exactly one choice, skip selection dialog, otherwise display list to user to select from.
bool okChosen = false;
- QString filterPlugInName;
+ TQString filterPlugInName;
if (filterPlugInNames.count() > 1)
{
filterPlugInName = KInputDialog::getItem(
@@ -1446,14 +1446,14 @@ void KCMKttsMgr::addFilter( bool sbd)
filterPlugInName = filterPlugInNames[0];
// Assign a new Filter ID for the filter. Wraps around to 1.
- QString filterID = QString::number(m_lastFilterID + 1);
+ TQString filterID = TQString::number(m_lastFilterID + 1);
// Erase extraneous Filter configuration entries that might be there.
- m_config->deleteGroup(QString("Filter_")+filterID);
+ m_config->deleteGroup(TQString("Filter_")+filterID);
m_config->sync();
// Get DesktopEntryName from the translated name.
- QString desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
+ TQString desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
// This shouldn't happen, but just in case.
if (desktopEntryName.isEmpty()) return;
@@ -1462,7 +1462,7 @@ void KCMKttsMgr::addFilter( bool sbd)
if (!m_loadedFilterPlugIn) return;
// Permit plugin to autoconfigure itself.
- m_loadedFilterPlugIn->load(m_config, QString("Filter_")+filterID);
+ m_loadedFilterPlugIn->load(m_config, TQString("Filter_")+filterID);
// Display configuration dialog for user to configure the plugin.
configureFilter();
@@ -1477,14 +1477,14 @@ void KCMKttsMgr::addFilter( bool sbd)
}
// Get user's name for Filter.
- QString userFilterName = m_loadedFilterPlugIn->userPlugInName();
+ TQString userFilterName = m_loadedFilterPlugIn->userPlugInName();
// If user properly configured the plugin, save its configuration.
if ( !userFilterName.isEmpty() )
{
// Let plugin save its configuration.
- m_config->setGroup(QString("Filter_")+filterID);
- m_loadedFilterPlugIn->save(m_config, QString("Filter_"+filterID));
+ m_config->setGroup(TQString("Filter_")+filterID);
+ m_loadedFilterPlugIn->save(m_config, TQString("Filter_"+filterID));
// Record last Filter ID used for next add.
m_lastFilterID = filterID.toInt();
@@ -1493,7 +1493,7 @@ void KCMKttsMgr::addFilter( bool sbd)
bool multiInstance = m_loadedFilterPlugIn->supportsMultiInstance();
// Record configuration data. Note, might as well do this now.
- m_config->setGroup(QString("Filter_")+filterID);
+ m_config->setGroup(TQString("Filter_")+filterID);
m_config->writeEntry("DesktopEntryName", desktopEntryName);
m_config->writeEntry("UserFilterName", userFilterName);
m_config->writeEntry("MultiInstance", multiInstance);
@@ -1502,7 +1502,7 @@ void KCMKttsMgr::addFilter( bool sbd)
m_config->sync();
// Add listview item.
- QListViewItem* filterItem = lView->lastChild();
+ TQListViewItem* filterItem = lView->lastChild();
if (sbd)
{
if (filterItem)
@@ -1514,13 +1514,13 @@ void KCMKttsMgr::addFilter( bool sbd)
{
if (filterItem)
filterItem = new KttsCheckListItem(lView, filterItem,
- userFilterName, QCheckListItem::CheckBox, this);
+ userFilterName, TQCheckListItem::CheckBox, this);
else
filterItem = new KttsCheckListItem(lView,
- userFilterName, QCheckListItem::CheckBox, this);
- dynamic_cast<QCheckListItem*>(filterItem)->setOn(true);
+ userFilterName, TQCheckListItem::CheckBox, this);
+ dynamic_cast<TQCheckListItem*>(filterItem)->setOn(true);
}
- filterItem->setText(flvcFilterID, QString::number(m_lastFilterID));
+ filterItem->setText(flvcFilterID, TQString::number(m_lastFilterID));
filterItem->setText(flvcPlugInName, filterPlugInName);
if (multiInstance)
filterItem->setText(flvcMultiInstance, "T");
@@ -1558,11 +1558,11 @@ void KCMKttsMgr::slot_removeTalker(){
// kdDebug() << "KCMKttsMgr::removeTalker: Running"<< endl;
// Get the selected talker.
- QListViewItem *itemToRemove = m_kttsmgrw->talkersList->selectedItem();
+ TQListViewItem *itemToRemove = m_kttsmgrw->talkersList->selectedItem();
if (!itemToRemove) return;
// Delete the talker from configuration file.
-// QString talkerID = itemToRemove->text(tlvcTalkerID);
+// TQString talkerID = itemToRemove->text(tlvcTalkerID);
// m_config->deleteGroup("Talker_"+talkerID, true, false);
// Delete the talker from list view.
@@ -1594,11 +1594,11 @@ void KCMKttsMgr::removeFilter( bool sbd )
KListView* lView = m_kttsmgrw->filtersList;
if (sbd) lView = m_kttsmgrw->sbdsList;
// Get the selected filter.
- QListViewItem *itemToRemove = lView->selectedItem();
+ TQListViewItem *itemToRemove = lView->selectedItem();
if (!itemToRemove) return;
// Delete the filter from configuration file.
-// QString filterID = itemToRemove->text(flvcFilterID);
+// TQString filterID = itemToRemove->text(flvcFilterID);
// m_config->deleteGroup("Filter_"+filterID, true, false);
// Delete the filter from list view.
@@ -1636,9 +1636,9 @@ void KCMKttsMgr::slot_higherSbdFilterPriority()
*/
void KCMKttsMgr::higherItemPriority( KListView* lView )
{
- QListViewItem* item = lView->selectedItem();
+ TQListViewItem* item = lView->selectedItem();
if (!item) return;
- QListViewItem* prevItem = item->itemAbove();
+ TQListViewItem* prevItem = item->itemAbove();
if (!prevItem) return;
prevItem->moveItem(item);
lView->setSelected(item, true);
@@ -1669,9 +1669,9 @@ void KCMKttsMgr::slot_lowerSbdFilterPriority()
*/
void KCMKttsMgr::lowerItemPriority( KListView* lView )
{
- QListViewItem* item = lView->selectedItem();
+ TQListViewItem* item = lView->selectedItem();
if (!item) return;
- QListViewItem* nextItem = item->itemBelow();
+ TQListViewItem* nextItem = item->itemBelow();
if (!nextItem) return;
item->moveItem(nextItem);
lView->setSelected(item, true);
@@ -1705,7 +1705,7 @@ void KCMKttsMgr::updateTalkerButtons(){
*/
void KCMKttsMgr::updateFilterButtons(){
// kdDebug() << "KCMKttsMgr::updateFilterButtons: Running"<< endl;
- QListViewItem* item = m_kttsmgrw->filtersList->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->filtersList->selectedItem();
if (item) {
m_kttsmgrw->removeFilterButton->setEnabled(true);
m_kttsmgrw->configureFilterButton->setEnabled(true);
@@ -1727,7 +1727,7 @@ void KCMKttsMgr::updateFilterButtons(){
*/
void KCMKttsMgr::updateSbdButtons(){
// kdDebug() << "KCMKttsMgr::updateSbdButtons: Running"<< endl;
- QListViewItem* item = m_kttsmgrw->sbdsList->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->sbdsList->selectedItem();
if (item) {
m_sbdPopmenu->setItemEnabled( sbdBtnEdit, true );
m_sbdPopmenu->setItemEnabled( sbdBtnUp,
@@ -1763,8 +1763,8 @@ void KCMKttsMgr::enableKttsdToggled(bool)
if (!kttsdRunning)
{
// kdDebug() << "KCMKttsMgr::enableKttsdToggled:: Starting KTTSD" << endl;
- QString error;
- if (KApplication::startServiceByDesktopName("kttsd", QStringList(), &error))
+ TQString error;
+ if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error))
{
kdDebug() << "Starting KTTSD failed with message " << error << endl;
m_kttsmgrw->enableKttsdCheckBox->setChecked(false);
@@ -1778,7 +1778,7 @@ void KCMKttsMgr::enableKttsdToggled(bool)
if (kttsdRunning)
{
// kdDebug() << "KCMKttsMgr::enableKttsdToggled:: Stopping KTTSD" << endl;
- QByteArray data;
+ TQByteArray data;
client->send("kttsd", "KSpeech", "kttsdExit()", data);
}
}
@@ -1882,22 +1882,22 @@ void KCMKttsMgr::kttsdExiting()
void KCMKttsMgr::slot_configureTalker()
{
// Get highlighted plugin from Talker ListView and load into memory.
- QListViewItem* talkerItem = m_kttsmgrw->talkersList->selectedItem();
+ TQListViewItem* talkerItem = m_kttsmgrw->talkersList->selectedItem();
if (!talkerItem) return;
- QString talkerID = talkerItem->text(tlvcTalkerID);
- QString synthName = talkerItem->text(tlvcSynthName);
- QString language = talkerItem->text(tlvcLanguage);
- QString languageCode = m_languagesToCodes[language];
- QString desktopEntryName = TalkerCode::TalkerNameToDesktopEntryName(synthName);
+ TQString talkerID = talkerItem->text(tlvcTalkerID);
+ TQString synthName = talkerItem->text(tlvcSynthName);
+ TQString language = talkerItem->text(tlvcLanguage);
+ TQString languageCode = m_languagesToCodes[language];
+ TQString desktopEntryName = TalkerCode::TalkerNameToDesktopEntryName(synthName);
m_loadedTalkerPlugIn = loadTalkerPlugin(desktopEntryName);
if (!m_loadedTalkerPlugIn) return;
// kdDebug() << "KCMKttsMgr::slot_configureTalker: plugin for " << synthName << " loaded successfully." << endl;
// Tell plugin to load its configuration.
- m_config->setGroup(QString("Talker_")+talkerID);
+ m_config->setGroup(TQString("Talker_")+talkerID);
m_loadedTalkerPlugIn->setDesiredLanguage(languageCode);
// kdDebug() << "KCMKttsMgr::slot_configureTalker: about to call plugin load() method with Talker ID = " << talkerID << endl;
- m_loadedTalkerPlugIn->load(m_config, QString("Talker_")+talkerID);
+ m_loadedTalkerPlugIn->load(m_config, TQString("Talker_")+talkerID);
// Display configuration dialog.
configureTalker();
@@ -1912,14 +1912,14 @@ void KCMKttsMgr::slot_configureTalker()
}
// Get Talker Code. Note that plugin may return a code different from before.
- QString talkerCode = m_loadedTalkerPlugIn->getTalkerCode();
+ TQString talkerCode = m_loadedTalkerPlugIn->getTalkerCode();
// If plugin was successfully configured, save its configuration.
if (!talkerCode.isEmpty())
{
- m_config->setGroup(QString("Talker_")+talkerID);
- m_loadedTalkerPlugIn->save(m_config, QString("Talker_")+talkerID);
- m_config->setGroup(QString("Talker_")+talkerID);
+ m_config->setGroup(TQString("Talker_")+talkerID);
+ m_loadedTalkerPlugIn->save(m_config, TQString("Talker_")+talkerID);
+ m_config->setGroup(TQString("Talker_")+talkerID);
talkerCode = TalkerCode::normalizeTalkerCode(talkerCode, languageCode);
m_config->writeEntry("TalkerCode", talkerCode);
m_config->sync();
@@ -1956,20 +1956,20 @@ void KCMKttsMgr::configureFilterItem( bool sbd )
// Get highlighted plugin from Filter ListView and load into memory.
KListView* lView = m_kttsmgrw->filtersList;
if (sbd) lView = m_kttsmgrw->sbdsList;
- QListViewItem* filterItem = lView->selectedItem();
+ TQListViewItem* filterItem = lView->selectedItem();
if (!filterItem) return;
- QString filterID = filterItem->text(flvcFilterID);
- QString filterPlugInName = filterItem->text(flvcPlugInName);
- QString desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
+ TQString filterID = filterItem->text(flvcFilterID);
+ TQString filterPlugInName = filterItem->text(flvcPlugInName);
+ TQString desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
if (desktopEntryName.isEmpty()) return;
m_loadedFilterPlugIn = loadFilterPlugin(desktopEntryName);
if (!m_loadedFilterPlugIn) return;
// kdDebug() << "KCMKttsMgr::slot_configureFilter: plugin for " << filterPlugInName << " loaded successfully." << endl;
// Tell plugin to load its configuration.
- m_config->setGroup(QString("Filter_")+filterID);
+ m_config->setGroup(TQString("Filter_")+filterID);
// kdDebug() << "KCMKttsMgr::slot_configureFilter: about to call plugin load() method with Filter ID = " << filterID << endl;
- m_loadedFilterPlugIn->load(m_config, QString("Filter_")+filterID);
+ m_loadedFilterPlugIn->load(m_config, TQString("Filter_")+filterID);
// Display configuration dialog.
configureFilter();
@@ -1984,15 +1984,15 @@ void KCMKttsMgr::configureFilterItem( bool sbd )
}
// Get user's name for the plugin.
- QString userFilterName = m_loadedFilterPlugIn->userPlugInName();
+ TQString userFilterName = m_loadedFilterPlugIn->userPlugInName();
// If user properly configured the plugin, save the configuration.
if ( !userFilterName.isEmpty() )
{
// Let plugin save its configuration.
- m_config->setGroup(QString("Filter_")+filterID);
- m_loadedFilterPlugIn->save(m_config, QString("Filter_")+filterID);
+ m_config->setGroup(TQString("Filter_")+filterID);
+ m_loadedFilterPlugIn->save(m_config, TQString("Filter_")+filterID);
// Save configuration.
m_config->setGroup("Filter_"+filterID);
@@ -2007,7 +2007,7 @@ void KCMKttsMgr::configureFilterItem( bool sbd )
// Update display.
filterItem->setText(flvcUserName, userFilterName);
if (!sbd)
- dynamic_cast<QCheckListItem*>(filterItem)->setOn(true);
+ dynamic_cast<TQCheckListItem*>(filterItem)->setOn(true);
// Inform Control Center that configuration has changed.
configChanged();
@@ -2036,16 +2036,16 @@ void KCMKttsMgr::configureTalker()
"configureTalker_dlg",
true,
true);
- m_configDlg->setInitialSize(QSize(700, 300), false);
+ m_configDlg->setInitialSize(TQSize(700, 300), false);
m_configDlg->setMainWidget(m_loadedTalkerPlugIn);
m_configDlg->setHelp("configure-plugin", "kttsd");
m_configDlg->enableButtonOK(false);
- connect(m_loadedTalkerPlugIn, SIGNAL( changed(bool) ), this, SLOT( slotConfigTalkerDlg_ConfigChanged() ));
- connect(m_configDlg, SIGNAL( defaultClicked() ), this, SLOT( slotConfigTalkerDlg_DefaultClicked() ));
- connect(m_configDlg, SIGNAL( cancelClicked() ), this, SLOT (slotConfigTalkerDlg_CancelClicked() ));
+ connect(m_loadedTalkerPlugIn, TQT_SIGNAL( changed(bool) ), this, TQT_SLOT( slotConfigTalkerDlg_ConfigChanged() ));
+ connect(m_configDlg, TQT_SIGNAL( defaultClicked() ), this, TQT_SLOT( slotConfigTalkerDlg_DefaultClicked() ));
+ connect(m_configDlg, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT (slotConfigTalkerDlg_CancelClicked() ));
// Create a Player object for the plugin to use for testing.
int playerOption = 0;
- QString sinkName;
+ TQString sinkName;
if (m_kttsmgrw->gstreamerRadioButton->isChecked()) {
playerOption = 1;
sinkName = m_kttsmgrw->sinkComboBox->currentText();
@@ -2092,15 +2092,15 @@ void KCMKttsMgr::configureFilter()
"configureFilter_dlg",
true,
true);
- m_configDlg->setInitialSize(QSize(600, 450), false);
+ m_configDlg->setInitialSize(TQSize(600, 450), false);
m_loadedFilterPlugIn->setMinimumSize(m_loadedFilterPlugIn->minimumSizeHint());
m_loadedFilterPlugIn->show();
m_configDlg->setMainWidget(m_loadedFilterPlugIn);
m_configDlg->setHelp("configure-filter", "kttsd");
m_configDlg->enableButtonOK(false);
- connect(m_loadedFilterPlugIn, SIGNAL( changed(bool) ), this, SLOT( slotConfigFilterDlg_ConfigChanged() ));
- connect(m_configDlg, SIGNAL( defaultClicked() ), this, SLOT( slotConfigFilterDlg_DefaultClicked() ));
- connect(m_configDlg, SIGNAL( cancelClicked() ), this, SLOT (slotConfigFilterDlg_CancelClicked() ));
+ connect(m_loadedFilterPlugIn, TQT_SIGNAL( changed(bool) ), this, TQT_SLOT( slotConfigFilterDlg_ConfigChanged() ));
+ connect(m_configDlg, TQT_SIGNAL( defaultClicked() ), this, TQT_SLOT( slotConfigFilterDlg_DefaultClicked() ));
+ connect(m_configDlg, TQT_SIGNAL( cancelClicked() ), this, TQT_SLOT (slotConfigFilterDlg_CancelClicked() ));
// Display the dialog.
m_configDlg->exec();
}
@@ -2108,10 +2108,10 @@ void KCMKttsMgr::configureFilter()
/**
* Count number of configured Filters with the specified plugin name.
*/
-int KCMKttsMgr::countFilterPlugins(const QString& filterPlugInName)
+int KCMKttsMgr::countFilterPlugins(const TQString& filterPlugInName)
{
int cnt = 0;
- QListViewItem* item = m_kttsmgrw->filtersList->firstChild();
+ TQListViewItem* item = m_kttsmgrw->filtersList->firstChild();
while (item)
{
if (item->text(flvcPlugInName) == filterPlugInName) ++cnt;
@@ -2201,15 +2201,15 @@ void KCMKttsMgr::slotFiltersList_stateChanged()
* Uses KTrader to convert a translated Filter Plugin Name to DesktopEntryName.
* @param name The translated plugin name. From Name= line in .desktop file.
* @return DesktopEntryName. The name of the .desktop file (less .desktop).
- * QString::null if not found.
+ * TQString::null if not found.
*/
-QString KCMKttsMgr::FilterNameToDesktopEntryName(const QString& name)
+TQString KCMKttsMgr::FilterNameToDesktopEntryName(const TQString& name)
{
- if (name.isEmpty()) return QString::null;
+ if (name.isEmpty()) return TQString::null;
KTrader::OfferList offers = KTrader::self()->query("KTTSD/FilterPlugin");
for (uint ndx = 0; ndx < offers.count(); ++ndx)
if (offers[ndx]->name() == name) return offers[ndx]->desktopEntryName();
- return QString::null;
+ return TQString::null;
}
/**
@@ -2217,31 +2217,31 @@ QString KCMKttsMgr::FilterNameToDesktopEntryName(const QString& name)
* @param desktopEntryName The DesktopEntryName.
* @return The translated Name of the plugin, from Name= line in .desktop file.
*/
-QString KCMKttsMgr::FilterDesktopEntryNameToName(const QString& desktopEntryName)
+TQString KCMKttsMgr::FilterDesktopEntryNameToName(const TQString& desktopEntryName)
{
- if (desktopEntryName.isEmpty()) return QString::null;
+ if (desktopEntryName.isEmpty()) return TQString::null;
KTrader::OfferList offers = KTrader::self()->query("KTTSD/FilterPlugin",
- QString("DesktopEntryName == '%1'").arg(desktopEntryName));
+ TQString("DesktopEntryName == '%1'").arg(desktopEntryName));
if (offers.count() == 1)
return offers[0]->name();
else
- return QString::null;
+ return TQString::null;
}
/**
* Loads notify events from a file. Clearing listview if clear is True.
*/
-QString KCMKttsMgr::loadNotifyEventsFromFile( const QString& filename, bool clear)
+TQString KCMKttsMgr::loadNotifyEventsFromFile( const TQString& filename, bool clear)
{
// Open existing event list.
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_ReadOnly ) )
{
return i18n("Unable to open file.") + filename;
}
- // QDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" );
- QDomDocument doc( "" );
+ // TQDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" );
+ TQDomDocument doc( "" );
if ( !doc.setContent( &file ) ) {
file.close();
return i18n("File not in proper XML format.");
@@ -2253,22 +2253,22 @@ QString KCMKttsMgr::loadNotifyEventsFromFile( const QString& filename, bool clea
if ( clear ) m_kttsmgrw->notifyListView->clear();
// Event list.
- QDomNodeList eventList = doc.elementsByTagName("notifyEvent");
+ TQDomNodeList eventList = doc.elementsByTagName("notifyEvent");
const int eventListCount = eventList.count();
for (int eventIndex = 0; eventIndex < eventListCount; ++eventIndex)
{
- QDomNode eventNode = eventList.item(eventIndex);
- QDomNodeList propList = eventNode.childNodes();
- QString eventSrc;
- QString event;
- QString actionName;
- QString message;
+ TQDomNode eventNode = eventList.item(eventIndex);
+ TQDomNodeList propList = eventNode.childNodes();
+ TQString eventSrc;
+ TQString event;
+ TQString actionName;
+ TQString message;
TalkerCode talkerCode;
const int propListCount = propList.count();
for (int propIndex = 0; propIndex < propListCount; ++propIndex)
{
- QDomNode propNode = propList.item(propIndex);
- QDomElement prop = propNode.toElement();
+ TQDomNode propNode = propList.item(propIndex);
+ TQDomElement prop = propNode.toElement();
if (prop.tagName() == "eventSrc") eventSrc = prop.text();
if (prop.tagName() == "event") event = prop.text();
if (prop.tagName() == "action") actionName = prop.text();
@@ -2278,37 +2278,37 @@ QString KCMKttsMgr::loadNotifyEventsFromFile( const QString& filename, bool clea
addNotifyItem(eventSrc, event, NotifyAction::action( actionName ), message, talkerCode);
}
- return QString::null;
+ return TQString::null;
}
/**
* Saves notify events to a file.
*/
-QString KCMKttsMgr::saveNotifyEventsToFile(const QString& filename)
+TQString KCMKttsMgr::saveNotifyEventsToFile(const TQString& filename)
{
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_WriteOnly ) )
return i18n("Unable to open file ") + filename;
- QDomDocument doc( "" );
+ TQDomDocument doc( "" );
- QDomElement root = doc.createElement( "notifyEventList" );
+ TQDomElement root = doc.createElement( "notifyEventList" );
doc.appendChild( root );
// Events.
KListView* lv = m_kttsmgrw->notifyListView;
- QListViewItemIterator it(lv);
+ TQListViewItemIterator it(lv);
while ( it.current() )
{
- QListViewItem* item = *it;
+ TQListViewItem* item = *it;
if ( item->depth() > 0 )
{
- QDomElement wordTag = doc.createElement( "notifyEvent" );
+ TQDomElement wordTag = doc.createElement( "notifyEvent" );
root.appendChild( wordTag );
- QDomElement propTag = doc.createElement( "eventSrc" );
+ TQDomElement propTag = doc.createElement( "eventSrc" );
wordTag.appendChild( propTag);
- QDomText t = doc.createTextNode( item->text(nlvcEventSrc) );
+ TQDomText t = doc.createTextNode( item->text(nlvcEventSrc) );
propTag.appendChild( t );
propTag = doc.createElement( "event" );
@@ -2325,7 +2325,7 @@ QString KCMKttsMgr::saveNotifyEventsToFile(const QString& filename)
{
propTag = doc.createElement( "message" );
wordTag.appendChild( propTag);
- QString msg = item->text(nlvcActionName);
+ TQString msg = item->text(nlvcActionName);
int msglen = msg.length();
msg = msg.mid( 1, msglen-2 );
t = doc.createCDATASection( msg );
@@ -2341,13 +2341,13 @@ QString KCMKttsMgr::saveNotifyEventsToFile(const QString& filename)
}
// Write it all out.
- QTextStream ts( &file );
- ts.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream ts( &file );
+ ts.setEncoding( TQTextStream::UnicodeUTF8 );
ts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
ts << doc.toString();
file.close();
- return QString::null;
+ return TQString::null;
}
void KCMKttsMgr::slotNotifyEnableCheckBox_toggled(bool checked)
@@ -2359,7 +2359,7 @@ void KCMKttsMgr::slotNotifyEnableCheckBox_toggled(bool checked)
void KCMKttsMgr::slotNotifyPresentComboBox_activated(int index)
{
- QListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
if ( !item ) return; // should not happen
item->setText( nlvcEvent, NotifyPresent::presentName( index ) );
item->setText( nlvcEventName, NotifyPresent::presentDisplayName( index ) );
@@ -2380,7 +2380,7 @@ void KCMKttsMgr::slotNotifyPresentComboBox_activated(int index)
void KCMKttsMgr::slotNotifyListView_selectionChanged()
{
- QListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
if ( item )
{
bool topLevel = ( item->depth() == 0 );
@@ -2409,7 +2409,7 @@ void KCMKttsMgr::slotNotifyListView_selectionChanged()
if ( action == NotifyAction::SpeakCustom )
{
m_kttsmgrw->notifyMsgLineEdit->setEnabled( true );
- QString msg = item->text( nlvcActionName );
+ TQString msg = item->text( nlvcActionName );
int msglen = msg.length();
msg = msg.mid( 1, msglen-2 );
m_kttsmgrw->notifyMsgLineEdit->setText( msg );
@@ -2436,7 +2436,7 @@ void KCMKttsMgr::slotNotifyListView_selectionChanged()
void KCMKttsMgr::slotNotifyActionComboBox_activated(int index)
{
- QListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
if ( item )
if ( item->depth() == 0 ) item = 0;
if ( !item ) return; // This shouldn't happen.
@@ -2452,9 +2452,9 @@ void KCMKttsMgr::slotNotifyActionComboBox_activated(int index)
configChanged();
}
-void KCMKttsMgr::slotNotifyMsgLineEdit_textChanged(const QString& text)
+void KCMKttsMgr::slotNotifyMsgLineEdit_textChanged(const TQString& text)
{
- QListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
if ( item )
if ( item->depth() == 0 ) item = 0;
if ( !item ) return; // This shouldn't happen.
@@ -2467,10 +2467,10 @@ void KCMKttsMgr::slotNotifyMsgLineEdit_textChanged(const QString& text)
void KCMKttsMgr::slotNotifyTestButton_clicked()
{
- QListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
if (item)
{
- QString msg;
+ TQString msg;
int action = NotifyAction::action(item->text(nlvcAction));
switch (action)
{
@@ -2493,16 +2493,16 @@ void KCMKttsMgr::slotNotifyTestButton_clicked()
void KCMKttsMgr::slotNotifyTalkerButton_clicked()
{
- QListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
if ( item )
if ( item->depth() == 0 ) item = 0;
if ( !item ) return; // This shouldn't happen.
- QString talkerCode = item->text( nlvcTalker );
+ TQString talkerCode = item->text( nlvcTalker );
SelectTalkerDlg dlg( m_kttsmgrw, "selecttalkerdialog", i18n("Select Talker"), talkerCode, true );
int dlgResult = dlg.exec();
if ( dlgResult != KDialogBase::Accepted ) return;
item->setText( nlvcTalker, dlg.getSelectedTalkerCode() );
- QString talkerName = dlg.getSelectedTranslatedDescription();
+ TQString talkerName = dlg.getSelectedTranslatedDescription();
item->setText( nlvcTalkerName, talkerName );
m_kttsmgrw->notifyTalkerLineEdit->setText( talkerName );
configChanged();
@@ -2512,22 +2512,22 @@ void KCMKttsMgr::slotNotifyTalkerButton_clicked()
* Adds an item to the notify listview.
* message is only needed if action = naSpeakCustom.
*/
-QListViewItem* KCMKttsMgr::addNotifyItem(
- const QString& eventSrc,
- const QString& event,
+TQListViewItem* KCMKttsMgr::addNotifyItem(
+ const TQString& eventSrc,
+ const TQString& event,
int action,
- const QString& message,
+ const TQString& message,
TalkerCode& talkerCode)
{
KListView* lv = m_kttsmgrw->notifyListView;
- QListViewItem* item = 0;
- QString iconName;
- QString eventSrcName;
+ TQListViewItem* item = 0;
+ TQString iconName;
+ TQString eventSrcName;
if (eventSrc == "default")
eventSrcName = i18n("Default (all other events)");
else
eventSrcName = NotifyEvent::getEventSrcName(eventSrc, iconName);
- QString eventName;
+ TQString eventName;
if (eventSrc == "default")
eventName = NotifyPresent::presentDisplayName( event );
else
@@ -2537,21 +2537,21 @@ QListViewItem* KCMKttsMgr::addNotifyItem(
else
eventName = NotifyEvent::getEventName(eventSrc, event);
}
- QString actionName = NotifyAction::actionName( action );
- QString actionDisplayName = NotifyAction::actionDisplayName( action );
+ TQString actionName = NotifyAction::actionName( action );
+ TQString actionDisplayName = NotifyAction::actionDisplayName( action );
if (action == NotifyAction::SpeakCustom) actionDisplayName = "\"" + message + "\"";
- QString talkerName = talkerCode.getTranslatedDescription();
+ TQString talkerName = talkerCode.getTranslatedDescription();
if (!eventSrcName.isEmpty() && !eventName.isEmpty() && !actionName.isEmpty() && !talkerName.isEmpty())
{
- QListViewItem* parentItem = lv->findItem(eventSrcName, nlvcEventSrcName);
+ TQListViewItem* parentItem = lv->findItem(eventSrcName, nlvcEventSrcName);
if (!parentItem)
{
item = lv->lastItem();
if (!item)
- parentItem = new KListViewItem(lv, eventSrcName, QString::null, QString::null,
+ parentItem = new KListViewItem(lv, eventSrcName, TQString::null, TQString::null,
eventSrc);
else
- parentItem = new KListViewItem(lv, item, eventSrcName, QString::null, QString::null,
+ parentItem = new KListViewItem(lv, item, eventSrcName, TQString::null, TQString::null,
eventSrc);
if ( !iconName.isEmpty() )
parentItem->setPixmap( nlvcEventSrcName, SmallIcon( iconName ) );
@@ -2571,9 +2571,9 @@ QListViewItem* KCMKttsMgr::addNotifyItem(
void KCMKttsMgr::slotNotifyAddButton_clicked()
{
- QListView* lv = m_kttsmgrw->notifyListView;
- QListViewItem* item = lv->selectedItem();
- QString eventSrc;
+ TQListView* lv = m_kttsmgrw->notifyListView;
+ TQListViewItem* item = lv->selectedItem();
+ TQString eventSrc;
if ( item ) eventSrc = item->text( nlvcEventSrc );
SelectEvent* selectEventWidget = new SelectEvent( this, "SelectEvent_widget", 0, eventSrc );
KDialogBase* dlg = new KDialogBase(
@@ -2586,18 +2586,18 @@ void KCMKttsMgr::slotNotifyAddButton_clicked()
true,
true);
dlg->setMainWidget( selectEventWidget );
- dlg->setInitialSize( QSize(500, 400) );
+ dlg->setInitialSize( TQSize(500, 400) );
// dlg->setHelp("select-plugin", "kttsd");
int dlgResult = dlg->exec();
eventSrc = selectEventWidget->getEventSrc();
- QString event = selectEventWidget->getEvent();
+ TQString event = selectEventWidget->getEvent();
delete dlg;
- if ( dlgResult != QDialog::Accepted ) return;
+ if ( dlgResult != TQDialog::Accepted ) return;
if ( eventSrc.isEmpty() || event.isEmpty() ) return;
// Use Default action, message, and talker.
- QString actionName;
+ TQString actionName;
int action = NotifyAction::DoNotSpeak;
- QString msg;
+ TQString msg;
TalkerCode talkerCode;
item = lv->findItem( "default", nlvcEventSrc );
if ( item )
@@ -2626,14 +2626,14 @@ void KCMKttsMgr::slotNotifyAddButton_clicked()
void KCMKttsMgr::slotNotifyClearButton_clicked()
{
m_kttsmgrw->notifyListView->clear();
- TalkerCode talkerCode( QString::null );
- QListViewItem* item = addNotifyItem(
- QString("default"),
+ TalkerCode talkerCode( TQString::null );
+ TQListViewItem* item = addNotifyItem(
+ TQString("default"),
NotifyPresent::presentName(NotifyPresent::Passive),
NotifyAction::SpeakEventName,
- QString::null,
+ TQString::null,
talkerCode );
- QListView* lv = m_kttsmgrw->notifyListView;
+ TQListView* lv = m_kttsmgrw->notifyListView;
lv->ensureItemVisible( item );
lv->setSelected( item, true );
slotNotifyListView_selectionChanged();
@@ -2642,9 +2642,9 @@ void KCMKttsMgr::slotNotifyClearButton_clicked()
void KCMKttsMgr::slotNotifyRemoveButton_clicked()
{
- QListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
+ TQListViewItem* item = m_kttsmgrw->notifyListView->selectedItem();
if (!item) return;
- QListViewItem* parentItem = item->parent();
+ TQListViewItem* parentItem = item->parent();
delete item;
if (parentItem)
{
@@ -2656,15 +2656,15 @@ void KCMKttsMgr::slotNotifyRemoveButton_clicked()
void KCMKttsMgr::slotNotifyLoadButton_clicked()
{
- // QString dataDir = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/stringreplacer/";
- QString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/notify/").last();
- QString filename = KFileDialog::getOpenFileName(
+ // TQString dataDir = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/stringreplacer/";
+ TQString dataDir = KGlobal::dirs()->findAllResources("data", "kttsd/notify/").last();
+ TQString filename = KFileDialog::getOpenFileName(
dataDir,
"*.xml|" + i18n("file type", "Notification Event List") + " (*.xml)",
m_kttsmgrw,
"event_loadfile");
if ( filename.isEmpty() ) return;
- QString errMsg = loadNotifyEventsFromFile( filename, true );
+ TQString errMsg = loadNotifyEventsFromFile( filename, true );
slotNotifyListView_selectionChanged();
if ( !errMsg.isEmpty() )
KMessageBox::sorry( m_kttsmgrw, errMsg, i18n("Error Opening File") );
@@ -2674,13 +2674,13 @@ void KCMKttsMgr::slotNotifyLoadButton_clicked()
void KCMKttsMgr::slotNotifySaveButton_clicked()
{
- QString filename = KFileDialog::getSaveFileName(
+ TQString filename = KFileDialog::getSaveFileName(
KGlobal::dirs()->saveLocation( "data" ,"kttsd/notify/", false ),
"*.xml|" + i18n("file type", "Notification Event List") + " (*.xml)",
m_kttsmgrw,
"event_savefile");
if ( filename.isEmpty() ) return;
- QString errMsg = saveNotifyEventsToFile( filename );
+ TQString errMsg = saveNotifyEventsToFile( filename );
slotNotifyListView_selectionChanged();
if ( !errMsg.isEmpty() )
KMessageBox::sorry( m_kttsmgrw, errMsg, i18n("Error Opening File") );
@@ -2688,16 +2688,16 @@ void KCMKttsMgr::slotNotifySaveButton_clicked()
// ----------------------------------------------------------------------------
-KttsCheckListItem::KttsCheckListItem( QListView *parent, QListViewItem *after,
- const QString &text, Type tt,
+KttsCheckListItem::KttsCheckListItem( TQListView *parent, TQListViewItem *after,
+ const TQString &text, Type tt,
KCMKttsMgr* kcmkttsmgr ) :
- QCheckListItem(parent, after, text, tt),
+ TQCheckListItem(parent, after, text, tt),
m_kcmkttsmgr(kcmkttsmgr) { }
-KttsCheckListItem::KttsCheckListItem( QListView *parent,
- const QString &text, Type tt,
+KttsCheckListItem::KttsCheckListItem( TQListView *parent,
+ const TQString &text, Type tt,
KCMKttsMgr* kcmkttsmgr ) :
- QCheckListItem(parent, text, tt),
+ TQCheckListItem(parent, text, tt),
m_kcmkttsmgr(kcmkttsmgr) { }
/*virtual*/ void KttsCheckListItem::stateChange(bool)
@@ -2705,7 +2705,7 @@ KttsCheckListItem::KttsCheckListItem( QListView *parent,
if (m_kcmkttsmgr) m_kcmkttsmgr->slotFiltersList_stateChanged();
}
-/*virtual*/ /*void resizeEvent( QResizeEvent ev )
+/*virtual*/ /*void resizeEvent( TQResizeEvent ev )
{
dynamic_cast<KCModule>(resizeEvent(ev));
updateGeometry();
diff --git a/kttsd/kcmkttsmgr/kcmkttsmgr.h b/kttsd/kcmkttsmgr/kcmkttsmgr.h
index 39481b9..6641fe4 100644
--- a/kttsd/kcmkttsmgr/kcmkttsmgr.h
+++ b/kttsd/kcmkttsmgr/kcmkttsmgr.h
@@ -22,8 +22,8 @@
#include "config.h"
// Qt includes.
-#include <qmap.h>
-#include <qlistview.h>
+#include <tqmap.h>
+#include <tqlistview.h>
// KDE includes.
#include <kcmodule.h>
@@ -57,7 +57,7 @@ class KCMKttsMgr :
Q_OBJECT
public:
- KCMKttsMgr(QWidget *parent, const char *name, const QStringList &);
+ KCMKttsMgr(TQWidget *parent, const char *name, const TQStringList &);
~KCMKttsMgr();
@@ -109,7 +109,7 @@ class KCMKttsMgr :
* This function returns the small quickhelp.
* That is displayed in the sidebar in the KControl
*/
- QString quickHelp() const;
+ TQString quickHelp() const;
/**
* Return the about information for this module
@@ -147,7 +147,7 @@ class KCMKttsMgr :
*/
virtual void kttsdExiting();
- // virtual void resizeEvent( QResizeEvent ev );
+ // virtual void resizeEvent( TQResizeEvent ev );
private:
enum widgetPages
@@ -226,28 +226,28 @@ class KCMKttsMgr :
* <prosody volume="medium" rate="medium"/>
* <kttsd synthesizer="Festival" />
*/
- QString defaultTalkerCode(const QString &languageCode, const QString &plugInName);
+ TQString defaultTalkerCode(const TQString &languageCode, const TQString &plugInName);
/**
* Given an item in the talker listview and a talker code, sets the columns of the item.
- * @param talkerItem QListViewItem.
+ * @param talkerItem TQListViewItem.
* @param talkerCode Talker Code.
*/
- void updateTalkerItem(QListViewItem* talkerItem, const QString &talkerCode);
+ void updateTalkerItem(TQListViewItem* talkerItem, const TQString &talkerCode);
/**
* Loads the configuration plugin for a named Talker plugin.
* @param name DesktopEntryName of the Synthesizer.
* @return Pointer to the configuration plugin for the Talker.
*/
- PlugInConf* loadTalkerPlugin(const QString& name);
+ PlugInConf* loadTalkerPlugin(const TQString& name);
/**
* Loads the configuration plugin for a named Filter plugin.
* @param plugInName DesktopEntryName of the plugin.
* @return Pointer to the configuration plugin for the Filter.
*/
- KttsFilterConf* loadFilterPlugin(const QString& plugInName);
+ KttsFilterConf* loadFilterPlugin(const TQString& plugInName);
/**
* Display the Talker Configuration Dialog.
@@ -279,42 +279,42 @@ class KCMKttsMgr :
/**
* Count number of configured Filters with the specified plugin name.
*/
- int countFilterPlugins(const QString& filterPlugInName);
+ int countFilterPlugins(const TQString& filterPlugInName);
/**
* Uses KTrader to convert a translated Filter Plugin Name to DesktopEntryName.
* @param name The translated plugin name. From Name= line in .desktop file.
* @return DesktopEntryName. The name of the .desktop file (less .desktop).
- * QString::null if not found.
+ * TQString::null if not found.
*/
- QString FilterNameToDesktopEntryName(const QString& name);
+ TQString FilterNameToDesktopEntryName(const TQString& name);
/**
* Uses KTrader to convert a DesktopEntryName into a translated Filter Plugin Name.
* @param desktopEntryName The DesktopEntryName.
* @return The translated Name of the plugin, from Name= line in .desktop file.
*/
- QString FilterDesktopEntryNameToName(const QString& desktopEntryName);
+ TQString FilterDesktopEntryNameToName(const TQString& desktopEntryName);
/**
* Loads notify events from a file. Clearing listview if clear is True.
*/
- QString loadNotifyEventsFromFile( const QString& filename, bool clear);
+ TQString loadNotifyEventsFromFile( const TQString& filename, bool clear);
/**
* Saves notify events to a file.
*/
- QString saveNotifyEventsToFile(const QString& filename);
+ TQString saveNotifyEventsToFile(const TQString& filename);
/**
* Adds an item to the notify listview.
* message is only needed if action = nactSpeakCustom.
*/
- QListViewItem* addNotifyItem(
- const QString& eventSrc,
- const QString& event,
+ TQListViewItem* addNotifyItem(
+ const TQString& eventSrc,
+ const TQString& event,
int action,
- const QString& message,
+ const TQString& message,
TalkerCode& talkerCode);
/**
@@ -340,7 +340,7 @@ class KCMKttsMgr :
/**
* Sentence Boundary Detector button popup menu.
*/
- QPopupMenu* m_sbdPopmenu;
+ TQPopupMenu* m_sbdPopmenu;
/**
* Talker(synth) Plugin currently loaded into configuration dialog.
@@ -381,17 +381,17 @@ class KCMKttsMgr :
/**
* Dictionary mapping language names to codes.
*/
- QMap<QString, QString> m_languagesToCodes;
+ TQMap<TQString, TQString> m_languagesToCodes;
/**
- * A QMap of languages codes indexed by synthesizer that supports them.
+ * A TQMap of languages codes indexed by synthesizer that supports them.
*/
SynthToLangMap m_synthToLangMap;
/**
* Default Talker Code for notifications.
*/
- QString m_defaultNotifyTalkerCode;
+ TQString m_defaultNotifyTalkerCode;
private slots:
/**
@@ -499,7 +499,7 @@ class KCMKttsMgr :
void slotNotifyPresentComboBox_activated(int index);
void slotNotifyActionComboBox_activated(int index);
void slotNotifyTestButton_clicked();
- void slotNotifyMsgLineEdit_textChanged(const QString& text);
+ void slotNotifyMsgLineEdit_textChanged(const TQString& text);
void slotNotifyTalkerButton_clicked();
/**
@@ -513,11 +513,11 @@ class KCMKttsMgr :
class KttsCheckListItem : public QCheckListItem
{
public:
- KttsCheckListItem( QListView *parent,
- const QString &text, Type tt = RadioButtonController,
+ KttsCheckListItem( TQListView *parent,
+ const TQString &text, Type tt = RadioButtonController,
KCMKttsMgr* kcmkttsmgr = 0);
- KttsCheckListItem( QListView *parent, QListViewItem *after,
- const QString &text, Type tt = RadioButtonController,
+ KttsCheckListItem( TQListView *parent, TQListViewItem *after,
+ const TQString &text, Type tt = RadioButtonController,
KCMKttsMgr* kcmkttsmgr = 0);
protected:
diff --git a/kttsd/kcmkttsmgr/selectevent.cpp b/kttsd/kcmkttsmgr/selectevent.cpp
index dc65fa4..8a77c38 100644
--- a/kttsd/kcmkttsmgr/selectevent.cpp
+++ b/kttsd/kcmkttsmgr/selectevent.cpp
@@ -22,7 +22,7 @@
******************************************************************************/
// Qt includes.
-#include <qcombobox.h>
+#include <tqcombobox.h>
// KDE includes
#include <kstandarddirs.h>
@@ -36,17 +36,17 @@
#include "utils.h"
#include "selectevent.h"
-SelectEvent::SelectEvent(QWidget* parent, const char* name, WFlags fl, const QString& initEventSrc)
+SelectEvent::SelectEvent(TQWidget* parent, const char* name, WFlags fl, const TQString& initEventSrc)
: SelectEventWidget(parent,name,fl)
{
// Load list of event sources (applications).
- QStringList fullpaths =
+ TQStringList fullpaths =
KGlobal::dirs()->findAllResources("data", "*/eventsrc", false, true );
- QStringList::ConstIterator it = fullpaths.begin();
- QStringList relativePaths;
+ TQStringList::ConstIterator it = fullpaths.begin();
+ TQStringList relativePaths;
for ( ; it != fullpaths.end(); ++it)
{
- QString relativePath = *it;
+ TQString relativePath = *it;
if ( relativePath.at(0) == '/' && KStandardDirs::exists( relativePath ) )
{
relativePath = makeRelative( relativePath );
@@ -57,18 +57,18 @@ SelectEvent::SelectEvent(QWidget* parent, const char* name, WFlags fl, const QSt
it = relativePaths.begin();
for ( ; it != relativePaths.end(); ++it)
{
- QString relativePath = *it;
+ TQString relativePath = *it;
if ( !relativePath.isEmpty() )
{
KConfig* config = new KConfig(relativePath, true, false, "data");
- config->setGroup( QString::fromLatin1("!Global!") );
- QString icon = config->readEntry(QString::fromLatin1("IconName"),
- QString::fromLatin1("misc"));
- QString description = config->readEntry( QString::fromLatin1("Comment"),
+ config->setGroup( TQString::fromLatin1("!Global!") );
+ TQString icon = config->readEntry(TQString::fromLatin1("IconName"),
+ TQString::fromLatin1("misc"));
+ TQString description = config->readEntry( TQString::fromLatin1("Comment"),
i18n("No description available") );
delete config;
int index = relativePath.find( '/' );
- QString appname;
+ TQString appname;
if ( index >= 0 )
appname = relativePath.left( index );
else
@@ -79,7 +79,7 @@ SelectEvent::SelectEvent(QWidget* parent, const char* name, WFlags fl, const QSt
}
}
slotEventSrcComboBox_activated(eventSrcComboBox->currentItem());
- connect (eventSrcComboBox, SIGNAL(activated(int)), this, SLOT(slotEventSrcComboBox_activated(int)));
+ connect (eventSrcComboBox, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotEventSrcComboBox_activated(int)));
}
SelectEvent::~SelectEvent() { }
@@ -87,20 +87,20 @@ SelectEvent::~SelectEvent() { }
void SelectEvent::slotEventSrcComboBox_activated(int index)
{
eventsListView->clear();
- QListViewItem* item = 0;
- QString eventSrc = m_eventSrcNames[index];
- QString configFilename = eventSrc + QString::fromLatin1( "/eventsrc" );
+ TQListViewItem* item = 0;
+ TQString eventSrc = m_eventSrcNames[index];
+ TQString configFilename = eventSrc + TQString::fromLatin1( "/eventsrc" );
KConfig* config = new KConfig( configFilename, true, false, "data" );
- QStringList eventNames = config->groupList();
+ TQStringList eventNames = config->groupList();
uint eventNamesCount = eventNames.count();
for (uint ndx = 0; ndx < eventNamesCount; ++ndx)
{
- QString eventName = eventNames[ndx];
+ TQString eventName = eventNames[ndx];
if ( eventName != "!Global!" )
{
config->setGroup( eventName );
- QString eventDesc = config->readEntry( QString::fromLatin1( "Comment" ),
- config->readEntry( QString::fromLatin1( "Name" )));
+ TQString eventDesc = config->readEntry( TQString::fromLatin1( "Comment" ),
+ config->readEntry( TQString::fromLatin1( "Name" )));
if ( !item )
item = new KListViewItem( eventsListView, eventDesc, eventName );
else
@@ -110,7 +110,7 @@ void SelectEvent::slotEventSrcComboBox_activated(int index)
delete config;
eventsListView->sort();
item = eventsListView->lastChild();
- QString eventDesc = i18n("All other %1 events").arg(eventSrcComboBox->currentText());
+ TQString eventDesc = i18n("All other %1 events").arg(eventSrcComboBox->currentText());
if ( !item )
item = new KListViewItem( eventsListView, eventDesc, "default" );
else
@@ -118,29 +118,29 @@ void SelectEvent::slotEventSrcComboBox_activated(int index)
}
-QString SelectEvent::getEventSrc()
+TQString SelectEvent::getEventSrc()
{
return m_eventSrcNames[eventSrcComboBox->currentItem()];
}
-QString SelectEvent::getEvent()
+TQString SelectEvent::getEvent()
{
- QListViewItem* item = eventsListView->currentItem();
+ TQListViewItem* item = eventsListView->currentItem();
if ( item )
return item->text(1);
else
- return QString::null;
+ return TQString::null;
}
// returns e.g. "kwin/eventsrc" from a given path
// "/opt/kde3/share/apps/kwin/eventsrc"
-QString SelectEvent::makeRelative( const QString& fullPath )
+TQString SelectEvent::makeRelative( const TQString& fullPath )
{
int slash = fullPath.findRev( '/' ) - 1;
slash = fullPath.findRev( '/', slash );
if ( slash < 0 )
- return QString::null;
+ return TQString::null;
return fullPath.mid( slash+1 );
}
diff --git a/kttsd/kcmkttsmgr/selectevent.h b/kttsd/kcmkttsmgr/selectevent.h
index 1ca4e21..95d60f9 100644
--- a/kttsd/kcmkttsmgr/selectevent.h
+++ b/kttsd/kcmkttsmgr/selectevent.h
@@ -37,8 +37,8 @@ public:
* @param name Inherited KDialog parameter.
* @param initEventSrc Event source to start with.
*/
- SelectEvent(QWidget* parent = 0, const char* name = 0, WFlags fl = 0,
- const QString& initEventSrc = QString::null );
+ SelectEvent(TQWidget* parent = 0, const char* name = 0, WFlags fl = 0,
+ const TQString& initEventSrc = TQString::null );
/**
* Destructor.
@@ -48,12 +48,12 @@ public:
/**
* Returns the chosen event source (app name).
*/
- QString getEventSrc();
+ TQString getEventSrc();
/**
* Returns the chosen event.
*/
- QString getEvent();
+ TQString getEvent();
private slots:
void slotEventSrcComboBox_activated(int index);
@@ -61,9 +61,9 @@ private slots:
private:
// returns e.g. "kwin/eventsrc" from a given path
// "/opt/kde3/share/apps/kwin/eventsrc"
- QString makeRelative( const QString& fullPath );
+ TQString makeRelative( const TQString& fullPath );
- QStringList m_eventSrcNames;
+ TQStringList m_eventSrcNames;
};
#endif // _SELECTEVENT_H_
diff --git a/kttsd/kttsd/filtermgr.cpp b/kttsd/kttsd/filtermgr.cpp
index 3b0474b..88dc6b0 100644
--- a/kttsd/kttsd/filtermgr.cpp
+++ b/kttsd/kttsd/filtermgr.cpp
@@ -37,7 +37,7 @@
/**
* Constructor.
*/
-FilterMgr::FilterMgr( QObject *parent, const char *name) :
+FilterMgr::FilterMgr( TQObject *parent, const char *name) :
KttsFilterProc(parent, name)
{
// kdDebug() << "FilterMgr::FilterMgr: Running" << endl;
@@ -64,11 +64,11 @@ FilterMgr::~FilterMgr()
* @param config Settings object.
* @return False if FilterMgr is not ready to filter.
*/
-bool FilterMgr::init(KConfig *config, const QString& /*configGroup*/)
+bool FilterMgr::init(KConfig *config, const TQString& /*configGroup*/)
{
// Load each of the filters and initialize.
config->setGroup("General");
- QStringList filterIDsList = config->readListEntry("FilterIDs", ',');
+ TQStringList filterIDsList = config->readListEntry("FilterIDs", ',');
// kdDebug() << "FilterMgr::init: FilterIDs = " << filterIDsList << endl;
// If no filters have been configured, automatically configure the standard SBD.
if (filterIDsList.isEmpty())
@@ -87,13 +87,13 @@ bool FilterMgr::init(KConfig *config, const QString& /*configGroup*/)
}
if ( !filterIDsList.isEmpty() )
{
- QStringList::ConstIterator itEnd = filterIDsList.constEnd();
- for (QStringList::ConstIterator it = filterIDsList.constBegin(); it != itEnd; ++it)
+ TQStringList::ConstIterator itEnd = filterIDsList.constEnd();
+ for (TQStringList::ConstIterator it = filterIDsList.constBegin(); it != itEnd; ++it)
{
- QString filterID = *it;
- QString groupName = "Filter_" + filterID;
+ TQString filterID = *it;
+ TQString groupName = "Filter_" + filterID;
config->setGroup( groupName );
- QString desktopEntryName = config->readEntry( "DesktopEntryName" );
+ TQString desktopEntryName = config->readEntry( "DesktopEntryName" );
// If a DesktopEntryName is not in the config file, it was configured before
// we started using them, when we stored translated plugin names instead.
// Try to convert the translated plugin name to a DesktopEntryName.
@@ -101,7 +101,7 @@ bool FilterMgr::init(KConfig *config, const QString& /*configGroup*/)
// and DesktopEntryName won't change.
if (desktopEntryName.isEmpty())
{
- QString filterPlugInName = config->readEntry("PlugInName", QString::null);
+ TQString filterPlugInName = config->readEntry("PlugInName", TQString::null);
// See if the translated name will untranslate. If not, well, sorry.
desktopEntryName = FilterNameToDesktopEntryName(filterPlugInName);
// Record the DesktopEntryName from now on.
@@ -154,7 +154,7 @@ bool FilterMgr::init(KConfig *config, const QString& /*configGroup*/)
* Also useful for hints about how to do the filtering.
* @return Converted text.
*/
-QString FilterMgr::convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId)
+TQString FilterMgr::convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId)
{
m_text = inputText;
m_talkerCode = talkerCode;
@@ -180,7 +180,7 @@ QString FilterMgr::convert(const QString& inputText, TalkerCode* talkerCode, con
* When the input text has been converted, filteringFinished signal will be emitted
* and caller can retrieve using getOutput();
*/
-bool FilterMgr::asyncConvert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId)
+bool FilterMgr::asyncConvert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId)
{
m_text = inputText;
m_talkerCode = talkerCode;
@@ -202,7 +202,7 @@ void FilterMgr::nextFilter()
{
m_text = m_filterProc->getOutput();
m_filterProc->ackFinished();
- disconnect( m_filterProc, SIGNAL(filteringFinished()), this, SLOT(slotFilteringFinished()) );
+ disconnect( m_filterProc, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotFilteringFinished()) );
}
// if ( m_filterProc->wasModified() )
// kdDebug() << "FilterMgr::nextFilter: Filter# " << m_filterIndex << " modified the text." << endl;
@@ -210,8 +210,8 @@ void FilterMgr::nextFilter()
{
m_state = fsFinished;
// Post an event which will be later emitted as a signal.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 301);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 301);
+ TQApplication::postEvent(this, ev);
return;
}
}
@@ -220,8 +220,8 @@ void FilterMgr::nextFilter()
{
m_state = fsFinished;
// Post an event which will be later emitted as a signal.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 301);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 301);
+ TQApplication::postEvent(this, ev);
return;
}
m_filterProc = m_filterList.at(m_filterIndex);
@@ -229,8 +229,8 @@ void FilterMgr::nextFilter()
{
m_state = fsFinished;
// Post an event which will be later emitted as a signal.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 301);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 301);
+ TQApplication::postEvent(this, ev);
return;
}
m_filterProc->setSbRegExp( m_re );
@@ -239,10 +239,10 @@ void FilterMgr::nextFilter()
if ( m_filterProc->supportsAsync() )
{
// kdDebug() << "FilterMgr::nextFilter: calling asyncConvert on filter " << m_filterIndex << endl;
- connect( m_filterProc, SIGNAL(filteringFinished()), this, SLOT(slotFilteringFinished()) );
+ connect( m_filterProc, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotFilteringFinished()) );
if ( !m_filterProc->asyncConvert( m_text, m_talkerCode, m_appId ) )
{
- disconnect( m_filterProc, SIGNAL(filteringFinished()), this, SLOT(slotFilteringFinished()) );
+ disconnect( m_filterProc, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotFilteringFinished()) );
m_filterProc = 0;
nextFilter();
}
@@ -261,15 +261,15 @@ void FilterMgr::slotFilteringFinished()
nextFilter();
}
-bool FilterMgr::event ( QEvent * e )
+bool FilterMgr::event ( TQEvent * e )
{
- if ( e->type() == (QEvent::User + 301) )
+ if ( e->type() == (TQEvent::User + 301) )
{
// kdDebug() << "FilterMgr::event: emitting filteringFinished signal." << endl;
emit filteringFinished();
return true;
}
- if ( e->type() == (QEvent::User + 302) )
+ if ( e->type() == (TQEvent::User + 302) )
{
// kdDebug() << "FilterMgr::event: emitting filteringStopped signal." << endl;
emit filteringStopped();
@@ -284,7 +284,7 @@ bool FilterMgr::event ( QEvent * e )
void FilterMgr::waitForFinished()
{
if ( m_state != fsFiltering ) return;
- disconnect(m_filterProc, SIGNAL(filteringFinished()), this, SLOT(slotFilteringFinished()) );
+ disconnect(m_filterProc, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotFilteringFinished()) );
m_async = false;
m_filterProc->waitForFinished();
while ( m_state == fsFiltering )
@@ -299,7 +299,7 @@ int FilterMgr::getState() { return m_state; }
/**
* Returns the filtered output.
*/
-QString FilterMgr::getOutput()
+TQString FilterMgr::getOutput()
{
return m_text;
}
@@ -310,7 +310,7 @@ QString FilterMgr::getOutput()
void FilterMgr::ackFinished()
{
m_state = fsIdle;
- m_text = QString::null;
+ m_text = TQString::null;
}
/**
@@ -321,11 +321,11 @@ void FilterMgr::stopFiltering()
{
if ( m_state != fsFiltering ) return;
if ( m_async )
- disconnect( m_filterProc, SIGNAL(filteringFinished()), this, SLOT(slotFilteringFinished()) );
+ disconnect( m_filterProc, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotFilteringFinished()) );
m_filterProc->stopFiltering();
m_state = fsIdle;
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 302);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 302);
+ TQApplication::postEvent(this, ev);
}
/**
@@ -334,7 +334,7 @@ void FilterMgr::stopFiltering()
*
* @param re The sentence delimiter regular expression.
*/
-/*virtual*/ void FilterMgr::setSbRegExp(const QString& re)
+/*virtual*/ void FilterMgr::setSbRegExp(const TQString& re)
{
m_re = re;
}
@@ -346,13 +346,13 @@ void FilterMgr::setNoSBD(bool noSBD) { m_noSBD = noSBD; }
bool FilterMgr::noSBD() { return m_noSBD; }
// Loads the processing plug in for a filter plug in given its DesktopEntryName.
-KttsFilterProc* FilterMgr::loadFilterPlugin(const QString& desktopEntryName)
+KttsFilterProc* FilterMgr::loadFilterPlugin(const TQString& desktopEntryName)
{
// kdDebug() << "FilterMgr::loadFilterPlugin: Running"<< endl;
// Find the plugin.
KTrader::OfferList offers = KTrader::self()->query("KTTSD/FilterPlugin",
- QString("DesktopEntryName == '%1'").arg(desktopEntryName));
+ TQString("DesktopEntryName == '%1'").arg(desktopEntryName));
if (offers.count() == 1)
{
@@ -366,7 +366,7 @@ KttsFilterProc* FilterMgr::loadFilterPlugin(const QString& desktopEntryName)
KttsFilterProc *plugIn =
KParts::ComponentFactory::createInstanceFromLibrary<KttsFilterProc>(
offers[0]->library().latin1(), NULL, offers[0]->library().latin1(),
- QStringList(), &errorNo);
+ TQStringList(), &errorNo);
if(plugIn){
// If everything went ok, return the plug in pointer.
return plugIn;
@@ -392,14 +392,14 @@ KttsFilterProc* FilterMgr::loadFilterPlugin(const QString& desktopEntryName)
* Uses KTrader to convert a translated Filter Plugin Name to DesktopEntryName.
* @param name The translated plugin name. From Name= line in .desktop file.
* @return DesktopEntryName. The name of the .desktop file (less .desktop).
- * QString::null if not found.
+ * TQString::null if not found.
*/
-QString FilterMgr::FilterNameToDesktopEntryName(const QString& name)
+TQString FilterMgr::FilterNameToDesktopEntryName(const TQString& name)
{
- if (name.isEmpty()) return QString::null;
+ if (name.isEmpty()) return TQString::null;
KTrader::OfferList offers = KTrader::self()->query("KTTSD/FilterPlugin");
for (uint ndx = 0; ndx < offers.count(); ++ndx)
if (offers[ndx]->name() == name) return offers[ndx]->desktopEntryName();
- return QString::null;
+ return TQString::null;
}
diff --git a/kttsd/kttsd/filtermgr.h b/kttsd/kttsd/filtermgr.h
index d909128..2a8ea23 100644
--- a/kttsd/kttsd/filtermgr.h
+++ b/kttsd/kttsd/filtermgr.h
@@ -27,7 +27,7 @@
#define _FILTERMGR_H_
// Qt includes.
-#include <qptrlist.h>
+#include <tqptrlist.h>
// KTTS includes.
#include "filterproc.h"
@@ -35,7 +35,7 @@
class KConfig;
class TalkerCode;
-typedef QPtrList<KttsFilterProc> FilterList;
+typedef TQPtrList<KttsFilterProc> FilterList;
class FilterMgr : public KttsFilterProc
{
@@ -45,7 +45,7 @@ class FilterMgr : public KttsFilterProc
/**
* Constructor.
*/
- FilterMgr(QObject *parent = 0, const char *name = 0);
+ FilterMgr(TQObject *parent = 0, const char *name = 0);
/**
* Destructor.
@@ -61,7 +61,7 @@ class FilterMgr : public KttsFilterProc
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Returns True if this filter is a Sentence Boundary Detector.
@@ -92,7 +92,7 @@ class FilterMgr : public KttsFilterProc
* Also useful for hints about how to do the filtering.
* @return Converted text.
*/
- virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId);
+ virtual TQString convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId);
/**
* Asynchronously convert input.
@@ -106,7 +106,7 @@ class FilterMgr : public KttsFilterProc
* When the input text has been converted, filteringFinished signal will be emitted
* and caller can retrieve using getOutput();
*/
- virtual bool asyncConvert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId);
+ virtual bool asyncConvert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId);
/**
* Waits for filtering to finish.
@@ -121,7 +121,7 @@ class FilterMgr : public KttsFilterProc
/**
* Returns the filtered output.
*/
- virtual QString getOutput();
+ virtual TQString getOutput();
/**
* Acknowledges the finished filtering.
@@ -140,7 +140,7 @@ class FilterMgr : public KttsFilterProc
*
* @param re The sentence delimiter regular expression.
*/
- virtual void setSbRegExp(const QString& re);
+ virtual void setSbRegExp(const TQString& re);
/**
* Do not call SBD filters.
@@ -154,26 +154,26 @@ class FilterMgr : public KttsFilterProc
bool supportsHTML() { return m_supportsHTML; }
protected:
- bool event ( QEvent * e );
+ bool event ( TQEvent * e );
private slots:
void slotFilteringFinished();
private:
// Loads the processing plug in for a named filter plug in.
- KttsFilterProc* loadFilterPlugin(const QString& plugInName);
+ KttsFilterProc* loadFilterPlugin(const TQString& plugInName);
// Finishes up with current filter (if any) and goes on to the next filter.
void nextFilter();
// Uses KTrader to convert a translated Filter Plugin Name to DesktopEntryName.
// @param name The translated plugin name. From Name= line in .desktop file.
// @return DesktopEntryName. The name of the .desktop file (less .desktop).
- // QString::null if not found.
- QString FilterNameToDesktopEntryName(const QString& name);
+ // TQString::null if not found.
+ TQString FilterNameToDesktopEntryName(const TQString& name);
// List of filters.
FilterList m_filterList;
// Text being filtered.
- QString m_text;
+ TQString m_text;
// Index to list of filters.
int m_filterIndex;
// Current filter.
@@ -183,9 +183,9 @@ class FilterMgr : public KttsFilterProc
// Talker Code.
TalkerCode* m_talkerCode;
// AppId.
- QCString m_appId;
+ TQCString m_appId;
// Sentence Boundary regular expression (if app overrode the default).
- QString m_re;
+ TQString m_re;
// True if any of the filters modified the text.
bool m_wasModified;
// FilterMgr state.
diff --git a/kttsd/kttsd/kttsd.cpp b/kttsd/kttsd/kttsd.cpp
index 9ee841f..5a643a1 100644
--- a/kttsd/kttsd/kttsd.cpp
+++ b/kttsd/kttsd/kttsd.cpp
@@ -19,11 +19,11 @@
***************************************************************************/
// Qt includes.
-#include <qcstring.h>
-#include <qclipboard.h>
-#include <qtextstream.h>
-#include <qtextcodec.h>
-#include <qfile.h>
+#include <tqcstring.h>
+#include <tqclipboard.h>
+#include <tqtextstream.h>
+#include <tqtextcodec.h>
+#include <tqfile.h>
// KDE includes.
#include <kdebug.h>
@@ -49,9 +49,9 @@
* Note that most of the real tts work occurs in Speaker.
*/
-KTTSD::KTTSD(const QCString& objId, QObject *parent, const char *name) :
+KTTSD::KTTSD(const TQCString& objId, TQObject *parent, const char *name) :
DCOPObject(objId),
- QObject(parent, name)
+ TQObject(parent, name)
{
// kdDebug() << "KTTSD::KTTSD Running" << endl;
m_speaker = 0;
@@ -69,17 +69,17 @@ bool KTTSD::initializeSpeechData()
if (!m_speechData)
{
m_speechData = new SpeechData();
- connect (m_speechData, SIGNAL(textSet(const QCString&, const uint)),
- this, SLOT(slotTextSet(const QCString&, const uint)));
- connect (m_speechData, SIGNAL(textAppended(const QCString&, const uint, const int)),
- this, SLOT(slotTextAppended(const QCString&, const uint, const int)));
- connect (m_speechData, SIGNAL(textRemoved(const QCString&, const uint)),
- this, SLOT(slotTextRemoved(const QCString&, const uint)));
+ connect (m_speechData, TQT_SIGNAL(textSet(const TQCString&, const uint)),
+ this, TQT_SLOT(slotTextSet(const TQCString&, const uint)));
+ connect (m_speechData, TQT_SIGNAL(textAppended(const TQCString&, const uint, const int)),
+ this, TQT_SLOT(slotTextAppended(const TQCString&, const uint, const int)));
+ connect (m_speechData, TQT_SIGNAL(textRemoved(const TQCString&, const uint)),
+ this, TQT_SLOT(slotTextRemoved(const TQCString&, const uint)));
// Hook KNotify signal.
if (!connectDCOPSignal(0, 0,
- "notifySignal(QString,QString,QString,QString,QString,int,int,int,int)",
- "notificationSignal(QString,QString,QString,QString,QString,int,int,int,int)",
+ "notifySignal(TQString,TQString,TQString,TQString,TQString,int,int,int,int)",
+ "notificationSignal(TQString,TQString,TQString,TQString,TQString,int,int,int,int)",
false)) kdDebug() << "KTTSD:initializeSpeechData: connectDCOPSignal for knotify failed" << endl;
}
// Load configuration.
@@ -103,7 +103,7 @@ bool KTTSD::initializeTalkerMgr()
// desktop language, but if that fails, fallback to English.
if (load < 0)
{
- QString languageCode = KGlobal::locale()->language();
+ TQString languageCode = KGlobal::locale()->language();
if (m_talkerMgr->autoconfigureTalker(languageCode, m_speechData->config))
load = m_talkerMgr->loadPlugIns(m_speechData->config);
else
@@ -124,7 +124,7 @@ bool KTTSD::initializeTalkerMgr()
m_speechData = 0;
kdDebug() << "KTTSD::initializeTalkerMgr: no Talkers have been configured." << endl;
// Ask if user would like to run configuration dialog, but don't bug user unnecessarily.
- QString dontAskConfigureKTTS = "DontAskConfigureKTTS";
+ TQString dontAskConfigureKTTS = "DontAskConfigureKTTS";
KMessageBox::ButtonCode msgResult;
if (KMessageBox::shouldBeShownYesNo(dontAskConfigureKTTS, msgResult))
{
@@ -156,20 +156,20 @@ bool KTTSD::initializeSpeaker()
// Create speaker object and load plug ins, checking for the return
m_speaker = new Speaker(m_speechData, m_talkerMgr);
- connect (m_speaker, SIGNAL(textStarted(const QCString&, const uint)),
- this, SLOT(slotTextStarted(const QCString&, const uint)));
- connect (m_speaker, SIGNAL(textFinished(const QCString&, const uint)),
- this, SLOT(slotTextFinished(const QCString&, const uint)));
- connect (m_speaker, SIGNAL(textResumed(const QCString&, const uint)),
- this, SLOT(slotTextResumed(const QCString&, const uint)));
- connect (m_speaker, SIGNAL(sentenceStarted(QString, QString, const QCString&, const uint, const uint)),
- this, SLOT(slotSentenceStarted(QString, QString, const QCString&, const uint, const uint)));
- connect (m_speaker, SIGNAL(sentenceFinished(const QCString&, const uint, const uint)), this,
- SLOT(slotSentenceFinished(const QCString&, const uint, const uint)));
- connect (m_speaker, SIGNAL(textStopped(const QCString&, const uint)),
- this, SLOT(slotTextStopped(const QCString&, const uint)));
- connect (m_speaker, SIGNAL(textPaused(const QCString&, const uint)),
- this, SLOT(slotTextPaused(const QCString&, const uint)));
+ connect (m_speaker, TQT_SIGNAL(textStarted(const TQCString&, const uint)),
+ this, TQT_SLOT(slotTextStarted(const TQCString&, const uint)));
+ connect (m_speaker, TQT_SIGNAL(textFinished(const TQCString&, const uint)),
+ this, TQT_SLOT(slotTextFinished(const TQCString&, const uint)));
+ connect (m_speaker, TQT_SIGNAL(textResumed(const TQCString&, const uint)),
+ this, TQT_SLOT(slotTextResumed(const TQCString&, const uint)));
+ connect (m_speaker, TQT_SIGNAL(sentenceStarted(TQString, TQString, const TQCString&, const uint, const uint)),
+ this, TQT_SLOT(slotSentenceStarted(TQString, TQString, const TQCString&, const uint, const uint)));
+ connect (m_speaker, TQT_SIGNAL(sentenceFinished(const TQCString&, const uint, const uint)), this,
+ TQT_SLOT(slotSentenceFinished(const TQCString&, const uint, const uint)));
+ connect (m_speaker, TQT_SIGNAL(textStopped(const TQCString&, const uint)),
+ this, TQT_SLOT(slotTextStopped(const TQCString&, const uint)));
+ connect (m_speaker, TQT_SIGNAL(textPaused(const TQCString&, const uint)),
+ this, TQT_SLOT(slotTextPaused(const TQCString&, const uint)));
return true;
}
@@ -199,7 +199,7 @@ KTTSD::~KTTSD(){
* talker supports the indicated speech markup language.
* @see kttsdMarkupType
*/
-bool KTTSD::supportsMarkup(const QString& talker /*=NULL*/, const uint markupType /*=0*/) const
+bool KTTSD::supportsMarkup(const TQString& talker /*=NULL*/, const uint markupType /*=0*/) const
{
if (markupType == KSpeech::mtHtml)
{
@@ -219,7 +219,7 @@ bool KTTSD::supportsMarkup(const QString& talker /*=NULL*/, const uint markupTyp
* talker supports markers.
* TODO: Waiting on plugin API.
*/
-bool KTTSD::supportsMarkers(const QString& /*talker=NULL*/) const { return false; }
+bool KTTSD::supportsMarkers(const TQString& /*talker=NULL*/) const { return false; }
/**
* Say a message as soon as possible, interrupting any other speech in progress.
@@ -234,7 +234,7 @@ bool KTTSD::supportsMarkers(const QString& /*talker=NULL*/) const { return false
* If an existing Screen Reader output is in progress, it is stopped and discarded and
* replaced with this new message.
*/
-void KTTSD::sayScreenReaderOutput(const QString &msg, const QString &talker /*=NULL*/)
+void KTTSD::sayScreenReaderOutput(const TQString &msg, const TQString &talker /*=NULL*/)
{
if (!m_speaker) return;
m_speechData->setScreenReaderOutput(msg, fixNullString(talker), getAppId());
@@ -252,7 +252,7 @@ void KTTSD::sayScreenReaderOutput(const QString &msg, const QString &talker /*=N
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
-void KTTSD::sayWarning(const QString &warning, const QString &talker /*=NULL*/){
+void KTTSD::sayWarning(const TQString &warning, const TQString &talker /*=NULL*/){
// kdDebug() << "KTTSD::sayWarning: Running" << endl;
if (!m_speaker) return;
kdDebug() << "KTTSD::sayWarning: Adding '" << warning << "' to warning queue." << endl;
@@ -271,7 +271,7 @@ void KTTSD::sayWarning(const QString &warning, const QString &talker /*=NULL*/){
* If no talker has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
-void KTTSD::sayMessage(const QString &message, const QString &talker /*=NULL*/)
+void KTTSD::sayMessage(const TQString &message, const TQString &talker /*=NULL*/)
{
// kdDebug() << "KTTSD::sayMessage: Running" << endl;
if (!m_speaker) return;
@@ -294,7 +294,7 @@ void KTTSD::sayMessage(const QString &message, const QString &talker /*=NULL*/)
* Changing the sentence delimiter does not affect other applications.
* @see sentenceparsing
*/
-void KTTSD::setSentenceDelimiter(const QString &delimiter)
+void KTTSD::setSentenceDelimiter(const TQString &delimiter)
{
if (!m_speaker) return;
m_speechData->setSentenceDelimiter(fixNullString(delimiter), getAppId());
@@ -322,7 +322,7 @@ void KTTSD::setSentenceDelimiter(const QString &delimiter)
* @see getTextCount
* @see startText
*/
-uint KTTSD::setText(const QString &text, const QString &talker /*=NULL*/)
+uint KTTSD::setText(const TQString &text, const TQString &talker /*=NULL*/)
{
// kdDebug() << "KTTSD::setText: Running" << endl;
if (!m_speaker) return 0;
@@ -359,7 +359,7 @@ uint KTTSD::setText(const QString &text, const QString &talker /*=NULL*/)
*
* @since KDE 3.5
*/
-uint KTTSD::sayText(const QString &text, const QString &talker)
+uint KTTSD::sayText(const TQString &text, const TQString &talker)
{
uint jobNum = setText(text, talker);
if (jobNum) startText(jobNum);
@@ -381,7 +381,7 @@ uint KTTSD::sayText(const QString &text, const QString &talker)
* @see setText.
* @see startText.
*/
-int KTTSD::appendText(const QString &text, const uint jobNum /*=0*/)
+int KTTSD::appendText(const TQString &text, const uint jobNum /*=0*/)
{
if (!m_speaker) return 0;
return m_speechData->appendText(text, applyDefaultJobNum(jobNum), getAppId());
@@ -411,20 +411,20 @@ int KTTSD::appendText(const QString &text, const uint jobNum /*=0*/)
* @see getTextCount
* @see startText
*/
-uint KTTSD::setFile(const QString &filename, const QString &talker /*=NULL*/,
- const QString &encoding /*=NULL*/)
+uint KTTSD::setFile(const TQString &filename, const TQString &talker /*=NULL*/,
+ const TQString &encoding /*=NULL*/)
{
// kdDebug() << "KTTSD::setFile: Running" << endl;
if (!m_speaker) return 0;
- QFile file(filename);
+ TQFile file(filename);
uint jobNum = 0;
if ( file.open(IO_ReadOnly) )
{
- QTextStream stream(&file);
- QString enc = fixNullString(encoding);
+ TQTextStream stream(&file);
+ TQString enc = fixNullString(encoding);
if (!enc.isEmpty())
{
- QTextCodec* codec = QTextCodec::codecForName(enc.latin1());
+ TQTextCodec* codec = TQTextCodec::codecForName(enc.latin1());
if (codec) stream.setCodec(codec);
}
jobNum = m_speechData->setText(stream.read(), fixNullString(talker), getAppId());
@@ -477,9 +477,9 @@ uint KTTSD::getTextJobCount()
* Get a comma-separated list of text job numbers in the queue.
* @return Comma-separated list of text job numbers in the queue.
*/
-QString KTTSD::getTextJobNumbers()
+TQString KTTSD::getTextJobNumbers()
{
- if (!m_speaker) return QString::null;
+ if (!m_speaker) return TQString::null;
return m_speechData->getTextJobNumbers();
}
@@ -501,23 +501,23 @@ int KTTSD::getTextJobState(const uint jobNum /*=0*/)
* Get information about a text job.
* @param jobNum Job number of the text job.
* If zero, applies to the last job queued by the application.
-* @return A QDataStream containing information about the job.
+* @return A TQDataStream containing information about the job.
* Blank if no such job.
*
* The stream contains the following elements:
* - int state Job state.
-* - QCString appId DCOP senderId of the application that requested the speech job.
-* - QString talker Language code in which to speak the text.
+* - TQCString appId DCOP senderId of the application that requested the speech job.
+* - TQString talker Language code in which to speak the text.
* - int seq Current sentence being spoken. Sentences are numbered starting at 1.
* - int sentenceCount Total number of sentences in the job.
*
* The following sample code will decode the stream:
@verbatim
- QByteArray jobInfo = getTextJobInfo(jobNum);
- QDataStream stream(jobInfo, IO_ReadOnly);
+ TQByteArray jobInfo = getTextJobInfo(jobNum);
+ TQDataStream stream(jobInfo, IO_ReadOnly);
int state;
- QCString appId;
- QString talker;
+ TQCString appId;
+ TQString talker;
int seq;
int sentenceCount;
stream >> state;
@@ -527,7 +527,7 @@ int KTTSD::getTextJobState(const uint jobNum /*=0*/)
stream >> sentenceCount;
@endverbatim
*/
-QByteArray KTTSD::getTextJobInfo(const uint jobNum /*=0*/)
+TQByteArray KTTSD::getTextJobInfo(const uint jobNum /*=0*/)
{
return m_speechData->getTextJobInfo(applyDefaultJobNum(jobNum));
}
@@ -538,9 +538,9 @@ QByteArray KTTSD::getTextJobInfo(const uint jobNum /*=0*/)
* @param talkerCode Talker Code.
* @return Talker ID of the talker that would speak the text job.
*/
-QString KTTSD::talkerCodeToTalkerId(const QString& talkerCode)
+TQString KTTSD::talkerCodeToTalkerId(const TQString& talkerCode)
{
- if (!m_talkerMgr) return QString::null;
+ if (!m_talkerMgr) return TQString::null;
return m_talkerMgr->talkerCodeToTalkerId(fixNullString(talkerCode));
}
@@ -552,7 +552,7 @@ QString KTTSD::talkerCodeToTalkerId(const QString& talkerCode)
* @return The specified sentence in the specified job. If no such
* job or sentence, returns "".
*/
-QString KTTSD::getTextJobSentence(const uint jobNum /*=0*/, const uint seq /*=1*/)
+TQString KTTSD::getTextJobSentence(const uint jobNum /*=0*/, const uint seq /*=1*/)
{
return m_speechData->getTextJobSentence(applyDefaultJobNum(jobNum), seq);
}
@@ -616,7 +616,7 @@ void KTTSD::startText(const uint jobNum /*=0*/)
// Do not start KTTSMgr unless at least 5 sentences are queued.
if (getTextCount(jNum) > 4)
{
- QString cmd = "kttsmgr --systray";
+ TQString cmd = "kttsmgr --systray";
if (m_speechData->autoExitManager) cmd.append(" --autoexit");
// Notice this fails if KTTSMgr is already running, which is what we want.
KRun::runCommand(cmd);
@@ -694,14 +694,14 @@ void KTTSD::resumeText(const uint jobNum /*=0*/)
/**
* Get a list of the talkers configured in KTTS.
-* @return A QStringList of fully-specified talker codes, one
+* @return A TQStringList of fully-specified talker codes, one
* for each talker user has configured.
*
* @see talkers
*/
-QStringList KTTSD::getTalkers()
+TQStringList KTTSD::getTalkers()
{
- if (!m_talkerMgr) return QStringList();
+ if (!m_talkerMgr) return TQStringList();
return m_talkerMgr->getTalkers();
}
@@ -714,7 +714,7 @@ QStringList KTTSD::getTalkers()
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
-void KTTSD::changeTextTalker(const QString &talker, uint jobNum)
+void KTTSD::changeTextTalker(const TQString &talker, uint jobNum)
{
m_speechData->changeTextTalker(fixNullString(talker), applyDefaultJobNum(jobNum));
}
@@ -726,9 +726,9 @@ void KTTSD::changeTextTalker(const QString &talker, uint jobNum)
* @see talkers
* @see getTalkers
*/
-QString KTTSD::userDefaultTalker()
+TQString KTTSD::userDefaultTalker()
{
- if (!m_talkerMgr) return QString::null;
+ if (!m_talkerMgr) return TQString::null;
return m_talkerMgr->userDefaultTalker();
}
@@ -793,7 +793,7 @@ void KTTSD::speakClipboard()
QClipboard *cb = kapp->clipboard();
// Copy text from the clipboard.
- QString text = cb->text();
+ TQString text = cb->text();
// Speak it.
if ( !text.isNull() )
@@ -847,7 +847,7 @@ void KTTSD::reinit()
/**
* Return KTTSD daemon version number.
*/
-QString KTTSD::version() { return kapp->aboutData()->version(); }
+TQString KTTSD::version() { return kapp->aboutData()->version(); }
/*
* Checks if KTTSD is ready to speak and at least one talker is configured.
@@ -877,8 +877,8 @@ void KTTSD::configCommitted() {
* default_presentation contains these ORed events: None=0, Sound=1, Messagebox=2, Logfile=4, Stderr=8,
* PassivePopup=16, Execute=32, Taskbar=64
*/
-void KTTSD::notificationSignal( const QString& event, const QString& fromApp,
- const QString &text, const QString& sound, const QString& /*file*/,
+void KTTSD::notificationSignal( const TQString& event, const TQString& fromApp,
+ const TQString &text, const TQString& sound, const TQString& /*file*/,
const int present, const int /*level*/, const int /*windId*/, const int /*eventId*/)
{
if (!m_speaker) return;
@@ -890,8 +890,8 @@ void KTTSD::notificationSignal( const QString& event, const QString& fromApp,
{
bool found = false;
NotifyOptions notifyOptions;
- QString msg;
- QString talker;
+ TQString msg;
+ TQString talker;
// Check for app-specific action.
if ( m_speechData->notifyAppMap.contains( fromApp ) )
{
@@ -906,7 +906,7 @@ void KTTSD::notificationSignal( const QString& event, const QString& fromApp,
{
found = true;
notifyOptions = notifyEventMap[ "default" ];
- notifyOptions.eventName = QString::null;
+ notifyOptions.eventName = TQString::null;
}
}
}
@@ -980,7 +980,7 @@ void KTTSD::notificationSignal( const QString& event, const QString& fromApp,
// Queue msg if we should speak something.
if ( !msg.isEmpty() )
{
- QString fromApps = fromApp + ",knotify";
+ TQString fromApps = fromApp + ",knotify";
m_speechData->enqueueMessage( msg, talker, fromApps.utf8() );
m_speaker->doUtterances();
}
@@ -988,65 +988,65 @@ void KTTSD::notificationSignal( const QString& event, const QString& fromApp,
}
// Slots for the speaker object
-void KTTSD::slotSentenceStarted(QString, QString, const QCString& appId,
+void KTTSD::slotSentenceStarted(TQString, TQString, const TQCString& appId,
const uint jobNum, const uint seq) {
// Emit DCOP signal.
kdDebug() << "KTTSD::slotSentenceStarted: Emitting DCOP signal sentenceStarted with appId " << appId << " job number " << jobNum << " seq number " << seq << endl;
sentenceStarted(appId, jobNum, seq);
}
-void KTTSD::slotSentenceFinished(const QCString& appId, const uint jobNum, const uint seq){
+void KTTSD::slotSentenceFinished(const TQCString& appId, const uint jobNum, const uint seq){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotSentenceFinished: Emitting DCOP signal sentenceFinished with appId " << appId << " job number " << jobNum << " seq number " << seq << endl;
sentenceFinished(appId, jobNum, seq);
}
// Slots for the speechData and speaker objects.
-void KTTSD::slotTextStarted(const QCString& appId, const uint jobNum){
+void KTTSD::slotTextStarted(const TQCString& appId, const uint jobNum){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotTextStarted: Emitting DCOP signal textStarted with appId " << appId << " job number " << jobNum << endl;
textStarted(appId, jobNum);
}
-void KTTSD::slotTextFinished(const QCString& appId, const uint jobNum){
+void KTTSD::slotTextFinished(const TQCString& appId, const uint jobNum){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotTextFinished: Emitting DCOP signal textFinished with appId " << appId << " job number " << jobNum << endl;
textFinished(appId, jobNum);
}
-void KTTSD::slotTextStopped(const QCString& appId, const uint jobNum){
+void KTTSD::slotTextStopped(const TQCString& appId, const uint jobNum){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotTextStopped: Emitting DCOP signal textStopped with appId " << appId << " job number " << jobNum << endl;
textStopped(appId, jobNum);
}
-void KTTSD::slotTextPaused(const QCString& appId, const uint jobNum){
+void KTTSD::slotTextPaused(const TQCString& appId, const uint jobNum){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotTextPaused: Emitting DCOP signal textPaused with appId " << appId << " job number " << jobNum << endl;
textPaused(appId, jobNum);
}
-void KTTSD::slotTextResumed(const QCString& appId, const uint jobNum){
+void KTTSD::slotTextResumed(const TQCString& appId, const uint jobNum){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotTextResumed: Emitting DCOP signal textResumed with appId " << appId << " job number " << jobNum << endl;
textResumed(appId, jobNum);
}
-//void KTTSD::slotTextSet(const QCString& appId, const uint jobNum){
-void KTTSD::slotTextSet(const QCString& appId, const uint jobNum){
+//void KTTSD::slotTextSet(const TQCString& appId, const uint jobNum){
+void KTTSD::slotTextSet(const TQCString& appId, const uint jobNum){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotTextSet: Emitting DCOP signal textSet with appId " << appId << " job number " << jobNum << endl;
textSet(appId, jobNum);
}
-void KTTSD::slotTextAppended(const QCString& appId, const uint jobNum, const int partNum){
+void KTTSD::slotTextAppended(const TQCString& appId, const uint jobNum, const int partNum){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotTextAppended: Emitting DCOP signal textAppended with appId " <<
appId << " job number " << jobNum << " part number " << partNum << endl;
textAppended(appId, jobNum, partNum);
}
-void KTTSD::slotTextRemoved(const QCString& appId, const uint jobNum){
+void KTTSD::slotTextRemoved(const TQCString& appId, const uint jobNum){
// Emit DCOP signal.
kdDebug() << "KTTSD::slotTextRemoved: Emitting DCOP signal textRemoved with appId " << appId << " job number " << jobNum << endl;
textRemoved(appId, jobNum);
@@ -1056,10 +1056,10 @@ void KTTSD::slotTextRemoved(const QCString& appId, const uint jobNum){
* Returns the senderId (appId) of the DCOP application that called us.
* @return The DCOP sendId of calling application.
*/
-const QCString KTTSD::getAppId()
+const TQCString KTTSD::getAppId()
{
DCOPClient* client = callingDcopClient();
- QCString appId;
+ TQCString appId;
if (client) appId = client->senderId();
return appId;
}
@@ -1084,21 +1084,21 @@ uint KTTSD::applyDefaultJobNum(const uint jobNum)
/*
* Fixes a string argument passed in via dcop.
-* If NULL or "0" return QString::null.
+* If NULL or "0" return TQString::null.
*/
-QString KTTSD::fixNullString(const QString &talker) const
+TQString KTTSD::fixNullString(const TQString &talker) const
{
- if (!talker) return QString::null;
- if (talker == "0") return QString::null;
+ if (!talker) return TQString::null;
+ if (talker == "0") return TQString::null;
return talker;
}
// kspeech is obsolete. Applications should use KSpeech instead.
// Constructor.
-kspeech::kspeech(const QCString& objId, QObject *parent, const char *name) :
+kspeech::kspeech(const TQCString& objId, TQObject *parent, const char *name) :
DCOPObject(objId),
- QObject(parent, name),
+ TQObject(parent, name),
m_kttsd("KSpeech")
{
}
@@ -1107,26 +1107,26 @@ kspeech::kspeech(const QCString& objId, QObject *parent, const char *name) :
kspeech::~kspeech() { }
// Delegate all DCOP methods to KTTSD object.
-/*virtual*/ bool kspeech::supportsMarkup(const QString &talker, uint markupType) const
+/*virtual*/ bool kspeech::supportsMarkup(const TQString &talker, uint markupType) const
{ return m_kttsd.supportsMarkup(talker, markupType); }
-/*virtual*/ bool kspeech::supportsMarkers(const QString &talker) const
+/*virtual*/ bool kspeech::supportsMarkers(const TQString &talker) const
{ return m_kttsd.supportsMarkers(talker); }
-/*virtual*/ ASYNC kspeech::sayScreenReaderOutput(const QString &msg, const QString &talker)
+/*virtual*/ ASYNC kspeech::sayScreenReaderOutput(const TQString &msg, const TQString &talker)
{ m_kttsd.sayScreenReaderOutput(msg, talker); }
-/*virtual*/ ASYNC kspeech::sayWarning(const QString &warning, const QString &talker)
+/*virtual*/ ASYNC kspeech::sayWarning(const TQString &warning, const TQString &talker)
{ m_kttsd.sayWarning(warning, talker); }
-/*virtual*/ ASYNC kspeech::sayMessage(const QString &message, const QString &talker)
+/*virtual*/ ASYNC kspeech::sayMessage(const TQString &message, const TQString &talker)
{ m_kttsd.sayMessage(message, talker); }
-/*virtual*/ ASYNC kspeech::setSentenceDelimiter(const QString &delimiter)
+/*virtual*/ ASYNC kspeech::setSentenceDelimiter(const TQString &delimiter)
{ m_kttsd.setSentenceDelimiter(delimiter); }
-/*virtual*/ uint kspeech::setText(const QString &text, const QString &talker)
+/*virtual*/ uint kspeech::setText(const TQString &text, const TQString &talker)
{ return m_kttsd.setText(text, talker); }
-/*virtual*/ uint kspeech::sayText(const QString &text, const QString &talker)
+/*virtual*/ uint kspeech::sayText(const TQString &text, const TQString &talker)
{ return m_kttsd.sayText(text, talker); }
-/*virtual*/ int kspeech::appendText(const QString &text, uint jobNum)
+/*virtual*/ int kspeech::appendText(const TQString &text, uint jobNum)
{ return m_kttsd.appendText(text, jobNum); }
-/*virtual*/ uint kspeech::setFile(const QString &filename, const QString &talker,
- const QString& encoding)
+/*virtual*/ uint kspeech::setFile(const TQString &filename, const TQString &talker,
+ const TQString& encoding)
{ return m_kttsd.setFile(filename, talker, encoding); }
/*virtual*/ int kspeech::getTextCount(uint jobNum)
{ return m_kttsd.getTextCount(jobNum); }
@@ -1134,15 +1134,15 @@ kspeech::~kspeech() { }
{ return m_kttsd.getCurrentTextJob(); }
/*virtual*/ uint kspeech::getTextJobCount()
{ return m_kttsd.getTextJobCount(); }
-/*virtual*/ QString kspeech::getTextJobNumbers()
+/*virtual*/ TQString kspeech::getTextJobNumbers()
{ return m_kttsd.getTextJobNumbers(); }
/*virtual*/ int kspeech::getTextJobState(uint jobNum)
{ return m_kttsd.getTextJobState(jobNum); }
-/*virtual*/ QByteArray kspeech::getTextJobInfo(uint jobNum)
+/*virtual*/ TQByteArray kspeech::getTextJobInfo(uint jobNum)
{ return m_kttsd.getTextJobInfo(jobNum); }
-/*virtual*/ QString kspeech::talkerCodeToTalkerId(const QString& talkerCode)
+/*virtual*/ TQString kspeech::talkerCodeToTalkerId(const TQString& talkerCode)
{ return m_kttsd.talkerCodeToTalkerId(talkerCode); }
-/*virtual*/ QString kspeech::getTextJobSentence(uint jobNum, uint seq)
+/*virtual*/ TQString kspeech::getTextJobSentence(uint jobNum, uint seq)
{ return m_kttsd.getTextJobSentence(jobNum, seq); }
/*virtual*/ bool kspeech::isSpeakingText() const
{ return m_kttsd.isSpeakingText(); }
@@ -1156,11 +1156,11 @@ kspeech::~kspeech() { }
{ m_kttsd.pauseText(jobNum); }
/*virtual*/ ASYNC kspeech::resumeText(uint jobNum)
{ m_kttsd.resumeText(jobNum); }
-/*virtual*/ QStringList kspeech::getTalkers()
+/*virtual*/ TQStringList kspeech::getTalkers()
{ return m_kttsd.getTalkers(); }
-/*virtual*/ ASYNC kspeech::changeTextTalker(const QString &talker, uint jobNum )
+/*virtual*/ ASYNC kspeech::changeTextTalker(const TQString &talker, uint jobNum )
{ m_kttsd.changeTextTalker(talker, jobNum); }
-/*virtual*/ QString kspeech::userDefaultTalker()
+/*virtual*/ TQString kspeech::userDefaultTalker()
{ return m_kttsd.userDefaultTalker(); }
/*virtual*/ ASYNC kspeech::moveTextLater(uint jobNum)
{ m_kttsd.moveTextLater(jobNum); }
@@ -1176,7 +1176,7 @@ kspeech::~kspeech() { }
{ m_kttsd.kttsdExit(); }
/*virtual*/ void kspeech::reinit()
{ m_kttsd.reinit(); }
-/*virtual*/ QString kspeech::version()
+/*virtual*/ TQString kspeech::version()
{ return m_kttsd.version(); }
#include "kttsd.moc"
diff --git a/kttsd/kttsd/kttsd.h b/kttsd/kttsd/kttsd.h
index bdbd756..075383b 100644
--- a/kttsd/kttsd/kttsd.h
+++ b/kttsd/kttsd/kttsd.h
@@ -36,7 +36,7 @@
* @author Gary Cramblitt <garycramblitt@comcast.net>
*/
-class KTTSD : public QObject, virtual public KSpeech
+class KTTSD : public TQObject, virtual public KSpeech
{
Q_OBJECT
K_DCOP
@@ -48,7 +48,7 @@ class KTTSD : public QObject, virtual public KSpeech
* Create objects, speechData and speaker.
* Start thread
*/
- KTTSD(const QCString& objId, QObject *parent=0, const char *name=0);
+ KTTSD(const TQCString& objId, TQObject *parent=0, const char *name=0);
/**
* Destructor.
@@ -68,7 +68,7 @@ class KTTSD : public QObject, virtual public KSpeech
* talker supports the indicated speech markup language.
* @see kttsdMarkupType
*/
- virtual bool supportsMarkup(const QString &talker=NULL, const uint markupType = 0) const;
+ virtual bool supportsMarkup(const TQString &talker=NULL, const uint markupType = 0) const;
/**
* Determine whether the currently-configured speech plugin supports markers in speech markup.
@@ -77,7 +77,7 @@ class KTTSD : public QObject, virtual public KSpeech
* @return True if the plugin currently configured for the indicated
* talker supports markers.
*/
- virtual bool supportsMarkers(const QString &talker=NULL) const;
+ virtual bool supportsMarkers(const TQString &talker=NULL) const;
/**
* Say a message as soon as possible, interrupting any other speech in progress.
@@ -92,7 +92,7 @@ class KTTSD : public QObject, virtual public KSpeech
* If an existing Screen Reader output is in progress, it is stopped and discarded and
* replaced with this new message.
*/
- virtual ASYNC sayScreenReaderOutput(const QString &msg, const QString &talker=NULL);
+ virtual ASYNC sayScreenReaderOutput(const TQString &msg, const TQString &talker=NULL);
/**
* Say a warning. The warning will be spoken when the current sentence
@@ -105,7 +105,7 @@ class KTTSD : public QObject, virtual public KSpeech
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
- virtual ASYNC sayWarning(const QString &warning, const QString &talker=NULL);
+ virtual ASYNC sayWarning(const TQString &warning, const TQString &talker=NULL);
/**
* Say a message. The message will be spoken when the current sentence stops speaking
@@ -118,7 +118,7 @@ class KTTSD : public QObject, virtual public KSpeech
* If no talker has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
- virtual ASYNC sayMessage(const QString &message, const QString &talker=NULL);
+ virtual ASYNC sayMessage(const TQString &message, const TQString &talker=NULL);
/**
* Sets the GREP pattern that will be used as the sentence delimiter.
@@ -134,7 +134,7 @@ class KTTSD : public QObject, virtual public KSpeech
* Changing the sentence delimiter does not affect other applications.
* @see sentenceparsing
*/
- virtual ASYNC setSentenceDelimiter(const QString &delimiter);
+ virtual ASYNC setSentenceDelimiter(const TQString &delimiter);
/**
* Queue a text job. Does not start speaking the text.
@@ -158,7 +158,7 @@ class KTTSD : public QObject, virtual public KSpeech
* @see getTextCount
* @see startText
*/
- virtual uint setText(const QString &text, const QString &talker=NULL);
+ virtual uint setText(const TQString &text, const TQString &talker=NULL);
/**
* Say a plain text job. This is a convenience method that
@@ -188,7 +188,7 @@ class KTTSD : public QObject, virtual public KSpeech
*
* @since KDE 3.5
*/
- virtual uint sayText(const QString &text, const QString &talker);
+ virtual uint sayText(const TQString &text, const TQString &talker);
/**
* Adds another part to a text job. Does not start speaking the text.
@@ -205,7 +205,7 @@ class KTTSD : public QObject, virtual public KSpeech
* @see setText.
* @see startText.
*/
- int appendText(const QString &text, const uint jobNum=0);
+ int appendText(const TQString &text, const uint jobNum=0);
/**
* Queue a text job from the contents of a file. Does not start speaking the text.
@@ -231,8 +231,8 @@ class KTTSD : public QObject, virtual public KSpeech
* @see getTextCount
* @see startText
*/
- virtual uint setFile(const QString &filename, const QString &talker=NULL,
- const QString& encoding=NULL);
+ virtual uint setFile(const TQString &filename, const TQString &talker=NULL,
+ const TQString& encoding=NULL);
/**
* Get the number of sentences in a text job.
@@ -267,7 +267,7 @@ class KTTSD : public QObject, virtual public KSpeech
* Get a comma-separated list of text job numbers in the queue.
* @return Comma-separated list of text job numbers in the queue.
*/
- virtual QString getTextJobNumbers();
+ virtual TQString getTextJobNumbers();
/**
* Get the state of a text job.
@@ -285,13 +285,13 @@ class KTTSD : public QObject, virtual public KSpeech
* @param jobNum Job number of the text job.
* If zero, applies to the last job queued by the application,
* but if no such job, applies to the current job (if any).
- * @return A QDataStream containing information about the job.
+ * @return A TQDataStream containing information about the job.
* Blank if no such job.
*
* The stream contains the following elements:
* - int state Job state.
- * - QCString appId DCOP senderId of the application that requested the speech job.
- * - QString talker Language code in which to speak the text.
+ * - TQCString appId DCOP senderId of the application that requested the speech job.
+ * - TQString talker Language code in which to speak the text.
* - int seq Current sentence being spoken. Sentences are numbered starting at 1.
* - int sentenceCount Total number of sentences in the job.
* - int partNum Current part of the job begin spoken. Parts are numbered starting at 1.
@@ -302,11 +302,11 @@ class KTTSD : public QObject, virtual public KSpeech
*
* The following sample code will decode the stream:
@verbatim
- QByteArray jobInfo = getTextJobInfo(jobNum);
- QDataStream stream(jobInfo, IO_ReadOnly);
+ TQByteArray jobInfo = getTextJobInfo(jobNum);
+ TQDataStream stream(jobInfo, IO_ReadOnly);
int state;
- QCString appId;
- QString talker;
+ TQCString appId;
+ TQString talker;
int seq;
int sentenceCount;
int partNum;
@@ -320,7 +320,7 @@ class KTTSD : public QObject, virtual public KSpeech
stream >> partCount;
@endverbatim
*/
- virtual QByteArray getTextJobInfo(const uint jobNum=0);
+ virtual TQByteArray getTextJobInfo(const uint jobNum=0);
/**
* Given a Talker Code, returns the Talker ID of the talker that would speak
@@ -328,7 +328,7 @@ class KTTSD : public QObject, virtual public KSpeech
* @param talkerCode Talker Code.
* @return Talker ID of the talker that would speak the text job.
*/
- virtual QString talkerCodeToTalkerId(const QString& talkerCode);
+ virtual TQString talkerCodeToTalkerId(const TQString& talkerCode);
/**
* Return a sentence of a job.
@@ -339,7 +339,7 @@ class KTTSD : public QObject, virtual public KSpeech
* @return The specified sentence in the specified job. If not such
* job or sentence, returns "".
*/
- virtual QString getTextJobSentence(const uint jobNum=0, const uint seq=1);
+ virtual TQString getTextJobSentence(const uint jobNum=0, const uint seq=1);
/**
* Determine if kttsd is currently speaking any text jobs.
@@ -436,12 +436,12 @@ class KTTSD : public QObject, virtual public KSpeech
/**
* Get a list of the talkers configured in KTTS.
- * @return A QStringList of fully-specified talker codes, one
+ * @return A TQStringList of fully-specified talker codes, one
* for each talker user has configured.
*
* @see talkers
*/
- virtual QStringList getTalkers();
+ virtual TQStringList getTalkers();
/**
* Change the talker for a text job.
@@ -453,7 +453,7 @@ class KTTSD : public QObject, virtual public KSpeech
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
- virtual ASYNC changeTextTalker(const QString &talker, uint jobNum=0);
+ virtual ASYNC changeTextTalker(const TQString &talker, uint jobNum=0);
/**
* Get the user's default talker.
@@ -462,7 +462,7 @@ class KTTSD : public QObject, virtual public KSpeech
* @see talkers
* @see getTalkers
*/
- virtual QString userDefaultTalker();
+ virtual TQString userDefaultTalker();
/**
* Move a text job down in the queue so that it is spoken later.
@@ -531,7 +531,7 @@ class KTTSD : public QObject, virtual public KSpeech
* Return the KTTSD deamon version number.
* @since KDE 3.5
*/
- virtual QString version();
+ virtual TQString version();
protected:
@@ -539,8 +539,8 @@ class KTTSD : public QObject, virtual public KSpeech
/**
* This signal is emitted by KNotify when a notification event occurs.
*/
- void notificationSignal(const QString &event, const QString &fromApp,
- const QString &text, const QString &sound, const QString &file,
+ void notificationSignal(const TQString &event, const TQString &fromApp,
+ const TQString &text, const TQString &sound, const TQString &file,
const int present, const int level, const int winId, const int eventId );
private slots:
@@ -548,22 +548,22 @@ class KTTSD : public QObject, virtual public KSpeech
* These functions are called whenever
* the status of the speaker object has changed
*/
- void slotSentenceStarted(QString text, QString language,
- const QCString& appId, const uint jobNum, const uint seq);
- void slotSentenceFinished(const QCString& appId, const uint jobNum, const uint seq);
+ void slotSentenceStarted(TQString text, TQString language,
+ const TQCString& appId, const uint jobNum, const uint seq);
+ void slotSentenceFinished(const TQCString& appId, const uint jobNum, const uint seq);
/*
* These functions are called whenever
* the status of the speechData object has changed
*/
- void slotTextSet(const QCString& appId, const uint jobNum);
- void slotTextAppended(const QCString& appId, const uint jobNum, const int partNum);
- void slotTextStarted(const QCString& appId, const uint jobNum);
- void slotTextFinished(const QCString& appId, const uint jobNum);
- void slotTextStopped(const QCString& appId, const uint jobNum);
- void slotTextPaused(const QCString& appId, const uint jobNum);
- void slotTextResumed(const QCString& appId, const uint jobNum);
- void slotTextRemoved(const QCString& appId, const uint jobNum);
+ void slotTextSet(const TQCString& appId, const uint jobNum);
+ void slotTextAppended(const TQCString& appId, const uint jobNum, const int partNum);
+ void slotTextStarted(const TQCString& appId, const uint jobNum);
+ void slotTextFinished(const TQCString& appId, const uint jobNum);
+ void slotTextStopped(const TQCString& appId, const uint jobNum);
+ void slotTextPaused(const TQCString& appId, const uint jobNum);
+ void slotTextResumed(const TQCString& appId, const uint jobNum);
+ void slotTextRemoved(const TQCString& appId, const uint jobNum);
/*
* Fires whenever user clicks Apply or OK buttons in Settings dialog.
@@ -596,7 +596,7 @@ class KTTSD : public QObject, virtual public KSpeech
* Returns the senderId (appId) of the DCOP application that called us.
* @return appId The DCOP sendId of calling application. NULL if called internally by kttsd itself.
*/
- const QCString getAppId();
+ const TQCString getAppId();
/*
* If a job number is 0, returns the default job number for a command.
@@ -608,9 +608,9 @@ class KTTSD : public QObject, virtual public KSpeech
/*
* Fixes a talker argument passed in via dcop.
- * If NULL or "0" return QString::null.
+ * If NULL or "0" return TQString::null.
*/
- QString fixNullString(const QString &talker) const;
+ TQString fixNullString(const TQString &talker) const;
/*
* SpeechData containing all the data and the manipulating methods for all KTTSD
@@ -629,47 +629,47 @@ class KTTSD : public QObject, virtual public KSpeech
};
// kspeech is obsolete. Applications should use KSpeech instead.
-class kspeech : public QObject, virtual public KSpeech
+class kspeech : public TQObject, virtual public KSpeech
{
Q_OBJECT
K_DCOP
public:
// Constructor.
- kspeech(const QCString& objId, QObject *parent=0, const char *name=0);
+ kspeech(const TQCString& objId, TQObject *parent=0, const char *name=0);
// Destructor.
~kspeech();
// Delegate all DCOP methods to KTTSD object.
- virtual bool supportsMarkup(const QString &talker, uint markupType = 0) const;
- virtual bool supportsMarkers(const QString &talker) const;
- virtual ASYNC sayScreenReaderOutput(const QString &msg, const QString &talker);
- virtual ASYNC sayWarning(const QString &warning, const QString &talker);
- virtual ASYNC sayMessage(const QString &message, const QString &talker);
- virtual ASYNC setSentenceDelimiter(const QString &delimiter);
- virtual uint setText(const QString &text, const QString &talker);
- virtual uint sayText(const QString &text, const QString &talker);
- virtual int appendText(const QString &text, uint jobNum=0);
- virtual uint setFile(const QString &filename, const QString &talker,
- const QString& encoding);
+ virtual bool supportsMarkup(const TQString &talker, uint markupType = 0) const;
+ virtual bool supportsMarkers(const TQString &talker) const;
+ virtual ASYNC sayScreenReaderOutput(const TQString &msg, const TQString &talker);
+ virtual ASYNC sayWarning(const TQString &warning, const TQString &talker);
+ virtual ASYNC sayMessage(const TQString &message, const TQString &talker);
+ virtual ASYNC setSentenceDelimiter(const TQString &delimiter);
+ virtual uint setText(const TQString &text, const TQString &talker);
+ virtual uint sayText(const TQString &text, const TQString &talker);
+ virtual int appendText(const TQString &text, uint jobNum=0);
+ virtual uint setFile(const TQString &filename, const TQString &talker,
+ const TQString& encoding);
virtual int getTextCount(uint jobNum=0);
virtual uint getCurrentTextJob();
virtual uint getTextJobCount();
- virtual QString getTextJobNumbers();
+ virtual TQString getTextJobNumbers();
virtual int getTextJobState(uint jobNum=0);
- virtual QByteArray getTextJobInfo(uint jobNum=0);
- virtual QString talkerCodeToTalkerId(const QString& talkerCode);
- virtual QString getTextJobSentence(uint jobNum=0, uint seq=0);
+ virtual TQByteArray getTextJobInfo(uint jobNum=0);
+ virtual TQString talkerCodeToTalkerId(const TQString& talkerCode);
+ virtual TQString getTextJobSentence(uint jobNum=0, uint seq=0);
virtual bool isSpeakingText() const;
virtual ASYNC removeText(uint jobNum=0);
virtual ASYNC startText(uint jobNum=0);
virtual ASYNC stopText(uint jobNum=0);
virtual ASYNC pauseText(uint jobNum=0);
virtual ASYNC resumeText(uint jobNum=0);
- virtual QStringList getTalkers();
- virtual ASYNC changeTextTalker(const QString &talker, uint jobNum=0 );
- virtual QString userDefaultTalker();
+ virtual TQStringList getTalkers();
+ virtual ASYNC changeTextTalker(const TQString &talker, uint jobNum=0 );
+ virtual TQString userDefaultTalker();
virtual ASYNC moveTextLater(uint jobNum=0);
virtual int jumpToTextPart(int partNum, uint jobNum=0);
virtual uint moveRelTextSentence(int n, uint jobNum=0);
@@ -677,7 +677,7 @@ class kspeech : public QObject, virtual public KSpeech
virtual void showDialog();
virtual void kttsdExit();
virtual void reinit();
- virtual QString version();
+ virtual TQString version();
private:
KTTSD m_kttsd;
diff --git a/kttsd/kttsd/speaker.cpp b/kttsd/kttsd/speaker.cpp
index b965a9e..42fa39e 100644
--- a/kttsd/kttsd/speaker.cpp
+++ b/kttsd/kttsd/speaker.cpp
@@ -20,9 +20,9 @@
******************************************************************************/
// Qt includes.
-#include <qfile.h>
-#include <qtimer.h>
-#include <qdir.h>
+#include <tqfile.h>
+#include <tqtimer.h>
+#include <tqdir.h>
// KDE includes.
#include <kdebug.h>
@@ -107,8 +107,8 @@
* Loads plugins.
*/
Speaker::Speaker( SpeechData*speechData, TalkerMgr* talkerMgr,
- QObject *parent, const char *name) :
- QObject(parent, name),
+ TQObject *parent, const char *name) :
+ TQObject(parent, name),
m_speechData(speechData),
m_talkerMgr(talkerMgr)
{
@@ -119,7 +119,7 @@ Speaker::Speaker( SpeechData*speechData, TalkerMgr* talkerMgr,
m_lastAppId = 0;
m_lastJobNum = 0;
m_lastSeq = 0;
- m_timer = new QTimer(this, "kttsdAudioTimer");
+ m_timer = new TQTimer(this, "kttsdAudioTimer");
m_speechData->config->setGroup("General");
m_playerOption = m_speechData->config->readNumEntry("AudioOutputMethod", 0); // default to aRts.
// Map 50% to 100% onto 2.0 to 0.5.
@@ -152,22 +152,22 @@ Speaker::Speaker( SpeechData*speechData, TalkerMgr* talkerMgr,
break;
}
// Connect timer timeout signal.
- connect(m_timer, SIGNAL(timeout()), this, SLOT(slotTimeout()));
+ connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()));
// Connect plugins to slots.
- QPtrList<PlugInProc> plugins = m_talkerMgr->getLoadedPlugIns();
+ TQPtrList<PlugInProc> plugins = m_talkerMgr->getLoadedPlugIns();
const int pluginsCount = plugins.count();
for (int ndx = 0; ndx < pluginsCount; ++ndx)
{
PlugInProc* speech = plugins.at(ndx);
- connect(speech, SIGNAL(synthFinished()),
- this, SLOT(slotSynthFinished()));
- connect(speech, SIGNAL(sayFinished()),
- this, SLOT(slotSayFinished()));
- connect(speech, SIGNAL(stopped()),
- this, SLOT(slotStopped()));
- connect(speech, SIGNAL(error(bool, const QString&)),
- this, SLOT(slotError(bool, const QString&)));
+ connect(speech, TQT_SIGNAL(synthFinished()),
+ this, TQT_SLOT(slotSynthFinished()));
+ connect(speech, TQT_SIGNAL(sayFinished()),
+ this, TQT_SLOT(slotSayFinished()));
+ connect(speech, TQT_SIGNAL(stopped()),
+ this, TQT_SLOT(slotStopped()));
+ connect(speech, TQT_SIGNAL(error(bool, const TQString&)),
+ this, TQT_SLOT(slotError(bool, const TQString&)));
}
}
@@ -228,9 +228,9 @@ void Speaker::doUtterances()
// kdDebug() << "Speaker::doUtterances: queue dump:" << endl;
// for (it = m_uttQueue.begin(); it != m_uttQueue.end(); ++it)
// {
-// QString pluginState = "no plugin";
+// TQString pluginState = "no plugin";
// if (it->plugin) pluginState = pluginStateToStr(it->plugin->getState());
-// QString jobState =
+// TQString jobState =
// jobStateToStr(m_speechData->getTextJobState(it->sentence->jobNum));
// kdDebug() <<
// " State: " << uttStateToStr(it->state) <<
@@ -275,8 +275,8 @@ void Speaker::doUtterances()
{
// Create an XSLT transformer and transform the text.
it->transformer = new SSMLConvert();
- connect(it->transformer, SIGNAL(transformFinished()),
- this, SLOT(slotTransformFinished()));
+ connect(it->transformer, TQT_SIGNAL(transformFinished()),
+ this, TQT_SLOT(slotTransformFinished()));
if (it->transformer->transform(it->sentence->text,
it->plugin->getSsmlXsltFilename()))
{
@@ -345,8 +345,8 @@ void Speaker::doUtterances()
else
{
it->audioStretcher = new Stretcher();
- connect(it->audioStretcher, SIGNAL(stretchFinished()),
- this, SLOT(slotStretchFinished()));
+ connect(it->audioStretcher, TQT_SIGNAL(stretchFinished()),
+ this, TQT_SLOT(slotStretchFinished()));
if (it->audioStretcher->stretch(it->audioUrl, makeSuggestedFilename(),
m_audioStretchFactor))
{
@@ -370,7 +370,7 @@ void Speaker::doUtterances()
// See if Stretcher is finished.
if (it->audioStretcher->getState() == Stretcher::ssFinished)
{
- QFile::remove(it->audioUrl);
+ TQFile::remove(it->audioUrl);
it->audioUrl = it->audioStretcher->getOutFilename();
it->state = usStretched;
delete it->audioStretcher;
@@ -786,7 +786,7 @@ uint Speaker::moveRelTextSentence(const int n, const uint jobNum)
* Converts an utterance state enumerator to a displayable string.
* @param state Utterance state.
*/
-QString Speaker::uttStateToStr(uttState state)
+TQString Speaker::uttStateToStr(uttState state)
{
switch (state)
{
@@ -806,7 +806,7 @@ QString Speaker::uttStateToStr(uttState state)
case usPreempted: return "usPreempted";
case usFinished: return "usFinished";
}
- return QString::null;
+ return TQString::null;
}
/**
@@ -814,7 +814,7 @@ QString Speaker::uttStateToStr(uttState state)
* @param utType Utterance type.
* @return Displayable string for utterance type.
*/
-QString Speaker::uttTypeToStr(uttType utType)
+TQString Speaker::uttTypeToStr(uttType utType)
{
switch (utType)
{
@@ -829,7 +829,7 @@ QString Speaker::uttTypeToStr(uttType utType)
case utStartOfJob: return "utStartOfJob";
case utEndOfJob: return "utEndOfJob";
}
- return QString::null;
+ return TQString::null;
}
/**
@@ -837,7 +837,7 @@ QString Speaker::uttTypeToStr(uttType utType)
* @param state Plugin state.
* @return Displayable string for plugin state.
*/
-QString Speaker::pluginStateToStr(pluginState state)
+TQString Speaker::pluginStateToStr(pluginState state)
{
switch( state )
{
@@ -846,7 +846,7 @@ QString Speaker::pluginStateToStr(pluginState state)
case psSynthing: return "psSynthing";
case psFinished: return "psFinished";
}
- return QString::null;
+ return TQString::null;
}
/**
@@ -854,7 +854,7 @@ QString Speaker::pluginStateToStr(pluginState state)
* @param state Job state.
* @return Displayable string for job state.
*/
-QString Speaker::jobStateToStr(int state)
+TQString Speaker::jobStateToStr(int state)
{
switch ( state )
{
@@ -864,7 +864,7 @@ QString Speaker::jobStateToStr(int state)
case KSpeech::jsPaused: return "jsPaused";
case KSpeech::jsFinished: return "jsFinished";
}
- return QString::null;
+ return TQString::null;
}
/**
@@ -920,7 +920,7 @@ void Speaker::pauseUtteranceByJobNum(const uint jobNum)
/**
* Determines whether the given text is SSML markup.
*/
-bool Speaker::isSsml(const QString &text)
+bool Speaker::isSsml(const TQString &text)
{
return KttsUtils::hasRootElement( text, "speak" );
}
@@ -1019,7 +1019,7 @@ bool Speaker::getNextUtterance()
utt->state = usNone;
utt->audioPlayer = 0;
utt->audioStretcher = 0;
- utt->audioUrl = QString::null;
+ utt->audioUrl = TQString::null;
utt->plugin = m_talkerMgr->talkerToPlugin(utt->sentence->talker);
// Save some time by setting initial state now.
setInitialUtteranceState(*utt);
@@ -1079,7 +1079,7 @@ bool Speaker::getNextUtterance()
{
Utt intrUtt;
intrUtt.sentence = new mlText;
- intrUtt.sentence->text = QString::null;
+ intrUtt.sentence->text = TQString::null;
intrUtt.sentence->talker = utt->sentence->talker;
intrUtt.sentence->appId = utt->sentence->appId;
intrUtt.sentence->jobNum = utt->sentence->jobNum;
@@ -1099,11 +1099,11 @@ bool Speaker::getNextUtterance()
intrUtt.sentence = new mlText;
intrUtt.sentence->text = m_speechData->textPreMsg;
// Interruptions are spoken using default Talker.
- intrUtt.sentence->talker = QString::null;
+ intrUtt.sentence->talker = TQString::null;
intrUtt.sentence->appId = utt->sentence->appId;
intrUtt.sentence->jobNum = utt->sentence->jobNum;
intrUtt.sentence->seq = 0;
- intrUtt.audioUrl = QString::null;
+ intrUtt.audioUrl = TQString::null;
intrUtt.audioPlayer = 0;
intrUtt.utType = utInterruptMsg;
intrUtt.isSSML = isSsml(intrUtt.sentence->text);
@@ -1125,7 +1125,7 @@ bool Speaker::getNextUtterance()
{
Utt resUtt;
resUtt.sentence = new mlText;
- resUtt.sentence->text = QString::null;
+ resUtt.sentence->text = TQString::null;
resUtt.sentence->talker = utt->sentence->talker;
resUtt.sentence->appId = utt->sentence->appId;
resUtt.sentence->jobNum = utt->sentence->jobNum;
@@ -1144,11 +1144,11 @@ bool Speaker::getNextUtterance()
Utt resUtt;
resUtt.sentence = new mlText;
resUtt.sentence->text = m_speechData->textPostMsg;
- resUtt.sentence->talker = QString::null;
+ resUtt.sentence->talker = TQString::null;
resUtt.sentence->appId = utt->sentence->appId;
resUtt.sentence->jobNum = utt->sentence->jobNum;
resUtt.sentence->seq = 0;
- resUtt.audioUrl = QString::null;
+ resUtt.audioUrl = TQString::null;
resUtt.audioPlayer = 0;
resUtt.utType = utResumeMsg;
resUtt.isSSML = isSsml(resUtt.sentence->text);
@@ -1173,12 +1173,12 @@ bool Speaker::getNextUtterance()
{
Utt jobUtt;
jobUtt.sentence = new mlText;
- jobUtt.sentence->text = QString::null;
- jobUtt.sentence->talker = QString::null;
+ jobUtt.sentence->text = TQString::null;
+ jobUtt.sentence->talker = TQString::null;
jobUtt.sentence->appId = m_lastAppId;
jobUtt.sentence->jobNum = m_lastJobNum;
jobUtt.sentence->seq = 0;
- jobUtt.audioUrl = QString::null;
+ jobUtt.audioUrl = TQString::null;
jobUtt.utType = utEndOfJob;
jobUtt.isSSML = false;
jobUtt.plugin = 0;
@@ -1194,12 +1194,12 @@ bool Speaker::getNextUtterance()
{
Utt jobUtt;
jobUtt.sentence = new mlText;
- jobUtt.sentence->text = QString::null;
- jobUtt.sentence->talker = QString::null;
+ jobUtt.sentence->text = TQString::null;
+ jobUtt.sentence->talker = TQString::null;
jobUtt.sentence->appId = m_lastAppId;
jobUtt.sentence->jobNum = m_lastJobNum;
jobUtt.sentence->seq = utt->sentence->seq;
- jobUtt.audioUrl = QString::null;
+ jobUtt.audioUrl = TQString::null;
jobUtt.utType = utStartOfJob;
jobUtt.isSSML = false;
jobUtt.plugin = 0;
@@ -1220,12 +1220,12 @@ bool Speaker::getNextUtterance()
{
Utt jobUtt;
jobUtt.sentence = new mlText;
- jobUtt.sentence->text = QString::null;
- jobUtt.sentence->talker = QString::null;
+ jobUtt.sentence->text = TQString::null;
+ jobUtt.sentence->talker = TQString::null;
jobUtt.sentence->appId = m_lastAppId;
jobUtt.sentence->jobNum = m_lastJobNum;
jobUtt.sentence->seq = 0;
- jobUtt.audioUrl = QString::null;
+ jobUtt.audioUrl = TQString::null;
jobUtt.utType = utEndOfJob;
jobUtt.isSSML = false;
jobUtt.plugin = 0;
@@ -1311,14 +1311,14 @@ uttIterator Speaker::deleteUtterance(uttIterator it)
{
if (m_speechData->keepAudio)
{
- QCString seqStr;
+ TQCString seqStr;
seqStr.sprintf("%08i", it->sentence->seq); // Zero-fill to 8 chars.
- QCString jobStr;
+ TQCString jobStr;
jobStr.sprintf("%08i", it->sentence->jobNum);
- QString dest = m_speechData->keepAudioPath + "/kttsd-" +
- QString("%1-%2").arg(jobStr).arg(seqStr) + ".wav";
- QFile::remove(dest);
- QDir d;
+ TQString dest = m_speechData->keepAudioPath + "/kttsd-" +
+ TQString("%1-%2").arg(jobStr).arg(seqStr) + ".wav";
+ TQFile::remove(dest);
+ TQDir d;
d.rename(it->audioUrl, dest);
// TODO: This is always producing the following. Why and how to fix?
// It moves the files just fine.
@@ -1328,7 +1328,7 @@ uttIterator Speaker::deleteUtterance(uttIterator it)
// KIO::move(it->audioUrl, dest, false);
}
else
- QFile::remove(it->audioUrl);
+ TQFile::remove(it->audioUrl);
}
}
// Delete the utterance from queue.
@@ -1418,7 +1418,7 @@ bool Speaker::startPlayingUtterance(uttIterator it)
(m_speechData->getTextJobState(it->sentence->jobNum) != KSpeech::jsPaused))
{
// kdDebug() << "Speaker::startPlayingUtterance: resuming play" << endl;
- it->audioPlayer->startPlay(QString::null); // resume
+ it->audioPlayer->startPlay(TQString::null); // resume
it->state = usPlaying;
if (!m_timer->start(timerInterval, FALSE))
kdDebug() << "Speaker::startPlayingUtterance: timer.start failed" << endl;
@@ -1431,7 +1431,7 @@ bool Speaker::startPlayingUtterance(uttIterator it)
{
// Preempted playback automatically resumes.
// Note: Must call stop(), even if player not currently playing. Why?
- it->audioPlayer->startPlay(QString::null); // resume
+ it->audioPlayer->startPlay(TQString::null); // resume
it->state = usPlaying;
if (!m_timer->start(timerInterval, FALSE))
kdDebug() << "Speaker::startPlayingUtterance: timer.start failed" << endl;
@@ -1500,12 +1500,12 @@ void Speaker::postPlaySignals(uttIterator it)
* for synthesis to write to.
* @return Full pathname of suggested file.
*/
-QString Speaker::makeSuggestedFilename()
+TQString Speaker::makeSuggestedFilename()
{
KTempFile tempFile (locateLocal("tmp", "kttsd-"), ".wav");
- QString waveFile = tempFile.file()->name();
+ TQString waveFile = tempFile.file()->name();
tempFile.close();
- QFile::remove(waveFile);
+ TQFile::remove(waveFile);
// kdDebug() << "Speaker::makeSuggestedFilename: Suggesting filename: " << waveFile << endl;
return KStandardDirs::realFilePath(waveFile);
}
@@ -1516,7 +1516,7 @@ QString Speaker::makeSuggestedFilename()
Player* Speaker::createPlayerObject()
{
Player* player = 0;
- QString plugInName;
+ TQString plugInName;
switch(m_playerOption)
{
case 1 :
@@ -1541,7 +1541,7 @@ Player* Speaker::createPlayerObject()
}
}
KTrader::OfferList offers = KTrader::self()->query(
- "KTTSD/AudioPlugin", QString("DesktopEntryName == '%1'").arg(plugInName));
+ "KTTSD/AudioPlugin", TQString("DesktopEntryName == '%1'").arg(plugInName));
if(offers.count() == 1)
{
@@ -1595,8 +1595,8 @@ void Speaker::slotSayFinished()
{
// Since this signal handler may be running from a plugin's thread,
// convert to postEvent and return immediately.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 101);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 101);
+ TQApplication::postEvent(this, ev);
}
/**
@@ -1606,8 +1606,8 @@ void Speaker::slotSynthFinished()
{
// Since this signal handler may be running from a plugin's thread,
// convert to postEvent and return immediately.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 102);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 102);
+ TQApplication::postEvent(this, ev);
}
/**
@@ -1617,8 +1617,8 @@ void Speaker::slotStopped()
{
// Since this signal handler may be running from a plugin's thread,
// convert to postEvent and return immediately.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 103);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 103);
+ TQApplication::postEvent(this, ev);
}
/**
@@ -1627,8 +1627,8 @@ void Speaker::slotStopped()
void Speaker::slotStretchFinished()
{
// Convert to postEvent and return immediately.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 104);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 104);
+ TQApplication::postEvent(this, ev);
}
/**
@@ -1637,8 +1637,8 @@ void Speaker::slotStretchFinished()
void Speaker::slotTransformFinished()
{
// Convert to postEvent and return immediately.
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 105);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 105);
+ TQApplication::postEvent(this, ev);
}
/** Received from PlugIn object when they encounter an error.
@@ -1647,17 +1647,17 @@ void Speaker::slotTransformFinished()
* the speech engine could not be started.
* @param msg Error message.
*/
-void Speaker::slotError(bool /*keepGoing*/, const QString& /*msg*/)
+void Speaker::slotError(bool /*keepGoing*/, const TQString& /*msg*/)
{
// Since this signal handler may be running from a plugin's thread,
// convert to postEvent and return immediately.
// TODO: Do something with error messages.
/*
if (keepGoing)
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 106);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 106);
else
- QCustomEvent* ev = new QCustomEvent(QEvent::User + 107);
- QApplication::postEvent(this, ev);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User + 107);
+ TQApplication::postEvent(this, ev);
*/
}
@@ -1686,11 +1686,11 @@ void Speaker::slotTimeout()
* Processes events posted by plugins. When asynchronous plugins emit signals
* they are converted into these events.
*/
-bool Speaker::event ( QEvent * e )
+bool Speaker::event ( TQEvent * e )
{
// TODO: Do something with event numbers 106 (error; keepGoing=True)
// and 107 (error; keepGoing=False).
- if ((e->type() >= (QEvent::User + 101)) && (e->type() <= (QEvent::User + 105)))
+ if ((e->type() >= (TQEvent::User + 101)) && (e->type() <= (TQEvent::User + 105)))
{
// kdDebug() << "Speaker::event: received event." << endl;
doUtterances();
diff --git a/kttsd/kttsd/speaker.h b/kttsd/kttsd/speaker.h
index b72e832..a3dc677 100644
--- a/kttsd/kttsd/speaker.h
+++ b/kttsd/kttsd/speaker.h
@@ -24,9 +24,9 @@
#define _SPEAKER_H_
// Qt includes.
-#include <qobject.h>
-#include <qvaluevector.h>
-#include <qevent.h>
+#include <tqobject.h>
+#include <tqvaluevector.h>
+#include <tqevent.h>
// KTTSD includes.
#include <speechdata.h>
@@ -89,7 +89,7 @@ struct Utt{
SSMLConvert* transformer; /* XSLT transformer. */
PlugInProc* plugin; /* The plugin that synthesizes the utterance. */
Stretcher* audioStretcher; /* Audio stretcher object. Adjusts speed. */
- QString audioUrl; /* Filename containing synthesized audio. Null if
+ TQString audioUrl; /* Filename containing synthesized audio. Null if
plugin has not yet synthesized the utterance, or if
plugin does not support synthesis. */
Player* audioPlayer; /* The audio player audibilizing the utterance. Null
@@ -100,7 +100,7 @@ struct Utt{
/**
* Iterator for queue of utterances.
*/
-typedef QValueVector<Utt>::iterator uttIterator;
+typedef TQValueVector<Utt>::iterator uttIterator;
// Timer interval for checking whether audio playback is finished.
const int timerInterval = 500;
@@ -118,7 +118,7 @@ class Speaker : public QObject{
* Calls load plug ins
*/
Speaker(SpeechData* speechData, TalkerMgr* talkerMgr,
- QObject *parent = 0, const char *name = 0);
+ TQObject *parent = 0, const char *name = 0);
/**
* Destructor
@@ -296,7 +296,7 @@ class Speaker : public QObject{
* @param markerName The name of the marker seen.
* @see markers
*/
- void markerSeen(const QCString& appId, const QString& markerName);
+ void markerSeen(const TQCString& appId, const TQString& markerName);
/**
* This signal is emitted whenever a sentence begins speaking.
@@ -304,7 +304,7 @@ class Speaker : public QObject{
* @param jobNum Job number of the text job.
* @param seq Sequence number of the text.
*/
- void sentenceStarted(QString text, QString language, const QCString& appId,
+ void sentenceStarted(TQString text, TQString language, const TQCString& appId,
const uint jobNum, const uint seq);
/**
@@ -313,14 +313,14 @@ class Speaker : public QObject{
* @param jobNum Job number of the text job.
* @param seq Sequence number of the text.
*/
- void sentenceFinished(const QCString& appId, const uint jobNum, const uint seq);
+ void sentenceFinished(const TQCString& appId, const uint jobNum, const uint seq);
/**
* This signal is emitted whenever speaking of a text job begins.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- void textStarted(const QCString& appId, const uint jobNum);
+ void textStarted(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a text job is finished. The job has
@@ -331,32 +331,32 @@ class Speaker : public QObject{
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textFinished(const QCString& appId, const uint jobNum);
+ void textFinished(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a speaking text job stops speaking.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textStopped(const QCString& appId, const uint jobNum);
+ void textStopped(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a speaking text job is paused.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textPaused(const QCString& appId, const uint jobNum);
+ void textPaused(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted when a text job, that was previously paused, resumes speaking.
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textResumed(const QCString& appId, const uint jobNum);
+ void textResumed(const TQCString& appId, const uint jobNum);
protected:
/**
* Processes events posted by ThreadedPlugIns.
*/
- virtual bool event ( QEvent * e );
+ virtual bool event ( TQEvent * e );
private slots:
/**
@@ -386,7 +386,7 @@ class Speaker : public QObject{
* the speech engine could not be started.
* @param msg Error message.
*/
- void slotError(bool keepGoing, const QString &msg);
+ void slotError(bool keepGoing, const TQString &msg);
/**
* Received from Timer when it fires.
* Check audio player to see if it is finished.
@@ -400,33 +400,33 @@ class Speaker : public QObject{
* @param state Utterance state.
* @return Displayable string for utterance state.
*/
- QString uttStateToStr(uttState state);
+ TQString uttStateToStr(uttState state);
/**
* Converts an utterance type enumerator to a displayable string.
* @param utType Utterance type.
* @return Displayable string for utterance type.
*/
- QString uttTypeToStr(uttType utType);
+ TQString uttTypeToStr(uttType utType);
/**
* Converts a plugin state enumerator to a displayable string.
* @param state Plugin state.
* @return Displayable string for plugin state.
*/
- QString pluginStateToStr(pluginState state);
+ TQString pluginStateToStr(pluginState state);
/**
* Converts a job state enumerator to a displayable string.
* @param state Job state.
* @return Displayable string for job state.
*/
- QString jobStateToStr(int state);
+ TQString jobStateToStr(int state);
/**
* Determines whether the given text is SSML markup.
*/
- bool isSsml(const QString &text);
+ bool isSsml(const TQString &text);
/**
* Determines the initial state of an utterance. If the utterance contains
@@ -510,7 +510,7 @@ class Speaker : public QObject{
* for synthesis to write to.
* @return Full pathname of suggested file.
*/
- QString makeSuggestedFilename();
+ TQString makeSuggestedFilename();
/**
* Creates and returns a player object based on user option.
@@ -535,7 +535,7 @@ class Speaker : public QObject{
/**
* Queue of utterances we are currently processing.
*/
- QValueVector<Utt> m_uttQueue;
+ TQValueVector<Utt> m_uttQueue;
/**
* True when text job reading has been interrupted.
@@ -563,12 +563,12 @@ class Speaker : public QObject{
/**
* GStreamer sink name to use, or ALSA PCM device name.
*/
- QString m_sinkName;
+ TQString m_sinkName;
/**
* Timer for monitoring audio player.
*/
- QTimer* m_timer;
+ TQTimer* m_timer;
/**
* Current Text job being processed.
@@ -579,7 +579,7 @@ class Speaker : public QObject{
* Job Number, appId, and sequence number of the last text sentence queued.
*/
uint m_lastJobNum;
- QCString m_lastAppId;
+ TQCString m_lastAppId;
uint m_lastSeq;
/**
diff --git a/kttsd/kttsd/speechdata.cpp b/kttsd/kttsd/speechdata.cpp
index a1bf26e..1c8f90f 100644
--- a/kttsd/kttsd/speechdata.cpp
+++ b/kttsd/kttsd/speechdata.cpp
@@ -26,11 +26,11 @@
#include <stdlib.h>
// Qt includes.
-#include <qregexp.h>
-#include <qpair.h>
-#include <qvaluelist.h>
-#include <qdom.h>
-#include <qfile.h>
+#include <tqregexp.h>
+#include <tqpair.h>
+#include <tqvaluelist.h>
+#include <tqdom.h>
+#include <tqfile.h>
// KDE includes.
#include <kdebug.h>
@@ -105,7 +105,7 @@ bool SpeechData::readConfig(){
autoExitManager = config->readBoolEntry("AutoExitManager", false);
// Clear the pool of filter managers so that filters re-init themselves.
- QPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
+ TQPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
for( ; it.current(); ++it )
{
PooledFilterMgr* pooledFilterMgr = it.current();
@@ -125,8 +125,8 @@ bool SpeechData::readConfig(){
pooledFilterMgr->job = 0;
pooledFilterMgr->partNum = 0;
// Connect signals from FilterMgr.
- connect (filterMgr, SIGNAL(filteringFinished()), this, SLOT(slotFilterMgrFinished()));
- connect (filterMgr, SIGNAL(filteringStopped()), this, SLOT(slotFilterMgrStopped()));
+ connect (filterMgr, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotFilterMgrFinished()));
+ connect (filterMgr, TQT_SIGNAL(filteringStopped()), this, TQT_SLOT(slotFilterMgrStopped()));
m_pooledFilterMgrs.append(pooledFilterMgr);
return true;
@@ -135,16 +135,16 @@ bool SpeechData::readConfig(){
/**
* Loads notify events from a file. Clearing data if clear is True.
*/
-void SpeechData::loadNotifyEventsFromFile( const QString& filename, bool clear)
+void SpeechData::loadNotifyEventsFromFile( const TQString& filename, bool clear)
{
// Open existing event list.
- QFile file( filename );
+ TQFile file( filename );
if ( !file.open( IO_ReadOnly ) )
{
kdDebug() << "SpeechData::loadNotifyEventsFromFile: Unable to open file " << filename << endl;
}
- // QDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" );
- QDomDocument doc( "" );
+ // TQDomDocument doc( "http://www.kde.org/share/apps/kttsd/stringreplacer/wordlist.dtd []" );
+ TQDomDocument doc( "" );
if ( !doc.setContent( &file ) ) {
file.close();
kdDebug() << "SpeechData::loadNotifyEventsFromFile: File not in proper XML format. " << filename << endl;
@@ -156,28 +156,28 @@ void SpeechData::loadNotifyEventsFromFile( const QString& filename, bool clear)
{
notifyDefaultPresent = NotifyPresent::Passive;
notifyDefaultOptions.action = NotifyAction::SpeakMsg;
- notifyDefaultOptions.talker = QString::null;
- notifyDefaultOptions.customMsg = QString::null;
+ notifyDefaultOptions.talker = TQString::null;
+ notifyDefaultOptions.customMsg = TQString::null;
notifyAppMap.clear();
}
// Event list.
- QDomNodeList eventList = doc.elementsByTagName("notifyEvent");
+ TQDomNodeList eventList = doc.elementsByTagName("notifyEvent");
const int eventListCount = eventList.count();
for (int eventIndex = 0; eventIndex < eventListCount; ++eventIndex)
{
- QDomNode eventNode = eventList.item(eventIndex);
- QDomNodeList propList = eventNode.childNodes();
- QString eventSrc;
- QString event;
- QString actionName;
- QString message;
+ TQDomNode eventNode = eventList.item(eventIndex);
+ TQDomNodeList propList = eventNode.childNodes();
+ TQString eventSrc;
+ TQString event;
+ TQString actionName;
+ TQString message;
TalkerCode talkerCode;
const int propListCount = propList.count();
for (int propIndex = 0; propIndex < propListCount; ++propIndex)
{
- QDomNode propNode = propList.item(propIndex);
- QDomElement prop = propNode.toElement();
+ TQDomNode propNode = propList.item(propIndex);
+ TQDomElement prop = propNode.toElement();
if (prop.tagName() == "eventSrc") eventSrc = prop.text();
if (prop.tagName() == "event") event = prop.text();
if (prop.tagName() == "action") actionName = prop.text();
@@ -195,7 +195,7 @@ void SpeechData::loadNotifyEventsFromFile( const QString& filename, bool clear)
notifyEventMap[ event ] = notifyOptions;
notifyAppMap[ eventSrc ] = notifyEventMap;
} else {
- notifyOptions.eventName = QString::null;
+ notifyOptions.eventName = TQString::null;
notifyDefaultPresent = NotifyPresent::present( event );
notifyDefaultOptions = notifyOptions;
}
@@ -213,7 +213,7 @@ SpeechData::~SpeechData(){
emit textRemoved(job->appId, job->jobNum);
}
- QPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
+ TQPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
for( ; it.current(); ++it )
{
PooledFilterMgr* pooledFilterMgr = it.current();
@@ -239,7 +239,7 @@ SpeechData::~SpeechData(){
* If an existing Screen Reader output is in progress, it is stopped and discarded and
* replaced with this new message.
*/
-void SpeechData::setScreenReaderOutput(const QString &msg, const QString &talker, const QCString &appId)
+void SpeechData::setScreenReaderOutput(const TQString &msg, const TQString &talker, const TQCString &appId)
{
screenReaderOutput.text = msg;
screenReaderOutput.talker = talker;
@@ -273,8 +273,8 @@ bool SpeechData::screenReaderOutputReady()
/**
* Add a new warning to the queue.
*/
-void SpeechData::enqueueWarning( const QString &warning, const QString &talker, const QCString &appId){
- // kdDebug() << "Running: SpeechData::enqueueWarning( const QString &warning )" << endl;
+void SpeechData::enqueueWarning( const TQString &warning, const TQString &talker, const TQCString &appId){
+ // kdDebug() << "Running: SpeechData::enqueueWarning( const TQString &warning )" << endl;
mlJob* job = new mlJob();
++jobCounter;
if (jobCounter == 0) ++jobCounter; // Overflow is OK, but don't want any 0 jobNums.
@@ -285,7 +285,7 @@ void SpeechData::enqueueWarning( const QString &warning, const QString &talker,
job->seq = 1;
job->partCount = 1;
warnings.enqueue( job );
- job->sentences = QStringList();
+ job->sentences = TQStringList();
// Do not apply Sentence Boundary Detection filters to warnings.
startJobFiltering( job, warning, true );
// uint count = warnings.count();
@@ -331,7 +331,7 @@ bool SpeechData::warningInQueue(){
/**
* Add a new message to the queue.
*/
-void SpeechData::enqueueMessage( const QString &message, const QString &talker, const QCString& appId){
+void SpeechData::enqueueMessage( const TQString &message, const TQString &talker, const TQCString& appId){
// kdDebug() << "Running: SpeechData::enqueueMessage" << endl;
mlJob* job = new mlJob();
++jobCounter;
@@ -343,7 +343,7 @@ void SpeechData::enqueueMessage( const QString &message, const QString &talker,
job->seq = 1;
job->partCount = 1;
messages.enqueue( job );
- job->sentences = QStringList();
+ job->sentences = TQStringList();
// Do not apply Sentence Boundary Detection filters to messages.
startJobFiltering( job, message, true );
// uint count = messages.count();
@@ -390,13 +390,13 @@ bool SpeechData::messageInQueue(){
/**
* Determines whether the given text is SSML markup.
*/
-bool SpeechData::isSsml(const QString &text)
+bool SpeechData::isSsml(const TQString &text)
{
/// This checks to see if the root tag of the text is a <speak> tag.
- QDomDocument ssml;
+ TQDomDocument ssml;
ssml.setContent(text, false); // No namespace processing.
/// Check to see if this is SSML
- QDomElement root = ssml.documentElement();
+ TQDomElement root = ssml.documentElement();
return (root.tagName() == "speak");
}
@@ -412,39 +412,39 @@ bool SpeechData::isSsml(const QString &text)
* We will walk before we run for now and not sentence parse.
*/
-QStringList SpeechData::parseText(const QString &text, const QCString &appId /*=NULL*/)
+TQStringList SpeechData::parseText(const TQString &text, const TQCString &appId /*=NULL*/)
{
// There has to be a better way
// kdDebug() << "I'm getting: " << endl << text << " from application " << appId << endl;
if (isSsml(text))
{
- QString tempList(text);
+ TQString tempList(text);
return tempList;
}
// See if app has specified a custom sentence delimiter and use it, otherwise use default.
- QRegExp sentenceDelimiter;
+ TQRegExp sentenceDelimiter;
if (sentenceDelimiters.find(appId) != sentenceDelimiters.end())
- sentenceDelimiter = QRegExp(sentenceDelimiters[appId]);
+ sentenceDelimiter = TQRegExp(sentenceDelimiters[appId]);
else
- sentenceDelimiter = QRegExp("([\\.\\?\\!\\:\\;]\\s)|(\\n *\\n)");
- QString temp = text;
+ sentenceDelimiter = TQRegExp("([\\.\\?\\!\\:\\;]\\s)|(\\n *\\n)");
+ TQString temp = text;
// Replace spaces, tabs, and formfeeds with a single space.
- temp.replace(QRegExp("[ \\t\\f]+"), " ");
+ temp.replace(TQRegExp("[ \\t\\f]+"), " ");
// Replace sentence delimiters with tab.
temp.replace(sentenceDelimiter, "\\1\t");
// Replace remaining newlines with spaces.
temp.replace("\n"," ");
temp.replace("\r"," ");
// Remove leading spaces.
- temp.replace(QRegExp("\\t +"), "\t");
+ temp.replace(TQRegExp("\\t +"), "\t");
// Remove trailing spaces.
- temp.replace(QRegExp(" +\\t"), "\t");
+ temp.replace(TQRegExp(" +\\t"), "\t");
// Remove blank lines.
- temp.replace(QRegExp("\t\t+"),"\t");
+ temp.replace(TQRegExp("\t\t+"),"\t");
// Split into sentences.
- QStringList tempList = QStringList::split("\t", temp, false);
+ TQStringList tempList = TQStringList::split("\t", temp, false);
-// for ( QStringList::Iterator it = tempList.begin(); it != tempList.end(); ++it ) {
+// for ( TQStringList::Iterator it = tempList.begin(); it != tempList.end(); ++it ) {
// kdDebug() << "'" << *it << "'" << endl;
// }
return tempList;
@@ -453,7 +453,7 @@ QStringList SpeechData::parseText(const QString &text, const QCString &appId /*=
/**
* Queues a text job.
*/
-uint SpeechData::setText( const QString &text, const QString &talker, const QCString &appId)
+uint SpeechData::setText( const TQString &text, const TQString &talker, const TQCString &appId)
{
// kdDebug() << "Running: SpeechData::setText" << endl;
mlJob* job = new mlJob;
@@ -467,14 +467,14 @@ uint SpeechData::setText( const QString &text, const QString &talker, const QCSt
job->seq = 0;
job->partCount = 1;
#if NO_FILTERS
- QStringList tempList = parseText(text, appId);
+ TQStringList tempList = parseText(text, appId);
job->sentences = tempList;
job->partSeqNums.append(tempList.count());
textJobs.append(job);
emit textSet(appId, jobNum);
#else
- job->sentences = QStringList();
- job->partSeqNums = QValueList<int>();
+ job->sentences = TQStringList();
+ job->partSeqNums = TQValueList<int>();
textJobs.append(job);
startJobFiltering(job, text, false);
#endif
@@ -497,7 +497,7 @@ uint SpeechData::setText( const QString &text, const QString &talker, const QCSt
* @see setText.
* @see startText.
*/
-int SpeechData::appendText(const QString &text, const uint jobNum, const QCString& /*appId*/)
+int SpeechData::appendText(const TQString &text, const uint jobNum, const TQCString& /*appId*/)
{
// kdDebug() << "Running: SpeechData::appendText" << endl;
int newPartNum = 0;
@@ -506,7 +506,7 @@ int SpeechData::appendText(const QString &text, const uint jobNum, const QCStrin
{
job->partCount++;
#if NO_FILTERS
- QStringList tempList = parseText(text, appId);
+ TQStringList tempList = parseText(text, appId);
int sentenceCount = job->sentences.count();
job->sentences += tempList;
job->partSeqNums.append(sentenceCount + tempList.count());
@@ -528,13 +528,13 @@ int SpeechData::appendText(const QString &text, const uint jobNum, const QCStrin
* If appId is NULL, returns the last job in the queue.
* Does not change textJobs.current().
*/
-mlJob* SpeechData::findLastJobByAppId(const QCString& appId)
+mlJob* SpeechData::findLastJobByAppId(const TQCString& appId)
{
if (appId == NULL)
return textJobs.getLast();
else
{
- QPtrListIterator<mlJob> it(textJobs);
+ TQPtrListIterator<mlJob> it(textJobs);
for (it.toLast() ; it.current(); --it )
{
if (it.current()->appId == appId)
@@ -555,7 +555,7 @@ mlJob* SpeechData::findLastJobByAppId(const QCString& appId)
* If appId is NULL, returns the last job in the queue.
* Does not change textJobs.current().
*/
-mlJob* SpeechData::findAJobByAppId(const QCString& appId)
+mlJob* SpeechData::findAJobByAppId(const TQCString& appId)
{
mlJob* job = findLastJobByAppId(appId);
// if (!job) job = textJobs.getLast();
@@ -571,7 +571,7 @@ mlJob* SpeechData::findAJobByAppId(const QCString& appId)
* If appId is NULL, returns the Job Number of the last job in the queue.
* Does not change textJobs.current().
*/
-uint SpeechData::findAJobNumByAppId(const QCString& appId)
+uint SpeechData::findAJobNumByAppId(const TQCString& appId)
{
mlJob* job = findAJobByAppId(appId);
if (job)
@@ -588,7 +588,7 @@ uint SpeechData::findAJobNumByAppId(const QCString& appId)
*/
mlJob* SpeechData::findJobByJobNum(const uint jobNum)
{
- QPtrListIterator<mlJob> it(textJobs);
+ TQPtrListIterator<mlJob> it(textJobs);
for ( ; it.current(); ++it )
{
if (it.current()->jobNum == jobNum)
@@ -606,9 +606,9 @@ mlJob* SpeechData::findJobByJobNum(const uint jobNum)
* If no such job, returns "".
* Does not change textJobs.current().
*/
-QCString SpeechData::getAppIdByJobNum(const uint jobNum)
+TQCString SpeechData::getAppIdByJobNum(const uint jobNum)
{
- QCString appId;
+ TQCString appId;
mlJob* job = findJobByJobNum(jobNum);
if (job) appId = job->appId;
return appId;
@@ -630,14 +630,14 @@ void SpeechData::removeText(const uint jobNum)
{
// kdDebug() << "Running: SpeechData::removeText" << endl;
uint removeJobNum = 0;
- QCString removeAppId; // The appId of the removed (and stopped) job.
+ TQCString removeAppId; // The appId of the removed (and stopped) job.
mlJob* removeJob = findJobByJobNum(jobNum);
if (removeJob)
{
removeAppId = removeJob->appId;
removeJobNum = removeJob->jobNum;
// If filtering on the job, cancel it.
- QPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
+ TQPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
for ( ; it.current(); ++it ) {
PooledFilterMgr* pooledFilterMgr = it.current();
if (pooledFilterMgr->job && (pooledFilterMgr->job->jobNum == removeJobNum))
@@ -695,8 +695,8 @@ int SpeechData::getJobPartNumFromSeq(const mlJob& job, const int seq)
void SpeechData::deleteExpiredJobs(const uint finishedJobNum)
{
// Save current pointer.
- typedef QPair<QCString, uint> removedJob;
- typedef QValueList<removedJob> removedJobsList;
+ typedef QPair<TQCString, uint> removedJob;
+ typedef TQValueList<removedJob> removedJobsList;
removedJobsList removedJobs;
// Walk through jobs and delete any other finished jobs.
for (mlJob* job = textJobs.first(); (job); job = textJobs.next())
@@ -712,7 +712,7 @@ void SpeechData::deleteExpiredJobs(const uint finishedJobNum)
removedJobsList::const_iterator endRemovedJobsList(removedJobs.constEnd());
for (it = removedJobs.constBegin(); it != endRemovedJobsList ; ++it)
{
- QCString appId = (*it).first;
+ TQCString appId = (*it).first;
uint jobNum = (*it).second;
textRemoved(appId, jobNum);
}
@@ -841,7 +841,7 @@ uint SpeechData::getJobSequenceNum(const uint jobNum)
* Changing the sentence delimiter does not affect other applications.
* @see sentenceparsing
*/
-void SpeechData::setSentenceDelimiter(const QString &delimiter, const QCString appId)
+void SpeechData::setSentenceDelimiter(const TQString &delimiter, const TQCString appId)
{
sentenceDelimiters[appId] = delimiter;
}
@@ -882,14 +882,14 @@ uint SpeechData::getTextJobCount()
* Get a comma-separated list of text job numbers in the queue.
* @return Comma-separated list of text job numbers in the queue.
*/
-QString SpeechData::getTextJobNumbers()
+TQString SpeechData::getTextJobNumbers()
{
- QString jobs;
- QPtrListIterator<mlJob> it(textJobs);
+ TQString jobs;
+ TQPtrListIterator<mlJob> it(textJobs);
for ( ; it.current(); ++it )
{
if (!jobs.isEmpty()) jobs.append(",");
- jobs.append(QString::number(it.current()->jobNum));
+ jobs.append(TQString::number(it.current()->jobNum));
}
return jobs;
}
@@ -932,13 +932,13 @@ void SpeechData::setTextJobState(const uint jobNum, const KSpeech::kttsdJobState
/**
* Get information about a text job.
* @param jobNum Job number of the text job.
-* @return A QDataStream containing information about the job.
+* @return A TQDataStream containing information about the job.
* Blank if no such job.
*
* The stream contains the following elements:
* - int state Job state.
-* - QCString appId DCOP senderId of the application that requested the speech job.
-* - QString talker Language code in which to speak the text.
+* - TQCString appId DCOP senderId of the application that requested the speech job.
+* - TQString talker Language code in which to speak the text.
* - int seq Current sentence being spoken. Sentences are numbered starting at 1.
* - int sentenceCount Total number of sentences in the job.
* - int partNum Current part of the job begin spoken. Parts are numbered starting at 1.
@@ -949,11 +949,11 @@ void SpeechData::setTextJobState(const uint jobNum, const KSpeech::kttsdJobState
*
* The following sample code will decode the stream:
@verbatim
- QByteArray jobInfo = getTextJobInfo(jobNum);
- QDataStream stream(jobInfo, IO_ReadOnly);
+ TQByteArray jobInfo = getTextJobInfo(jobNum);
+ TQDataStream stream(jobInfo, IO_ReadOnly);
int state;
- QCString appId;
- QString talker;
+ TQCString appId;
+ TQString talker;
int seq;
int sentenceCount;
int partNum;
@@ -967,14 +967,14 @@ void SpeechData::setTextJobState(const uint jobNum, const KSpeech::kttsdJobState
stream >> partCount;
@endverbatim
*/
-QByteArray SpeechData::getTextJobInfo(const uint jobNum)
+TQByteArray SpeechData::getTextJobInfo(const uint jobNum)
{
mlJob* job = findJobByJobNum(jobNum);
- QByteArray temp;
+ TQByteArray temp;
if (job)
{
waitJobFiltering(job);
- QDataStream stream(temp, IO_WriteOnly);
+ TQDataStream stream(temp, IO_WriteOnly);
stream << job->state;
stream << job->appId;
stream << job->talker;
@@ -993,10 +993,10 @@ QByteArray SpeechData::getTextJobInfo(const uint jobNum)
* @return The specified sentence in the specified job. If no such
* job or sentence, returns "".
*/
-QString SpeechData::getTextJobSentence(const uint jobNum, const uint seq /*=1*/)
+TQString SpeechData::getTextJobSentence(const uint jobNum, const uint seq /*=1*/)
{
mlJob* job = findJobByJobNum(jobNum);
- QString temp;
+ TQString temp;
if (job)
{
waitJobFiltering(job);
@@ -1015,7 +1015,7 @@ QString SpeechData::getTextJobSentence(const uint jobNum, const uint seq /*=1*/)
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
-void SpeechData::changeTextTalker(const QString &talker, uint jobNum)
+void SpeechData::changeTextTalker(const TQString &talker, uint jobNum)
{
mlJob* job = findJobByJobNum(jobNum);
if (job) job->talker = talker;
@@ -1110,7 +1110,7 @@ uint SpeechData::moveRelTextSentence(const int n, const uint jobNum /*=0*/)
/**
* Assigns a FilterMgr to a job and starts filtering on it.
*/
-void SpeechData::startJobFiltering(mlJob* job, const QString& text, bool noSBD)
+void SpeechData::startJobFiltering(mlJob* job, const TQString& text, bool noSBD)
{
uint jobNum = job->jobNum;
int partNum = job->partCount;
@@ -1118,7 +1118,7 @@ void SpeechData::startJobFiltering(mlJob* job, const QString& text, bool noSBD)
// Find an idle FilterMgr, if any.
// If filtering is already in progress for this job and part, do nothing.
PooledFilterMgr* pooledFilterMgr = 0;
- QPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
+ TQPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
for( ; it.current(); ++it )
{
if (it.current()->busy) {
@@ -1136,8 +1136,8 @@ void SpeechData::startJobFiltering(mlJob* job, const QString& text, bool noSBD)
filterMgr->init(config, "General");
pooledFilterMgr->filterMgr = filterMgr;
// Connect signals from FilterMgr.
- connect (filterMgr, SIGNAL(filteringFinished()), this, SLOT(slotFilterMgrFinished()));
- connect (filterMgr, SIGNAL(filteringStopped()), this, SLOT(slotFilterMgrStopped()));
+ connect (filterMgr, TQT_SIGNAL(filteringFinished()), this, TQT_SLOT(slotFilterMgrFinished()));
+ connect (filterMgr, TQT_SIGNAL(filteringStopped()), this, TQT_SLOT(slotFilterMgrStopped()));
m_pooledFilterMgrs.append(pooledFilterMgr);
}
// else kdDebug() << "SpeechData::startJobFiltering: re-using idle pooledFilterMgr for job " << jobNum << " part " << partNum << endl;
@@ -1166,7 +1166,7 @@ void SpeechData::waitJobFiltering(const mlJob* job)
#endif
uint jobNum = job->jobNum;
bool waited = false;
- QPtrListIterator<PooledFilterMgr> it(m_pooledFilterMgrs);
+ TQPtrListIterator<PooledFilterMgr> it(m_pooledFilterMgrs);
for ( ; it.current(); ++it )
{
PooledFilterMgr* pooledFilterMgr = it.current();
@@ -1198,7 +1198,7 @@ void SpeechData::doFiltering()
while (again)
{
again = false;
- QPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
+ TQPtrListIterator<PooledFilterMgr> it( m_pooledFilterMgrs );
for( ; it.current(); ++it )
{
PooledFilterMgr* pooledFilterMgr = it.current();
@@ -1216,7 +1216,7 @@ void SpeechData::doFiltering()
{
pooledFilterMgr->busy = false;
// Retrieve text from FilterMgr.
- QString text = filterMgr->getOutput();
+ TQString text = filterMgr->getOutput();
// kdDebug() << "SpeechData::doFiltering: text.left(500) = " << text.left(500) << endl;
filterMgr->ackFinished();
// Convert the TalkerCode back into string.
@@ -1231,7 +1231,7 @@ void SpeechData::doFiltering()
// Split the text into sentences and store in the job.
// The SBD plugin does all the real sentence parsing, inserting tabs at each
// sentence boundary.
- QStringList sentences = QStringList::split("\t", text, false);
+ TQStringList sentences = TQStringList::split("\t", text, false);
int sentenceCount = job->sentences.count();
job->sentences += sentences;
job->partSeqNums.append(sentenceCount + sentences.count());
diff --git a/kttsd/kttsd/speechdata.h b/kttsd/kttsd/speechdata.h
index 40294bf..5f5b92a 100644
--- a/kttsd/kttsd/speechdata.h
+++ b/kttsd/kttsd/speechdata.h
@@ -26,11 +26,11 @@
#define _SPEECHDATA_H_
// Qt includes.
-#include <qptrqueue.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
+#include <tqptrqueue.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
// KDE includes.
#include <kconfig.h>
@@ -48,9 +48,9 @@ class TalkerMgr;
* the ID of the application that requested it be spoken, and a sequence number.
*/
struct mlText{
- QString talker; /* Requested Talker code for the sentence. */
- QString text; /* Text of sentence. */
- QCString appId; /* DCOP senderId of the application that requested the speech. */
+ TQString talker; /* Requested Talker code for the sentence. */
+ TQString text; /* Text of sentence. */
+ TQCString appId; /* DCOP senderId of the application that requested the speech. */
uint jobNum; /* Text jobNum. Only applies to text messages; not warning and messages. */
uint seq; /* Sequence number. */
};
@@ -61,11 +61,11 @@ struct mlText{
struct mlJob {
uint jobNum; /* Job number. */
KSpeech::kttsdJobState state; /* Job state. */
- QCString appId; /* DCOP senderId of the application that requested the speech job. */
- QString talker; /* Requested Talker code in which to speak the text. */
+ TQCString appId; /* DCOP senderId of the application that requested the speech job. */
+ TQString talker; /* Requested Talker code in which to speak the text. */
int seq; /* Current sentence being spoken. */
- QValueList<int> partSeqNums; /* List containing last sequence number for each part of a job. */
- QStringList sentences; /* List of sentences in the job. */
+ TQValueList<int> partSeqNums; /* List containing last sequence number for each part of a job. */
+ TQStringList sentences; /* List of sentences in the job. */
int partCount; /* Number of parts in the job. */
};
@@ -84,21 +84,21 @@ struct PooledFilterMgr {
* Struct used to keep notification options.
*/
struct NotifyOptions {
- QString eventName;
+ TQString eventName;
int action;
- QString talker;
- QString customMsg;
+ TQString talker;
+ TQString customMsg;
};
/**
* A list of notification options for a single app, indexed by event.
*/
-typedef QMap<QString, NotifyOptions> NotifyEventMap;
+typedef TQMap<TQString, NotifyOptions> NotifyEventMap;
/**
* A list of notification event maps for all apps, indexed by app.
*/
-typedef QMap<QString, NotifyEventMap> NotifyAppMap;
+typedef TQMap<TQString, NotifyEventMap> NotifyAppMap;
/**
* SpeechData class which is in charge of maintaining all the data on the memory.
@@ -108,7 +108,7 @@ typedef QMap<QString, NotifyEventMap> NotifyAppMap;
* (dcop service) and the Speaker class (speaker, loads plug ins, call plug in
* functions)
*/
-class SpeechData : public QObject {
+class SpeechData : public TQObject {
Q_OBJECT
public:
@@ -142,8 +142,8 @@ class SpeechData : public QObject {
* If an existing Screen Reader output is in progress, it is stopped and discarded and
* replaced with this new message.
*/
- void setScreenReaderOutput(const QString &msg, const QString &talker,
- const QCString& appId);
+ void setScreenReaderOutput(const TQString &msg, const TQString &talker,
+ const TQCString& appId);
/**
* Given an appId, returns the last (most recently queued) Job Number with that appId,
@@ -154,7 +154,7 @@ class SpeechData : public QObject {
* If appId is NULL, returns the Job Number of the last job in the queue.
* Does not change textJobs.current().
*/
- uint findAJobNumByAppId(const QCString& appId);
+ uint findAJobNumByAppId(const TQCString& appId);
/**
* Retrieves the Screen Reader Output.
@@ -169,8 +169,8 @@ class SpeechData : public QObject {
/**
* Add a new warning to the queue.
*/
- void enqueueWarning( const QString &, const QString &talker,
- const QCString& appId);
+ void enqueueWarning( const TQString &, const TQString &talker,
+ const TQCString& appId);
/**
* Pop (get and erase) a warning from the queue.
@@ -188,8 +188,8 @@ class SpeechData : public QObject {
/**
* Add a new message to the queue.
*/
- void enqueueMessage( const QString &, const QString &talker,
- const QCString&);
+ void enqueueMessage( const TQString &, const TQString &talker,
+ const TQCString&);
/**
* Pop (get and erase) a message from the queue.
@@ -219,7 +219,7 @@ class SpeechData : public QObject {
* Changing the sentence delimiter does not affect other applications.
* @see sentenceparsing
*/
- void setSentenceDelimiter(const QString &delimiter, const QCString appId);
+ void setSentenceDelimiter(const TQString &delimiter, const TQCString appId);
/* The following methods correspond to the methods in KSpeech interface. */
@@ -239,7 +239,7 @@ class SpeechData : public QObject {
* job is the first speakable job in the queue, speaking will begin.
* @see startText.
*/
- uint setText(const QString &text, const QString &talker, const QCString& appId);
+ uint setText(const TQString &text, const TQString &talker, const TQCString& appId);
/**
* Adds another part to a text job. Does not start speaking the text.
@@ -255,7 +255,7 @@ class SpeechData : public QObject {
* @see setText.
* @see startText.
*/
- int appendText(const QString &text, const uint jobNum, const QCString& appId);
+ int appendText(const TQString &text, const uint jobNum, const TQCString& appId);
/**
* Get the number of sentences in a text job.
@@ -279,7 +279,7 @@ class SpeechData : public QObject {
* Get a comma-separated list of text job numbers in the queue.
* @return Comma-separated list of text job numbers in the queue.
*/
- QString getTextJobNumbers();
+ TQString getTextJobNumbers();
/**
* Get the state of a text job.
@@ -300,13 +300,13 @@ class SpeechData : public QObject {
/**
* Get information about a text job.
* @param jobNum Job number of the text job.
- * @return A QDataStream containing information about the job.
+ * @return A TQDataStream containing information about the job.
* Blank if no such job.
*
* The stream contains the following elements:
* - int state Job state.
- * - QCString appId DCOP senderId of the application that requested the speech job.
- * - QString talker Talker code as requested by application.
+ * - TQCString appId DCOP senderId of the application that requested the speech job.
+ * - TQString talker Talker code as requested by application.
* - int seq Current sentence being spoken. Sentences are numbered starting at 1.
* - int sentenceCount Total number of sentences in the job.
* - int partNum Current part of the job begin spoken. Parts are numbered starting at 1.
@@ -317,11 +317,11 @@ class SpeechData : public QObject {
*
* The following sample code will decode the stream:
@verbatim
- QByteArray jobInfo = getTextJobInfo(jobNum);
- QDataStream stream(jobInfo, IO_ReadOnly);
+ TQByteArray jobInfo = getTextJobInfo(jobNum);
+ TQDataStream stream(jobInfo, IO_ReadOnly);
int state;
- QCString appId;
- QString talker;
+ TQCString appId;
+ TQString talker;
int seq;
int sentenceCount;
int partNum;
@@ -335,7 +335,7 @@ class SpeechData : public QObject {
stream >> partCount;
@endverbatim
*/
- QByteArray getTextJobInfo(const uint jobNum);
+ TQByteArray getTextJobInfo(const uint jobNum);
/**
* Return a sentence of a job.
@@ -344,7 +344,7 @@ class SpeechData : public QObject {
* @return The specified sentence in the specified job. If no such
* job or sentence, returns "".
*/
- QString getTextJobSentence(const uint jobNum, const uint seq=1);
+ TQString getTextJobSentence(const uint jobNum, const uint seq=1);
/**
* Remove a text job from the queue.
@@ -363,7 +363,7 @@ class SpeechData : public QObject {
* If no plugin has been configured for the specified Talker code,
* defaults to the closest matching talker.
*/
- void changeTextTalker(const QString &talker, uint jobNum);
+ void changeTextTalker(const TQString &talker, uint jobNum);
/**
* Move a text job down in the queue so that it is spoken later.
@@ -451,7 +451,7 @@ class SpeechData : public QObject {
* If no such job, returns "".
* Does not change textJobs.current().
*/
- QCString getAppIdByJobNum(const uint jobNum);
+ TQCString getAppIdByJobNum(const uint jobNum);
/**
* Sets pointer to the TalkerMgr object.
@@ -463,7 +463,7 @@ class SpeechData : public QObject {
/**
* Text pre message
*/
- QString textPreMsg;
+ TQString textPreMsg;
/**
* Text pre message enabled ?
@@ -473,7 +473,7 @@ class SpeechData : public QObject {
/**
* Text pre sound
*/
- QString textPreSnd;
+ TQString textPreSnd;
/**
* Text pre sound enabled ?
@@ -483,7 +483,7 @@ class SpeechData : public QObject {
/**
* Text post message
*/
- QString textPostMsg;
+ TQString textPostMsg;
/**
* Text post message enabled ?
@@ -493,7 +493,7 @@ class SpeechData : public QObject {
/**
* Text post sound
*/
- QString textPostSnd;
+ TQString textPostSnd;
/**
* Text post sound enabled ?
@@ -503,7 +503,7 @@ class SpeechData : public QObject {
/**
* Paragraph pre message
*/
- QString parPreMsg;
+ TQString parPreMsg;
/**
* Paragraph pre message enabled ?
@@ -513,7 +513,7 @@ class SpeechData : public QObject {
/**
* Paragraph pre sound
*/
- QString parPreSnd;
+ TQString parPreSnd;
/**
* Paragraph pre sound enabled ?
@@ -523,7 +523,7 @@ class SpeechData : public QObject {
/**
* Paragraph post message
*/
- QString parPostMsg;
+ TQString parPostMsg;
/**
* Paragraph post message enabled ?
@@ -533,7 +533,7 @@ class SpeechData : public QObject {
/**
* Paragraph post sound
*/
- QString parPostSnd;
+ TQString parPostSnd;
/**
* Paragraph post sound enabled ?
@@ -544,7 +544,7 @@ class SpeechData : public QObject {
* Keep audio files. Do not delete generated tmp wav files.
*/
bool keepAudio;
- QString keepAudioPath;
+ TQString keepAudioPath;
/**
* Notification settings.
@@ -581,7 +581,7 @@ class SpeechData : public QObject {
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textSet(const QCString& appId, const uint jobNum);
+ void textSet(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a new part is appended to a text job.
@@ -590,7 +590,7 @@ class SpeechData : public QObject {
* @param partNum Part number of the new part. Parts are numbered starting
* at 1.
*/
- void textAppended(const QCString& appId, const uint jobNum, const int partNum);
+ void textAppended(const TQCString& appId, const uint jobNum, const int partNum);
/**
* This signal is emitted whenever a text job is deleted from the queue.
@@ -598,7 +598,7 @@ class SpeechData : public QObject {
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
- void textRemoved(const QCString& appId, const uint jobNum);
+ void textRemoved(const TQCString& appId, const uint jobNum);
private:
/**
@@ -609,17 +609,17 @@ class SpeechData : public QObject {
/**
* Queue of warnings
*/
- QPtrQueue<mlJob> warnings;
+ TQPtrQueue<mlJob> warnings;
/**
* Queue of messages
*/
- QPtrQueue<mlJob> messages;
+ TQPtrQueue<mlJob> messages;
/**
* Queue of text jobs.
*/
- QPtrList<mlJob> textJobs;
+ TQPtrList<mlJob> textJobs;
/**
* TalkerMgr object local pointer.
@@ -629,7 +629,7 @@ class SpeechData : public QObject {
/**
* Pool of FilterMgrs.
*/
- QPtrList<PooledFilterMgr> m_pooledFilterMgrs;
+ TQPtrList<PooledFilterMgr> m_pooledFilterMgrs;
/**
* Job counter. Each new job increments this counter.
@@ -639,17 +639,17 @@ class SpeechData : public QObject {
/**
* Talker of the text
*/
- QString textTalker;
+ TQString textTalker;
/**
* Map of sentence delimiters. One per app. If none specified for an app, uses default.
*/
- QMap<QCString, QString> sentenceDelimiters;
+ TQMap<TQCString, TQString> sentenceDelimiters;
/**
* Determines whether the given text is SSML markup.
*/
- bool isSsml(const QString &text);
+ bool isSsml(const TQString &text);
/**
* Given an appId, returns the last (most recently queued) job with that appId.
@@ -659,7 +659,7 @@ class SpeechData : public QObject {
* If appId is NULL, returns the last job in the queue.
* Does not change textJobs.current().
*/
- mlJob* findLastJobByAppId(const QCString& appId);
+ mlJob* findLastJobByAppId(const TQCString& appId);
/**
* Given an appId, returns the last (most recently queued) job with that appId,
@@ -670,7 +670,7 @@ class SpeechData : public QObject {
* If appId is NULL, returns the last job in the queue.
* Does not change textJobs.current().
*/
- mlJob* findAJobByAppId(const QCString& appId);
+ mlJob* findAJobByAppId(const TQCString& appId);
/**
* Given a job and a sequence number, returns the part that sentence is in.
@@ -690,7 +690,7 @@ class SpeechData : public QObject {
* @return List of parsed sentences.
*/
- QStringList parseText(const QString &text, const QCString &appId);
+ TQStringList parseText(const TQString &text, const TQCString &appId);
/**
* Delete expired jobs. At most, one finished job is kept on the queue.
@@ -703,7 +703,7 @@ class SpeechData : public QObject {
/**
* Assigns a FilterMgr to a job and starts filtering on it.
*/
- void startJobFiltering(mlJob* job, const QString& text, bool noSBD);
+ void startJobFiltering(mlJob* job, const TQString& text, bool noSBD);
/**
* Waits for filtering to be completed on a job.
@@ -721,7 +721,7 @@ class SpeechData : public QObject {
/**
* Loads notify events from a file. Clearing data if clear is True.
*/
- void loadNotifyEventsFromFile( const QString& filename, bool clear);
+ void loadNotifyEventsFromFile( const TQString& filename, bool clear);
private slots:
void slotFilterMgrFinished();
diff --git a/kttsd/kttsd/ssmlconvert.cpp b/kttsd/kttsd/ssmlconvert.cpp
index 521a9a6..d33eaf3 100644
--- a/kttsd/kttsd/ssmlconvert.cpp
+++ b/kttsd/kttsd/ssmlconvert.cpp
@@ -20,11 +20,11 @@
***************************************************************************/
// Qt includes.
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdom.h>
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
// KDE includes.
#include <kdeversion.h>
@@ -39,13 +39,13 @@
/// Constructor.
SSMLConvert::SSMLConvert() {
- m_talkers = QStringList();
+ m_talkers = TQStringList();
m_xsltProc = 0;
m_state = tsIdle;
}
/// Constructor. Set the talkers to be used as reference for entered text.
-SSMLConvert::SSMLConvert(const QStringList &talkers) {
+SSMLConvert::SSMLConvert(const TQStringList &talkers) {
m_talkers = talkers;
m_xsltProc = 0;
m_state = tsIdle;
@@ -54,17 +54,17 @@ SSMLConvert::SSMLConvert(const QStringList &talkers) {
/// Destructor.
SSMLConvert::~SSMLConvert() {
delete m_xsltProc;
- if (!m_inFilename.isEmpty()) QFile::remove(m_inFilename);
- if (!m_outFilename.isEmpty()) QFile::remove(m_outFilename);
+ if (!m_inFilename.isEmpty()) TQFile::remove(m_inFilename);
+ if (!m_outFilename.isEmpty()) TQFile::remove(m_outFilename);
}
/// Set the talkers to be used as reference for entered text.
-void SSMLConvert::setTalkers(const QStringList &talkers) {
+void SSMLConvert::setTalkers(const TQStringList &talkers) {
m_talkers = talkers;
}
-QString SSMLConvert::extractTalker(const QString &talkercode) {
- QString t = talkercode.section("synthesizer=", 1, 1);
+TQString SSMLConvert::extractTalker(const TQString &talkercode) {
+ TQString t = talkercode.section("synthesizer=", 1, 1);
t = t.section('"', 1, 1);
if(t.contains("flite"))
return "flite";
@@ -103,17 +103,17 @@ QString SSMLConvert::extractTalker(const QString &talkercode) {
*
* QDom is the item of choice for the matching. Just walk the tree..
*/
-QString SSMLConvert::appropriateTalker(const QString &text) const {
- QDomDocument ssml;
+TQString SSMLConvert::appropriateTalker(const TQString &text) const {
+ TQDomDocument ssml;
ssml.setContent(text, false); // No namespace processing.
/// Matches are stored here. Obviously to begin with every talker matches.
- QStringList matches = m_talkers;
+ TQStringList matches = m_talkers;
/// Check that this is (well formed) SSML and all our searching will not be in vain.
- QDomElement root = ssml.documentElement();
+ TQDomElement root = ssml.documentElement();
if(root.tagName() != "speak") {
// Not SSML.
- return QString::null;
+ return TQString::null;
}
/**
@@ -122,14 +122,14 @@ QString SSMLConvert::appropriateTalker(const QString &text) const {
*
* Storage for talker code components.
*/
- QString talklang, talkvoice, talkgender, talkvolume, talkrate, talkname;
+ TQString talklang, talkvoice, talkgender, talkvolume, talkrate, talkname;
kdDebug() << "SSMLConvert::appropriateTalker: BEFORE LANGUAGE SEARCH: " << matches.join(" ") << endl;;
/**
* Language searching
*/
if(root.hasAttribute("xml:lang")) {
- QString lang = root.attribute("xml:lang");
+ TQString lang = root.attribute("xml:lang");
kdDebug() << "SSMLConvert::appropriateTalker: xml:lang found (" << lang << ")" << endl;
/// If it is set to en*, then match all english speakers. They all sound the same anyways.
if(lang.contains("en-")) {
@@ -153,7 +153,7 @@ QString SSMLConvert::appropriateTalker(const QString &text) const {
* ignore the choice and just use female.
*/
if(root.hasAttribute("gender")) {
- QString gender = root.attribute("gender");
+ TQString gender = root.attribute("gender");
kdDebug() << "SSMLConvert::appropriateTalker: gender found (" << gender << ")" << endl;
/// If the gender found is not 'male' or 'female' then ignore it.
if(!(gender == "male" || gender == "female")) {
@@ -178,7 +178,7 @@ QString SSMLConvert::appropriateTalker(const QString &text) const {
matches.grep("synthesizer=\"Hadifix").count() >= 1) {
kdDebug() << "SSMLConvert::appropriateTalker: Prosody allowed" << endl;
- QStringList tmpmatches = matches.grep("synthesizer=\"Festival Interactive");
+ TQStringList tmpmatches = matches.grep("synthesizer=\"Festival Interactive");
matches = matches.grep("synthesizer=\"Hadifix");
matches = tmpmatches + matches;
}
@@ -203,12 +203,12 @@ QString SSMLConvert::appropriateTalker(const QString &text) const {
* the transformed text.
*/
-bool SSMLConvert::transform(const QString &text, const QString &xsltFilename) {
+bool SSMLConvert::transform(const TQString &text, const TQString &xsltFilename) {
m_xsltFilename = xsltFilename;
/// Write @param text to a temporary file.
KTempFile inFile(locateLocal("tmp", "kttsd-"), ".ssml");
m_inFilename = inFile.file()->name();
- QTextStream* wstream = inFile.textStream();
+ TQTextStream* wstream = inFile.textStream();
if (wstream == 0) {
/// wtf...
kdDebug() << "SSMLConvert::transform: Can't write to " << m_inFilename << endl;;
@@ -239,8 +239,8 @@ bool SSMLConvert::transform(const QString &text, const QString &xsltFilename) {
// kdDebug() << "SSMLConvert::transform: executing command: " <<
// m_xsltProc->args() << endl;
- connect(m_xsltProc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)));
+ connect(m_xsltProc, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(slotProcessExited(KProcess*)));
if (!m_xsltProc->start(KProcess::NotifyOnExit, KProcess::NoCommunication))
{
kdDebug() << "SSMLConvert::transform: Error starting xsltproc" << endl;
@@ -266,26 +266,26 @@ int SSMLConvert::getState() { return m_state; }
/**
* Returns the output from call to transform.
*/
-QString SSMLConvert::getOutput()
+TQString SSMLConvert::getOutput()
{
/// Read back the data that was written to /tmp/fileName.output.
- QFile readfile(m_outFilename);
+ TQFile readfile(m_outFilename);
if(!readfile.open(IO_ReadOnly)) {
/// uhh yeah... Issues writing to the SSML file.
kdDebug() << "SSMLConvert::slotProcessExited: Could not read file " << m_outFilename << endl;
- return QString::null;
+ return TQString::null;
}
- QTextStream rstream(&readfile);
- QString convertedData = rstream.read();
+ TQTextStream rstream(&readfile);
+ TQString convertedData = rstream.read();
readfile.close();
// kdDebug() << "SSMLConvert::slotProcessExited: Read SSML file at " + m_inFilename + " and created " + m_outFilename + " based on the stylesheet at " << m_xsltFilename << endl;
// Clean up.
- QFile::remove(m_inFilename);
- m_inFilename = QString::null;
- QFile::remove(m_outFilename);
- m_outFilename = QString::null;
+ TQFile::remove(m_inFilename);
+ m_inFilename = TQString::null;
+ TQFile::remove(m_outFilename);
+ m_outFilename = TQString::null;
// Ready for another transform.
m_state = tsIdle;
diff --git a/kttsd/kttsd/ssmlconvert.h b/kttsd/kttsd/ssmlconvert.h
index 1ee332c..b9f57bf 100644
--- a/kttsd/kttsd/ssmlconvert.h
+++ b/kttsd/kttsd/ssmlconvert.h
@@ -24,25 +24,25 @@
/**
* SsmlConvert class:
- * Receives a QStringList of talkers and, based on that information,
+ * Receives a TQStringList of talkers and, based on that information,
* evaluates received SSML to discover which of the given talkers best
* suits it. It can then convert the given SSML into a format understandable
* by the talker.
*/
// Qt includes
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
class KProcess;
class QString;
-class SSMLConvert : public QObject {
+class SSMLConvert : public TQObject {
Q_OBJECT
public:
/** Constructors */
SSMLConvert();
- SSMLConvert(const QStringList &talkers);
+ SSMLConvert(const TQStringList &talkers);
/** Destructor */
virtual ~SSMLConvert();
@@ -56,19 +56,19 @@ public:
* Set the talker codes to be used.
* @param talkers talker codes to be used.
*/
- void setTalkers(const QStringList &talkers);
+ void setTalkers(const TQStringList &talkers);
/**
* Extract the synth name from a talker code (i.e festival, flite, freetts).
* @param talkercode the talker code to extract the talker from.
* @returns the talker.
*/
- QString extractTalker(const QString &talkercode);
+ TQString extractTalker(const TQString &talkercode);
/**
* Returns the most appropriate talker for the text to synth's talker code.
* @param text the text that will be parsed.
- * @returns the appropriate talker for the job as a talker code QString.
+ * @returns the appropriate talker for the job as a talker code TQString.
*
* The appropriate talker is the one that has the most features that are required in some
* SSML markup. In the future i'm hoping to make the importance of individual features
@@ -79,7 +79,7 @@ public:
*
* See the implementation file for more detail.
*/
- QString appropriateTalker(const QString &text) const;
+ TQString appropriateTalker(const TQString &text) const;
/**
* Applies the spreadsheet for a talker to the SSML and returns the talker-native output.
@@ -90,7 +90,7 @@ public:
* This converts a piece of SSML into a format the given talker can understand. It applies
* an XSLT spreadsheet to the SSML and returns the output.
*/
- bool transform(const QString &text, const QString &xsltFilename);
+ bool transform(const TQString &text, const TQString &xsltFilename);
/**
* Returns current processing state.
@@ -100,7 +100,7 @@ public:
/**
* Returns the output from call to transform.
*/
- QString getOutput();
+ TQString getOutput();
signals:
/**
@@ -115,15 +115,15 @@ private:
/// The XSLT processor.
KProcess *m_xsltProc;
/// Current talkers.
- QStringList m_talkers;
+ TQStringList m_talkers;
// Current state.
int m_state;
// Name of XSLT file.
- QString m_xsltFilename;
+ TQString m_xsltFilename;
// Name of temporary input file.
- QString m_inFilename;
+ TQString m_inFilename;
// Name of temporary output file.
- QString m_outFilename;
+ TQString m_outFilename;
};
#endif // _SSMLCONVERT_H_
diff --git a/kttsd/kttsd/talkermgr.cpp b/kttsd/kttsd/talkermgr.cpp
index 345f12b..f10281c 100644
--- a/kttsd/kttsd/talkermgr.cpp
+++ b/kttsd/kttsd/talkermgr.cpp
@@ -37,8 +37,8 @@
/**
* Constructor.
*/
-TalkerMgr::TalkerMgr(QObject *parent, const char *name) :
- QObject( parent, name )
+TalkerMgr::TalkerMgr(TQObject *parent, const char *name) :
+ TQObject( parent, name )
{
m_loadedPlugIns.setAutoDelete(true);
}
@@ -66,23 +66,23 @@ int TalkerMgr::loadPlugIns(KConfig* config)
m_loadedTalkerIds.clear();
config->setGroup("General");
- QStringList talkerIDsList = config->readListEntry("TalkerIDs", ',');
+ TQStringList talkerIDsList = config->readListEntry("TalkerIDs", ',');
if (!talkerIDsList.isEmpty())
{
KLibFactory *factory;
- QStringList::ConstIterator itEnd(talkerIDsList.constEnd());
- for( QStringList::ConstIterator it = talkerIDsList.constBegin(); it != itEnd; ++it )
+ TQStringList::ConstIterator itEnd(talkerIDsList.constEnd());
+ for( TQStringList::ConstIterator it = talkerIDsList.constBegin(); it != itEnd; ++it )
{
// kdDebug() << "Loading plugInProc for Talker ID " << *it << endl;
// Talker ID.
- QString talkerID = *it;
+ TQString talkerID = *it;
// Set the group for the language we're loading
config->setGroup("Talker_" + talkerID);
// Get the DesktopEntryName of the plugin we will try to load.
- QString desktopEntryName = config->readEntry("DesktopEntryName", QString::null);
+ TQString desktopEntryName = config->readEntry("DesktopEntryName", TQString::null);
// If a DesktopEntryName is not in the config file, it was configured before
// we started using them, when we stored translated plugin names instead.
@@ -91,7 +91,7 @@ int TalkerMgr::loadPlugIns(KConfig* config)
// and DesktopEntryName won't change.
if (desktopEntryName.isEmpty())
{
- QString synthName = config->readEntry("PlugIn", QString::null);
+ TQString synthName = config->readEntry("PlugIn", TQString::null);
// See if the translated name will untranslate. If not, well, sorry.
desktopEntryName = TalkerCode::TalkerNameToDesktopEntryName(synthName);
// Record the DesktopEntryName from now on.
@@ -99,15 +99,15 @@ int TalkerMgr::loadPlugIns(KConfig* config)
}
// Get the talker code.
- QString talkerCode = config->readEntry("TalkerCode", QString::null);
+ TQString talkerCode = config->readEntry("TalkerCode", TQString::null);
// Normalize the talker code.
- QString fullLanguageCode;
+ TQString fullLanguageCode;
talkerCode = TalkerCode::normalizeTalkerCode(talkerCode, fullLanguageCode);
// Find the KTTSD SynthPlugin.
KTrader::OfferList offers = KTrader::self()->query(
- "KTTSD/SynthPlugin", QString("DesktopEntryName == '%1'").arg(desktopEntryName));
+ "KTTSD/SynthPlugin", TQString("DesktopEntryName == '%1'").arg(desktopEntryName));
if(offers.count() > 1){
++bad;
@@ -134,7 +134,7 @@ int TalkerMgr::loadPlugIns(KConfig* config)
} else {
// Synchronous plugins are run in a separate thread.
// Init will start the thread and it will immediately go to sleep.
- QString threadedPlugInName = QString::fromLatin1("threaded") + desktopEntryName;
+ TQString threadedPlugInName = TQString::fromLatin1("threaded") + desktopEntryName;
ThreadedPlugIn* speechThread = new ThreadedPlugIn(speech,
this, threadedPlugInName.latin1());
speechThread->init(config, "Talker_" + talkerCode);
@@ -172,12 +172,12 @@ int TalkerMgr::loadPlugIns(KConfig* config)
/**
* Get a list of the talkers configured in KTTS.
- * @return A QStringList of fully-specified talker codes, one
+ * @return A TQStringList of fully-specified talker codes, one
* for each talker user has configured.
*/
-QStringList TalkerMgr::getTalkers()
+TQStringList TalkerMgr::getTalkers()
{
- QStringList talkerList;
+ TQStringList talkerList;
for (int ndx = 0; ndx < int(m_loadedPlugIns.count()); ++ndx)
{
talkerList.append(m_loadedTalkerCodes[ndx].getTalkerCode());
@@ -188,7 +188,7 @@ QStringList TalkerMgr::getTalkers()
/**
* Returns a list of all the loaded plugins.
*/
-QPtrList<PlugInProc> TalkerMgr::getLoadedPlugIns()
+TQPtrList<PlugInProc> TalkerMgr::getLoadedPlugIns()
{
return m_loadedPlugIns;
}
@@ -201,7 +201,7 @@ QPtrList<PlugInProc> TalkerMgr::getLoadedPlugIns()
* If a plugin has not been loaded to match the talker, returns the default
* plugin.
*/
-int TalkerMgr::talkerToPluginIndex(const QString& talker) const
+int TalkerMgr::talkerToPluginIndex(const TQString& talker) const
{
// kdDebug() << "TalkerMgr::talkerToPluginIndex: matching talker " << talker << " to closest matching plugin." << endl;
// If we have a cached match, return that.
@@ -228,10 +228,10 @@ int TalkerMgr::talkerToPluginIndex(const QString& talker) const
* overrides all other attributes, i.e, it is treated as an automatic "top priority"
* attribute.
*/
-PlugInProc* TalkerMgr::talkerToPlugin(const QString& talker) const
+PlugInProc* TalkerMgr::talkerToPlugin(const TQString& talker) const
{
int talkerNdx = talkerToPluginIndex(talker);
- return const_cast< QPtrList<PlugInProc>* >(&m_loadedPlugIns)->at(talkerNdx);
+ return const_cast< TQPtrList<PlugInProc>* >(&m_loadedPlugIns)->at(talkerNdx);
}
/**
@@ -249,7 +249,7 @@ PlugInProc* TalkerMgr::talkerToPlugin(const QString& talker) const
* overrides all other attributes, i.e, it is treated as an automatic "top priority"
* attribute.
*/
-TalkerCode* TalkerMgr::talkerToTalkerCode(const QString& talker)
+TalkerCode* TalkerMgr::talkerToTalkerCode(const TQString& talker)
{
int talkerNdx = talkerToPluginIndex(talker);
return new TalkerCode(&m_loadedTalkerCodes[talkerNdx]);
@@ -261,7 +261,7 @@ TalkerCode* TalkerMgr::talkerToTalkerCode(const QString& talker)
* @param talkerCode Talker Code.
* @return Talker ID of the talker that would speak the text job.
*/
-QString TalkerMgr::talkerCodeToTalkerId(const QString& talkerCode)
+TQString TalkerMgr::talkerCodeToTalkerId(const TQString& talkerCode)
{
int talkerNdx = talkerToPluginIndex(talkerCode);
return m_loadedTalkerIds[talkerNdx];
@@ -274,7 +274,7 @@ QString TalkerMgr::talkerCodeToTalkerId(const QString& talkerCode)
* @see talkers
* @see getTalkers
*/
-QString TalkerMgr::userDefaultTalker() const
+TQString TalkerMgr::userDefaultTalker() const
{
return m_loadedTalkerCodes[0].getTalkerCode();
}
@@ -288,25 +288,25 @@ QString TalkerMgr::userDefaultTalker() const
* talker supports the indicated speech markup language.
* @see kttsdMarkupType
*/
-bool TalkerMgr::supportsMarkup(const QString& talker, const uint /*markupType*/) const
+bool TalkerMgr::supportsMarkup(const TQString& talker, const uint /*markupType*/) const
{
kdDebug() << "TalkerMgr::supportsMarkup: Testing talker " << talker << endl;
- QString matchingTalker = talker;
+ TQString matchingTalker = talker;
if (matchingTalker.isEmpty()) matchingTalker = userDefaultTalker();
PlugInProc* plugin = talkerToPlugin(matchingTalker);
return ( plugin->getSsmlXsltFilename() !=
KGlobal::dirs()->resourceDirs("data").last() + "kttsd/xslt/SSMLtoPlainText.xsl");
}
-bool TalkerMgr::autoconfigureTalker(const QString& langCode, KConfig* config)
+bool TalkerMgr::autoconfigureTalker(const TQString& langCode, KConfig* config)
{
// Not yet implemented.
// return false;
- QString languageCode = langCode;
+ TQString languageCode = langCode;
// Get last TalkerID from config.
- QStringList talkerIDsList = config->readListEntry("TalkerIDs", ',');
+ TQStringList talkerIDsList = config->readListEntry("TalkerIDs", ',');
int lastTalkerID = 0;
for (uint talkerIdNdx = 0; talkerIdNdx < talkerIDsList.count(); ++talkerIdNdx)
{
@@ -315,7 +315,7 @@ bool TalkerMgr::autoconfigureTalker(const QString& langCode, KConfig* config)
}
// Assign a new Talker ID for the talker. Wraps around to 1.
- QString talkerID = QString::number(lastTalkerID + 1);
+ TQString talkerID = TQString::number(lastTalkerID + 1);
// Query for all the KTTSD SynthPlugins.
KTrader::OfferList offers = KTrader::self()->query("KTTSD/SynthPlugin");
@@ -324,10 +324,10 @@ bool TalkerMgr::autoconfigureTalker(const QString& langCode, KConfig* config)
for(unsigned int i=0; i < offers.count() ; ++i)
{
// See if this plugin supports the desired language.
- QStringList languageCodes = offers[i]->property("X-KDE-Languages").toStringList();
+ TQStringList languageCodes = offers[i]->property("X-KDE-Languages").toStringList();
if (languageCodes.contains(languageCode))
{
- QString desktopEntryName = offers[i]->desktopEntryName();
+ TQString desktopEntryName = offers[i]->desktopEntryName();
// Load the plugin.
KLibFactory *factory = KLibLoader::self()->factory(offers[0]->library().latin1());
@@ -342,22 +342,22 @@ bool TalkerMgr::autoconfigureTalker(const QString& langCode, KConfig* config)
{
// Give plugin the language code and permit plugin to autoconfigure itself.
loadedTalkerPlugIn->setDesiredLanguage(languageCode);
- loadedTalkerPlugIn->load(config, QString("Talker_")+talkerID);
+ loadedTalkerPlugIn->load(config, TQString("Talker_")+talkerID);
// If plugin was able to configure itself, it returns a full talker code.
- QString talkerCode = loadedTalkerPlugIn->getTalkerCode();
+ TQString talkerCode = loadedTalkerPlugIn->getTalkerCode();
if (!talkerCode.isEmpty())
{
// Erase extraneous Talker configuration entries that might be there.
- config->deleteGroup(QString("Talker_")+talkerID);
+ config->deleteGroup(TQString("Talker_")+talkerID);
// Let plugin save its configuration.
- config->setGroup(QString("Talker_")+talkerID);
- loadedTalkerPlugIn->save(config, QString("Talker_"+talkerID));
+ config->setGroup(TQString("Talker_")+talkerID);
+ loadedTalkerPlugIn->save(config, TQString("Talker_"+talkerID));
// Record configuration data.
- config->setGroup(QString("Talker_")+talkerID);
+ config->setGroup(TQString("Talker_")+talkerID);
config->writeEntry("DesktopEntryName", desktopEntryName);
talkerCode = TalkerCode::normalizeTalkerCode(talkerCode, languageCode);
config->writeEntry("TalkerCode", talkerCode);
diff --git a/kttsd/kttsd/talkermgr.h b/kttsd/kttsd/talkermgr.h
index 5b890ae..52ddc4d 100644
--- a/kttsd/kttsd/talkermgr.h
+++ b/kttsd/kttsd/talkermgr.h
@@ -25,10 +25,10 @@
#define _TALKERMGR_H_
// Qt includes.
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qmap.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
// KTTS includes.
#include "talkercode.h"
@@ -41,7 +41,7 @@ public:
/**
* Constructor.
*/
- TalkerMgr(QObject *parent = 0, const char *name = 0);
+ TalkerMgr(TQObject *parent = 0, const char *name = 0);
/**
* Destructor.
@@ -55,15 +55,15 @@ public:
/**
* Get a list of the talkers configured in KTTS.
- * @return A QStringList of fully-specified talker codes, one
+ * @return A TQStringList of fully-specified talker codes, one
* for each talker user has configured.
*/
- QStringList getTalkers();
+ TQStringList getTalkers();
/**
* Returns a list of all the loaded plugins.
*/
- QPtrList<PlugInProc> getLoadedPlugIns();
+ TQPtrList<PlugInProc> getLoadedPlugIns();
/**
* Given a talker code, returns pointer to the closest matching plugin.
@@ -73,7 +73,7 @@ public:
* If a plugin has not been loaded to match the talker, returns the default
* plugin.
*/
- int talkerToPluginIndex(const QString& talker) const;
+ int talkerToPluginIndex(const TQString& talker) const;
/**
* Given a talker code, returns pointer to the closest matching plugin.
@@ -83,7 +83,7 @@ public:
* If a plugin has not been loaded to match the talker, returns the default
* plugin.
*/
- PlugInProc* talkerToPlugin(const QString& talker) const;
+ PlugInProc* talkerToPlugin(const TQString& talker) const;
/**
* Given a talker code, returns the parsed TalkerCode of the closest matching Talker.
@@ -100,7 +100,7 @@ public:
* overrides all other attributes, i.e, it is treated as an automatic "top priority"
* attribute.
*/
- TalkerCode* talkerToTalkerCode(const QString& talker);
+ TalkerCode* talkerToTalkerCode(const TQString& talker);
/**
* Given a Talker Code, returns the Talker ID of the talker that would speak
@@ -108,7 +108,7 @@ public:
* @param talkerCode Talker Code.
* @return Talker ID of the talker that would speak the text job.
*/
- QString talkerCodeToTalkerId(const QString& talkerCode);
+ TQString talkerCodeToTalkerId(const TQString& talkerCode);
/**
* Get the user's default talker.
@@ -117,7 +117,7 @@ public:
* @see talkers
* @see getTalkers
*/
- QString userDefaultTalker() const;
+ TQString userDefaultTalker() const;
/**
* Determine whether the currently-configured speech plugin supports a speech markup language.
@@ -128,7 +128,7 @@ public:
* talker supports the indicated speech markup language.
* @see kttsdMarkupType
*/
- bool supportsMarkup(const QString& talker, const uint markupType) const;
+ bool supportsMarkup(const TQString& talker, const uint markupType) const;
/**
* Try to automatically configure a Talker in the specified language.
@@ -138,7 +138,7 @@ public:
*
* If successful, the KConfig rc file is updated but the talker has not been loaded.
*/
- bool autoconfigureTalker(const QString& langCode, KConfig* config);
+ bool autoconfigureTalker(const TQString& langCode, KConfig* config);
private:
@@ -146,14 +146,14 @@ private:
* Array of the loaded plug ins for different Talkers.
* Array of parsed Talker Codes for the plugins.
*/
- QPtrList<PlugInProc> m_loadedPlugIns;
- QStringList m_loadedTalkerIds;
+ TQPtrList<PlugInProc> m_loadedPlugIns;
+ TQStringList m_loadedTalkerIds;
TalkerCode::TalkerCodeList m_loadedTalkerCodes;
/**
* Cache of talker codes and index of closest matching Talker.
*/
- mutable QMap<QString,int> m_talkerToPlugInCache;
+ mutable TQMap<TQString,int> m_talkerToPlugInCache;
};
#endif // _TALKERMGR_H_
diff --git a/kttsd/kttsd/threadedplugin.cpp b/kttsd/kttsd/threadedplugin.cpp
index babc792..eacd598 100644
--- a/kttsd/kttsd/threadedplugin.cpp
+++ b/kttsd/kttsd/threadedplugin.cpp
@@ -21,8 +21,8 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
******************************************************************************/
-#include <qevent.h>
-#include <qapplication.h>
+#include <tqevent.h>
+#include <tqapplication.h>
#include <kdebug.h>
@@ -33,11 +33,11 @@
* Constructor.
*/
ThreadedPlugIn::ThreadedPlugIn(PlugInProc* plugin,
- QObject *parent /*= 0*/, const char *name /*= 0*/):
+ TQObject *parent /*= 0*/, const char *name /*= 0*/):
PlugInProc(parent, name),
- QThread(),
+ TQThread(),
m_plugin(plugin),
- m_filename(QString::null),
+ m_filename(TQString::null),
m_requestExit(false),
m_supportsSynth(false)
{
@@ -71,7 +71,7 @@ ThreadedPlugIn::~ThreadedPlugIn()
/**
* Initialize the speech plugin.
*/
-bool ThreadedPlugIn::init(KConfig *config, const QString &configGroup)
+bool ThreadedPlugIn::init(KConfig *config, const TQString &configGroup)
{
bool stat = m_plugin->init(config, configGroup);
m_supportsSynth = m_plugin->supportsSynth();
@@ -87,7 +87,7 @@ bool ThreadedPlugIn::init(KConfig *config, const QString &configGroup)
* If the plugin supports asynchronous operation, it should return immediately
* and emit sayFinished signal when synthesis and audibilizing is finished.
*/
-void ThreadedPlugIn::sayText(const QString &text)
+void ThreadedPlugIn::sayText(const TQString &text)
{
kdDebug() << "ThreadedPlugin::sayText running with text " << text << endl;
waitThreadNotBusy();
@@ -108,7 +108,7 @@ void ThreadedPlugIn::sayText(const QString &text)
* If the plugin supports asynchronous operation, it should return immediately
* and emit synthFinished signal when synthesis is completed.
*/
-void ThreadedPlugIn::synthText(const QString &text, const QString &suggestedFilename)
+void ThreadedPlugIn::synthText(const TQString &text, const TQString &suggestedFilename)
{
waitThreadNotBusy();
m_action = paSynthText;
@@ -125,7 +125,7 @@ void ThreadedPlugIn::synthText(const QString &text, const QString &suggestedFile
*
* The plugin must not re-use the filename.
*/
-QString ThreadedPlugIn::getFilename()
+TQString ThreadedPlugIn::getFilename()
{
return m_filename;
}
@@ -188,7 +188,7 @@ void ThreadedPlugIn::ackFinished()
{
// Since plugin should not be running, don't bother with Mutex here.
if (m_state == psFinished) m_state = psIdle;
- m_filename = QString::null;
+ m_filename = TQString::null;
}
/**
@@ -264,8 +264,8 @@ void ThreadedPlugIn::run()
m_stateMutex.lock();
m_state = psSynthing;
m_stateMutex.unlock();
- QString filename = m_filename;
- m_filename = QString::null;
+ TQString filename = m_filename;
+ m_filename = TQString::null;
kdDebug() << "ThreadedPlugIn::run calling synthText" << endl;
m_plugin->synthText(m_text, filename);
kdDebug() << "ThreadedPlugIn::run back from synthText" << endl;
diff --git a/kttsd/kttsd/threadedplugin.h b/kttsd/kttsd/threadedplugin.h
index bc9ed6a..1a1b13e 100644
--- a/kttsd/kttsd/threadedplugin.h
+++ b/kttsd/kttsd/threadedplugin.h
@@ -24,15 +24,15 @@
#ifndef _THREADEDPLUGIN_H_
#define _THREADEDPLUGIN_H_
-#include <qthread.h>
-#include <qmutex.h>
-#include <qwaitcondition.h>
+#include <tqthread.h>
+#include <tqmutex.h>
+#include <tqwaitcondition.h>
#include "pluginproc.h"
class Speaker;
-class ThreadedPlugIn : public PlugInProc, public QThread
+class ThreadedPlugIn : public PlugInProc, public TQThread
{
public:
enum pluginAction
@@ -45,7 +45,7 @@ class ThreadedPlugIn : public PlugInProc, public QThread
/**
* Constructor.
*/
- ThreadedPlugIn(PlugInProc* plugin, QObject *parent = 0, const char *name = 0);
+ ThreadedPlugIn(PlugInProc* plugin, TQObject *parent = 0, const char *name = 0);
/**
* Destructor.
@@ -55,7 +55,7 @@ class ThreadedPlugIn : public PlugInProc, public QThread
/**
* Initializate the speech plugin.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Say a text. Synthesize and audibilize it.
@@ -64,7 +64,7 @@ class ThreadedPlugIn : public PlugInProc, public QThread
* If the plugin supports asynchronous operation, it should return immediately
* and emit sayFinished signal when synthesis and audibilizing is finished.
*/
- virtual void sayText(const QString &text);
+ virtual void sayText(const TQString &text);
/**
* Synthesize text into an audio file, but do not send to the audio device.
@@ -77,7 +77,7 @@ class ThreadedPlugIn : public PlugInProc, public QThread
* If the plugin supports asynchronous operation, it should return immediately
* and emit synthFinished signal when synthesis is completed.
*/
- virtual void synthText(const QString &text, const QString &suggestedFilename);
+ virtual void synthText(const TQString &text, const TQString &suggestedFilename);
/**
* Get the generated audio filename from synthText.
@@ -86,7 +86,7 @@ class ThreadedPlugIn : public PlugInProc, public QThread
*
* The plugin must not re-use the filename.
*/
- virtual QString getFilename();
+ virtual TQString getFilename();
/**
* Stop current operation (saying or synthesizing text).
@@ -154,7 +154,7 @@ class ThreadedPlugIn : public PlugInProc, public QThread
/**
* A text buffer to go with an action (if applicable).
*/
- QString m_text;
+ TQString m_text;
/**
* Current state of the plugin.
@@ -164,7 +164,7 @@ class ThreadedPlugIn : public PlugInProc, public QThread
/**
* Mutext for accessing state variable.
*/
- QMutex m_stateMutex;
+ TQMutex m_stateMutex;
/**
* True when stopText was called but the plugin did not stop.
@@ -174,17 +174,17 @@ class ThreadedPlugIn : public PlugInProc, public QThread
/**
* Locked when thread is running.
*/
- QMutex m_threadRunningMutex;
+ TQMutex m_threadRunningMutex;
/**
* Filename for generated synthesized text.
*/
- QString m_filename;
+ TQString m_filename;
/**
* Thread wait condition.
*/
- QWaitCondition m_waitCondition;
+ TQWaitCondition m_waitCondition;
/**
* Thread exit flag.
diff --git a/kttsd/kttsjobmgr/kttsjobmgr.cpp b/kttsd/kttsjobmgr/kttsjobmgr.cpp
index 2b2e1c5..91a64fd 100644
--- a/kttsd/kttsjobmgr/kttsjobmgr.cpp
+++ b/kttsd/kttsjobmgr/kttsjobmgr.cpp
@@ -16,16 +16,16 @@
***************************************************************************/
// QT includes.
-#include <qvbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qsplitter.h>
-#include <qclipboard.h>
-#include <qpushbutton.h>
-#include <qobjectlist.h>
-#include <qwhatsthis.h>
+#include <tqvbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqsplitter.h>
+#include <tqclipboard.h>
+#include <tqpushbutton.h>
+#include <tqobjectlist.h>
+#include <tqwhatsthis.h>
-#include <qmime.h>
+#include <tqmime.h>
// KDE includes.
#include <kinstance.h>
@@ -65,10 +65,10 @@ KttsJobMgrFactory::~KttsJobMgrFactory()
s_instance = 0;
}
-QObject *KttsJobMgrFactory::createObject(QObject *parent, const char *name, const char*,
- const QStringList& )
+TQObject *KttsJobMgrFactory::createObject(TQObject *parent, const char *name, const char*,
+ const TQStringList& )
{
- QObject *obj = new KttsJobMgrPart((QWidget*)parent, name);
+ TQObject *obj = new KttsJobMgrPart((TQWidget*)parent, name);
emit objectCreated(obj);
return obj;
}
@@ -86,7 +86,7 @@ KAboutData *KttsJobMgrFactory::aboutData()
return about;
}
-KttsJobMgrPart::KttsJobMgrPart(QWidget *parent, const char *name) :
+KttsJobMgrPart::KttsJobMgrPart(TQWidget *parent, const char *name) :
DCOPStub("kttsd", "KSpeech"),
DCOPObject("kttsjobmgr_kspeechsink"),
KParts::ReadOnlyPart(parent, name)
@@ -100,13 +100,13 @@ KttsJobMgrPart::KttsJobMgrPart(QWidget *parent, const char *name) :
// All the ktts components use the same catalogue.
KGlobal::locale()->insertCatalogue("kttsd");
- // Create a QVBox to host everything.
- QVBox* vBox = new QVBox(parent);
+ // Create a TQVBox to host everything.
+ TQVBox* vBox = new TQVBox(parent);
vBox->setMargin(6);
// Create a splitter to contain the Job List View and the current sentence.
- QSplitter* splitter = new QSplitter(vBox);
- splitter->setOrientation(QSplitter::Vertical);
+ TQSplitter* splitter = new TQSplitter(vBox);
+ splitter->setOrientation(TQSplitter::Vertical);
// Create Job List View widget.
m_jobListView = new KListView(splitter, "joblistview");
@@ -123,7 +123,7 @@ KttsJobMgrPart::KttsJobMgrPart(QWidget *parent, const char *name) :
// Do not sort the list.
m_jobListView->setSorting(-1);
- QString jobListViewWT = i18n(
+ TQString jobListViewWT = i18n(
"<p>These are all the text jobs. The <b>State</b> column "
"may be:"
"<ul>"
@@ -143,156 +143,156 @@ KttsJobMgrPart::KttsJobMgrPart(QWidget *parent, const char *name) :
"<em>Note</em>: Messages, Warnings, and Screen Reader Output do not appear in this list. "
"See the Handbook for more information."
"</p>");
- QWhatsThis::add(m_jobListView, jobListViewWT);
+ TQWhatsThis::add(m_jobListView, jobListViewWT);
- // splitter->setResizeMode(m_jobListView, QSplitter::Stretch);
+ // splitter->setResizeMode(m_jobListView, TQSplitter::Stretch);
// Create a VBox to hold buttons and current sentence.
- QVBox* bottomBox = new QVBox(splitter);
+ TQVBox* bottomBox = new TQVBox(splitter);
// Create a box to hold buttons.
- m_buttonBox = new QVBox(bottomBox);
+ m_buttonBox = new TQVBox(bottomBox);
m_buttonBox->setSpacing(6);
// Create 3 HBoxes to host buttons.
- QHBox* hbox1 = new QHBox(m_buttonBox);
+ TQHBox* hbox1 = new TQHBox(m_buttonBox);
hbox1->setSpacing(6);
- QHBox* hbox2 = new QHBox(m_buttonBox);
+ TQHBox* hbox2 = new TQHBox(m_buttonBox);
hbox2->setSpacing(6);
- QHBox* hbox3 = new QHBox(m_buttonBox);
+ TQHBox* hbox3 = new TQHBox(m_buttonBox);
hbox3->setSpacing(6);
// Do not let button box stretch vertically.
- m_buttonBox->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
+ m_buttonBox->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Fixed));
// All the buttons with "job_" at start of their names will be enabled/disabled when a job is
// selected in the Job List View.
// All the buttons with "part_" at the start of their names will be enabled/disabled when a
// job is selected in the Job List View that has multiple parts.
- QPushButton* btn;
- QString wt;
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("stop", KIcon::Small, 0, true),
+ TQPushButton* btn;
+ TQString wt;
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("stop", KIcon::Small, 0, true),
i18n("Hold"), hbox1, "job_hold");
wt = i18n(
"<p>Changes a job to Paused state. If currently speaking, the job stops speaking. "
"Paused jobs prevent jobs that follow them from speaking, so either click "
"<b>Resume</b> to make the job speakable, or click <b>Later</b> to move it "
"down in the list.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_hold()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("exec", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_hold()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("exec", KIcon::Small, 0, true),
i18n("Resume"), hbox1, "job_resume");
wt = i18n(
"<p>Resumes a paused job or changes a Queued job to Waiting. If the job is the "
"top speakable job in the list, it begins speaking.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_resume()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("redo", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_resume()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("redo", KIcon::Small, 0, true),
i18n("R&estart"), hbox1, "job_restart");
wt = i18n(
"<p>Rewinds a job to the beginning and changes its state to Waiting. If the job "
"is the top speakable job in the list, it begins speaking.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_restart()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("edittrash", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_restart()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("edittrash", KIcon::Small, 0, true),
i18n("Re&move"), hbox1, "job_remove");
wt = i18n(
"<p>Deletes the job. If it is currently speaking, it stops speaking. The next "
"speakable job in the list begins speaking.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_remove()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("down", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_remove()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("down", KIcon::Small, 0, true),
i18n("&Later"), hbox1, "job_later");
wt = i18n(
"<p>Moves a job downward in the list so that it will be spoken later. If the job "
"is currently speaking, its state changes to Paused.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_move()));
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_move()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("2leftarrow", KIcon::Small, 0, true),
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("2leftarrow", KIcon::Small, 0, true),
i18n("Pre&vious Part"), hbox2, "part_prevpart");
wt = i18n(
"<p>Rewinds a multi-part job to the previous part.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_prev_par()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("1leftarrow", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_prev_par()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("1leftarrow", KIcon::Small, 0, true),
i18n("&Previous Sentence"), hbox2, "job_prevsentence");
wt = i18n(
"<p>Rewinds a job to the previous sentence.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_prev_sen()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("1rightarrow", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_prev_sen()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("1rightarrow", KIcon::Small, 0, true),
i18n("&Next Sentence"), hbox2, "job_nextsentence");
wt = i18n(
"<p>Advances a job to the next sentence.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_next_sen()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("2rightarrow", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_next_sen()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("2rightarrow", KIcon::Small, 0, true),
i18n("Ne&xt Part"), hbox2, "part_nextpart");
wt = i18n(
"<p>Advances a multi-part job to the next part.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_next_par()));
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_next_par()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("klipper", KIcon::Small, 0, true),
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("klipper", KIcon::Small, 0, true),
i18n("&Speak Clipboard"), hbox3, "speak_clipboard");
wt = i18n(
"<p>Queues the current contents of the clipboard for speaking and sets its state "
"to Waiting. If the job is the topmost in the list, it begins speaking. "
"The job will be spoken by the topmost Talker in the <b>Talkers</b> tab.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_speak_clipboard()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("fileopen", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_speak_clipboard()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("fileopen", KIcon::Small, 0, true),
i18n("Spea&k File"), hbox3, "speak_file");
wt = i18n(
"<p>Prompts you for a file name and queues the contents of the file for speaking. "
"You must click the <b>Resume</b> button before the job will be speakable. "
"The job will be spoken by the topmost Talker in the <b>Talkers</b> tab.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_speak_file()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("translate", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_speak_file()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("translate", KIcon::Small, 0, true),
i18n("Change Talker"), hbox3, "job_changetalker");
wt = i18n(
"<p>Prompts you with a list of your configured Talkers from the <b>Talkers</b> tab. "
"The job will be spoken using the selected Talker.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_job_change_talker()));
- btn = new QPushButton(KGlobal::iconLoader()->loadIconSet("reload_page", KIcon::Small, 0, true),
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_job_change_talker()));
+ btn = new TQPushButton(KGlobal::iconLoader()->loadIconSet("reload_page", KIcon::Small, 0, true),
i18n("&Refresh"), hbox3, "refresh");
wt = i18n(
"<p>Refresh the list of jobs.</p>");
- QWhatsThis::add(btn, wt);
- connect (btn, SIGNAL(clicked()), this, SLOT(slot_refresh()));
+ TQWhatsThis::add(btn, wt);
+ connect (btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(slot_refresh()));
// Disable job buttons until a job is selected.
enableJobActions(false);
enableJobPartActions(false);
// Create a VBox for the current sentence and sentence label.
- QVBox* sentenceVBox = new QVBox(bottomBox);
+ TQVBox* sentenceVBox = new TQVBox(bottomBox);
// Create a label for current sentence.
- QLabel* currentSentenceLabel = new QLabel(sentenceVBox);
- currentSentenceLabel->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
+ TQLabel* currentSentenceLabel = new TQLabel(sentenceVBox);
+ currentSentenceLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Fixed));
currentSentenceLabel->setText(i18n("Current Sentence"));
// Create a box to contain the current sentence.
m_currentSentence = new KTextEdit(sentenceVBox);
m_currentSentence->setReadOnly(true);
- m_currentSentence->setWordWrap(QTextEdit::WidgetWidth);
- m_currentSentence->setWrapPolicy(QTextEdit::AtWordOrDocumentBoundary);
- m_currentSentence->setHScrollBarMode(QScrollView::AlwaysOff);
- m_currentSentence->setVScrollBarMode(QScrollView::Auto);
+ m_currentSentence->setWordWrap(TQTextEdit::WidgetWidth);
+ m_currentSentence->setWrapPolicy(TQTextEdit::AtWordOrDocumentBoundary);
+ m_currentSentence->setHScrollBarMode(TQScrollView::AlwaysOff);
+ m_currentSentence->setVScrollBarMode(TQScrollView::Auto);
wt = i18n(
"<p>The text of the sentence currently speaking.</p>");
- QWhatsThis::add(m_currentSentence, wt);
+ TQWhatsThis::add(m_currentSentence, wt);
// Set the main widget for the part.
setWidget(vBox);
- connect(m_jobListView, SIGNAL(selectionChanged(QListViewItem* )),
- this, SLOT(slot_selectionChanged(QListViewItem* )));
+ connect(m_jobListView, TQT_SIGNAL(selectionChanged(TQListViewItem* )),
+ this, TQT_SLOT(slot_selectionChanged(TQListViewItem* )));
// Fill the Job List View.
refreshJobListView();
@@ -305,44 +305,44 @@ KttsJobMgrPart::KttsJobMgrPart(QWidget *parent, const char *name) :
"kttsdStarted()",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "markerSeen(QCString,QString)",
- "markerSeen(QCString,QString)",
+ "markerSeen(TQCString,TQString)",
+ "markerSeen(TQCString,TQString)",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "sentenceStarted(QCString,uint,uint)",
- "sentenceStarted(QCString,uint,uint)",
+ "sentenceStarted(TQCString,uint,uint)",
+ "sentenceStarted(TQCString,uint,uint)",
false);
connectDCOPSignal(0, 0,
- "sentenceFinished(QCString,uint,uint)",
- "sentenceFinished(QCString,uint,uint)",
+ "sentenceFinished(TQCString,uint,uint)",
+ "sentenceFinished(TQCString,uint,uint)",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "textSet(QCString,uint)",
- "textSet(QCString,uint)",
+ "textSet(TQCString,uint)",
+ "textSet(TQCString,uint)",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "textStarted(QCString,uint)",
- "textStarted(QCString,uint)",
+ "textStarted(TQCString,uint)",
+ "textStarted(TQCString,uint)",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "textFinished(QCString,uint)",
- "textFinished(QCString,uint)",
+ "textFinished(TQCString,uint)",
+ "textFinished(TQCString,uint)",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "textStopped(QCString,uint)",
- "textStopped(QCString,uint)",
+ "textStopped(TQCString,uint)",
+ "textStopped(TQCString,uint)",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "textPaused(QCString,uint)",
- "textPaused(QCString,uint)",
+ "textPaused(TQCString,uint)",
+ "textPaused(TQCString,uint)",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "textResumed(QCString,uint)",
- "textResumed(QCString,uint)",
+ "textResumed(TQCString,uint)",
+ "textResumed(TQCString,uint)",
false);
connectDCOPSignal("kttsd", "KSpeech",
- "textRemoved(QCString,uint)",
- "textRemoved(QCString,uint)",
+ "textRemoved(TQCString,uint)",
+ "textRemoved(TQCString,uint)",
false);
m_extension = new KttsJobMgrBrowserExtension(this);
@@ -351,7 +351,7 @@ KttsJobMgrPart::KttsJobMgrPart(QWidget *parent, const char *name) :
// Divide splitter in half. ListView gets half. Buttons and Current Sentence get half.
int halfSplitterSize = splitter->height()/2;
- QValueList<int> splitterSizes;
+ TQValueList<int> splitterSizes;
splitterSizes.append(halfSplitterSize);
splitterSizes.append(halfSplitterSize);
splitter->setSizes(splitterSizes);
@@ -375,7 +375,7 @@ bool KttsJobMgrPart::closeURL()
/**
* This slot is connected to the Job List View selectionChanged signal.
*/
-void KttsJobMgrPart::slot_selectionChanged(QListViewItem*)
+void KttsJobMgrPart::slot_selectionChanged(TQListViewItem*)
{
// Enable job buttons.
enableJobActions(true);
@@ -478,20 +478,20 @@ void KttsJobMgrPart::slot_job_move()
moveTextLater(jobNum);
refreshJobListView();
// Select the job we just moved.
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item) m_jobListView->setSelected(item, true);
}
}
void KttsJobMgrPart::slot_job_change_talker()
{
- QListViewItem* item = m_jobListView->selectedItem();
+ TQListViewItem* item = m_jobListView->selectedItem();
if (item)
{
- QString talkerID = item->text(jlvcTalkerID);
- QStringList talkerIDs = m_talkerCodesToTalkerIDs.values();
+ TQString talkerID = item->text(jlvcTalkerID);
+ TQStringList talkerIDs = m_talkerCodesToTalkerIDs.values();
int ndx = talkerIDs.findIndex(talkerID);
- QString talkerCode;
+ TQString talkerCode;
if (ndx >= 0) talkerCode = m_talkerCodesToTalkerIDs.keys()[ndx];
SelectTalkerDlg dlg(widget(), "selecttalkerdialog", i18n("Select Talker"), talkerCode, true);
int dlgResult = dlg.exec();
@@ -510,24 +510,24 @@ void KttsJobMgrPart::slot_speak_clipboard()
// Copy text from the clipboard.
- QString text;
- QMimeSource* data = cb->data();
+ TQString text;
+ TQMimeSource* data = cb->data();
if (data)
{
if (data->provides("text/html"))
{
if (supportsMarkup(NULL, KSpeech::mtHtml))
{
- QByteArray d = data->encodedData("text/html");
- text = QString(d);
+ TQByteArray d = data->encodedData("text/html");
+ text = TQString(d);
}
}
if (data->provides("text/ssml"))
{
if (supportsMarkup(NULL, KSpeech::mtSsml))
{
- QByteArray d = data->encodedData("text/ssml");
- text = QString(d);
+ TQByteArray d = data->encodedData("text/ssml");
+ text = TQString(d);
}
}
}
@@ -567,7 +567,7 @@ void KttsJobMgrPart::slot_refresh()
// Select the previously-selected job.
if (jobNum)
{
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item) m_jobListView->setSelected(item, true);
}
}
@@ -578,7 +578,7 @@ void KttsJobMgrPart::slot_refresh()
* @param state KTTSD job state
* @return Display string for the state.
*/
-QString KttsJobMgrPart::stateToStr(int state)
+TQString KttsJobMgrPart::stateToStr(int state)
{
switch( state )
{
@@ -599,10 +599,10 @@ QString KttsJobMgrPart::stateToStr(int state)
uint KttsJobMgrPart::getCurrentJobNum()
{
uint jobNum = 0;
- QListViewItem* item = m_jobListView->selectedItem();
+ TQListViewItem* item = m_jobListView->selectedItem();
if (item)
{
- QString jobNumStr = item->text(jlvcJobNum);
+ TQString jobNumStr = item->text(jlvcJobNum);
jobNum = jobNumStr.toUInt(0, 10);
}
return jobNum;
@@ -616,10 +616,10 @@ uint KttsJobMgrPart::getCurrentJobNum()
int KttsJobMgrPart::getCurrentJobPartCount()
{
int partCount = 0;
- QListViewItem* item = m_jobListView->selectedItem();
+ TQListViewItem* item = m_jobListView->selectedItem();
if (item)
{
- QString partCountStr = item->text(jlvcPartCount);
+ TQString partCountStr = item->text(jlvcPartCount);
partCount = partCountStr.toUInt(0, 10);
}
return partCount;
@@ -628,11 +628,11 @@ int KttsJobMgrPart::getCurrentJobPartCount()
/**
* Given a Job Number, returns the Job List View item containing the job.
* @param jobNum Job Number.
-* @return QListViewItem containing the job or 0 if not found.
+* @return TQListViewItem containing the job or 0 if not found.
*/
-QListViewItem* KttsJobMgrPart::findItemByJobNum(const uint jobNum)
+TQListViewItem* KttsJobMgrPart::findItemByJobNum(const uint jobNum)
{
- return m_jobListView->findItem(QString::number(jobNum), jlvcJobNum);
+ return m_jobListView->findItem(TQString::number(jobNum), jlvcJobNum);
}
/**
@@ -641,11 +641,11 @@ QListViewItem* KttsJobMgrPart::findItemByJobNum(const uint jobNum)
*/
void KttsJobMgrPart::refreshJob(uint jobNum)
{
- QByteArray jobInfo = getTextJobInfo(jobNum);
- QDataStream stream(jobInfo, IO_ReadOnly);
+ TQByteArray jobInfo = getTextJobInfo(jobNum);
+ TQDataStream stream(jobInfo, IO_ReadOnly);
int state;
- QCString appId;
- QString talker;
+ TQCString appId;
+ TQString talker;
int seq;
int sentenceCount;
int partNum;
@@ -657,16 +657,16 @@ void KttsJobMgrPart::refreshJob(uint jobNum)
stream >> sentenceCount;
stream >> partNum;
stream >> partCount;
- QString talkerID = cachedTalkerCodeToTalkerID(talker);
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQString talkerID = cachedTalkerCodeToTalkerID(talker);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item)
{
item->setText(jlvcTalkerID, talkerID);
item->setText(jlvcState, stateToStr(state));
- item->setText(jlvcPosition, QString::number(seq));
- item->setText(jlvcSentences, QString::number(sentenceCount));
- item->setText(jlvcPartNum, QString::number(partNum));
- item->setText(jlvcPartCount, QString::number(partCount));
+ item->setText(jlvcPosition, TQString::number(seq));
+ item->setText(jlvcSentences, TQString::number(sentenceCount));
+ item->setText(jlvcPartNum, TQString::number(partNum));
+ item->setText(jlvcPartCount, TQString::number(partCount));
}
}
@@ -679,21 +679,21 @@ void KttsJobMgrPart::refreshJobListView()
m_jobListView->clear();
enableJobActions(false);
enableJobPartActions(false);
- QString jobNumbers = getTextJobNumbers();
+ TQString jobNumbers = getTextJobNumbers();
// kdDebug() << "jobNumbers: " << jobNumbers << endl;
- QStringList jobNums = QStringList::split(",", jobNumbers);
- QListViewItem* lastItem = 0;
- QStringList::ConstIterator endJobNums(jobNums.constEnd());
- for( QStringList::ConstIterator it = jobNums.constBegin(); it != endJobNums; ++it)
+ TQStringList jobNums = TQStringList::split(",", jobNumbers);
+ TQListViewItem* lastItem = 0;
+ TQStringList::ConstIterator endJobNums(jobNums.constEnd());
+ for( TQStringList::ConstIterator it = jobNums.constBegin(); it != endJobNums; ++it)
{
- QString jobNumStr = *it;
+ TQString jobNumStr = *it;
// kdDebug() << "jobNumStr: " << jobNumStr << endl;
uint jobNum = jobNumStr.toUInt(0, 10);
- QByteArray jobInfo = getTextJobInfo(jobNum);
- QDataStream stream(jobInfo, IO_ReadOnly);
+ TQByteArray jobInfo = getTextJobInfo(jobNum);
+ TQDataStream stream(jobInfo, IO_ReadOnly);
int state;
- QCString appId;
- QString talkerCode;
+ TQCString appId;
+ TQString talkerCode;
int seq;
int sentenceCount;
int partNum;
@@ -705,16 +705,16 @@ void KttsJobMgrPart::refreshJobListView()
stream >> sentenceCount;
stream >> partNum;
stream >> partCount;
- QString talkerID = cachedTalkerCodeToTalkerID(talkerCode);
+ TQString talkerID = cachedTalkerCodeToTalkerID(talkerCode);
// Append to list.
if (lastItem)
- lastItem = new QListViewItem(m_jobListView, lastItem, jobNumStr, appId, talkerID,
- stateToStr(state), QString::number(seq), QString::number(sentenceCount),
- QString::number(partNum), QString::number(partCount));
+ lastItem = new TQListViewItem(m_jobListView, lastItem, jobNumStr, appId, talkerID,
+ stateToStr(state), TQString::number(seq), TQString::number(sentenceCount),
+ TQString::number(partNum), TQString::number(partCount));
else
- lastItem = new QListViewItem(m_jobListView, jobNumStr, appId, talkerID,
- stateToStr(state), QString::number(seq), QString::number(sentenceCount),
- QString::number(partNum), QString::number(partCount));
+ lastItem = new TQListViewItem(m_jobListView, jobNumStr, appId, talkerID,
+ stateToStr(state), TQString::number(seq), TQString::number(sentenceCount),
+ TQString::number(partNum), TQString::number(partCount));
}
}
@@ -727,7 +727,7 @@ void KttsJobMgrPart::autoSelectInJobListView()
// If something selected, nothing to do.
if (m_jobListView->selectedItem()) return;
// If empty, disable job buttons.
- QListViewItem* item = m_jobListView->firstChild();
+ TQListViewItem* item = m_jobListView->firstChild();
if (!item)
{
enableJobActions(false);
@@ -743,7 +743,7 @@ void KttsJobMgrPart::autoSelectInJobListView()
* @param talkerCode Talker Code.
* @return Talker ID.
*/
-QString KttsJobMgrPart::cachedTalkerCodeToTalkerID(const QString& talkerCode)
+TQString KttsJobMgrPart::cachedTalkerCodeToTalkerID(const TQString& talkerCode)
{
// If in the cache, return that.
if (m_talkerCodesToTalkerIDs.contains(talkerCode))
@@ -751,7 +751,7 @@ QString KttsJobMgrPart::cachedTalkerCodeToTalkerID(const QString& talkerCode)
else
{
// Otherwise, retrieve Talker ID from KTTSD and cache it.
- QString talkerID = talkerCodeToTalkerId(talkerCode);
+ TQString talkerID = talkerCodeToTalkerId(talkerCode);
m_talkerCodesToTalkerIDs[talkerCode] = talkerID;
return talkerID;
}
@@ -764,30 +764,30 @@ QString KttsJobMgrPart::cachedTalkerCodeToTalkerID(const QString& talkerCode)
void KttsJobMgrPart::enableJobActions(bool enable)
{
if (!m_buttonBox) return;
- QObjectList *l = m_buttonBox->queryList( "QPushButton", "job_*", true, true );
- QObjectListIt it( *l ); // iterate over the buttons
- QObject *obj;
+ TQObjectList *l = m_buttonBox->queryList( "TQPushButton", "job_*", true, true );
+ TQObjectListIt it( *l ); // iterate over the buttons
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
// for each found object...
++it;
- ((QPushButton*)obj)->setEnabled( enable );
+ ((TQPushButton*)obj)->setEnabled( enable );
}
delete l; // delete the list, not the objects
if (enable)
{
// Later button only enables if currently selected list item is not bottom of list.
- QListViewItem* item = m_jobListView->selectedItem();
+ TQListViewItem* item = m_jobListView->selectedItem();
if (item)
{
bool enableLater = item->nextSibling();
- l = m_buttonBox->queryList( "QPushButton", "job_later", false, true );
- it = QObjectListIt( *l ); // iterate over the buttons
+ l = m_buttonBox->queryList( "TQPushButton", "job_later", false, true );
+ it = TQObjectListIt( *l ); // iterate over the buttons
if ( (obj = it.current()) != 0 ) {
// for each found object...
- ((QPushButton*)obj)->setEnabled( enableLater );
+ ((TQPushButton*)obj)->setEnabled( enableLater );
}
delete l; // delete the list, not the objects
}
@@ -801,14 +801,14 @@ void KttsJobMgrPart::enableJobActions(bool enable)
void KttsJobMgrPart::enableJobPartActions(bool enable)
{
if (!m_buttonBox) return;
- QObjectList *l = m_buttonBox->queryList( "QPushButton", "part_*", true, true );
- QObjectListIt it( *l ); // iterate over the buttons
- QObject *obj;
+ TQObjectList *l = m_buttonBox->queryList( "TQPushButton", "part_*", true, true );
+ TQObjectListIt it( *l ); // iterate over the buttons
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
// for each found object...
++it;
- ((QPushButton*)obj)->setEnabled( enable );
+ ((TQPushButton*)obj)->setEnabled( enable );
}
delete l; // delete the list, not the objects
}
@@ -826,7 +826,7 @@ ASYNC KttsJobMgrPart::kttsdStarted() { slot_refresh(); }
* @param markerName The name of the marker seen.
* @see markers
*/
-ASYNC KttsJobMgrPart::markerSeen(const QCString&, const QString&)
+ASYNC KttsJobMgrPart::markerSeen(const TQCString&, const TQString&)
{
}
@@ -837,14 +837,14 @@ ASYNC KttsJobMgrPart::markerSeen(const QCString&, const QString&)
* @param seq Sequence number of the text.
* @see getTextCount
*/
-ASYNC KttsJobMgrPart::sentenceStarted(const QCString&, const uint jobNum, const uint seq)
+ASYNC KttsJobMgrPart::sentenceStarted(const TQCString&, const uint jobNum, const uint seq)
{
// kdDebug() << "KttsJobMgrPart::sentencedStarted: jobNum = " << jobNum << " seq = " << seq << endl;
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item)
{
item->setText(jlvcState, stateToStr(KSpeech::jsSpeaking));
- item->setText(jlvcPosition, QString::number(seq));
+ item->setText(jlvcPosition, TQString::number(seq));
m_currentSentence->setText(getTextJobSentence(jobNum, seq));
}
}
@@ -856,11 +856,11 @@ ASYNC KttsJobMgrPart::sentenceStarted(const QCString&, const uint jobNum, const
* @param seq Sequence number of the text.
* @see getTextCount
*/
-ASYNC KttsJobMgrPart::sentenceFinished(const QCString& /*appId*/, const uint /*jobNum*/, const uint /*seq*/)
+ASYNC KttsJobMgrPart::sentenceFinished(const TQCString& /*appId*/, const uint /*jobNum*/, const uint /*seq*/)
{
// kdDebug() << "KttsJobMgrPart::sentencedFinished: jobNum = " << jobNum << endl;
/*
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item)
{
item->setText(jlvcState, stateToStr(KSpeech::jsSpeaking));
@@ -873,13 +873,13 @@ ASYNC KttsJobMgrPart::sentenceFinished(const QCString& /*appId*/, const uint /*j
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
-ASYNC KttsJobMgrPart::textSet(const QCString&, const uint jobNum)
+ASYNC KttsJobMgrPart::textSet(const TQCString&, const uint jobNum)
{
- QByteArray jobInfo = getTextJobInfo(jobNum);
- QDataStream stream(jobInfo, IO_ReadOnly);
+ TQByteArray jobInfo = getTextJobInfo(jobNum);
+ TQDataStream stream(jobInfo, IO_ReadOnly);
int state;
- QCString appId;
- QString talkerCode;
+ TQCString appId;
+ TQString talkerCode;
int seq;
int sentenceCount;
int partNum;
@@ -891,11 +891,11 @@ ASYNC KttsJobMgrPart::textSet(const QCString&, const uint jobNum)
stream >> sentenceCount;
stream >> partNum;
stream >> partCount;
- QString talkerID = cachedTalkerCodeToTalkerID(talkerCode);
- QListViewItem* item = new QListViewItem(m_jobListView, m_jobListView->lastItem(),
- QString::number(jobNum), appId, talkerID,
- stateToStr(state), QString::number(seq), QString::number(sentenceCount),
- QString::number(partNum), QString::number(partCount));
+ TQString talkerID = cachedTalkerCodeToTalkerID(talkerCode);
+ TQListViewItem* item = new TQListViewItem(m_jobListView, m_jobListView->lastItem(),
+ TQString::number(jobNum), appId, talkerID,
+ stateToStr(state), TQString::number(seq), TQString::number(sentenceCount),
+ TQString::number(partNum), TQString::number(partCount));
// Should we select this job?
if (m_selectOnTextSet)
{
@@ -913,7 +913,7 @@ ASYNC KttsJobMgrPart::textSet(const QCString&, const uint jobNum)
* @param partNum Part number of the new part. Parts are numbered starting
* at 1.
*/
-ASYNC KttsJobMgrPart::textAppended(const QCString& appId, const uint jobNum, const int /*partNum*/)
+ASYNC KttsJobMgrPart::textAppended(const TQCString& appId, const uint jobNum, const int /*partNum*/)
{
textSet(appId, jobNum);
}
@@ -923,9 +923,9 @@ ASYNC KttsJobMgrPart::textAppended(const QCString& appId, const uint jobNum, con
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
-ASYNC KttsJobMgrPart::textStarted(const QCString&, const uint jobNum)
+ASYNC KttsJobMgrPart::textStarted(const TQCString&, const uint jobNum)
{
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item)
{
item->setText(jlvcState, stateToStr(KSpeech::jsSpeaking));
@@ -942,17 +942,17 @@ ASYNC KttsJobMgrPart::textStarted(const QCString&, const uint jobNum)
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
-ASYNC KttsJobMgrPart::textFinished(const QCString&, const uint jobNum)
+ASYNC KttsJobMgrPart::textFinished(const TQCString&, const uint jobNum)
{
// kdDebug() << "KttsJobMgrPart::textFinished: jobNum = " << jobNum << endl;
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item)
{
item->setText(jlvcState, stateToStr(KSpeech::jsFinished));
// Update sentence pointer, since signal may not be emitted for final CR.
refreshJob(jobNum);
}
- m_currentSentence->setText(QString::null);
+ m_currentSentence->setText(TQString::null);
}
/**
@@ -960,10 +960,10 @@ ASYNC KttsJobMgrPart::textFinished(const QCString&, const uint jobNum)
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
-ASYNC KttsJobMgrPart::textStopped(const QCString&, const uint jobNum)
+ASYNC KttsJobMgrPart::textStopped(const TQCString&, const uint jobNum)
{
// kdDebug() << "KttsJobMgrPart::textStopped: jobNum = " << jobNum << endl;
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item)
{
item->setText(jlvcState, stateToStr(KSpeech::jsQueued));
@@ -976,10 +976,10 @@ ASYNC KttsJobMgrPart::textStopped(const QCString&, const uint jobNum)
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
-ASYNC KttsJobMgrPart::textPaused(const QCString&, const uint jobNum)
+ASYNC KttsJobMgrPart::textPaused(const TQCString&, const uint jobNum)
{
// kdDebug() << "KttsJobMgrPart::textPaused: jobNum = " << jobNum << endl;
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item)
{
item->setText(jlvcState, stateToStr(KSpeech::jsPaused));
@@ -991,9 +991,9 @@ ASYNC KttsJobMgrPart::textPaused(const QCString&, const uint jobNum)
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
-ASYNC KttsJobMgrPart::textResumed(const QCString&, const uint jobNum)
+ASYNC KttsJobMgrPart::textResumed(const TQCString&, const uint jobNum)
{
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
if (item)
{
item->setText(jlvcState, stateToStr(KSpeech::jsSpeaking));
@@ -1006,9 +1006,9 @@ ASYNC KttsJobMgrPart::textResumed(const QCString&, const uint jobNum)
* @param appId The DCOP senderId of the application that created the job.
* @param jobNum Job number of the text job.
*/
-ASYNC KttsJobMgrPart::textRemoved(const QCString&, const uint jobNum)
+ASYNC KttsJobMgrPart::textRemoved(const TQCString&, const uint jobNum)
{
- QListViewItem* item = findItemByJobNum(jobNum);
+ TQListViewItem* item = findItemByJobNum(jobNum);
delete item;
autoSelectInJobListView();
}
diff --git a/kttsd/kttsjobmgr/kttsjobmgr.h b/kttsd/kttsjobmgr/kttsjobmgr.h
index 6bb4898..a49e8f8 100644
--- a/kttsd/kttsjobmgr/kttsjobmgr.h
+++ b/kttsd/kttsjobmgr/kttsjobmgr.h
@@ -41,9 +41,9 @@ public:
KttsJobMgrFactory() {};
virtual ~KttsJobMgrFactory();
- virtual QObject* createObject(QObject* parent = 0, const char* name = 0,
- const char* classname = "QObject",
- const QStringList &args = QStringList());
+ virtual TQObject* createObject(TQObject* parent = 0, const char* name = 0,
+ const char* classname = "TQObject",
+ const TQStringList &args = TQStringList());
static KInstance *instance();
static KAboutData *aboutData();
@@ -59,7 +59,7 @@ class KttsJobMgrPart:
{
Q_OBJECT
public:
- KttsJobMgrPart(QWidget *parent, const char *name);
+ KttsJobMgrPart(TQWidget *parent, const char *name);
virtual ~KttsJobMgrPart();
protected:
@@ -78,7 +78,7 @@ protected:
* @param markerName The name of the marker seen.
* @see markers
*/
- ASYNC markerSeen(const QCString& appId, const QString& markerName);
+ ASYNC markerSeen(const TQCString& appId, const TQString& markerName);
/**
* This signal is emitted whenever a sentence begins speaking.
* @param appId DCOP application ID of the application that queued the text.
@@ -86,7 +86,7 @@ protected:
* @param seq Sequence number of the text.
* @see getTextCount
*/
- ASYNC sentenceStarted(const QCString& appId, const uint jobNum, const uint seq);
+ ASYNC sentenceStarted(const TQCString& appId, const uint jobNum, const uint seq);
/**
* This signal is emitted when a sentence has finished speaking.
* @param appId DCOP application ID of the application that queued the text.
@@ -94,14 +94,14 @@ protected:
* @param seq Sequence number of the text.
* @see getTextCount
*/
- ASYNC sentenceFinished(const QCString& appId, const uint jobNum, const uint seq);
+ ASYNC sentenceFinished(const TQCString& appId, const uint jobNum, const uint seq);
/**
* This signal is emitted whenever a new text job is added to the queue.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- ASYNC textSet(const QCString& appId, const uint jobNum);
+ ASYNC textSet(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a new part is appended to a text job.
@@ -110,14 +110,14 @@ protected:
* @param partNum Part number of the new part. Parts are numbered starting
* at 1.
*/
- ASYNC textAppended(const QCString& appId, const uint jobNum, const int partNum);
+ ASYNC textAppended(const TQCString& appId, const uint jobNum, const int partNum);
/**
* This signal is emitted whenever speaking of a text job begins.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- ASYNC textStarted(const QCString& appId, const uint jobNum);
+ ASYNC textStarted(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a text job is finished. The job has
* been marked for deletion from the queue and will be deleted when another
@@ -127,38 +127,38 @@ protected:
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- ASYNC textFinished(const QCString& appId, const uint jobNum);
+ ASYNC textFinished(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a speaking text job stops speaking.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- ASYNC textStopped(const QCString& appId, const uint jobNum);
+ ASYNC textStopped(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a speaking text job is paused.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- ASYNC textPaused(const QCString& appId, const uint jobNum);
+ ASYNC textPaused(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted when a text job, that was previously paused, resumes speaking.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- ASYNC textResumed(const QCString& appId, const uint jobNum);
+ ASYNC textResumed(const TQCString& appId, const uint jobNum);
/**
* This signal is emitted whenever a text job is deleted from the queue.
* The job is no longer in the queue when this signal is emitted.
* @param appId The DCOP senderId of the application that created the job. NULL if kttsd.
* @param jobNum Job number of the text job.
*/
- ASYNC textRemoved(const QCString& appId, const uint jobNum);
+ ASYNC textRemoved(const TQCString& appId, const uint jobNum);
private slots:
/**
* This slot is connected to the Job List View selectionChanged signal.
*/
- void slot_selectionChanged(QListViewItem* item);
+ void slot_selectionChanged(TQListViewItem* item);
/**
* Slots connected to buttons.
*/
@@ -198,7 +198,7 @@ private:
* @param state KTTSD job state
* @return Display string for the state.
*/
- QString stateToStr(int state);
+ TQString stateToStr(int state);
/**
* Get the Job Number of the currently-selected job in the Job List View.
@@ -217,9 +217,9 @@ private:
/**
* Given a Job Number, returns the Job List View item containing the job.
* @param jobNum Job Number.
- * @return QListViewItem containing the job or 0 if not found.
+ * @return TQListViewItem containing the job or 0 if not found.
*/
- QListViewItem* findItemByJobNum(const uint jobNum);
+ TQListViewItem* findItemByJobNum(const uint jobNum);
/**
* Enables or disables all the job-related buttons.
@@ -255,7 +255,7 @@ private:
* @param talkerCode Talker Code.
* @return Talker ID.
*/
- QString cachedTalkerCodeToTalkerID(const QString& talkerCode);
+ TQString cachedTalkerCodeToTalkerID(const TQString& talkerCode);
/**
* Job ListView.
@@ -271,7 +271,7 @@ private:
/**
* Box containing buttons.
*/
- QVBox* m_buttonBox;
+ TQVBox* m_buttonBox;
/**
* This flag is set to True whenever we want to select the next job that
@@ -282,7 +282,7 @@ private:
/**
* Cache mapping Talker Codes to Talker IDs.
*/
- QMap<QString,QString> m_talkerCodesToTalkerIDs;
+ TQMap<TQString,TQString> m_talkerCodesToTalkerIDs;
};
class KttsJobMgrBrowserExtension : public KParts::BrowserExtension
diff --git a/kttsd/kttsmgr/kttsmgr.cpp b/kttsd/kttsmgr/kttsmgr.cpp
index 80b66b9..68bd74d 100644
--- a/kttsd/kttsmgr/kttsmgr.cpp
+++ b/kttsd/kttsmgr/kttsmgr.cpp
@@ -23,7 +23,7 @@
******************************************************************************/
// Qt includes.
-#include <qimage.h>
+#include <tqimage.h>
// KDE includes.
#include <kconfig.h>
@@ -81,7 +81,7 @@ int main (int argc, char *argv[])
KUniqueApplication app;
#if KDE_VERSION >= KDE_MAKE_VERSION (3,3,90)
- QPixmap icon = KGlobal::iconLoader()->loadIcon("kttsd", KIcon::Panel);
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon("kttsd", KIcon::Panel);
aboutdata.setProgramLogo(icon.convertToImage());
#endif
@@ -135,11 +135,11 @@ int main (int argc, char *argv[])
/* KttsToolTip class */
-KttsToolTip::KttsToolTip ( QWidget* parent ) : QToolTip(parent)
+KttsToolTip::KttsToolTip ( TQWidget* parent ) : TQToolTip(parent)
{
}
-/*virtual*/ void KttsToolTip::maybeTip ( const QPoint & p )
+/*virtual*/ void KttsToolTip::maybeTip ( const TQPoint & p )
{
Q_UNUSED(p);
@@ -148,11 +148,11 @@ KttsToolTip::KttsToolTip ( QWidget* parent ) : QToolTip(parent)
KttsMgrTray* kttsMgrTray = dynamic_cast<KttsMgrTray*>(parentWidget());
- QRect r(kttsMgrTray->geometry());
+ TQRect r(kttsMgrTray->geometry());
if ( !r.isValid() )
return;
- QString status = "<qt><b>KTTSMgr</b> - ";
+ TQString status = "<qt><b>KTTSMgr</b> - ";
status += i18n("<qt>Text-to-Speech Manager");
status += "<br/><br/>";
status += kttsMgrTray->getStatus();
@@ -163,15 +163,15 @@ KttsToolTip::KttsToolTip ( QWidget* parent ) : QToolTip(parent)
/* KttsMgrTray class */
-KttsMgrTray::KttsMgrTray(QWidget *parent):
+KttsMgrTray::KttsMgrTray(TQWidget *parent):
DCOPStub("kttsd", "KSpeech"),
DCOPObject("kkttsmgr_kspeechsink"),
KSystemTray(parent, "kttsmgrsystemtray")
{
- QPixmap icon = KGlobal::iconLoader()->loadIcon("kttsd", KIcon::Small);
+ TQPixmap icon = KGlobal::iconLoader()->loadIcon("kttsd", KIcon::Small);
setPixmap (icon);
- // QToolTip::add(this, i18n("Text-to-speech manager"));
+ // TQToolTip::add(this, i18n("Text-to-speech manager"));
m_toolTip = new KttsToolTip(this);
int id;
@@ -179,25 +179,25 @@ KttsMgrTray::KttsMgrTray(QWidget *parent):
if (id != -1) contextMenu()->changeTitle(id, icon, "KTTSMgr");
id = contextMenu()->insertItem (KGlobal::iconLoader()->loadIcon("klipper", KIcon::Small),
- i18n("&Speak Clipboard Contents"), this, SLOT(speakClipboardSelected()));
+ i18n("&Speak Clipboard Contents"), this, TQT_SLOT(speakClipboardSelected()));
id = contextMenu()->insertItem (KGlobal::iconLoader()->loadIcon("stop", KIcon::Small),
- i18n("&Hold"), this, SLOT(holdSelected()));
+ i18n("&Hold"), this, TQT_SLOT(holdSelected()));
id = contextMenu()->insertItem (KGlobal::iconLoader()->loadIcon("exec", KIcon::Small),
- i18n("Resume"), this, SLOT(resumeSelected()));
+ i18n("Resume"), this, TQT_SLOT(resumeSelected()));
id = contextMenu()->insertSeparator();
id = contextMenu()->insertItem (KGlobal::iconLoader()->loadIcon("contents", KIcon::Small),
- i18n("KTTS &Handbook"), this, SLOT(helpSelected()));
+ i18n("KTTS &Handbook"), this, TQT_SLOT(helpSelected()));
id = contextMenu()->insertItem (KGlobal::iconLoader()->loadIcon("kttsd", KIcon::Small),
- i18n("&About KTTSMgr"), this, SLOT(aboutSelected()));
+ i18n("&About KTTSMgr"), this, TQT_SLOT(aboutSelected()));
- connect(this, SIGNAL(quitSelected()), this, SLOT(quitSelected()));
+ connect(this, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(quitSelected()));
// If --autoexit option given, exit when speaking stops.
KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if (args->isSet("autoexit"))
{
connectDCOPSignal("kttsd", "KSpeech",
- "textFinished(QCString,uint)",
- "textFinished(QCString,uint)",
+ "textFinished(TQCString,uint)",
+ "textFinished(TQCString,uint)",
false);
// Install an event filter so we can check when KTTSMgr becomes inconified to the systray.
parent->installEventFilter(this);
@@ -209,15 +209,15 @@ KttsMgrTray::~KttsMgrTray()
delete m_toolTip;
}
-void KttsMgrTray::textFinished(const QCString& /*appId*/, uint /*jobNum*/)
+void KttsMgrTray::textFinished(const TQCString& /*appId*/, uint /*jobNum*/)
{
// kdDebug() << "KttsMgrTray::textFinished: running" << endl;
exitWhenFinishedSpeaking();
}
-/*virtual*/ bool KttsMgrTray::eventFilter( QObject* /*o*/, QEvent* e )
+/*virtual*/ bool KttsMgrTray::eventFilter( TQObject* /*o*/, TQEvent* e )
{
- if ( e->type() == QEvent::Hide ) exitWhenFinishedSpeaking();
+ if ( e->type() == TQEvent::Hide ) exitWhenFinishedSpeaking();
return false;
}
@@ -225,8 +225,8 @@ void KttsMgrTray::exitWhenFinishedSpeaking()
{
// kdDebug() << "KttsMgrTray::exitWhenFinishedSpeaking: running" << endl;
if ( parentWidget()->isShown() ) return;
- QString jobNums = getTextJobNumbers();
- QStringList jobNumsList = QStringList::split(jobNums, ",");
+ TQString jobNums = getTextJobNumbers();
+ TQStringList jobNumsList = TQStringList::split(jobNums, ",");
uint jobNumsListCount = jobNumsList.count();
// Since there can only be 2 Finished jobs at a time, more than 2 jobs means at least
// one job is not Finished.
@@ -244,7 +244,7 @@ void KttsMgrTray::exitWhenFinishedSpeaking()
* @param state KTTSD job state
* @return Display string for the state.
*/
-QString KttsMgrTray::stateToStr(int state)
+TQString KttsMgrTray::stateToStr(int state)
{
switch( state )
{
@@ -257,11 +257,11 @@ QString KttsMgrTray::stateToStr(int state)
}
}
-QString KttsMgrTray::getStatus()
+TQString KttsMgrTray::getStatus()
{
if (!isKttsdRunning()) return i18n("Text-to-Speech System is not running");
uint jobCount = getTextJobCount();
- QString status = i18n("1 job", "%n jobs", jobCount);
+ TQString status = i18n("1 job", "%n jobs", jobCount);
if (jobCount > 0)
{
uint job = getCurrentTextJob();
@@ -283,8 +283,8 @@ void KttsMgrTray::speakClipboardSelected()
{
if (!isKttsdRunning())
{
- QString error;
- if (KApplication::startServiceByDesktopName("kttsd", QStringList(), &error) != 0)
+ TQString error;
+ if (KApplication::startServiceByDesktopName("kttsd", TQStringList(), &error) != 0)
kdError() << "Starting KTTSD failed with message " << error << endl;
}
speakClipboard();
@@ -298,7 +298,7 @@ void KttsMgrTray::aboutSelected()
void KttsMgrTray::helpSelected()
{
- kapp->invokeHelp(QString::null,"kttsd");
+ kapp->invokeHelp(TQString::null,"kttsd");
}
void KttsMgrTray::quitSelected()
diff --git a/kttsd/kttsmgr/kttsmgr.h b/kttsd/kttsmgr/kttsmgr.h
index e13233a..21f54a7 100644
--- a/kttsd/kttsmgr/kttsmgr.h
+++ b/kttsd/kttsmgr/kttsmgr.h
@@ -26,8 +26,8 @@
#define KTTSMGR_H
// Qt includes.
-#include <qevent.h>
-#include <qtooltip.h>
+#include <tqevent.h>
+#include <tqtooltip.h>
// KDE includes.
#include <ksystemtray.h>
@@ -39,10 +39,10 @@
class KttsToolTip: public QToolTip
{
public:
- KttsToolTip ( QWidget* parent );
+ KttsToolTip ( TQWidget* parent );
protected:
- virtual void maybeTip ( const QPoint & p );
+ virtual void maybeTip ( const TQPoint & p );
};
class KttsMgrTray: public KSystemTray, public KSpeech_stub, virtual public KSpeechSink
@@ -50,16 +50,16 @@ class KttsMgrTray: public KSystemTray, public KSpeech_stub, virtual public KSpee
Q_OBJECT
public:
- KttsMgrTray(QWidget *parent=0);
+ KttsMgrTray(TQWidget *parent=0);
~KttsMgrTray();
void setExitWhenFinishedSpeaking();
- QString getStatus();
+ TQString getStatus();
protected:
- // ASYNC textStarted(const QCString& appId, uint jobNum);
- ASYNC textFinished(const QCString& appId, uint jobNum);
- virtual bool eventFilter( QObject* o, QEvent* e );
+ // ASYNC textStarted(const TQCString& appId, uint jobNum);
+ ASYNC textFinished(const TQCString& appId, uint jobNum);
+ virtual bool eventFilter( TQObject* o, TQEvent* e );
private slots:
@@ -76,7 +76,7 @@ class KttsMgrTray: public KSystemTray, public KSpeech_stub, virtual public KSpee
* @param state KTTSD job state
* @return Display string for the state.
*/
- QString stateToStr(int state);
+ TQString stateToStr(int state);
bool isKttsdRunning();
void exitWhenFinishedSpeaking();
diff --git a/kttsd/libkttsd/filterconf.cpp b/kttsd/libkttsd/filterconf.cpp
index 43e62bc..4947698 100644
--- a/kttsd/libkttsd/filterconf.cpp
+++ b/kttsd/libkttsd/filterconf.cpp
@@ -27,9 +27,9 @@
#include <sys/param.h>
// Qt includes.
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
// KDE includes.
#include <kglobal.h>
@@ -42,12 +42,12 @@
/**
* Constructor
*/
-KttsFilterConf::KttsFilterConf( QWidget *parent, const char *name) : QWidget(parent, name){
+KttsFilterConf::KttsFilterConf( TQWidget *parent, const char *name) : TQWidget(parent, name){
// kdDebug() << "KttsFilterConf::KttsFilterConf: Running" << endl;
- QString systemPath(getenv("PATH"));
+ TQString systemPath(getenv("PATH"));
// kdDebug() << "Path is " << systemPath << endl;
KGlobal::locale()->insertCatalogue("kttsd");
- m_path = QStringList::split(":", systemPath);
+ m_path = TQStringList::split(":", systemPath);
}
/**
@@ -70,7 +70,7 @@ KttsFilterConf::~KttsFilterConf(){
* @param configGroup Call config->setGroup with this argument before
* loading your configuration.
*/
-void KttsFilterConf::load(KConfig* /*config*/, const QString& /*configGroup*/){
+void KttsFilterConf::load(KConfig* /*config*/, const TQString& /*configGroup*/){
// kdDebug() << "KttsFilterConf::load: Running" << endl;
}
@@ -84,7 +84,7 @@ void KttsFilterConf::load(KConfig* /*config*/, const QString& /*configGroup*/){
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
-void KttsFilterConf::save(KConfig* /*config*/, const QString& /*configGroup*/){
+void KttsFilterConf::save(KConfig* /*config*/, const TQString& /*configGroup*/){
// kdDebug() << "KttsFilterConf::save: Running" << endl;
}
@@ -114,7 +114,7 @@ bool KttsFilterConf::supportsMultiInstance() { return false; }
* return an empty string.
* @return Filter instance name.
*/
-QString KttsFilterConf::userPlugInName() { return QString::null; }
+TQString KttsFilterConf::userPlugInName() { return TQString::null; }
/**
* Returns True if this filter is a Sentence Boundary Detector.
@@ -128,23 +128,23 @@ bool KttsFilterConf::isSBD() { return false; }
* @returns The path to the file on success, a blank QString
* if its not found.
*/
-QString KttsFilterConf::getLocation(const QString &name) {
+TQString KttsFilterConf::getLocation(const TQString &name) {
// Iterate over the path and see if 'name' exists in it. Return the
- // full path to it if it does. Else return an empty QString.
- if (QFile::exists(name)) return name;
+ // full path to it if it does. Else return an empty TQString.
+ if (TQFile::exists(name)) return name;
// kdDebug() << "KttsFilterConf::getLocation: Searching for " << name << " in the path.." << endl;
// kdDebug() << m_path << endl;
- for(QStringList::iterator it = m_path.begin(); it != m_path.end(); ++it) {
- QString fullName = *it;
+ for(TQStringList::iterator it = m_path.begin(); it != m_path.end(); ++it) {
+ TQString fullName = *it;
fullName += "/";
fullName += name;
// The user either has the directory of the file in the path...
- if(QFile::exists(fullName)) {
+ if(TQFile::exists(fullName)) {
// kdDebug() << "KttsFilterConf:getLocation: " << fullName << endl;
return fullName;
}
// ....Or the file itself
- else if(QFileInfo(*it).baseName().append(QString(".").append(QFileInfo(*it).extension())) == name) {
+ else if(TQFileInfo(*it).baseName().append(TQString(".").append(TQFileInfo(*it).extension())) == name) {
// kdDebug() << "KttsFilterConf:getLocation: " << fullName << endl;
return fullName;
}
@@ -152,15 +152,15 @@ QString KttsFilterConf::getLocation(const QString &name) {
return "";
}
-/*static*/ QString KttsFilterConf::realFilePath(const QString &filename)
+/*static*/ TQString KttsFilterConf::realFilePath(const TQString &filename)
{
char realpath_buffer[MAXPATHLEN + 1];
memset(realpath_buffer, 0, MAXPATHLEN + 1);
/* If the path contains symlinks, get the real name */
- if (realpath( QFile::encodeName(filename).data(), realpath_buffer) != 0) {
+ if (realpath( TQFile::encodeName(filename).data(), realpath_buffer) != 0) {
//succes, use result from realpath
- return QFile::decodeName(realpath_buffer);
+ return TQFile::decodeName(realpath_buffer);
}
return filename;
}
diff --git a/kttsd/libkttsd/filterconf.h b/kttsd/libkttsd/filterconf.h
index 42055d8..7fdc8e4 100644
--- a/kttsd/libkttsd/filterconf.h
+++ b/kttsd/libkttsd/filterconf.h
@@ -26,7 +26,7 @@
#define _FILTERCONF_H_
// Qt includes.
-#include <qwidget.h>
+#include <tqwidget.h>
// KDE includes.
#include <kconfig.h>
@@ -41,7 +41,7 @@ class KDE_EXPORT KttsFilterConf : public QWidget{
/**
* Constructor
*/
- KttsFilterConf( QWidget *parent = 0, const char *name = 0);
+ KttsFilterConf( TQWidget *parent = 0, const char *name = 0);
/**
* Destructor
@@ -66,7 +66,7 @@ class KDE_EXPORT KttsFilterConf : public QWidget{
* any instance-specific parameters to load, but it may still wish
* to load parameters that apply to all instances of the plugin.
*/
- virtual void load(KConfig *config, const QString &configGroup);
+ virtual void load(KConfig *config, const TQString &configGroup);
/**
* This function gets called when the user wants to save the settings in
@@ -78,7 +78,7 @@ class KDE_EXPORT KttsFilterConf : public QWidget{
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
- virtual void save(KConfig *config, const QString &configGroup);
+ virtual void save(KConfig *config, const TQString &configGroup);
/**
* This function is called to set the settings in the module to sensible
@@ -104,7 +104,7 @@ class KDE_EXPORT KttsFilterConf : public QWidget{
* return an empty string.
* @return Filter instance name.
*/
- virtual QString userPlugInName();
+ virtual TQString userPlugInName();
/**
* Returns True if this filter is a Sentence Boundary Detector.
@@ -112,7 +112,7 @@ class KDE_EXPORT KttsFilterConf : public QWidget{
*/
virtual bool isSBD();
- static QString realFilePath(const QString &filename);
+ static TQString realFilePath(const TQString &filename);
public slots:
/**
@@ -140,10 +140,10 @@ class KDE_EXPORT KttsFilterConf : public QWidget{
* @returns The path to the file on success, a blank QString
* if its not found.
*/
- QString getLocation(const QString &name);
+ TQString getLocation(const TQString &name);
- /// The system path in a QStringList.
- QStringList m_path;
+ /// The system path in a TQStringList.
+ TQStringList m_path;
};
#endif //_FILTERCONF_H_
diff --git a/kttsd/libkttsd/filterproc.cpp b/kttsd/libkttsd/filterproc.cpp
index 178dec2..8de5c62 100644
--- a/kttsd/libkttsd/filterproc.cpp
+++ b/kttsd/libkttsd/filterproc.cpp
@@ -31,8 +31,8 @@
/**
* Constructor.
*/
-KttsFilterProc::KttsFilterProc( QObject *parent, const char *name) :
- QObject(parent, name)
+KttsFilterProc::KttsFilterProc( TQObject *parent, const char *name) :
+ TQObject(parent, name)
{
// kdDebug() << "KttsFilterProc::KttsFilterProc: Running" << endl;
}
@@ -54,7 +54,7 @@ KttsFilterProc::~KttsFilterProc()
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
-bool KttsFilterProc::init(KConfig* /*config*/, const QString& /*configGroup*/){
+bool KttsFilterProc::init(KConfig* /*config*/, const TQString& /*configGroup*/){
// kdDebug() << "PlugInProc::init: Running" << endl;
return false;
}
@@ -87,8 +87,8 @@ bool KttsFilterProc::init(KConfig* /*config*/, const QString& /*configGroup*/){
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
-/*virtual*/ QString KttsFilterProc::convert(const QString& inputText, TalkerCode* /*talkerCode*/,
- const QCString& /*appId*/)
+/*virtual*/ TQString KttsFilterProc::convert(const TQString& inputText, TalkerCode* /*talkerCode*/,
+ const TQCString& /*appId*/)
{
return inputText;
}
@@ -107,8 +107,8 @@ bool KttsFilterProc::init(KConfig* /*config*/, const QString& /*configGroup*/){
* program may then call @ref getOutput to retrieve converted text. Calling
* program must call @ref ackFinished to acknowledge the conversion.
*/
-/*virtual*/ bool KttsFilterProc::asyncConvert(const QString& /*inputText*/,
- TalkerCode* /*talkerCode*/, const QCString& /*appId*/) { return false; }
+/*virtual*/ bool KttsFilterProc::asyncConvert(const TQString& /*inputText*/,
+ TalkerCode* /*talkerCode*/, const TQCString& /*appId*/) { return false; }
/**
* Waits for a previous call to asyncConvert to finish.
@@ -123,7 +123,7 @@ bool KttsFilterProc::init(KConfig* /*config*/, const QString& /*configGroup*/){
/**
* Returns the filtered output.
*/
-/*virtual*/ QString KttsFilterProc::getOutput() { return QString::null; }
+/*virtual*/ TQString KttsFilterProc::getOutput() { return TQString::null; }
/**
* Acknowledges the finished filtering.
@@ -148,6 +148,6 @@ bool KttsFilterProc::init(KConfig* /*config*/, const QString& /*configGroup*/){
*
* @param re The sentence delimiter regular expression.
*/
-/*virtual*/ void KttsFilterProc::setSbRegExp(const QString& /*re*/) { }
+/*virtual*/ void KttsFilterProc::setSbRegExp(const TQString& /*re*/) { }
#include "filterproc.moc"
diff --git a/kttsd/libkttsd/filterproc.h b/kttsd/libkttsd/filterproc.h
index ef7972c..bc11921 100644
--- a/kttsd/libkttsd/filterproc.h
+++ b/kttsd/libkttsd/filterproc.h
@@ -26,8 +26,8 @@
#define _FILTERPROC_H_
// Qt includes.
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
// KDE includes.
#include <kdemacros.h>
@@ -51,7 +51,7 @@ public:
/**
* Constructor.
*/
- KttsFilterProc( QObject *parent, const char *name );
+ KttsFilterProc( TQObject *parent, const char *name );
/**
* Destructor.
@@ -67,7 +67,7 @@ public:
* Note: The parameters are for reading from kttsdrc file. Plugins may wish to maintain
* separate configuration files of their own.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Returns True if this filter is a Sentence Boundary Detector.
@@ -97,7 +97,7 @@ public:
* @param appId The DCOP appId of the application that queued the text.
* Also useful for hints about how to do the filtering.
*/
- virtual QString convert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId);
+ virtual TQString convert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId);
/**
* Convert input. Runs asynchronously.
@@ -113,7 +113,7 @@ public:
* program may then call @ref getOutput to retrieve converted text. Calling
* program must call @ref ackFinished to acknowledge the conversion.
*/
- virtual bool asyncConvert(const QString& inputText, TalkerCode* talkerCode, const QCString& appId);
+ virtual bool asyncConvert(const TQString& inputText, TalkerCode* talkerCode, const TQCString& appId);
/**
* Waits for a previous call to asyncConvert to finish.
@@ -128,7 +128,7 @@ public:
/**
* Returns the filtered output.
*/
- virtual QString getOutput();
+ virtual TQString getOutput();
/**
* Acknowledges the finished filtering.
@@ -153,7 +153,7 @@ public:
*
* @param re The sentence delimiter regular expression.
*/
- virtual void setSbRegExp(const QString& re);
+ virtual void setSbRegExp(const TQString& re);
signals:
/**
@@ -173,7 +173,7 @@ signals:
* @param keepGoing False if the filter should not be called in the future.
* @param msg Error message.
*/
- void error(bool keepGoing, const QString &msg);
+ void error(bool keepGoing, const TQString &msg);
};
#endif // _FILTERPROC_H_
diff --git a/kttsd/libkttsd/notify.cpp b/kttsd/libkttsd/notify.cpp
index fd28587..c633779 100644
--- a/kttsd/libkttsd/notify.cpp
+++ b/kttsd/libkttsd/notify.cpp
@@ -18,8 +18,8 @@
// Qt includes.
// Qt includes.
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
// KDE includes.
#include <kconfig.h>
@@ -29,23 +29,23 @@
// KTTS includes.
#include "notify.h"
-static QStringList* s_actionNames = 0;
-static KStaticDeleter<QStringList> s_actionNames_sd;
+static TQStringList* s_actionNames = 0;
+static KStaticDeleter<TQStringList> s_actionNames_sd;
-static QStringList* s_actionDisplayNames = 0;
-static KStaticDeleter<QStringList> s_actionDisplayNames_sd;
+static TQStringList* s_actionDisplayNames = 0;
+static KStaticDeleter<TQStringList> s_actionDisplayNames_sd;
static void notifyaction_init()
{
if ( !s_actionNames )
{
- s_actionNames_sd.setObject(s_actionNames, new QStringList);
+ s_actionNames_sd.setObject(s_actionNames, new TQStringList);
s_actionNames->append( "SpeakEventName" );
s_actionNames->append( "SpeakMsg" );
s_actionNames->append( "DoNotSpeak" );
s_actionNames->append( "SpeakCustom" );
- s_actionDisplayNames_sd.setObject(s_actionDisplayNames, new QStringList);
+ s_actionDisplayNames_sd.setObject(s_actionDisplayNames, new TQStringList);
s_actionDisplayNames->append( i18n("Speak event name") );
s_actionDisplayNames->append( i18n("Speak the notification message") );
s_actionDisplayNames->append( i18n("Do not speak the notification") );
@@ -59,25 +59,25 @@ static void notifyaction_init()
return s_actionNames->count();
}
-/*static*/ QString NotifyAction::actionName( const int action )
+/*static*/ TQString NotifyAction::actionName( const int action )
{
notifyaction_init();
return (*s_actionNames)[ action ];
}
-/*static*/ int NotifyAction::action( const QString& actionName )
+/*static*/ int NotifyAction::action( const TQString& actionName )
{
notifyaction_init();
return s_actionNames->findIndex( actionName );
}
-/*static*/ QString NotifyAction::actionDisplayName( const int action )
+/*static*/ TQString NotifyAction::actionDisplayName( const int action )
{
notifyaction_init();
return (*s_actionDisplayNames)[ action ];
}
-/*static*/ QString NotifyAction::actionDisplayName( const QString& actionName )
+/*static*/ TQString NotifyAction::actionDisplayName( const TQString& actionName )
{
notifyaction_init();
return (*s_actionDisplayNames)[ action( actionName ) ];
@@ -85,24 +85,24 @@ static void notifyaction_init()
// --------------------------------------------------------------------
-static QStringList* s_presentNames = 0;
-static KStaticDeleter<QStringList> s_presentNames_sd;
+static TQStringList* s_presentNames = 0;
+static KStaticDeleter<TQStringList> s_presentNames_sd;
-static QStringList* s_presentDisplayNames = 0;
-static KStaticDeleter<QStringList> s_presentDisplayNames_sd;
+static TQStringList* s_presentDisplayNames = 0;
+static KStaticDeleter<TQStringList> s_presentDisplayNames_sd;
static void notifypresent_init()
{
if ( !s_presentNames )
{
- s_presentNames_sd.setObject( s_presentNames, new QStringList );
+ s_presentNames_sd.setObject( s_presentNames, new TQStringList );
s_presentNames->append( "None" );
s_presentNames->append( "Dialog" );
s_presentNames->append( "Passive" );
s_presentNames->append( "DialogAndPassive" );
s_presentNames->append( "All" );
- s_presentDisplayNames_sd.setObject( s_presentDisplayNames, new QStringList );
+ s_presentDisplayNames_sd.setObject( s_presentDisplayNames, new TQStringList );
s_presentDisplayNames->append( i18n("none") );
s_presentDisplayNames->append( i18n("notification dialogs") );
s_presentDisplayNames->append( i18n("passive popups") );
@@ -117,25 +117,25 @@ static void notifypresent_init()
return s_presentNames->count();
}
-/*static*/ QString NotifyPresent::presentName( const int present )
+/*static*/ TQString NotifyPresent::presentName( const int present )
{
notifypresent_init();
return (*s_presentNames)[ present ];
}
-/*static*/ int NotifyPresent::present( const QString& presentName )
+/*static*/ int NotifyPresent::present( const TQString& presentName )
{
notifypresent_init();
return s_presentNames->findIndex( presentName );
}
-/*static*/ QString NotifyPresent::presentDisplayName( const int present )
+/*static*/ TQString NotifyPresent::presentDisplayName( const int present )
{
notifypresent_init();
return (*s_presentDisplayNames)[ present ];
}
-/*static*/ QString NotifyPresent::presentDisplayName( const QString& presentName )
+/*static*/ TQString NotifyPresent::presentDisplayName( const TQString& presentName )
{
notifypresent_init();
return (*s_presentDisplayNames)[ present( presentName ) ];
@@ -146,12 +146,12 @@ static void notifypresent_init()
/**
* Retrieves the displayable name for an event source.
*/
-/*static*/ QString NotifyEvent::getEventSrcName(const QString& eventSrc, QString& iconName)
+/*static*/ TQString NotifyEvent::getEventSrcName(const TQString& eventSrc, TQString& iconName)
{
- QString configFilename = eventSrc + QString::fromLatin1( "/eventsrc" );
+ TQString configFilename = eventSrc + TQString::fromLatin1( "/eventsrc" );
KConfig* config = new KConfig( configFilename, true, false, "data" );
- config->setGroup( QString::fromLatin1( "!Global!" ) );
- QString appDesc = config->readEntry( "Comment", i18n("No description available") );
+ config->setGroup( TQString::fromLatin1( "!Global!" ) );
+ TQString appDesc = config->readEntry( "Comment", i18n("No description available") );
iconName = config->readEntry( "IconName" );
delete config;
return appDesc;
@@ -160,16 +160,16 @@ static void notifypresent_init()
/**
* Retrieves the displayable name for an event from an event source.
*/
-/*static*/ QString NotifyEvent::getEventName(const QString& eventSrc, const QString& event)
+/*static*/ TQString NotifyEvent::getEventName(const TQString& eventSrc, const TQString& event)
{
- QString eventName;
- QString configFilename = eventSrc + QString::fromLatin1( "/eventsrc" );
+ TQString eventName;
+ TQString configFilename = eventSrc + TQString::fromLatin1( "/eventsrc" );
KConfig* config = new KConfig( configFilename, true, false, "data" );
if ( config->hasGroup( event ) )
{
config->setGroup( event );
- eventName = config->readEntry( QString::fromLatin1( "Comment" ),
- config->readEntry( QString::fromLatin1( "Name" )));
+ eventName = config->readEntry( TQString::fromLatin1( "Comment" ),
+ config->readEntry( TQString::fromLatin1( "Name" )));
}
delete config;
return eventName;
diff --git a/kttsd/libkttsd/notify.h b/kttsd/libkttsd/notify.h
index 2a8162d..b1e31bb 100644
--- a/kttsd/libkttsd/notify.h
+++ b/kttsd/libkttsd/notify.h
@@ -36,10 +36,10 @@ public:
};
static int count();
- static QString actionName( const int action );
- static int action( const QString& actionName );
- static QString actionDisplayName( const int action );
- static QString actionDisplayName( const QString& actionName );
+ static TQString actionName( const int action );
+ static int action( const TQString& actionName );
+ static TQString actionDisplayName( const int action );
+ static TQString actionDisplayName( const TQString& actionName );
};
// --------------------------------------------------------------------
@@ -59,10 +59,10 @@ public:
};
static int count();
- static QString presentName( const int present );
- static int present( const QString& presentName );
- static QString presentDisplayName( const int present );
- static QString presentDisplayName( const QString& presentName );
+ static TQString presentName( const int present );
+ static int present( const TQString& presentName );
+ static TQString presentDisplayName( const int present );
+ static TQString presentDisplayName( const TQString& presentName );
};
// --------------------------------------------------------------------
@@ -74,12 +74,12 @@ public:
/**
* Retrieves the displayable name for an event source.
*/
- static QString getEventSrcName(const QString& eventSrc, QString& iconName);
+ static TQString getEventSrcName(const TQString& eventSrc, TQString& iconName);
/**
* Retrieves the displayable name for an event from an event source.
*/
- static QString getEventName(const QString& eventSrc, const QString& event);
+ static TQString getEventName(const TQString& eventSrc, const TQString& event);
};
#endif // _NOTIFYACTION_H
diff --git a/kttsd/libkttsd/player.h b/kttsd/libkttsd/player.h
index ff4d240..f83c5b4 100644
--- a/kttsd/libkttsd/player.h
+++ b/kttsd/libkttsd/player.h
@@ -16,8 +16,8 @@
#ifndef PLAYER_H
#define PLAYER_H
-#include <qobject.h>
-#include <qstringlist.h>
+#include <tqobject.h>
+#include <tqstringlist.h>
#include <kdemacros.h>
#include "kdeexportfix.h"
#include "kglobal.h"
@@ -33,7 +33,7 @@ public:
virtual ~Player() {}
// virtual void play(const FileHandle &file = FileHandle::null()) = 0;
- virtual void startPlay(const QString& file) = 0;
+ virtual void startPlay(const TQString& file) = 0;
virtual void pause() = 0;
virtual void stop() = 0;
@@ -50,11 +50,11 @@ public:
virtual void seek(int seekTime) = 0;
virtual void seekPosition(int position) = 0;
- virtual QStringList getPluginList( const QCString& classname ) {
+ virtual TQStringList getPluginList( const TQCString& classname ) {
Q_UNUSED(classname);
- return QStringList();
+ return TQStringList();
}
- virtual void setSinkName(const QString &sinkName) { Q_UNUSED(sinkName); }
+ virtual void setSinkName(const TQString &sinkName) { Q_UNUSED(sinkName); }
virtual bool requireVersion(uint major, uint minor, uint micro) {
Q_UNUSED(major);
Q_UNUSED(minor);
@@ -66,8 +66,8 @@ public:
virtual void setPeriods(uint periods) {Q_UNUSED(periods); }
protected:
- Player(QObject* parent = 0, const char* name = 0, const QStringList& args=QStringList() ) :
- QObject(parent, name) {
+ Player(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList() ) :
+ TQObject(parent, name) {
Q_UNUSED(args);
}
diff --git a/kttsd/libkttsd/pluginconf.cpp b/kttsd/libkttsd/pluginconf.cpp
index d2fb4b6..f23eaed 100644
--- a/kttsd/libkttsd/pluginconf.cpp
+++ b/kttsd/libkttsd/pluginconf.cpp
@@ -20,9 +20,9 @@
#include <sys/param.h>
// Qt includes.
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstring.h>
// KDE includes.
#include <kglobal.h>
@@ -36,12 +36,12 @@
/**
* Constructor
*/
-PlugInConf::PlugInConf( QWidget *parent, const char *name) : QWidget(parent, name){
+PlugInConf::PlugInConf( TQWidget *parent, const char *name) : TQWidget(parent, name){
kdDebug() << "PlugInConf::PlugInConf: Running" << endl;
KGlobal::locale()->insertCatalogue("kttsd");
- QString systemPath(getenv("PATH"));
+ TQString systemPath(getenv("PATH"));
// kdDebug() << "Path is " << systemPath << endl;
- m_path = QStringList::split(":", systemPath);
+ m_path = TQStringList::split(":", systemPath);
m_player = 0;
}
@@ -66,7 +66,7 @@ PlugInConf::~PlugInConf(){
* @param configGroup Call config->setGroup with this argument before
* loading your configuration.
*/
-void PlugInConf::load(KConfig* /*config*/, const QString& /*configGroup*/){
+void PlugInConf::load(KConfig* /*config*/, const TQString& /*configGroup*/){
kdDebug() << "PlugInConf::load: Running" << endl;
}
@@ -80,7 +80,7 @@ void PlugInConf::load(KConfig* /*config*/, const QString& /*configGroup*/){
* @param configGroup Call config->setGroup with this argument before
* saving your configuration.
*/
-void PlugInConf::save(KConfig* /*config*/, const QString& /*configGroup*/){
+void PlugInConf::save(KConfig* /*config*/, const TQString& /*configGroup*/){
kdDebug() << "PlugInConf::save: Running" << endl;
}
@@ -110,22 +110,22 @@ bool PlugInConf::supportsMultiInstance() { return true; }
* This function informs the plugin of the desired language to be spoken
* by the plugin. The plugin should attempt to adapt itself to the
* specified language code, choosing sensible defaults if necessary.
-* If the passed-in code is QString::null, no specific language has
+* If the passed-in code is TQString::null, no specific language has
* been chosen.
* @param lang The desired language code or Null if none.
*
* If the plugin is unable to support the desired language, that is OK.
*/
-void PlugInConf::setDesiredLanguage(const QString& /*lang*/ ) { }
+void PlugInConf::setDesiredLanguage(const TQString& /*lang*/ ) { }
/**
* Return fully-specified talker code for the configured plugin. This code
* uniquely identifies the configured instance of the plugin and distinquishes
* one instance from another. If the plugin has not been fully configured,
-* i.e., cannot yet synthesize, return QString::null.
+* i.e., cannot yet synthesize, return TQString::null.
* @return Fully-specified talker code.
*/
-QString PlugInConf::getTalkerCode() { return QString::null; }
+TQString PlugInConf::getTalkerCode() { return TQString::null; }
/**
* Return a list of all the languages currently supported by the plugin.
@@ -136,9 +136,9 @@ QString PlugInConf::getTalkerCode() { return QString::null; }
* plugin might support.
* If your plugin cannot yet determine the languages supported, return Null.
* If your plugin can support any language, return Null.
-* @return A QStringList of supported language codes, or Null if unknown.
+* @return A TQStringList of supported language codes, or Null if unknown.
*/
-QStringList PlugInConf::getSupportedLanguages() { return QStringList(); }
+TQStringList PlugInConf::getSupportedLanguages() { return TQStringList(); }
/**
* Return the full path to any program in the $PATH environmental variable
@@ -146,29 +146,29 @@ QStringList PlugInConf::getSupportedLanguages() { return QStringList(); }
* @returns The path to the file on success, a blank QString
* if its not found.
*/
-QString PlugInConf::getLocation(const QString &name) {
+TQString PlugInConf::getLocation(const TQString &name) {
// Iterate over the path and see if 'name' exists in it. Return the
- // full path to it if it does. Else return an empty QString.
+ // full path to it if it does. Else return an empty TQString.
// If it's a file or a symlink pointing to a file, that's cool.
- QFileInfo fileinfo(name);
- if (fileinfo.isFile() || (fileinfo.isSymLink() && QFileInfo(fileinfo.readLink()).isFile()))
+ TQFileInfo fileinfo(name);
+ if (fileinfo.isFile() || (fileinfo.isSymLink() && TQFileInfo(fileinfo.readLink()).isFile()))
return name;
kdDebug() << "PluginConf::getLocation: Searching for " << name << " in the path.." << endl;
kdDebug() << m_path << endl;
- for(QStringList::iterator it = m_path.begin(); it != m_path.end(); ++it) {
- QString fullName = *it;
+ for(TQStringList::iterator it = m_path.begin(); it != m_path.end(); ++it) {
+ TQString fullName = *it;
fullName += "/";
fullName += name;
fileinfo.setFile(fullName);
// The user either has the directory of the file in the path...
- if(fileinfo.isFile() || (fileinfo.isSymLink() && QFileInfo(fileinfo.readLink()).isFile())) {
+ if(fileinfo.isFile() || (fileinfo.isSymLink() && TQFileInfo(fileinfo.readLink()).isFile())) {
return fullName;
// kdDebug() << "PluginConf:getLocation: " << fullName << endl;
}
// ....Or the file itself in the path (slightly freaky but hey.)
- else if(QFileInfo(*it).baseName().append(QString(".").append(QFileInfo(*it).extension())) == name) {
+ else if(TQFileInfo(*it).baseName().append(TQString(".").append(TQFileInfo(*it).extension())) == name) {
return fullName;
// kdDebug() << "PluginConf:getLocation: " << fullName << endl;
}
@@ -182,41 +182,41 @@ QString PlugInConf::getLocation(const QString &name) {
* @return countryCode Just the country code part (if any).
* @return Just the language code part.
*/
-QString PlugInConf::splitLanguageCode(const QString& languageCode, QString& countryCode)
+TQString PlugInConf::splitLanguageCode(const TQString& languageCode, TQString& countryCode)
{
- QString locale = languageCode;
- QString langCode;
- QString charSet;
+ TQString locale = languageCode;
+ TQString langCode;
+ TQString charSet;
KGlobal::locale()->splitLocale(locale, langCode, countryCode, charSet);
return langCode;
}
-/*static*/ QString PlugInConf::realFilePath(const QString &filename)
+/*static*/ TQString PlugInConf::realFilePath(const TQString &filename)
{
char realpath_buffer[MAXPATHLEN + 1];
memset(realpath_buffer, 0, MAXPATHLEN + 1);
/* If the path contains symlinks, get the real name */
- if (realpath( QFile::encodeName(filename).data(), realpath_buffer) != 0) {
+ if (realpath( TQFile::encodeName(filename).data(), realpath_buffer) != 0) {
// succes, use result from realpath
- return QFile::decodeName(realpath_buffer);
+ return TQFile::decodeName(realpath_buffer);
}
return filename;
}
-/*static*/ QString PlugInConf::testMessage(const QString& languageCode)
+/*static*/ TQString PlugInConf::testMessage(const TQString& languageCode)
{
- QString key = "Name[" + languageCode + "]";
- QString result;
- QString def;
- QFile file(locate("data", "kttsd/kcmkttsd_testmessage.desktop"));
+ TQString key = "Name[" + languageCode + "]";
+ TQString result;
+ TQString def;
+ TQFile file(locate("data", "kttsd/kcmkttsd_testmessage.desktop"));
if (file.open(IO_ReadOnly))
{
- QTextStream stream(&file);
- stream.setEncoding(QTextStream::UnicodeUTF8);
+ TQTextStream stream(&file);
+ stream.setEncoding(TQTextStream::UnicodeUTF8);
while ( !stream.atEnd() ) {
- QString line = stream.readLine(); // line of text excluding '\n'
- QStringList keyAndValue = QStringList::split("=", line);
+ TQString line = stream.readLine(); // line of text excluding '\n'
+ TQStringList keyAndValue = TQStringList::split("=", line);
if (keyAndValue.count() == 2)
{
if (keyAndValue[0] == key)
diff --git a/kttsd/libkttsd/pluginconf.h b/kttsd/libkttsd/pluginconf.h
index 4c4647c..90d3cec 100644
--- a/kttsd/libkttsd/pluginconf.h
+++ b/kttsd/libkttsd/pluginconf.h
@@ -19,7 +19,7 @@
#define _PLUGINCONF_H_
// Qt includes.
-#include <qwidget.h>
+#include <tqwidget.h>
// KDE includes.
#include <kconfig.h>
@@ -125,7 +125,7 @@
* Next, @ref getTalkerCode
* will be called. If your plugin can automatically configure itself to the desired
* language, it should do so and return a fully-specified talker code. If your
-* plugin is not yet ready and requires user help, return QString::null. Note that
+* plugin is not yet ready and requires user help, return TQString::null. Note that
* @ref setDesiredLanguage may be Null, in which case, you should allow the
* user to configure your plugin to any of your supported languages.
*
@@ -138,7 +138,7 @@
* - @e lang. If user has completed configuring your plugin, i.e., it is
* ready to begin synthesizing, return the ISO 639-1 language code
* for the language it can synthesize. If your plugin is not yet
-* fully configured, you should return QString::null for the entire
+* fully configured, you should return TQString::null for the entire
* talker code. If your plugin supports a specific national version
* of a language, that should also be included using the ISO 3166
* country code separated from the language code by underscore (_).
@@ -214,7 +214,7 @@ class KDE_EXPORT PlugInConf : public QWidget{
/**
* Constructor
*/
- PlugInConf( QWidget *parent = 0, const char *name = 0);
+ PlugInConf( TQWidget *parent = 0, const char *name = 0);
/**
* Destructor
@@ -241,7 +241,7 @@ class KDE_EXPORT PlugInConf : public QWidget{
*
* @see loadandsavemethods
*/
- virtual void load(KConfig *config, const QString &configGroup);
+ virtual void load(KConfig *config, const TQString &configGroup);
/**
* This function gets called when the user wants to save the settings in
@@ -257,7 +257,7 @@ class KDE_EXPORT PlugInConf : public QWidget{
* it is not necessary to save the language code, unless your plugin needs it in
* order to synthesize speech.
*/
- virtual void save(KConfig *config, const QString &configGroup);
+ virtual void save(KConfig *config, const TQString &configGroup);
/**
* This function is called to set the settings in the module to sensible
@@ -281,7 +281,7 @@ class KDE_EXPORT PlugInConf : public QWidget{
* This function informs the plugin of the desired language to be spoken
* by the plugin. The plugin should attempt to adapt itself to the
* specified language code, choosing sensible defaults if necessary.
- * If the passed-in code is QString::null, no specific language has
+ * If the passed-in code is TQString::null, no specific language has
* been chosen.
* @param lang The desired language code or Null if none.
*
@@ -293,21 +293,21 @@ class KDE_EXPORT PlugInConf : public QWidget{
* not the given country, treat it as though the country
* code were not specified, i.e., adapt to the given language.
*/
- virtual void setDesiredLanguage(const QString &lang);
+ virtual void setDesiredLanguage(const TQString &lang);
/**
* Return fully-specified talker code for the configured plugin. This code
* uniquely identifies the configured instance of the plugin and distinquishes
* one instance from another. If the plugin has not been fully configured,
- * i.e., cannot yet synthesize, return QString::null.
+ * i.e., cannot yet synthesize, return TQString::null.
* @return Fully-specified talker code.
*/
- virtual QString getTalkerCode();
+ virtual TQString getTalkerCode();
/**
* Return a list of all the languages possibly supported by the plugin.
* If your plugin can support any language, return Null.
- * @return A QStringList of supported language and optional country
+ * @return A TQStringList of supported language and optional country
* codes, or Null if any.
*
* The languge codes are given in ISO 639-1. Lowercase should be used.
@@ -321,7 +321,7 @@ class KDE_EXPORT PlugInConf : public QWidget{
* es_CL
* The list you return should be as specific as practicable.
*/
- virtual QStringList getSupportedLanguages();
+ virtual TQStringList getSupportedLanguages();
/**
* Player object that can be used by the plugin for testing playback of synthed files.
@@ -329,9 +329,9 @@ class KDE_EXPORT PlugInConf : public QWidget{
void setPlayer(TestPlayer* player);
TestPlayer* getPlayer();
- static QString realFilePath(const QString &filename);
+ static TQString realFilePath(const TQString &filename);
- static QString testMessage(const QString& languageCode);
+ static TQString testMessage(const TQString& languageCode);
public slots:
/**
@@ -359,7 +359,7 @@ class KDE_EXPORT PlugInConf : public QWidget{
* @returns The path to the file on success, a blank QString
* if its not found.
*/
- QString getLocation(const QString &name);
+ TQString getLocation(const TQString &name);
/**
* Breaks a language code into the language code and country code (if any).
@@ -367,10 +367,10 @@ class KDE_EXPORT PlugInConf : public QWidget{
* @return countryCode Just the country code part (if any).
* @return Just the language code part.
*/
- QString splitLanguageCode(const QString& languageCode, QString& countryCode);
+ TQString splitLanguageCode(const TQString& languageCode, TQString& countryCode);
- /// The system path in a QStringList.
- QStringList m_path;
+ /// The system path in a TQStringList.
+ TQStringList m_path;
TestPlayer* m_player;
};
diff --git a/kttsd/libkttsd/pluginproc.cpp b/kttsd/libkttsd/pluginproc.cpp
index 5c835a6..a712687 100644
--- a/kttsd/libkttsd/pluginproc.cpp
+++ b/kttsd/libkttsd/pluginproc.cpp
@@ -16,8 +16,8 @@
***************************************************************************/
// Qt includes.
-#include <qstring.h>
-#include <qtextcodec.h>
+#include <tqstring.h>
+#include <tqtextcodec.h>
// KDE includes.
#include <kdebug.h>
@@ -31,7 +31,7 @@
/**
* Constructor
*/
-PlugInProc::PlugInProc( QObject *parent, const char *name) : QObject(parent, name){
+PlugInProc::PlugInProc( TQObject *parent, const char *name) : TQObject(parent, name){
// kdDebug() << "PlugInProc::PlugInProc: Running" << endl;
}
@@ -45,7 +45,7 @@ PlugInProc::~PlugInProc(){
/**
* Initializate the speech plugin.
*/
-bool PlugInProc::init(KConfig* /*config*/, const QString& /*configGroup*/){
+bool PlugInProc::init(KConfig* /*config*/, const TQString& /*configGroup*/){
// kdDebug() << "PlugInProc::init: Running" << endl;
return false;
}
@@ -56,7 +56,7 @@ bool PlugInProc::init(KConfig* /*config*/, const QString& /*configGroup*/){
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void PlugInProc::sayText(const QString& /*text*/){
+void PlugInProc::sayText(const TQString& /*text*/){
// kdDebug() << "PlugInProc::sayText: Running" << endl;
}
@@ -70,7 +70,7 @@ void PlugInProc::sayText(const QString& /*text*/){
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void PlugInProc::synthText(const QString& /*text*/, const QString& /*suggestedFilename*/) { }
+void PlugInProc::synthText(const TQString& /*text*/, const TQString& /*suggestedFilename*/) { }
/**
* Get the generated audio filename from synthText.
@@ -79,7 +79,7 @@ void PlugInProc::synthText(const QString& /*text*/, const QString& /*suggestedFi
*
* The plugin must not re-use the filename.
*/
-QString PlugInProc::getFilename() { return QString::null; }
+TQString PlugInProc::getFilename() { return TQString::null; }
/**
* Stop current operation (saying or synthesizing text).
@@ -133,62 +133,62 @@ bool PlugInProc::supportsSynth() { return false; }
* tags and converts the file to plain text.
* @return Name of the XSLT file.
*/
-QString PlugInProc::getSsmlXsltFilename()
+TQString PlugInProc::getSsmlXsltFilename()
{
return KGlobal::dirs()->resourceDirs("data").last() + "kttsd/xslt/SSMLtoPlainText.xsl";
}
/**
-* Given the name of a codec, returns the QTextCodec for the name.
+* Given the name of a codec, returns the TQTextCodec for the name.
* Handles the following "special" codec names:
* Local The user's current Locale codec.
* Latin1 Latin1 (ISO 8859-1)
* Unicode UTF-16
* @param codecName Name of desired codec.
* @return The codec object. Calling program must not delete this object
-* as it is a reference to an existing QTextCodec object.
+* as it is a reference to an existing TQTextCodec object.
*
* Caution: Do not pass translated codec names to this routine.
*/
-/*static*/ QTextCodec* PlugInProc::codecNameToCodec(const QString &codecName)
+/*static*/ TQTextCodec* PlugInProc::codecNameToCodec(const TQString &codecName)
{
- QTextCodec* codec = 0;
+ TQTextCodec* codec = 0;
if (codecName == "Local")
- codec = QTextCodec::codecForLocale();
+ codec = TQTextCodec::codecForLocale();
else if (codecName == "Latin1")
- codec = QTextCodec::codecForName("ISO8859-1");
+ codec = TQTextCodec::codecForName("ISO8859-1");
else if (codecName == "Unicode")
- codec = QTextCodec::codecForName("utf16");
+ codec = TQTextCodec::codecForName("utf16");
else
- codec = QTextCodec::codecForName(codecName.latin1());
+ codec = TQTextCodec::codecForName(codecName.latin1());
if (!codec)
{
kdDebug() << "PluginProc::codecNameToCodec: Invalid codec name " << codecName << endl;
kdDebug() << "PluginProc::codecNameToCodec: Defaulting to ISO 8859-1" << endl;
- codec = QTextCodec::codecForName("ISO8859-1");
+ codec = TQTextCodec::codecForName("ISO8859-1");
}
return codec;
}
/**
-* Builds a list of codec names, suitable for display in a QComboBox.
+* Builds a list of codec names, suitable for display in a TQComboBox.
* The list includes the 3 special codec names (translated) at the top:
* Local The user's current Locale codec.
* Latin1 Latin1 (ISO 8859-1)
* Unicode UTF-16
*/
-/*static*/ QStringList PlugInProc::buildCodecList()
+/*static*/ TQStringList PlugInProc::buildCodecList()
{
// kdDebug() << "PlugInConf::buildCodecList: Running" << endl;
- QStringList codecList;
- QString local = i18n("Local")+" (";
- local += QTextCodec::codecForLocale()->name();
+ TQStringList codecList;
+ TQString local = i18n("Local")+" (";
+ local += TQTextCodec::codecForLocale()->name();
local += ")";
codecList.append(local);
codecList.append(i18n("Latin1"));
codecList.append(i18n("Unicode"));
- for (int i = 0; (QTextCodec::codecForIndex(i)); ++i )
- codecList.append(QTextCodec::codecForIndex(i)->name());
+ for (int i = 0; (TQTextCodec::codecForIndex(i)); ++i )
+ codecList.append(TQTextCodec::codecForIndex(i)->name());
return codecList;
}
@@ -200,11 +200,11 @@ QString PlugInProc::getSsmlXsltFilename()
* Unicode UTF-16
* @param codecName Name of the codec.
* @param codecList List of codec names. The first 3 entries may be translated names.
-* @return QTextCodec object. Caller must not delete this object.
+* @return TQTextCodec object. Caller must not delete this object.
*
* Caution: Do not pass translated codec names to this routine in codecName parameter.
*/
-/*static*/ int PlugInProc::codecNameToListIndex(const QString &codecName, const QStringList &codecList)
+/*static*/ int PlugInProc::codecNameToListIndex(const TQString &codecName, const TQStringList &codecList)
{
int codec;
if (codecName == "Local")
@@ -227,30 +227,30 @@ QString PlugInProc::getSsmlXsltFilename()
* Given index into codec list, returns the codec object.
* @param codecNum Index of the codec.
* @param codecList List of codec names. The first 3 entries may be translated names.
-* @return QTextCodec object. Caller must not delete this object.
+* @return TQTextCodec object. Caller must not delete this object.
*/
-/*static*/ QTextCodec* PlugInProc::codecIndexToCodec(int codecNum, const QStringList &codecList)
+/*static*/ TQTextCodec* PlugInProc::codecIndexToCodec(int codecNum, const TQStringList &codecList)
{
- QTextCodec* codec = 0;
+ TQTextCodec* codec = 0;
switch (codecNum) {
case PlugInProc::Local:
- codec = QTextCodec::codecForLocale();
+ codec = TQTextCodec::codecForLocale();
break;
case PlugInProc::Latin1:
- codec = QTextCodec::codecForName("ISO8859-1");
+ codec = TQTextCodec::codecForName("ISO8859-1");
break;
case PlugInProc::Unicode:
- codec = QTextCodec::codecForName("utf16");
+ codec = TQTextCodec::codecForName("utf16");
break;
default:
- codec = QTextCodec::codecForName(codecList[codecNum].latin1());
+ codec = TQTextCodec::codecForName(codecList[codecNum].latin1());
break;
}
if (!codec)
{
kdDebug() << "PlugInProc::codecIndexToCodec: Invalid codec index " << codecNum << endl;
kdDebug() << "PlugInProc::codecIndexToCodec: Defaulting to ISO 8859-1" << endl;
- codec = QTextCodec::codecForName("ISO8859-1");
+ codec = TQTextCodec::codecForName("ISO8859-1");
}
return codec;
}
@@ -265,9 +265,9 @@ QString PlugInProc::getSsmlXsltFilename()
* @param codecList List of codec names. The first 3 entries may be translated names.
* @return Untranslated name of the codec.
*/
-/*static*/ QString PlugInProc::codecIndexToCodecName(int codecNum, const QStringList &codecList)
+/*static*/ TQString PlugInProc::codecIndexToCodecName(int codecNum, const TQStringList &codecList)
{
- QString codecName;
+ TQString codecName;
switch (codecNum) {
case PlugInProc::Local:
codecName = "Local";
diff --git a/kttsd/libkttsd/pluginproc.h b/kttsd/libkttsd/pluginproc.h
index c271ad3..b47042b 100644
--- a/kttsd/libkttsd/pluginproc.h
+++ b/kttsd/libkttsd/pluginproc.h
@@ -19,8 +19,8 @@
#ifndef _PLUGINPROC_H_
#define _PLUGINPROC_H_
-#include <qobject.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqstring.h>
#include <kdemacros.h>
#include "kdeexportfix.h"
#include <kconfig.h>
@@ -110,7 +110,7 @@
* psFinished.
*
* If @ref supportsAsync returns False, KTTSD will run the plugin in a separate
-* QThread. As a consequence, the plugin must not make use of the KDE Library,
+* TQThread. As a consequence, the plugin must not make use of the KDE Library,
* when @ref sayText or @ref synthText is called,
* with the exception of KProcess and family (KProcIO, KShellProcess).
* This restriction comes about because the KDE Libraries make use of the
@@ -241,7 +241,7 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
/**
* Constructor.
*/
- PlugInProc( QObject *parent = 0, const char *name = 0);
+ PlugInProc( TQObject *parent = 0, const char *name = 0);
/**
* Destructor.
@@ -263,7 +263,7 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
config->setGroup(configGroup);
@endverbatim
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Say a text. Synthesize and audibilize it.
@@ -274,7 +274,7 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
* It must also implement the @ref getState method, which must return
* psFinished, when saying is completed.
*/
- virtual void sayText(const QString &text);
+ virtual void sayText(const TQString &text);
/**
* Synthesize text into an audio file, but do not send to the audio device.
@@ -289,7 +289,7 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
* It must also implement the @ref getState method, which must return
* psFinished, when synthesis is completed.
*/
- virtual void synthText(const QString &text, const QString &suggestedFilename);
+ virtual void synthText(const TQString &text, const TQString &suggestedFilename);
/**
* Get the generated audio filename from call to @ref synthText.
@@ -300,7 +300,7 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
* be locked when this method is called. The file will be deleted when
* KTTSD is finished using it.
*/
- virtual QString getFilename();
+ virtual TQString getFilename();
/**
* Stop current operation (saying or synthesizing text).
@@ -373,30 +373,30 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
* tags and converts the file to plain text.
* @return Name of the XSLT file.
*/
- virtual QString getSsmlXsltFilename();
+ virtual TQString getSsmlXsltFilename();
/**
- * Given the name of a codec, returns the QTextCodec for the name.
+ * Given the name of a codec, returns the TQTextCodec for the name.
* Handles the following "special" codec names:
* Local The user's current Locale codec.
* Latin1 Latin1 (ISO 8859-1)
* Unicode UTF-16
* @param codecName Name of desired codec.
* @return The codec object. Calling program must not delete this object
- * as it is a reference to an existing QTextCodec object.
+ * as it is a reference to an existing TQTextCodec object.
*
* Caution: Do not pass translated codec names to this routine.
*/
- static QTextCodec* codecNameToCodec(const QString &codecName);
+ static TQTextCodec* codecNameToCodec(const TQString &codecName);
/**
- * Builds a list of codec names, suitable for display in a QComboBox.
+ * Builds a list of codec names, suitable for display in a TQComboBox.
* The list includes the 3 special codec names (translated) at the top:
* Local The user's current Locale codec.
* Latin1 Latin1 (ISO 8859-1)
* Unicode UTF-16
*/
- static QStringList buildCodecList();
+ static TQStringList buildCodecList();
/**
* Given the name of a codec, returns index into the codec list.
@@ -406,19 +406,19 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
* Unicode UTF-16
* @param codecName Name of the codec.
* @param codecList List of codec names. The first 3 entries may be translated names.
- * @return QTextCodec object. Caller must not delete this object.
+ * @return TQTextCodec object. Caller must not delete this object.
*
* Caution: Do not pass translated codec names to this routine in codecName parameter.
*/
- static int codecNameToListIndex(const QString &codecName, const QStringList &codecList);
+ static int codecNameToListIndex(const TQString &codecName, const TQStringList &codecList);
/**
* Given index into codec list, returns the codec object.
* @param codecNum Index of the codec.
* @param codecList List of codec names. The first 3 entries may be translated names.
- * @return QTextCodec object. Caller must not delete this object.
+ * @return TQTextCodec object. Caller must not delete this object.
*/
- static QTextCodec* codecIndexToCodec(int codecNum, const QStringList &codecList);
+ static TQTextCodec* codecIndexToCodec(int codecNum, const TQStringList &codecList);
/**
* Given index into codec list, returns the codec Name.
@@ -430,7 +430,7 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
* @param codecList List of codec names. The first 3 entries may be translated names.
* @return Untranslated name of the codec.
*/
- static QString codecIndexToCodecName(int codecNum, const QStringList &codecList);
+ static TQString codecIndexToCodecName(int codecNum, const TQStringList &codecList);
signals:
/**
@@ -460,7 +460,7 @@ class KDE_EXPORT PlugInProc : virtual public QObject{
* @see Error-handling
*
*/
- void error(bool keepGoing, const QString &msg);
+ void error(bool keepGoing, const TQString &msg);
};
#endif // _PLUGINPROC_H_
diff --git a/kttsd/libkttsd/selecttalkerdlg.cpp b/kttsd/libkttsd/selecttalkerdlg.cpp
index d74339e..9028bf7 100644
--- a/kttsd/libkttsd/selecttalkerdlg.cpp
+++ b/kttsd/libkttsd/selecttalkerdlg.cpp
@@ -25,10 +25,10 @@
******************************************************************************/
// Qt includes.
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qhbox.h>
-#include <qgroupbox.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqhbox.h>
+#include <tqgroupbox.h>
// KDE includes.
#include <kcombobox.h>
@@ -45,10 +45,10 @@
#include "selecttalkerdlg.moc"
SelectTalkerDlg::SelectTalkerDlg(
- QWidget* parent,
+ TQWidget* parent,
const char* name,
- const QString& caption,
- const QString& talkerCode,
+ const TQString& caption,
+ const TQString& talkerCode,
bool runningTalkers) :
KDialogBase(
@@ -61,33 +61,33 @@ SelectTalkerDlg::SelectTalkerDlg(
{
m_widget = new SelectTalkerWidget( this );
// TODO: How do I do this in a general way and still get KDialogBase to properly resize?
- m_widget->setMinimumSize( QSize(700,500) );
- // setInitialSize( QSize(700,600) );
+ m_widget->setMinimumSize( TQSize(700,500) );
+ // setInitialSize( TQSize(700,600) );
setMainWidget( m_widget );
m_runningTalkers = runningTalkers;
m_talkerCode = TalkerCode( talkerCode, false );
// Fill combo boxes.
KComboBox* cb = m_widget->genderComboBox;
- cb->insertItem( QString::null );
+ cb->insertItem( TQString::null );
cb->insertItem( TalkerCode::translatedGender("male") );
cb->insertItem( TalkerCode::translatedGender("female") );
cb->insertItem( TalkerCode::translatedGender("neutral") );
cb = m_widget->volumeComboBox;
- cb->insertItem( QString::null );
+ cb->insertItem( TQString::null );
cb->insertItem( TalkerCode::translatedVolume("medium") );
cb->insertItem( TalkerCode::translatedVolume("loud") );
cb->insertItem( TalkerCode::translatedVolume("soft") );
cb = m_widget->rateComboBox;
- cb->insertItem( QString::null );
+ cb->insertItem( TQString::null );
cb->insertItem( TalkerCode::translatedRate("medium") );
cb->insertItem( TalkerCode::translatedRate("fast") );
cb->insertItem( TalkerCode::translatedRate("slow") );
cb = m_widget->synthComboBox;
- cb->insertItem( QString::null );
+ cb->insertItem( TQString::null );
KTrader::OfferList offers = KTrader::self()->query("KTTSD/SynthPlugin");
for(unsigned int i=0; i < offers.count() ; ++i)
cb->insertItem(offers[i]->name());
@@ -101,7 +101,7 @@ SelectTalkerDlg::SelectTalkerDlg(
m_widget->useDefaultRadioButton->setChecked(true);
else
{
- QString dummy;
+ TQString dummy;
if (talkerCode == TalkerCode::normalizeTalkerCode(talkerCode, dummy))
m_widget->useSpecificTalkerRadioButton->setChecked(true);
else
@@ -111,67 +111,67 @@ SelectTalkerDlg::SelectTalkerDlg(
applyTalkerCodeToControls();
enableDisableControls();
- connect(m_widget->useDefaultRadioButton, SIGNAL(clicked()),
- this, SLOT(configChanged()));
- connect(m_widget->useClosestMatchRadioButton, SIGNAL(clicked()),
- this, SLOT(configChanged()));
- connect(m_widget->useSpecificTalkerRadioButton, SIGNAL(clicked()),
- this, SLOT(configChanged()));
-
- connect(m_widget->languageBrowseButton, SIGNAL(clicked()),
- this, SLOT(slotLanguageBrowseButton_clicked()));
-
- connect(m_widget->synthComboBox, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->genderComboBox, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->volumeComboBox, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->rateComboBox, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
-
- connect(m_widget->synthCheckBox, SIGNAL(toggled(bool)),
- this, SLOT(configChanged()));
- connect(m_widget->genderCheckBox, SIGNAL(toggled(bool)),
- this, SLOT(configChanged()));
- connect(m_widget->volumeCheckBox, SIGNAL(toggled(bool)),
- this, SLOT(configChanged()));
- connect(m_widget->rateCheckBox, SIGNAL(toggled(bool)),
- this, SLOT(configChanged()));
-
- connect(m_widget->talkersListView, SIGNAL(selectionChanged()),
- this, SLOT(slotTalkersListView_selectionChanged()));
+ connect(m_widget->useDefaultRadioButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->useClosestMatchRadioButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->useSpecificTalkerRadioButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(configChanged()));
+
+ connect(m_widget->languageBrowseButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotLanguageBrowseButton_clicked()));
+
+ connect(m_widget->synthComboBox, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->genderComboBox, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->volumeComboBox, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->rateComboBox, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+
+ connect(m_widget->synthCheckBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->genderCheckBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->volumeCheckBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->rateCheckBox, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(configChanged()));
+
+ connect(m_widget->talkersListView, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(slotTalkersListView_selectionChanged()));
m_widget->talkersListView->setMinimumHeight( 120 );
}
SelectTalkerDlg::~SelectTalkerDlg() { }
-QString SelectTalkerDlg::getSelectedTalkerCode()
+TQString SelectTalkerDlg::getSelectedTalkerCode()
{
return m_talkerCode.getTalkerCode();
}
-QString SelectTalkerDlg::getSelectedTranslatedDescription()
+TQString SelectTalkerDlg::getSelectedTranslatedDescription()
{
return m_talkerCode.getTranslatedDescription();
}
void SelectTalkerDlg::slotLanguageBrowseButton_clicked()
{
- // Create a QHBox to host KListView.
- QHBox* hBox = new QHBox(m_widget, "SelectLanguage_hbox");
+ // Create a TQHBox to host KListView.
+ TQHBox* hBox = new TQHBox(m_widget, "SelectLanguage_hbox");
// Create a KListView and fill with all known languages.
KListView* langLView = new KListView(hBox, "SelectLanguage_lview");
langLView->addColumn(i18n("Language"));
langLView->addColumn(i18n("Code"));
- langLView->setSelectionMode(QListView::Single);
- QStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha();
- QString locale;
- QString language;
+ langLView->setSelectionMode(TQListView::Single);
+ TQStringList allLocales = KGlobal::locale()->allLanguagesTwoAlpha();
+ TQString locale;
+ TQString language;
// Blank line so user can select no language.
- // Note: Don't use QString::null, which gets displayed at bottom of list, rather than top.
- QListViewItem* item = new KListViewItem(langLView, "", "");
+ // Note: Don't use TQString::null, which gets displayed at bottom of list, rather than top.
+ TQListViewItem* item = new KListViewItem(langLView, "", "");
if (m_talkerCode.languageCode().isEmpty()) item->setSelected(true);
int allLocalesCount = allLocales.count();
for (int ndx=0; ndx < allLocalesCount; ++ndx)
@@ -196,12 +196,12 @@ void SelectTalkerDlg::slotLanguageBrowseButton_clicked()
true);
dlg->setMainWidget(hBox);
dlg->setHelp("", "kttsd");
- dlg->setInitialSize(QSize(300, 500), false);
+ dlg->setInitialSize(TQSize(300, 500), false);
// TODO: This isn't working. Furthermore, item appears selected but is not.
langLView->ensureItemVisible(langLView->selectedItem());
int dlgResult = dlg->exec();
- language = QString::null;
- if (dlgResult == QDialog::Accepted)
+ language = TQString::null;
+ if (dlgResult == TQDialog::Accepted)
{
if (langLView->selectedItem())
{
@@ -217,7 +217,7 @@ void SelectTalkerDlg::slotLanguageBrowseButton_clicked()
void SelectTalkerDlg::slotTalkersListView_selectionChanged()
{
- QListViewItem* item = m_widget->talkersListView->selectedItem();
+ TQListViewItem* item = m_widget->talkersListView->selectedItem();
if ( !item ) return;
if (!m_widget->useSpecificTalkerRadioButton->isChecked()) return;
configChanged();
@@ -233,7 +233,7 @@ void SelectTalkerDlg::configChanged()
void SelectTalkerDlg::applyTalkerCodeToControls()
{
bool preferred = false;
- QString code = m_talkerCode.getTalkerCode();
+ TQString code = m_talkerCode.getTalkerCode();
// TODO: Need to display translated Synth names.
KttsUtils::setCbItemFromText(m_widget->synthComboBox,
@@ -259,7 +259,7 @@ void SelectTalkerDlg::applyTalkerCodeToControls()
// Select closest matching specific Talker.
int talkerIndex = TalkerCode::findClosestMatchingTalker(m_talkers, m_talkerCode.getTalkerCode(), false);
KListView* lv = m_widget->talkersListView;
- QListViewItem* item = lv->firstChild();
+ TQListViewItem* item = lv->firstChild();
if ( item )
{
while ( talkerIndex > 0 )
@@ -274,12 +274,12 @@ void SelectTalkerDlg::applyTalkerCodeToControls()
void SelectTalkerDlg::applyControlsToTalkerCode()
{
if ( m_widget->useDefaultRadioButton->isChecked() )
- m_talkerCode = TalkerCode(QString::null, false);
+ m_talkerCode = TalkerCode(TQString::null, false);
else if ( m_widget->useClosestMatchRadioButton->isChecked() )
{
// Language already stored in talker code.
- QString t = m_widget->synthComboBox->currentText();
+ TQString t = m_widget->synthComboBox->currentText();
if ( !t.isEmpty() && m_widget->synthCheckBox->isChecked() ) t.prepend("*");
m_talkerCode.setPlugInName( t );
@@ -297,7 +297,7 @@ void SelectTalkerDlg::applyControlsToTalkerCode()
}
else if (m_widget->useSpecificTalkerRadioButton->isChecked() )
{
- QListViewItem* item = m_widget->talkersListView->selectedItem();
+ TQListViewItem* item = m_widget->talkersListView->selectedItem();
if ( item )
{
int itemIndex = -1;
@@ -316,27 +316,27 @@ void SelectTalkerDlg::loadTalkers(bool /*runningTalkers*/)
m_talkers.clear();
KListView* lv = m_widget->talkersListView;
lv->clear();
- QListViewItem* item;
+ TQListViewItem* item;
KConfig* config = new KConfig("kttsdrc");
config->setGroup("General");
- QStringList talkerIDsList = config->readListEntry("TalkerIDs", ',');
+ TQStringList talkerIDsList = config->readListEntry("TalkerIDs", ',');
if (!talkerIDsList.isEmpty())
{
- QStringList::ConstIterator itEnd(talkerIDsList.constEnd());
- for( QStringList::ConstIterator it = talkerIDsList.constBegin(); it != itEnd; ++it )
+ TQStringList::ConstIterator itEnd(talkerIDsList.constEnd());
+ for( TQStringList::ConstIterator it = talkerIDsList.constBegin(); it != itEnd; ++it )
{
- QString talkerID = *it;
+ TQString talkerID = *it;
config->setGroup("Talker_" + talkerID);
- QString talkerCode = config->readEntry("TalkerCode", QString::null);
+ TQString talkerCode = config->readEntry("TalkerCode", TQString::null);
// Parse and normalize the talker code.
TalkerCode talker = TalkerCode(talkerCode, true);
m_talkers.append(talker);
- QString desktopEntryName = config->readEntry("DesktopEntryName", QString::null);
- QString synthName = TalkerCode::TalkerDesktopEntryNameToName(desktopEntryName);
+ TQString desktopEntryName = config->readEntry("DesktopEntryName", TQString::null);
+ TQString synthName = TalkerCode::TalkerDesktopEntryNameToName(desktopEntryName);
// Display in List View using translated strings.
item = new KListViewItem(lv, item);
- QString fullLanguageCode = talker.fullLanguageCode();
- QString language = TalkerCode::languageCodeToLanguage(fullLanguageCode);
+ TQString fullLanguageCode = talker.fullLanguageCode();
+ TQString language = TalkerCode::languageCodeToLanguage(fullLanguageCode);
item->setText(tlvcLanguage, language);
// Don't update the Synthesizer name with plugInName. The former is a translated
// name; the latter an English name.
diff --git a/kttsd/libkttsd/selecttalkerdlg.h b/kttsd/libkttsd/selecttalkerdlg.h
index bc236e2..799f588 100644
--- a/kttsd/libkttsd/selecttalkerdlg.h
+++ b/kttsd/libkttsd/selecttalkerdlg.h
@@ -28,7 +28,7 @@
#define _SELECTTALKERDLG_H_
// Qt includes.
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
// KDE includes.
#include <kdialogbase.h>
@@ -55,10 +55,10 @@ class KDE_EXPORT SelectTalkerDlg : public KDialogBase
* (which may not yet have been Applied).
*/
SelectTalkerDlg(
- QWidget* parent = 0,
+ TQWidget* parent = 0,
const char* name = "selecttalkerdialog",
- const QString& caption = i18n("Select Talker"),
- const QString& talkerCode = QString::null,
+ const TQString& caption = i18n("Select Talker"),
+ const TQString& talkerCode = TQString::null,
bool runningTalkers = false);
/**
@@ -67,14 +67,14 @@ class KDE_EXPORT SelectTalkerDlg : public KDialogBase
~SelectTalkerDlg();
/**
- * Returns the Talker Code user chose. QString::null if default Talker chosen.
+ * Returns the Talker Code user chose. TQString::null if default Talker chosen.
* Note that if user did not choose a specific Talker, this will be a partial Talker Code.
*/
- QString getSelectedTalkerCode();
+ TQString getSelectedTalkerCode();
/**
* Returns the Talker user chose in a translated displayable format.
*/
- QString getSelectedTranslatedDescription();
+ TQString getSelectedTranslatedDescription();
private slots:
void slotLanguageBrowseButton_clicked();
diff --git a/kttsd/libkttsd/stretcher.cpp b/kttsd/libkttsd/stretcher.cpp
index d3a3984..91ae8fe 100644
--- a/kttsd/libkttsd/stretcher.cpp
+++ b/kttsd/libkttsd/stretcher.cpp
@@ -34,8 +34,8 @@
/**
* Constructor.
*/
-Stretcher::Stretcher(QObject *parent, const char *name) :
- QObject(parent, name)
+Stretcher::Stretcher(TQObject *parent, const char *name) :
+ TQObject(parent, name)
{
m_state = 0;
m_stretchProc = 0;
@@ -56,15 +56,15 @@ Stretcher::~Stretcher()
* @param stretchFactor Amount to stretch. 2.0 is twice as slow. 0.5 is twice as fast.
* @return False if an error occurs.
*/
-bool Stretcher::stretch(const QString &inFilename, const QString &outFilename, float stretchFactor)
+bool Stretcher::stretch(const TQString &inFilename, const TQString &outFilename, float stretchFactor)
{
if (m_stretchProc) return false;
m_outFilename = outFilename;
m_stretchProc = new KProcess;
- QString stretchStr = QString("%1").arg(stretchFactor, 0, 'f', 3);
+ TQString stretchStr = TQString("%1").arg(stretchFactor, 0, 'f', 3);
*m_stretchProc << "sox" << inFilename << outFilename << "stretch" << stretchStr;
- connect(m_stretchProc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)));
+ connect(m_stretchProc, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(slotProcessExited(KProcess*)));
if (!m_stretchProc->start(KProcess::NotifyOnExit, KProcess::NoCommunication))
{
kdDebug() << "Stretcher::stretch: Error starting audio stretcher process. Is sox installed?" << endl;
@@ -90,7 +90,7 @@ int Stretcher::getState() { return m_state; }
/**
* Returns the output filename (as given in call to stretch).
*/
-QString Stretcher::getOutFilename() { return m_outFilename; }
+TQString Stretcher::getOutFilename() { return m_outFilename; }
/**
* Acknowledges the finished stretching.
diff --git a/kttsd/libkttsd/stretcher.h b/kttsd/libkttsd/stretcher.h
index e4d8686..676b690 100644
--- a/kttsd/libkttsd/stretcher.h
+++ b/kttsd/libkttsd/stretcher.h
@@ -38,7 +38,7 @@ class KDE_EXPORT Stretcher : public QObject{
/**
* Constructor.
*/
- Stretcher(QObject *parent = 0, const char *name = 0);
+ Stretcher(TQObject *parent = 0, const char *name = 0);
/**
* Destructor.
@@ -57,7 +57,7 @@ class KDE_EXPORT Stretcher : public QObject{
* @param outFilename Name of output audio file.
* @param stretchFactor Amount to stretch. 2.0 is twice as slow. 0.5 is twice as fast.
*/
- bool stretch(const QString &inFilename, const QString &outFilename, float stretchFactor);
+ bool stretch(const TQString &inFilename, const TQString &outFilename, float stretchFactor);
/**
* Returns the state of the Stretcher.
@@ -67,7 +67,7 @@ class KDE_EXPORT Stretcher : public QObject{
/**
* Returns the output filename (as given in call to stretch).
*/
- QString getOutFilename();
+ TQString getOutFilename();
/**
* Acknowledges the finished stretching.
@@ -91,7 +91,7 @@ class KDE_EXPORT Stretcher : public QObject{
KProcess* m_stretchProc;
// Output file name.
- QString m_outFilename;
+ TQString m_outFilename;
};
#endif // _STRETCHER_H_
diff --git a/kttsd/libkttsd/talkercode.cpp b/kttsd/libkttsd/talkercode.cpp
index d25cf7f..08c89a1 100644
--- a/kttsd/libkttsd/talkercode.cpp
+++ b/kttsd/libkttsd/talkercode.cpp
@@ -34,7 +34,7 @@
/**
* Constructor.
*/
-TalkerCode::TalkerCode(const QString &code/*=QString::null*/, bool normal /*=false*/)
+TalkerCode::TalkerCode(const TQString &code/*=TQString::null*/, bool normal /*=false*/)
{
if (!code.isEmpty())
parseTalkerCode(code);
@@ -64,26 +64,26 @@ TalkerCode::~TalkerCode() { }
/**
* Properties.
*/
-QString TalkerCode::languageCode() const { return m_languageCode; }
-QString TalkerCode::countryCode() const { return m_countryCode; }
-QString TalkerCode::voice() const { return m_voice; }
-QString TalkerCode::gender() const { return m_gender; }
-QString TalkerCode::volume() const { return m_volume; }
-QString TalkerCode::rate() const { return m_rate; }
-QString TalkerCode::plugInName() const { return m_plugInName; }
+TQString TalkerCode::languageCode() const { return m_languageCode; }
+TQString TalkerCode::countryCode() const { return m_countryCode; }
+TQString TalkerCode::voice() const { return m_voice; }
+TQString TalkerCode::gender() const { return m_gender; }
+TQString TalkerCode::volume() const { return m_volume; }
+TQString TalkerCode::rate() const { return m_rate; }
+TQString TalkerCode::plugInName() const { return m_plugInName; }
-void TalkerCode::setLanguageCode(const QString &languageCode) { m_languageCode = languageCode; }
-void TalkerCode::setCountryCode(const QString &countryCode) { m_countryCode = countryCode; }
-void TalkerCode::setVoice(const QString &voice) { m_voice = voice; }
-void TalkerCode::setGender(const QString &gender) { m_gender = gender; }
-void TalkerCode::setVolume(const QString &volume) { m_volume = volume; }
-void TalkerCode::setRate(const QString &rate) { m_rate = rate; }
-void TalkerCode::setPlugInName(const QString plugInName) { m_plugInName = plugInName; }
+void TalkerCode::setLanguageCode(const TQString &languageCode) { m_languageCode = languageCode; }
+void TalkerCode::setCountryCode(const TQString &countryCode) { m_countryCode = countryCode; }
+void TalkerCode::setVoice(const TQString &voice) { m_voice = voice; }
+void TalkerCode::setGender(const TQString &gender) { m_gender = gender; }
+void TalkerCode::setVolume(const TQString &volume) { m_volume = volume; }
+void TalkerCode::setRate(const TQString &rate) { m_rate = rate; }
+void TalkerCode::setPlugInName(const TQString plugInName) { m_plugInName = plugInName; }
/**
* Sets the language code and country code (if given).
*/
-void TalkerCode::setFullLanguageCode(const QString &fullLanguageCode)
+void TalkerCode::setFullLanguageCode(const TQString &fullLanguageCode)
{
splitFullLanguageCode(fullLanguageCode, m_languageCode, m_countryCode);
}
@@ -91,7 +91,7 @@ void TalkerCode::setFullLanguageCode(const QString &fullLanguageCode)
/**
* Returns the language code plus country code (if any).
*/
-QString TalkerCode::fullLanguageCode() const
+TQString TalkerCode::fullLanguageCode() const
{
if (!m_countryCode.isEmpty())
return m_languageCode + "_" + m_countryCode;
@@ -102,16 +102,16 @@ QString TalkerCode::fullLanguageCode() const
/**
* The Talker Code returned in XML format.
*/
-QString TalkerCode::getTalkerCode() const
+TQString TalkerCode::getTalkerCode() const
{
- QString code;
- QString languageCode = m_languageCode;
+ TQString code;
+ TQString languageCode = m_languageCode;
if (!m_countryCode.isEmpty()) languageCode += "_" + m_countryCode;
if (!languageCode.isEmpty()) code = "lang=\"" + languageCode + "\" ";
if (!m_voice.isEmpty()) code += "name=\"" + m_voice + "\" ";
if (!m_gender.isEmpty()) code += "gender=\"" + m_gender + "\" ";
if (!code.isEmpty()) code = "<voice " + code + "/>";
- QString prosody;
+ TQString prosody;
if (!m_volume.isEmpty()) prosody = "volume=\"" + m_volume + "\" ";
if (!m_rate.isEmpty()) prosody += "rate=\"" + m_rate + "\" ";
if (!prosody.isEmpty()) code += "<prosody " + prosody + "/>";
@@ -122,11 +122,11 @@ QString TalkerCode::getTalkerCode() const
/**
* The Talker Code translated for display.
*/
-QString TalkerCode::getTranslatedDescription() const
+TQString TalkerCode::getTranslatedDescription() const
{
- QString code;
+ TQString code;
bool prefer;
- QString fullLangCode = fullLanguageCode();
+ TQString fullLangCode = fullLanguageCode();
if (!fullLangCode.isEmpty()) code = languageCodeToLanguage( fullLangCode );
// TODO: The PlugInName is always English. Need a way to convert this to a translated
// name (possibly via DesktopEntryNameToName, but to do that, we need the desktopEntryName
@@ -159,7 +159,7 @@ void TalkerCode::normalize()
* @return fullLanguageCode Language code from the talker code (including country code if any).
* @return Normalized talker code.
*/
-/*static*/ QString TalkerCode::normalizeTalkerCode(const QString &talkerCode, QString &fullLanguageCode)
+/*static*/ TQString TalkerCode::normalizeTalkerCode(const TQString &talkerCode, TQString &fullLanguageCode)
{
TalkerCode tmpTalkerCode(talkerCode);
tmpTalkerCode.normalize();
@@ -177,11 +177,11 @@ void TalkerCode::normalize()
* If the input code begins with an asterisk, it is ignored and removed from the returned
* languageCode.
*/
-/*static*/ void TalkerCode::splitFullLanguageCode(const QString &lang, QString &languageCode, QString &countryCode)
+/*static*/ void TalkerCode::splitFullLanguageCode(const TQString &lang, TQString &languageCode, TQString &countryCode)
{
- QString language = lang;
+ TQString language = lang;
if (language.left(1) == "*") language = language.mid(1);
- QString charSet;
+ TQString charSet;
KGlobal::locale()->splitLocale(language, languageCode, countryCode, charSet);
}
@@ -196,7 +196,7 @@ void TalkerCode::normalize()
* <prosody volume="medium" rate="medium"/>
* <kttsd synthesizer="Festival" />
*/
-/*static*/ QString TalkerCode::defaultTalkerCode(const QString &fullLanguageCode, const QString &plugInName)
+/*static*/ TQString TalkerCode::defaultTalkerCode(const TQString &fullLanguageCode, const TQString &plugInName)
{
TalkerCode tmpTalkerCode;
tmpTalkerCode.setFullLanguageCode(fullLanguageCode);
@@ -208,11 +208,11 @@ void TalkerCode::normalize()
/**
* Converts a language code plus optional country code to language description.
*/
-/*static*/ QString TalkerCode::languageCodeToLanguage(const QString &languageCode)
+/*static*/ TQString TalkerCode::languageCodeToLanguage(const TQString &languageCode)
{
- QString twoAlpha;
- QString countryCode;
- QString language;
+ TQString twoAlpha;
+ TQString countryCode;
+ TQString language;
if (languageCode == "other")
language = i18n("Other");
else
@@ -222,7 +222,7 @@ void TalkerCode::normalize()
}
if (!countryCode.isEmpty())
{
- QString countryName = KGlobal::locale()->twoAlphaToCountryName(countryCode);
+ TQString countryName = KGlobal::locale()->twoAlphaToCountryName(countryCode);
// Some abbreviations to save screen space.
if (countryName == i18n("full country name", "United States of America"))
countryName = i18n("abbreviated country name", "USA");
@@ -236,7 +236,7 @@ void TalkerCode::normalize()
/**
* These functions return translated Talker Code attributes.
*/
-/*static*/ QString TalkerCode::translatedGender(const QString &gender)
+/*static*/ TQString TalkerCode::translatedGender(const TQString &gender)
{
if (gender == "male")
return i18n("male");
@@ -246,7 +246,7 @@ void TalkerCode::normalize()
return i18n("neutral gender", "neutral");
else return gender;
}
-/*static*/ QString TalkerCode::untranslatedGender(const QString &gender)
+/*static*/ TQString TalkerCode::untranslatedGender(const TQString &gender)
{
if (gender == i18n("male"))
return "male";
@@ -256,7 +256,7 @@ void TalkerCode::normalize()
return "neutral";
else return gender;
}
-/*static*/ QString TalkerCode::translatedVolume(const QString &volume)
+/*static*/ TQString TalkerCode::translatedVolume(const TQString &volume)
{
if (volume == "medium")
return i18n("medium sound", "medium");
@@ -266,7 +266,7 @@ void TalkerCode::normalize()
return i18n("soft sound", "soft");
else return volume;
}
-/*static*/ QString TalkerCode::untranslatedVolume(const QString &volume)
+/*static*/ TQString TalkerCode::untranslatedVolume(const TQString &volume)
{
if (volume == i18n("medium sound", "medium"))
return "medium";
@@ -276,7 +276,7 @@ void TalkerCode::normalize()
return "soft";
else return volume;
}
-/*static*/ QString TalkerCode::translatedRate(const QString &rate)
+/*static*/ TQString TalkerCode::translatedRate(const TQString &rate)
{
if (rate == "medium")
return i18n("medium speed", "medium");
@@ -286,7 +286,7 @@ void TalkerCode::normalize()
return i18n("slow speed", "slow");
else return rate;
}
-/*static*/ QString TalkerCode::untranslatedRate(const QString &rate)
+/*static*/ TQString TalkerCode::untranslatedRate(const TQString &rate)
{
if (rate == i18n("medium speed", "medium"))
return "medium";
@@ -301,9 +301,9 @@ void TalkerCode::normalize()
* Given a talker code, parses out the attributes.
* @param talkerCode The talker code.
*/
-void TalkerCode::parseTalkerCode(const QString &talkerCode)
+void TalkerCode::parseTalkerCode(const TQString &talkerCode)
{
- QString fullLanguageCode;
+ TQString fullLanguageCode;
if (talkerCode.contains("\""))
{
fullLanguageCode = talkerCode.section("lang=", 1, 1);
@@ -311,8 +311,8 @@ void TalkerCode::parseTalkerCode(const QString &talkerCode)
}
else
fullLanguageCode = talkerCode;
- QString languageCode;
- QString countryCode;
+ TQString languageCode;
+ TQString countryCode;
splitFullLanguageCode(fullLanguageCode, languageCode, countryCode);
m_languageCode = languageCode;
if (fullLanguageCode.left(1) == "*") countryCode = "*" + countryCode;
@@ -340,7 +340,7 @@ void TalkerCode::parseTalkerCode(const QString &talkerCode)
*/
/*static*/ int TalkerCode::findClosestMatchingTalker(
const TalkerCodeList& talkers,
- const QString& talker,
+ const TQString& talker,
bool assumeDefaultLang)
{
// kdDebug() << "TalkerCode::findClosestMatchingTalker: matching on talker code " << talker << endl;
@@ -356,7 +356,7 @@ void TalkerCode::parseTalkerCode(const QString &talkerCode)
}
// The talker that matches on the most priority attributes wins.
int talkersCount = int(talkers.count());
- QMemArray<int> priorityMatch(talkersCount);
+ TQMemArray<int> priorityMatch(talkersCount);
for (int ndx = 0; ndx < talkersCount; ++ndx)
{
priorityMatch[ndx] = 0;
@@ -412,7 +412,7 @@ void TalkerCode::parseTalkerCode(const QString &talkerCode)
// (first configured) will be chosen.
if (winnerCount > 1)
{
- QMemArray<int> preferredMatch(talkersCount);
+ TQMemArray<int> preferredMatch(talkersCount);
for (int ndx = 0; ndx < talkersCount; ++ndx)
{
preferredMatch[ndx] = 0;
@@ -471,7 +471,7 @@ void TalkerCode::parseTalkerCode(const QString &talkerCode)
return winner;
}
-/*static*/ QString TalkerCode::stripPrefer( const QString& code, bool& preferred)
+/*static*/ TQString TalkerCode::stripPrefer( const TQString& code, bool& preferred)
{
if ( code.left(1) == "*" )
{
@@ -487,15 +487,15 @@ void TalkerCode::parseTalkerCode(const QString &talkerCode)
* Uses KTrader to convert a translated Synth Plugin Name to DesktopEntryName.
* @param name The translated plugin name. From Name= line in .desktop file.
* @return DesktopEntryName. The name of the .desktop file (less .desktop).
-* QString::null if not found.
+* TQString::null if not found.
*/
-/*static*/ QString TalkerCode::TalkerNameToDesktopEntryName(const QString& name)
+/*static*/ TQString TalkerCode::TalkerNameToDesktopEntryName(const TQString& name)
{
- if (name.isEmpty()) return QString::null;
+ if (name.isEmpty()) return TQString::null;
KTrader::OfferList offers = KTrader::self()->query("KTTSD/SynthPlugin");
for (uint ndx = 0; ndx < offers.count(); ++ndx)
if (offers[ndx]->name() == name) return offers[ndx]->desktopEntryName();
- return QString::null;
+ return TQString::null;
}
/**
@@ -503,15 +503,15 @@ void TalkerCode::parseTalkerCode(const QString &talkerCode)
* @param desktopEntryName The DesktopEntryName.
* @return The translated Name of the plugin, from Name= line in .desktop file.
*/
-/*static*/ QString TalkerCode::TalkerDesktopEntryNameToName(const QString& desktopEntryName)
+/*static*/ TQString TalkerCode::TalkerDesktopEntryNameToName(const TQString& desktopEntryName)
{
- if (desktopEntryName.isEmpty()) return QString::null;
+ if (desktopEntryName.isEmpty()) return TQString::null;
KTrader::OfferList offers = KTrader::self()->query("KTTSD/SynthPlugin",
- QString("DesktopEntryName == '%1'").arg(desktopEntryName));
+ TQString("DesktopEntryName == '%1'").arg(desktopEntryName));
if (offers.count() == 1)
return offers[0]->name();
else
- return QString::null;
+ return TQString::null;
}
diff --git a/kttsd/libkttsd/talkercode.h b/kttsd/libkttsd/talkercode.h
index 45469af..70e8ee6 100644
--- a/kttsd/libkttsd/talkercode.h
+++ b/kttsd/libkttsd/talkercode.h
@@ -27,10 +27,10 @@
#define _TALKERCODE_H_
// Qt includes.
-#include <qstring.h>
+#include <tqstring.h>
#include <kdemacros.h>
#include "kdeexportfix.h"
-#include <qvaluelist.h>
+#include <tqvaluelist.h>
class KDE_EXPORT TalkerCode
{
@@ -38,7 +38,7 @@ class KDE_EXPORT TalkerCode
/**
* Constructor.
*/
- TalkerCode(const QString &code=QString::null, bool normal=false);
+ TalkerCode(const TQString &code=TQString::null, bool normal=false);
/**
* Copy Constructor.
*/
@@ -49,46 +49,46 @@ class KDE_EXPORT TalkerCode
*/
~TalkerCode();
- typedef QValueList<TalkerCode> TalkerCodeList;
+ typedef TQValueList<TalkerCode> TalkerCodeList;
/**
* Properties.
*/
- QString languageCode() const; /* lang="xx" */
- QString countryCode() const; /* lang="yy_xx */
- QString voice() const; /* name="xxx" */
- QString gender() const; /* gender="xxx" */
- QString volume() const; /* volume="xxx" */
- QString rate() const; /* rate="xxx" */
- QString plugInName() const; /* synthesizer="xxx" */
+ TQString languageCode() const; /* lang="xx" */
+ TQString countryCode() const; /* lang="yy_xx */
+ TQString voice() const; /* name="xxx" */
+ TQString gender() const; /* gender="xxx" */
+ TQString volume() const; /* volume="xxx" */
+ TQString rate() const; /* rate="xxx" */
+ TQString plugInName() const; /* synthesizer="xxx" */
/**
* Returns the language code plus country code (if any).
*/
- QString fullLanguageCode() const;
+ TQString fullLanguageCode() const;
- void setLanguageCode(const QString &languageCode);
- void setCountryCode(const QString &countryCode);
- void setVoice(const QString &voice);
- void setGender(const QString &gender);
- void setVolume(const QString &volume);
- void setRate(const QString &rate);
- void setPlugInName(const QString plugInName);
+ void setLanguageCode(const TQString &languageCode);
+ void setCountryCode(const TQString &countryCode);
+ void setVoice(const TQString &voice);
+ void setGender(const TQString &gender);
+ void setVolume(const TQString &volume);
+ void setRate(const TQString &rate);
+ void setPlugInName(const TQString plugInName);
/**
* Sets the language code and country code (if given).
*/
- void setFullLanguageCode(const QString &fullLanguageCode);
+ void setFullLanguageCode(const TQString &fullLanguageCode);
/**
* The Talker Code returned in XML format.
*/
- QString getTalkerCode() const;
+ TQString getTalkerCode() const;
/**
* The Talker Code translated for display.
*/
- QString getTranslatedDescription() const;
+ TQString getTranslatedDescription() const;
/**
* Normalizes the Talker Code by filling in defaults.
@@ -102,7 +102,7 @@ class KDE_EXPORT TalkerCode
* @return fullLanguageCode Language code from the talker code (including country code if any).
* @return Normalized talker code.
*/
- static QString normalizeTalkerCode(const QString &talkerCode, QString &fullLanguageCode);
+ static TQString normalizeTalkerCode(const TQString &talkerCode, TQString &fullLanguageCode);
/**
* Given a language code that might contain a country code, splits the code into
@@ -114,7 +114,7 @@ class KDE_EXPORT TalkerCode
* If the input code begins with an asterisk, it is ignored and removed from the returned
* languageCode.
*/
- static void splitFullLanguageCode(const QString &lang, QString &languageCode, QString &countryCode);
+ static void splitFullLanguageCode(const TQString &lang, TQString &languageCode, TQString &countryCode);
/**
* Given a language code and plugin name, returns a normalized default talker code.
@@ -127,22 +127,22 @@ class KDE_EXPORT TalkerCode
* <prosody volume="medium" rate="medium"/>
* <kttsd synthesizer="Festival" />
*/
- static QString defaultTalkerCode(const QString &fullLanguageCode, const QString &plugInName);
+ static TQString defaultTalkerCode(const TQString &fullLanguageCode, const TQString &plugInName);
/**
* Converts a language code plus optional country code to language description.
*/
- static QString languageCodeToLanguage(const QString &languageCode);
+ static TQString languageCodeToLanguage(const TQString &languageCode);
/**
* These functions return translated Talker Code attributes.
*/
- static QString translatedGender(const QString &gender);
- static QString translatedVolume(const QString &volume);
- static QString translatedRate(const QString &rate);
- static QString untranslatedGender(const QString &gender);
- static QString untranslatedVolume(const QString &volume);
- static QString untranslatedRate(const QString &rate);
+ static TQString translatedGender(const TQString &gender);
+ static TQString translatedVolume(const TQString &volume);
+ static TQString translatedRate(const TQString &rate);
+ static TQString untranslatedGender(const TQString &gender);
+ static TQString untranslatedVolume(const TQString &volume);
+ static TQString untranslatedRate(const TQString &rate);
/**
* Given a list of parsed talker codes and a desired talker code, finds the closest
@@ -155,43 +155,43 @@ class KDE_EXPORT TalkerCode
*/
static int findClosestMatchingTalker(
const TalkerCodeList& talkers,
- const QString& talker,
+ const TQString& talker,
bool assumeDefaultLang = true);
/**
* Strips leading * from a code.
*/
- static QString stripPrefer( const QString& code, bool& preferred);
+ static TQString stripPrefer( const TQString& code, bool& preferred);
/**
* Uses KTrader to convert a translated Synth Plugin Name to DesktopEntryName.
* @param name The translated plugin name. From Name= line in .desktop file.
* @return DesktopEntryName. The name of the .desktop file (less .desktop).
- * QString::null if not found.
+ * TQString::null if not found.
*/
- static QString TalkerNameToDesktopEntryName(const QString& name);
+ static TQString TalkerNameToDesktopEntryName(const TQString& name);
/**
* Uses KTrader to convert a DesktopEntryName into a translated Synth Plugin Name.
* @param desktopEntryName The DesktopEntryName.
* @return The translated Name of the plugin, from Name= line in .desktop file.
*/
- static QString TalkerDesktopEntryNameToName(const QString& desktopEntryName);
+ static TQString TalkerDesktopEntryNameToName(const TQString& desktopEntryName);
private:
/**
* Given a talker code, parses out the attributes.
* @param talkerCode The talker code.
*/
- void parseTalkerCode(const QString &talkerCode);
+ void parseTalkerCode(const TQString &talkerCode);
- QString m_languageCode; /* lang="xx" */
- QString m_countryCode; /* lang="yy_xx */
- QString m_voice; /* name="xxx" */
- QString m_gender; /* gender="xxx" */
- QString m_volume; /* volume="xxx" */
- QString m_rate; /* rate="xxx" */
- QString m_plugInName; /* synthesizer="xxx" */
+ TQString m_languageCode; /* lang="xx" */
+ TQString m_countryCode; /* lang="yy_xx */
+ TQString m_voice; /* name="xxx" */
+ TQString m_gender; /* gender="xxx" */
+ TQString m_volume; /* volume="xxx" */
+ TQString m_rate; /* rate="xxx" */
+ TQString m_plugInName; /* synthesizer="xxx" */
};
#endif // _TALKERCODE_H_
diff --git a/kttsd/libkttsd/testplayer.cpp b/kttsd/libkttsd/testplayer.cpp
index 06d05a7..1050ec2 100644
--- a/kttsd/libkttsd/testplayer.cpp
+++ b/kttsd/libkttsd/testplayer.cpp
@@ -23,7 +23,7 @@
******************************************************************************/
// Qt includes.
-#include <qfile.h>
+#include <tqfile.h>
// KDE includes.
#include <kapplication.h>
@@ -44,9 +44,9 @@
/**
* Constructor.
*/
-TestPlayer::TestPlayer(QObject *parent, const char *name,
- const int playerOption, const float audioStretchFactor, const QString &sinkName) :
- QObject(parent, name)
+TestPlayer::TestPlayer(TQObject *parent, const char *name,
+ const int playerOption, const float audioStretchFactor, const TQString &sinkName) :
+ TQObject(parent, name)
{
m_playerOption = playerOption;
m_audioStretchFactor = audioStretchFactor;
@@ -82,19 +82,19 @@ void TestPlayer::setPlayerOption(const int playerOption) { m_playerOption = play
void TestPlayer::setAudioStretchFactor(const float audioStretchFactor)
{ m_audioStretchFactor = audioStretchFactor; }
-void TestPlayer::setSinkName(const QString &sinkName) { m_sinkName = sinkName; }
+void TestPlayer::setSinkName(const TQString &sinkName) { m_sinkName = sinkName; }
/**
* Plays the specifified audio file and waits for completion.
* The audio file speed is adjusted according to the stretch factor.
* @param waveFile Name of the audio file to play.
*/
-void TestPlayer::play(const QString &waveFile)
+void TestPlayer::play(const TQString &waveFile)
{
// kdDebug() << "TestPlayer::play: running" << endl;
// Create a Stretcher object to adjust the audio Speed.
- QString playFile = waveFile;
- QString tmpFile;
+ TQString playFile = waveFile;
+ TQString tmpFile;
if (m_audioStretchFactor != 1.0)
{
tmpFile = makeSuggestedFilename();
@@ -128,7 +128,7 @@ void TestPlayer::play(const QString &waveFile)
m_player->stop();
delete m_player;
m_player = 0;
- if (!tmpFile.isEmpty()) QFile::remove(tmpFile);
+ if (!tmpFile.isEmpty()) TQFile::remove(tmpFile);
}
/**
@@ -137,7 +137,7 @@ void TestPlayer::play(const QString &waveFile)
Player* TestPlayer::createPlayerObject(int playerOption)
{
Player* player = 0;
- QString plugInName;
+ TQString plugInName;
switch(playerOption)
{
case 1 :
@@ -162,7 +162,7 @@ Player* TestPlayer::createPlayerObject(int playerOption)
}
}
KTrader::OfferList offers = KTrader::self()->query(
- "KTTSD/AudioPlugin", QString("DesktopEntryName == '%1'").arg(plugInName));
+ "KTTSD/AudioPlugin", TQString("DesktopEntryName == '%1'").arg(plugInName));
if(offers.count() == 1)
{
@@ -197,12 +197,12 @@ Player* TestPlayer::createPlayerObject(int playerOption)
* for synthesis to write to.
* @return Full pathname of suggested file.
*/
-QString TestPlayer::makeSuggestedFilename()
+TQString TestPlayer::makeSuggestedFilename()
{
KTempFile tempFile (locateLocal("tmp", "kttsmgr-"), ".wav");
- QString waveFile = tempFile.file()->name();
+ TQString waveFile = tempFile.file()->name();
tempFile.close();
- QFile::remove(waveFile);
+ TQFile::remove(waveFile);
// kdDebug() << "TestPlayer::makeSuggestedFilename: Suggesting filename: " << waveFile << endl;
return PlugInConf::realFilePath(waveFile);
}
diff --git a/kttsd/libkttsd/testplayer.h b/kttsd/libkttsd/testplayer.h
index 2e7339c..f3e4e4b 100644
--- a/kttsd/libkttsd/testplayer.h
+++ b/kttsd/libkttsd/testplayer.h
@@ -40,9 +40,9 @@ class KDE_EXPORT TestPlayer : public QObject{
* @param playerOption
* @param audioStretchFactor
*/
- TestPlayer(QObject *parent = 0, const char *name = 0,
+ TestPlayer(TQObject *parent = 0, const char *name = 0,
const int playerOption = 0, const float audioStretchFactor = 1.0,
- const QString &sinkName = QString::null);
+ const TQString &sinkName = TQString::null);
/**
* Destructor.
@@ -69,12 +69,12 @@ class KDE_EXPORT TestPlayer : public QObject{
* The audio file speed is adjusted according to the stretch factor.
* @param waveFile Name of the audio file to play.
*/
- void play(const QString &waveFile);
+ void play(const TQString &waveFile);
/**
* Sets the GStreamer Sink Name. Examples: "alsasink", "osssink", "nassink".
*/
- void setSinkName(const QString &sinkName);
+ void setSinkName(const TQString &sinkName);
/**
* Creates and returns a player object based on user option.
@@ -88,7 +88,7 @@ class KDE_EXPORT TestPlayer : public QObject{
* for synthesis to write to.
* @return Full pathname of suggested file.
*/
- QString makeSuggestedFilename();
+ TQString makeSuggestedFilename();
/**
* Which audio player to use.
@@ -105,7 +105,7 @@ class KDE_EXPORT TestPlayer : public QObject{
/**
* GStreamer sink name.
*/
- QString m_sinkName;
+ TQString m_sinkName;
/**
* Stretcher object.
diff --git a/kttsd/libkttsd/utils.cpp b/kttsd/libkttsd/utils.cpp
index dd9f98c..ed9200b 100644
--- a/kttsd/libkttsd/utils.cpp
+++ b/kttsd/libkttsd/utils.cpp
@@ -15,9 +15,9 @@
* *
***************************************************************************/
-#include <qstring.h>
+#include <tqstring.h>
#include <kdebug.h>
-#include <qcombobox.h>
+#include <tqcombobox.h>
#include "utils.h"
@@ -34,9 +34,9 @@ KttsUtils::~KttsUtils() {
* @param elementName The element to check for in the document.
* @returns True if the root element exists in the document, false otherwise.
*/
-bool KttsUtils::hasRootElement(const QString &xmldoc, const QString &elementName) {
+bool KttsUtils::hasRootElement(const TQString &xmldoc, const TQString &elementName) {
// Strip all whitespace and go from there.
- QString doc = xmldoc.simplifyWhiteSpace();
+ TQString doc = xmldoc.simplifyWhiteSpace();
// Take off the <?xml...?> if it exists
if(doc.startsWith("<?xml")) {
// Look for ?> and strip everything off from there to the start - effectively removing
@@ -76,14 +76,14 @@ bool KttsUtils::hasRootElement(const QString &xmldoc, const QString &elementName
/**
* Check if an XML document has a certain DOCTYPE.
* @param xmldoc The document to check for the doctype.
- * @param name The doctype name to check for. Pass QString::null to not check the name.
- * @param publicId The public ID to check for. Pass QString::null to not check the ID.
- * @param systemId The system ID to check for. Pass QString::null to not check the ID.
+ * @param name The doctype name to check for. Pass TQString::null to not check the name.
+ * @param publicId The public ID to check for. Pass TQString::null to not check the ID.
+ * @param systemId The system ID to check for. Pass TQString::null to not check the ID.
* @returns True if the parameters match the doctype, false otherwise.
*/
-bool KttsUtils::hasDoctype(const QString &xmldoc, const QString &name/*, const QString &publicId, const QString &systemId*/) {
+bool KttsUtils::hasDoctype(const TQString &xmldoc, const TQString &name/*, const TQString &publicId, const TQString &systemId*/) {
// Strip all whitespace and go from there.
- QString doc = xmldoc.stripWhiteSpace();
+ TQString doc = xmldoc.stripWhiteSpace();
// Take off the <?xml...?> if it exists
if(doc.startsWith("<?xml")) {
// Look for ?> and strip everything off from there to the start - effectively removing
@@ -117,7 +117,7 @@ bool KttsUtils::hasDoctype(const QString &xmldoc, const QString &name/*, const Q
* Sets the current item in the given combobox to the item with the given text.
* If item with the text not found, does nothing.
*/
-/*static*/ void KttsUtils::setCbItemFromText(QComboBox* cb, const QString& text)
+/*static*/ void KttsUtils::setCbItemFromText(TQComboBox* cb, const TQString& text)
{
const int itemCount = cb->count();
for (int ndx = 0; ndx < itemCount; ++ndx)
diff --git a/kttsd/libkttsd/utils.h b/kttsd/libkttsd/utils.h
index 63e95bc..a8b922c 100644
--- a/kttsd/libkttsd/utils.h
+++ b/kttsd/libkttsd/utils.h
@@ -38,23 +38,23 @@ public:
* @param elementName The element to check for in the document.
* @returns true if the root element exists in the document, false otherwise.
*/
- static bool hasRootElement(const QString &xmldoc, const QString &elementName);
+ static bool hasRootElement(const TQString &xmldoc, const TQString &elementName);
/**
* Check if an XML document has a certain DOCTYPE.
* @param xmldoc The document to check for the doctype.
- * @param name The doctype name to check for. Pass QString::null to not check the name.
- * @param publicId The public ID to check for. Pass QString::null to not check the ID.
- * @param systemId The system ID to check for. Pass QString::null to not check the ID.
+ * @param name The doctype name to check for. Pass TQString::null to not check the name.
+ * @param publicId The public ID to check for. Pass TQString::null to not check the ID.
+ * @param systemId The system ID to check for. Pass TQString::null to not check the ID.
* @returns true if the parameters match the doctype, false otherwise.
*/
- static bool hasDoctype(const QString &xmldoc, const QString &name/*, const QString &publicId, const QString &systemId*/);
+ static bool hasDoctype(const TQString &xmldoc, const TQString &name/*, const TQString &publicId, const TQString &systemId*/);
/**
* Sets the current item in the given combobox to the item with the given text.
* If item with the text not found, does nothing.
*/
- static void setCbItemFromText(QComboBox* cb, const QString& text);
+ static void setCbItemFromText(TQComboBox* cb, const TQString& text);
};
diff --git a/kttsd/players/akodeplayer/akodeplayer.cpp b/kttsd/players/akodeplayer/akodeplayer.cpp
index de88773..13f6cf3 100644
--- a/kttsd/players/akodeplayer/akodeplayer.cpp
+++ b/kttsd/players/akodeplayer/akodeplayer.cpp
@@ -16,7 +16,7 @@
#include <kdebug.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "akode/player.h"
#include "akode/decoder.h"
@@ -29,7 +29,7 @@ using namespace aKode;
// public methods
////////////////////////////////////////////////////////////////////////////////
-aKodePlayer::aKodePlayer(QObject* parent, const char* name, const QStringList& args) :
+aKodePlayer::aKodePlayer(TQObject* parent, const char* name, const TQStringList& args) :
Player(parent, name, args),
m_player(0)
{}
@@ -40,7 +40,7 @@ aKodePlayer::~aKodePlayer()
}
//void aKodePlayer::play(const FileHandle &file)
-void aKodePlayer::startPlay(const QString &file)
+void aKodePlayer::startPlay(const TQString &file)
{
kdDebug() << k_funcinfo << endl;
@@ -53,7 +53,7 @@ void aKodePlayer::startPlay(const QString &file)
return;
}
- // QString filename = file.absFilePath();
+ // TQString filename = file.absFilePath();
kdDebug() << "Opening: " << file << endl;
@@ -68,7 +68,7 @@ void aKodePlayer::startPlay(const QString &file)
}
}
- if (m_player->load(QFile::encodeName(file)))
+ if (m_player->load(TQFile::encodeName(file)))
m_player->play();
}
@@ -169,11 +169,11 @@ void aKodePlayer::seekPosition(int position)
m_player->decoder()->seek((position * m_player->decoder()->length())/1000);
}
-QStringList aKodePlayer::getPluginList( const QCString& /*classname*/ )
+TQStringList aKodePlayer::getPluginList( const TQCString& /*classname*/ )
{
- return QStringList::split("|", "auto|polyp|alsa|jack|oss");
+ return TQStringList::split("|", "auto|polyp|alsa|jack|oss");
}
-void aKodePlayer::setSinkName(const QString& sinkName) { m_sinkName = sinkName; }
+void aKodePlayer::setSinkName(const TQString& sinkName) { m_sinkName = sinkName; }
#include "akodeplayer.moc"
diff --git a/kttsd/players/akodeplayer/akodeplayer.h b/kttsd/players/akodeplayer/akodeplayer.h
index bbfb3ea..c003d13 100644
--- a/kttsd/players/akodeplayer/akodeplayer.h
+++ b/kttsd/players/akodeplayer/akodeplayer.h
@@ -19,7 +19,7 @@
#include <config.h>
#include "kdeexportfix.h"
-#include <qstring.h>
+#include <tqstring.h>
#include "player.h"
#include <kdemacros.h>
@@ -33,11 +33,11 @@ class KDE_EXPORT aKodePlayer : public Player
Q_OBJECT
public:
- aKodePlayer(QObject* parent = 0, const char* name = 0, const QStringList& args=QStringList());
+ aKodePlayer(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList());
virtual ~aKodePlayer();
// virtual void play(const FileHandle &file = FileHandle::null());
- virtual void startPlay(const QString &file);
+ virtual void startPlay(const TQString &file);
virtual void setVolume(float volume = 1.0);
virtual float volume() const;
@@ -52,8 +52,8 @@ public:
virtual void seek(int seekTime);
virtual void seekPosition(int position);
- virtual QStringList getPluginList( const QCString& classname );
- virtual void setSinkName(const QString &sinkName);
+ virtual TQStringList getPluginList( const TQCString& classname );
+ virtual void setSinkName(const TQString &sinkName);
public slots:
void pause();
@@ -61,7 +61,7 @@ public slots:
private:
aKode::Player *m_player;
- QString m_sinkName;
+ TQString m_sinkName;
};
#endif
diff --git a/kttsd/players/alsaplayer/alsaplayer.cpp b/kttsd/players/alsaplayer/alsaplayer.cpp
index d3eabe8..72a242a 100644
--- a/kttsd/players/alsaplayer/alsaplayer.cpp
+++ b/kttsd/players/alsaplayer/alsaplayer.cpp
@@ -39,9 +39,9 @@
#endif
// Qt includes.
-#include <qdir.h>
-#include <qapplication.h>
-#include <qcstring.h>
+#include <tqdir.h>
+#include <tqapplication.h>
+#include <tqcstring.h>
// KDE includes.
#include <kdebug.h>
@@ -55,15 +55,15 @@
#if !defined(__GNUC__) || __GNUC__ >= 3
#define ERR(...) do {\
- QString dbgStr;\
- QString s = dbgStr.sprintf( "%s:%d: ERROR ", __FUNCTION__, __LINE__); \
+ TQString dbgStr;\
+ TQString s = dbgStr.sprintf( "%s:%d: ERROR ", __FUNCTION__, __LINE__); \
s += dbgStr.sprintf( __VA_ARGS__); \
kdDebug() << timestamp() << "AlsaPlayer::" << s << endl; \
} while (0)
#else
#define ERR(args...) do {\
- QString dbgStr;\
- QString s = dbgStr.sprintf( "%s:%d: ERROR ", __FUNCTION__, __LINE__); \
+ TQString dbgStr;\
+ TQString s = dbgStr.sprintf( "%s:%d: ERROR ", __FUNCTION__, __LINE__); \
s += dbgStr.sprintf( ##args ); \
kdDebug() << timestamp() << "AlsaPlayer::" << s << endl; \
} while (0)
@@ -72,8 +72,8 @@
#if !defined(__GNUC__) || __GNUC__ >= 3
#define MSG(...) do {\
if (m_debugLevel >= 1) {\
- QString dbgStr; \
- QString s = dbgStr.sprintf( "%s:%d: ", __FUNCTION__, __LINE__); \
+ TQString dbgStr; \
+ TQString s = dbgStr.sprintf( "%s:%d: ", __FUNCTION__, __LINE__); \
s += dbgStr.sprintf( __VA_ARGS__); \
kdDebug() << timestamp() << "AlsaPlayer::" << s << endl; \
}; \
@@ -81,8 +81,8 @@
#else
#define MSG(args...) do {\
if (m_debugLevel >= 1) {\
- QString dbgStr; \
- QString s = dbgStr.sprintf( "%s:%d: ", __FUNCTION__, __LINE__); \
+ TQString dbgStr; \
+ TQString s = dbgStr.sprintf( "%s:%d: ", __FUNCTION__, __LINE__); \
s += dbgStr.sprintf( ##args ); \
kdDebug() << timestamp() << "AlsaPlayer::" << s << endl; \
}; \
@@ -92,8 +92,8 @@
#if !defined(__GNUC__) || __GNUC__ >= 3
#define DBG(...) do {\
if (m_debugLevel >= 2) {\
- QString dbgStr; \
- QString s = dbgStr.sprintf( "%s:%d: ", __FUNCTION__, __LINE__); \
+ TQString dbgStr; \
+ TQString s = dbgStr.sprintf( "%s:%d: ", __FUNCTION__, __LINE__); \
s += dbgStr.sprintf( __VA_ARGS__); \
kdDebug() << timestamp() << "AlsaPlayer::" << s << endl; \
}; \
@@ -101,15 +101,15 @@
#else
#define DBG(args...) do {\
if (m_debugLevel >= 2) {\
- QString dbgStr; \
- QString s = dbgStr.sprintf( "%s:%d: ", __FUNCTION__, __LINE__); \
+ TQString dbgStr; \
+ TQString s = dbgStr.sprintf( "%s:%d: ", __FUNCTION__, __LINE__); \
s += dbgStr.sprintf( ##args ); \
kdDebug() << timestamp() << "AlsaPlayer::" << s << endl; \
}; \
} while (0)
#endif
-QString AlsaPlayer::timestamp() const
+TQString AlsaPlayer::timestamp() const
{
time_t t;
struct timeval tv;
@@ -118,7 +118,7 @@ QString AlsaPlayer::timestamp() const
tstr = strdup(ctime(&t));
tstr[strlen(tstr)-1] = 0;
gettimeofday(&tv,NULL);
- QString ts;
+ TQString ts;
ts.sprintf(" %s [%d] ",tstr, (int) tv.tv_usec);
free(tstr);
return ts;
@@ -128,7 +128,7 @@ QString AlsaPlayer::timestamp() const
// public methods
////////////////////////////////////////////////////////////////////////////////
-AlsaPlayer::AlsaPlayer(QObject* parent, const char* name, const QStringList& args) :
+AlsaPlayer::AlsaPlayer(TQObject* parent, const char* name, const TQStringList& args) :
Player(parent, name, args),
m_currentVolume(1.0),
m_pcmName("default"),
@@ -149,7 +149,7 @@ AlsaPlayer::~AlsaPlayer()
}
//void AlsaPlayer::play(const FileHandle &file)
-void AlsaPlayer::startPlay(const QString &file)
+void AlsaPlayer::startPlay(const TQString &file)
{
if (running()) {
if (paused()) {
@@ -169,7 +169,7 @@ void AlsaPlayer::startPlay(const QString &file)
/*virtual*/ void AlsaPlayer::run()
{
- QString pName = m_pcmName.section(" ", 0, 0);
+ TQString pName = m_pcmName.section(" ", 0, 0);
DBG("pName = %s", pName.ascii());
pcm_name = qstrdup(pName.ascii());
int err;
@@ -395,7 +395,7 @@ void AlsaPlayer::seekPosition(int /*position*/)
* It uses plughw:xx instead of hw:xx for specifiers, because hw:xx are not practical to
* use (e.g. they require a resampler/channel mixer in the application).
*/
-QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
+TQStringList AlsaPlayer::getPluginList( const TQCString& /*classname*/ )
{
int err = 0;
int card = -1, device = -1;
@@ -404,7 +404,7 @@ QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
snd_pcm_info_t *pcminfo;
snd_ctl_card_info_alloca(&info);
snd_pcm_info_alloca(&pcminfo);
- QStringList result;
+ TQStringList result;
result.append("default");
for (;;) {
@@ -426,16 +426,16 @@ QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
snd_pcm_info_set_subdevice(pcminfo, 0);
snd_pcm_info_set_stream(pcminfo, SND_PCM_STREAM_PLAYBACK);
if ((err = snd_ctl_pcm_info(handle, pcminfo)) < 0) continue;
- QString infoName = " ";
+ TQString infoName = " ";
infoName += snd_ctl_card_info_get_name(info);
infoName += " (";
infoName += snd_pcm_info_get_name(pcminfo);
infoName += ")";
if (0 == devCnt) {
- QString pcmName = QString("default:%1").arg(card);
+ TQString pcmName = TQString("default:%1").arg(card);
result.append(pcmName + infoName);
}
- QString pcmName = QString("plughw:%1,%2").arg(card).arg(device);
+ TQString pcmName = TQString("plughw:%1,%2").arg(card).arg(device);
result.append(pcmName + infoName);
}
snd_ctl_close(handle);
@@ -444,9 +444,9 @@ QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
return result;
}
-// QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
+// TQStringList AlsaPlayer::getPluginList( const TQCString& /*classname*/ )
// {
-// QStringList assumed("default");
+// TQStringList assumed("default");
// snd_config_t *conf;
// int err = snd_config_update();
// if (err < 0) {
@@ -454,12 +454,12 @@ QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
// return assumed;
// }
// err = snd_config_search(snd_config, "pcm", &conf);
-// if (err < 0) return QStringList();
+// if (err < 0) return TQStringList();
// snd_config_iterator_t it = snd_config_iterator_first(conf);
// snd_config_iterator_t itEnd = snd_config_iterator_end(conf);
// const char* id;
// snd_config_t *entry;
-// QStringList result;
+// TQStringList result;
// snd_ctl_card_info_t *info;
// snd_ctl_card_info_alloca(&info);
// snd_pcm_info_t *pcminfo;
@@ -468,7 +468,7 @@ QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
// entry = snd_config_iterator_entry(it);
// err = snd_config_get_id(entry, &id);
// if (err >= 0) {
-// if (QString(id) != "default")
+// if (TQString(id) != "default")
// {
// int card = -1;
// while (snd_card_next(&card) >= 0 && card >= 0) {
@@ -485,9 +485,9 @@ QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
// snd_pcm_info_set_subdevice(pcminfo, 0);
// snd_pcm_info_set_stream(pcminfo, stream);
// if ((err = snd_ctl_pcm_info(handle, pcminfo)) >= 0) {
-// QString pluginName = name;
+// TQString pluginName = name;
// pluginName += ",";
-// pluginName += QString::number(dev);
+// pluginName += TQString::number(dev);
// pluginName += " ";
// pluginName += snd_ctl_card_info_get_name(info);
// pluginName += ",";
@@ -509,7 +509,7 @@ QStringList AlsaPlayer::getPluginList( const QCString& /*classname*/ )
// return result;
// }
-void AlsaPlayer::setSinkName(const QString& sinkName) { m_pcmName = sinkName; }
+void AlsaPlayer::setSinkName(const TQString& sinkName) { m_pcmName = sinkName; }
/////////////////////////////////////////////////////////////////////////////////
// private
@@ -1205,7 +1205,7 @@ void AlsaPlayer::voc_write_silence(unsigned x)
unsigned l;
char *buf;
- QByteArray buffer(chunk_bytes);
+ TQByteArray buffer(chunk_bytes);
// buf = (char *) malloc(chunk_bytes);
buf = buffer.data();
if (buf == NULL) {
@@ -1259,7 +1259,7 @@ void AlsaPlayer::voc_play(int fd, int ofs, const char* name)
#define COUNT(x) nextblock -= x; in_buffer -= x; data += x
#define COUNT1(x) in_buffer -= x; data += x
- QByteArray buffer(64 * 1024);
+ TQByteArray buffer(64 * 1024);
// data = buf = (u_char *)malloc(64 * 1024);
data = buf = (u_char*)buffer.data();
buffer_pos = 0;
@@ -1490,13 +1490,13 @@ void AlsaPlayer::header(int /*rtype*/, const char* /*name*/)
// (stream == SND_PCM_STREAM_PLAYBACK) ? "Playing" : "Recording",
// fmt_rec_table[rtype].what,
// name);
- QString channels;
+ TQString channels;
if (hwdata.channels == 1)
channels = "Mono";
else if (hwdata.channels == 2)
channels = "Stereo";
else
- channels = QString("Channels %1").arg(hwdata.channels);
+ channels = TQString("Channels %1").arg(hwdata.channels);
DBG("Format: %s, Rate %d Hz, %s",
snd_pcm_format_description(hwdata.format),
hwdata.rate,
diff --git a/kttsd/players/alsaplayer/alsaplayer.h b/kttsd/players/alsaplayer/alsaplayer.h
index acd465c..d307060 100644
--- a/kttsd/players/alsaplayer/alsaplayer.h
+++ b/kttsd/players/alsaplayer/alsaplayer.h
@@ -29,11 +29,11 @@
#include <sys/poll.h>
// Qt includes.
-#include <qstring.h>
-#include <qobject.h>
-#include <qthread.h>
-#include <qfile.h>
-#include <qmutex.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqthread.h>
+#include <tqfile.h>
+#include <tqmutex.h>
// KDE includes.
#include <config.h>
@@ -68,10 +68,10 @@ class KDE_EXPORT AlsaPlayer : public Player, QThread
Q_OBJECT
public:
- AlsaPlayer(QObject* parent = 0, const char* name = 0, const QStringList& args=QStringList());
+ AlsaPlayer(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList());
~AlsaPlayer();
- virtual void startPlay(const QString& file);
+ virtual void startPlay(const TQString& file);
virtual void pause();
virtual void stop();
@@ -88,8 +88,8 @@ public:
virtual void seek(int seekTime);
virtual void seekPosition(int position);
- virtual QStringList getPluginList( const QCString& classname );
- virtual void setSinkName(const QString &sinkName);
+ virtual TQStringList getPluginList( const TQCString& classname );
+ virtual void setSinkName(const TQString &sinkName);
virtual void setDebugLevel(uint level) { m_debugLevel = level; }
virtual void setPeriodSize(uint periodSize) { m_defPeriodSize = periodSize; }
@@ -106,7 +106,7 @@ private:
void stopAndExit();
int wait_for_poll(int draining);
- QString timestamp() const;
+ TQString timestamp() const;
ssize_t safe_read(int fd, void *buf, size_t count);
int test_vocfile(void *buffer);
@@ -130,12 +130,12 @@ private:
KURL m_currentURL;
float m_currentVolume;
- QString m_pcmName;
+ TQString m_pcmName;
char* pcm_name;
- mutable QMutex m_mutex;
+ mutable TQMutex m_mutex;
- QFile audiofile;
- QString name;
+ TQFile audiofile;
+ TQString name;
bool canPause;
snd_pcm_t *handle;
@@ -151,7 +151,7 @@ private:
snd_pcm_stream_t stream;
int mmap_flag;
int interleaved;
- QByteArray audioBuffer;
+ TQByteArray audioBuffer;
char *audiobuf;
snd_pcm_uframes_t chunk_size;
snd_pcm_uframes_t period_frames;
@@ -174,7 +174,7 @@ private:
int alsa_stop_pipe[2]; /* Pipe for communication about stop requests*/
int alsa_fd_count; /* Counter of descriptors to poll */
- QByteArray alsa_poll_fds_barray;
+ TQByteArray alsa_poll_fds_barray;
struct pollfd *alsa_poll_fds; /* Descriptors to poll */
unsigned int m_defPeriodSize;
unsigned int m_defPeriods;
diff --git a/kttsd/players/artsplayer/artsplayer.cpp b/kttsd/players/artsplayer/artsplayer.cpp
index 512765a..9e6e771 100644
--- a/kttsd/players/artsplayer/artsplayer.cpp
+++ b/kttsd/players/artsplayer/artsplayer.cpp
@@ -22,8 +22,8 @@
#include <kconfig.h>
#include <kstandarddirs.h>
-#include <qdir.h>
-#include <qapplication.h>
+#include <tqdir.h>
+#include <tqapplication.h>
#include <kartsserver.h>
#include <kartsdispatcher.h>
@@ -40,7 +40,7 @@
// public methods
////////////////////////////////////////////////////////////////////////////////
-ArtsPlayer::ArtsPlayer(QObject* parent, const char* name, const QStringList& args) :
+ArtsPlayer::ArtsPlayer(TQObject* parent, const char* name, const TQStringList& args) :
Player(parent, name, args),
m_dispatcher(0),
m_server(0),
@@ -62,7 +62,7 @@ ArtsPlayer::~ArtsPlayer()
}
//void ArtsPlayer::play(const FileHandle &file)
-void ArtsPlayer::startPlay(const QString &file)
+void ArtsPlayer::startPlay(const TQString &file)
{
if (!m_dispatcher)
setupPlayer();
@@ -87,7 +87,7 @@ void ArtsPlayer::startPlay(const QString &file)
m_playobject = m_factory->createPlayObject(m_currentURL, false);
if(m_playobject->object().isNull())
- connect(m_playobject, SIGNAL(playObjectCreated()), SLOT(playObjectCreated()));
+ connect(m_playobject, TQT_SIGNAL(playObjectCreated()), TQT_SLOT(playObjectCreated()));
else
playObjectCreated();
}
@@ -254,7 +254,7 @@ void ArtsPlayer::setupPlayer()
m_dispatcher = new KArtsDispatcher;
m_server = new KArtsServer;
setupArtsObjects();
- connect(m_server, SIGNAL(restartedServer()), SLOT(setupArtsObjects()));
+ connect(m_server, TQT_SIGNAL(restartedServer()), TQT_SLOT(setupArtsObjects()));
}
void ArtsPlayer::setupVolumeControl()
diff --git a/kttsd/players/artsplayer/artsplayer.h b/kttsd/players/artsplayer/artsplayer.h
index 96d62f6..879dccc 100644
--- a/kttsd/players/artsplayer/artsplayer.h
+++ b/kttsd/players/artsplayer/artsplayer.h
@@ -27,8 +27,8 @@
#include <kurl.h>
-#include <qstring.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqobject.h>
#include <artsflow.h>
class KArtsDispatcher;
@@ -45,11 +45,11 @@ class KDE_EXPORT ArtsPlayer : public Player
Q_OBJECT
public:
- ArtsPlayer(QObject* parent = 0, const char* name = 0, const QStringList& args=QStringList());
+ ArtsPlayer(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList());
~ArtsPlayer();
// virtual void play(const FileHandle &file = FileHandle::null());
- virtual void startPlay(const QString& file);
+ virtual void startPlay(const TQString& file);
virtual void pause();
virtual void stop();
diff --git a/kttsd/players/gstplayer/gstreamerplayer.cpp b/kttsd/players/gstplayer/gstreamerplayer.cpp
index 64aa1c4..4d56556 100644
--- a/kttsd/players/gstplayer/gstreamerplayer.cpp
+++ b/kttsd/players/gstplayer/gstreamerplayer.cpp
@@ -13,7 +13,7 @@
***************************************************************************/
// Qt includes.
-#include <qfile.h>
+#include <tqfile.h>
// KDE includes.
#include <kapplication.h>
@@ -29,7 +29,7 @@
// public methods
////////////////////////////////////////////////////////////////////////////////
-GStreamerPlayer::GStreamerPlayer(QObject* parent, const char* name, const QStringList& args) :
+GStreamerPlayer::GStreamerPlayer(TQObject* parent, const char* name, const TQStringList& args) :
Player(parent, name, args),
m_initialized(false),
m_pipeline(0),
@@ -49,7 +49,7 @@ GStreamerPlayer::~GStreamerPlayer()
}
//void GStreamerPlayer::play(const FileHandle &file)
-void GStreamerPlayer::startPlay(const QString &file)
+void GStreamerPlayer::startPlay(const TQString &file)
{
if(!file.isNull()) {
stop();
@@ -127,14 +127,14 @@ void GStreamerPlayer::seekPosition(int position)
* @param classname Desired class. Use "Sink/Audio" for sinks.
* @return List of plugin names.
*/
-QStringList GStreamerPlayer::getPluginList( const QCString& classname )
+TQStringList GStreamerPlayer::getPluginList( const TQCString& classname )
{
GList * pool_registries = NULL;
GList* registries = NULL;
GList* plugins = NULL;
GList* features = NULL;
- QString name;
- QStringList results;
+ TQString name;
+ TQStringList results;
if(!m_initialized) {
int argc = kapp->argc();
@@ -189,16 +189,16 @@ bool GStreamerPlayer::requireVersion(uint major, uint minor, uint micro)
}
gst_version(&gmajor, &gminor, &gmicro);
- // kdDebug() << QString("GStreamerPlayer::requireVersion: You have gstreamer %1.%2.%3 installed.").arg(gmajor).arg(gminor).arg(gmicro) << endl;
+ // kdDebug() << TQString("GStreamerPlayer::requireVersion: You have gstreamer %1.%2.%3 installed.").arg(gmajor).arg(gminor).arg(gmicro) << endl;
if (gmajor > major) return true;
if (gminor > minor) return true;
if (gmicro >= micro) return true;
- kdDebug() << QString("GStreamerPlayer::requireVersion: You have gstreamer %1.%2.%3 installed.").arg(gmajor).arg(gminor).arg(gmicro) << endl;
- kdDebug() << QString("GStreamerPlayer::requireVersion: This application requires %1.%2.%3 or greater.").arg(major).arg(minor).arg(micro) << endl;
+ kdDebug() << TQString("GStreamerPlayer::requireVersion: You have gstreamer %1.%2.%3 installed.").arg(gmajor).arg(gminor).arg(gmicro) << endl;
+ kdDebug() << TQString("GStreamerPlayer::requireVersion: This application requires %1.%2.%3 or greater.").arg(major).arg(minor).arg(micro) << endl;
return false;
}
-void GStreamerPlayer::setSinkName(const QString &sinkName) { m_sinkName = sinkName; }
+void GStreamerPlayer::setSinkName(const TQString &sinkName) { m_sinkName = sinkName; }
////////////////////////////////////////////////////////////////////////////////
// private methods
@@ -207,7 +207,7 @@ void GStreamerPlayer::setSinkName(const QString &sinkName) { m_sinkName = sinkNa
void GStreamerPlayer::readConfig()
{
KConfigGroup config(KGlobal::config(), "GStreamerPlayer");
- m_sinkName = config.readEntry("SinkName", QString::null);
+ m_sinkName = config.readEntry("SinkName", TQString::null);
}
void GStreamerPlayer::setupPipeline()
diff --git a/kttsd/players/gstplayer/gstreamerplayer.h b/kttsd/players/gstplayer/gstreamerplayer.h
index 6a7f1d6..13701ab 100644
--- a/kttsd/players/gstplayer/gstreamerplayer.h
+++ b/kttsd/players/gstplayer/gstreamerplayer.h
@@ -22,7 +22,7 @@ extern "C" {
#include <gst/gstversion.h>
}
#include <gst/gst.h>
-#include <qstring.h>
+#include <tqstring.h>
#include "player.h"
class GStreamerPlayer : public Player
@@ -30,11 +30,11 @@ class GStreamerPlayer : public Player
Q_OBJECT
public:
- GStreamerPlayer(QObject* parent = 0, const char* name = 0, const QStringList& args=QStringList());
+ GStreamerPlayer(TQObject* parent = 0, const char* name = 0, const TQStringList& args=TQStringList());
virtual ~GStreamerPlayer();
// virtual void play(const FileHandle &file = FileHandle::null());
- virtual void startPlay(const QString& file);
+ virtual void startPlay(const TQString& file);
virtual void setVolume(float volume = 1.0);
virtual float volume() const;
@@ -49,8 +49,8 @@ public:
virtual void seek(int seekTime);
virtual void seekPosition(int position);
- virtual QStringList getPluginList( const QCString& classname );
- virtual void setSinkName(const QString &sinkName);
+ virtual TQStringList getPluginList( const TQCString& classname );
+ virtual void setSinkName(const TQString &sinkName);
virtual bool requireVersion(uint major, uint minor, uint micro);
@@ -62,7 +62,7 @@ private:
void setupPipeline();
long long time(GstQueryType type) const;
- QString m_sinkName;
+ TQString m_sinkName;
// True once gst_init() has been called.
bool m_initialized;
diff --git a/kttsd/plugins/command/commandconf.cpp b/kttsd/plugins/command/commandconf.cpp
index 9d70ff2..5d46fe9 100644
--- a/kttsd/plugins/command/commandconf.cpp
+++ b/kttsd/plugins/command/commandconf.cpp
@@ -16,11 +16,11 @@
***************************************************************************/
// Qt includes.
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qfile.h>
-#include <qapplication.h>
-#include <qtextcodec.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqfile.h>
+#include <tqapplication.h>
+#include <tqtextcodec.h>
// KDE includes.
#include <kdialog.h>
@@ -41,14 +41,14 @@
#include "commandconf.h"
/** Constructor */
-CommandConf::CommandConf( QWidget* parent, const char* name, const QStringList& /*args*/) :
+CommandConf::CommandConf( TQWidget* parent, const char* name, const TQStringList& /*args*/) :
PlugInConf(parent, name)
{
// kdDebug() << "CommandConf::CommandConf: Running" << endl;
m_commandProc = 0;
m_progressDlg = 0;
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "CommandConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new CommandConfWidget(this, "CommandConfigWidget");
@@ -60,39 +60,39 @@ CommandConf::CommandConf( QWidget* parent, const char* name, const QStringList&
m_widget->characterCodingBox->insertStringList(m_codecList);
defaults();
- connect(m_widget->characterCodingBox, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->characterCodingBox, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->stdInButton, SIGNAL(toggled(bool)),
- this, SLOT(configChanged()));
- connect(m_widget->urlReq, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->commandTestButton, SIGNAL(clicked()),
- this, SLOT(slotCommandTest_clicked()));
+ connect(m_widget->characterCodingBox, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->characterCodingBox, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->stdInButton, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->urlReq, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->commandTestButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotCommandTest_clicked()));
}
/** Destructor */
CommandConf::~CommandConf()
{
// kdDebug() << "CommandConf::~CommandConf: Running" << endl;
- if (!m_waveFile.isNull()) QFile::remove(m_waveFile);
+ if (!m_waveFile.isNull()) TQFile::remove(m_waveFile);
delete m_commandProc;
delete m_progressDlg;
}
-void CommandConf::load(KConfig *config, const QString &configGroup) {
+void CommandConf::load(KConfig *config, const TQString &configGroup) {
// kdDebug() << "CommandConf::load: Running" << endl;
config->setGroup(configGroup);
m_widget->urlReq->setURL (config->readEntry("Command", "cat -"));
m_widget->stdInButton->setChecked(config->readBoolEntry("StdIn", false));
- QString codecString = config->readEntry("Codec", "Local");
+ TQString codecString = config->readEntry("Codec", "Local");
m_languageCode = config->readEntry("LanguageCode", m_languageCode);
int codec = PlugInProc::codecNameToListIndex(codecString, m_codecList);
m_widget->characterCodingBox->setCurrentItem(codec);
}
-void CommandConf::save(KConfig *config, const QString &configGroup) {
+void CommandConf::save(KConfig *config, const TQString &configGroup) {
// kdDebug() << "CommandConf::save: Running" << endl;
config->setGroup(configGroup);
config->writeEntry("Command", m_widget->urlReq->url());
@@ -109,21 +109,21 @@ void CommandConf::defaults(){
m_widget->characterCodingBox->setCurrentItem(0);
}
-void CommandConf::setDesiredLanguage(const QString &lang)
+void CommandConf::setDesiredLanguage(const TQString &lang)
{
m_languageCode = lang;
}
-QString CommandConf::getTalkerCode()
+TQString CommandConf::getTalkerCode()
{
- QString url = m_widget->urlReq->url();
+ TQString url = m_widget->urlReq->url();
if (!url.isEmpty())
{
// Must contain either text or file parameter, or StdIn checkbox must be checked,
// otherwise, does nothing!
if ((url.contains("%t") > 0) || (url.contains("%f") > 0) || m_widget->stdInButton->isChecked())
{
- return QString(
+ return TQString(
"<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />"
"<prosody volume=\"%4\" rate=\"%5\" />"
"<kttsd synthesizer=\"%6\" />")
@@ -135,7 +135,7 @@ QString CommandConf::getTalkerCode()
.arg("Command");
}
}
- return QString::null;
+ return TQString::null;
}
void CommandConf::slotCommandTest_clicked()
@@ -147,16 +147,16 @@ void CommandConf::slotCommandTest_clicked()
else
{
m_commandProc = new CommandProc();
- connect (m_commandProc, SIGNAL(stopped()), this, SLOT(slotSynthStopped()));
+ connect (m_commandProc, TQT_SIGNAL(stopped()), this, TQT_SLOT(slotSynthStopped()));
}
// Create a temp file name for the wave file.
KTempFile tempFile (locateLocal("tmp", "commandplugin-"), ".wav");
- QString tmpWaveFile = tempFile.file()->name();
+ TQString tmpWaveFile = tempFile.file()->name();
tempFile.close();
// Get test message in the language of the voice.
- QString testMsg = testMessage(m_languageCode);
+ TQString testMsg = testMessage(m_languageCode);
// Tell user to wait.
m_progressDlg = new KProgressDialog(m_widget, "kttsmgr_command_testdlg",
@@ -167,7 +167,7 @@ void CommandConf::slotCommandTest_clicked()
m_progressDlg->setAllowCancel(true);
// TODO: Do codec names contain non-ASCII characters?
- connect (m_commandProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ connect (m_commandProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
m_commandProc->synth(
testMsg,
tmpWaveFile,
@@ -179,7 +179,7 @@ void CommandConf::slotCommandTest_clicked()
// Display progress dialog modally. Processing continues when plugin signals synthFinished,
// or if user clicks Cancel button.
m_progressDlg->exec();
- disconnect (m_commandProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ disconnect (m_commandProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
if (m_progressDlg->wasCancelled()) m_commandProc->stopText();
delete m_progressDlg;
m_progressDlg = 0;
@@ -202,16 +202,16 @@ void CommandConf::slotSynthFinished()
// Play the wave file (possibly adjusting its Speed).
// Player object deletes the wave file when done.
if (m_player) m_player->play(m_waveFile);
- QFile::remove(m_waveFile);
- m_waveFile = QString::null;
+ TQFile::remove(m_waveFile);
+ m_waveFile = TQString::null;
if (m_progressDlg) m_progressDlg->close();
}
void CommandConf::slotSynthStopped()
{
// Clean up after canceling test.
- QString filename = m_commandProc->getFilename();
- if (!filename.isNull()) QFile::remove(filename);
+ TQString filename = m_commandProc->getFilename();
+ if (!filename.isNull()) TQFile::remove(filename);
}
#include "commandconf.moc"
diff --git a/kttsd/plugins/command/commandconf.h b/kttsd/plugins/command/commandconf.h
index 7e9a573..b3889b9 100644
--- a/kttsd/plugins/command/commandconf.h
+++ b/kttsd/plugins/command/commandconf.h
@@ -19,8 +19,8 @@
#define _COMMANDCONF_H_
// Qt includes.
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
// KDE includes.
#include <kconfig.h>
@@ -39,7 +39,7 @@ class CommandConf : public PlugInConf {
public:
/** Constructor */
- CommandConf( QWidget* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ CommandConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/** Destructor */
~CommandConf();
@@ -51,14 +51,14 @@ class CommandConf : public PlugInConf {
* valid settings. NOTE that this is not called after the modules is loaded,
* so you probably want to call this method in the constructor.
*/
- void load(KConfig *config, const QString &configGroup);
+ void load(KConfig *config, const TQString &configGroup);
/** This function gets called when the user wants to save the settings in
* the user interface, updating the config files or wherever the
* configuration is stored. The method is called when the user clicks "Apply"
* or "Ok".
*/
- void save(KConfig *config, const QString &configGroup);
+ void save(KConfig *config, const TQString &configGroup);
/** This function is called to set the settings in the module to sensible
* default values. It gets called when hitting the "Default" button. The
@@ -71,7 +71,7 @@ class CommandConf : public PlugInConf {
* This function informs the plugin of the desired language to be spoken
* by the plugin. The plugin should attempt to adapt itself to the
* specified language code, choosing sensible defaults if necessary.
- * If the passed-in code is QString::null, no specific language has
+ * If the passed-in code is TQString::null, no specific language has
* been chosen.
* @param lang The desired language code or Null if none.
*
@@ -83,16 +83,16 @@ class CommandConf : public PlugInConf {
* not the given country, treat it as though the country
* code were not specified, i.e., adapt to the given language.
*/
- void setDesiredLanguage(const QString &lang);
+ void setDesiredLanguage(const TQString &lang);
/**
* Return fully-specified talker code for the configured plugin. This code
* uniquely identifies the configured instance of the plugin and distinquishes
* one instance from another. If the plugin has not been fully configured,
- * i.e., cannot yet synthesize, return QString::null.
+ * i.e., cannot yet synthesize, return TQString::null.
* @return Fully-specified talker code.
*/
- QString getTalkerCode();
+ TQString getTalkerCode();
private slots:
void configChanged(){
@@ -104,7 +104,7 @@ class CommandConf : public PlugInConf {
void slotSynthStopped();
private:
- QString m_languageCode;
+ TQString m_languageCode;
// Configuration Widget.
CommandConfWidget* m_widget;
@@ -112,10 +112,10 @@ class CommandConf : public PlugInConf {
// Command synthesizer.
CommandProc* m_commandProc;
// Synthesized wave file name.
- QString m_waveFile;
+ TQString m_waveFile;
// Progress dialog.
KProgressDialog* m_progressDlg;
// Codec list.
- QStringList m_codecList;
+ TQStringList m_codecList;
};
#endif // _COMMANDCONF_H_
diff --git a/kttsd/plugins/command/commandproc.cpp b/kttsd/plugins/command/commandproc.cpp
index e8d3e72..77d63f3 100644
--- a/kttsd/plugins/command/commandproc.cpp
+++ b/kttsd/plugins/command/commandproc.cpp
@@ -16,13 +16,13 @@
***************************************************************************/
// Qt includes.
-#include <qfile.h>
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qstringlist.h>
-#include <qregexp.h>
-#include <qtextcodec.h>
-#include <qvaluestack.h>
+#include <tqfile.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
+#include <tqtextcodec.h>
+#include <tqvaluestack.h>
// KDE includes.
#include <kdebug.h>
@@ -39,7 +39,7 @@
#include "commandproc.moc"
/** Constructor */
-CommandProc::CommandProc( QObject* parent, const char* name, const QStringList& /*args*/) :
+CommandProc::CommandProc( TQObject* parent, const char* name, const TQStringList& /*args*/) :
PlugInProc( parent, name )
{
kdDebug() << "CommandProc::CommandProc: Running" << endl;
@@ -59,12 +59,12 @@ CommandProc::~CommandProc()
if (m_commandProc->isRunning()) m_commandProc->kill();
delete m_commandProc;
// Don't delete synth file. That is responsibility of caller.
- if (!m_textFilename.isNull()) QFile::remove(m_textFilename);
+ if (!m_textFilename.isNull()) TQFile::remove(m_textFilename);
}
}
/** Initialize */
-bool CommandProc::init(KConfig *config, const QString &configGroup){
+bool CommandProc::init(KConfig *config, const TQString &configGroup){
kdDebug() << "CommandProc::init: Initializing plug in: Command " << endl;
config->setGroup(configGroup);
@@ -75,7 +75,7 @@ bool CommandProc::init(KConfig *config, const QString &configGroup){
// Support separate synthesis if the TTS command contains %w macro.
m_supportsSynth = (m_ttsCommand.contains("%w"));
- QString codecString = config->readEntry("Codec", "Local");
+ TQString codecString = config->readEntry("Codec", "Local");
m_codec = codecNameToCodec(codecString);
kdDebug() << "CommandProc::init: Initialized with command: " << m_ttsCommand << " codec: " << codecString << endl;
return true;
@@ -87,9 +87,9 @@ bool CommandProc::init(KConfig *config, const QString &configGroup){
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void CommandProc::sayText(const QString &text)
+void CommandProc::sayText(const TQString &text)
{
- synth(text, QString::null,
+ synth(text, TQString::null,
m_ttsCommand, m_stdin, m_codec, m_language);
}
@@ -103,7 +103,7 @@ void CommandProc::sayText(const QString &text)
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void CommandProc::synthText(const QString& text, const QString& suggestedFilename)
+void CommandProc::synthText(const TQString& text, const TQString& suggestedFilename)
{
synth(text, suggestedFilename,
m_ttsCommand, m_stdin, m_codec, m_language);
@@ -116,56 +116,56 @@ void CommandProc::synthText(const QString& text, const QString& suggestedFilenam
* synthesize and audibilize the text.
* @param userCmd The program that shall be executed for speaking
* @param stdIn True if the program shall recieve its data via standard input
-* @param codec The QTextCodec if encoding==UseCodec
+* @param codec The TQTextCodec if encoding==UseCodec
* @param language The language code (used for the %l macro)
*/
-void CommandProc::synth(const QString& inputText, const QString& suggestedFilename,
- const QString& userCmd, bool stdIn, QTextCodec *codec, QString& language)
+void CommandProc::synth(const TQString& inputText, const TQString& suggestedFilename,
+ const TQString& userCmd, bool stdIn, TQTextCodec *codec, TQString& language)
{
if (m_commandProc)
{
if (m_commandProc->isRunning()) m_commandProc->kill();
delete m_commandProc;
m_commandProc = 0;
- m_synthFilename = QString::null;
- if (!m_textFilename.isNull()) QFile::remove(m_textFilename);
- m_textFilename = QString::null;
+ m_synthFilename = TQString::null;
+ if (!m_textFilename.isNull()) TQFile::remove(m_textFilename);
+ m_textFilename = TQString::null;
}
- QString command = userCmd;
- QString text = inputText.stripWhiteSpace();
+ TQString command = userCmd;
+ TQString text = inputText.stripWhiteSpace();
if (text.isEmpty()) return;
// 1. prepare the text:
// 1.a) encode the text
text += "\n";
- QCString encodedText;
+ TQCString encodedText;
if (codec)
encodedText = codec->fromUnicode(text);
else
encodedText = text.latin1(); // Should not happen, but just in case.
// 1.b) quote the text as one parameter
- QString escText = KShellProcess::quote(text);
+ TQString escText = KShellProcess::quote(text);
// 1.c) create a temporary file for the text, if %f macro is used.
if (command.contains("%f"))
{
KTempFile tempFile(locateLocal("tmp", "commandplugin-"), ".txt");
- QTextStream* fs = tempFile.textStream();
+ TQTextStream* fs = tempFile.textStream();
fs->setCodec(codec);
*fs << text;
*fs << endl;
m_textFilename = tempFile.file()->name();
tempFile.close();
- } else m_textFilename = QString::null;
+ } else m_textFilename = TQString::null;
// 2. replace variables with values
- QValueStack<bool> stack;
+ TQValueStack<bool> stack;
bool issinglequote=false;
bool isdoublequote=false;
int noreplace=0;
- QRegExp re_noquote("(\"|'|\\\\|`|\\$\\(|\\$\\{|\\(|\\{|\\)|\\}|%%|%t|%f|%l|%w)");
- QRegExp re_singlequote("('|%%|%t|%f|%l|%w)");
- QRegExp re_doublequote("(\"|\\\\|`|\\$\\(|\\$\\{|%%|%t|%f|%l|%w)");
+ TQRegExp re_noquote("(\"|'|\\\\|`|\\$\\(|\\$\\{|\\(|\\{|\\)|\\}|%%|%t|%f|%l|%w)");
+ TQRegExp re_singlequote("('|%%|%t|%f|%l|%w)");
+ TQRegExp re_doublequote("(\"|\\\\|`|\\$\\(|\\$\\{|%%|%t|%f|%l|%w)");
for ( int i = re_noquote.search(command);
i != -1;
@@ -220,7 +220,7 @@ void CommandProc::synth(const QString& inputText, const QString& suggestedFilena
{
// Replace all `...` with safer $(...)
command.replace (i, 1, "$(");
- QRegExp re_backticks("(`|\\\\`|\\\\\\\\|\\\\\\$)");
+ TQRegExp re_backticks("(`|\\\\`|\\\\\\\\|\\\\\\$)");
for ( int i2=re_backticks.search(command,i+2);
i2!=-1;
i2=re_backticks.search(command,i2)
@@ -241,7 +241,7 @@ void CommandProc::synth(const QString& inputText, const QString& suggestedFilena
}
else if (noreplace == 0) // do not replace macros within ${...}
{
- QString match, v;
+ TQString match, v;
// get match
if (issinglequote)
@@ -290,14 +290,14 @@ void CommandProc::synth(const QString& inputText, const QString& suggestedFilena
m_commandProc->setEnvironment("LANG", language + "." + codec->mimeName());
m_commandProc->setEnvironment("LC_CTYPE", language + "." + codec->mimeName());
*m_commandProc << command;
- connect(m_commandProc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)));
- connect(m_commandProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_commandProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
- connect(m_commandProc, SIGNAL(wroteStdin(KProcess*)),
- this, SLOT(slotWroteStdin(KProcess* )));
+ connect(m_commandProc, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(slotProcessExited(KProcess*)));
+ connect(m_commandProc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(m_commandProc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)));
+ connect(m_commandProc, TQT_SIGNAL(wroteStdin(KProcess*)),
+ this, TQT_SLOT(slotWroteStdin(KProcess* )));
// 4. start the process
@@ -326,7 +326,7 @@ void CommandProc::synth(const QString& inputText, const QString& suggestedFilena
*
* The plugin must not re-use the filename.
*/
-QString CommandProc::getFilename()
+TQString CommandProc::getFilename()
{
kdDebug() << "CommandProc::getFilename: returning " << m_synthFilename << endl;
return m_synthFilename;
@@ -382,13 +382,13 @@ void CommandProc::slotProcessExited(KProcess*)
void CommandProc::slotReceivedStdout(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "CommandProc::slotReceivedStdout: Received output from Command: " << buf << endl;
}
void CommandProc::slotReceivedStderr(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "CommandProc::slotReceivedStderr: Received error from Command: " << buf << endl;
}
@@ -420,9 +420,9 @@ void CommandProc::ackFinished()
if (m_state == psFinished)
{
m_state = psIdle;
- m_synthFilename = QString::null;
- if (!m_textFilename.isNull()) QFile::remove(m_textFilename);
- m_textFilename = QString::null;
+ m_synthFilename = TQString::null;
+ if (!m_textFilename.isNull()) TQFile::remove(m_textFilename);
+ m_textFilename = TQString::null;
}
}
diff --git a/kttsd/plugins/command/commandproc.h b/kttsd/plugins/command/commandproc.h
index 4b46fe5..d5027c5 100644
--- a/kttsd/plugins/command/commandproc.h
+++ b/kttsd/plugins/command/commandproc.h
@@ -19,7 +19,7 @@
#define _COMMANDPROC_H_
// Qt includes.
-#include <qstringlist.h>
+#include <tqstringlist.h>
// KTTS includes.
#include <pluginproc.h>
@@ -32,20 +32,20 @@ class CommandProc : public PlugInProc{
public:
/** Constructor */
- CommandProc( QObject* parent = 0, const char* name = 0,
- const QStringList &args = QStringList());
+ CommandProc( TQObject* parent = 0, const char* name = 0,
+ const TQStringList &args = TQStringList());
/** Destructor */
~CommandProc();
/** Initializate the speech */
- bool init (KConfig *config, const QString &configGroup);
+ bool init (KConfig *config, const TQString &configGroup);
/**
* Say a text string.
* @param text The text to speak.
*/
- virtual void sayText(const QString &text);
+ virtual void sayText(const TQString &text);
/**
* Synthesize text into an audio file, but do not send to the audio device.
@@ -57,7 +57,7 @@ class CommandProc : public PlugInProc{
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
- virtual void synthText(const QString& text, const QString& suggestedFilename);
+ virtual void synthText(const TQString& text, const TQString& suggestedFilename);
/**
* Get the generated audio filename from synthText.
@@ -66,7 +66,7 @@ class CommandProc : public PlugInProc{
*
* The plugin must not re-use the filename.
*/
- virtual QString getFilename();
+ virtual TQString getFilename();
/**
* Stop current operation (saying or synthesizing text).
@@ -134,9 +134,9 @@ class CommandProc : public PlugInProc{
* @param codec Codec for encoding the text.
* @param language The language code (used for the %l macro)
*/
- void synth(const QString& inputText, const QString& suggestedFilename,
- const QString& userCmd, bool stdIn,
- QTextCodec *codec, QString& language);
+ void synth(const TQString& inputText, const TQString& suggestedFilename,
+ const TQString& userCmd, bool stdIn,
+ TQTextCodec *codec, TQString& language);
private slots:
void slotProcessExited(KProcess* proc);
@@ -154,7 +154,7 @@ class CommandProc : public PlugInProc{
/**
* TTS command
*/
- QString m_ttsCommand;
+ TQString m_ttsCommand;
/**
* True if process should use Stdin.
@@ -164,12 +164,12 @@ class CommandProc : public PlugInProc{
/**
* Language Group.
*/
- QString m_language;
+ TQString m_language;
/**
* Codec.
*/
- QTextCodec* m_codec;
+ TQTextCodec* m_codec;
/**
* Flite process
@@ -179,12 +179,12 @@ class CommandProc : public PlugInProc{
/**
* Name of temporary file containing text.
*/
- QString m_textFilename;
+ TQString m_textFilename;
/**
* Synthesis filename.
*/
- QString m_synthFilename;
+ TQString m_synthFilename;
/**
* Plugin state.
diff --git a/kttsd/plugins/epos/eposconf.cpp b/kttsd/plugins/epos/eposconf.cpp
index 063c9f9..8b5ccf0 100644
--- a/kttsd/plugins/epos/eposconf.cpp
+++ b/kttsd/plugins/epos/eposconf.cpp
@@ -25,11 +25,11 @@
#include <math.h>
// Qt includes.
-#include <qfile.h>
-#include <qapplication.h>
-#include <qtextcodec.h>
-#include <qlayout.h>
-#include <qslider.h>
+#include <tqfile.h>
+#include <tqapplication.h>
+#include <tqtextcodec.h>
+#include <tqlayout.h>
+#include <tqslider.h>
// KDE includes.
#include <kdialog.h>
@@ -48,14 +48,14 @@
#include "eposconf.moc"
/** Constructor */
-EposConf::EposConf( QWidget* parent, const char* name, const QStringList& /*args*/) :
+EposConf::EposConf( TQWidget* parent, const char* name, const TQStringList& /*args*/) :
PlugInConf(parent, name)
{
// kdDebug() << "EposConf::EposConf: Running" << endl;
m_eposProc = 0;
m_progressDlg = 0;
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "EposConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new EposConfWidget(this, "EposConfigWidget");
@@ -68,41 +68,41 @@ EposConf::EposConf( QWidget* parent, const char* name, const QStringList& /*args
defaults();
- connect(m_widget->eposServerPath, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->eposClientPath, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->timeBox, SIGNAL(valueChanged(int)),
- this, SLOT(timeBox_valueChanged(int)));
- connect(m_widget->frequencyBox, SIGNAL(valueChanged(int)),
- this, SLOT(frequencyBox_valueChanged(int)));
- connect(m_widget->timeSlider, SIGNAL(valueChanged(int)),
- this, SLOT(timeSlider_valueChanged(int)));
- connect(m_widget->frequencySlider, SIGNAL(valueChanged(int)),
- this, SLOT(frequencySlider_valueChanged(int)));
- connect(m_widget->timeBox, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->timeSlider, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->frequencyBox, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->frequencySlider, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->characterCodingBox, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->eposServerOptions, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->eposClientOptions, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->eposTest, SIGNAL(clicked()),
- this, SLOT(slotEposTest_clicked()));
+ connect(m_widget->eposServerPath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->eposClientPath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->timeBox, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(timeBox_valueChanged(int)));
+ connect(m_widget->frequencyBox, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(frequencyBox_valueChanged(int)));
+ connect(m_widget->timeSlider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(timeSlider_valueChanged(int)));
+ connect(m_widget->frequencySlider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(frequencySlider_valueChanged(int)));
+ connect(m_widget->timeBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->timeSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->frequencyBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->frequencySlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->characterCodingBox, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->eposServerOptions, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->eposClientOptions, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->eposTest, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(slotEposTest_clicked()));
}
/** Destructor */
EposConf::~EposConf(){
// kdDebug() << "Running: EposConf::~EposConf()" << endl;
- if (!m_waveFile.isNull()) QFile::remove(m_waveFile);
+ if (!m_waveFile.isNull()) TQFile::remove(m_waveFile);
delete m_eposProc;
delete m_progressDlg;
}
-void EposConf::load(KConfig *config, const QString &configGroup){
+void EposConf::load(KConfig *config, const TQString &configGroup){
// kdDebug() << "EposConf::load: Running " << endl;
config->setGroup(configGroup);
@@ -110,7 +110,7 @@ void EposConf::load(KConfig *config, const QString &configGroup){
m_widget->eposClientPath->setURL(config->readEntry("EposClientExePath", "say-epos"));
m_widget->eposServerOptions->setText(config->readEntry("EposServerOptions", ""));
m_widget->eposClientOptions->setText(config->readEntry("EposClientOptions", ""));
- QString codecString = config->readEntry("Codec", "ISO 8859-2");
+ TQString codecString = config->readEntry("Codec", "ISO 8859-2");
int codec = PlugInProc::codecNameToListIndex(codecString, m_codecList);
m_widget->timeBox->setValue(config->readNumEntry("time", 100));
m_widget->frequencyBox->setValue(config->readNumEntry("pitch", 100));
@@ -120,15 +120,15 @@ void EposConf::load(KConfig *config, const QString &configGroup){
/**
* Converts a language code into the language setting passed to Epos synth.
*/
-QString EposConf::languageCodeToEposLanguage(const QString &languageCode)
+TQString EposConf::languageCodeToEposLanguage(const TQString &languageCode)
{
- QString eposLanguage;
+ TQString eposLanguage;
if (languageCode.left(2) == "cs") eposLanguage = "czech";
if (languageCode.left(2) == "sk") eposLanguage = "slovak";
return eposLanguage;
}
-void EposConf::save(KConfig *config, const QString &configGroup){
+void EposConf::save(KConfig *config, const TQString &configGroup){
// kdDebug() << "EposConf::save: Running" << endl;
config->setGroup("Epos");
@@ -154,7 +154,7 @@ void EposConf::defaults(){
// kdDebug() << "EposConf::defaults: Running" << endl;
// Epos server command changed from epos to eposd. Epos client command changed from
// say to say-epos. These changes appeared around Epos v2.5.35. Try for these automatically.
- QString exeName = "eposd";
+ TQString exeName = "eposd";
if (realFilePath(exeName).isEmpty())
if (!realFilePath("epos").isEmpty())
exeName = "epos";
@@ -174,23 +174,23 @@ void EposConf::defaults(){
m_widget->characterCodingBox->setCurrentItem(codec);
}
-void EposConf::setDesiredLanguage(const QString &lang)
+void EposConf::setDesiredLanguage(const TQString &lang)
{
m_languageCode = lang;
}
-QString EposConf::getTalkerCode()
+TQString EposConf::getTalkerCode()
{
- QString eposServerExe = realFilePath(m_widget->eposServerPath->url());
- QString eposClientExe = realFilePath(m_widget->eposClientPath->url());
+ TQString eposServerExe = realFilePath(m_widget->eposServerPath->url());
+ TQString eposClientExe = realFilePath(m_widget->eposClientPath->url());
if (!eposServerExe.isEmpty() && !eposClientExe.isEmpty())
{
if (!getLocation(eposServerExe).isEmpty() && !getLocation(eposClientExe).isEmpty())
{
- QString rate = "medium";
+ TQString rate = "medium";
if (m_widget->timeBox->value() < 75) rate = "slow";
if (m_widget->timeBox->value() > 125) rate = "fast";
- return QString(
+ return TQString(
"<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />"
"<prosody volume=\"%4\" rate=\"%5\" />"
"<kttsd synthesizer=\"%6\" />")
@@ -202,7 +202,7 @@ QString EposConf::getTalkerCode()
.arg("Epos TTS Synthesis System");
}
}
- return QString::null;
+ return TQString::null;
}
void EposConf::slotEposTest_clicked()
@@ -214,15 +214,15 @@ void EposConf::slotEposTest_clicked()
else
{
m_eposProc = new EposProc();
- connect (m_eposProc, SIGNAL(stopped()), this, SLOT(slotSynthStopped()));
+ connect (m_eposProc, TQT_SIGNAL(stopped()), this, TQT_SLOT(slotSynthStopped()));
}
// Create a temp file name for the wave file.
KTempFile tempFile (locateLocal("tmp", "eposplugin-"), ".wav");
- QString tmpWaveFile = tempFile.file()->name();
+ TQString tmpWaveFile = tempFile.file()->name();
tempFile.close();
// Get test message in the language of the voice.
- QString testMsg = testMessage(m_languageCode);
+ TQString testMsg = testMessage(m_languageCode);
// Tell user to wait.
m_progressDlg = new KProgressDialog(m_widget, "kttsmgr_epos_testdlg",
@@ -234,7 +234,7 @@ void EposConf::slotEposTest_clicked()
// TODO: Whenever server options change, the server must be restarted.
// TODO: Do codec names contain non-ASCII characters?
- connect (m_eposProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ connect (m_eposProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
m_eposProc->synth(
testMsg,
tmpWaveFile,
@@ -251,7 +251,7 @@ void EposConf::slotEposTest_clicked()
// Display progress dialog modally. Processing continues when plugin signals synthFinished,
// or if user clicks Cancel button.
m_progressDlg->exec();
- disconnect (m_eposProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ disconnect (m_eposProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
if (m_progressDlg->wasCancelled()) m_eposProc->stopText();
delete m_progressDlg;
m_progressDlg = 0;
@@ -274,16 +274,16 @@ void EposConf::slotSynthFinished()
// Play the wave file (possibly adjusting its Speed).
// Player object deletes the wave file when done.
if (m_player) m_player->play(m_waveFile);
- QFile::remove(m_waveFile);
- m_waveFile = QString::null;
+ TQFile::remove(m_waveFile);
+ m_waveFile = TQString::null;
if (m_progressDlg) m_progressDlg->close();
}
void EposConf::slotSynthStopped()
{
// Clean up after canceling test.
- QString filename = m_eposProc->getFilename();
- if (!filename.isNull()) QFile::remove(filename);
+ TQString filename = m_eposProc->getFilename();
+ if (!filename.isNull()) TQFile::remove(filename);
}
// Basically the slider values are logarithmic (0,...,1000) whereas percent
diff --git a/kttsd/plugins/epos/eposconf.h b/kttsd/plugins/epos/eposconf.h
index 5c3fbe3..08cb611 100644
--- a/kttsd/plugins/epos/eposconf.h
+++ b/kttsd/plugins/epos/eposconf.h
@@ -25,7 +25,7 @@
#define _EPOSCONF_H_
// Qt includes.
-#include <qstring.h>
+#include <tqstring.h>
// KDE includes.
#include <kconfig.h>
@@ -46,7 +46,7 @@ class EposConf : public PlugInConf {
public:
/** Constructor */
- EposConf( QWidget* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ EposConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/** Destructor */
~EposConf();
@@ -58,14 +58,14 @@ class EposConf : public PlugInConf {
* valid settings. NOTE that this is not called after the modules is loaded,
* so you probably want to call this method in the constructor.
*/
- void load(KConfig *config, const QString &configGroup);
+ void load(KConfig *config, const TQString &configGroup);
/** This function gets called when the user wants to save the settings in
* the user interface, updating the config files or wherever the
* configuration is stored. The method is called when the user clicks "Apply"
* or "Ok".
*/
- void save(KConfig *config, const QString &configGroup);
+ void save(KConfig *config, const TQString &configGroup);
/** This function is called to set the settings in the module to sensible
* default values. It gets called when hitting the "Default" button. The
@@ -78,7 +78,7 @@ class EposConf : public PlugInConf {
* This function informs the plugin of the desired language to be spoken
* by the plugin. The plugin should attempt to adapt itself to the
* specified language code, choosing sensible defaults if necessary.
- * If the passed-in code is QString::null, no specific language has
+ * If the passed-in code is TQString::null, no specific language has
* been chosen.
* @param lang The desired language code or Null if none.
*
@@ -90,16 +90,16 @@ class EposConf : public PlugInConf {
* not the given country, treat it as though the country
* code were not specified, i.e., adapt to the given language.
*/
- void setDesiredLanguage(const QString &lang);
+ void setDesiredLanguage(const TQString &lang);
/**
* Return fully-specified talker code for the configured plugin. This code
* uniquely identifies the configured instance of the plugin and distinquishes
* one instance from another. If the plugin has not been fully configured,
- * i.e., cannot yet synthesize, return QString::null.
+ * i.e., cannot yet synthesize, return TQString::null.
* @return Fully-specified talker code.
*/
- QString getTalkerCode();
+ TQString getTalkerCode();
private slots:
void configChanged(){
@@ -118,13 +118,13 @@ class EposConf : public PlugInConf {
/**
* Converts a language code into the language setting passed to Epos synth.
*/
- QString languageCodeToEposLanguage(const QString &languageCode);
+ TQString languageCodeToEposLanguage(const TQString &languageCode);
int percentToSlider(int percentValue);
int sliderToPercent(int sliderValue);
// Language code.
- QString m_languageCode;
+ TQString m_languageCode;
// Configuration widget.
EposConfWidget* m_widget;
@@ -132,10 +132,10 @@ class EposConf : public PlugInConf {
// Epos synthesizer.
EposProc* m_eposProc;
// Synthesized wave file name.
- QString m_waveFile;
+ TQString m_waveFile;
// Progress dialog.
KProgressDialog* m_progressDlg;
// List of displayed codec names.
- QStringList m_codecList;
+ TQStringList m_codecList;
};
#endif // _EPOSCONF_H_
diff --git a/kttsd/plugins/epos/eposproc.cpp b/kttsd/plugins/epos/eposproc.cpp
index 35bc1d3..e5fd664 100644
--- a/kttsd/plugins/epos/eposproc.cpp
+++ b/kttsd/plugins/epos/eposproc.cpp
@@ -26,10 +26,10 @@
#include <math.h>
// Qt includes.
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextcodec.h>
-#include <qfile.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
+#include <tqfile.h>
// KDE includes.
#include <kdebug.h>
@@ -43,7 +43,7 @@
#include "eposproc.moc"
/** Constructor */
-EposProc::EposProc( QObject* parent, const char* name, const QStringList& ) :
+EposProc::EposProc( TQObject* parent, const char* name, const TQStringList& ) :
PlugInProc( parent, name ){
kdDebug() << "EposProc::EposProc: Running" << endl;
m_state = psIdle;
@@ -64,7 +64,7 @@ EposProc::~EposProc(){
}
/** Initialize the speech */
-bool EposProc::init(KConfig* config, const QString& configGroup)
+bool EposProc::init(KConfig* config, const TQString& configGroup)
{
// kdDebug() << "EposProc::init: Running" << endl;
// kdDebug() << "Initializing plug in: Epos" << endl;
@@ -72,15 +72,15 @@ bool EposProc::init(KConfig* config, const QString& configGroup)
config->setGroup(configGroup);
m_eposServerExePath = config->readEntry("EposServerExePath", "epos");
m_eposClientExePath = config->readEntry("EposClientExePath", "say");
- m_eposLanguage = config->readEntry("Language", QString::null);
+ m_eposLanguage = config->readEntry("Language", TQString::null);
m_time = config->readNumEntry("time", 100);
m_pitch = config->readNumEntry("pitch", 100);
- m_eposServerOptions = config->readEntry("EposServerOptions", QString::null);
- m_eposClientOptions = config->readEntry("EposClientOptions", QString::null);
+ m_eposServerOptions = config->readEntry("EposServerOptions", TQString::null);
+ m_eposClientOptions = config->readEntry("EposClientOptions", TQString::null);
kdDebug() << "EposProc::init: path to epos server: " << m_eposServerExePath << endl;
kdDebug() << "EposProc::init: path to epos client: " << m_eposClientExePath << endl;
- QString codecString = config->readEntry("Codec", "Local");
+ TQString codecString = config->readEntry("Codec", "Local");
m_codec = codecNameToCodec(codecString);
// Start the Epos server if not already started.
if (!m_eposServerProc)
@@ -89,10 +89,10 @@ bool EposProc::init(KConfig* config, const QString& configGroup)
*m_eposServerProc << m_eposServerExePath;
if (!m_eposServerOptions.isEmpty())
*m_eposServerProc << m_eposServerOptions;
- connect(m_eposServerProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_eposServerProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
+ connect(m_eposServerProc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(m_eposServerProc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)));
m_eposServerProc->start(KProcess::DontCare, KProcess::AllOutput);
}
@@ -107,9 +107,9 @@ bool EposProc::init(KConfig* config, const QString& configGroup)
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void EposProc::sayText(const QString &text)
+void EposProc::sayText(const TQString &text)
{
- synth(text, QString::null, m_eposServerExePath, m_eposClientExePath,
+ synth(text, TQString::null, m_eposServerExePath, m_eposClientExePath,
m_eposServerOptions, m_eposClientOptions,
m_codec, m_eposLanguage, m_time, m_pitch);
}
@@ -124,7 +124,7 @@ void EposProc::sayText(const QString &text)
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void EposProc::synthText(const QString& text, const QString& suggestedFilename)
+void EposProc::synthText(const TQString& text, const TQString& suggestedFilename)
{
synth(text, suggestedFilename, m_eposServerExePath, m_eposClientExePath,
m_eposServerOptions, m_eposClientOptions,
@@ -147,18 +147,18 @@ void EposProc::synthText(const QString& text, const QString& suggestedFilename)
* @param pitch Pitch persentage. 50 to 200.
*/
void EposProc::synth(
- const QString &text,
- const QString &suggestedFilename,
- const QString& eposServerExePath,
- const QString& eposClientExePath,
- const QString& eposServerOptions,
- const QString& eposClientOptions,
- QTextCodec *codec,
- const QString& eposLanguage,
+ const TQString &text,
+ const TQString &suggestedFilename,
+ const TQString& eposServerExePath,
+ const TQString& eposClientExePath,
+ const TQString& eposServerOptions,
+ const TQString& eposClientOptions,
+ TQTextCodec *codec,
+ const TQString& eposLanguage,
int time,
int pitch)
{
- // kdDebug() << "Running: EposProc::synth(const QString &text)" << endl;
+ // kdDebug() << "Running: EposProc::synth(const TQString &text)" << endl;
if (m_eposProc)
{
@@ -173,18 +173,18 @@ void EposProc::synth(
*m_eposServerProc << eposServerExePath;
if (!eposServerOptions.isEmpty())
*m_eposServerProc << eposServerOptions;
- connect(m_eposServerProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_eposServerProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
+ connect(m_eposServerProc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(m_eposServerProc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)));
m_eposServerProc->start(KProcess::DontCare, KProcess::AllOutput);
kdDebug() << "EposProc:: Epos server process started" << endl;
}
// // Encode the text.
// // 1.a) encode the text
-// m_encText = QCString();
-// QTextStream ts (m_encText, IO_WriteOnly);
+// m_encText = TQCString();
+// TQTextStream ts (m_encText, IO_WriteOnly);
// ts.setCodec(codec);
// ts << text;
// ts << endl; // Some synths need this, eg. flite.
@@ -197,7 +197,7 @@ void EposProc::synth(
// kdDebug()<< "EposProc::synth: Creating Epos object" << endl;
m_eposProc = new KProcess;
m_eposProc->setUseShell(true);
- QString languageCode;
+ TQString languageCode;
if (eposLanguage == "czech")
languageCode == "cz";
else if (eposLanguage == "slovak")
@@ -210,7 +210,7 @@ void EposProc::synth(
*m_eposProc << eposClientExePath;
// Language.
if (!eposLanguage.isEmpty())
- *m_eposProc << QString("--language=%1").arg(eposLanguage);
+ *m_eposProc << TQString("--language=%1").arg(eposLanguage);
// Rate (speed).
// Map 50% to 200% onto 0 to 1000.
// slider = alpha * (log(percent)-log(50))
@@ -221,10 +221,10 @@ void EposProc::synth(
slider = slider - 500;
// Map -500 to 500 onto 45 to -45 then shift to 130 to 40 (85 midpoint).
float stretchValue = (-float(slider) * 45.0 / 500.0) + 85.0;
- QString timeMsg = QString("--init_t=%1").arg(stretchValue, 0, 'f', 3);
+ TQString timeMsg = TQString("--init_t=%1").arg(stretchValue, 0, 'f', 3);
*m_eposProc << timeMsg;
// Pitch. Map 50% to 200% onto 50 to 200. easy.
- QString pitchMsg = QString("--init_f=%1").arg(pitch);
+ TQString pitchMsg = TQString("--init_f=%1").arg(pitch);
*m_eposProc << pitchMsg;
// Output file.
if (!suggestedFilename.isEmpty())
@@ -234,14 +234,14 @@ void EposProc::synth(
*m_eposProc << "-"; // Read from StdIn.
if (!suggestedFilename.isEmpty())
*m_eposProc << " >" + suggestedFilename;
- connect(m_eposProc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)));
- connect(m_eposProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_eposProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
- connect(m_eposProc, SIGNAL(wroteStdin(KProcess*)),
- this, SLOT(slotWroteStdin(KProcess* )));
+ connect(m_eposProc, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(slotProcessExited(KProcess*)));
+ connect(m_eposProc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(m_eposProc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)));
+ connect(m_eposProc, TQT_SIGNAL(wroteStdin(KProcess*)),
+ this, TQT_SLOT(slotWroteStdin(KProcess* )));
if (suggestedFilename.isEmpty())
m_state = psSaying;
else
@@ -270,7 +270,7 @@ void EposProc::synth(
*
* The plugin must not re-use the filename.
*/
-QString EposProc::getFilename()
+TQString EposProc::getFilename()
{
kdDebug() << "EposProc::getFilename: returning " << m_synthFilename << endl;
return m_synthFilename;
@@ -326,13 +326,13 @@ void EposProc::slotProcessExited(KProcess*)
void EposProc::slotReceivedStdout(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "EposProc::slotReceivedStdout: Received output from Epos: " << buf << endl;
}
void EposProc::slotReceivedStderr(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "EposProc::slotReceivedStderr: Received error from Epos: " << buf << endl;
}
@@ -340,7 +340,7 @@ void EposProc::slotWroteStdin(KProcess*)
{
// kdDebug() << "EposProc::slotWroteStdin: closing Stdin" << endl;
m_eposProc->closeStdin();
- m_encText = QCString();
+ m_encText = TQCString();
}
/**
@@ -365,7 +365,7 @@ void EposProc::ackFinished()
if (m_state == psFinished)
{
m_state = psIdle;
- m_synthFilename = QString::null;
+ m_synthFilename = TQString::null;
}
}
diff --git a/kttsd/plugins/epos/eposproc.h b/kttsd/plugins/epos/eposproc.h
index b2d1d90..d0fe9ba 100644
--- a/kttsd/plugins/epos/eposproc.h
+++ b/kttsd/plugins/epos/eposproc.h
@@ -26,8 +26,8 @@
#define _EPOSPROC_H_
// Qt includes.
-#include <qstringlist.h>
-#include <qmutex.h>
+#include <tqstringlist.h>
+#include <tqmutex.h>
// KTTS includes.
#include <pluginproc.h>
@@ -42,7 +42,7 @@ class EposProc : public PlugInProc{
/**
* Constructor
*/
- EposProc( QObject* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ EposProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/**
* Destructor
@@ -54,13 +54,13 @@ class EposProc : public PlugInProc{
* @param config Settings object.
* @param configGroup Settings group.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Say a text string.
* @param text The text to speak.
*/
- virtual void sayText(const QString &text);
+ virtual void sayText(const TQString &text);
/**
* Synthesize text into an audio file, but do not send to the audio device.
@@ -72,7 +72,7 @@ class EposProc : public PlugInProc{
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
- virtual void synthText(const QString& text, const QString& suggestedFilename);
+ virtual void synthText(const TQString& text, const TQString& suggestedFilename);
/**
* Get the generated audio filename from synthText.
@@ -81,7 +81,7 @@ class EposProc : public PlugInProc{
*
* The plugin must not re-use the filename.
*/
- virtual QString getFilename();
+ virtual TQString getFilename();
/**
* Stop current operation (saying or synthesizing text).
@@ -154,14 +154,14 @@ class EposProc : public PlugInProc{
* @param pitch Pitch persentage. 50 to 200.
*/
void synth(
- const QString &text,
- const QString &suggestedFilename,
- const QString& eposServerExePath,
- const QString& eposClientExePath,
- const QString& eposServerOptions,
- const QString& eposClientOptions,
- QTextCodec *codec,
- const QString& eposLanguage,
+ const TQString &text,
+ const TQString &suggestedFilename,
+ const TQString& eposServerExePath,
+ const TQString& eposClientExePath,
+ const TQString& eposServerOptions,
+ const TQString& eposClientOptions,
+ TQTextCodec *codec,
+ const TQString& eposLanguage,
int time,
int pitch);
@@ -176,14 +176,14 @@ class EposProc : public PlugInProc{
/**
* Path to epos executables (from config).
*/
- QString m_eposServerExePath;
- QString m_eposClientExePath;
+ TQString m_eposServerExePath;
+ TQString m_eposClientExePath;
/**
* User options passed to executables (from config).
*/
- QString m_eposServerOptions;
- QString m_eposClientOptions;
+ TQString m_eposServerOptions;
+ TQString m_eposClientOptions;
/**
* Epos Server process.
@@ -198,7 +198,7 @@ class EposProc : public PlugInProc{
/**
* Epos language setting. "czech", "slovak", or Null (use default language).
*/
- QString m_eposLanguage;
+ TQString m_eposLanguage;
/**
* Rate (speed) from config file.
@@ -213,17 +213,17 @@ class EposProc : public PlugInProc{
/**
* Codec.
*/
- QTextCodec* m_codec;
+ TQTextCodec* m_codec;
/**
* Encoded buffer to be sent to Epos client.
*/
- QCString m_encText;
+ TQCString m_encText;
/**
* Synthesis filename.
*/
- QString m_synthFilename;
+ TQString m_synthFilename;
/**
* Plugin state.
diff --git a/kttsd/plugins/festivalint/festivalintconf.cpp b/kttsd/plugins/festivalint/festivalintconf.cpp
index 91cd24f..8464ad7 100644
--- a/kttsd/plugins/festivalint/festivalintconf.cpp
+++ b/kttsd/plugins/festivalint/festivalintconf.cpp
@@ -25,15 +25,15 @@
#include <math.h>
// Qt includes.
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qcheckbox.h>
-#include <qdir.h>
-#include <qslider.h>
-#include <qdom.h>
-#include <qtextcodec.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqcheckbox.h>
+#include <tqdir.h>
+#include <tqslider.h>
+#include <tqdom.h>
+#include <tqtextcodec.h>
// KDE includes.
#include <kdialog.h>
@@ -57,7 +57,7 @@
#include "festivalintconf.moc"
/** Constructor */
-FestivalIntConf::FestivalIntConf( QWidget* parent, const char* name, const QStringList& /*args*/) :
+FestivalIntConf::FestivalIntConf( TQWidget* parent, const char* name, const TQStringList& /*args*/) :
PlugInConf(parent, name)
{
// kdDebug() << "FestivalIntConf::FestivalIntConf: Running" << endl;
@@ -65,7 +65,7 @@ FestivalIntConf::FestivalIntConf( QWidget* parent, const char* name, const QStri
m_progressDlg = 0;
m_supportsSSML = FestivalIntProc::ssUnknown;
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "FestivalIntConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new FestivalIntConfWidget(this, "FestivalIntConfigWidget");
@@ -81,43 +81,43 @@ FestivalIntConf::FestivalIntConf( QWidget* parent, const char* name, const QStri
// defaults();
- connect(m_widget->festivalPath, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotFestivalPath_textChanged()));
- connect(m_widget->selectVoiceCombo, SIGNAL(activated(const QString&)),
- this, SLOT(slotSelectVoiceCombo_activated()));
- connect(m_widget->selectVoiceCombo, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->testButton, SIGNAL(clicked()), this, SLOT(slotTest_clicked()));
- connect(m_widget->rescan, SIGNAL(clicked()), this, SLOT(scanVoices()));
- connect(m_widget->volumeBox, SIGNAL(valueChanged(int)),
- this, SLOT(volumeBox_valueChanged(int)));
- connect(m_widget->timeBox, SIGNAL(valueChanged(int)),
- this, SLOT(timeBox_valueChanged(int)));
- connect(m_widget->frequencyBox, SIGNAL(valueChanged(int)),
- this, SLOT(frequencyBox_valueChanged(int)));
- connect(m_widget->volumeSlider, SIGNAL(valueChanged(int)),
- this, SLOT(volumeSlider_valueChanged(int)));
- connect(m_widget->timeSlider, SIGNAL(valueChanged(int)),
- this, SLOT(timeSlider_valueChanged(int)));
- connect(m_widget->frequencySlider, SIGNAL(valueChanged(int)),
- this, SLOT(frequencySlider_valueChanged(int)));
- connect(m_widget->volumeBox, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->volumeSlider, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->timeBox, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->timeSlider, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->frequencyBox, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->frequencySlider, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(m_widget->preloadCheckBox, SIGNAL(clicked()), this, SLOT(configChanged()));
- connect(m_widget->characterCodingBox, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->characterCodingBox, SIGNAL(activated(const QString&)),
- this, SLOT(configChanged()));
+ connect(m_widget->festivalPath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotFestivalPath_textChanged()));
+ connect(m_widget->selectVoiceCombo, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(slotSelectVoiceCombo_activated()));
+ connect(m_widget->selectVoiceCombo, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->testButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotTest_clicked()));
+ connect(m_widget->rescan, TQT_SIGNAL(clicked()), this, TQT_SLOT(scanVoices()));
+ connect(m_widget->volumeBox, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(volumeBox_valueChanged(int)));
+ connect(m_widget->timeBox, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(timeBox_valueChanged(int)));
+ connect(m_widget->frequencyBox, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(frequencyBox_valueChanged(int)));
+ connect(m_widget->volumeSlider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(volumeSlider_valueChanged(int)));
+ connect(m_widget->timeSlider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(timeSlider_valueChanged(int)));
+ connect(m_widget->frequencySlider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(frequencySlider_valueChanged(int)));
+ connect(m_widget->volumeBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->volumeSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->timeBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->timeSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->frequencyBox, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->frequencySlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(m_widget->preloadCheckBox, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()));
+ connect(m_widget->characterCodingBox, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->characterCodingBox, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(configChanged()));
}
/** Destructor */
FestivalIntConf::~FestivalIntConf(){
// kdDebug() << "FestivalIntConf::~FestivalIntConf: Running" << endl;
- if (!m_waveFile.isNull()) QFile::remove(m_waveFile);
+ if (!m_waveFile.isNull()) TQFile::remove(m_waveFile);
delete m_festProc;
delete m_progressDlg;
}
@@ -126,7 +126,7 @@ FestivalIntConf::~FestivalIntConf(){
* Given a voice code, returns index into m_voiceList array (and voiceCombo box).
* -1 if not found.
*/
-int FestivalIntConf::voiceCodeToListIndex(const QString& voiceCode) const
+int FestivalIntConf::voiceCodeToListIndex(const TQString& voiceCode) const
{
const int voiceListCount = m_voiceList.count();
for(int index = 0; index < voiceListCount; ++index){
@@ -137,18 +137,18 @@ int FestivalIntConf::voiceCodeToListIndex(const QString& voiceCode) const
return -1;
}
-void FestivalIntConf::load(KConfig *config, const QString &configGroup){
+void FestivalIntConf::load(KConfig *config, const TQString &configGroup){
//kdDebug() << "FestivalIntConf::load: Running" << endl;
config->setGroup("FestivalInt");
- QString exePath = config->readEntry("FestivalExecutablePath", "festival");
- QString exeLocation = getLocation(exePath);
+ TQString exePath = config->readEntry("FestivalExecutablePath", "festival");
+ TQString exeLocation = getLocation(exePath);
if (!exeLocation.isEmpty()) exePath = exeLocation;
exePath = realFilePath(exePath);
config->setGroup(configGroup);
m_widget->festivalPath->setURL(config->readEntry("FestivalExecutablePath", exePath));
m_widget->preloadCheckBox->setChecked(false);
scanVoices();
- QString voiceSelected(config->readEntry("Voice"));
+ TQString voiceSelected(config->readEntry("Voice"));
int index = voiceCodeToListIndex(voiceSelected);
if (index >= 0)
{
@@ -163,14 +163,14 @@ void FestivalIntConf::load(KConfig *config, const QString &configGroup){
m_languageCode = config->readEntry("LanguageCode", m_languageCode);
m_supportsSSML = static_cast<FestivalIntProc::SupportsSSML>(
config->readNumEntry("SupportsSSML", FestivalIntProc::ssUnknown));
- QString codecName = PlugInProc::codecIndexToCodecName(
+ TQString codecName = PlugInProc::codecIndexToCodecName(
m_widget->characterCodingBox->currentItem(), m_codecList);
codecName = config->readEntry("Codec", codecName);
int codecNdx = PlugInProc::codecNameToListIndex(codecName, m_codecList);
m_widget->characterCodingBox->setCurrentItem(codecNdx);
}
-void FestivalIntConf::save(KConfig *config, const QString &configGroup){
+void FestivalIntConf::save(KConfig *config, const TQString &configGroup){
// kdDebug() << "FestivalIntConf::save: Running" << endl;
config->setGroup("FestivalInt");
config->writeEntry("FestivalExecutablePath", realFilePath(m_widget->festivalPath->url()));
@@ -202,30 +202,30 @@ void FestivalIntConf::defaults(){
scanVoices();
}
-void FestivalIntConf::setDesiredLanguage(const QString &lang)
+void FestivalIntConf::setDesiredLanguage(const TQString &lang)
{
// kdDebug() << "FestivalIntConf::setDesiredLanguage: Running" << endl;
m_languageCode = splitLanguageCode(lang, m_countryCode);
}
-QString FestivalIntConf::getTalkerCode()
+TQString FestivalIntConf::getTalkerCode()
{
- if (!m_widget->selectVoiceCombo->isEnabled()) return QString::null;
- QString exePath = realFilePath(m_widget->festivalPath->url());
- if (exePath.isEmpty()) return QString::null;
- if (getLocation(exePath).isEmpty()) return QString::null;
- if (m_voiceList.count() == 0) return QString::null;
- QString normalTalkerCode;
+ if (!m_widget->selectVoiceCombo->isEnabled()) return TQString::null;
+ TQString exePath = realFilePath(m_widget->festivalPath->url());
+ if (exePath.isEmpty()) return TQString::null;
+ if (getLocation(exePath).isEmpty()) return TQString::null;
+ if (m_voiceList.count() == 0) return TQString::null;
+ TQString normalTalkerCode;
voiceStruct voiceTemp = m_voiceList[m_widget->selectVoiceCombo->currentItem()];
// Determine volume attribute. soft < 75% <= medium <= 125% < loud.
- QString volume = "medium";
+ TQString volume = "medium";
if (m_widget->volumeBox->value() < 75) volume = "soft";
if (m_widget->volumeBox->value() > 125) volume = "loud";
// Determine rate attribute. slow < 75% <= medium <= 125% < fast.
- QString rate = "medium";
+ TQString rate = "medium";
if (m_widget->timeBox->value() < 75) rate = "slow";
if (m_widget->timeBox->value() > 125) rate = "fast";
- normalTalkerCode = QString(
+ normalTalkerCode = TQString(
"<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />"
"<prosody volume=\"%4\" rate=\"%5\" />"
"<kttsd synthesizer=\"%6\" />")
@@ -251,14 +251,14 @@ void FestivalIntConf::setDefaultVoice(int currentVoiceIndex)
{
bool found = false;
// First search for a match on both language code and country code.
- QString languageCode = m_languageCode;
+ TQString languageCode = m_languageCode;
if (!m_countryCode.isNull()) languageCode += "_" + m_countryCode;
// kdDebug() << "FestivalIntConf::setDefaultVoice:: looking for default voice to match language code " << languageCode << endl;
uint index = 0;
// Prefer existing voice if it matches.
if (currentVoiceIndex >= 0)
{
- QString vlCode = m_voiceList[currentVoiceIndex].languageCode.left(languageCode.length());
+ TQString vlCode = m_voiceList[currentVoiceIndex].languageCode.left(languageCode.length());
if (languageCode == vlCode)
{
found = true;
@@ -269,7 +269,7 @@ void FestivalIntConf::setDefaultVoice(int currentVoiceIndex)
{
for(index = 0 ; index < m_voiceList.count(); ++index)
{
- QString vlCode = m_voiceList[index].languageCode.left(languageCode.length());
+ TQString vlCode = m_voiceList[index].languageCode.left(languageCode.length());
// kdDebug() << "FestivalIntConf::setDefaultVoice: testing " << vlCode << endl;
if(languageCode == vlCode)
{
@@ -285,7 +285,7 @@ void FestivalIntConf::setDefaultVoice(int currentVoiceIndex)
// Prefer existing voice if it matches.
if (currentVoiceIndex >= 0)
{
- QString vlCode = m_voiceList[currentVoiceIndex].languageCode.left(languageCode.length());
+ TQString vlCode = m_voiceList[currentVoiceIndex].languageCode.left(languageCode.length());
if (languageCode == vlCode)
{
found = true;
@@ -296,7 +296,7 @@ void FestivalIntConf::setDefaultVoice(int currentVoiceIndex)
{
for(index = 0 ; index < m_voiceList.count(); ++index)
{
- QString vlCode = m_voiceList[index].languageCode.left(languageCode.length());
+ TQString vlCode = m_voiceList[index].languageCode.left(languageCode.length());
// kdDebug() << "FestivalIntConf::setDefaultVoice: testing " << vlCode << endl;
if(languageCode == vlCode)
{
@@ -323,7 +323,7 @@ void FestivalIntConf::setDefaultVoice(int currentVoiceIndex)
// kdDebug() << "FestivalIntConf::setDefaultVoice: auto picking voice code " << m_voiceList[index].code << endl;
m_widget->selectVoiceCombo->setCurrentItem(index);
m_widget->preloadCheckBox->setChecked(m_voiceList[index].preload);
- QString codecName = m_voiceList[index].codecName;
+ TQString codecName = m_voiceList[index].codecName;
int codecNdx = PlugInProc::codecNameToListIndex(codecName, m_codecList);
m_widget->characterCodingBox->setCurrentItem(codecNdx);
if (m_voiceList[index].volumeAdjustable)
@@ -371,9 +371,9 @@ void FestivalIntConf::setDefaultVoice(int currentVoiceIndex)
* Given an XML node and child element name, returns the string value from the child element.
* If no such child element, returns def.
*/
-QString FestivalIntConf::readXmlString(QDomNode &node, const QString &elementName, const QString &def)
+TQString FestivalIntConf::readXmlString(TQDomNode &node, const TQString &elementName, const TQString &def)
{
- QDomNode childNode = node.namedItem(elementName);
+ TQDomNode childNode = node.namedItem(elementName);
if (!childNode.isNull())
return childNode.toElement().text();
else
@@ -384,9 +384,9 @@ QString FestivalIntConf::readXmlString(QDomNode &node, const QString &elementNam
* Given an XML node and child element name, returns the boolean value from the child element.
* If no such child element, returns def.
*/
-bool FestivalIntConf::readXmlBool(QDomNode &node, const QString &elementName, bool def)
+bool FestivalIntConf::readXmlBool(TQDomNode &node, const TQString &elementName, bool def)
{
- QDomNode childNode = node.namedItem(elementName);
+ TQDomNode childNode = node.namedItem(elementName);
if (!childNode.isNull())
return (childNode.toElement().text() == "true");
else
@@ -397,7 +397,7 @@ void FestivalIntConf::scanVoices()
{
// kdDebug() << "FestivalIntConf::scanVoices: Running" << endl;
// Get existing voice code (if any).
- QString currentVoiceCode;
+ TQString currentVoiceCode;
int index = m_widget->selectVoiceCombo->currentItem();
if (index < (int)m_voiceList.count()) currentVoiceCode = m_voiceList[index].code;
@@ -413,7 +413,7 @@ void FestivalIntConf::scanVoices()
// m_supportedVoiceCodes.clear();
m_widget->selectVoiceCombo->clear();
- QString exePath = realFilePath(m_widget->festivalPath->url());
+ TQString exePath = realFilePath(m_widget->festivalPath->url());
if (!getLocation(exePath).isEmpty())
{
// Set up a progress dialog.
@@ -430,10 +430,10 @@ void FestivalIntConf::scanVoices()
else
{
m_festProc = new FestivalIntProc();
- connect (m_festProc, SIGNAL(stopped()), this, SLOT(slotSynthStopped()));
+ connect (m_festProc, TQT_SIGNAL(stopped()), this, TQT_SLOT(slotSynthStopped()));
}
- connect (m_festProc, SIGNAL(queryVoicesFinished(const QStringList&)),
- this, SLOT(slotQueryVoicesFinished(const QStringList&)));
+ connect (m_festProc, TQT_SIGNAL(queryVoicesFinished(const TQStringList&)),
+ this, TQT_SLOT(slotQueryVoicesFinished(const TQStringList&)));
m_festProc->queryVoices(exePath);
// Display progress dialog modally.
@@ -444,8 +444,8 @@ void FestivalIntConf::scanVoices()
// Festival responds with the list. When Festival responds with list,
// the progress dialog is closed.
- disconnect (m_festProc, SIGNAL(queryVoicesFinished(const QStringList&)),
- this, SLOT(slotQueryVoicesFinished(const QStringList&)));
+ disconnect (m_festProc, TQT_SIGNAL(queryVoicesFinished(const TQStringList&)),
+ this, TQT_SLOT(slotQueryVoicesFinished(const TQStringList&)));
if (!m_progressDlg->wasCancelled()) m_festProc->stopText();
delete m_progressDlg;
m_progressDlg = 0;
@@ -455,37 +455,37 @@ void FestivalIntConf::scanVoices()
if (!m_supportedVoiceCodes.isEmpty())
{
// User's desktop language setting.
- QString desktopLanguageCode = KGlobal::locale()->language();
- QString twoAlpha;
- QString countryCode;
- QString charSet;
+ TQString desktopLanguageCode = KGlobal::locale()->language();
+ TQString twoAlpha;
+ TQString countryCode;
+ TQString charSet;
KGlobal::locale()->splitLocale(desktopLanguageCode, twoAlpha, countryCode, charSet);
desktopLanguageCode = twoAlpha.lower();
// Festival known voices list.
- QString voicesFilename = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/festivalint/voices";
- QDomDocument voicesDoc("Festival Voices");
- QFile voicesFile(voicesFilename);
+ TQString voicesFilename = KGlobal::dirs()->resourceDirs("data").last() + "/kttsd/festivalint/voices";
+ TQDomDocument voicesDoc("Festival Voices");
+ TQFile voicesFile(voicesFilename);
if (voicesFile.open(IO_ReadOnly)) voicesDoc.setContent(&voicesFile);
voicesFile.close();
- QDomNodeList voices = voicesDoc.elementsByTagName("voice");
+ TQDomNodeList voices = voicesDoc.elementsByTagName("voice");
uint voicesCount = voices.count();
if (voicesCount == 0)
kdDebug() << "FestivalIntConf::scanVoices: Unable to open " << voicesFilename << ". Is KDEDIR defined?" << endl;
// Iterate thru list of voice codes returned by Festival,
// find matching entry in voices.xml file, and add to list of supported voices.
- QPixmap maleIcon = KGlobal::iconLoader()->loadIcon("male", KIcon::Small);
- QPixmap femaleIcon = KGlobal::iconLoader()->loadIcon("female", KIcon::Small);
- QStringList::ConstIterator itEnd = m_supportedVoiceCodes.constEnd();
- for(QStringList::ConstIterator it = m_supportedVoiceCodes.begin(); it != itEnd; ++it )
+ TQPixmap maleIcon = KGlobal::iconLoader()->loadIcon("male", KIcon::Small);
+ TQPixmap femaleIcon = KGlobal::iconLoader()->loadIcon("female", KIcon::Small);
+ TQStringList::ConstIterator itEnd = m_supportedVoiceCodes.constEnd();
+ for(TQStringList::ConstIterator it = m_supportedVoiceCodes.begin(); it != itEnd; ++it )
{
- QString code = *it;
+ TQString code = *it;
bool found = false;
for (uint index=0; index < voicesCount; ++index)
{
- QDomNode voiceNode = voices.item(index);
- QString voiceCode = readXmlString(voiceNode, "code", QString::null);
+ TQDomNode voiceNode = voices.item(index);
+ TQString voiceCode = readXmlString(voiceNode, "code", TQString::null);
// kdDebug() << "FestivalIntConf::scanVoices: Comparing code " << code << " to " << voiceCode << endl;
if (voiceCode == code)
{
@@ -502,7 +502,7 @@ void FestivalIntConf::scanVoices()
voiceTemp.rateAdjustable = readXmlBool(voiceNode, "rate-adjustable", true);
voiceTemp.pitchAdjustable = readXmlBool(voiceNode, "pitch-adjustable", true);
m_voiceList.append(voiceTemp);
- QString voiceDisplayName = voiceTemp.name + " (" + voiceTemp.code + ")";
+ TQString voiceDisplayName = voiceTemp.name + " (" + voiceTemp.code + ")";
if (voiceTemp.gender == "male")
m_widget->selectVoiceCombo->insertItem(maleIcon, voiceDisplayName);
else if (voiceTemp.gender == "female")
@@ -536,7 +536,7 @@ void FestivalIntConf::scanVoices()
if (selectVoiceComboEnabled != m_widget->selectVoiceCombo->isEnabled()) configChanged();
}
-void FestivalIntConf::slotQueryVoicesFinished(const QStringList &voiceCodes)
+void FestivalIntConf::slotQueryVoicesFinished(const TQStringList &voiceCodes)
{
// kdDebug() << "FestivalIntConf::slotQueryVoicesFinished: voiceCodes.count() = " << voiceCodes.count() << endl;
m_supportedVoiceCodes = voiceCodes;
@@ -552,24 +552,24 @@ void FestivalIntConf::slotTest_clicked()
else
{
m_festProc = new FestivalIntProc();
- connect (m_festProc, SIGNAL(stopped()), this, SLOT(slotSynthStopped()));
+ connect (m_festProc, TQT_SIGNAL(stopped()), this, TQT_SLOT(slotSynthStopped()));
}
// Create a temp file name for the wave file.
KTempFile tempFile (locateLocal("tmp", "festivalintplugin-"), ".wav");
- QString tmpWaveFile = tempFile.file()->name();
+ TQString tmpWaveFile = tempFile.file()->name();
tempFile.close();
// Get the code for the selected voice.
- QString voiceCode = m_voiceList[m_widget->selectVoiceCombo->currentItem()].code;
+ TQString voiceCode = m_voiceList[m_widget->selectVoiceCombo->currentItem()].code;
// Get language code for the selected voice.
- QString languageCode = m_voiceList[m_widget->selectVoiceCombo->currentItem()].languageCode;
+ TQString languageCode = m_voiceList[m_widget->selectVoiceCombo->currentItem()].languageCode;
// Get test message in the language of the voice.
- QString testMsg = testMessage(languageCode);
+ TQString testMsg = testMessage(languageCode);
// Get codec.
- QTextCodec* codec = PlugInProc::codecIndexToCodec(
+ TQTextCodec* codec = PlugInProc::codecIndexToCodec(
m_widget->characterCodingBox->currentItem(), m_codecList);
// Tell user to wait.
@@ -581,7 +581,7 @@ void FestivalIntConf::slotTest_clicked()
m_progressDlg->setAllowCancel(true);
// kdDebug() << "FestivalIntConf::slotTest_clicked: calling synth with voiceCode: " << voiceCode << " time percent: " << m_widget->timeBox->value() << endl;
- connect (m_festProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ connect (m_festProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
m_festProc->synth(
realFilePath(m_widget->festivalPath->url()),
testMsg,
@@ -596,7 +596,7 @@ void FestivalIntConf::slotTest_clicked()
// Display progress dialog modally. Processing continues when plugin signals synthFinished,
// or if user clicks Cancel button.
m_progressDlg->exec();
- disconnect (m_festProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ disconnect (m_festProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
if (m_progressDlg->wasCancelled()) m_festProc->stopText();
delete m_progressDlg;
m_progressDlg = 0;
@@ -620,22 +620,22 @@ void FestivalIntConf::slotSynthFinished()
// Play the wave file (possibly adjusting its Speed).
// Player object deletes the wave file when done.
if (m_player) m_player->play(m_waveFile);
- QFile::remove(m_waveFile);
- m_waveFile = QString::null;
+ TQFile::remove(m_waveFile);
+ m_waveFile = TQString::null;
if (m_progressDlg) m_progressDlg->close();
}
void FestivalIntConf::slotSynthStopped()
{
// Clean up after canceling test.
- QString filename = m_festProc->getFilename();
+ TQString filename = m_festProc->getFilename();
// kdDebug() << "FestivalIntConf::slotSynthStopped: filename = " << filename << endl;
- if (!filename.isNull()) QFile::remove(filename);
+ if (!filename.isNull()) TQFile::remove(filename);
}
void FestivalIntConf::slotFestivalPath_textChanged()
{
- QString exePath = realFilePath(m_widget->festivalPath->url());
+ TQString exePath = realFilePath(m_widget->festivalPath->url());
m_widget->selectVoiceCombo->setEnabled(false);
if (!exePath.isEmpty() && !getLocation(exePath).isEmpty())
{
@@ -646,7 +646,7 @@ void FestivalIntConf::slotFestivalPath_textChanged()
void FestivalIntConf::slotSelectVoiceCombo_activated()
{
int index = m_widget->selectVoiceCombo->currentItem();
- QString codecName = m_voiceList[index].codecName;
+ TQString codecName = m_voiceList[index].codecName;
int codecNdx = PlugInProc::codecNameToListIndex(codecName, m_codecList);
m_widget->characterCodingBox->setCurrentItem(codecNdx);
m_widget->preloadCheckBox->setChecked(
diff --git a/kttsd/plugins/festivalint/festivalintconf.h b/kttsd/plugins/festivalint/festivalintconf.h
index a367682..6a33009 100644
--- a/kttsd/plugins/festivalint/festivalintconf.h
+++ b/kttsd/plugins/festivalint/festivalintconf.h
@@ -25,8 +25,8 @@
#define _FESTIVALINTCONF_H_
// Qt includes.
-#include <qstringlist.h>
-#include <qvaluelist.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
// KDE includes.
#include <kconfig.h>
@@ -43,11 +43,11 @@ class KProgressDialog;
class QDomNode;
typedef struct voiceStruct{
- QString code; // Code as sent to Festival
- QString name; // Name as displayed and returned in Talker Code.
- QString languageCode; // Language code (en, es, etc)
- QString codecName; // Character encoding codec name (eg. ISO 8859-1)
- QString gender; // male, female, or neutral
+ TQString code; // Code as sent to Festival
+ TQString name; // Name as displayed and returned in Talker Code.
+ TQString languageCode; // Language code (en, es, etc)
+ TQString codecName; // Character encoding codec name (eg. ISO 8859-1)
+ TQString gender; // male, female, or neutral
bool preload; // Start Festival and load this language when KTTSD is started.
bool volumeAdjustable; // True if the voice supports volume adjustments.
bool rateAdjustable; // True if the voice supports rate adjustments.
@@ -59,7 +59,7 @@ class FestivalIntConf : public PlugInConf {
public:
/** Constructor */
- FestivalIntConf( QWidget* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ FestivalIntConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/** Destructor */
~FestivalIntConf();
@@ -71,14 +71,14 @@ class FestivalIntConf : public PlugInConf {
* valid settings. NOTE that this is not called after the modules is loaded,
* so you probably want to call this method in the constructor.
*/
- void load(KConfig *config, const QString &configGroup);
+ void load(KConfig *config, const TQString &configGroup);
/** This function gets called when the user wants to save the settings in
* the user interface, updating the config files or wherever the
* configuration is stored. The method is called when the user clicks "Apply"
* or "Ok".
*/
- void save(KConfig *config, const QString &configGroup);
+ void save(KConfig *config, const TQString &configGroup);
/** This function is called to set the settings in the module to sensible
* default values. It gets called when hitting the "Default" button. The
@@ -90,7 +90,7 @@ class FestivalIntConf : public PlugInConf {
* This function informs the plugin of the desired language to be spoken
* by the plugin. The plugin should attempt to adapt itself to the
* specified language code, choosing sensible defaults if necessary.
- * If the passed-in code is QString::null, no specific language has
+ * If the passed-in code is TQString::null, no specific language has
* been chosen.
* @param lang The desired language code or Null if none.
*
@@ -102,16 +102,16 @@ class FestivalIntConf : public PlugInConf {
* not the given country, treat it as though the country
* code were not specified, i.e., adapt to the given language.
*/
- void setDesiredLanguage(const QString &lang);
+ void setDesiredLanguage(const TQString &lang);
/**
* Return fully-specified talker code for the configured plugin. This code
* uniquely identifies the configured instance of the plugin and distinquishes
* one instance from another. If the plugin has not been fully configured,
- * i.e., cannot yet synthesize, return QString::null.
+ * i.e., cannot yet synthesize, return TQString::null.
* @return Fully-specified talker code.
*/
- QString getTalkerCode();
+ TQString getTalkerCode();
private slots:
/** Scan for the different voices in festivalPath/lib */
@@ -131,7 +131,7 @@ class FestivalIntConf : public PlugInConf {
void frequencySlider_valueChanged(int sliderValue);
void slotFestivalPath_textChanged();
void slotSelectVoiceCombo_activated();
- void slotQueryVoicesFinished(const QStringList &voiceCodes);
+ void slotQueryVoicesFinished(const TQStringList &voiceCodes);
private:
int percentToSlider(int percentValue);
@@ -141,19 +141,19 @@ class FestivalIntConf : public PlugInConf {
* Given an XML node and child element name, returns the string value from the child element.
* If no such child element, returns def.
*/
- QString readXmlString(QDomNode &node, const QString &elementName, const QString &def);
+ TQString readXmlString(TQDomNode &node, const TQString &elementName, const TQString &def);
/**
* Given an XML node and child element name, returns the boolean value from the child element.
* If no such child element, returns def.
*/
- bool readXmlBool(QDomNode &node, const QString &elementName, bool def);
+ bool readXmlBool(TQDomNode &node, const TQString &elementName, bool def);
/**
* Given a voice code, returns index into m_voiceList array (and voiceCombo box).
* -1 if not found.
*/
- int voiceCodeToListIndex(const QString& voiceCode) const;
+ int voiceCodeToListIndex(const TQString& voiceCode) const;
/**
* Chooses a default voice given scanned list of voices in m_voiceList and current
@@ -166,21 +166,21 @@ class FestivalIntConf : public PlugInConf {
FestivalIntConfWidget* m_widget;
// Language code.
- QString m_languageCode;
+ TQString m_languageCode;
// Language country code (if any).
- QString m_countryCode;
+ TQString m_countryCode;
// List of voices */
- QValueList<voice> m_voiceList;
+ TQValueList<voice> m_voiceList;
// Festival synthesizer.
FestivalIntProc* m_festProc;
// Synthesized wave file name.
- QString m_waveFile;
+ TQString m_waveFile;
// Progress dialog.
KProgressDialog* m_progressDlg;
// List of voice codes supported by Festival.
- QStringList m_supportedVoiceCodes;
+ TQStringList m_supportedVoiceCodes;
// List of displayed codec names.
- QStringList m_codecList;
+ TQStringList m_codecList;
// Whether Festival supports SSML or not.
FestivalIntProc::SupportsSSML m_supportsSSML;
};
diff --git a/kttsd/plugins/festivalint/festivalintproc.cpp b/kttsd/plugins/festivalint/festivalintproc.cpp
index 77822ea..e48f2c4 100644
--- a/kttsd/plugins/festivalint/festivalintproc.cpp
+++ b/kttsd/plugins/festivalint/festivalintproc.cpp
@@ -25,10 +25,10 @@
#include <math.h>
// Qt includes.
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qthread.h>
-#include <qtextcodec.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqthread.h>
+#include <tqtextcodec.h>
// KDE includes.
#include <kdebug.h>
@@ -43,7 +43,7 @@
#include "festivalintproc.moc"
/** Constructor */
-FestivalIntProc::FestivalIntProc( QObject* parent, const char* name, const QStringList& ) :
+FestivalIntProc::FestivalIntProc( TQObject* parent, const char* name, const TQStringList& ) :
PlugInProc( parent, name ){
// kdDebug() << "FestivalIntProc::FestivalIntProc: Running" << endl;
m_ready = true;
@@ -54,7 +54,7 @@ FestivalIntProc::FestivalIntProc( QObject* parent, const char* name, const QStri
m_state = psIdle;
m_supportsSSML = ssUnknown;
m_languageCode = "en";
- m_codec = QTextCodec::codecForName("ISO8859-1");
+ m_codec = TQTextCodec::codecForName("ISO8859-1");
}
/** Destructor */
@@ -84,7 +84,7 @@ FestivalIntProc::~FestivalIntProc(){
}
/** Initialize the speech */
-bool FestivalIntProc::init(KConfig *config, const QString &configGroup)
+bool FestivalIntProc::init(KConfig *config, const TQString &configGroup)
{
// kdDebug() << "FestivalIntProc::init: Initializing plug in: Festival" << endl;
@@ -99,7 +99,7 @@ bool FestivalIntProc::init(KConfig *config, const QString &configGroup)
m_preload = config->readBoolEntry("Preload", false);
m_languageCode = config->readEntry("LanguageCode", "en");
m_supportsSSML = static_cast<SupportsSSML>(config->readNumEntry("SupportsSSML", ssUnknown));
- QString codecName = config->readEntry("Codec", "Latin1");
+ TQString codecName = config->readEntry("Codec", "Latin1");
m_codec = codecNameToCodec(codecName);
if (m_preload) startEngine(m_festivalExePath, m_voiceCode, m_languageCode, m_codec);
return true;
@@ -111,9 +111,9 @@ bool FestivalIntProc::init(KConfig *config, const QString &configGroup)
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void FestivalIntProc::sayText(const QString &text)
+void FestivalIntProc::sayText(const TQString &text)
{
- synth(m_festivalExePath, text, QString::null, m_voiceCode, m_time, m_pitch, m_volume,
+ synth(m_festivalExePath, text, TQString::null, m_voiceCode, m_time, m_pitch, m_volume,
m_languageCode, m_codec);
}
@@ -127,7 +127,7 @@ void FestivalIntProc::sayText(const QString &text)
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void FestivalIntProc::synthText(const QString& text, const QString& suggestedFilename)
+void FestivalIntProc::synthText(const TQString& text, const TQString& suggestedFilename)
{
synth(m_festivalExePath, text, suggestedFilename, m_voiceCode, m_time, m_pitch, m_volume,
m_languageCode, m_codec);
@@ -139,12 +139,12 @@ void FestivalIntProc::synthText(const QString& text, const QString& suggestedFil
* @return False if busy doing something else and therefore cannot
* do the query.
*/
-bool FestivalIntProc::queryVoices(const QString &festivalExePath)
+bool FestivalIntProc::queryVoices(const TQString &festivalExePath)
{
// kdDebug() << "FestivalIntProc::queryVoices: Running" << endl;
if (m_state != psIdle && m_waitingQueryVoices && m_waitingStop) return false;
// Start Festival if not already running.
- startEngine(festivalExePath, QString::null, m_languageCode, m_codec);
+ startEngine(festivalExePath, TQString::null, m_languageCode, m_codec);
// Set state, waiting for voice codes list from Festival.
m_waitingQueryVoices = true;
// Voice rab_diphone is needed in order to support SSML.
@@ -160,8 +160,8 @@ bool FestivalIntProc::queryVoices(const QString &festivalExePath)
* @param voiceCode Voice code in which to speak text.
* @param languageCode Language code, for example, "en".
*/
-void FestivalIntProc::startEngine(const QString &festivalExePath, const QString &voiceCode,
- const QString &languageCode, QTextCodec* codec)
+void FestivalIntProc::startEngine(const TQString &festivalExePath, const TQString &voiceCode,
+ const TQString &languageCode, TQTextCodec* codec)
{
// Initialize Festival only if it's not initialized.
if (m_festProc)
@@ -184,19 +184,19 @@ void FestivalIntProc::startEngine(const QString &festivalExePath, const QString
m_festProc->setEnvironment("LANG", languageCode + "." + codec->mimeName());
m_festProc->setEnvironment("LC_CTYPE", languageCode + "." + codec->mimeName());
// kdDebug() << "FestivalIntProc::startEngine: setting LANG = LC_CTYPE = " << languageCode << "." << codec->mimeName() << endl;
- connect(m_festProc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)));
- connect(m_festProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_festProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
- connect(m_festProc, SIGNAL(wroteStdin(KProcess*)),
- this, SLOT(slotWroteStdin(KProcess*)));
+ connect(m_festProc, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(slotProcessExited(KProcess*)));
+ connect(m_festProc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(m_festProc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)));
+ connect(m_festProc, TQT_SIGNAL(wroteStdin(KProcess*)),
+ this, TQT_SLOT(slotWroteStdin(KProcess*)));
}
if (!m_festProc->isRunning())
{
// kdDebug() << "FestivalIntProc::startEngine: Starting Festival process" << endl;
- m_runningVoiceCode = QString::null;
+ m_runningVoiceCode = TQString::null;
m_runningTime = 100;
m_runningPitch = 100;
m_ready = false;
@@ -239,15 +239,15 @@ void FestivalIntProc::startEngine(const QString &festivalExePath, const QString
* @param languageCode Language code, for example, "en".
*/
void FestivalIntProc::synth(
- const QString &festivalExePath,
- const QString &text,
- const QString &synthFilename,
- const QString &voiceCode,
+ const TQString &festivalExePath,
+ const TQString &text,
+ const TQString &synthFilename,
+ const TQString &voiceCode,
int time,
int pitch,
int volume,
- const QString &languageCode,
- QTextCodec* codec)
+ const TQString &languageCode,
+ TQTextCodec* codec)
{
// kdDebug() << "FestivalIntProc::synth: festivalExePath = " << festivalExePath
// << " voiceCode = " << voiceCode << endl;
@@ -256,7 +256,7 @@ void FestivalIntProc::synth(
startEngine(festivalExePath, voiceCode, languageCode, codec);
// If we just started Festival, or rate changed, tell festival.
if (m_runningTime != time) {
- QString timeMsg;
+ TQString timeMsg;
if (voiceCode.contains("_hts") > 0)
{
// Map 50% to 200% onto 0 to 1000.
@@ -268,11 +268,11 @@ void FestivalIntProc::synth(
slider = slider - 500;
// Map -500 to 500 onto 0.15 to -0.15.
float stretchValue = -float(slider) * 0.15 / 500.0;
- timeMsg = QString("(set! hts_duration_stretch %1)").arg(
+ timeMsg = TQString("(set! hts_duration_stretch %1)").arg(
stretchValue, 0, 'f', 3);
}
else
- timeMsg = QString("(Parameter.set 'Duration_Stretch %1)").arg(
+ timeMsg = TQString("(Parameter.set 'Duration_Stretch %1)").arg(
1.0/(float(time)/100.0), 0, 'f', 2);
sendToFestival(timeMsg);
m_runningTime = time;
@@ -290,14 +290,14 @@ void FestivalIntProc::synth(
{
pitchValue = (((pitch - 100) * 395) / 100) + 105;
}
- QString pitchMsg = QString(
+ TQString pitchMsg = TQString(
"(set! int_lr_params '((target_f0_mean %1) (target_f0_std 14)"
"(model_f0_mean 170) (model_f0_std 34)))").arg(pitchValue, 0, 10);
sendToFestival(pitchMsg);
m_runningPitch = pitch;
}
- QString saidText = text;
+ TQString saidText = text;
// Split really long sentences into shorter sentences, by looking for commas and converting
// to periods.
@@ -307,7 +307,7 @@ void FestivalIntProc::synth(
len = saidText.findRev(", ", len - (c_tooLong * 2 / 3), true);
if (len != -1)
{
- QString c = saidText.mid(len+2, 1);
+ TQString c = saidText.mid(len+2, 1);
if (c != c.upper())
{
saidText.replace(len, 2, ". ");
@@ -329,7 +329,7 @@ void FestivalIntProc::synth(
if (synthFilename.isNull())
{
m_state = psSaying;
- m_synthFilename = QString::null;
+ m_synthFilename = TQString::null;
// kdDebug() << "FestivalIntProc::synth: Saying text: '" << saidText << "' using Festival plug in with voice "
// << voiceCode << endl;
saidText = "(SayText \"" + saidText + "\")";
@@ -351,7 +351,7 @@ void FestivalIntProc::synth(
saidText =
"(ktts_sabletowave \"" + saidText + "\" \"" +
synthFilename + "\" " +
- QString::number(volumeValue) + ")";
+ TQString::number(volumeValue) + ")";
}
else
{
@@ -362,7 +362,7 @@ void FestivalIntProc::synth(
// Synth the text and adjust volume.
"(set! utt1 (Utterance Text \"" + saidText +
"\"))(utt.synth utt1)" +
- "(utt.wave.rescale utt1 " + QString::number(volumeValue) + " t)" +
+ "(utt.wave.rescale utt1 " + TQString::number(volumeValue) + " t)" +
"(utt.save.wave utt1 \"" + synthFilename + "\")";
}
sendToFestival(saidText);
@@ -374,7 +374,7 @@ void FestivalIntProc::synth(
* puts it in the queue.
* @param text Text to send or queue.
*/
-void FestivalIntProc::sendToFestival(const QString& text)
+void FestivalIntProc::sendToFestival(const TQString& text)
{
if (text.isNull()) return;
m_outputQueue.append(text);
@@ -395,9 +395,9 @@ bool FestivalIntProc::sendIfReady()
if (m_writingStdin) return true;
if (m_outputQueue.isEmpty()) return false;
if (!m_festProc->isRunning()) return false;
- QString text = m_outputQueue[0];
+ TQString text = m_outputQueue[0];
text += "\n";
- QCString encodedText;
+ TQCString encodedText;
if (m_codec)
encodedText = m_codec->fromUnicode(text);
else
@@ -414,7 +414,7 @@ bool FestivalIntProc::sendIfReady()
* Determine if the text has SABLE tags. If so, we will have to use a different
* synthesis method.
*/
-bool FestivalIntProc::isSable(const QString &text)
+bool FestivalIntProc::isSable(const TQString &text)
{
return KttsUtils::hasRootElement( text, "SABLE" );
}
@@ -426,7 +426,7 @@ bool FestivalIntProc::isSable(const QString &text)
*
* The plugin must not re-use the filename.
*/
-QString FestivalIntProc::getFilename() { return m_synthFilename; }
+TQString FestivalIntProc::getFilename() { return m_synthFilename; }
/**
* Stop text
@@ -500,11 +500,11 @@ void FestivalIntProc::slotProcessExited(KProcess*)
void FestivalIntProc::slotReceivedStdout(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
// kdDebug() << "FestivalIntProc::slotReceivedStdout: Received from Festival: " << buf << endl;
bool promptSeen = (buf.contains("festival>") > 0);
bool emitQueryVoicesFinished = false;
- QStringList voiceCodesList;
+ TQStringList voiceCodesList;
if (m_waitingQueryVoices && m_outputQueue.isEmpty())
{
// Look for opening ( and closing ).
@@ -522,7 +522,7 @@ void FestivalIntProc::slotReceivedStdout(KProcess*, char* buffer, int buflen)
// Extract contents between parens.
buf = buf.mid(1, rightParen - 1);
// Space separated list.
- voiceCodesList = QStringList::split(" ", buf, false);
+ voiceCodesList = TQStringList::split(" ", buf, false);
emitQueryVoicesFinished = true;
}
}
@@ -569,7 +569,7 @@ void FestivalIntProc::slotReceivedStdout(KProcess*, char* buffer, int buflen)
void FestivalIntProc::slotReceivedStderr(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "FestivalIntProc::slotReceivedStderr: Received error from Festival: " << buf << endl;
}
@@ -620,7 +620,7 @@ void FestivalIntProc::ackFinished()
if (m_state == psFinished)
{
m_state = psIdle;
- m_synthFilename = QString::null;
+ m_synthFilename = TQString::null;
}
}
@@ -652,7 +652,7 @@ bool FestivalIntProc::supportsSynth() { return true; }
* tags and converts the file to plain text.
* @return Name of the XSLT file.
*/
-QString FestivalIntProc::getSsmlXsltFilename()
+TQString FestivalIntProc::getSsmlXsltFilename()
{
if (m_supportsSSML == ssYes)
return KGlobal::dirs()->resourceDirs("data").last() + "kttsd/festivalint/xslt/SSMLtoSable.xsl";
diff --git a/kttsd/plugins/festivalint/festivalintproc.h b/kttsd/plugins/festivalint/festivalintproc.h
index a69642c..bae9578 100644
--- a/kttsd/plugins/festivalint/festivalintproc.h
+++ b/kttsd/plugins/festivalint/festivalintproc.h
@@ -24,8 +24,8 @@
#ifndef _FESTIVALINTPROC_H_
#define _FESTIVALINTPROC_H_
-#include <qstringlist.h>
-#include <qmutex.h>
+#include <tqstringlist.h>
+#include <tqmutex.h>
#include <kprocess.h>
@@ -46,7 +46,7 @@ class FestivalIntProc : public PlugInProc{
/**
* Constructor
*/
- FestivalIntProc( QObject* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ FestivalIntProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/**
* Destructor
@@ -58,7 +58,7 @@ class FestivalIntProc : public PlugInProc{
* @param config Settings object.
* @param configGroup Settings group.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Returns true when festival is ready to speak a sentence.
@@ -69,7 +69,7 @@ class FestivalIntProc : public PlugInProc{
* Say a text string.
* @param text The text to speak.
*/
- virtual void sayText(const QString &text);
+ virtual void sayText(const TQString &text);
/**
* Synthesize text into an audio file, but do not send to the audio device.
@@ -84,7 +84,7 @@ class FestivalIntProc : public PlugInProc{
* It must also implement the @ref getState method, which must return
* psFinished, when synthesis is completed.
*/
- virtual void synthText(const QString &text, const QString &suggestedFilename);
+ virtual void synthText(const TQString &text, const TQString &suggestedFilename);
/**
* Get the generated audio filename from call to @ref synthText.
@@ -95,7 +95,7 @@ class FestivalIntProc : public PlugInProc{
* be locked when this method is called. The file will be deleted when
* KTTSD is finished using it.
*/
- virtual QString getFilename();
+ virtual TQString getFilename();
/**
* Stop current operation (saying or synthesizing text).
@@ -171,10 +171,10 @@ class FestivalIntProc : public PlugInProc{
* @param volume Volume percentage. 50 to 200.
* @param languageCode Language code, for example, "en".
*/
- void synth(const QString &festivalExePath, const QString &text,
- const QString &synthFilename, const QString& voiceCode,
- int time, int pitch, int volume, const QString &languageCode,
- QTextCodec* codec);
+ void synth(const TQString &festivalExePath, const TQString &text,
+ const TQString &synthFilename, const TQString& voiceCode,
+ int time, int pitch, int volume, const TQString &languageCode,
+ TQTextCodec* codec);
/**
* Sends commands to Festival to query for a list of supported voice codes.
@@ -182,7 +182,7 @@ class FestivalIntProc : public PlugInProc{
* @return False if busy doing something else and therefore cannot
* do the query.
*/
- bool queryVoices(const QString &festivalExePath);
+ bool queryVoices(const TQString &festivalExePath);
/**
* Returns the name of an XSLT stylesheet that will convert a valid SSML file
@@ -193,7 +193,7 @@ class FestivalIntProc : public PlugInProc{
* tags and converts the file to plain text.
* @return Name of the XSLT file.
*/
- QString getSsmlXsltFilename();
+ TQString getSsmlXsltFilename();
/**
* Whether Festival supports SSML or not.
@@ -208,7 +208,7 @@ class FestivalIntProc : public PlugInProc{
* This signal fires upon completion of a queryVoices operation.
* The list of voice codes do not have "voice_" prefix.
*/
- void queryVoicesFinished(const QStringList &voiceCodes);
+ void queryVoicesFinished(const TQStringList &voiceCodes);
private slots:
void slotProcessExited(KProcess* proc);
@@ -223,15 +223,15 @@ class FestivalIntProc : public PlugInProc{
* @param voiceCode Voice code in which to speak text.
* @param languageCode Language code, for example, "en".
*/
- void startEngine(const QString &festivalExePath, const QString &voiceCode,
- const QString &languageCode, QTextCodec* codec);
+ void startEngine(const TQString &festivalExePath, const TQString &voiceCode,
+ const TQString &languageCode, TQTextCodec* codec);
/**
* If ready for more output, sends the given text to Festival process, otherwise,
* puts it in the queue.
* @param text Text to send or queue.
*/
- void sendToFestival(const QString& text);
+ void sendToFestival(const TQString& text);
/**
* If Festival is ready for more input and there is more output to send, send it.
@@ -247,7 +247,7 @@ class FestivalIntProc : public PlugInProc{
* Determine if the text has SABLE tags. If so, we will have to use a different
* synthesis method.
*/
- bool isSable(const QString &text);
+ bool isSable(const TQString &text);
/**
* We attempt to shorten sentences longer than this by replacing commas with periods.
@@ -257,12 +257,12 @@ class FestivalIntProc : public PlugInProc{
/**
* Path to the Festival executable.
*/
- QString m_festivalExePath;
+ TQString m_festivalExePath;
/**
* Selected voice (from config).
*/
- QString m_voiceCode;
+ TQString m_voiceCode;
/**
* True if the voice is preloaded. Also used as a flag to supress killing
@@ -288,7 +288,7 @@ class FestivalIntProc : public PlugInProc{
/**
* Running voice.
*/
- QString m_runningVoiceCode;
+ TQString m_runningVoiceCode;
/**
* Running time (speed).
@@ -308,7 +308,7 @@ class FestivalIntProc : public PlugInProc{
/**
* Synthesis filename.
*/
- QString m_synthFilename;
+ TQString m_synthFilename;
/**
* True when festival is ready for another input.
@@ -337,19 +337,19 @@ class FestivalIntProc : public PlugInProc{
* sending the next command, this queue allows us to queue up multiple
* commands and send each one when the ReceivedStdOut signal fires.
*/
- QStringList m_outputQueue;
+ TQStringList m_outputQueue;
bool m_writingStdin;
/**
* Language code.
*/
- QString m_languageCode;
+ TQString m_languageCode;
/**
* Codec.
*/
- QTextCodec* m_codec;
+ TQTextCodec* m_codec;
/**
* Flag if SSML is supported. Festival cannot support SABLE (and therefore SSML)
diff --git a/kttsd/plugins/flite/fliteconf.cpp b/kttsd/plugins/flite/fliteconf.cpp
index cbc4b2d..0dfb6d1 100644
--- a/kttsd/plugins/flite/fliteconf.cpp
+++ b/kttsd/plugins/flite/fliteconf.cpp
@@ -22,9 +22,9 @@
******************************************************************************/
// Qt includes.
-#include <qlayout.h>
-#include <qfile.h>
-#include <qapplication.h>
+#include <tqlayout.h>
+#include <tqfile.h>
+#include <tqapplication.h>
// KDE includes.
#include <klocale.h>
@@ -42,14 +42,14 @@
#include "fliteconf.moc"
/** Constructor */
-FliteConf::FliteConf( QWidget* parent, const char* name, const QStringList& /*args*/) :
+FliteConf::FliteConf( TQWidget* parent, const char* name, const TQStringList& /*args*/) :
PlugInConf(parent, name)
{
// kdDebug() << "FliteConf::FliteConf: Running" << endl;
m_fliteProc = 0;
m_progressDlg = 0;
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "FliteConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new FliteConfWidget(this, "FliteConfigWidget");
@@ -57,24 +57,24 @@ FliteConf::FliteConf( QWidget* parent, const char* name, const QStringList& /*ar
defaults();
- connect(m_widget->flitePath, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->fliteTest, SIGNAL(clicked()), this, SLOT(slotFliteTest_clicked()));
+ connect(m_widget->flitePath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->fliteTest, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFliteTest_clicked()));
}
/** Destructor */
FliteConf::~FliteConf(){
// kdDebug() << "Running: FliteConf::~FliteConf()" << endl;
- if (!m_waveFile.isNull()) QFile::remove(m_waveFile);
+ if (!m_waveFile.isNull()) TQFile::remove(m_waveFile);
delete m_fliteProc;
delete m_progressDlg;
}
-void FliteConf::load(KConfig *config, const QString &configGroup){
+void FliteConf::load(KConfig *config, const TQString &configGroup){
// kdDebug() << "FliteConf::load: Loading configuration for language " << langGroup << " with plug in " << "Festival Lite (flite)" << endl;
config->setGroup(configGroup);
- QString fliteExe = config->readEntry("FliteExePath", QString::null);
+ TQString fliteExe = config->readEntry("FliteExePath", TQString::null);
if (fliteExe.isEmpty())
{
config->setGroup("Flite");
@@ -83,7 +83,7 @@ void FliteConf::load(KConfig *config, const QString &configGroup){
m_widget->flitePath->setURL(fliteExe);
}
-void FliteConf::save(KConfig *config, const QString &configGroup){
+void FliteConf::save(KConfig *config, const TQString &configGroup){
// kdDebug() << "FliteConf::save: Saving configuration for language " << langGroup << " with plug in " << "Festival Lite (flite)" << endl;
config->setGroup("Flite");
@@ -99,19 +99,19 @@ void FliteConf::defaults(){
m_widget->flitePath->setURL("flite");
}
-void FliteConf::setDesiredLanguage(const QString &lang)
+void FliteConf::setDesiredLanguage(const TQString &lang)
{
m_languageCode = lang;
}
-QString FliteConf::getTalkerCode()
+TQString FliteConf::getTalkerCode()
{
- QString fliteExe = realFilePath(m_widget->flitePath->url());
+ TQString fliteExe = realFilePath(m_widget->flitePath->url());
if (!fliteExe.isEmpty())
{
if (!getLocation(fliteExe).isEmpty())
{
- return QString(
+ return TQString(
"<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />"
"<prosody volume=\"%4\" rate=\"%5\" />"
"<kttsd synthesizer=\"%6\" />")
@@ -123,7 +123,7 @@ QString FliteConf::getTalkerCode()
.arg("Festival Lite (flite)");
}
}
- return QString::null;
+ return TQString::null;
}
void FliteConf::slotFliteTest_clicked()
@@ -135,15 +135,15 @@ void FliteConf::slotFliteTest_clicked()
else
{
m_fliteProc = new FliteProc();
- connect (m_fliteProc, SIGNAL(stopped()), this, SLOT(slotSynthStopped()));
+ connect (m_fliteProc, TQT_SIGNAL(stopped()), this, TQT_SLOT(slotSynthStopped()));
}
// Create a temp file name for the wave file.
KTempFile tempFile (locateLocal("tmp", "fliteplugin-"), ".wav");
- QString tmpWaveFile = tempFile.file()->name();
+ TQString tmpWaveFile = tempFile.file()->name();
tempFile.close();
// Get test message in the language of the voice.
- QString testMsg = testMessage(m_languageCode);
+ TQString testMsg = testMessage(m_languageCode);
// Tell user to wait.
m_progressDlg = new KProgressDialog(m_widget, "kttsmgr_flite_testdlg",
@@ -154,7 +154,7 @@ void FliteConf::slotFliteTest_clicked()
m_progressDlg->setAllowCancel(true);
// Play an English test. Flite only supports English.
- connect (m_fliteProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ connect (m_fliteProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
m_fliteProc->synth(
testMsg,
tmpWaveFile,
@@ -163,7 +163,7 @@ void FliteConf::slotFliteTest_clicked()
// Display progress dialog modally. Processing continues when plugin signals synthFinished,
// or if user clicks Cancel button.
m_progressDlg->exec();
- disconnect (m_fliteProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ disconnect (m_fliteProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
if (m_progressDlg->wasCancelled()) m_fliteProc->stopText();
delete m_progressDlg;
m_progressDlg = 0;
@@ -186,14 +186,14 @@ void FliteConf::slotSynthFinished()
// Play the wave file (possibly adjusting its Speed).
// Player object deletes the wave file when done.
if (m_player) m_player->play(m_waveFile);
- QFile::remove(m_waveFile);
- m_waveFile = QString::null;
+ TQFile::remove(m_waveFile);
+ m_waveFile = TQString::null;
if (m_progressDlg) m_progressDlg->close();
}
void FliteConf::slotSynthStopped()
{
// Clean up after canceling test.
- QString filename = m_fliteProc->getFilename();
- if (!filename.isNull()) QFile::remove(filename);
+ TQString filename = m_fliteProc->getFilename();
+ if (!filename.isNull()) TQFile::remove(filename);
}
diff --git a/kttsd/plugins/flite/fliteconf.h b/kttsd/plugins/flite/fliteconf.h
index aa26c7b..6d5ff06 100644
--- a/kttsd/plugins/flite/fliteconf.h
+++ b/kttsd/plugins/flite/fliteconf.h
@@ -25,7 +25,7 @@
#define _FLITECONF_H_
// Qt includes.
-#include <qstring.h>
+#include <tqstring.h>
// KDE includes.
#include <kconfig.h>
@@ -45,7 +45,7 @@ class FliteConf : public PlugInConf {
public:
/** Constructor */
- FliteConf( QWidget* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ FliteConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/** Destructor */
~FliteConf();
@@ -57,14 +57,14 @@ class FliteConf : public PlugInConf {
* valid settings. NOTE that this is not called after the modules is loaded,
* so you probably want to call this method in the constructor.
*/
- void load(KConfig *config, const QString &configGroup);
+ void load(KConfig *config, const TQString &configGroup);
/** This function gets called when the user wants to save the settings in
* the user interface, updating the config files or wherever the
* configuration is stored. The method is called when the user clicks "Apply"
* or "Ok".
*/
- void save(KConfig *config, const QString &configGroup);
+ void save(KConfig *config, const TQString &configGroup);
/** This function is called to set the settings in the module to sensible
* default values. It gets called when hitting the "Default" button. The
@@ -77,7 +77,7 @@ class FliteConf : public PlugInConf {
* This function informs the plugin of the desired language to be spoken
* by the plugin. The plugin should attempt to adapt itself to the
* specified language code, choosing sensible defaults if necessary.
- * If the passed-in code is QString::null, no specific language has
+ * If the passed-in code is TQString::null, no specific language has
* been chosen.
* @param lang The desired language code or Null if none.
*
@@ -89,16 +89,16 @@ class FliteConf : public PlugInConf {
* not the given country, treat it as though the country
* code were not specified, i.e., adapt to the given language.
*/
- void setDesiredLanguage(const QString &lang);
+ void setDesiredLanguage(const TQString &lang);
/**
* Return fully-specified talker code for the configured plugin. This code
* uniquely identifies the configured instance of the plugin and distinquishes
* one instance from another. If the plugin has not been fully configured,
- * i.e., cannot yet synthesize, return QString::null.
+ * i.e., cannot yet synthesize, return TQString::null.
* @return Fully-specified talker code.
*/
- QString getTalkerCode();
+ TQString getTalkerCode();
private slots:
void configChanged(){
@@ -111,13 +111,13 @@ class FliteConf : public PlugInConf {
private:
// Language code.
- QString m_languageCode;
+ TQString m_languageCode;
// Configuration Widget.
FliteConfWidget* m_widget;
// Flite synthesizer.
FliteProc* m_fliteProc;
// Synthesized wave file name.
- QString m_waveFile;
+ TQString m_waveFile;
// Progress dialog.
KProgressDialog* m_progressDlg;
};
diff --git a/kttsd/plugins/flite/fliteproc.cpp b/kttsd/plugins/flite/fliteproc.cpp
index 54b15e3..55cb0fa 100644
--- a/kttsd/plugins/flite/fliteproc.cpp
+++ b/kttsd/plugins/flite/fliteproc.cpp
@@ -22,8 +22,8 @@
******************************************************************************/
// Qt includes.
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
// KDE includes.
#include <kdebug.h>
@@ -36,7 +36,7 @@
#include "fliteproc.moc"
/** Constructor */
-FliteProc::FliteProc( QObject* parent, const char* name, const QStringList& ) :
+FliteProc::FliteProc( TQObject* parent, const char* name, const TQStringList& ) :
PlugInProc( parent, name ){
kdDebug() << "FliteProc::FliteProc: Running" << endl;
m_state = psIdle;
@@ -55,8 +55,8 @@ FliteProc::~FliteProc(){
}
/** Initialize the speech */
-bool FliteProc::init(KConfig* config, const QString& configGroup){
- // kdDebug() << "Running: FliteProc::init(const QString &lang)" << endl;
+bool FliteProc::init(KConfig* config, const TQString& configGroup){
+ // kdDebug() << "Running: FliteProc::init(const TQString &lang)" << endl;
// kdDebug() << "Initializing plug in: Flite" << endl;
// Retrieve path to flite executable.
config->setGroup(configGroup);
@@ -71,9 +71,9 @@ bool FliteProc::init(KConfig* config, const QString& configGroup){
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void FliteProc::sayText(const QString &text)
+void FliteProc::sayText(const TQString &text)
{
- synth(text, QString::null, m_fliteExePath);
+ synth(text, TQString::null, m_fliteExePath);
}
/**
@@ -86,7 +86,7 @@ void FliteProc::sayText(const QString &text)
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void FliteProc::synthText(const QString& text, const QString& suggestedFilename)
+void FliteProc::synthText(const TQString& text, const TQString& suggestedFilename)
{
synth(text, suggestedFilename, m_fliteExePath);
}
@@ -98,11 +98,11 @@ void FliteProc::synthText(const QString& text, const QString& suggestedFilename)
* synthesize and audibilize the text.
*/
void FliteProc::synth(
- const QString &text,
- const QString &synthFilename,
- const QString& fliteExePath)
+ const TQString &text,
+ const TQString &synthFilename,
+ const TQString& fliteExePath)
{
- // kdDebug() << "Running: FliteProc::synth(const QString &text)" << endl;
+ // kdDebug() << "Running: FliteProc::synth(const TQString &text)" << endl;
if (m_fliteProc)
{
@@ -112,14 +112,14 @@ void FliteProc::synth(
}
// kdDebug()<< "FliteProc::synth: Creating Flite object" << endl;
m_fliteProc = new KProcess;
- connect(m_fliteProc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)));
- connect(m_fliteProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_fliteProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
- connect(m_fliteProc, SIGNAL(wroteStdin(KProcess*)),
- this, SLOT(slotWroteStdin(KProcess* )));
+ connect(m_fliteProc, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(slotProcessExited(KProcess*)));
+ connect(m_fliteProc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(m_fliteProc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)));
+ connect(m_fliteProc, TQT_SIGNAL(wroteStdin(KProcess*)),
+ this, TQT_SLOT(slotWroteStdin(KProcess* )));
if (synthFilename.isNull())
m_state = psSaying;
else
@@ -127,7 +127,7 @@ void FliteProc::synth(
// Encode quotation characters.
- QString saidText = text;
+ TQString saidText = text;
/*
saidText.replace("\\\"", "#!#!");
saidText.replace("\"", "\\\"");
@@ -162,7 +162,7 @@ void FliteProc::synth(
*
* The plugin must not re-use the filename.
*/
-QString FliteProc::getFilename()
+TQString FliteProc::getFilename()
{
kdDebug() << "FliteProc::getFilename: returning " << m_synthFilename << endl;
return m_synthFilename;
@@ -218,13 +218,13 @@ void FliteProc::slotProcessExited(KProcess*)
void FliteProc::slotReceivedStdout(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "FliteProc::slotReceivedStdout: Received output from Flite: " << buf << endl;
}
void FliteProc::slotReceivedStderr(KProcess*, char* buffer, int buflen)
{
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "FliteProc::slotReceivedStderr: Received error from Flite: " << buf << endl;
}
@@ -256,7 +256,7 @@ void FliteProc::ackFinished()
if (m_state == psFinished)
{
m_state = psIdle;
- m_synthFilename = QString::null;
+ m_synthFilename = TQString::null;
}
}
diff --git a/kttsd/plugins/flite/fliteproc.h b/kttsd/plugins/flite/fliteproc.h
index 7737b3a..a956d5c 100644
--- a/kttsd/plugins/flite/fliteproc.h
+++ b/kttsd/plugins/flite/fliteproc.h
@@ -25,8 +25,8 @@
#define _FLITEPROC_H_
// Qt includes.
-#include <qstringlist.h>
-#include <qmutex.h>
+#include <tqstringlist.h>
+#include <tqmutex.h>
// KTTS includes.
#include <pluginproc.h>
@@ -40,7 +40,7 @@ class FliteProc : public PlugInProc{
/**
* Constructor
*/
- FliteProc( QObject* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ FliteProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/**
* Destructor
@@ -52,13 +52,13 @@ class FliteProc : public PlugInProc{
* @param config Settings object.
* @param configGroup Settings Group.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Say a text string.
* @param text The text to speak.
*/
- virtual void sayText(const QString &text);
+ virtual void sayText(const TQString &text);
/**
* Synthesize text into an audio file, but do not send to the audio device.
@@ -70,7 +70,7 @@ class FliteProc : public PlugInProc{
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
- virtual void synthText(const QString& text, const QString& suggestedFilename);
+ virtual void synthText(const TQString& text, const TQString& suggestedFilename);
/**
* Get the generated audio filename from synthText.
@@ -79,7 +79,7 @@ class FliteProc : public PlugInProc{
*
* The plugin must not re-use the filename.
*/
- virtual QString getFilename();
+ virtual TQString getFilename();
/**
* Stop current operation (saying or synthesizing text).
@@ -144,9 +144,9 @@ class FliteProc : public PlugInProc{
* @param fliteExePath Path to the flite executable.
*/
void synth(
- const QString &text,
- const QString &synthFilename,
- const QString &fliteExePath);
+ const TQString &text,
+ const TQString &synthFilename,
+ const TQString &fliteExePath);
private slots:
void slotProcessExited(KProcess* proc);
@@ -159,7 +159,7 @@ class FliteProc : public PlugInProc{
/**
* Path to flite executable (from config).
*/
- QString m_fliteExePath;
+ TQString m_fliteExePath;
/**
* Flite process
@@ -169,7 +169,7 @@ class FliteProc : public PlugInProc{
/**
* Synthesis filename.
*/
- QString m_synthFilename;
+ TQString m_synthFilename;
/**
* Plugin state.
diff --git a/kttsd/plugins/freetts/freettsconf.cpp b/kttsd/plugins/freetts/freettsconf.cpp
index 701af5e..05c1fab 100644
--- a/kttsd/plugins/freetts/freettsconf.cpp
+++ b/kttsd/plugins/freetts/freettsconf.cpp
@@ -16,12 +16,12 @@
***************************************************************************/
// Qt includes.
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfile.h>
-#include <qapplication.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfile.h>
+#include <tqapplication.h>
// KDE includes.
#include <kdialog.h>
@@ -40,14 +40,14 @@
#include "freettsconfigwidget.h"
/** Constructor */
-FreeTTSConf::FreeTTSConf( QWidget* parent, const char* name, const QStringList&/*args*/) :
+FreeTTSConf::FreeTTSConf( TQWidget* parent, const char* name, const TQStringList&/*args*/) :
PlugInConf( parent, name ) {
// kdDebug() << "FreeTTSConf::FreeTTSConf: Running" << endl;
m_freettsProc = 0;
m_progressDlg = 0;
- QVBoxLayout *layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "FreeTTSConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
m_widget = new FreeTTSConfWidget(this, "FreeTTSConfigWidget");
@@ -55,28 +55,28 @@ FreeTTSConf::FreeTTSConf( QWidget* parent, const char* name, const QStringList&/
defaults();
- connect(m_widget->freettsPath, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(m_widget->freettsTest, SIGNAL(clicked()), this, SLOT(slotFreeTTSTest_clicked()));
+ connect(m_widget->freettsPath, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(m_widget->freettsTest, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotFreeTTSTest_clicked()));
}
/** Destructor */
FreeTTSConf::~FreeTTSConf() {
// kdDebug() << "Running: FreeTTSConf::~FreeTTSConf()" << endl;
- if (!m_waveFile.isNull()) QFile::remove(m_waveFile);
+ if (!m_waveFile.isNull()) TQFile::remove(m_waveFile);
delete m_freettsProc;
delete m_progressDlg;
}
-void FreeTTSConf::load(KConfig *config, const QString &configGroup) {
+void FreeTTSConf::load(KConfig *config, const TQString &configGroup) {
// kdDebug() << "FreeTTSConf::load: Running" << endl;
config->setGroup(configGroup);
- QString freeTTSJar = config->readEntry("FreeTTSJarPath", QString::null);
+ TQString freeTTSJar = config->readEntry("FreeTTSJarPath", TQString::null);
if (freeTTSJar.isEmpty())
{
config->setGroup("FreeTTS");
- freeTTSJar = config->readEntry("FreeTTSJarPath", QString::null);
+ freeTTSJar = config->readEntry("FreeTTSJarPath", TQString::null);
}
if (freeTTSJar.isEmpty())
freeTTSJar = getLocation("freetts.jar");
@@ -84,7 +84,7 @@ void FreeTTSConf::load(KConfig *config, const QString &configGroup) {
/// If freettsPath is still empty, then we couldn't find the file in the path.
}
-void FreeTTSConf::save(KConfig *config, const QString &configGroup){
+void FreeTTSConf::save(KConfig *config, const TQString &configGroup){
// kdDebug() << "FreeTTSConf::save: Running" << endl;
config->setGroup("FreeTTS");
@@ -103,19 +103,19 @@ void FreeTTSConf::defaults(){
m_widget->freettsPath->setURL("");
}
-void FreeTTSConf::setDesiredLanguage(const QString &lang)
+void FreeTTSConf::setDesiredLanguage(const TQString &lang)
{
m_languageCode = lang;
}
-QString FreeTTSConf::getTalkerCode()
+TQString FreeTTSConf::getTalkerCode()
{
- QString freeTTSJar = realFilePath(m_widget->freettsPath->url());
+ TQString freeTTSJar = realFilePath(m_widget->freettsPath->url());
if (!freeTTSJar.isEmpty())
{
if (!getLocation(freeTTSJar).isEmpty())
{
- return QString(
+ return TQString(
"<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />"
"<prosody volume=\"%4\" rate=\"%5\" />"
"<kttsd synthesizer=\"%6\" />")
@@ -127,25 +127,25 @@ QString FreeTTSConf::getTalkerCode()
.arg("FreeTTS");
}
}
- return QString::null;
+ return TQString::null;
}
-// QString FreeTTSConf::getLocation(const QString &name) {
+// TQString FreeTTSConf::getLocation(const TQString &name) {
// /// Iterate over the path and see if 'name' exists in it. Return the
-// /// full path to it if it does. Else return an empty QString.
+// /// full path to it if it does. Else return an empty TQString.
// kdDebug() << "FreeTTSConf::getLocation: Searching for " << name << " in the path... " << endl;
// kdDebug() << m_path << endl;
-// for(QStringList::iterator it = m_path.begin(); it != m_path.end(); ++it) {
-// QString fullName = *it;
+// for(TQStringList::iterator it = m_path.begin(); it != m_path.end(); ++it) {
+// TQString fullName = *it;
// fullName += "/";
// fullName += name;
// /// The user either has the directory of the file in the path...
-// if(QFile::exists(fullName)) {
+// if(TQFile::exists(fullName)) {
// return fullName;
// kdDebug() << fullName << endl;
// }
// /// ....Or the file itself
-// else if(QFileInfo(*it).baseName().append(QString(".").append(QFileInfo(*it).extension())) == name) {
+// else if(TQFileInfo(*it).baseName().append(TQString(".").append(TQFileInfo(*it).extension())) == name) {
// return fullName;
// kdDebug() << fullName << endl;
// }
@@ -163,15 +163,15 @@ void FreeTTSConf::slotFreeTTSTest_clicked()
else
{
m_freettsProc = new FreeTTSProc();
- connect (m_freettsProc, SIGNAL(stopped()), this, SLOT(slotSynthStopped()));
+ connect (m_freettsProc, TQT_SIGNAL(stopped()), this, TQT_SLOT(slotSynthStopped()));
}
// Create a temp file name for the wave file.
KTempFile tempFile (locateLocal("tmp", "freettsplugin-"), ".wav");
- QString tmpWaveFile = tempFile.file()->name();
+ TQString tmpWaveFile = tempFile.file()->name();
tempFile.close();
// Get test message in the language of the voice.
- QString testMsg = testMessage(m_languageCode);
+ TQString testMsg = testMessage(m_languageCode);
// Tell user to wait.
m_progressDlg = new KProgressDialog(m_widget, "kttsmgr_freetts_testdlg",
@@ -183,7 +183,7 @@ void FreeTTSConf::slotFreeTTSTest_clicked()
// I think FreeTTS only officialy supports English, but if anyone knows of someone
// whos built up a different language lexicon and has it working with FreeTTS gimme an email at ceruleanblaze@gmail.com
- connect (m_freettsProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ connect (m_freettsProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
m_freettsProc->synth(
testMsg,
tmpWaveFile,
@@ -192,7 +192,7 @@ void FreeTTSConf::slotFreeTTSTest_clicked()
// Display progress dialog modally. Processing continues when plugin signals synthFinished,
// or if user clicks Cancel button.
m_progressDlg->exec();
- disconnect (m_freettsProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ disconnect (m_freettsProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
if (m_progressDlg->wasCancelled()) m_freettsProc->stopText();
delete m_progressDlg;
m_progressDlg = 0;
@@ -215,16 +215,16 @@ void FreeTTSConf::slotSynthFinished()
// Play the wave file (possibly adjusting its Speed).
// Player object deletes the wave file when done.
if (m_player) m_player->play(m_waveFile);
- QFile::remove(m_waveFile);
- m_waveFile = QString::null;
+ TQFile::remove(m_waveFile);
+ m_waveFile = TQString::null;
if (m_progressDlg) m_progressDlg->close();
}
void FreeTTSConf::slotSynthStopped()
{
// Clean up after canceling test.
- QString filename = m_freettsProc->getFilename();
- if (!filename.isNull()) QFile::remove(filename);
+ TQString filename = m_freettsProc->getFilename();
+ if (!filename.isNull()) TQFile::remove(filename);
}
#include "freettsconf.moc"
diff --git a/kttsd/plugins/freetts/freettsconf.h b/kttsd/plugins/freetts/freettsconf.h
index 9ab3ae8..b8e252e 100644
--- a/kttsd/plugins/freetts/freettsconf.h
+++ b/kttsd/plugins/freetts/freettsconf.h
@@ -18,7 +18,7 @@
#ifndef _FREETTSCONF_H_
#define _FREETTSCONF_H_
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -36,7 +36,7 @@ class FreeTTSConf : public PlugInConf {
public:
/** Constructor */
- FreeTTSConf( QWidget* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ FreeTTSConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/** Destructor */
~FreeTTSConf();
@@ -47,13 +47,13 @@ class FreeTTSConf : public PlugInConf {
the control center, to undo all of his changes and restore the currently
valid settings. NOTE that this is not called after the modules is loaded,
so you probably want to call this method in the constructor.*/
- void load(KConfig *config, const QString &configGroup);
+ void load(KConfig *config, const TQString &configGroup);
/** This function gets called when the user wants to save the settings in
the user interface, updating the config files or wherever the
configuration is stored. The method is called when the user clicks "Apply"
or "Ok". */
- void save(KConfig *config, const QString &configGroup);
+ void save(KConfig *config, const TQString &configGroup);
/** This function is called to set the settings in the module to sensible
default values. It gets called when hitting the "Default" button. The
@@ -65,7 +65,7 @@ class FreeTTSConf : public PlugInConf {
* This function informs the plugin of the desired language to be spoken
* by the plugin. The plugin should attempt to adapt itself to the
* specified language code, choosing sensible defaults if necessary.
- * If the passed-in code is QString::null, no specific language has
+ * If the passed-in code is TQString::null, no specific language has
* been chosen.
* @param lang The desired language code or Null if none.
*
@@ -77,22 +77,22 @@ class FreeTTSConf : public PlugInConf {
* not the given country, treat it as though the country
* code were not specified, i.e., adapt to the given language.
*/
- void setDesiredLanguage(const QString &lang);
+ void setDesiredLanguage(const TQString &lang);
/**
* Return fully-specified talker code for the configured plugin. This code
* uniquely identifies the configured instance of the plugin and distinquishes
* one instance from another. If the plugin has not been fully configured,
- * i.e., cannot yet synthesize, return QString::null.
+ * i.e., cannot yet synthesize, return TQString::null.
* @return Fully-specified talker code.
*/
- QString getTalkerCode();
+ TQString getTalkerCode();
/**
* Function searches the $PATH for a file. If it exists, it returns the full path
- * to that file. If not, then it returns an empty QString.
+ * to that file. If not, then it returns an empty TQString.
* @param name The name of the file to search for.
- * @returns The full path to the file or an empty QString.
+ * @returns The full path to the file or an empty TQString.
*/
private slots:
@@ -105,7 +105,7 @@ class FreeTTSConf : public PlugInConf {
private:
/// Language code.
- QString m_languageCode;
+ TQString m_languageCode;
/// Configuration Widget.
FreeTTSConfWidget *m_widget;
@@ -114,7 +114,7 @@ class FreeTTSConf : public PlugInConf {
FreeTTSProc *m_freettsProc;
/// Synthesized wave file name.
- QString m_waveFile;
+ TQString m_waveFile;
/// Progress dialog.
KProgressDialog* m_progressDlg;
diff --git a/kttsd/plugins/freetts/freettsproc.cpp b/kttsd/plugins/freetts/freettsproc.cpp
index 829fee9..9c038af 100644
--- a/kttsd/plugins/freetts/freettsproc.cpp
+++ b/kttsd/plugins/freetts/freettsproc.cpp
@@ -15,9 +15,9 @@
* *
***************************************************************************/
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qfileinfo.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqfileinfo.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -27,7 +27,7 @@
#include "freettsproc.h"
/** Constructor */
-FreeTTSProc::FreeTTSProc( QObject* parent, const char* name, const QStringList& /*args*/) :
+FreeTTSProc::FreeTTSProc( TQObject* parent, const char* name, const TQStringList& /*args*/) :
PlugInProc( parent, name ) {
kdDebug() << "Running: FreeTTSProc::FreeTTSProc" << endl;
m_state = psIdle;
@@ -45,7 +45,7 @@ FreeTTSProc::~FreeTTSProc() {
}
/** Initializate the speech */
-bool FreeTTSProc::init(KConfig *config, const QString &configGroup) {
+bool FreeTTSProc::init(KConfig *config, const TQString &configGroup) {
kdDebug() << "Running: FreeTTSProc::init()" << endl;
kdDebug() << "Initializing plug in: FreeTTS" << endl;
config->setGroup(configGroup);
@@ -60,8 +60,8 @@ bool FreeTTSProc::init(KConfig *config, const QString &configGroup) {
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void FreeTTSProc::sayText(const QString &text) {
- synth(text, QString::null, m_freettsJarPath);
+void FreeTTSProc::sayText(const TQString &text) {
+ synth(text, TQString::null, m_freettsJarPath);
}
/**
@@ -74,24 +74,24 @@ void FreeTTSProc::sayText(const QString &text) {
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
-void FreeTTSProc::synthText(const QString& text, const QString& suggestedFilename) {
+void FreeTTSProc::synthText(const TQString& text, const TQString& suggestedFilename) {
kdDebug() << "Running: FreeTTSProc::synthText" << endl;
synth(text, suggestedFilename, m_freettsJarPath);
}
-// A little helper function because KDE 3.2 kdDebug() does not support QValueList<QCString>.
-QStringList argsToQStringList(const QValueList<QCString> list)
+// A little helper function because KDE 3.2 kdDebug() does not support TQValueList<TQCString>.
+TQStringList argsToQStringList(const TQValueList<TQCString> list)
{
- QStringList newList;
- QValueList<QCString>::ConstIterator it = list.begin();
+ TQStringList newList;
+ TQValueList<TQCString>::ConstIterator it = list.begin();
for ( ; it != list.end(); ++it ) newList.append(*it);
return newList;
}
void FreeTTSProc::synth(
- const QString &text,
- const QString &synthFilename,
- const QString& freettsJarPath) {
+ const TQString &text,
+ const TQString &synthFilename,
+ const TQString& freettsJarPath) {
kdDebug() << "Running: FreeTTSProc::synth" << endl;
@@ -103,21 +103,21 @@ void FreeTTSProc::synth(
}
m_freettsProc = new KProcess;
- connect(m_freettsProc, SIGNAL(processExited(KProcess*)),
- this, SLOT(slotProcessExited(KProcess*)));
- connect(m_freettsProc, SIGNAL(receivedStdout(KProcess*, char*, int)),
- this, SLOT(slotReceivedStdout(KProcess*, char*, int)));
- connect(m_freettsProc, SIGNAL(receivedStderr(KProcess*, char*, int)),
- this, SLOT(slotReceivedStderr(KProcess*, char*, int)));
- connect(m_freettsProc, SIGNAL(wroteStdin(KProcess*)),
- this, SLOT(slotWroteStdin(KProcess* )));
+ connect(m_freettsProc, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(slotProcessExited(KProcess*)));
+ connect(m_freettsProc, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStdout(KProcess*, char*, int)));
+ connect(m_freettsProc, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)),
+ this, TQT_SLOT(slotReceivedStderr(KProcess*, char*, int)));
+ connect(m_freettsProc, TQT_SIGNAL(wroteStdin(KProcess*)),
+ this, TQT_SLOT(slotWroteStdin(KProcess* )));
if (synthFilename.isNull())
m_state = psSaying;
else
m_state = psSynthing;
- QString saidText = text;
+ TQString saidText = text;
saidText += "\n";
/// As freetts.jar doesn't seem to like being called from an absolute path,
@@ -125,8 +125,8 @@ void FreeTTSProc::synth(
/// KProcess::setWorkingDirectory()
/// We could just strip off 11 characters from the end of the path to freetts.jar, but thats
/// not exactly very portable...
- QString filename = QFileInfo(freettsJarPath).baseName().append(QString(".").append(QFileInfo(freettsJarPath).extension()));
- QString freettsJarDir = freettsJarPath.left((freettsJarPath.length() - filename.length()) - 1);
+ TQString filename = TQFileInfo(freettsJarPath).baseName().append(TQString(".").append(TQFileInfo(freettsJarPath).extension()));
+ TQString freettsJarDir = freettsJarPath.left((freettsJarPath.length() - filename.length()) - 1);
m_freettsProc->setWorkingDirectory(freettsJarDir);
kdDebug() << "FreeTTSProc::synthText: moved to directory '" << freettsJarDir << "'" << endl;
@@ -154,7 +154,7 @@ void FreeTTSProc::synth(
* Returning the filename of the synth'd text
* @returns The filename of the last synth'd text
*/
-QString FreeTTSProc::getFilename() {
+TQString FreeTTSProc::getFilename() {
kdDebug() << "FreeTTSProc::getFilename: returning " << m_synthFilename << endl;
return m_synthFilename;
}
@@ -206,12 +206,12 @@ void FreeTTSProc::slotProcessExited(KProcess*) {
}
void FreeTTSProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) {
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "FreeTTSProc::slotReceivedStdout: Received output from FreeTTS: " << buf << endl;
}
void FreeTTSProc::slotReceivedStderr(KProcess*, char* buffer, int buflen) {
- QString buf = QString::fromLatin1(buffer, buflen);
+ TQString buf = TQString::fromLatin1(buffer, buflen);
kdDebug() << "FreeTTSProc::slotReceivedStderr: Received error from FreeTTS: " << buf << endl;
}
@@ -242,7 +242,7 @@ pluginState FreeTTSProc::getState() {
void FreeTTSProc::ackFinished() {
if (m_state == psFinished) {
m_state = psIdle;
- m_synthFilename = QString::null;
+ m_synthFilename = TQString::null;
}
}
diff --git a/kttsd/plugins/freetts/freettsproc.h b/kttsd/plugins/freetts/freettsproc.h
index b2bb631..7dbc3b5 100644
--- a/kttsd/plugins/freetts/freettsproc.h
+++ b/kttsd/plugins/freetts/freettsproc.h
@@ -19,8 +19,8 @@
#define _FREETTSPROC_H_
-#include <qstringlist.h>
-#include <qmutex.h>
+#include <tqstringlist.h>
+#include <tqmutex.h>
#include <pluginproc.h>
@@ -33,7 +33,7 @@ public:
/**
* Constructor
*/
- FreeTTSProc( QObject* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ FreeTTSProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/**
* Destructor
@@ -45,13 +45,13 @@ public:
* @param config Settings object.
* @param configGroup Settings group.
*/
- virtual bool init(KConfig *config, const QString &configGroup);
+ virtual bool init(KConfig *config, const TQString &configGroup);
/**
* Say a text string.
* @param text The text to speak.
*/
- virtual void sayText(const QString &text);
+ virtual void sayText(const TQString &text);
/**
* Synthesize text into an audio file, but do not send to the audio device.
@@ -63,7 +63,7 @@ public:
*
* If the plugin supports asynchronous operation, it should return immediately.
*/
- virtual void synthText(const QString& text, const QString& suggestedFilename);
+ virtual void synthText(const TQString& text, const TQString& suggestedFilename);
/**
* Get the generated audio filename from synthText.
@@ -72,7 +72,7 @@ public:
*
* The plugin must not re-use the filename.
*/
- virtual QString getFilename();
+ virtual TQString getFilename();
/**
* Stop current operation (saying or synthesizing text).
@@ -137,9 +137,9 @@ public:
* @param freettsJarPath Path to the freetts jar file.
*/
void synth(
- const QString &text,
- const QString &synthFilename,
- const QString &freettsJarPath);
+ const TQString &text,
+ const TQString &synthFilename,
+ const TQString &freettsJarPath);
private slots:
void slotProcessExited(KProcess* proc);
@@ -152,7 +152,7 @@ private:
/**
* Path to FreeTTS jar file (from config).
*/
- QString m_freettsJarPath;
+ TQString m_freettsJarPath;
/**
* FreeTTS process
@@ -162,7 +162,7 @@ private:
/**
* Synthesis filename.
*/
- QString m_synthFilename;
+ TQString m_synthFilename;
/**
* Plugin state.
diff --git a/kttsd/plugins/hadifix/hadifixconf.cpp b/kttsd/plugins/hadifix/hadifixconf.cpp
index a2c5547..0249aea 100644
--- a/kttsd/plugins/hadifix/hadifixconf.cpp
+++ b/kttsd/plugins/hadifix/hadifixconf.cpp
@@ -15,14 +15,14 @@
***************************************************************************/
// Qt includes.
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qgroupbox.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qfile.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqgroupbox.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqfile.h>
// KDE includes.
#include <ktempfile.h>
@@ -63,16 +63,16 @@ class HadifixConfPrivate {
~HadifixConfPrivate() {
if (hadifixProc) hadifixProc->stopText();
delete hadifixProc;
- if (!waveFile.isNull()) QFile::remove(waveFile);
+ if (!waveFile.isNull()) TQFile::remove(waveFile);
delete progressDlg;
};
#include "initialconfig.h"
- void setConfiguration (QString hadifixExec, QString mbrolaExec,
- QString voice, bool male,
+ void setConfiguration (TQString hadifixExec, TQString mbrolaExec,
+ TQString voice, bool male,
int volume, int time, int pitch,
- QString codecName)
+ TQString codecName)
{
configWidget->hadifixURL->setURL (hadifixExec);
configWidget->mbrolaURL->setURL (mbrolaExec);
@@ -86,10 +86,10 @@ class HadifixConfPrivate {
}
void initializeVoices () {
- QStringList::iterator it;
+ TQStringList::iterator it;
for (it = defaultVoices.begin(); it != defaultVoices.end(); ++it) {
HadifixProc::VoiceGender gender;
- QString name = QFileInfo(*it).fileName();
+ TQString name = TQFileInfo(*it).fileName();
gender = HadifixProc::determineGender(defaultMbrolaExec, *it);
if (gender == HadifixProc::MaleGender)
configWidget->addVoice(*it, true, i18n("Male voice \"%1\"").arg(name));
@@ -114,10 +114,10 @@ class HadifixConfPrivate {
}
void setDefaultEncodingFromVoice() {
- QString voiceFile = configWidget->getVoiceFilename();
- QString voiceCode = QFileInfo(voiceFile).baseName(false);
+ TQString voiceFile = configWidget->getVoiceFilename();
+ TQString voiceCode = TQFileInfo(voiceFile).baseName(false);
voiceCode = voiceCode.left(2);
- QString codecName = "Local";
+ TQString codecName = "Local";
if (voiceCode == "de") codecName = "ISO 8859-1";
if (voiceCode == "hu") codecName = "ISO 8859-2";
configWidget->characterCodingBox->setCurrentItem(PlugInProc::codecNameToListIndex(
@@ -125,14 +125,14 @@ class HadifixConfPrivate {
}
void setDefaults () {
- QStringList::iterator it = defaultVoices.begin();
+ TQStringList::iterator it = defaultVoices.begin();
// Find a voice that matches language code, if any.
if (!languageCode.isEmpty())
{
- QString justLang = languageCode.left(2);
+ TQString justLang = languageCode.left(2);
for (;it != defaultVoices.end();++it)
{
- QString voiceCode = QFileInfo(*it).baseName(false).left(2);
+ TQString voiceCode = TQFileInfo(*it).baseName(false).left(2);
if (voiceCode == justLang) break;
}
if (it == defaultVoices.end()) it = defaultVoices.begin();
@@ -145,19 +145,19 @@ class HadifixConfPrivate {
100, 100, 100, "Local");
};
- void load (KConfig *config, const QString &configGroup) {
+ void load (KConfig *config, const TQString &configGroup) {
config->setGroup(configGroup);
- QString voice = config->readEntry("voice", configWidget->getVoiceFilename());
+ TQString voice = config->readEntry("voice", configWidget->getVoiceFilename());
HadifixProc::VoiceGender gender;
gender = HadifixProc::determineGender(defaultMbrolaExec, voice);
bool isMale = (gender == HadifixProc::MaleGender);
- QString defaultCodecName = "Local";
+ TQString defaultCodecName = "Local";
// TODO: Need a better way to determine proper codec for each voice.
// This will do for now.
- QString voiceCode = QFileInfo(voice).baseName(false);
+ TQString voiceCode = TQFileInfo(voice).baseName(false);
if (voiceCode.left(2) == "de") defaultCodecName = "ISO 8859-1";
if (voiceCode.left(2) == "hu") defaultCodecName = "ISO 8859-2";
@@ -173,7 +173,7 @@ class HadifixConfPrivate {
);
};
- void save (KConfig *config, const QString &configGroup) {
+ void save (KConfig *config, const TQString &configGroup) {
config->setGroup(configGroup);
config->writeEntry ("hadifixExec", PlugInConf::realFilePath(configWidget->hadifixURL->url()));
config->writeEntry ("mbrolaExec", PlugInConf::realFilePath(configWidget->mbrolaURL->url()));
@@ -188,14 +188,14 @@ class HadifixConfPrivate {
HadifixConfigUI *configWidget;
- QString languageCode;
- QString defaultHadifixExec;
- QString defaultMbrolaExec;
- QStringList defaultVoices;
- QStringList codecList;
+ TQString languageCode;
+ TQString defaultHadifixExec;
+ TQString defaultMbrolaExec;
+ TQStringList defaultVoices;
+ TQStringList codecList;
// Wave file playing on play object.
- QString waveFile;
+ TQString waveFile;
// Synthesizer.
HadifixProc* hadifixProc;
// Progress Dialog.
@@ -203,24 +203,24 @@ class HadifixConfPrivate {
};
/** Constructor */
-HadifixConf::HadifixConf( QWidget* parent, const char* name, const QStringList &) :
+HadifixConf::HadifixConf( TQWidget* parent, const char* name, const TQStringList &) :
PlugInConf( parent, name ){
// kdDebug() << "HadifixConf::HadifixConf: Running" << endl;
- QVBoxLayout *layout = new QVBoxLayout (this, KDialog::marginHint(), KDialog::spacingHint(), "CommandConfigWidgetLayout");
+ TQVBoxLayout *layout = new TQVBoxLayout (this, KDialog::marginHint(), KDialog::spacingHint(), "CommandConfigWidgetLayout");
layout->setAlignment (Qt::AlignTop);
d = new HadifixConfPrivate();
d->configWidget = new HadifixConfigUI (this, "configWidget");
- QString file = locate("data", "LICENSES/LGPL_V2");
+ TQString file = locate("data", "LICENSES/LGPL_V2");
i18n("This plugin is distributed under the terms of the GPL v2 or later.");
- connect(d->configWidget->voiceButton, SIGNAL(clicked()), this, SLOT(voiceButton_clicked()));
- connect(d->configWidget->testButton, SIGNAL(clicked()), this, SLOT(testButton_clicked()));
- connect(d->configWidget, SIGNAL(changed(bool)), this, SLOT(configChanged (bool)));
- connect(d->configWidget->characterCodingBox, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()));
- connect(d->configWidget->voiceCombo, SIGNAL(activated(int)), this, SLOT(voiceCombo_activated(int)));
+ connect(d->configWidget->voiceButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(voiceButton_clicked()));
+ connect(d->configWidget->testButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(testButton_clicked()));
+ connect(d->configWidget, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(configChanged (bool)));
+ connect(d->configWidget->characterCodingBox, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()));
+ connect(d->configWidget->voiceCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(voiceCombo_activated(int)));
d->initializeCharacterCodes();
d->initializeVoices();
d->setDefaults();
@@ -233,13 +233,13 @@ HadifixConf::~HadifixConf(){
delete d;
}
-void HadifixConf::load(KConfig *config, const QString &configGroup) {
+void HadifixConf::load(KConfig *config, const TQString &configGroup) {
// kdDebug() << "HadifixConf::load: Running" << endl;
d->setDefaults();
d->load (config, configGroup);
}
-void HadifixConf::save(KConfig *config, const QString &configGroup) {
+void HadifixConf::save(KConfig *config, const TQString &configGroup) {
// kdDebug() << "HadifixConf::save: Running" << endl;
d->save (config, configGroup);
}
@@ -249,22 +249,22 @@ void HadifixConf::defaults() {
d->setDefaults();
}
-void HadifixConf::setDesiredLanguage(const QString &lang)
+void HadifixConf::setDesiredLanguage(const TQString &lang)
{
d->languageCode = lang;
}
-QString HadifixConf::getTalkerCode()
+TQString HadifixConf::getTalkerCode()
{
if (!d->configWidget->hadifixURL->url().isEmpty() && !d->configWidget->mbrolaURL->url().isEmpty())
{
- QString voiceFile = d->configWidget->getVoiceFilename();
- if (QFileInfo(voiceFile).exists())
+ TQString voiceFile = d->configWidget->getVoiceFilename();
+ if (TQFileInfo(voiceFile).exists())
{
// mbrola voice file names usually start with two-letter language code,
// but this is by no means guaranteed.
- QString voiceCode = QFileInfo(voiceFile).baseName(false);
- QString voiceLangCode = voiceCode.left(2);
+ TQString voiceCode = TQFileInfo(voiceFile).baseName(false);
+ TQString voiceLangCode = voiceCode.left(2);
if (d->languageCode.left(2) != voiceLangCode)
{
// Verify that first two letters of voice filename are a valid language code.
@@ -272,15 +272,15 @@ QString HadifixConf::getTalkerCode()
if (!TalkerCode::languageCodeToLanguage(voiceLangCode).isEmpty())
d->languageCode = voiceLangCode;
}
- QString gender = "male";
+ TQString gender = "male";
if (!d->configWidget->isMaleVoice()) gender = "female";
- QString volume = "medium";
+ TQString volume = "medium";
if (d->configWidget->volumeBox->value() < 75) volume = "soft";
if (d->configWidget->volumeBox->value() > 125) volume = "loud";
- QString rate = "medium";
+ TQString rate = "medium";
if (d->configWidget->timeBox->value() < 75) rate = "slow";
if (d->configWidget->timeBox->value() > 125) rate = "fast";
- return QString(
+ return TQString(
"<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />"
"<prosody volume=\"%4\" rate=\"%5\" />"
"<kttsd synthesizer=\"%6\" />")
@@ -292,7 +292,7 @@ QString HadifixConf::getTalkerCode()
.arg("Hadifix");
}
}
- return QString::null;
+ return TQString::null;
}
void HadifixConf::voiceButton_clicked () {
@@ -308,7 +308,7 @@ void HadifixConf::voiceButton_clicked () {
widget->voiceFileURL->setURL(d->configWidget->getVoiceFilename());
widget->mbrola = d->defaultMbrolaExec;
- if (dialog->exec() == QDialog::Accepted) {
+ if (dialog->exec() == TQDialog::Accepted) {
d->configWidget->setVoice (widget->voiceFileURL->url(),
widget->maleOption->isChecked());
d->setDefaultEncodingFromVoice();
@@ -330,11 +330,11 @@ void HadifixConf::testButton_clicked () {
else
{
d->hadifixProc = new HadifixProc();
- connect (d->hadifixProc, SIGNAL(stopped()), this, SLOT(slotSynthStopped()));
+ connect (d->hadifixProc, TQT_SIGNAL(stopped()), this, TQT_SLOT(slotSynthStopped()));
}
// Create a temp file name for the wave file.
KTempFile tempFile (locateLocal("tmp", "hadifixplugin-"), ".wav");
- QString tmpWaveFile = tempFile.file()->name();
+ TQString tmpWaveFile = tempFile.file()->name();
tempFile.close();
// Tell user to wait.
@@ -352,9 +352,9 @@ void HadifixConf::testButton_clicked () {
// italian, and a few others, written in perl, but they have many issues.
// Go to the mbrola website and click on "TTS" to learn more.
- // QString testMsg = "K D E ist eine moderne grafische Arbeitsumgebung für UNIX-Computer.";
- QString testMsg = testMessage(d->languageCode);
- connect (d->hadifixProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ // TQString testMsg = "K D E ist eine moderne grafische Arbeitsumgebung für UNIX-Computer.";
+ TQString testMsg = testMessage(d->languageCode);
+ connect (d->hadifixProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
d->hadifixProc->synth (testMsg,
realFilePath(d->configWidget->hadifixURL->url()),
d->configWidget->isMaleVoice(),
@@ -369,7 +369,7 @@ void HadifixConf::testButton_clicked () {
// Display progress dialog modally. Processing continues when plugin signals synthFinished,
// or if user clicks Cancel button.
d->progressDlg->exec();
- disconnect (d->hadifixProc, SIGNAL(synthFinished()), this, SLOT(slotSynthFinished()));
+ disconnect (d->hadifixProc, TQT_SIGNAL(synthFinished()), this, TQT_SLOT(slotSynthFinished()));
if (d->progressDlg->wasCancelled()) d->hadifixProc->stopText();
delete d->progressDlg;
d->progressDlg = 0;
@@ -392,15 +392,15 @@ void HadifixConf::slotSynthFinished()
// Play the wave file (possibly adjusting its Speed).
// Player object deletes the wave file when done.
if (m_player) m_player->play(d->waveFile);
- QFile::remove(d->waveFile);
- d->waveFile = QString::null;
+ TQFile::remove(d->waveFile);
+ d->waveFile = TQString::null;
if (d->progressDlg) d->progressDlg->close();
}
void HadifixConf::slotSynthStopped()
{
// Clean up after canceling test.
- QString filename = d->hadifixProc->getFilename();
+ TQString filename = d->hadifixProc->getFilename();
// kdDebug() << "HadifixConf::slotSynthStopped: filename = " << filename << endl;
- if (!filename.isNull()) QFile::remove(filename);
+ if (!filename.isNull()) TQFile::remove(filename);
}
diff --git a/kttsd/plugins/hadifix/hadifixconf.h b/kttsd/plugins/hadifix/hadifixconf.h
index a53ecb1..4ef96a6 100644
--- a/kttsd/plugins/hadifix/hadifixconf.h
+++ b/kttsd/plugins/hadifix/hadifixconf.h
@@ -1,7 +1,7 @@
#ifndef _HADIFIXCONF_H_
#define _HADIFIXCONF_H_
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kconfig.h>
@@ -15,7 +15,7 @@ class HadifixConf : public PlugInConf {
public:
/** Constructor */
- HadifixConf( QWidget* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ HadifixConf( TQWidget* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/** Destructor */
~HadifixConf();
@@ -26,13 +26,13 @@ class HadifixConf : public PlugInConf {
the control center, to undo all of his changes and restore the currently
valid settings. NOTE that this is not called after the modules is loaded,
so you probably want to call this method in the constructor.*/
- void load(KConfig *config, const QString &configGroup);
+ void load(KConfig *config, const TQString &configGroup);
/** This function gets called when the user wants to save the settings in
the user interface, updating the config files or wherever the
configuration is stored. The method is called when the user clicks "Apply"
or "Ok". */
- void save(KConfig *config, const QString &configGroup);
+ void save(KConfig *config, const TQString &configGroup);
/** This function is called to set the settings in the module to sensible
default values. It gets called when hitting the "Default" button. The
@@ -44,7 +44,7 @@ class HadifixConf : public PlugInConf {
* This function informs the plugin of the desired language to be spoken
* by the plugin. The plugin should attempt to adapt itself to the
* specified language code, choosing sensible defaults if necessary.
- * If the passed-in code is QString::null, no specific language has
+ * If the passed-in code is TQString::null, no specific language has
* been chosen.
* @param lang The desired language code or Null if none.
*
@@ -56,16 +56,16 @@ class HadifixConf : public PlugInConf {
* not the given country, treat it as though the country
* code were not specified, i.e., adapt to the given language.
*/
- void setDesiredLanguage(const QString &lang);
+ void setDesiredLanguage(const TQString &lang);
/**
* Return fully-specified talker code for the configured plugin. This code
* uniquely identifies the configured instance of the plugin and distinquishes
* one instance from another. If the plugin has not been fully configured,
- * i.e., cannot yet synthesize, return QString::null.
+ * i.e., cannot yet synthesize, return TQString::null.
* @return Fully-specified talker code.
*/
- QString getTalkerCode();
+ TQString getTalkerCode();
public slots:
void configChanged(bool t = true){emit changed(t);};
diff --git a/kttsd/plugins/hadifix/hadifixconfigui.ui.h b/kttsd/plugins/hadifix/hadifixconfigui.ui.h
index e3a7a04..7c21c54 100644
--- a/kttsd/plugins/hadifix/hadifixconfigui.ui.h
+++ b/kttsd/plugins/hadifix/hadifixconfigui.ui.h
@@ -51,7 +51,7 @@ void HadifixConfigUI::init () {
female = KGlobal::iconLoader()->loadIcon("female", KIcon::Small);
}
-void HadifixConfigUI::addVoice (const QString &filename, bool isMale) {
+void HadifixConfigUI::addVoice (const TQString &filename, bool isMale) {
if (isMale) {
if (!maleVoices.contains(filename)) {
int id = voiceCombo->count();
@@ -68,7 +68,7 @@ void HadifixConfigUI::addVoice (const QString &filename, bool isMale) {
}
}
-void HadifixConfigUI::addVoice (const QString &filename, bool isMale, const QString &displayname) {
+void HadifixConfigUI::addVoice (const TQString &filename, bool isMale, const TQString &displayname) {
addVoice (filename, isMale);
if (isMale) {
@@ -81,7 +81,7 @@ void HadifixConfigUI::addVoice (const QString &filename, bool isMale, const QStr
}
}
-void HadifixConfigUI::setVoice (const QString &filename, bool isMale) {
+void HadifixConfigUI::setVoice (const TQString &filename, bool isMale) {
addVoice (filename, isMale);
if (isMale)
voiceCombo->setCurrentItem (maleVoices[filename]);
@@ -89,10 +89,10 @@ void HadifixConfigUI::setVoice (const QString &filename, bool isMale) {
voiceCombo->setCurrentItem (femaleVoices[filename]);
}
-QString HadifixConfigUI::getVoiceFilename() {
+TQString HadifixConfigUI::getVoiceFilename() {
int curr = voiceCombo->currentItem();
- QString filename = voiceCombo->text(curr);
+ TQString filename = voiceCombo->text(curr);
if (defaultVoices.contains(curr))
filename = defaultVoices[curr];
@@ -101,7 +101,7 @@ QString HadifixConfigUI::getVoiceFilename() {
bool HadifixConfigUI::isMaleVoice() {
int curr = voiceCombo->currentItem();
- QString filename = getVoiceFilename();
+ TQString filename = getVoiceFilename();
if (maleVoices.contains(filename))
return maleVoices[filename] == curr;
@@ -109,6 +109,6 @@ bool HadifixConfigUI::isMaleVoice() {
return false;
}
-void HadifixConfigUI::changed (const QString &) {
+void HadifixConfigUI::changed (const TQString &) {
emit changed (true);
}
diff --git a/kttsd/plugins/hadifix/hadifixproc.cpp b/kttsd/plugins/hadifix/hadifixproc.cpp
index 42730b3..598eb21 100644
--- a/kttsd/plugins/hadifix/hadifixproc.cpp
+++ b/kttsd/plugins/hadifix/hadifixproc.cpp
@@ -16,9 +16,9 @@
* *
***************************************************************************/
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextcodec.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextcodec.h>
#include <kdebug.h>
#include <kconfig.h>
@@ -35,7 +35,7 @@ class HadifixProcPrivate {
hadifixProc = 0;
waitingStop = false;
state = psIdle;
- synthFilename = QString::null;
+ synthFilename = TQString::null;
gender = false;
volume = 100;
time = 100;
@@ -47,11 +47,11 @@ class HadifixProcPrivate {
delete hadifixProc;
};
- void load(KConfig *config, const QString &configGroup) {
+ void load(KConfig *config, const TQString &configGroup) {
config->setGroup(configGroup);
- hadifix = config->readEntry ("hadifixExec", QString::null);
- mbrola = config->readEntry ("mbrolaExec", QString::null);
- voice = config->readEntry ("voice", QString::null);
+ hadifix = config->readEntry ("hadifixExec", TQString::null);
+ mbrola = config->readEntry ("mbrolaExec", TQString::null);
+ voice = config->readEntry ("voice", TQString::null);
gender = config->readBoolEntry("gender", false);
volume = config->readNumEntry ("volume", 100);
time = config->readNumEntry ("time", 100);
@@ -59,9 +59,9 @@ class HadifixProcPrivate {
codec = PlugInProc::codecNameToCodec(config->readEntry ("codec", "Local"));
};
- QString hadifix;
- QString mbrola;
- QString voice;
+ TQString hadifix;
+ TQString mbrola;
+ TQString voice;
bool gender;
int volume;
int time;
@@ -70,12 +70,12 @@ class HadifixProcPrivate {
bool waitingStop;
KShellProcess* hadifixProc;
volatile pluginState state;
- QTextCodec* codec;
- QString synthFilename;
+ TQTextCodec* codec;
+ TQString synthFilename;
};
/** Constructor */
-HadifixProc::HadifixProc( QObject* parent, const char* name, const QStringList &) :
+HadifixProc::HadifixProc( TQObject* parent, const char* name, const TQStringList &) :
PlugInProc( parent, name ){
// kdDebug() << "HadifixProc::HadifixProc: Running" << endl;
d = 0;
@@ -92,7 +92,7 @@ HadifixProc::~HadifixProc(){
}
/** Initializate the speech */
-bool HadifixProc::init(KConfig *config, const QString &configGroup){
+bool HadifixProc::init(KConfig *config, const TQString &configGroup){
// kdDebug() << "HadifixProc::init: Initializing plug in: Hadifix" << endl;
if (d == 0)
@@ -110,7 +110,7 @@ bool HadifixProc::init(KConfig *config, const QString &configGroup){
* It must also implement the @ref getState method, which must return
* psFinished, when saying is completed.
*/
-void HadifixProc::sayText(const QString& /*text*/)
+void HadifixProc::sayText(const TQString& /*text*/)
{
kdDebug() << "HadifixProc::sayText: Warning, sayText not implemented." << endl;
return;
@@ -129,7 +129,7 @@ void HadifixProc::sayText(const QString& /*text*/)
* It must also implement the @ref getState method, which must return
* psFinished, when synthesis is completed.
*/
-void HadifixProc::synthText(const QString &text, const QString &suggestedFilename)
+void HadifixProc::synthText(const TQString &text, const TQString &suggestedFilename)
{
if (d == 0) return; // Caller should have called init.
synth(text, d->hadifix, d->gender, d->mbrola, d->voice, d->volume,
@@ -148,12 +148,12 @@ void HadifixProc::synthText(const QString &text, const QString &suggestedFilenam
* @param pitch Frequency. 100 = normal
* @param waveFilename Name of file to synthesize to.
*/
-void HadifixProc::synth(QString text,
- QString hadifix, bool isMale,
- QString mbrola, QString voice,
+void HadifixProc::synth(TQString text,
+ TQString hadifix, bool isMale,
+ TQString mbrola, TQString voice,
int volume, int time, int pitch,
- QTextCodec *codec,
- const QString waveFilename)
+ TQTextCodec *codec,
+ const TQString waveFilename)
{
// kdDebug() << "HadifixProc::synth: Saying text: '" << text << "' using Hadifix plug in" << endl;
if (d == 0)
@@ -176,31 +176,31 @@ void HadifixProc::synth(QString text,
// Set up txt2pho and mbrola commands.
// kdDebug() << "HadifixProc::synth: setting up commands" << endl;
- QString hadifixCommand = d->hadifixProc->quote(hadifix);
+ TQString hadifixCommand = d->hadifixProc->quote(hadifix);
if (isMale)
hadifixCommand += " -m";
else
hadifixCommand += " -f";
- QString mbrolaCommand = d->hadifixProc->quote(mbrola);
+ TQString mbrolaCommand = d->hadifixProc->quote(mbrola);
mbrolaCommand += " -e"; //Ignore fatal errors on unkown diphone
- mbrolaCommand += QString(" -v %1").arg(volume/100.0); // volume ratio
- mbrolaCommand += QString(" -f %1").arg(pitch/100.0); // freqency ratio
- mbrolaCommand += QString(" -t %1").arg(1/(time/100.0)); // time ratio
+ mbrolaCommand += TQString(" -v %1").arg(volume/100.0); // volume ratio
+ mbrolaCommand += TQString(" -f %1").arg(pitch/100.0); // freqency ratio
+ mbrolaCommand += TQString(" -t %1").arg(1/(time/100.0)); // time ratio
mbrolaCommand += " " + d->hadifixProc->quote(voice);
mbrolaCommand += " - " + d->hadifixProc->quote(waveFilename);
// kdDebug() << "HadifixProc::synth: Hadifix command: " << hadifixCommand << endl;
// kdDebug() << "HadifixProc::synth: Mbrola command: " << mbrolaCommand << endl;
- QString command = hadifixCommand + "|" + mbrolaCommand;
+ TQString command = hadifixCommand + "|" + mbrolaCommand;
*(d->hadifixProc) << command;
// Connect signals from process.
- connect(d->hadifixProc, SIGNAL(processExited(KProcess *)),
- this, SLOT(slotProcessExited(KProcess *)));
- connect(d->hadifixProc, SIGNAL(wroteStdin(KProcess *)),
- this, SLOT(slotWroteStdin(KProcess *)));
+ connect(d->hadifixProc, TQT_SIGNAL(processExited(KProcess *)),
+ this, TQT_SLOT(slotProcessExited(KProcess *)));
+ connect(d->hadifixProc, TQT_SIGNAL(wroteStdin(KProcess *)),
+ this, TQT_SLOT(slotWroteStdin(KProcess *)));
// Store off name of wave file to be generated.
d->synthFilename = waveFilename;
@@ -211,7 +211,7 @@ void HadifixProc::synth(QString text,
kdDebug() << "HadifixProc::synth: start process failed." << endl;
d->state = psIdle;
} else {
- QCString encodedText;
+ TQCString encodedText;
if (codec) {
encodedText = codec->fromUnicode(text);
// kdDebug() << "HadifixProc::synth: encoding using " << codec->name() << endl;
@@ -231,7 +231,7 @@ void HadifixProc::synth(QString text,
* be locked when this method is called. The file will be deleted when
* KTTSD is finished using it.
*/
-QString HadifixProc::getFilename() { return d->synthFilename; }
+TQString HadifixProc::getFilename() { return d->synthFilename; }
/**
* Stop current operation (saying or synthesizing text).
@@ -285,7 +285,7 @@ void HadifixProc::ackFinished()
if (d->state == psFinished)
{
d->state = psIdle;
- d->synthFilename = QString::null;
+ d->synthFilename = TQString::null;
}
}
@@ -345,27 +345,27 @@ void HadifixProc::slotWroteStdin(KProcess*)
* Static function to determine whether the voice file is male or female.
* @param mbrola the mbrola executable
* @param voice the voice file
-* @param output the output of mbrola will be written into this QString*
+* @param output the output of mbrola will be written into this TQString*
* @return HadifixSpeech::MaleGender if the voice is male,
* HadifixSpeech::FemaleGender if the voice is female,
* HadifixSpeech::NoGender if the gender cannot be determined,
* HadifixSpeech::NoVoice if there is an error in the voice file
*/
-HadifixProc::VoiceGender HadifixProc::determineGender(QString mbrola, QString voice, QString *output)
+HadifixProc::VoiceGender HadifixProc::determineGender(TQString mbrola, TQString voice, TQString *output)
{
- QString command = mbrola + " -i " + voice + " - -";
+ TQString command = mbrola + " -i " + voice + " - -";
// create a new process
HadifixProc speech;
KShellProcess proc;
proc << command;
- connect(&proc, SIGNAL(receivedStdout(KProcess *, char *, int)),
- &speech, SLOT(receivedStdout(KProcess *, char *, int)));
- connect(&proc, SIGNAL(receivedStderr(KProcess *, char *, int)),
- &speech, SLOT(receivedStderr(KProcess *, char *, int)));
+ connect(&proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
+ &speech, TQT_SLOT(receivedStdout(KProcess *, char *, int)));
+ connect(&proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
+ &speech, TQT_SLOT(receivedStderr(KProcess *, char *, int)));
- speech.stdOut = QString::null;
- speech.stdErr = QString::null;
+ speech.stdOut = TQString::null;
+ speech.stdErr = TQString::null;
proc.start (KProcess::Block, KProcess::AllOutput);
VoiceGender result;
@@ -389,11 +389,11 @@ HadifixProc::VoiceGender HadifixProc::determineGender(QString mbrola, QString vo
}
void HadifixProc::receivedStdout (KProcess *, char *buffer, int buflen) {
- stdOut += QString::fromLatin1(buffer, buflen);
+ stdOut += TQString::fromLatin1(buffer, buflen);
}
void HadifixProc::receivedStderr (KProcess *, char *buffer, int buflen) {
- stdErr += QString::fromLatin1(buffer, buflen);
+ stdErr += TQString::fromLatin1(buffer, buflen);
}
/**
@@ -405,7 +405,7 @@ void HadifixProc::receivedStderr (KProcess *, char *buffer, int buflen) {
* tags and converts the file to plain text.
* @return Name of the XSLT file.
*/
-QString HadifixProc::getSsmlXsltFilename()
+TQString HadifixProc::getSsmlXsltFilename()
{
return KGlobal::dirs()->resourceDirs("data").last() + "kttsd/hadifix/xslt/SSMLtoTxt2pho.xsl";
}
diff --git a/kttsd/plugins/hadifix/hadifixproc.h b/kttsd/plugins/hadifix/hadifixproc.h
index 225c7ed..01b7c5d 100644
--- a/kttsd/plugins/hadifix/hadifixproc.h
+++ b/kttsd/plugins/hadifix/hadifixproc.h
@@ -18,7 +18,7 @@
#ifndef _HADIFIXPROC_H_
#define _HADIFIXPROC_H_
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <pluginproc.h>
@@ -37,13 +37,13 @@ class HadifixProc : public PlugInProc{
};
/** Constructor */
- HadifixProc( QObject* parent = 0, const char* name = 0, const QStringList &args = QStringList());
+ HadifixProc( TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList());
/** Destructor */
~HadifixProc();
/** Initializate the speech */
- virtual bool init (KConfig *config, const QString &configGroup);
+ virtual bool init (KConfig *config, const TQString &configGroup);
/**
* Say a text. Synthesize and audibilize it.
@@ -54,7 +54,7 @@ class HadifixProc : public PlugInProc{
* It must also implement the @ref getState method, which must return
* psFinished, when saying is completed.
*/
- virtual void sayText(const QString &text);
+ virtual void sayText(const TQString &text);
/**
* Synthesize text into an audio file, but do not send to the audio device.
@@ -69,7 +69,7 @@ class HadifixProc : public PlugInProc{
* It must also implement the @ref getState method, which must return
* psFinished, when synthesis is completed.
*/
- virtual void synthText(const QString &text, const QString &suggestedFilename);
+ virtual void synthText(const TQString &text, const TQString &suggestedFilename);
/**
* Get the generated audio filename from call to @ref synthText.
@@ -80,7 +80,7 @@ class HadifixProc : public PlugInProc{
* be locked when this method is called. The file will be deleted when
* KTTSD is finished using it.
*/
- virtual QString getFilename();
+ virtual TQString getFilename();
/**
* Stop current operation (saying or synthesizing text).
@@ -156,24 +156,24 @@ class HadifixProc : public PlugInProc{
* @param pitch Frequency. 100 = normal
* @param waveFilename Name of file to synthesize to.
*/
- void synth(QString text,
- QString hadifix, bool isMale,
- QString mbrola, QString voice,
+ void synth(TQString text,
+ TQString hadifix, bool isMale,
+ TQString mbrola, TQString voice,
int volume, int time, int pitch,
- QTextCodec* codec,
- const QString waveFilename);
+ TQTextCodec* codec,
+ const TQString waveFilename);
/**
* Static function to determine whether the voice file is male or female.
* @param mbrola the mbrola executable
* @param voice the voice file
- * @param output the output of mbrola will be written into this QString*
+ * @param output the output of mbrola will be written into this TQString*
* @return HadifixSpeech::MaleGender if the voice is male,
* HadifixSpeech::FemaleGender if the voice is female,
* HadifixSpeech::NoGender if the gender cannot be determined,
* HadifixSpeech::NoVoice if there is an error in the voice file
*/
- static VoiceGender determineGender(QString mbrola, QString voice, QString *output = 0);
+ static VoiceGender determineGender(TQString mbrola, TQString voice, TQString *output = 0);
/**
* Returns the name of an XSLT stylesheet that will convert a valid SSML file
@@ -184,7 +184,7 @@ class HadifixProc : public PlugInProc{
* tags and converts the file to plain text.
* @return Name of the XSLT file.
*/
- virtual QString getSsmlXsltFilename();
+ virtual TQString getSsmlXsltFilename();
private slots:
void slotProcessExited(KProcess*);
@@ -196,8 +196,8 @@ class HadifixProc : public PlugInProc{
private:
HadifixProcPrivate *d;
- QString stdOut;
- QString stdErr;
+ TQString stdOut;
+ TQString stdErr;
};
#endif
diff --git a/kttsd/plugins/hadifix/initialconfig.h b/kttsd/plugins/hadifix/initialconfig.h
index 4fac632..02e920c 100644
--- a/kttsd/plugins/hadifix/initialconfig.h
+++ b/kttsd/plugins/hadifix/initialconfig.h
@@ -5,31 +5,31 @@
* installation directories.
*/
void findInitialConfig() {
- QString hadifixDataPath = findHadifixDataPath();
+ TQString hadifixDataPath = findHadifixDataPath();
defaultHadifixExec = findExecutable("txt2pho", hadifixDataPath+"/../");
- QStringList list; list += "mbrola"; list += "mbrola-linux-i386";
+ TQStringList list; list += "mbrola"; list += "mbrola-linux-i386";
defaultMbrolaExec = findExecutable(list, hadifixDataPath+"/../../mbrola/");
defaultVoices = findVoices (defaultMbrolaExec, hadifixDataPath);
}
/** Tries to find the hadifix data path by looking into a number of files. */
-QString findHadifixDataPath () {
- QStringList files;
+TQString findHadifixDataPath () {
+ TQStringList files;
files += "/etc/txt2pho";
- files += QDir::homeDirPath()+"/.txt2phorc";
+ files += TQDir::homeDirPath()+"/.txt2phorc";
- QStringList::iterator it;
+ TQStringList::iterator it;
for (it = files.begin(); it != files.end(); ++it) {
- QFile file(*it);
+ TQFile file(*it);
if ( file.open(IO_ReadOnly) ) {
- QTextStream stream(&file);
+ TQTextStream stream(&file);
while (!stream.atEnd()) {
- QString s = stream.readLine().stripWhiteSpace();
+ TQString s = stream.readLine().stripWhiteSpace();
// look for a line "DATAPATH=..."
if (s.startsWith("DATAPATH")) {
@@ -39,7 +39,7 @@ QString findHadifixDataPath () {
if (s.startsWith("/"))
return s;
else {
- QFileInfo info (QFileInfo(*it).dirPath() + "/" + s);
+ TQFileInfo info (TQFileInfo(*it).dirPath() + "/" + s);
return info.absFilePath();
}
}
@@ -52,81 +52,81 @@ QString findHadifixDataPath () {
}
/** Tries to find the an executable by looking onto the hard disk. */
-QString findExecutable (const QStringList &names, const QString &possiblePath) {
+TQString findExecutable (const TQStringList &names, const TQString &possiblePath) {
// a) Try to find it directly
- QStringList::ConstIterator it;
- QStringList::ConstIterator itEnd = names.constEnd();
+ TQStringList::ConstIterator it;
+ TQStringList::ConstIterator itEnd = names.constEnd();
for (it = names.constBegin(); it != itEnd; ++it) {
- QString executable = KStandardDirs::findExe (*it);
+ TQString executable = KStandardDirs::findExe (*it);
if (!executable.isNull() && !executable.isEmpty())
return executable;
}
// b) Try to find it in the path specified by the second parameter
for (it = names.constBegin(); it != itEnd; ++it) {
- QFileInfo info (possiblePath+*it);
+ TQFileInfo info (possiblePath+*it);
if (info.exists() && info.isExecutable() && info.isFile()) {
return info.absFilePath();
}
}
// Both tries failed, so the user has to locate the executable.
- return QString::null;
+ return TQString::null;
}
/** Tries to find the voice files by looking onto the hard disk. */
-QStringList findVoices(QString mbrolaExec, const QString &hadifixDataPath) {
+TQStringList findVoices(TQString mbrolaExec, const TQString &hadifixDataPath) {
// First of all:
// dereference links to the mbrola executable (if mbrolaExec is a link).
for (int i = 0; i < 10; ++i) {
// If we have a chain of more than ten links something is surely wrong.
- QFileInfo info (mbrolaExec);
+ TQFileInfo info (mbrolaExec);
if (info.exists() && info.isSymLink())
mbrolaExec = info.readLink();
}
// Second:
// create a list of directories that possibly contain voice files
- QStringList list;
+ TQStringList list;
// 2a) search near the mbrola executable
- QFileInfo info (mbrolaExec);
+ TQFileInfo info (mbrolaExec);
if (info.exists() && info.isFile() && info.isExecutable()) {
- QString mbrolaPath = info.dirPath (true);
+ TQString mbrolaPath = info.dirPath (true);
list += mbrolaPath;
}
// 2b) search near the hadifix data path
info.setFile(hadifixDataPath + "../../mbrola");
- QString mbrolaPath = info.dirPath (true) + "/mbrola";
+ TQString mbrolaPath = info.dirPath (true) + "/mbrola";
if (!list.contains(mbrolaPath))
list += mbrolaPath;
// 2c) broaden the search by adding subdirs (with a depth of 2)
- QStringList subDirs = findSubdirs (list);
- QStringList subSubDirs = findSubdirs (subDirs);
+ TQStringList subDirs = findSubdirs (list);
+ TQStringList subSubDirs = findSubdirs (subDirs);
list += subDirs;
list += subSubDirs;
// Third:
// look into each of these directories and search for voice files.
- QStringList result;
- QStringList::iterator it;
+ TQStringList result;
+ TQStringList::iterator it;
for (it = list.begin(); it != list.end(); ++it) {
- QDir baseDir (*it, QString::null,
- QDir::Name|QDir::IgnoreCase, QDir::Files);
- QStringList files = baseDir.entryList();
+ TQDir baseDir (*it, TQString::null,
+ TQDir::Name|TQDir::IgnoreCase, TQDir::Files);
+ TQStringList files = baseDir.entryList();
- QStringList::iterator iter;
+ TQStringList::iterator iter;
for (iter = files.begin(); iter != files.end(); ++iter) {
// Voice files start with "MBROLA", but are afterwards binary files
- QString filename = *it + "/" + *iter;
- QFile file (filename);
+ TQString filename = *it + "/" + *iter;
+ TQFile file (filename);
if (file.open(IO_ReadOnly)) {
- QTextStream stream(&file);
+ TQTextStream stream(&file);
if (!stream.atEnd()) {
- QString s = stream.readLine();
+ TQString s = stream.readLine();
if (s.startsWith("MBROLA"))
if (HadifixProc::determineGender(mbrolaExec, filename)
!= HadifixProc::NoVoice
@@ -141,20 +141,20 @@ QStringList findVoices(QString mbrolaExec, const QString &hadifixDataPath) {
}
/** Returns a list of subdirs (with absolute paths) */
-QStringList findSubdirs (const QStringList &baseDirs) {
- QStringList result;
+TQStringList findSubdirs (const TQStringList &baseDirs) {
+ TQStringList result;
- QStringList::ConstIterator it;
- QStringList::ConstIterator itEnd = baseDirs.constEnd();
+ TQStringList::ConstIterator it;
+ TQStringList::ConstIterator itEnd = baseDirs.constEnd();
for (it = baseDirs.constBegin(); it != itEnd; ++it) {
// a) get a list of directory names
- QDir baseDir (*it, QString::null,
- QDir::Name|QDir::IgnoreCase, QDir::Dirs);
- QStringList list = baseDir.entryList();
+ TQDir baseDir (*it, TQString::null,
+ TQDir::Name|TQDir::IgnoreCase, TQDir::Dirs);
+ TQStringList list = baseDir.entryList();
// b) produce absolute paths
- QStringList::ConstIterator iter;
- QStringList::ConstIterator iterEnd = list.constEnd();
+ TQStringList::ConstIterator iter;
+ TQStringList::ConstIterator iterEnd = list.constEnd();
for (iter = list.constBegin(); iter != iterEnd; ++iter) {
if ((*iter != ".") && (*iter != ".."))
result += *it + "/" + *iter;
diff --git a/kttsd/plugins/hadifix/voicefileui.ui.h b/kttsd/plugins/hadifix/voicefileui.ui.h
index 9d37375..16e65e5 100644
--- a/kttsd/plugins/hadifix/voicefileui.ui.h
+++ b/kttsd/plugins/hadifix/voicefileui.ui.h
@@ -11,7 +11,7 @@
void VoiceFileWidget::genderButton_clicked()
{
HadifixProc::VoiceGender gender;
- QString details;
+ TQString details;
gender = HadifixProc::determineGender(mbrola, voiceFileURL->url(), &details);
if (gender == HadifixProc::MaleGender) {